/* home.css — the six screens. Values come from tokens.css; nothing here
   should contain a raw hex, px size or duration. */

/* ══════════════════════════════════════════════════════════════════
   GODNATTID — six screens

   One idea per screen. No cards, no borders, no tiles. Type is the
   event. Motion is real but slow: everything eases over 1–2 seconds
   rather than snapping, because the site's job is to settle a room
   down, not to wake it up.

   No WebGL, no libraries. CSS transforms plus one small rAF loop.
   ══════════════════════════════════════════════════════════════════ */
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--sleep);color:var(--moon);
  font-family:var(--sans);font-size:var(--t-body);line-height:1.5;
  -webkit-font-smoothing:antialiased;overflow-x:hidden}
img{display:block;max-width:100%}
a{color:inherit;text-decoration:none}
:focus-visible{outline:2px solid var(--gold);outline-offset:4px}

.screen{position:relative;min-height:100svh;display:flex;
  padding:var(--gutter);isolation:isolate;overflow:hidden}

/* one screen per scroll, on every width. The rule has to sit on html:
   the page itself is the scroller, so snap set on main was ignored.
   snap-stop:always keeps a flick from carrying past the next screen.
   This only feels right while every screen fits the window: when one is
   a little taller, Chrome's wheel jumps top-to-top and skips its bottom
   edge. Hence --fit below. */
html{scroll-snap-type:y mandatory}
.screen{scroll-snap-align:start;scroll-snap-stop:always}

/* --fit: the height inside a screen's padding. Where a screen could run
   taller than the window (1, 3, 4), each size is capped at a share of
   --fit, taken from the design's own proportions, so a short laptop
   window scales that screen down evenly. Windows over about 1000px tall
   keep the normal sizes; phones fit as they are and don't use it. */
@media(min-width:761px){
  .screen{--fit:calc(100svh - 2 * var(--gutter))}
}

/* everything arrives once, slowly, when its screen comes up */
.rise{opacity:0;transform:translateY(26px);
  transition:opacity 1.4s var(--ease),transform 1.6s var(--ease)}
.rise.in{opacity:1;transform:none}
.d1{transition-delay:.12s}.d2{transition-delay:.26s}.d3{transition-delay:.4s}
@media(prefers-reduced-motion:reduce){
  .rise{opacity:1;transform:none;transition:none}
  html{scroll-snap-type:none}
}

.act{display:inline-flex;align-items:center;gap:10px;
  font:700 var(--t-small)/1 var(--sans);letter-spacing:.02em;
  padding:17px 30px;border-radius:999px;background:var(--gold);color:var(--gold-ink);
  transition:transform .5s var(--ease)}
.act:hover{transform:translateY(-2px)}
.quiet{font-size:var(--t-small);opacity:.72;border-bottom:1px solid;padding-bottom:3px;
  transition:opacity .5s var(--ease)}
.quiet:hover{opacity:1}
@media(prefers-reduced-motion:reduce){.act,.quiet{transition:none}.act:hover{transform:none}}

/* ── nav: as little as possible ── */
.nav{position:fixed;inset:0 0 auto;z-index:80;display:flex;align-items:center;
  gap:24px;padding:22px var(--gutter);mix-blend-mode:difference}
.nav b{font-family:var(--serif);font-size:19px;font-weight:600;
  font-variation-settings:'SOFT' 40,'WONK' 1;margin-right:auto;color:#fff}
.nav a{font-size:var(--t-small);color:#fff;opacity:.8}
.nav a:hover{opacity:1}
@media(max-width:760px){.nav a.hide-s{display:none}}

/* ══ 1 · THE ROOM ══ */
#room{align-items:flex-end;color:var(--moon)}
#room .bg{position:absolute;inset:-4%;z-index:-2;
  background:url('../images/hero/room-autumn-desktop.webp') 50% 50%/cover no-repeat;
  will-change:transform}
/* Gizmo is painted into the room: a tall picture for tall screens, and one
   room per season (html.season-* is set in the page head; autumn is the default) */
.season-winter #room .bg{background-image:url('../images/hero/room-winter-desktop.webp')}
.season-spring #room .bg{background-image:url('../images/hero/room-spring-desktop.webp')}
.season-summer #room .bg{background-image:url('../images/hero/room-summer-desktop.webp')}
@media(orientation:portrait){
  #room .bg{background-image:url('../images/hero/room-autumn-phone.webp')}
  .season-winter #room .bg{background-image:url('../images/hero/room-winter-phone.webp')}
  .season-spring #room .bg{background-image:url('../images/hero/room-spring-phone.webp')}
  .season-summer #room .bg{background-image:url('../images/hero/room-summer-phone.webp')}
}
#room .veil{position:absolute;inset:0;z-index:-1;
  background:linear-gradient(92deg,rgba(10,7,4,.94),rgba(10,7,4,.6) 42%,rgba(10,7,4,0) 74%),
             linear-gradient(to bottom,rgba(10,7,4,.7),transparent 30%,transparent 52%,rgba(8,10,17,.9) 100%)}
