/* SLANT home, part 1: the stage-lit hero and the trailer hitch. Built on kit.css.
   6 Nov 2026 (Chris): the scroll turn is dropped, the hero is a fixed still; the hitch starts hitched and always shows its heading. */
:root { --run-trail: 300svh; }   /* 100svh of scroll per swap. 17 Nov it was cut to 165svh; 21 Nov Tarun asked for the original back (he had meant the automatic trailer shapes, see PERIOD in home.js) */

/* ───────── 1 · hero: the still ───────── */
.hero{position:relative;overflow-x:clip;padding-top:var(--nav-h);background:radial-gradient(60% 50% at 22% 70%,#1A1A1E,var(--black) 70%)}
.hero-media{position:relative;width:100%;aspect-ratio:536/672;overflow:hidden}
.hero-still{position:absolute;inset:0}
.hero-still img{width:100%;height:100%;object-fit:cover;object-position:0 50%}
.hero-media::after{content:"";position:absolute;inset:auto 0 0 0;height:26%;background:linear-gradient(to top,var(--black),transparent);pointer-events:none;z-index:3}
.hero-still img{transition:opacity .6s var(--ease)}
/* the first draft's light sweep: a soft band of light crosses the unit every 16 s; screen blend, no edges */
.hero-sweep{position:absolute;inset:0;z-index:2;pointer-events:none;mix-blend-mode:screen;background:linear-gradient(100deg,transparent 38%,rgba(239,234,224,.08) 50%,transparent 62%);background-size:300% 100%;background-position:100% 0;animation:hero-sweep 16s var(--ease) 1.2s infinite}
@keyframes hero-sweep{0%{background-position:100% 0}55%{background-position:0 0}100%{background-position:0 0}}
@media (prefers-reduced-motion:reduce){.hero-sweep{display:none}}
/* "electric." (7 Nov, Chris: "love the roll off, but it needs to move more, earlier"): the amber block is there when the page
   opens; from the first scroll it slides right, off the end of the word, and fades. --x (0 = home, 1 = gone) is set by
   home.js. The black word is clipped to the block, so the colour changes exactly at the block's edge. No JS or reduced
   motion: the static block. */
.hero-copy .hl--scrub{--x:0;position:relative;isolation:isolate;background:none;clip-path:none;color:var(--bone);white-space:nowrap}
.hero-copy .hl--scrub::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--amber);clip-path:polygon(0 0,100% 0,calc(100% - .16em) 100%,0 100%);transform:translateX(calc(var(--x) * 118%));opacity:calc(1 - max(0, var(--x) - .8) * 5)}
.hero-copy .hl--scrub::after{content:attr(data-text);position:absolute;inset:0;padding:inherit;color:var(--black);clip-path:inset(-.1em -.1em -.1em calc(var(--x) * 118%));pointer-events:none}
.hero-copy{position:relative;z-index:4;padding:4px var(--gutter) 0;display:grid;gap:18px;align-content:start;margin-top:-28px}
.hero-copy .display .ln--hl{display:block;margin-top:.06em}
/* 10 Nov (Tarun): the benefit is the headline, "Make any trailer electric." the line under it; the amber block moved to
   "Effortlessly.". On wide windows each phrase holds its own line (.ln), so the block always sits alone on the last one. */
.hero-copy .display{font-size:clamp(2.5rem,1.1rem + 5.6vw,6rem);line-height:.98;max-width:13ch}
.hero-copy .lead{max-width:30ch;color:var(--bone)}
.hero-copy .hero-how{font-size:clamp(1.25rem,1rem + 1.2vw,1.75rem);font-weight:600;letter-spacing:-.015em;line-height:1.25}
.hero-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:8px}
.hero-actions .btn--lg{min-height:60px}
.hero-actions .hero-cta{font-size:1.125rem;font-weight:700}
.hero-actions .hero-cta .arrow{width:20px;height:20px}
@media (max-width:479px){.hero-actions .btn{width:100%;justify-content:center}}
.hero-stats{position:relative;z-index:2;margin-top:36px;padding:0 var(--gutter) 40px}
.hero-stats ul{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}
.hero-stats li{display:flex;flex-direction:column-reverse;justify-content:flex-end;gap:6px;padding:16px 12px 20px 16px;border-left:1px solid var(--line);border-top:1px solid var(--line)}
.hero-stats li:nth-child(-n+2){border-top:0}.hero-stats li:nth-child(odd){border-left:0;padding-left:0}
.hero-stats .stat{font-size:clamp(1.625rem,1.2rem + 1.4vw,2.125rem);font-weight:800;line-height:1;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.hero-stats .stat small{font-size:.62em;font-weight:700;letter-spacing:.04em;color:var(--smoke);margin-left:.1em}
.hero-stats .stat--nb{white-space:nowrap}.hero-stats .stat--nb small{margin-left:0}
.hero-stats .label{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--smoke)}

