/* ============================================================
   thedenver.homes — MOTION SYSTEM
   Design recipes sourced from the 21st.dev catalog
   (Text Reveal Mask, Stacking Cards, Horizontal Scroll Gallery,
    Card Spotlight, Marquee, Count Up) and ported to dependency-free
    CSS + vanilla JS so the static Firebase site stays fast.

   PERF RULES (do not break):
   - Scroll-linked work only touches `transform` / `opacity`.
   - One rAF loop drives every scroll effect (see anim.js).
   - No layout reads inside the loop — geometry is cached.
   - Everything degrades to a static page under
     `prefers-reduced-motion: reduce` or when JS is off.
   ============================================================ */

@property --ty   { syntax:'<length>'; inherits:false; initial-value:0px }
@property --spot { syntax:'<number>'; inherits:false; initial-value:0 }
@property --sheen{ syntax:'<number>'; inherits:false; initial-value:0 }

/* Reveal transforms and decorative auras intentionally overhang their boxes.
   `overflow-x: clip` contains them WITHOUT creating a scroll container, so
   `position: sticky` on the pinned sections keeps working (`hidden` would break it). */
html,body{overflow-x:clip}

:root{
  --ez:cubic-bezier(.19,1,.22,1);      /* expo-out — the house easing */
  --ez-soft:cubic-bezier(.22,1,.36,1);
  --ez-spring:cubic-bezier(.34,1.56,.64,1);
  --nav-h:62px;
}

/* No-JS / reduced-motion safety net: everything visible, nothing moves. */
html.no-anim [data-anim],
html.no-anim .rv .wi,
html.no-anim .fade-in{opacity:1!important;transform:none!important;filter:none!important}
@media (prefers-reduced-motion:reduce){
  *,*::before,*::after{animation-duration:.001ms!important;animation-iteration-count:1!important;transition-duration:.001ms!important;scroll-behavior:auto!important}
  [data-anim],.rv .wi,.fade-in{opacity:1!important;transform:none!important;filter:none!important}
}

