/* styles.css */

/* ==========================================================================
   1. CSS Variables
   ========================================================================== */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url(https://fonts.gstatic.com/s/inter/v13/UcCO3FwrK3iLTeHuS_fvQtMwCp50KnMw2boKoduKmMEVuGkyMZhrib2Bg-4.woff2) format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root{
    --bg: #f8fafc;
    --panel: #ffffff;
    --text: #0f172a;
    --muted: #475569;
    --faint: #64748b;
    --line: rgba(0,0,0,0.08);
    --accent: #16a34a;
    --accent2: #2563eb;
    --warn: #d97706;
    --shadow: 0 12px 28px rgba(0,0,0,0.06);
    --radius: 18px;
    --radius2: 14px;
    --max: 1120px;
    --pad: clamp(16px, 3vw, 28px);
    --font-sans: 'Inter', ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

/* ==========================================================================
   2. Reset & Base Styles
   ========================================================================== */
*{ box-sizing: border-box; }

html, body{ height: 100%; scroll-behavior: smooth; }
body{
    margin: 0;
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--bg); /* solid fallback */
    line-height: 1.45;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Render the gradient as a single fixed composited layer */
body::before{
    content:"";
    position: fixed;
    inset: 0;
    z-index: -2;
    pointer-events: none;
    background:
            radial-gradient(900px 520px at 12% 12%, rgba(37,99,235,0.06), transparent 62%),
            radial-gradient(850px 520px at 88% 22%, rgba(22,163,74,0.05), transparent 62%),
            radial-gradient(1000px 700px at 50% 92%, rgba(217,119,6,0.04), transparent 64%),
            linear-gradient(180deg, #f8fafc 0%, #f1f5f9 46%, #f8fafc 100%);
    transform: translateZ(0);
}

/* Subtle noise overlay to eliminate banding */
body::after{
    content:"";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

a{ color: inherit; text-decoration: none; }
a:hover{ text-decoration: underline; text-underline-offset: 3px; }

.skip{
    position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip:focus{
    left: 12px; top: 12px; width:auto; height:auto; padding: 10px 12px;
    background: #111827; border: 1px solid var(--line); border-radius: 10px;
    z-index: 9999;
}

/* ==========================================================================
   3. Layout Components
   ========================================================================== */

/* Header */
.header{
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.82);
    border-bottom: 1px solid var(--line);
}
.header-inner{
    max-width: var(--max);
    margin: 0 auto;
    padding: 10px var(--pad);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    position: relative;
}
.brand{
    display:flex;
    flex-direction: column;
    gap: 2px;
    min-width: 210px;
    flex-shrink: 0;
}
.brand .name{
    font-weight: 820;
    letter-spacing: 0.2px;
    font-size: 16px;
    line-height: 1.2;
}
.brand .meta{
    font-size: 12.5px;
    color: var(--muted);
}

/* Hamburger Menu */
.nav-toggle{
    display: none;
}

.nav-toggle-btn{
    display: none;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    align-items: center;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
    flex-direction: column;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    z-index: 1101;
}
.nav-toggle-btn span{
    width: 18px;
    height: 2px;
    background: var(--text);
    border-radius: 99px;
    opacity: 0.9;
    transition: transform 180ms ease, opacity 180ms ease;
}

.nav-overlay{
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.35);
    z-index: 1050;
    display: block;
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease;
}

/* Main */
main{
    max-width: var(--max);
    margin: 0 auto;
    padding: 22px var(--pad) 64px;
}

/* Footer */
.footer{
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 12.5px;
    display:flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items:center;
    justify-content: space-between;
}

/* ==========================================================================
   4. UI Components
   ========================================================================== */

/* Navigation */
.nav{
    display:flex;
    align-items:center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.nav a{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    padding: 9px 10px;
    border-radius: 12px;
    border: 1px solid transparent;
    color: var(--muted);
    font-weight: 600;
    font-size: 13px;
}
.nav a:hover{
    border-color: var(--line);
    background: rgba(0,0,0,0.04);
    text-decoration: none;
    color: var(--text);
}

/* Buttons */
.btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: #ffffff;
    font-weight: 750;
    font-size: 13px;
    color: var(--text);
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.btn:hover{
    background: #f1f5f9;
    text-decoration: none;
}
.btn.primary{
    border-color: rgba(22,163,74,0.30);
    background: linear-gradient(180deg, #16a34a, #15803d);
    color: #ffffff;
}
.btn.primary:hover{
    background: linear-gradient(180deg, #15803d, #166534);
}

/* Badges */
.badge-row{
    display:flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0 14px;
}
.badge-row.spaced{ margin-top: 12px; }
.badge{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #ffffff;
    color: var(--muted);
    font-size: 12.5px;
    font-weight: 650;
    white-space: nowrap;
}
.badge.link:hover{
    background: rgba(255,255,255,0.08);
    text-decoration: none;
    color: var(--text);
}
.dot{
    width: 7px; height: 7px; border-radius: 99px;
    background: var(--accent2);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}
.dot.green{ background: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,0.12); }
.dot.gold{ background: var(--warn); box-shadow: 0 0 0 3px rgba(217,119,6,0.12); }

/* Pills */
.pill-row{
    display:flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items:center;
    margin-top: 10px;
}
.pill{
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #ffffff;
    font-weight: 800;
    font-size: 12.5px;
    color: var(--muted);
    box-shadow: 0 8px 18px rgba(0,0,0,0.03);
}

/* Cards */
.card{
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius2);
    padding: 14px;
    box-shadow: 0 10px 22px rgba(0,0,0,0.04);
}
.card h3{ margin: 0 0 8px; font-size: 14.5px; letter-spacing: 0.15px; }
.card p{ margin: 0; color: var(--muted); font-size: 13.5px; }

/* Key-Value Pairs */
.kv{
    display:grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
.kv .item{
    padding: 10px 12px;
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.03);
}
.kv .k{
    font-size: 11.5px;
    color: var(--faint);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 4px;
    font-weight: 800;
}
.kv .v{
    font-size: 14px;
    font-weight: 800;
    color: var(--text);
}

/* Lists */
.list{
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--muted);
    font-size: 13.5px;
}
.list li{ margin: 6px 0; }

/* CTA Rows */
.cta-row{
    display:flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* ==========================================================================
   5. Content Sections
   ========================================================================== */

/* Hero Section */
.hero{
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 18px;
    margin-top: 18px;
    align-items: start;
}

.panel{
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    overflow: hidden;
}
.panel-inner{
    padding: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(248,250,252,0.95));
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.headline{
    font-size: clamp(28px, 3.3vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.6px;
    margin: 0 0 10px;
    font-weight: 880;
}
.subhead{
    margin: 0 0 16px;
    color: var(--muted);
    font-size: 15.5px;
    max-width: 60ch;
}

/* Video */
.video{
    aspect-ratio: 9 / 16;
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    border: 1px solid var(--line);
    border-radius: var(--radius2);
    display:flex;
    align-items:center;
    justify-content:center;
    position: relative;
    overflow: hidden;
    max-width: 380px;
    margin: 0 auto;
}
.video::before{
    content:"";
    position:absolute;
    inset: -35%;
    background:
        radial-gradient(circle at 30% 40%, rgba(37,99,235,0.10), transparent 58%),
        radial-gradient(circle at 70% 65%, rgba(22,163,74,0.08), transparent 58%);
    transform: rotate(8deg);
    opacity: 0.9;
}
.video-content{
    position: relative;
    padding: 16px;
    text-align:center;
    max-width: 40ch;
    color: var(--text);
}
.video-title{
    font-weight: 850;
    margin: 0 0 6px;
    color: var(--text);
}
.video-note{
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
}
.play{
    width: 58px; height: 58px; border-radius: 99px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.85);
    display:flex; align-items:center; justify-content:center;
    margin: 0 auto 12px;
    box-shadow: 0 10px 18px rgba(0,0,0,0.06);
}
.play span{
    display:block;
    width: 0; height: 0;
    border-left: 16px solid var(--accent2);
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 3px;
}

/* Photo */
.photo{
    display: block;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius2);
    background: linear-gradient(180deg, #ffffff, #f8fafc);
    box-shadow: 0 10px 22px rgba(0,0,0,0.04);
    margin-bottom: 0;
    margin-top: 0;
}
.photo img{
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    display: block;
}
.photo-placeholder{
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 14px;
    border: 1px dashed rgba(0,0,0,0.18);
    background:
        radial-gradient(circle at 30% 40%, rgba(37,99,235,0.10), transparent 60%),
        radial-gradient(circle at 70% 70%, rgba(22,163,74,0.08), transparent 60%),
        #ffffff;
}
.photo-caption{
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}
.photo-title{
    font-weight: 900;
    letter-spacing: 0.1px;
}
.photo-note{
    color: var(--muted);
    font-size: 13.5px;
}

/* Sections */
.section{ margin-top: 18px; }

.section-head{
    display:flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0 0 10px;
    padding: 0 2px;
}
.section-head h2{ margin: 0; font-size: 18px; letter-spacing: 0.2px; }
.section-head p{ margin: 0; color: var(--muted); font-size: 13.5px; }
.section-head.compact{ margin-bottom: 8px; }
.h2-sm{ font-size: 16px !important; }

.block{ margin-top: 12px; }
.note{ margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }

/* Grids */
.grid3{
    display:grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}
.grid2{
    display:grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

/* Tables */
.table-wrap{ margin-top: 10px; overflow-x: auto; }
table{
    width: 100%;
    min-width: 620px;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: 0 10px 22px rgba(0,0,0,0.03);
}
th, td{
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--muted);
}
th{
    font-size: 11.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--faint);
    background: #f8fafc;
    font-weight: 900;
}
tr:last-child td{ border-bottom: none; }
td strong{ color: var(--text); font-weight: 900; }

/* ==========================================================================
   6. Collapsible Functionality
   ========================================================================== */
.collapsible{
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: #ffffff;
    overflow: hidden;
    box-shadow: var(--shadow);
}
.toggle{
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text);
    padding: 16px 18px;
    display:flex;
    align-items:center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 900;
    font-size: 15px;
    letter-spacing: 0.2px;
}
.toggle:hover{ background: rgba(0,0,0,0.03); }
.toggle .right{
    display:flex;
    align-items:center;
    gap: 10px;
    color: var(--muted);
    font-weight: 750;
    font-size: 12.5px;
}
.chev{
    width: 12px; height: 12px;
    border-right: 2px solid var(--faint);
    border-bottom: 2px solid var(--faint);
    transform: rotate(45deg);
    transition: transform 220ms ease;
}
.collapsible.open .chev{ transform: rotate(225deg); }

.content{
    max-height: 0;
    overflow: hidden;
    transition: max-height 280ms ease;
    border-top: 1px solid var(--line);
}
.content-inner{ padding: 16px 18px 18px; }

/* ==========================================================================
   7. Media Queries
   ========================================================================== */
@media (max-width: 900px){
    .header-inner{
        padding: 12px var(--pad);
        position: static;
    }

    .nav-toggle-btn{ 
        display: inline-flex;
        position: relative;
        z-index: 1200;
    }

    .nav{
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        width: min(86vw, 340px);
        padding: 16px;
        padding-top: 76px;
        background: #ffffff;
        border-left: 1px solid var(--line);
        box-shadow: -18px 0 40px rgba(0,0,0,0.14);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 8px;
        transform: translateX(105%);
        transition: transform 220ms ease;
        z-index: 1100;
    }

    .nav a{
        justify-content: flex-start;
        padding: 12px 12px;
        border-radius: 12px;
        background: rgba(0,0,0,0.02);
        color: var(--text);
        font-size: 14px;
    }
    .nav a:hover{
        border-color: var(--line);
        background: rgba(0,0,0,0.08);
        text-decoration: none;
    }
    .nav a.btn{
        justify-content: center;
        margin-top: 6px;
        background: linear-gradient(180deg, #16a34a, #15803d);
        color: #ffffff;
    }
    .nav a.btn:hover{
        background: linear-gradient(180deg, #15803d, #166534);
    }

    .nav-toggle:checked ~ .header-inner .nav{
        transform: translateX(0);
    }
    .nav-toggle:checked ~ .nav-overlay{
        opacity: 1;
        pointer-events: auto;
    }

    /* Animate hamburger into an "X" */
    .nav-toggle:checked + .nav-toggle-btn span:nth-child(1){
        transform: translateY(7px) rotate(45deg);
    }
    .nav-toggle:checked + .nav-toggle-btn span:nth-child(2){
        opacity: 0;
    }
    .nav-toggle:checked + .nav-toggle-btn span:nth-child(3){
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero{ grid-template-columns: 1fr; }
    .brand{ min-width: unset; }
    .nav{ justify-content: flex-start; }
    .grid3{ grid-template-columns: 1fr; }
    .grid2{ grid-template-columns: 1fr; }

    .video{
        max-width: 360px;
    }

    .photo img,
    .photo-placeholder{
        border-radius: 12px;
    }
}

@media (prefers-reduced-motion: reduce){
    .content, .chev, .nav-toggle-btn span{ transition: none !important; }
}

/* Balance spacing inside the hero panels (since .panel-inner now uses gap) */
.hero .badge-row{ margin: 0; }
.hero .cta-row{ margin-top: 0; }
.hero .subhead{ margin: 0; }
