/* Home scroll-story (WEB-006). Tokens, fonts, .button, .eyebrow, header/footer come from site.css.
   story.js adds .motion to <html> (JS on, no reduced motion); only then are chapters 1-3 pinned runs. */
html{overflow-x:clip}
body{background:#0b120f}

/* Chapters: media and copy share one grid cell on desktop (copy over the render) */
.ch{position:relative;display:grid;background:#0b120f}
.ch>.track,.ch>.media,.ch>.copy{grid-area:1/1}
.media{position:relative;height:100svh;overflow:hidden;background:#0b120f}
.hero-ch .media{height:calc(100svh - 88px)}
/* The render's lit floor would end in a hard seam against the next (darker) chapter: fade it into the page */
.hero-ch .media img{-webkit-mask-image:linear-gradient(#000 78%,transparent);mask-image:linear-gradient(#000 78%,transparent)}
.media img,.media canvas{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;display:block}
.media canvas{opacity:0;transition:opacity .3s}.media canvas.on{opacity:1}
.media .after{position:absolute;inset:0;opacity:0}
.media:after{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(90deg,#07110df2 0%,#07110dcc 24%,#07110d00 46%)}
.copy{position:relative;z-index:1;display:flex;padding:0 4%;pointer-events:none}
.copy-in{margin:auto 0;padding:48px 0;max-width:min(30vw,460px);pointer-events:auto}
.top .copy-in{margin-top:7vh}

.motion .pin .track{height:180svh}.motion .pin.long .track{height:200svh}
.motion .pin .media{position:sticky;top:0}
.motion .pin .copy{position:sticky;top:0;align-self:start;min-height:100svh}

/* Copy */
.ch h1{margin:26px 0 22px}
.ch h2{font-size:clamp(34px,3.4vw,54px);font-weight:500;line-height:1.02;letter-spacing:-.04em;margin:18px 0}
.sub{font-size:clamp(16px,1.25vw,19px);line-height:1.5;color:var(--soft);margin:0 0 22px}
.skip-story{display:inline-flex;align-items:center;gap:12px;min-height:44px;font:11px var(--mono);letter-spacing:1.2px;text-transform:uppercase;border-bottom:1px solid var(--rule)}
.skip-story span{color:var(--orange)}.skip-story:hover{border-bottom-color:var(--orange)}
.labels{list-style:none;margin:0;padding:0;font:11px/1.5 var(--mono);letter-spacing:.8px;color:var(--soft)}
.labels li{padding:9px 0;border-top:1px solid var(--rule)}
.motion .labels [data-at]{opacity:.7;transition:opacity .3s}.labels .on{opacity:1!important;color:var(--paper)}
.labels .on:before{content:"";display:inline-block;width:7px;height:7px;background:var(--orange);margin-right:8px}
.stats{list-style:none;margin:0 0 18px;padding:0;display:grid;grid-template-columns:1fr 1fr;gap:12px 20px}
.stats li{border-top:1px solid var(--rule);padding-top:8px;font:11px/1.4 var(--mono);letter-spacing:.5px;color:var(--muted)}
.stats strong{display:block;font:500 clamp(24px,2vw,32px)/1.1 var(--sans);letter-spacing:-1px;color:var(--paper);margin-bottom:4px}
.stats .wide{grid-column:1/-1}
.logos{list-style:none;margin:0 0 20px;padding:0;display:flex;flex-wrap:wrap;align-items:center;gap:6px 22px}
.logos a{display:flex;align-items:center;gap:8px;min-height:36px;font-size:14px;letter-spacing:-.2px;color:#e2e5dc}
.logos img{height:18px;width:auto;filter:brightness(0) invert(.93)}
.logos img.tea{height:22px;filter:none}.logos img[alt=""]{width:22px;height:22px;border-radius:4px;filter:none}
.logos a:hover{color:var(--paper)}

/* Finale */
.finale{max-width:1536px;min-height:100svh;margin:0 auto;padding:72px 4% 80px;display:flex;flex-direction:column;justify-content:center}
.finale:focus{outline:none}
.finale-mark{font-size:clamp(96px,12vw,190px);font-weight:900;letter-spacing:-.07em;line-height:.85;margin:0}
.duo{font:500 13px var(--mono);letter-spacing:1.4px;margin:22px 0 0}.duo span{color:var(--orange);margin:0 10px}
.finale h2{font-size:clamp(34px,3.4vw,54px);font-weight:500;line-height:1.04;letter-spacing:-.04em;margin:34px 0}
.tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px;margin:0 0 34px;padding:0;list-style:none}.tiles li{display:flex}
.tiles a{flex:1;display:flex;flex-direction:column;min-height:180px;padding:22px 22px 24px;background:var(--deep);border-top:2px solid transparent;transition:border-color .2s,background .2s}
.tiles a:hover{border-top-color:var(--orange);background:#0d1c16}.tiles a:focus-visible{outline-offset:-4px}
.tiles h3{font-size:clamp(20px,1.7vw,26px);font-weight:500;letter-spacing:-.6px;line-height:1.1;margin:auto 0 10px;padding-top:28px}
.tiles h3 span{color:var(--orange-text);font-size:.8em}
.tiles p{font-size:13px;line-height:1.45;color:var(--soft);margin:0;min-height:2.9em} /* 2 lines, so titles share a baseline */
.finale-cta{gap:12px 28px}.finale-cta .text-link{max-width:none;gap:16px;padding:14px 0}

/* Below the finale */
#fleet h2{margin:34px 0 0}
.fleet-grid{grid-template-columns:repeat(3,minmax(0,1fr));margin-top:40px}
.pilot-band h3{font-size:17px;font-weight:500;letter-spacing:-.2px;margin:0 0 6px;color:var(--paper)}

/* One-time entrance: opacity + 16 px, 600 ms; story.js only hides elements that start below the fold */
.pending{opacity:0;transform:translateY(16px)}
.pending.in{opacity:1;transform:none;transition:opacity .6s cubic-bezier(.22,1,.36,1),transform .6s cubic-bezier(.22,1,.36,1)}

@media(max-width:1050px){.tiles{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Phones and portrait screens: copy above the render, 4:5 renders (same query as the <picture> sources) */
@media(max-width:760px),(orientation:portrait){
  .ch{display:flex;flex-direction:column}
  .ch>.copy{order:-1}
  .copy{padding:44px max(16px,4%) 28px}
  .copy-in,.top .copy-in{max-width:620px;margin:0;padding:0}
  /* 4:5 renders keep the product in the lower ~55%: a square box with the image anchored low drops the empty top */
  .media,.hero-ch .media{height:auto;aspect-ratio:1/1}
  .media img{object-position:50% 85%}
  .media:after{display:none}
  .motion .pin .copy{position:relative;min-height:0}
  .motion .pin .media{height:100svh;aspect-ratio:auto}
  /* Pinned full-height frame: lift the render (and its poster) by a fifth so the product sits mid-screen.
     One overlay fades the floor into the page (a mask per layer would let the poster show through the canvas). */
  .motion .pin .media img,.motion .pin .media canvas{object-position:50% 50%;transform:translateY(-20%)}
  .motion .pin .media:after{display:block;background:linear-gradient(#0b120f00 58%,#0b120f 80%)}
  .fleet-grid{grid-template-columns:1fr}
}
/* Short phones (e.g. 375x667): tighter hero copy so more of the render shows above the fold */
@media(max-width:760px) and (max-height:699px){
  .hero-ch .copy{padding-top:22px;padding-bottom:18px}
  .hero-ch h1{margin:14px 0 12px}
  .hero-ch .sub{margin-bottom:8px}
  .hero-ch .media img{object-position:50% 100%}
}
@media(max-width:599px){
  .ch h2,.finale h2{font-size:32px;letter-spacing:-1.2px}
  .finale{padding:56px 16px 64px;min-height:0}
  .finale-mark{font-size:96px}
  .tiles{grid-template-columns:1fr}.tiles a{min-height:0}.tiles p{min-height:0}.tiles h3{padding-top:20px}
  .finale-cta .text-link{width:100%}
  .stats{gap:10px 16px}
}