/* ============ 1. SCROLL PROGRESS RAIL ============ */
.sprog{position:fixed;top:0;left:0;right:0;height:2px;z-index:400;pointer-events:none;
  background:linear-gradient(90deg,var(--gold),#e0c68a 55%,var(--forest-lt));
  transform:scaleX(0);transform-origin:0 50%;will-change:transform;
  box-shadow:0 0 12px rgba(184,150,90,.55)}

/* ============ 2. NAV ============ */
nav{transition:height .35s var(--ez-soft),box-shadow .35s ease,background .35s ease}
nav.scrolled{height:54px;box-shadow:0 6px 28px rgba(20,40,25,.10);background:rgba(250,248,243,.97)}
nav.scrolled .nav-logo{transform:scale(.88)}
.nav-logo{transition:transform .35s var(--ez-spring)}
.nav-brand:hover .nav-logo{transform:rotate(-8deg) scale(1.08)}
.nav-links a{position:relative}
.nav-links a::after{content:'';position:absolute;left:0;right:0;bottom:-5px;height:1.5px;background:var(--gold);
  transform:scaleX(0);transform-origin:100% 50%;transition:transform .4s var(--ez)}
.nav-links a:hover::after{transform:scaleX(1);transform-origin:0 50%}
.hamburger span{transition:transform .32s var(--ez),opacity .2s ease}
.hamburger.x span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger.x span:nth-child(2){opacity:0;transform:scaleX(.2)}
.hamburger.x span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
.mobile-menu{transform-origin:50% 0}
.mobile-menu.open{animation:menuIn .38s var(--ez)}
@keyframes menuIn{from{opacity:0;transform:translateY(-10px) scaleY(.96)}to{opacity:1;transform:none}}
.mobile-menu.open > *{animation:mmItem .45s var(--ez) backwards}
.mobile-menu.open > *:nth-child(1){animation-delay:.04s}
.mobile-menu.open > *:nth-child(2){animation-delay:.08s}
.mobile-menu.open > *:nth-child(3){animation-delay:.12s}
.mobile-menu.open > *:nth-child(4){animation-delay:.16s}
.mobile-menu.open > *:nth-child(5){animation-delay:.20s}
.mobile-menu.open > *:nth-child(6){animation-delay:.24s}
.mobile-menu.open > *:nth-child(7){animation-delay:.28s}
@keyframes mmItem{from{opacity:0;transform:translateX(-14px)}to{opacity:1;transform:none}}

/* ============ 3. GENERIC SCROLL REVEALS ============ */
[data-anim]{opacity:0;will-change:transform,opacity}
[data-anim="up"]     {transform:translate3d(0,34px,0)}
[data-anim="down"]   {transform:translate3d(0,-28px,0)}
[data-anim="left"]   {transform:translate3d(-44px,0,0)}
[data-anim="right"]  {transform:translate3d(44px,0,0)}
[data-anim="scale"]  {transform:scale(.9)}
[data-anim="blur"]   {filter:blur(14px);transform:translate3d(0,18px,0)}
[data-anim="flip"]   {transform:perspective(1200px) rotateX(-22deg) translate3d(0,46px,0);transform-origin:50% 100%}
[data-anim="rise"]   {transform:perspective(1200px) translate3d(0,60px,-90px) rotateX(-9deg)}
[data-anim].in{opacity:1;transform:none;
  transition:opacity .85s var(--ez) var(--d,0s),transform .95s var(--ez) var(--d,0s)}
/* Only the blur variant animates filter. Animating blur is a full repaint per
   frame, so it stays scoped to the one variant that asks for it rather than
   riding along on every reveal on the page. */
[data-anim="blur"].in{filter:none;
  transition:opacity .85s var(--ez) var(--d,0s),transform .95s var(--ez) var(--d,0s),filter .85s var(--ez) var(--d,0s)}
[data-anim].done{will-change:auto}

/* ============ 4. MASKED WORD-BY-WORD TITLE REVEAL ============ */
/* Recipe: 21st.dev "Text Reveal (Mask)" — words clipped, slid up, expo-out, 60ms stagger. */
.rv{--wdur:.9s}
.rv .wr{display:inline-block;overflow:hidden;vertical-align:bottom;padding-bottom:.14em;margin-bottom:-.14em}
.rv .wi{display:inline-block;transform:translate3d(0,115%,0);opacity:.001;
  transition:transform var(--wdur) var(--ez) var(--d,0s),opacity calc(var(--wdur) * .6) ease var(--d,0s)}
.rv.in .wi{transform:none;opacity:1}
.rv.done .wr{overflow:visible}

/* ============ 5. HERO ============ */
.hero{position:relative;isolation:isolate;overflow:clip}
.hero-eyebrow,.hero-sub,.hero-btns,.hero-trust{animation:fadeUp .9s var(--ez) backwards}
.hero-sub{animation-delay:.5s}.hero-btns{animation-delay:.64s}.hero-trust{animation-delay:.78s}
@keyframes fadeUp{from{opacity:0;transform:translateY(18px)}to{opacity:1;transform:none}}
/* soft aurora wash behind the hero — GPU-only, no repaint of content */
.hero::before{content:'';position:absolute;z-index:-1;top:-14%;left:-8%;width:56%;height:120%;
  background:radial-gradient(closest-side,rgba(184,150,90,.20),transparent 72%);
  animation:aurora 22s ease-in-out infinite alternate;pointer-events:none}
.hero::after{content:'';position:absolute;z-index:-1;bottom:-22%;right:-10%;width:52%;height:110%;
  background:radial-gradient(closest-side,rgba(45,102,69,.16),transparent 72%);
  animation:aurora 27s ease-in-out infinite alternate-reverse;pointer-events:none}
@keyframes aurora{from{transform:translate3d(0,0,0) scale(1)}to{transform:translate3d(5%,7%,0) scale(1.18)}}
.av{transition:transform .4s var(--ez-spring)}
.av-stack:hover .av{transform:translateY(-4px)}
.av-stack:hover .av:nth-child(2){transition-delay:.04s}
.av-stack:hover .av:nth-child(3){transition-delay:.08s}
.av-stack:hover .av:nth-child(4){transition-delay:.12s}
.hero-eyebrow{position:relative;overflow:hidden}
.hero-eyebrow::after{content:'';position:absolute;inset:0;transform:translateX(-120%) skewX(-18deg);
  background:linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent);animation:sweep 5.5s ease-in-out 2s infinite}
@keyframes sweep{0%{transform:translateX(-140%) skewX(-18deg)}22%,100%{transform:translateX(160%) skewX(-18deg)}}

/* ============ 6. CINEMATIC INTRO (transform-driven, was width/height) ============ */
.sem-media{will-change:transform;transform-origin:50% 50%;backface-visibility:hidden}
/* The intro clip walks from a dusk exterior into a brightly lit interior, so a
   single flat scrim can't hold the type. Grade the footage down a touch, then
   sit a vertical scrim plus a centre-weighted radial behind the wordmark. */
/* grade is baked into the encode — a CSS filter here costs a GPU pass per frame */
.sem-media::after{content:'';position:absolute;inset:0;pointer-events:none;
  background:
    radial-gradient(ellipse 58% 38% at 50% 50%,rgba(6,12,8,.44),transparent 74%),
    linear-gradient(180deg,rgba(8,16,10,.44),rgba(8,16,10,.14) 45%,rgba(8,16,10,.56))}
.sem-t{text-shadow:0 2px 26px rgba(0,0,0,.72),0 1px 4px rgba(0,0,0,.5)}
.sem-meta{text-shadow:0 1px 14px rgba(0,0,0,.7)}
.sem-media img,.sem-media video{will-change:transform;transform-origin:50% 50%}
.sem-sticky::after{content:'';position:absolute;inset:0;pointer-events:none;
  background:radial-gradient(ellipse at 50% 120%,rgba(184,150,90,.18),transparent 60%)}
.sem-t{will-change:transform,opacity}

