/* ═══════════════════════════════════════════════════
   TrueScale — Reference DNA Rebuild
   Based on: fine-n7vljkp34f.peachworlds.com
   ═══════════════════════════════════════════════════ */
/* Font loaded non-blocking via <link> in HTML head — no @import needed here */

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

:root {
    /* DNA Color System */
    --bg-hero: transparent;
    --bg-light: #f0f0f2;
    --bg-dark: #111111;
    --text-on-light: #0a0a0a;
    --text-on-dark: #f5f5f7;
    --text-secondary-light: #3a3a3c;
    --text-secondary-dark: rgba(255,255,255,0.55);
    --accent-blue: #0071e3;
    --eyebrow-color: #6e6e73;
    --border-subtle: rgba(255,255,255,0.12);
    --border-dark: rgba(0,0,0,0.08);

    /* Glass System */
    --glass-light: rgba(205, 210, 215, 0.72);
    --glass-dark: rgba(0, 0, 0, 0.55);
    --blur: saturate(180%) blur(20px);

    /* Pill Nav */
    --nav-height: 56px;
    --nav-radius: 14px;

    /* Typography */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    --lh-tight: 1.02;
    --lh-body: 1.65;
    --track-tight: -0.03em;
    --track-eyebrow: 0.15em;

    /* Layout */
    --section-pad: 130px;
    --content-max: 1200px;
    --radius-card: 18px;
    --radius-pill: 980px;
    --ease-out: cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-dark);
    color: var(--text-on-dark);
    overflow-x: hidden;
    line-height: var(--lh-body);
}

/* ─────────────────────────────────────────────────
   VIDEO BACKGROUND
───────────────────────────────────────────────── */
.video-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    overflow: hidden;
}

.video-wrapper {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 2s var(--ease-out);
}

.video-wrapper.active { opacity: 1; }

.video-wrapper video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.45) 0%,
        rgba(0,0,0,0.35) 40%,
        rgba(0,0,0,0.65) 100%
    );
}

/* ─────────────────────────────────────────────────
   FLOATING PILL NAVBAR — DNA Signature Element
───────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 960px;
    height: var(--nav-height);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    background: var(--glass-dark);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--nav-radius);
    transition: background 0.3s, box-shadow 0.3s;
}

.navbar.scrolled {
    background: rgba(0,0,0,0.8);
    box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.logo {
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-links a {
    font-size: 0.82rem;
    font-weight: 400;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.nav-links a:hover { color: #ffffff; }

.btn-primary-sm {
    font-size: 0.82rem !important;
    font-weight: 500 !important;
    color: #ffffff !important;
    background: var(--accent-blue) !important;
    padding: 0.5rem 1.1rem;
    border-radius: 8px;
    transition: background 0.2s !important;
    text-decoration: none;
}

.btn-primary-sm:hover { background: #0077ed !important; }

/* ─────────────────────────────────────────────────
   HERO  — full-viewport, left-aligned, video behind
───────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;   /* content sits in lower 40% of hero */
    padding: calc(var(--nav-height) + 56px) 5vw 10vh;
    position: relative;
}

.hero-content { max-width: 760px; }

h1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
    font-weight: 700;
    line-height: var(--lh-tight);
    letter-spacing: var(--track-tight);
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.text-gradient {
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.65) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    font-weight: 300;
    color: rgba(255,255,255,0.6);
    max-width: 520px;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

.cta-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 500;
    color: #000000;
    background: #ffffff;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    letter-spacing: -0.01em;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-primary:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 400;
    color: rgba(255,255,255,0.85);
    background: transparent;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(255,255,255,0.35);
    text-decoration: none;
    transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
    border-color: rgba(255,255,255,0.7);
    color: #ffffff;
}

.version-info {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.4);
    letter-spacing: 0.02em;
}

/* ─────────────────────────────────────────────────
   EYEBROW LABEL — DNA Signature: tiny, tracked, muted
───────────────────────────────────────────────── */
.section-eyebrow {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: var(--track-eyebrow);
    text-transform: uppercase;
    display: block;
    margin-bottom: 1.25rem;
}

/* Eyebrow on dark sections */
.section-dark .section-eyebrow { color: rgba(255,255,255,0.4); }

/* Eyebrow on light sections */
.section-light .section-eyebrow { color: #6e6e73; }

/* ─────────────────────────────────────────────────
   STORY CONTAINER — transparent, video shows through
───────────────────────────────────────────────── */
.story-container {
    background: transparent;
    position: relative;
    z-index: 1;
}

/* ─────────────────────────────────────────────────
   STORY SECTIONS — glass cards over video
───────────────────────────────────────────────── */
.story-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: var(--content-max);
    margin: 4rem auto;
    padding: 4.5rem 4rem;
    background: var(--glass-dark);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    /* NO overflow:hidden — was clipping slide-in children */
}

/* Alternating column order — pure layout, no animation */
.story-section:nth-of-type(even) .story-content { order: 2; }
.story-section:nth-of-type(even) .story-media   { order: 1; }

/* ─────────────────────────────────────────────────
   SCROLL REVEAL — Bulletproof progressive enhancement
   JS adds .will-reveal on DOMContentLoaded.
   Observer adds .in-view when section enters viewport.
   Content starts fully visible; JS hides then reveals.
───────────────────────────────────────────────── */
.story-section.will-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.55s ease, transform 0.55s ease;
    will-change: opacity, transform;
}

