/* ============================================================
   Science For Rehab — Main Stylesheet
   ============================================================ */

/* ------------------------------------------------------------
   0. Custom properties
   ------------------------------------------------------------ */
:root {
    --color-primary:    #024EFF;
    --color-secondary:  #17899B;
    --color-text:       #0d0d0d;
    --color-text-muted: #5a5a6e;
    --color-bg:         #ffffff;
    --color-bg-alt:     #f6f8fc;
    --color-bg-dark:    #07080f;
    --color-border:     #e4e7f0;

    --gradient-btn: linear-gradient(95deg, #024EFF 55%, #17899B 100%);
    --gradient-text: linear-gradient(95deg, #024EFF 55%, #17899B 100%);

    --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    --radius-sm:  4px;
    --radius:     8px;
    --radius-lg: 16px;

    --shadow-sm: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow:    0 4px 16px rgba(0,0,0,.08);
    --shadow-lg: 0 8px 32px rgba(0,0,0,.12);

    --max-w: 1200px;
    --max-w-text: 720px;
    --nav-h: 72px;
}

/* ------------------------------------------------------------
   1. Reset & base
   ------------------------------------------------------------ */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img, svg {
    display: block;
    max-width: 100%;
}

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul, ol {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
}

/* ------------------------------------------------------------
   2. Typography
   ------------------------------------------------------------ */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
}

h1 { font-size: clamp(2rem,   5vw, 3.25rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem);  }
h3 { font-size: clamp(1.25rem,3vw, 1.75rem); }
h4 { font-size: 1.25rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ------------------------------------------------------------
   3. Layout utilities
   ------------------------------------------------------------ */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin-inline: auto;
    padding-inline: clamp(16px, 4vw, 48px);
}

.section {
    padding-block: clamp(56px, 8vw, 96px);
}

.section--alt {
    background: var(--color-bg-alt);
}

.section--dark {
    background: var(--color-bg-dark);
    color: #fff;
}

/* ------------------------------------------------------------
   4. Buttons
   ------------------------------------------------------------ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: opacity .2s ease, box-shadow .2s ease, transform .15s ease;
    cursor: pointer;
    white-space: nowrap;
}

.btn:hover {
    text-decoration: none;
    opacity: .9;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(2, 78, 255, .3);
}

.btn:active {
    transform: translateY(0);
}

.btn--primary {
    background: var(--gradient-btn);
    color: #fff;
}

.btn--outline {
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: #fff;
    box-shadow: none;
}

.btn--ghost {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255,255,255,.4);
}

.btn--ghost:hover {
    border-color: #fff;
    background: rgba(255,255,255,.08);
    box-shadow: none;
}

.btn--sm {
    padding: 10px 20px;
    font-size: 0.82rem;
}

/* ------------------------------------------------------------
   5. Navigation
   ------------------------------------------------------------ */
.site-header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: rgba(255,255,255,.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-border);
    height: var(--nav-h);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--nav-h);
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    height: 40px;
    width: auto;
}

.nav-logo-text {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    color: var(--color-text);
    line-height: 1.1;
}

.nav-logo-text span {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-menu a {
    display: block;
    padding: 8px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    border-radius: var(--radius-sm);
    transition: color .15s, background .15s;
    text-decoration: none;
}

.nav-menu a:hover {
    color: var(--color-primary);
    background: rgba(2,78,255,.05);
}

.nav-menu .btn {
    margin-left: 8px;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    padding: 6px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: transform .25s, opacity .25s;
}

.nav-toggle.is-open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 900px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: var(--nav-h);
        left: 0;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        padding: 12px 16px 20px;
        box-shadow: var(--shadow);
    }

    .nav-menu.is-open {
        display: flex;
    }

    .nav-menu a {
        padding: 12px 16px;
        font-size: 1rem;
    }

    .nav-menu .btn {
        margin: 12px 0 0;
        width: 100%;
        justify-content: center;
    }
}

/* ------------------------------------------------------------
   6. Footer
   ------------------------------------------------------------ */
.site-footer {
    background: var(--color-bg-dark);
    color: rgba(255,255,255,.7);
    padding-block: clamp(48px, 6vw, 80px) 32px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.footer-brand-name {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: #fff;
    text-transform: uppercase;
}

.footer-brand-sub {
    font-size: 0.7rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    background: var(--gradient-btn);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    margin-top: 2px;
    margin-bottom: 16px;
}

.footer-tagline {
    font-size: 0.875rem;
    line-height: 1.65;
    margin-bottom: 24px;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 50%;
    color: rgba(255,255,255,.6);
    transition: border-color .2s, color .2s, background .2s;
}

.footer-social a:hover {
    border-color: var(--color-primary);
    color: #fff;
    background: rgba(2,78,255,.2);
}

.footer-col-title {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,.4);
    margin-bottom: 18px;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    font-size: 0.9rem;
    color: rgba(255,255,255,.65);
    text-decoration: none;
    transition: color .15s;
}

.footer-nav a:hover {
    color: #fff;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 28px;
    font-size: 0.8rem;
    color: rgba(255,255,255,.35);
}

.footer-legal {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-legal a {
    color: rgba(255,255,255,.35);
    text-decoration: none;
    transition: color .15s;
}

.footer-legal a:hover {
    color: rgba(255,255,255,.7);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 36px;
    }
}

/* ------------------------------------------------------------
   7. Generic page / post content
   ------------------------------------------------------------ */
.page-hero {
    background: var(--color-bg-alt);
    padding-block: clamp(48px, 6vw, 80px);
    border-bottom: 1px solid var(--color-border);
}

.page-hero h1 {
    margin-bottom: 12px;
}

.entry-content {
    max-width: var(--max-w-text);
}

.entry-content h2,
.entry-content h3 {
    margin-top: 2em;
    margin-bottom: .6em;
}

.entry-content p,
.entry-content ul,
.entry-content ol {
    margin-bottom: 1.25em;
}

.entry-content ul,
.entry-content ol {
    padding-left: 1.5em;
    list-style: revert;
}

/* ------------------------------------------------------------
   8. Gradient accent bar (used site-wide)
   ------------------------------------------------------------ */
.accent-bar {
    height: 3px;
    background: var(--gradient-btn);
}

/* ------------------------------------------------------------
   9. Card
   ------------------------------------------------------------ */
.card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s, transform .2s;
}

.card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}