.room-in{width:100%;max-width:1300px;margin-inline:auto}
h1{font-family:var(--serif);font-size:var(--t-display);font-weight:600;
  font-variation-settings:'SOFT' 20,'WONK' 1,'opsz' 144;
  line-height:.85;letter-spacing:-.05em;margin:0 0 28px;max-width:13ch;
  text-shadow:0 6px 60px rgba(6,4,2,.6)}
.room-sub{font-size:var(--t-h2);font-family:var(--serif);font-weight:300;
  font-variation-settings:'SOFT' 70,'opsz' 30;line-height:1.25;
  max-width:19ch;margin:0 0 40px;color:#e6d9c1}
.room-do{display:flex;align-items:center;gap:28px;flex-wrap:wrap}
/* fit one screen (see --fit): on short windows the headline and subline
   shrink so the buttons stay on the first screen */
@media(min-width:761px){
  h1{font-size:min(var(--t-display),calc(var(--fit) * .276));
    margin-bottom:min(28px,calc(var(--fit) * .052))}
  .room-sub{font-size:min(var(--t-h2),calc(var(--fit) * .065));
    margin-bottom:min(40px,calc(var(--fit) * .074))}
}
.cue{position:absolute;left:var(--gutter);bottom:22px;font-size:11px;
  letter-spacing:.2em;text-transform:uppercase;opacity:.45}
@media(max-width:760px){
  #room{align-items:flex-end;padding-bottom:min(72px,9svh);min-height:100svh}
  #room .veil{background:linear-gradient(to bottom,rgba(10,7,4,.8),rgba(10,7,4,.22) 20%,
    rgba(10,7,4,.12) 40%,rgba(8,10,17,.55) 58%,rgba(8,10,17,.96) 90%)}
  /* short phones (browser bar showing, iPhone SE): the text block tightens
     with the height so it stays below Gizmo. Tall phones are unchanged. */
  h1{font-size:min(var(--t-display),7svh);margin-bottom:min(28px,3.5svh)}
  .room-sub{max-width:none;margin-bottom:min(40px,5svh)}
  .room-do{gap:min(28px,3.5svh)}
}

/* ══ 2 · TONIGHT ══ one story, at the size it deserves ══ */
#tonight{align-items:center}
#tonight .cover{position:absolute;inset:0;z-index:-2;overflow:hidden}
#tonight .cover img{width:100%;height:100%;object-fit:cover;
  transform:scale(1.08);transition:transform 9s linear}
#tonight.in .cover img{transform:scale(1)}
#tonight .veil{position:absolute;inset:0;z-index:-1;
  background:linear-gradient(to top,rgba(6,8,14,.95) 6%,rgba(6,8,14,.45) 52%,rgba(6,8,14,.7) 100%)}
.tn-in{width:100%;max-width:1300px;margin-inline:auto;align-self:flex-end}
.tn-when{font-size:var(--t-small);color:var(--gold);margin:0 0 18px}
#tonight h2{font-family:var(--serif);font-size:var(--t-hero);font-weight:600;
  font-variation-settings:'SOFT' 24,'WONK' 1,'opsz' 120;
  line-height:.95;letter-spacing:-.04em;margin:0 0 20px;max-width:14ch}
.tn-meta{font-size:var(--t-small);opacity:.6;margin:0 0 26px}
.tn-do{display:flex;align-items:center;gap:28px;flex-wrap:wrap}
@media(prefers-reduced-motion:reduce){#tonight .cover img{transform:none;transition:none}}

/* ══ 3 · THE CHOICE ══ six lines, and the art answers on hover ══ */
#choice{align-items:center;background:var(--night)}
#choice .answer{position:absolute;inset:0;z-index:-1;opacity:.5;
  transition:opacity 1.1s var(--ease)}
#choice .answer picture{display:contents}
#choice .answer img{width:100%;height:100%;object-fit:cover;filter:brightness(.3) saturate(.75)}
#choice .answer::after{content:"";position:absolute;inset:0;
  background:linear-gradient(92deg,rgba(14,17,27,.92),rgba(14,17,27,.5) 55%,rgba(14,17,27,.2))}
#choice .answer.on{opacity:1}
.ch-in{width:100%;max-width:1300px;margin-inline:auto}
.ch-lead{font-family:var(--serif);font-size:var(--t-hero);font-weight:600;
  font-variation-settings:'SOFT' 24,'WONK' 1,'opsz' 110;
  line-height:.96;letter-spacing:-.04em;margin:0 0 46px;max-width:15ch}