.story-section.will-reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Child slide-ins run as keyframe animations AFTER parent is visible */
.story-section.in-view .story-content {
    animation: slideFromLeft 0.5s 0.05s ease both;
}
.story-section.in-view:nth-of-type(even) .story-content {
    animation: slideFromRight 0.5s 0.05s ease both;
}
.story-section.in-view .story-media {
    animation: slideFromRight 0.5s 0.1s ease both;
}
.story-section.in-view:nth-of-type(even) .story-media {
    animation: slideFromLeft 0.5s 0.1s ease both;
}

@keyframes slideFromLeft {
    from { opacity: 0; transform: translateX(-36px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideFromRight {
    from { opacity: 0; transform: translateX(36px); }
    to   { opacity: 1; transform: translateX(0); }
}


/* ── Story Text ── */
.story-content h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.75rem);
    font-weight: 700;
    letter-spacing: var(--track-tight);
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
}

.story-content p {
    font-size: 1.05rem;
    color: var(--text-secondary-dark);
    line-height: 1.7;
    font-weight: 300;
}

.story-content strong { color: #ffffff; font-weight: 500; }

/* ── Story Media ── */
.story-media {
    border-radius: var(--radius-card);
    overflow: hidden;
    aspect-ratio: 16/10;
    background: rgba(255,255,255,0.06);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.08);
}

.media-content {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s var(--ease-out);
}

.story-media:hover .media-content { transform: scale(1.02); }

/* ─────────────────────────────────────────────────
   EARLY ACCESS — glass card, centered
───────────────────────────────────────────────── */
.early-access-section {
    max-width: 680px;
    margin: 3rem auto 8rem;
    padding: 5rem 3.5rem;
    background: var(--glass-dark);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    position: relative;
    z-index: 1;
}

.early-access-container {
    text-align: center;
}

.early-access-container h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    letter-spacing: var(--track-tight);
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.early-access-container > p {
    color: var(--text-secondary-dark);
    font-weight: 300;
    font-size: 1rem;
    margin-bottom: 2rem;
}

.access-code-form {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
}

.access-code-form input {
    flex: 1;
    max-width: 240px;
    padding: 0.8rem 1.2rem;
    font-family: var(--font);
    font-size: 0.9rem;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-pill);
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
    letter-spacing: 0.05em;
}

.access-code-form input::placeholder { color: rgba(255,255,255,0.3); }
.access-code-form input:focus { border-color: rgba(255,255,255,0.4); }

#verifyBtn {
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 500;
    background: #ffffff;
    color: #000000;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.8rem 1.6rem;
    cursor: pointer;
    transition: opacity 0.2s;
    letter-spacing: -0.01em;
}

#verifyBtn:hover { opacity: 0.87; }
#verifyBtn:disabled { opacity: 0.5; cursor: default; }

.download-area {
    margin-top: 2rem;
    padding: 2rem;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-card);
    animation: fadeUp 0.5s var(--ease-out) both;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

.success-message {
    color: #30d158;
    font-size: 0.95rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: #000000;
    background: #ffffff;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-pill);
    text-decoration: none;
    transition: opacity 0.2s, transform 0.2s;
}

.btn-download:hover { opacity: 0.87; transform: translateY(-1px); }

.hidden { display: none !important; }

.error-message {
    color: #ff453a;
    font-size: 0.9rem;
    margin-top: 1rem;
    font-weight: 400;
}

/* ─────────────────────────────────────────────────
   FOOTER
───────────────────────────────────────────────── */
footer {
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid var(--border-subtle);
    padding: 4rem 5vw 3rem;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: var(--content-max);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-col .logo { font-size: 1rem; margin-bottom: 0.75rem; display: block; }

.footer-col p {
    color: rgba(255,255,255,0.35);
    font-size: 0.82rem;
    line-height: 1.7;
}

.footer-col a {
    color: rgba(255,255,255,0.35);
    text-decoration: none;
    font-size: 0.82rem;
    transition: color 0.2s;
}

.footer-col a:hover { color: rgba(255,255,255,0.65); }

/* ─────────────────────────────────────────────────
   HERO ENTRY ANIMATIONS
───────────────────────────────────────────────── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.7s var(--ease-out) both;
}

.delay-1 { animation-delay: 0.06s; }
.delay-2 { animation-delay: 0.12s; }
.delay-3 { animation-delay: 0.18s; }

/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */
@media (max-width: 900px) {
    :root { --section-pad: 80px; }

    .story-section {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        padding: 3.5rem 2rem;
        margin: 2.5rem 1.25rem;
    }

    .story-section:nth-of-type(even) .story-content,
    .story-section:nth-of-type(even) .story-media { order: unset; }

    .hero { padding-left: 5vw; padding-right: 5vw; }

    .navbar {
        width: calc(100% - 24px);
        top: 10px;
    }
}

@media (max-width: 600px) {
    .access-code-form {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .access-code-form input {
        max-width: 100%;
        width: 100%;
        text-align: center;
    }

    #verifyBtn { width: 100%; }

    .nav-links a:not(.btn-primary-sm) { display: none; }

    h1 { font-size: clamp(2.5rem, 11vw, 4rem); }
}

@media (max-width: 480px) {
    .navbar { padding: 0 1rem; }

    .story-section { padding: 2.5rem 1.25rem; }

    .story-content h2 { font-size: 1.75rem; }

    .cta-group { flex-direction: column; width: 100%; }
    .btn-primary, .btn-secondary { width: 100%; justify-content: center; }

    .early-access-section { padding: 3rem 1.5rem; margin: 2rem 1rem 5rem; }
}