/* ============ 7. STATS BAR — count-up + shimmer ============ */
.stats-bar{position:relative;overflow:hidden}
.stats-bar::after{content:'';position:absolute;top:0;bottom:0;left:0;width:35%;
  background:linear-gradient(90deg,transparent,rgba(201,169,97,.16),transparent);
  transform:translateX(-120%);pointer-events:none}
.stats-bar.in::after{animation:statSweep 2.6s var(--ez) .3s}
@keyframes statSweep{to{transform:translateX(340%)}}
.stats-inner > div{position:relative}
.stats-inner > div::before{content:'';position:absolute;left:0;top:14%;bottom:14%;width:1px;background:rgba(255,255,255,.12);
  transform:scaleY(0);transition:transform .7s var(--ez) var(--d,0s)}
.stats-inner > div:first-child::before{display:none}
.stats-bar.in .stats-inner > div::before{transform:scaleY(1)}
/* The moving parts are the .wi spans inside, not this element — the promotion
   here bought nothing and outlived the one-shot reveal anyway. */
.stat-num{display:inline-block}

/* ============ 8. CARD SPOTLIGHT + TILT ============ */
/* Recipe: 21st.dev "Card Spotlight" — cursor-anchored radial wash painted as a
   background-image so it never fights the card's own stacking order. */
.spot{
  --mx:50%;--my:50%;
  background-image:radial-gradient(340px circle at var(--mx) var(--my),
    rgba(184,150,90,calc(var(--spot) * .17)), transparent 62%);
  transition:--spot .4s ease, box-shadow .4s var(--ez-soft), border-color .4s ease, transform .5s var(--ez-soft);
}
.spot:hover{--spot:1}
/* (.has-tilt rules removed with the per-card 3D tilt — no element carried the
   class, so they were only holding a dead preserve-3d + will-change pair.) */
.intent-card,.nbhd-card,.listing-card,.tcard,.rc{backface-visibility:hidden}
.intent-card:hover,.nbhd-card:hover,.listing-card:hover{box-shadow:0 22px 50px rgba(20,40,25,.16);border-color:var(--gold-lt)}
.tcard:hover{box-shadow:0 18px 42px rgba(20,40,25,.12)}
/* icon + inner life on hover */
.ic-icon,.nbhd-emoji,.rc-icon{display:inline-flex;transition:transform .5s var(--ez-spring)}
.intent-card:hover .ic-icon{transform:scale(1.16) rotate(-7deg)}
.nbhd-card:hover .nbhd-emoji{transform:scale(1.22) translateY(-3px)}
.rc:hover .rc-icon{transform:rotate(7deg) scale(1.1)}
.ic-cta{display:inline-block;transition:transform .4s var(--ez)}
.intent-card:hover .ic-cta{transform:translateX(7px)}
.lc-thumb{transition:filter .45s ease,transform .7s var(--ez-soft)}
.listing-card{overflow:hidden}
/* promoted only while the card is hovered — a listings grid is 6-12 thumbs and
   a permanent layer on each is real GPU memory for an effect that is idle */
