/* ==========================================================================
   site.css - tokens, reset, typography, nav, buttons, footer.
   Loaded first on every page. The per-variant accent is injected after this
   file by partials/head.html, so everything here must reference the variable,
   never a literal colour.
   ========================================================================== */

:root {
    /* Accent is overridden per variant in the document head. */
    --accent: #3498DB;
    --accent-dark: #2980B9;
    --accent-rgb: 52, 152, 219;

    --ink: #1E293B;
    --ink-soft: #334155;
    --text: #33383F;
    --muted: #64748B;
    --line: #E2E8F0;
    --bg: #F1F5F9;
    --bg-alt: #F8FAFC;
    --white: #FFFFFF;
    --ok: #10B981;

    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

    --s-1: 8px;
    --s-2: 16px;
    --s-3: 24px;
    --s-4: 32px;
    --s-5: 48px;
    --s-6: 80px;

    --radius: 8px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(15, 23, 42, .08), 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 4px 12px rgba(15, 23, 42, .10);
    --shadow-lg: 0 12px 28px rgba(15, 23, 42, .12);
    --max: 1120px;
    --ease: all .25s ease;

    /* Aliases so page CSS carried over from the old site keeps working. */
    --primary: var(--accent);
    --primary-dark: var(--accent-dark);
    --secondary: var(--ok);
    --dark: var(--ink);
    --gray: var(--muted);
    --light-gray: var(--bg);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: var(--ease); }
ul { list-style: none; }

h1, h2, h3, h4 { color: var(--ink); font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { margin-bottom: var(--s-2); }
p:last-child { margin-bottom: 0; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--s-3); }
.lede { font-size: 1.125rem; color: var(--ink-soft); }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .78rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--s-1);
}

/* ---------------------------------------------------------------- icons */
.icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
    color: var(--accent);
}
.icon-lg { width: 2rem; height: 2rem; }

/* ---------------------------------------------------------------- navigation */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(30, 41, 59, .96);
    backdrop-filter: blur(10px);
    padding: .85rem 0;
    z-index: 1000;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
}
.nav-container {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 var(--s-3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-2);
}
.nav-logo { display: flex; align-items: center; gap: .7rem; color: var(--white); font-weight: 700; }
.nav-logo-img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .8); }
.nav-logo-text { font-size: 1.05rem; }
.nav-logo:hover .nav-logo-text { color: var(--accent); }
.nav-menu { display: flex; gap: .35rem; align-items: center; }
.nav-link {
    color: rgba(255, 255, 255, .86);
    font-weight: 500;
    font-size: .95rem;
    padding: .45rem .75rem;
    border-radius: 6px;
}
.nav-link:hover { color: var(--white); background: rgba(255, 255, 255, .1); }
.nav-link.active { color: var(--white); background: rgba(var(--accent-rgb), .3); }

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: .5rem;
}
.hamburger-line { width: 24px; height: 2px; background: var(--white); border-radius: 2px; transition: var(--ease); }
.hamburger.active .hamburger-line:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.hamburger.active .hamburger-line:nth-child(2) { opacity: 0; }
.hamburger.active .hamburger-line:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 860px) {
    .hamburger { display: flex; }
    .nav-menu {
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: rgba(30, 41, 59, .99);
        padding: .5rem 0 1rem;
        display: none;
    }
    .nav-menu.active { display: flex; }
    .nav-link { display: block; padding: .9rem var(--s-3); border-radius: 0; }
}

/* ---------------------------------------------------------------- buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .8rem 1.6rem;
    border-radius: var(--radius);
    font-weight: 600;
    border: 2px solid transparent;
    cursor: pointer;
    transition: var(--ease);
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-secondary:hover { background: rgba(var(--accent-rgb), .08); transform: translateY(-2px); }
.btn-on-dark { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .6); }
.btn-on-dark:hover { background: var(--white); color: var(--ink); }

/* ---------------------------------------------------------------- page furniture */
.page-hero {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-soft) 100%);
    color: var(--white);
    padding: calc(var(--s-6) + 40px) var(--s-3) var(--s-5);
    text-align: center;
}
.page-hero h1 { color: var(--white); margin-bottom: var(--s-2); }
.page-hero p { color: rgba(255, 255, 255, .88); max-width: 720px; margin: 0 auto var(--s-2); font-size: 1.1rem; }
.page-hero .eyebrow { color: var(--accent); }

.section { padding: var(--s-5) 0; }
.section-alt { background: var(--white); }
.section-title { margin-bottom: var(--s-3); }

.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: var(--s-3);
    box-shadow: var(--shadow);
    border: 1px solid var(--line);
}

.fact-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--s-2);
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: var(--s-3);
}
.fact { text-align: center; }
.fact-value { font-size: 1.9rem; font-weight: 800; color: var(--accent); line-height: 1.1; }
.fact-label { font-size: .82rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }

/* ---------------------------------------------------------------- footer */
.site-footer {
    margin-top: auto;
    background: var(--ink);
    color: rgba(255, 255, 255, .8);
    padding: var(--s-5) var(--s-3);
    text-align: center;
}
.footer-inner { max-width: var(--max); margin: 0 auto; }
.footer-name { color: var(--white); font-weight: 700; font-size: 1.1rem; margin-bottom: .25rem; }
.footer-meta, .footer-contact, .footer-updated { margin-bottom: .25rem; font-size: .92rem; }
.footer-contact a { color: var(--accent); }
.footer-contact a:hover { text-decoration: underline; }
.footer-sep { color: rgba(255, 255, 255, .35); margin: 0 .4rem; }
.footer-updated { color: rgba(255, 255, 255, .55); font-size: .82rem; margin-top: var(--s-2); }

/* ---------------------------------------------------------------- utilities */
.fade-in { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.fade-in.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }
    html { scroll-behavior: auto; }
}