.ch-list{list-style:none;margin:0;padding:0}
.ch-list a{display:block;padding:clamp(10px,1.4vw,20px) 0;
  font-family:var(--serif);font-size:var(--t-h2);font-weight:400;
  font-variation-settings:'SOFT' 50,'WONK' 1;letter-spacing:-.02em;
  opacity:.74;transition:opacity .6s var(--ease),transform .6s var(--ease)}
.ch-list a:hover,.ch-list a:focus-visible{opacity:1;transform:translateX(14px)}
.ch-list em{font-style:normal;font-family:var(--sans);font-size:var(--t-small);
  opacity:.5;margin-left:14px}
/* fit one screen (see --fit): the list is the tallest thing on the page */
@media(min-width:761px){
  .ch-lead{font-size:max(34px,min(var(--t-hero),calc(var(--fit) * .1)));
    margin-bottom:min(46px,calc(var(--fit) * .054))}
  .ch-list a{font-size:max(22px,min(var(--t-h2),calc(var(--fit) * .044)));
    padding-block:clamp(6px,min(1.4vw,calc(var(--fit) * .023)),20px)}
}
@media(prefers-reduced-motion:reduce){
  .ch-list a{transition:none}.ch-list a:hover{transform:none}
  #choice .answer{transition:none}
}

/* ══ 4 · THE SHELF ══ 161 of them, drifting past ══ */
#shelf{align-items:center;background:var(--sleep);flex-direction:column;
  justify-content:center;gap:clamp(16px,2vw,28px);padding-inline:0}
.sh-in{width:100%;max-width:1300px;margin-inline:auto;padding-inline:var(--gutter)}
#shelf h2{font-family:var(--serif);font-size:var(--t-hero);font-weight:600;
  font-variation-settings:'SOFT' 24,'WONK' 1,'opsz' 120;
  line-height:.98;letter-spacing:-.04em;margin:0 0 16px;max-width:16ch}
.drift{display:flex;gap:clamp(12px,1.4vw,22px);width:max-content}
.drift img{width:clamp(150px,15vw,230px);aspect-ratio:4/3;object-fit:cover;
  border-radius:3px;filter:brightness(.8);transition:filter .6s var(--ease)}
.drift img:hover{filter:brightness(1.05)}
.lane{overflow:hidden;width:100%;-webkit-mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 8%,#000 92%,transparent)}
.lane .drift{animation:slide 90s linear infinite}
.lane.back .drift{animation-duration:120s;animation-direction:reverse}
@keyframes slide{from{transform:translateX(0)}to{transform:translateX(-50%)}}
/* fit one screen (see --fit) */
@media(min-width:761px){
  #shelf{gap:clamp(16px,min(2vw,calc(var(--fit) * .042)),28px)}
  #shelf h2{font-size:max(34px,min(var(--t-hero),calc(var(--fit) * .129)))}
  .drift img{width:clamp(150px,min(15vw,calc(var(--fit) * .322)),230px)}
}
@media(prefers-reduced-motion:reduce){.lane .drift{animation:none}}

/* ══ 5 · WHY ══ one paragraph, at reading size ══ */
#why{align-items:center;background:var(--night)}
.why-in{width:100%;max-width:1000px;margin-inline:auto}
#why p.big{font-family:var(--serif);font-size:var(--t-h2);font-weight:300;
  font-variation-settings:'SOFT' 70,'opsz' 40;line-height:1.35;
  letter-spacing:-.015em;margin:0 0 44px;max-width:24ch}
.notes{display:flex;flex-wrap:wrap;gap:28px 56px;margin:0 0 40px;padding:0;list-style:none}
.notes li{max-width:26ch}
.notes b{display:block;font-family:var(--serif);font-size:var(--t-small);font-weight:600;
  font-variation-settings:'SOFT' 40,'WONK' 1;margin-bottom:4px}
.notes span{font-size:var(--t-small);color:var(--soft);line-height:1.55}
.notes i{font-style:normal;opacity:.55}

/* ══ 6 · GODNAT ══ */
#godnat{align-items:center;justify-content:center;text-align:center;
  background:var(--sleep);flex-direction:column}
#godnat img{width:min(46vw,240px);margin-bottom:26px;opacity:.95}
#godnat p{font-family:var(--serif);font-size:var(--t-hero);font-weight:300;
  font-variation-settings:'SOFT' 80,'opsz' 90;letter-spacing:-.035em;margin:0 0 52px}
#godnat nav{display:flex;flex-wrap:wrap;justify-content:center;gap:10px 26px;
  font-size:var(--t-small);opacity:.62;max-width:640px}
#godnat small{margin-top:26px;font-size:12px;opacity:.4}