.listing-card:hover .lc-thumb{filter:saturate(1.25) brightness(1.03);transform:scale(1.07);will-change:transform}
.lc-badge{transition:transform .4s var(--ez-spring)}
.listing-card:hover .lc-badge{transform:translateY(-2px) scale(1.06)}
.nbhd-tag{transition:background .35s ease,border-color .35s ease,transform .4s var(--ez-spring)}
.nbhd-card:hover .nbhd-tag{background:var(--gold);color:#fff;border-color:var(--gold);transform:translateY(-2px)}
.rc{transition:transform .45s var(--ez-soft),box-shadow .45s ease,border-color .35s ease}
.rc:hover{transform:translateX(6px);box-shadow:var(--shadow)}

/* ============ 9. BUTTONS — magnetic + sheen ============ */
.btn-green,.btn-outline,.btn-white,.btn-outline-white,.view-all-btn,.nav-btn,.btn-submit,.mm-cta{
  position:relative;overflow:hidden;
  transition:transform .35s var(--ez-spring),box-shadow .35s ease,background .3s ease,border-color .3s ease}
.btn-green::after,.btn-white::after,.view-all-btn::after,.nav-btn::after,.btn-submit::after{
  content:'';position:absolute;top:0;left:0;width:45%;height:100%;pointer-events:none;
  background:linear-gradient(100deg,transparent,rgba(255,255,255,.34),transparent);
  transform:translateX(-160%) skewX(-20deg);transition:transform .75s var(--ez)}
.btn-green:hover::after,.btn-white:hover::after,.view-all-btn:hover::after,.nav-btn:hover::after,.btn-submit:hover::after{transform:translateX(320%) skewX(-20deg)}
.btn-green:hover,.nav-btn:hover,.btn-submit:hover{box-shadow:0 14px 32px rgba(26,61,40,.32)}
.btn-white:hover{box-shadow:0 14px 32px rgba(0,0,0,.22)}
.btn-outline:hover,.btn-outline-white:hover,.view-all-btn:hover{box-shadow:0 10px 24px rgba(26,61,40,.14)}
.btn-green:active,.btn-outline:active,.btn-white:active,.btn-outline-white:active,.view-all-btn:active,.nav-btn:active,.btn-submit:active{transform:scale(.96)!important}
/* Magnetic buttons write transform on every pointermove. The base rule above
   puts a .35s spring on transform, so each move was restarting a transition and
   the button chased the cursor a third of a second behind. While the pointer is
   inside we drop transform from the transition list so it tracks 1:1; on leave
   the class goes and the base spring eases it home. will-change is promoted for
   the same window only — a permanent layer on every button on the page is
   compositor memory we never get back. */
.magnet.mag-live{will-change:transform;
  transition:box-shadow .35s ease,background .3s ease,border-color .3s ease}

/* ============ 10. NEIGHBOURHOOD HORIZONTAL PIN ============ */
/* Recipe: 21st.dev "Horizontal Scroll Gallery" — vertical scroll drives an x-translate
   inside a sticky viewport. Desktop only; below 960px it stays an ordinary grid. */
.hpin{position:relative}
.hpin-sticky{position:relative}
.hpin-track{will-change:transform}
.hpin-rail{display:none}
@media (min-width:960px){
  html.anim-on .hpin{height:var(--pin-h,240vh)}
  html.anim-on .hpin-sticky{position:sticky;top:var(--nav-h);height:calc(100vh - var(--nav-h));height:calc(100svh - var(--nav-h));
    display:flex;flex-direction:column;align-items:stretch;justify-content:center;gap:2.2rem;overflow:hidden}
  html.anim-on .hpin-head{flex:none;text-align:center;padding:0 1.5rem}
  html.anim-on .hpin-head .sec-sub{margin-bottom:0}
  html.anim-on .hpin-track{flex:none;width:max-content;padding:0 max(1.5rem,calc(50vw - 560px));transform:translate3d(0,0,0)}
  html.anim-on .hpin-track .nbhd-grid{display:flex;width:max-content;gap:20px;align-items:stretch}
  html.anim-on .hpin-track .nbhd-card{flex:0 0 306px;min-height:min(330px,40svh);padding:1.8rem 1.5rem;
    display:flex;flex-direction:column;align-items:flex-start}
  html.anim-on .hpin-track .nbhd-desc{flex:1 1 auto}
  html.anim-on .hpin-track .nbhd-name{font-size:1.35rem;margin-bottom:5px}
  html.anim-on .hpin-track .nbhd-price{font-size:13px;margin-bottom:9px}
  html.anim-on .hpin-track .nbhd-desc{font-size:13px}
  html.anim-on .hpin-track .nbhd-emoji{font-size:32px;margin-bottom:14px}
  html.anim-on .hpin-rail{display:block;position:absolute;left:0;right:0;margin:0 auto;bottom:5vh;
    width:min(420px,60vw);height:2px;background:rgba(15,26,20,.12);border-radius:99px;overflow:hidden}
  html.anim-on .hpin-rail i{display:block;height:100%;width:100%;background:var(--gold);border-radius:99px;
    transform:scaleX(.1);transform-origin:0 50%;will-change:transform}
  html.anim-on #neighborhoods{padding-top:0;padding-bottom:0}
}

/* ============ 11. COVERAGE MARQUEE ============ */
/* Recipe: 21st.dev "Marquee" — duplicated track, mask-faded edges, scroll-direction aware. */
.mq-band{background:var(--forest);padding:.95rem 0;overflow:hidden;position:relative;border-top:1px solid rgba(255,255,255,.07)}
.mq{display:flex;width:100%;overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 9%,#000 91%,transparent)}
.mq-row{display:flex;flex:none;min-width:100%;align-items:center;gap:2.4rem;padding-right:2.4rem;
  animation:mqScroll var(--mq-dur,52s) linear infinite;animation-direction:var(--mq-dir,normal);will-change:transform}
.mq:hover .mq-row{animation-play-state:paused}
@keyframes mqScroll{to{transform:translate3d(-100%,0,0)}}
.mq-item{display:inline-flex;align-items:center;gap:.55rem;white-space:nowrap;flex:none;
  font:500 .78rem 'DM Sans',system-ui,sans-serif;letter-spacing:.12em;text-transform:uppercase;color:rgba(255,255,255,.62)}
.mq-item b{color:var(--gold);font-weight:600}
.mq-item::before{content:'';width:4px;height:4px;border-radius:50%;background:var(--gold);opacity:.7}

/* ============ 12. 3D CALCULATOR CARD ============ */
.cs-card{will-change:transform;transform-origin:50% 50%}
.cs-head{will-change:transform,opacity}
.cs-inner input[type=range]{appearance:none;-webkit-appearance:none;height:5px;border-radius:99px;background:#dfdbc9;outline:none;transition:background .3s}
.cs-inner input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:19px;height:19px;border-radius:50%;background:var(--forest);
  border:3px solid #fff;box-shadow:0 2px 9px rgba(26,61,40,.4);cursor:grab;transition:transform .22s var(--ez-spring)}
.cs-inner input[type=range]::-webkit-slider-thumb:hover{transform:scale(1.22)}
.cs-inner input[type=range]:active::-webkit-slider-thumb{transform:scale(1.34);cursor:grabbing}
.cs-inner input[type=range]::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:var(--forest);border:3px solid #fff;cursor:grab}
#qc-out{display:inline-block;font-variant-numeric:tabular-nums;transition:transform .22s var(--ez-spring),color .3s ease}
#qc-out.pop{transform:scale(1.1);color:#2d6645}
#qc-po,#qc-do{font-variant-numeric:tabular-nums}

/* ============ 13. VALUES / TESTIMONIAL CARDS ============ */
.tcard{position:relative;overflow:hidden;transition:transform .5s var(--ez-soft),box-shadow .45s ease}
.tcard::after{content:'';position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(180deg,var(--gold),transparent);
  transform:scaleY(0);transform-origin:50% 0;transition:transform .6s var(--ez)}
.tcard:hover::after{transform:scaleY(1)}
.tcard-av{transition:transform .45s var(--ez-spring)}
.tcard:hover .tcard-av{transform:scale(1.12) rotate(-6deg)}

/* ============ 14. HOME-VALUE PANEL ============ */
.value-box{position:relative;overflow:hidden;transition:box-shadow .5s var(--ez-soft),transform .5s var(--ez-soft)}
.value-box:hover{box-shadow:0 26px 60px rgba(20,40,25,.15)}
.value-box::before{content:'';position:absolute;inset:-2px;border-radius:inherit;pointer-events:none;
  background:conic-gradient(from var(--ang,0deg),transparent 0 62%,rgba(184,150,90,.55) 74%,transparent 86% 100%);
  opacity:0;transition:opacity .5s ease;-webkit-mask:linear-gradient(#000,#000) content-box,linear-gradient(#000,#000);
  -webkit-mask-composite:xor;mask-composite:exclude;padding:1.5px}
.value-box:hover::before{opacity:1;animation:angspin 4.5s linear infinite}
@keyframes angspin{to{--ang:360deg}}
@property --ang{syntax:'<angle>';inherits:false;initial-value:0deg}
.addr-input{transition:border-color .3s ease,background .3s ease,box-shadow .3s ease}
.addr-input:focus{box-shadow:0 0 0 4px rgba(184,150,90,.14)}
.vp-dot{animation:vpPulse 2.4s ease-in-out infinite}
.vp:nth-child(2) .vp-dot{animation-delay:.35s}
.vp:nth-child(3) .vp-dot{animation-delay:.7s}
@keyframes vpPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.55);opacity:.45}}

/* ============ 15. FAQ — measured height animation (anim.js sets max-height) ============ */
.faq-item{transition:background .35s ease}
.faq-item.open{background:linear-gradient(90deg,rgba(184,150,90,.07),transparent 70%)}
.faq-a{overflow:hidden;opacity:0;padding-bottom:0;
  transition:max-height .45s var(--ez),opacity .3s ease,padding-bottom .45s var(--ez)}
.faq-item.open .faq-a{opacity:1;padding-bottom:1.15rem}
.faq-toggle{transition:transform .45s var(--ez-spring),background .3s ease,color .3s ease,border-color .3s ease}
.faq-item.open .faq-toggle{transform:rotate(135deg);background:var(--gold);color:#fff;border-color:var(--gold)}
.faq-q{transition:color .25s ease,padding-left .35s var(--ez)}
.faq-q:hover{padding-left:6px}

/* ============ 16. FOOTER CTA ============ */
.footer-cta{position:relative;overflow:hidden;isolation:isolate}
.footer-cta::before{content:'';position:absolute;z-index:-1;inset:-40% -10%;
  background:radial-gradient(closest-side,rgba(201,169,97,.30),transparent 70%);
  animation:aurora 19s ease-in-out infinite alternate;pointer-events:none}
.fcta-contact a{position:relative}
.fcta-contact a::after{content:'';position:absolute;left:0;right:0;bottom:-2px;height:1px;background:currentColor;
  transform:scaleX(0);transform-origin:100% 50%;transition:transform .4s var(--ez)}
.fcta-contact a:hover::after{transform:scaleX(1);transform-origin:0 50%}

/* ============ 17. MODAL ============ */
.overlay{transition:opacity .3s ease;opacity:0}
.overlay.open{opacity:1}
.overlay.open .modal{animation:modalIn .5s var(--ez-spring)}
@keyframes modalIn{from{opacity:0;transform:translateY(26px) scale(.94)}to{opacity:1;transform:none}}
.mstage.on{animation:stageIn .42s var(--ez)}
@keyframes stageIn{from{opacity:0;transform:translateX(22px)}to{opacity:1;transform:none}}
.opt{transition:border-color .25s ease,background .25s ease,transform .28s var(--ez-spring),box-shadow .28s ease}
.opt:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(20,40,25,.10)}
.opt.picked{transform:translateY(-2px)}
.opt-icon{display:inline-block;transition:transform .35s var(--ez-spring)}
.opt:hover .opt-icon{transform:scale(1.2) rotate(-8deg)}
.m-prog-fill{transition:width .55s var(--ez)}
.get-row{animation:fadeUp .5s var(--ez) backwards}
.get-row:nth-child(2){animation-delay:.08s}
.get-row:nth-child(3){animation-delay:.16s}
.nstep{animation:fadeUp .55s var(--ez) backwards}
.nstep:nth-child(2){animation-delay:.1s}
.nstep:nth-child(3){animation-delay:.2s}
.ty-ring{animation:ringPop .7s var(--ez-spring)}
@keyframes ringPop{0%{transform:scale(.4);opacity:0}60%{transform:scale(1.12)}100%{transform:none;opacity:1}}
.ty-ring svg path{stroke-dasharray:40;stroke-dashoffset:40;animation:draw .6s var(--ez) .25s forwards}
@keyframes draw{to{stroke-dashoffset:0}}
.field input{transition:border-color .25s ease,box-shadow .25s ease,background .25s ease}
.modal-close{transition:background .25s ease,transform .3s var(--ez-spring)}
.modal-close:hover{transform:rotate(90deg)}

/* ============ 18. STICKY MOBILE BAR + FLOAT CALL ============ */
@media (max-width:720px){
  #stickybar{animation:barUp .6s var(--ez) .5s backwards}
  @keyframes barUp{from{transform:translateY(110%)}to{transform:none}}
  #stickybar .sb-hot{position:relative;overflow:hidden}
  #stickybar .sb-hot::after{content:'';position:absolute;inset:0;
    background:linear-gradient(100deg,transparent,rgba(255,255,255,.5),transparent);
    transform:translateX(-150%) skewX(-20deg);animation:sweep 6s ease-in-out 3s infinite}
  #stickybar a:active,#stickybar button:active{transform:scale(.95)}
  #stickybar a,#stickybar button{transition:transform .2s var(--ez-spring)}
  .float-call{display:none!important}
}

