/* =============================================
   HERO V7 — Immersive Quantum Nexus
   Production overrides — must override styles.css
   ============================================= */

/* ---- CRITICAL: Override ALL old hero styles ---- */
.hero.hero--v7 {
    background: #060a15 !important;
    background-color: #060a15 !important;
    min-height: 100vh !important;
    display: flex !important;
    align-items: center !important;
    overflow: hidden !important;
    padding: 0 !important;
}
.hero--v7 .hero__bg { display: none !important; }
.hero--v7 .hero__particles { display: none !important; }
.hero--v7 .hero__robot { display: none !important; }
.hero--v7 .hero__visual { display: none !important; }
.hero--v7 .hero__metrics { display: none !important; }

.hero--v7 #scene { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }

/* Header override for dark hero */
body:has(.hero--v7) .header {
    background: rgba(6,10,21,.6) !important;
    backdrop-filter: blur(24px) !important;
    border-bottom: 1px solid rgba(255,255,255,.03) !important;
}
body:has(.hero--v7) .header .header__logo { color: #fff !important; }
body:has(.hero--v7) .header .header__nav-link { color: rgba(255,255,255,.5) !important; }
body:has(.hero--v7) .header .header__nav-link:hover,
body:has(.hero--v7) .header .header__nav-link.active { color: #fff !important; }
body:has(.hero--v7) .header .header__mobile-toggle span { background: #fff !important; }

/* ---- CRITICAL: Override the grid/flex layout from styles.css ---- */
.hero--v7 .hero__content,
.hero--v7 .hero__content.container,
.hero--v7 .container.hero__content {
    display: block !important;
    grid-template-columns: none !important;
    max-width: 720px !important;
    width: auto !important;
    padding: 0 2rem !important;
    margin-left: clamp(1rem, 3vw, 2.5rem) !important;
    margin-right: auto !important;
    position: relative !important;
    z-index: 40 !important;
    min-height: auto !important;
    padding-top: 0 !important;
    gap: 0 !important;
}

/* ---- CRITICAL: Override max-width:52% on .hero__text ---- */
.hero--v7 .hero__text {
    max-width: 100% !important;
    width: 100% !important;
    flex: none !important;
}

/* HUD corners — hidden per founder request */
.hud{display:none !important}
@keyframes v7-livePulse{0%,100%{opacity:1}50%{opacity:.4}}

/* Scanline */
.scanline{position:absolute;left:0;right:0;height:1px;z-index:30;pointer-events:none;
    background:linear-gradient(90deg,transparent,rgba(34,211,238,.08) 20%,rgba(34,211,238,.15) 50%,rgba(34,211,238,.08) 80%,transparent);
    animation:v7-scanMove 6s linear infinite;opacity:.6}
@keyframes v7-scanMove{0%{top:-2px}100%{top:100%}}

/* Badge — hidden per founder request */
.hero--v7 .hero__badge {
    display: none !important;
}
.badge-dot {
    width: 6px; height: 6px; border-radius: 50%;
    background: #22d3ee; box-shadow: 0 0 10px #22d3ee;
    animation: v7-livePulse 2s infinite;
}

/* ---- Headline ---- */
.hero--v7 .hero__headline {
    font-size: clamp(1.8rem, 3.8vw, 2.8rem) !important;
    font-weight: 800 !important;
    line-height: 1.12 !important;
    letter-spacing: -0.02em !important;
    color: #fff !important;
    text-shadow: 0 0 20px rgba(0,102,204,.15), 0 0 60px rgba(8,145,178,.08), 0 0 120px rgba(34,211,238,.04);
    opacity: 0; animation: v7-fadeUp .6s ease .3s forwards;
    margin-bottom: 1.2rem !important;
}
.hero--v7 .hero__headline-sub {
    font-size: inherit !important;
    font-weight: 800 !important;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    letter-spacing: -0.03em !important;
    display: inline !important;
    background: none !important;
}
.hero--v7 .hero__rotating-track span {
    filter: drop-shadow(0 0 18px rgba(0,102,204,.35)) drop-shadow(0 0 40px rgba(124,58,237,.15));
    /* Fallback color so the rotating word stays visible even if the
       background-clip:text + text-fill-color:transparent gradient setup
       fails on some Android browsers — solid cyan is the safe default */
    color: #38bdf8;
}
/* Only apply the gradient text in browsers that support BOTH properties.
   Otherwise the solid color above wins and the word stays visible. */
@supports (-webkit-background-clip: text) and (-webkit-text-fill-color: transparent) {
    .hero--v7 .hero__rotating-track span {
        background: var(--gradient-primary, linear-gradient(135deg, #0066cc, #7c3aed));
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
/* ── Rotating keyword alignment ──
   Keep the original 1.2em geometry (so the rotate-words keyframes still match),
   but use vertical-align: text-bottom so the element aligns to the parent text's
   descender line — which puts the visible word's baseline on the same line as "with". */
.hero--v7 .hero__rotating {
    vertical-align: text-bottom !important;
    line-height: 1.2 !important;
    position: relative !important;
    top: 0.04em !important;
}

/* Subheadline */
.hero--v7 .hero__subheadline {
    color: rgba(255,255,255,.35) !important;
    font-size: .95rem !important;
    line-height: 1.7 !important;
    max-width: 420px !important;
    margin-bottom: 2rem !important;
    opacity: 0; animation: v7-fadeUp .6s ease .5s forwards;
}

/* Trust */
.hero--v7 .hero__trust {
    color: rgba(255,255,255,.3) !important;
    margin-bottom: 2rem !important;
    opacity: 0; animation: v7-fadeUp .6s ease .6s forwards;
}
.hero--v7 .hero__trust-dot { background: rgba(255,255,255,.15) !important; }

/* CTAs */
.hero--v7 .hero__ctas {
    opacity: 0; animation: v7-fadeUp .6s ease .7s forwards;
}
.hero--v7 .btn--primary {
    display: inline-flex !important; align-items: center !important; gap: 8px !important;
    box-shadow: 0 4px 24px rgba(0,102,204,.25), 0 0 40px rgba(0,102,204,.1) !important;
}
.hero--v7 .btn--primary:hover {
    box-shadow: 0 8px 32px rgba(0,102,204,.4), 0 0 60px rgba(0,102,204,.15) !important;
}
.hero--v7 .btn--ghost {
    color: rgba(255,255,255,.5) !important;
    border-color: rgba(255,255,255,.08) !important;
}
.hero--v7 .btn--ghost:hover {
    color: #fff !important;
    border-color: rgba(255,255,255,.2) !important;
}

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

/* Floating labels — opacity-only reveal so it never fights with the JS-set positioning transform */
.labels{position:absolute;inset:0;z-index:35;pointer-events:none}
.fl{position:absolute;display:flex;align-items:center;gap:0;opacity:0;animation:v7-fadeOnly .4s cubic-bezier(.2,.8,.3,1) forwards;animation-play-state:paused;pointer-events:auto;cursor:default}
@keyframes v7-fadeOnly{from{opacity:0}to{opacity:1}}
.fl[data-i="0"]{animation-delay:0s}.fl[data-i="1"]{animation-delay:.07s}.fl[data-i="2"]{animation-delay:.14s}.fl[data-i="3"]{animation-delay:.21s}.fl[data-i="4"]{animation-delay:.28s}
.fl-dot{width:5px;height:5px;border-radius:50%;background:#22d3ee;box-shadow:0 0 8px #22d3ee;flex-shrink:0}
.fl-line{width:30px;height:1px;background:linear-gradient(90deg,#22d3ee,rgba(34,211,238,.1));flex-shrink:0}
.fl-text{font-size:.68rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:rgba(255,255,255,.4);padding:5px 12px;background:rgba(255,255,255,.02);border:1px solid rgba(255,255,255,.05);border-radius:4px;white-space:nowrap;transition:all .3s}
.fl:hover .fl-text{color:#22d3ee;border-color:rgba(34,211,238,.2);background:rgba(34,211,238,.04)}

/* Projected metrics */
.proj-metrics{position:absolute;inset:0;z-index:35;pointer-events:none}
.pm{position:absolute;display:flex;flex-direction:column;align-items:center;opacity:0;animation:v7-pmIn .5s cubic-bezier(.2,.8,.3,1) forwards;animation-play-state:paused}
.pm:nth-child(1){animation-delay:.08s}.pm:nth-child(2){animation-delay:.16s}.pm:nth-child(3){animation-delay:.24s}
@keyframes v7-pmIn{from{opacity:0;transform:scale(.85)}to{opacity:1;transform:scale(1)}}
.pm-v{font-size:1.6rem;font-weight:800;color:rgba(255,255,255,.85);text-shadow:0 0 20px rgba(0,102,204,.4)}
.pm-l{font-size:.55rem;letter-spacing:.15em;color:rgba(255,255,255,.25);text-transform:uppercase}

/* V7 scroll indicator */
.hero__scroll--v7{position:absolute;bottom:1.2rem;left:50%;transform:translateX(-50%);z-index:50;display:flex;flex-direction:column;align-items:center;gap:6px;font-size:.6rem;letter-spacing:.2em;color:rgba(255,255,255,.2)}
.scroll-track{width:1px;height:36px;background:rgba(255,255,255,.06);position:relative;overflow:hidden;border-radius:1px}
.scroll-thumb{width:100%;height:12px;background:#22d3ee;border-radius:1px;position:absolute;animation:v7-scrollAnim 2.5s ease-in-out infinite}
@keyframes v7-scrollAnim{0%{top:-12px}50%{top:36px}100%{top:36px}}

/* ── Mobile: full-screen canvas, geometry top, text bottom ── */
@media(max-width:900px){
    /* Hero on mobile: cut height to ~80svh so there's no giant black band.
       IMPORTANT: use .hero.hero--v7 to match the base rule's specificity
       (0,2,0) — a bare .hero--v7 (0,1,0) selector was losing the cascade
       fight even inside a media query, leaving hero stuck at 100vh. */
    .hero.hero--v7 {
        min-height: 68vh !important;
        min-height: 68svh !important;
        height: auto !important;
        max-height: none !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-end !important;
        overflow: hidden !important;
        padding-top: 60px !important;
        padding-bottom: 0 !important;
    }
    /* Canvas: fills the hero area behind the text */
    .hero--v7 #scene {
        position: absolute !important;
        inset: 0 !important;
        width: 100% !important;
        height: 100% !important;
        z-index: 1 !important;
    }
    /* Text panel: sits BELOW the canvas geometry, no auto-margin gap.
       Takes as much space as it needs (not forced to 55vh). Since parent
       is now content-height instead of 100vh, there is no leftover empty
       space to create the black band the user was seeing. */
    .hero--v7 .hero__content,
    .hero--v7 .hero__content.container,
    .hero--v7 .container.hero__content {
        max-width: 100% !important;
        margin: 0 !important;
        margin-top: auto !important;
        padding: 1.5rem 1.5rem 2rem !important;
        min-height: auto !important;
        display: block !important;
        text-align: center !important;
        z-index: 40 !important;
        position: relative !important;
        background: linear-gradient(to bottom, transparent 0%, rgba(6,10,21,0.55) 30%, rgba(6,10,21,0.92) 100%) !important;
    }
    .hero--v7 .hero__headline {
        font-size: clamp(1.35rem, 5.6vw, 1.85rem) !important;
        margin-bottom: 0.65rem !important;
        text-shadow: 0 2px 24px rgba(6,10,21,.85) !important;
        letter-spacing: -0.015em !important;
    }
    .hero--v7 .hero__subheadline {
        font-size: 0.84rem !important;
        line-height: 1.55 !important;
        margin-bottom: 1.1rem !important;
        max-width: 340px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        color: rgba(255,255,255,.6) !important;
        text-shadow: 0 1px 12px rgba(6,10,21,.85) !important;
    }
    .hero--v7 .hero__trust {
        justify-content: center !important;
        font-size: 0.65rem !important;
        margin-bottom: 0.8rem !important;
    }
    /* CTAs: reliably centered at EVERY mobile width — stacked, centered column
       with width-capped buttons (previously the centering was split across the
       480/900 breakpoints and drifted left). */
    .hero--v7 .hero__ctas {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 12px !important;
        width: 100% !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    .hero--v7 .hero__ctas .btn {
        width: 100% !important;
        max-width: 300px !important;
        margin: 0 auto !important;
        justify-content: center !important;
        text-align: center !important;
        padding: 12px 20px !important;
        font-size: 0.82rem !important;
    }
    /* Hide labels/metrics on mobile to avoid clutter */
    .labels,.hud,.proj-metrics { display:none !important }
    .hero__scroll--v7 { display: none !important; }
}
@media(max-width:480px){
    .hero--v7 .hero__headline { font-size: clamp(1.15rem, 5vw, 1.5rem) !important; }
    .hero--v7 .hero__subheadline { font-size: 0.78rem !important; max-width: 280px !important; }
    .hero--v7 .hero__content,
    .hero--v7 .hero__content.container {
        padding: 0 1rem 2rem !important;
    }
    .hero--v7 .hero__trust { font-size: 0.6rem !important; }
    /* CTA layout/centering is handled once in the ≤900 block above */
}
@media(max-width:375px){
    .hero--v7 .hero__headline { font-size: clamp(1.05rem, 5.5vw, 1.3rem) !important; margin-bottom: 0.5rem !important; }
    .hero--v7 .hero__subheadline { font-size: 0.74rem !important; margin-bottom: 0.75rem !important; max-width: 260px !important; }
    .hero--v7 .hero__content,
    .hero--v7 .hero__content.container { padding: 0 0.875rem 1.5rem !important; }
}

/* ── Cinematic intro: text grows from the beam-impact point — no flash, slow & smooth ── */
/* Opacity grows linearly with scale so visually it reads as a single "emerging" event
   instead of a fast-then-slow pop. Symmetric ease curve avoids the front-loaded spike. */
/* ── Projector reveal — text is cast by the entity's beam, expanding from center ── */
/* Each element is hidden via inset clip-path (collapsed to a center horizontal line),
   then expanded outward — exactly mirroring the projection rectangle on the canvas. */
.hero--v7 .hero__badge,
.hero--v7 .hero__headline,
.hero--v7 .hero__subheadline,
.hero--v7 .hero__trust,
.hero--v7 .hero__ctas {
    opacity: 0;
    clip-path: inset(48% 0 48% 0);
    transform: scaleX(0.4);
    transform-origin: 50% 50%;
    animation: none;
    will-change: opacity, clip-path, transform;
}
.hero__content--v7.v7-text-go .hero__badge,
.hero__content--v7.v7-text-go .hero__headline,
.hero__content--v7.v7-text-go .hero__subheadline,
.hero__content--v7.v7-text-go .hero__trust,
.hero__content--v7.v7-text-go .hero__ctas {
    opacity: 1 !important;
    clip-path: inset(0 0 0 0) !important;
    transform: scaleX(1) !important;
}
.hero__content--v7.v7-text-go .hero__badge {
    animation: v7-project .9s cubic-bezier(.22,.8,.3,1) 0s both !important;
}
.hero__content--v7.v7-text-go .hero__headline {
    animation: v7-project 1s cubic-bezier(.22,.8,.3,1) 0s both !important;
}
.hero__content--v7.v7-text-go .hero__subheadline {
    animation: v7-project .9s cubic-bezier(.22,.8,.3,1) .14s both !important;
}
.hero__content--v7.v7-text-go .hero__trust {
    animation: v7-project .85s cubic-bezier(.22,.8,.3,1) .26s both !important;
}
.hero__content--v7.v7-text-go .hero__ctas {
    animation: v7-project .9s cubic-bezier(.22,.8,.3,1) .38s both !important;
}
/* Text emerges from a horizontal seam (the projection "scanline"), expanding both
   vertically (clip-path) and horizontally (scaleX) — like a real projector throw */
@keyframes v7-project {
    0%   { opacity: 0; clip-path: inset(48% 0 48% 0); transform: scaleX(0.4); }
    40%  { opacity: 1; }
    100% { opacity: 1; clip-path: inset(0 0 0 0); transform: scaleX(1); }
}

/* ── Accessibility: respect reduced-motion preference ── */
@media (prefers-reduced-motion: reduce) {
    .hero--v7 .hero__badge,
    .hero--v7 .hero__headline,
    .hero--v7 .hero__subheadline,
    .hero--v7 .hero__trust,
    .hero--v7 .hero__ctas {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .fl, .pm {
        opacity: 1 !important;
        animation: none !important;
        animation-play-state: running !important;
    }
}
