/* =============================================================
   Bud Novaria — page hero carousel (.nvh-blade)
   Six-frame auto-advancing hero: hero anchor → problem → the OS
   → economics → proof → resolve, looping. Pairs with
   assets/js/novaria-hero-carousel.js and the [data-nvh-blade]
   markup (novaria/index.html §hero). Fork of home-hero-carousel
   (hc-*), namespaced nvh-*, tuned shorter: a page hero, not a
   takeover. Styled against tokens.css + site.css (load first).
   No film.css / film.js dependency — the full film stays at /film.
   ============================================================= */

/* ── blade — visibly shorter than the homepage (84vh → 64vh) ── */
.nvh-blade{ position:relative; width:100%; height:min(max(520px,64vh),calc(100vh - var(--nav-h,71px)));
  background:var(--bud-midnight-purple,#0A0712); overflow:hidden; isolation:isolate; }
.nvh-glow{ position:absolute; inset:0; z-index:1; pointer-events:none;
  background:radial-gradient(85% 90% at 50% 24%,rgba(140,51,239,.15),transparent 68%); }
.nvh-vig{ position:absolute; inset:0; z-index:1; pointer-events:none;
  background:radial-gradient(120% 100% at 50% 50%,transparent 42%,rgba(10,7,18,.55) 100%); }
.nvh-sr{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; margin:-1px; padding:0; }
.nvh-stack{ position:absolute; inset:0; z-index:2; }
/* timeline bar — the /film chrome, story frames only; the two hero
   book-ends fade it out (driver sets width + opacity). */
.nvh-prog{ position:absolute; top:0; left:0; z-index:21; height:2px; width:0; opacity:0; pointer-events:none;
  border-radius:0 2px 2px 0;
  background:linear-gradient(90deg,var(--bud-electric,#8C33EF),var(--bud-electric-2,#B785F4),var(--bud-green,#35C88B));
  box-shadow:0 0 10px rgba(140,51,239,.6);
  transition:width .8s cubic-bezier(.22,.61,.36,1), opacity .5s cubic-bezier(.4,0,.2,1); }

/* ── motif state: full strength on the hero book-ends, dropped well back
      behind the story frames so their copy and tiles carry the frame ── */
[data-nvh-blade] [data-nvh-motif]{ opacity:.12; transition:opacity 1.1s cubic-bezier(.4,0,.2,1); }
[data-nvh-blade][data-motif="hero"] [data-nvh-motif]{ opacity:1; }

/* ── scene state machinery ── */
[data-nvh-scene]{ position:absolute; inset:0; opacity:0; visibility:hidden; transition:opacity .55s cubic-bezier(.4,0,.2,1); }
[data-nvh-scene][data-on="1"]{ opacity:1; visibility:visible; }
[data-nvh-blade] [data-fx]{ opacity:0; }
[data-nvh-scene][data-on="1"] [data-fx]{ animation:nvhRise .62s cubic-bezier(.22,1,.36,1) both; animation-delay:var(--d,0s); }
@keyframes nvhRise{ from{ opacity:0; transform:translateY(10px) } to{ opacity:1; transform:none } }

/* ── shared frame grammar ── */
.nvh-kick{ font-family:var(--font-mono); font-size:12px; letter-spacing:.2em; text-transform:uppercase; color:var(--bud-electric,#8C33EF); }
.nvh-kick--red{ color:#F0476A; }
.nvh-h2{ margin:12px 0 0; font-size:clamp(22px,2.6vw,33px); font-weight:var(--fw-bold,700); letter-spacing:-.02em; line-height:1.07; color:var(--fg1); }
.nvh-h2 .em{ color:var(--bud-electric-2,#B785F4); }
.nvh-h2 .red{ color:#F0476A; }

/* ── frames 0 + 5 · hero book-ends ── */
.nvh-fhero{ display:flex; align-items:center; justify-content:center; text-align:center;
  padding:clamp(20px,3vw,36px) clamp(20px,5vw,64px) 84px; }
.nvh-herobox{ max-width:780px; margin:0 auto; }
.nvh-blade .eyebrow-pill{ gap:9px; border-color:var(--border-strong); padding:7px 16px;
  font-size:11.5px; letter-spacing:.14em; color:var(--fg2); background:rgba(18,14,28,.5); }
.nvh-blade .eyebrow-pill .dot{ width:6px; height:6px; box-shadow:0 0 10px var(--accent); }
.nvh-h1{ font-weight:var(--fw-bold,700); font-size:clamp(32px,4.4vw,54px); line-height:1.04; letter-spacing:-.03em; margin:18px 0; color:var(--fg1); }
.nvh-h1 .accent{ color:var(--accent); }
.nvh-lede{ font-size:clamp(14px,1.4vw,16.5px); line-height:1.55; color:var(--fg2); max-width:620px; margin:0 auto 24px; font-weight:var(--fw-light,300); }
.nvh-lede em{ color:var(--fg3); }
.nvh-ctas{ display:flex; justify-content:center; gap:14px; flex-wrap:wrap; }
.nvh-blade .btn-lg{ font-size:14.5px; padding:12px 20px; }
.nvh-cue{ margin-top:22px; font-family:var(--font-mono); font-size:11px; letter-spacing:.24em; text-transform:uppercase; color:var(--fg3);
  animation:nvhCue 2.6s cubic-bezier(.4,0,.2,1) infinite; }
@keyframes nvhCue{ 0%,100%{ transform:translateY(0); opacity:.55 } 50%{ transform:translateY(5px); opacity:1 } }
.nvh-signoff{ margin-top:22px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.2em; text-transform:uppercase; color:var(--fg3); }

/* ── frame 1 · the problem — fragmentation ── */
.nvh-fprob{ display:flex; flex-direction:row-reverse; align-items:center; gap:clamp(22px,3.2vw,46px);
  padding:clamp(18px,2.6vw,30px) clamp(20px,4.6vw,60px) 84px; }
.nvh-prob-copy{ flex:1 1 auto; min-width:0; }
.nvh-prob-lede{ margin:12px 0 0; font-size:clamp(13.5px,1.3vw,16px); line-height:1.5; color:var(--fg2); max-width:560px; }
.nvh-prob-lede strong{ color:var(--fg1); font-weight:var(--fw-semibold,600); }
.nvh-taxes{ margin-top:15px; display:grid; grid-template-columns:repeat(2,minmax(150px,1fr)); gap:9px; max-width:560px; }
.nvh-tax{ border:1px solid rgba(240,71,106,.28); border-radius:10px; background:linear-gradient(rgba(240,71,106,.05),rgba(240,71,106,.05)),var(--bud-midnight-purple,#0A0712); padding:10px 13px; }
.nvh-tax .t{ font-size:13px; font-weight:var(--fw-semibold,600); color:var(--fg1); line-height:1.3; }
.nvh-tax .v{ margin-top:5px; font-family:var(--font-mono); font-size:11px; color:#F0476A; }
.nvh-prob-close{ margin:16px 0 0; font-size:clamp(15px,1.6vw,20px); line-height:1.35; font-weight:var(--fw-medium,500); color:var(--fg1); max-width:620px; }
.nvh-prob-close .grad{ color:var(--bud-electric-2,#B785F4); }

.nvh-prob-viz{ flex:0 0 clamp(238px,26vw,330px); align-self:center; display:flex; min-height:0; }
.nvh-frag{ flex:1; min-width:0; display:flex; flex-direction:column; border:1px dashed var(--border-strong);
  border-radius:12px; background:rgba(255,255,255,.012); padding:14px 16px 12px; }
.nvh-frag-head{ display:flex; align-items:baseline; justify-content:space-between; gap:12px; }
.nvh-frag-head .l{ font-family:var(--font-mono); font-size:10px; letter-spacing:.2em; text-transform:uppercase; color:var(--fg3); font-weight:var(--fw-bold,700); }
.nvh-frag-head .r{ font-family:var(--font-mono); font-size:10px; letter-spacing:.14em; color:#F0476A; font-weight:var(--fw-bold,700); }
/* fixed-height box: do not let the SVG stretch */
.nvh-frag-box{ flex:0 0 auto; height:clamp(196px,21vw,250px); margin-top:8px; display:flex; }
.nvh-frag-box svg{ width:100%; height:100%; overflow:visible; }
.nvh-frag text{ font-family:var(--font-mono); font-size:8px; font-weight:700; letter-spacing:.9px; text-transform:uppercase; fill:var(--bud-dusk,#6B6080); }
.nvh-frag-foot{ margin-top:11px; padding-top:10px; border-top:1px solid var(--border);
  display:flex; align-items:baseline; justify-content:space-between; gap:12px;
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.06em; color:var(--fg3); }
.nvh-frag-foot .r{ color:#F0476A; font-weight:var(--fw-bold,700); }
@keyframes nvhBpulse{ 0%,100%{ opacity:.3 } 50%{ opacity:1 } }
[data-nvh-scene][data-on="1"] .nvh-bounds line{ animation:nvhBpulse 2.2s cubic-bezier(.4,0,.2,1) infinite; }

/* ── frame 2 · the operating system — stack ── */
.nvh-fos{ display:flex; align-items:center; gap:clamp(26px,3.6vw,52px); padding:clamp(18px,2.6vw,30px) clamp(20px,4.6vw,60px) 84px; }
.nvh-os-stack{ flex:0 0 clamp(228px,24vw,300px); display:flex; flex-direction:column; gap:4px; }
.nvh-ly{ --c:#8C33EF; display:flex; align-items:center; gap:10px; padding:6px 11px;
  border:1px solid rgba(183,133,244,.14); border-left:2px solid var(--c); border-radius:9px; background:rgba(18,14,28,.6); }
.nvh-ly .n{ font-family:var(--font-mono); font-size:10px; color:var(--fg3); }
.nvh-ly .nm{ font-size:12px; font-weight:var(--fw-semibold,600); color:var(--fg2); }
.nvh-ly--top .nm{ color:var(--fg1); }
.nvh-os-copy{ flex:1 1 auto; min-width:0; }
.nvh-os-cap{ margin:12px 0 0; font-size:clamp(14px,1.4vw,17px); color:var(--fg2); }
.nvh-os-cap b{ color:var(--fg1); }
.nvh-points{ margin-top:18px; display:flex; flex-direction:column; gap:9px; max-width:540px; }
.nvh-point{ display:flex; align-items:flex-start; gap:12px; }
.nvh-point .sq{ width:8px; height:8px; border-radius:2px; background:var(--accent); flex:0 0 auto; margin-top:6px; }
.nvh-point span:last-child{ font-size:13.5px; line-height:1.45; color:var(--fg2); }
.nvh-point strong{ color:var(--fg1); font-weight:var(--fw-semibold,600); }

/* ── frame 3 · the economics — hybrid router ── */
.nvh-fecon{ display:flex; flex-direction:column; justify-content:center; padding:clamp(16px,2.2vw,26px) clamp(20px,4.6vw,60px) 80px; }
.nvh-econ-lede{ margin:9px 0 0; font-size:clamp(13px,1.25vw,15.5px); line-height:1.5; color:var(--fg2); max-width:680px; }
.nvh-econ-lede strong{ color:var(--fg1); font-weight:var(--fw-semibold,600); }
/* fixed-height box: do not let the router compress when the frame is squeezed */
.nvh-router{ position:relative; flex:0 0 auto; margin-top:clamp(8px,1.2vw,14px); height:clamp(166px,17vw,206px); }
.nvh-router svg{ position:absolute; inset:0; width:100%; height:100%; }
@keyframes nvhDash{ to{ stroke-dashoffset:-40 } }
[data-nvh-scene][data-on="1"] .nvh-dash{ animation:nvhDash 1.5s linear infinite; }
.nvh-rt-in{ position:absolute; left:0; top:50%; transform:translateY(-50%);
  font-family:var(--font-mono); font-size:10.5px; letter-spacing:.16em; text-transform:uppercase; color:var(--fg3); line-height:1.5; }
.nvh-rt-in b{ color:var(--fg1); font-weight:inherit; }
.nvh-rt-chip{ position:absolute; left:34%; top:50%; transform:translate(-50%,-50%);
  border:1px solid rgba(183,133,244,.4); border-radius:10px; background:rgba(18,14,28,.9); padding:8px 13px; text-align:center; white-space:nowrap; }
.nvh-rt-chip .t{ font-size:12.5px; font-weight:var(--fw-bold,700); color:var(--fg1); }
.nvh-rt-chip .s{ margin-top:3px; font-family:var(--font-mono); font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--bud-electric-2,#B785F4); }
@keyframes nvhGlow{ 0%,100%{ box-shadow:0 0 0 1px rgba(140,51,239,.35),0 0 18px rgba(140,51,239,.25) }
  50%{ box-shadow:0 0 0 1px rgba(140,51,239,.5),0 0 30px rgba(140,51,239,.45) } }
[data-nvh-scene][data-on="1"] .nvh-rt-chip{ animation:nvhRise .62s cubic-bezier(.22,1,.36,1) both,nvhGlow 2.8s cubic-bezier(.4,0,.2,1) infinite; animation-delay:var(--d,0s),var(--d,0s); }
.nvh-rt-slm{ position:absolute; left:63.5%; top:22%; transform:translateY(-50%); }
.nvh-rt-slm .big{ font-size:clamp(21px,2.4vw,31px); font-weight:var(--fw-bold,700); letter-spacing:-.02em; line-height:1; color:var(--fg1); }
.nvh-rt-slm .t{ margin-top:6px; font-size:13px; font-weight:var(--fw-semibold,600); color:var(--fg1); }
.nvh-rt-slm .s{ margin-top:3px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--bud-electric-2,#B785F4); white-space:nowrap; }
.nvh-rt-llm{ position:absolute; left:63.5%; right:0; bottom:0; }
.nvh-rt-llm .row{ display:flex; align-items:baseline; gap:9px; flex-wrap:wrap; }
.nvh-rt-llm .big{ font-size:clamp(17px,1.9vw,24px); font-weight:var(--fw-bold,700); letter-spacing:-.02em; line-height:1; color:var(--fg2); }
.nvh-rt-llm .t{ font-size:12.5px; font-weight:var(--fw-semibold,600); color:var(--fg2); }
.nvh-rt-llm .s{ margin-top:4px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--fg3); white-space:nowrap; }
.nvh-savings{ flex:0 0 auto; margin-top:clamp(12px,1.5vw,18px); display:grid; grid-template-columns:repeat(auto-fit,minmax(190px,1fr)); gap:1px;
  background:var(--border); border:1px solid var(--border); border-radius:12px; overflow:hidden; }
.nvh-save{ background:var(--surface); padding:clamp(10px,1.3vw,14px) clamp(13px,1.6vw,18px); }
.nvh-save .n{ font-size:clamp(18px,2vw,25px); font-weight:var(--fw-bold,700); letter-spacing:-.02em; line-height:1; color:var(--fg1); }
.nvh-save .d{ margin-top:6px; font-family:var(--font-mono); font-size:10.5px; letter-spacing:.13em; text-transform:uppercase; color:var(--fg3); line-height:1.5; }
.nvh-save--hi{ background:linear-gradient(rgba(140,51,239,.14),rgba(140,51,239,.14)),var(--surface); }
.nvh-save--hi .d{ color:var(--bud-electric-2,#B785F4); }

/* ── frame 4 · proof — three production tiles (film nv07) ── */
.nvh-fproof{ display:flex; flex-direction:column; justify-content:center; padding:clamp(18px,2.6vw,30px) clamp(20px,4.6vw,60px) 84px; }
.nvh-tiles{ margin-top:clamp(16px,2.2vw,26px); display:grid; grid-template-columns:repeat(auto-fit,minmax(228px,1fr)); gap:12px; }
.nvh-tile{ border:1px solid var(--border); border-radius:12px; background:var(--surface); padding:clamp(16px,2vw,22px); }
.nvh-tile .v{ font-size:clamp(26px,3vw,38px); font-weight:var(--fw-bold,700); letter-spacing:-.02em; line-height:1; color:var(--fg1); }
.nvh-tile .v .u{ font-size:.48em; font-weight:var(--fw-semibold,600); color:var(--fg2); letter-spacing:0; }
.nvh-tile .l{ margin-top:9px; font-size:13px; line-height:1.5; color:var(--fg2); }
.nvh-tile--hi{ background:linear-gradient(rgba(140,51,239,.13),rgba(140,51,239,.13)),var(--surface); border-color:var(--border-strong); }
.nvh-tile--hi .v{ color:var(--bud-electric-2,#B785F4); }
.nvh-tile--hi .v .u{ color:var(--fg1); }

/* ── blade chrome ── */
.nvh-chrome{ position:absolute; left:0; right:0; bottom:0; z-index:20; display:flex; align-items:center; gap:16px;
  padding:0 clamp(20px,4.6vw,60px) clamp(16px,2vw,22px); }
.nvh-nav{ margin:0 auto; display:flex; align-items:center; gap:10px; }
.nvh-dots{ display:flex; align-items:center; gap:7px; }
[data-nvh-dot]{ width:7px; height:7px; padding:0; border:0; border-radius:999px; background:rgba(197,191,211,.28);
  cursor:pointer; transition:background .2s,width .2s; }
[data-nvh-dot]:hover{ background:rgba(183,133,244,.6); }
[data-nvh-dot][data-on="1"]{ width:22px; background:var(--accent); }
[data-nvh-arrow]{ display:flex; align-items:center; justify-content:center; width:28px; height:28px; border-radius:8px;
  border:1px solid rgba(183,133,244,.18); background:rgba(18,14,28,.6); color:var(--fg2); cursor:pointer;
  transition:background .12s,color .12s; }
[data-nvh-arrow]:hover{ background:rgba(140,51,239,.14); color:var(--fg1); }
.nvh-count{ font-family:var(--font-mono); font-size:10.5px; letter-spacing:.16em; color:var(--fg3); min-width:52px; text-align:right; }

/* ── narrow-screen treatment (≤860px) — the overview-film pattern ── */
@media (max-width:860px){
  .nvh-blade{ height:auto; min-height:600px; }
  [data-nvh-scene]{ position:absolute; display:flex; flex-direction:column; flex-wrap:nowrap; align-items:flex-start;
    justify-content:center; gap:16px; padding:28px 20px 84px; }
  [data-nvh-scene] > *{ flex:0 0 auto; width:100%; min-width:0; max-width:100%; }
  [data-nvh-scene][data-nvh-center]{ align-items:center; text-align:center; }
  [data-nvh-narrow-hide]{ display:none; }
  [data-nvh-scene] [data-nvh-grow]{ flex:1 1 auto; width:100%; }
}
/* the router's absolute labels collide in the 860–1000px band — hide it a step earlier */
@media (max-width:1000px){
  .nvh-router{ display:none; }
}
@media (max-width:540px){
  .nvh-blade{ min-height:640px; }
  [data-nvh-scene]{ padding:24px 18px 84px; }
}

/* ── reduced motion: everything static, count-ups jump (JS), controls still work ── */
@media (prefers-reduced-motion:reduce){
  .nvh-prog{ transition:none; }
  [data-nvh-blade] [data-fx]{ opacity:1 !important; animation:none !important; }
  .nvh-cue{ animation:none !important; }
  [data-nvh-scene][data-on="1"] .nvh-bounds line,
  [data-nvh-scene][data-on="1"] .nvh-dash,
  [data-nvh-scene][data-on="1"] .nvh-rt-chip{ animation:none !important; }
}

/* ── copy scrim: an extra pool of dark under each frame's text column, so
      headings and ledes read off the motif and the neighbouring viz. ── */
.nvh-herobox, .nvh-prob-copy, .nvh-os-copy{ position:relative; isolation:isolate; }
.nvh-herobox::before, .nvh-prob-copy::before, .nvh-os-copy::before{
  content:""; position:absolute; inset:-28px -44px; z-index:-1; pointer-events:none;
  background:radial-gradient(ellipse 64% 66% at 40% 50%,
    rgba(10,7,18,.86) 0%, rgba(10,7,18,.58) 56%, rgba(10,7,18,0) 100%); }
.nvh-herobox::before{ background:radial-gradient(ellipse 62% 64% at 50% 50%,
    rgba(10,7,18,.86) 0%, rgba(10,7,18,.62) 52%, rgba(10,7,18,0) 100%); }
/* economics + proof frames set their copy straight into the scene */
.nvh-fecon, .nvh-fproof{ text-shadow:0 1px 14px rgba(10,7,18,.8); }