@media (min-width:1024px){
  .hero{height:100svh;min-height:640px;overflow:hidden;padding-top:0;display:grid;grid-template-columns:42% 1fr;grid-template-rows:1fr auto;background:none}
  /* anchored left so the whole unit shows on any window; on tall windows the drawbar runs off the right edge. The 4K still's ground
     matches the page, and its top and bottom edges fade, so the image has no visible edge. */
  .hero-media{position:absolute;left:0;top:47%;width:max(100vw,160svh);aspect-ratio:16/9;transform:translateY(-50%);z-index:0;-webkit-mask-image:linear-gradient(to bottom,transparent,#000 9%,#000 91%,transparent);mask-image:linear-gradient(to bottom,transparent,#000 9%,#000 91%,transparent)}
  .hero-media::after{display:none}
  .hero::after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(to top,var(--black) 0,rgba(11,11,13,.9) 9%,rgba(11,11,13,0) 34%),linear-gradient(to left,rgba(11,11,13,.6),rgba(11,11,13,0) 14%)}
  .hero-copy{grid-column:2;grid-row:1;align-self:center;margin:0;padding:calc(var(--nav-h) + 10vh) var(--gutter) 5vh 0;max-width:760px;gap:20px}
  .hero-copy .display{font-size:clamp(3.25rem,.2rem + 4.9vw,5.25rem);max-width:none}
  .hero-copy .display .ln{display:block;white-space:nowrap}
  .hero-actions .btn--lg{min-height:64px}
  .hero-actions .hero-cta{font-size:1.1875rem;padding-inline:calc(var(--s8) + 4px) calc(var(--s8) + var(--cut) + 4px)}
  .hero-stats{grid-column:1/-1;grid-row:2;margin:0;display:grid;grid-template-columns:42% 1fr;padding:0;position:relative;z-index:2}
  .hero-stats ul{grid-column:2;grid-template-columns:repeat(4,1fr);margin-right:var(--gutter)}
  .hero-stats li{border-top:0;padding:20px 16px 26px 20px}
  .hero-stats li:nth-child(odd){border-left:1px solid var(--line);padding-left:20px}
  .hero-stats li:first-child{border-left:0;padding-left:0}
}

/* ───────── 2 · the trailers (7 Nov, Tarun: "the drive unit stays and the trailer moves"; "bigger, almost filling the page,
   and the text on top of it"). The unit layer never moves; trailers roll out to the left and the next rolls in onto the
   hitch. The scene fills the screen; heading and list sit over it on soft scrims. */
.trail-track{position:relative;height:calc(100svh + var(--run-trail));background:var(--black)}
.trail{position:sticky;top:0;height:100svh;min-height:520px;overflow:hidden;background:var(--black)}
.trail-box{position:absolute;left:50%;top:54%;transform:translate(-50%,-50%);width:min(98vw,calc((100svh - var(--nav-h)) * 2.486 * .94));aspect-ratio:4127/1660}
.trail-box img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;opacity:0;will-change:transform,opacity}
.trail-box .tr[data-i="0"],.trail-box .unit{opacity:1}
.trail-box .unit{z-index:2}
.trail-head,.trail-foot{position:absolute;left:0;right:0;z-index:3;padding-inline:var(--gutter)}
.trail-head{top:0;padding-top:calc(var(--nav-h) + 16px);padding-bottom:48px;display:grid;gap:8px;align-content:start;background:linear-gradient(to bottom,rgba(11,11,13,.9),rgba(11,11,13,.55) 60%,rgba(11,11,13,0))}
.trail-head h2{font-size:clamp(1.875rem,1.1rem + 2.6vw,3.25rem);font-weight:800;line-height:1.04;letter-spacing:-.03em;max-width:22ch;text-wrap:balance;text-shadow:0 2px 24px rgba(11,11,13,.6)}
.trail-head h2 .nb{white-space:nowrap}
.trail-foot{bottom:0;padding-top:56px;padding-bottom:calc(var(--dock-space, 0px) + 20px);display:grid;gap:14px;background:linear-gradient(to top,rgba(11,11,13,.92),rgba(11,11,13,.6) 55%,rgba(11,11,13,0))}
.cap{display:grid;gap:4px}
.cap .tag{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--amber)}
.cap .txt{font-size:clamp(1.125rem,1rem + .6vw,1.375rem);font-weight:700;letter-spacing:-.015em;line-height:1.25}
.tl{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;background:var(--line);border:1px solid var(--line)}
.tl li{position:relative;background:rgba(11,11,13,.82);color:var(--smoke);transition:color .3s var(--ease),background-color .3s var(--ease);overflow:hidden}
.tl li.is-on{background:var(--graphite);color:var(--bone)}
.tl button{display:grid;gap:3px;align-content:start;width:100%;height:100%;padding:10px 10px 12px;text-align:left;color:inherit;cursor:pointer}
.tl button:hover{color:var(--bone)}
.tl button:focus-visible{outline:2px solid var(--amber);outline-offset:-2px}
.tl .n{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.14em;color:var(--amber)}
.tl .name{display:none;font-weight:700;font-size:.9375rem;line-height:1.25}
.tl .tag{font-family:var(--mono);font-weight:500;font-size:12px;letter-spacing:.1em;text-transform:uppercase}
.tl li.is-on .tag{color:var(--amber)}
.tl .bar{position:absolute;left:0;right:0;bottom:0;height:2px;background:var(--amber);transform:scaleX(0);transform-origin:left;pointer-events:none}
.tl li:first-child .bar{transform:scaleX(1)}
@media (max-width:1023px){.trail-box{top:50%;width:min(100vw,calc((100svh - var(--nav-h)) * 2.486))}}
@media (min-width:1024px){
  .trail-head{padding-top:calc(var(--nav-h) + 28px)}
  .trail-foot{grid-template-columns:minmax(16rem,1fr) minmax(0,1.6fr);align-items:end;gap:32px;padding-bottom:28px}
  .tl button{grid-template-columns:auto minmax(0,1fr);align-items:baseline;column-gap:12px;row-gap:2px;padding:12px 16px 14px}
  .tl .tag{grid-column:2}
  .tl .name{display:block}
}