/* ============ 19. AREAS-SERVED LINK CLOUD ============ */
#areas-served a{display:inline-block;transition:transform .3s var(--ez-spring),color .25s ease}
#areas-served a:hover{transform:translateY(-2px)}

/* ============ 20. LEGACY .fade-in (kept so nothing regresses) ============ */
.fade-in{opacity:0;transform:translateY(26px);
  transition:opacity .8s var(--ez),transform .8s var(--ez)}
.fade-in.visible{opacity:1;transform:none}

/* ============================================================
   21. THE BUILD — scroll-scrubbed WebGL section
   NOTE: sticky heights use svh, never dvh. On iOS the URL bar
   collapses during scroll, so 100dvh changes continuously — that
   resizes the pinned box and the WebGL buffer on every frame and
   makes the whole section judder. svh is the *small* viewport
   height and never moves. Any sliver left below the canvas shows
   the section's own background, which matches the scene.
   The canvas is pinned; copy panels cross-fade over it. Until
   scene.js reports in (html.build-live) the fallback grid is what
   renders, so no-WebGL / reduced-motion visitors still get the
   content with zero layout shift.
   ============================================================ */
.build{position:relative;background:#0c1410}
.build-sticky{display:none}
.build-fallback{display:block;padding:clamp(3rem,6vw,5rem) clamp(1.5rem,5vw,4rem)}
.build-fallback .sec-title,.build-fallback .sec-eye{color:#f2ead6}
.build-fallback .sec-eye{color:var(--gold)}
.bf-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:20px;max-width:1100px;margin:2rem auto 0}
.bf-grid > div{border-top:1px solid rgba(201,169,97,.35);padding-top:1rem}
.bf-grid h3{font-family:'Cormorant Garamond',Georgia,serif;font-weight:500;font-size:1.5rem;color:#f2ead6;margin:.3rem 0 .4rem}
.bf-grid p{font-size:13.5px;line-height:1.65;color:rgba(242,234,214,.62);font-weight:300}
.bnum{font:600 11px 'DM Sans',system-ui,sans-serif;letter-spacing:.26em;color:var(--gold)}

html.build-live .build{height:var(--build-h,460vh)}
html.build-live .build-sticky{display:block;position:sticky;top:var(--nav-h);
  height:calc(100vh - var(--nav-h));height:calc(100svh - var(--nav-h));overflow:hidden}
html.build-live .build-fallback{display:none}

#buildCanvas{position:absolute;inset:0;width:100%;height:100%;display:block}
/* film grain + vignette so the render never reads as a flat toy scene */
.build-grain{position:absolute;inset:0;pointer-events:none;opacity:.55;
  background:
    linear-gradient(90deg,rgba(6,12,9,.88) 0%,rgba(6,12,9,.55) 26%,transparent 52%),
    linear-gradient(0deg,rgba(6,12,9,.80) 0%,transparent 34%),
    radial-gradient(ellipse at 56% 46%,transparent 40%,rgba(0,0,0,.55) 100%),
    radial-gradient(ellipse at 50% 50%,transparent 60%,rgba(0,0,0,.10) 100%)}
@media (max-width:820px){
  .build-grain{background:
    linear-gradient(0deg,rgba(6,12,9,.92) 0%,rgba(6,12,9,.5) 30%,transparent 55%),
    radial-gradient(ellipse at 50% 38%,transparent 42%,rgba(0,0,0,.55) 100%),
    radial-gradient(ellipse at 50% 50%,transparent 60%,rgba(0,0,0,.10) 100%)}
}

.build-head{position:absolute;top:clamp(1.6rem,5vh,3.4rem);left:0;right:0;text-align:center;padding:0 1.5rem;pointer-events:none;z-index:2}
.build-kicker{font:500 10px 'DM Sans',system-ui,sans-serif;letter-spacing:.32em;text-transform:uppercase;color:var(--gold);margin-bottom:.5rem}
.build-title{font-family:'Cormorant Garamond',Georgia,serif;font-weight:500;line-height:.98;
  font-size:clamp(2.2rem,6.4vw,4.6rem);color:#f4eeE0;letter-spacing:-.015em;margin:0}
.build-title em{font-style:italic;color:var(--gold)}

.build-steps{position:absolute;left:clamp(1.5rem,5vw,4.5rem);bottom:clamp(5.5rem,14vh,8rem);
  width:min(400px,42vw);z-index:2;pointer-events:none}
.bstep{position:absolute;left:0;right:0;bottom:0;opacity:0;transform:translate3d(0,26px,0);
  transition:opacity .5s var(--ez),transform .6s var(--ez)}
.bstep.is-on{opacity:1;transform:none}
.bstep h3{font-family:'Cormorant Garamond',Georgia,serif;font-weight:500;font-size:clamp(1.9rem,3.6vw,2.9rem);
  color:#f4eee0;line-height:1;margin:.45rem 0 .6rem}
.bstep p{font-size:14px;line-height:1.72;font-weight:300;color:rgba(240,233,214,.66)}

.build-rail{position:absolute;left:clamp(1.5rem,5vw,4.5rem);bottom:clamp(3.2rem,9vh,5rem);
  width:min(400px,42vw);height:2px;background:rgba(242,234,214,.14);border-radius:99px;overflow:hidden;z-index:2}
.build-rail i{display:block;height:100%;width:100%;background:linear-gradient(90deg,var(--gold),#e6d3a5);
  transform:scaleX(0);transform-origin:0 50%;will-change:transform}
.build-cta{position:absolute;right:clamp(1.5rem,5vw,4.5rem);bottom:clamp(3rem,9vh,5rem);z-index:3;
  opacity:0;transform:translate3d(0,14px,0);transition:opacity .5s var(--ez),transform .5s var(--ez);pointer-events:none}
.build-cta.on{opacity:1;transform:none;pointer-events:auto}

@media (max-width:820px){
  html.build-live .build{height:var(--build-h,260vh)}
  .build-steps{left:1.25rem;right:1.25rem;width:auto;bottom:6.5rem}
  .build-rail{left:1.25rem;right:1.25rem;width:auto;bottom:4.6rem}
  .bstep p{font-size:13px;line-height:1.6}
  .build-cta{left:1.25rem;right:auto;bottom:1.5rem}
  .build-head{top:1.2rem}
}

/* ============================================================
   22. STATEMENT BAND — full-bleed photo, oversized editorial type
   The competitive reference sets huge display copy directly on the
   image rather than in a card. Type scale IS the design here, so the
   photo is treated as a dark plate and the words carry the section.
   ============================================================ */
.stmt{position:relative;min-height:min(94svh,780px);display:flex;align-items:center;
  padding:clamp(4rem,11vh,8rem) clamp(1.5rem,6vw,6rem);overflow:clip;isolation:isolate;background:#0a120d}
.stmt-media{position:absolute;inset:-8% 0;z-index:-2;will-change:transform}
.stmt-media img{width:100%;height:100%;object-fit:cover;object-position:50% 42%;filter:saturate(.72) contrast(1.06)}
.stmt::after{content:'';position:absolute;inset:0;z-index:-1;pointer-events:none;
  background:linear-gradient(100deg,rgba(8,16,11,.96) 0%,rgba(8,16,11,.9) 42%,rgba(8,16,11,.5) 80%,rgba(8,16,11,.7) 100%)}
.stmt-inner{max-width:min(1080px,100%);margin:0 auto;width:100%}
.stmt-kicker{font:500 10px 'DM Sans',system-ui,sans-serif;letter-spacing:.34em;text-transform:uppercase;
  color:var(--gold);margin-bottom:clamp(1rem,3vh,2rem)}
.stmt-line{font-family:'Cormorant Garamond',Georgia,serif;font-weight:600;text-transform:uppercase;
  font-size:clamp(1.9rem,5.6vw,4.5rem);line-height:.96;letter-spacing:-.012em;color:#f4eee0;
  margin:0 0 .06em;max-width:16ch}
.stmt-punch{color:var(--gold);margin-bottom:clamp(1.4rem,4vh,2.4rem)}
.stmt-punch em{font-style:italic}
.stmt-body{font-size:clamp(.92rem,1.35vw,1.02rem);line-height:1.72;font-weight:300;
  color:rgba(240,233,214,.7);max-width:46ch;margin-bottom:clamp(1.2rem,3vh,1.8rem)}
.stmt-cta{font-size:15px;padding:15px 30px}

/* ============================================================
   23. GHOST WATERMARK TYPE behind section headers
   ============================================================ */
[data-ghost]{position:relative}
[data-ghost]::before{content:attr(data-ghost);position:absolute;left:50%;top:-.16em;
  transform:translateX(-50%);z-index:0;pointer-events:none;white-space:nowrap;
  font-family:'Cormorant Garamond',Georgia,serif;font-weight:600;text-transform:uppercase;
  font-size:clamp(4rem,15vw,13rem);line-height:1;letter-spacing:.01em;
  color:transparent;-webkit-text-stroke:1px rgba(15,26,20,.075)}
[data-ghost] > *{position:relative;z-index:1}
.footer-cta[data-ghost]::before,.build[data-ghost]::before{-webkit-text-stroke-color:rgba(242,234,214,.07)}
@media (max-width:700px){[data-ghost]::before{display:none}}

/* ============================================================
   24. SCROLL-SCRUBBED INTRO
   .sem-wrap is the scroll track; .sem-sticky pins inside it while
   scroll position drives video.currentTime. Shorter track on phones
   so the walkthrough doesn't turn into a marathon.
   ============================================================ */
@media (max-width:820px){ .sem-wrap{height:270vh} }
@media (prefers-reduced-motion:reduce){ .sem-wrap{height:auto!important} }
.sem-hint{transition:opacity .4s ease}

/* ============================================================
   25. DIMENSION FIXES (audited across 320 -> 2560)
   ============================================================ */

/* The nav is a flex row with justify-content:space-between, but the brand
   block had no min-width:0, so at narrow widths it refused to shrink and
   pushed .nav-right past the viewport edge (measured 333px of content in a
   320px viewport). Letting the brand compress and truncate fixes it at every
   width instead of chasing breakpoints. */
nav{gap:10px}
.nav-brand{min-width:0;flex:1 1 auto;overflow:hidden}
.nav-name{min-width:0}
.nav-name strong,.nav-name span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-right{flex:0 0 auto;min-width:0}

/* .nav-links were only hidden below 740px, so iPad portrait (768) rendered
   the full link row + phone + CTA and overflowed to 803px. */
@media (max-width:900px){
  .nav-links{display:none!important}
  .nav-phone{display:none!important}
  .hamburger{display:flex!important}
}

/* 44px tap targets without changing the visual size of the icon */
.hamburger{width:44px;height:44px;justify-content:center;align-items:center;margin-right:-8px}
.nav-btn{min-height:36px;display:inline-flex;align-items:center;justify-content:center}
@media (max-width:360px){
  .nav-btn{padding:7px 10px;font-size:10.5px}
  .nav-name strong{font-size:11.5px}
  .nav-name span{font-size:8.5px}
}

/* The fixed mobile action bar is 68px tall and was covering the bottom of the
   pinned 3D section — the "Start at step one" CTA sat 19px underneath it. */
@media (max-width:720px){
  .build-cta{bottom:5rem}
  .build-rail{bottom:8.2rem}
  .build-steps{bottom:9.4rem}
  .sem-hint{bottom:5.2rem}
}

/* Standalone controls below the WCAG 2.2 target-size floor. Inline links inside
   running sentences are exempt and deliberately left alone. */
.fbtn{min-height:36px;display:inline-flex;align-items:center;justify-content:center}
.nav-back,.back{display:inline-flex;align-items:center;min-height:36px}
.nav-brand{min-height:40px;align-items:center}
nav a[href]{min-height:36px;display:inline-flex;align-items:center}
nav .nav-links a{min-height:32px}

/* ============ 20. OFF-SCREEN ANIMATION PARKING ============
   The ambient loops here (hero aurora x2, footer aurora, coverage marquee,
   eyebrow sweeps) are all `infinite`, so before this they animated for the
   whole session — the hero's two aurora layers were still being recomposited
   every frame while the visitor read the footer. Each one is a promoted layer
   holding a large gradient texture, and the marquee additionally pinned
   `will-change:transform` permanently. On integrated GPUs that steady
   compositor load is what turns scrolling gritty.

   anim.js adds .anim-idle to a host section once it leaves the viewport.
   Pausing is free to reverse and visually invisible: an alternating 22s
   aurora resumes from the same phase, and nobody can see a marquee that is
   off-screen. Content animations (reveals, fadeUp) are NOT touched — they are
   one-shot and must be allowed to finish. */
.anim-idle,
.anim-idle::before,
.anim-idle::after,
.anim-idle .mq-row,
.anim-idle .hero-eyebrow::after { animation-play-state: paused !important; }

/* Release the marquee's compositor layer while it is parked. Holding
   will-change on an element that is not currently animating is exactly the
   case the property's own spec warns against. */
.anim-idle .mq-row { will-change: auto; }