/* no JS: the box trailer, hitched, static */
html:not(.js) .trail-track{height:auto}
html:not(.js) .trail{position:relative;height:auto;min-height:100svh}

/* ───────── 2b · slide 4, "Something you built" (10 Nov, Tarun: "a silhouette-reveal animation (like 'Who's that Pokémon?')").
   A silhouette trailer sits on the same hitch as the real ones (the SVG shares the layers' 2000x804 space and box) under the
   unit layer. home.js rolls it in like a trailer and, only while slide 4 is showing, cycles the shapes: each lands with a
   flash and a rim of amber light that settles to a quiet edge, and the "?" pops in. Opacity and transform only.
   Reduced motion: one still silhouette with its "?". No JS: the section shows the first trailer, so this stays hidden. */
.trail-box .sil-stage{position:absolute;inset:0;width:100%;height:100%;z-index:1;opacity:0;overflow:visible;pointer-events:none;will-change:transform,opacity}
.sil{opacity:0;transition:opacity .28s var(--ease)}
.sil.is-on{opacity:1}
.sil use{stroke-linejoin:round;fill-rule:evenodd}
.sil-glow{fill:none;stroke:var(--bone);stroke-width:22px;filter:url(#sil-bl);opacity:.14}
.sil-rim{fill:#000;stroke:#9A9CA6;stroke-width:5px;opacity:.6}
.sil-fill{fill:url(#sil-g)}
.sil-flash{fill:var(--bone);opacity:0}
.sil-q{font-family:var(--mono);font-weight:400;font-size:112px;fill:var(--bone);fill-opacity:.72;text-anchor:middle;dominant-baseline:central;transform-box:fill-box;transform-origin:50% 50%}
.sil-back{opacity:.7}
.sil.is-reveal .sil-flash{animation:sil-flash .9s var(--ease) both}
.sil.is-reveal .sil-glow{animation:sil-glow 1.5s var(--ease) both}
.sil.is-reveal .sil-rim{animation:sil-rim 1.2s var(--ease) both}
.sil.is-reveal .sil-q{animation:sil-q .6s var(--ease) .25s both}
@keyframes sil-flash{0%{opacity:.4}100%{opacity:0}}
@keyframes sil-glow{0%{opacity:0}12%{opacity:.5}100%{opacity:.14}}
@keyframes sil-rim{0%{opacity:1}100%{opacity:.6}}
@keyframes sil-q{0%{opacity:0}100%{opacity:1}}
@media (prefers-reduced-motion:reduce){.sil.is-reveal use,.sil.is-reveal .sil-q{animation:none}}
html:not(.js) .trail-box .sil-stage{display:none}
