/* Rainglass — scroll film
   Named knobs live here as custom properties: --giant-ink (step words), --hot / --cold (water),
   --boxH (machine size). Motion knobs live at the top of main.js. */
/* the glaze colours are registered so they can glide from one glaze to the next */
@property --bg-l{syntax:'<color>';inherits:true;initial-value:#A7B8C5}
@property --bg-m{syntax:'<color>';inherits:true;initial-value:#97A8B4}
@property --bg-r{syntax:'<color>';inherits:true;initial-value:#8798A4}
@property --bg-ink{syntax:'<color>';inherits:true;initial-value:#182831}
:root{transition:--bg-l .9s ease,--bg-m .9s ease,--bg-r .9s ease,--bg-ink .9s ease}
:root{
  --paper:#F3EDE4;
  --ink:#1E1A17;
  --line:#2A2420;
  --mute:#63584F;
  --clay:#C2643A;            /* brand: the logo's six outlets */
  --accent:#2D5B6E;          /* product: the chosen glaze. Petrol by default; the glaze picker changes it site-wide */
  --btn:#234959;             /* precomputed high-contrast button fill fallback for pre-color-mix Safari */
  --hot:#D9482B;
  --hot-ink:#AC361F;         /* AA-compliant text variant of --hot on warm paper */
  --cold:#7FB0D0;
  --coffee:#5A2E16;
  --giant-ink:#E3D0BB;      /* step words behind the x-ray */
  --bg-ink:#182831;        /* giant words behind the machine: a deep ink of the chosen glaze */
  --bg-l:#A7B8C5; --bg-m:#97A8B4; --bg-r:#8798A4;   /* background behind the machine: a soft tone of the chosen glaze (Petrol default) */
  --serif:"Instrument Serif", "Iowan Old Style", Georgia, serif;
  --sans:"Instrument Sans", system-ui, sans-serif;   /* the sans cut made to pair with Instrument Serif */
  --mono:"JetBrains Mono", ui-monospace, Menlo, monospace;
  --gutter:clamp(16px, 4vw, 64px);
  --word-strength:.82;      /* KNOB: bold dark editorial ink outside the machine; softened inside borosilicate via .glass-veil */
  --boxH:min(86svh, 55vw);   /* the machine is nearly as wide as it is tall: on squarer screens it gives the text room */
}
*{box-sizing:border-box}
html{background:var(--paper)}
body{margin:0;background:var(--paper);color:var(--ink);font-family:var(--sans);font-weight:450;letter-spacing:.012em;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
img{display:block;max-width:100%}
em{font-style:italic}
a{color:inherit}
.defs{position:absolute;width:0;height:0;overflow:hidden}

/* ---------- nav ---------- */
.nav{position:fixed;inset:0 0 auto 0;z-index:50;display:flex;align-items:center;justify-content:space-between;
  padding:18px max(var(--gutter), env(safe-area-inset-right)) 18px max(var(--gutter), env(safe-area-inset-left));color:var(--ink);transition:color .4s,background-color .35s}
.nav.on-dark{color:var(--paper)}
.nav.over-details{background:rgba(21,17,14,.85)}
.brand{display:flex;align-items:center;gap:12px;text-decoration:none}
.mark{width:34px;height:34px;overflow:visible}
.mk-ring{fill:none;stroke:currentColor;stroke-width:6}
.mk-hub{fill:currentColor}
.mk-spokes line{stroke:currentColor;stroke-width:4;stroke-linecap:round}
.mk-dots circle{fill:currentColor;opacity:.28;transition:opacity .3s, fill .9s ease}
.mk-dots circle.on{fill:var(--accent);fill:color-mix(in oklab, var(--accent) 78%, var(--bg-ink));opacity:1}
.nav.on-dark .mk-dots circle.on{fill:color-mix(in oklab, var(--accent) 72%, var(--paper))}
.wordmark{font:400 27px/1 var(--serif);letter-spacing:-.01em}
.nav-links{display:flex;gap:30px;font-size:14px;position:absolute;left:50%;transform:translateX(-50%)}   /* stays centred while the glaze row stretches */
.nav-end{display:flex;align-items:center;gap:18px}
#sound-toggle{display:inline-flex;align-items:center;gap:6px;border:0;background:none;color:inherit;cursor:pointer;
  min-height:38px;padding:0 4px;opacity:.94;transition:opacity .25s ease;
  font:500 10.5px/1 var(--mono);letter-spacing:.11em;text-transform:uppercase;white-space:nowrap}
#sound-toggle[hidden]{display:none}
#sound-toggle::before{content:'';width:6px;height:6px;border-radius:50%;border:1px solid currentColor;opacity:.75;transition:background-color .25s ease,border-color .25s ease,opacity .25s ease}
#sound-toggle:hover,#sound-toggle:focus-visible,#sound-toggle[aria-pressed="true"]{opacity:1}
#sound-toggle[aria-pressed="true"]::before{background:var(--accent);border-color:var(--accent);opacity:1}
.nav.on-dark #sound-toggle[aria-pressed="true"]::before{background:var(--paper);border-color:var(--paper)}
#sound-toggle:focus-visible{outline:2px solid currentColor;outline-offset:3px;border-radius:4px}
/* glaze dots: colour only, and they never move. One small caption sits under the row and glides to the dot you're on */
.nav-glaze{display:flex;align-items:center;position:relative}
.ng{display:inline-flex;align-items:center;justify-content:center;min-width:24px;min-height:29px;border:0;background:none;padding:8px 5.5px;margin:0;cursor:pointer;color:inherit}
.ng i{display:block;flex:none;width:13px;height:13px;border-radius:50%;background:var(--c);box-shadow:0 0 0 1.75px rgba(30,26,23,.11);transition:transform .3s cubic-bezier(.2,.6,.2,1),box-shadow .25s ease}
.nav.on-dark .ng i{box-shadow:0 0 0 1.75px rgba(243,237,228,.18)}
.ng:hover i,.ng:focus-visible i{transform:scale(1.14)}
.ng[aria-checked="true"] i,.nav.on-dark .ng[aria-checked="true"] i{box-shadow:0 0 0 1.75px rgba(255,255,255,.94)}
.ng:focus-visible{outline:none}
.ng:focus-visible i{outline:2px solid currentColor;outline-offset:3px}
.ng-tip{position:absolute;left:0;top:100%;margin-top:1px;opacity:0;pointer-events:none;white-space:nowrap;
  font:500 10px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase}
@media (max-width:1240px){.nav-glaze{display:none}}   /* narrow screens: the Finishes section has the picker */
@media (max-width:900px){.nav-links{display:none}}    /* prevent link collisions on tablets & landscape phones */
@media (max-width:680px){.nav-end{gap:10px}#sound-toggle{font-size:10px;letter-spacing:.08em}}
.nav-links a{text-decoration:none;opacity:.88}
.nav-links a:hover{opacity:1}
.nav-cta{font:500 13px/1 var(--sans);text-decoration:none;padding:11px 16px;border-radius:99px;border:1px solid currentColor;display:inline-flex;align-items:center;gap:8px}
@media (max-width:410px){.brand{gap:8px}.mark{width:28px;height:28px}.wordmark{font-size:23px}.nav-cta{padding:9px 12px;font-size:12px;gap:6px}.nav-end{gap:8px}#sound-toggle{font-size:9.5px;letter-spacing:.06em;padding:0 2px}}
@media (max-width:360px){.brand{min-height:32px}.brand .mark{display:none}.nav-end{gap:5px}#sound-toggle::before{display:none}}
.cta-dot{width:9px;height:9px;border-radius:50%;background:var(--accent);box-shadow:0 0 0 1.5px rgba(243,237,228,.6);transition:background-color .9s ease}
::selection{background:var(--accent);color:var(--paper)}

/* ---------- film ---------- */
.film{position:relative;height:1250vh}
.stage{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden;--scan:0;--scan2:0}
.layer{position:absolute;inset:0}
.layer-photo{isolation:isolate;background:linear-gradient(90deg,var(--bg-l) 0%,var(--bg-m) 48%,var(--bg-r) 100%)}
.layer-xray{background:var(--paper);
  clip-path:inset(calc(var(--scan2) * 1%) 0 calc(100% - var(--scan) * 1%) 0)}
.layer-ui{pointer-events:none;z-index:6}

.box{position:absolute;left:50%;top:calc(50% + 2.5svh);height:var(--boxH);width:calc(var(--boxH) * 1.24955);transform:translate(-50%,-50%)}
.box img{width:100%;height:100%;object-fit:cover}
/* the machine is a transparent cutout (assets/machine/, 1600 and 2400 wide), so it sits on any background and the giant words behind it
   really show through the glass. --floor = strength of the soft shadow it stands on */
.box{--floor:0}   /* the machine photo carries its own soft shadow now */
.box .photo{position:relative;z-index:1}
.glass-veil,.refract-glass{display:none}
@media (min-aspect-ratio: 1001/1000){
  /* optical depth separation strictly inside clear glass & water: bold dark text stays razor-sharp outside,
     then refracts via WebGL2 (.refract-glass) or softens via fallback CSS (.glass-veil) behind borosilicate */
  .glass-veil{display:block;position:absolute;inset:0;z-index:0;pointer-events:none;
    background:color-mix(in srgb, var(--bg-m) 10%, transparent);
    -webkit-backdrop-filter:blur(2.2px) contrast(.92) brightness(1.01);
    backdrop-filter:blur(2.2px) contrast(.92) brightness(1.01);
    -webkit-mask-image:url(assets/machine/glass-mask-1600.webp?v=9);mask-image:url(assets/machine/glass-mask-1600.webp?v=9);
    -webkit-mask-size:cover;mask-size:cover;-webkit-mask-position:center;mask-position:center;
    -webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}
  .refract-glass{display:block;position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;opacity:0}
  .box.gl-on .refract-glass{opacity:1}
  .box.gl-on .glass-veil{display:none}
}
.floor{position:absolute;left:13%;right:13%;top:90.5%;height:8%;border-radius:50%;pointer-events:none;
  background:radial-gradient(closest-side,rgba(52,28,18,var(--floor)),rgba(52,28,18,0));filter:blur(5px)}

/* giant words over the photo, multiplied so they read as printed on the wall behind the glass */
/* --word-y = where the word's baseline sits on the photo (0 top, 1 bottom): just above the cone, behind hopper and arm */
.giant-photo{--word-y:.358;position:absolute;left:0;right:0;top:calc(50% + 2.5svh - var(--boxH) / 2 + var(--boxH) * var(--word-y));margin:0;text-align:center;pointer-events:none;
  font:400 clamp(96px, 24.5vw, 470px)/.8 var(--serif);letter-spacing:-.035em;color:var(--bg-ink);
  mix-blend-mode:multiply;transform:translateY(-92.6%)}  /* puts the baseline exactly on --word-y */
.giant-photo span{display:inline-block}
/* wide screens only: here the words sit behind the glass. On phones they stand clear of the machine and stay solid */
@media (min-aspect-ratio: 1001/1000){.giant-photo,.fin-name{filter:opacity(var(--word-strength))}}
.ready-word span{opacity:0}

.hero-sub,.ready-sub{position:absolute;left:var(--gutter);bottom:7svh;z-index:3;
  max-width:max(240px, calc(50% - var(--boxH) * 0.455 - var(--gutter) - 28px))}   /* the clear space beside the machine (base edge at 13.6% / 83.7% of the photo) */
.ready-sub{left:auto;right:var(--gutter);text-align:right}
.lede{font:400 clamp(34px, 3.25vw, 60px)/1.02 var(--serif);margin:0 0 16px;letter-spacing:-.015em}
/* desktop: as large as the clear space beside the machine allows (--R = the longest line, in em) */
.hero-sub{max-width:none}
.hero-sub .lede,.ready-sub .lede{--R:6.95;font-size:max(23px, min(clamp(34px, 3.25vw, 60px), calc((50vw - var(--boxH) * 0.455 - var(--gutter) - 56px) / var(--R))))}   /* --R measured: 6.87em */
.small{font-size:14.5px;line-height:1.45;margin:0;color:#3d322b;max-width:32ch}
@media (min-aspect-ratio: 1001/1000){.hero-sub .small{max-width:min(32ch, calc(50vw - var(--boxH) * 0.455 - var(--gutter) - 28px))}}   /* stays clear of the base */
.ready-sub{opacity:0}
.ready-sub .lede{text-wrap:balance}
.scroll-cue{position:absolute;right:var(--gutter);bottom:7svh;margin:0;display:flex;align-items:center;gap:12px;
  font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;z-index:3}
.scroll-cue i{display:block;width:1px;height:46px;background:currentColor;transform-origin:top;animation:cue 2.2s ease-in-out infinite}
@keyframes cue{0%{transform:scaleY(0)}50%{transform:scaleY(1);transform-origin:top}50.1%{transform-origin:bottom}100%{transform:scaleY(0);transform-origin:bottom}}

/* x-ray world */
.giants{position:absolute;inset:0;pointer-events:none}
.giant{position:absolute;left:calc(var(--gutter) - .05em);top:50%;margin:0;white-space:nowrap;opacity:0;
  font:400 clamp(90px, 23vw, 430px)/.8 var(--serif);letter-spacing:-.04em;color:var(--giant-ink);transform:translateY(-50%)}
.g-watched{white-space:normal;width:92vw;font-size:clamp(64px, 12.5vw, 240px);line-height:.84}

.xray{position:absolute;inset:0;width:100%;height:100%;overflow:visible;
  --s0:#7FB0D0;--s1:#7FB0D0;--grounds:#A07A5C;--coil:#2A2420;--led:transparent;--plate:0}
/* inside the base: faint wires and board, a circular deck warming pad under the carafe that glows once coffee is in, a hot pulse along each wire */
.xray .wire{fill:none;stroke:var(--line);stroke-opacity:.3;stroke-width:1;vector-effect:non-scaling-stroke;stroke-linejoin:round;stroke-linecap:round}
.xray .soft{stroke-opacity:.55}
.xray .plate-ring{fill:none;stroke:var(--line);stroke-opacity:.22;stroke-width:1;vector-effect:non-scaling-stroke}
.xray .plate{fill:url(#plateGrad);opacity:var(--plate)}
.xray .plate-glow{fill:#E87A48;opacity:calc(var(--plate) * .42);filter:url(#plateBlur)}
.xray .pulse{fill:none;stroke:var(--hot);stroke-width:4.4;stroke-linecap:round;stroke-linejoin:round;opacity:0;filter:drop-shadow(0 0 4px rgba(217,72,43,.85))}
.xray .ol{fill:none;stroke:var(--line);stroke-width:1.5;vector-effect:non-scaling-stroke;stroke-linecap:round;stroke-linejoin:round}
.xray .ol.solid{fill:var(--paper)}
.xray .ol.thick{stroke-width:3}
.xray .dt{fill:none;stroke:var(--line);stroke-opacity:.3;stroke-width:1;vector-effect:non-scaling-stroke;stroke-linecap:round}
.xray .dot-d{fill:var(--line);fill-opacity:.35}
.f-water{fill:var(--cold);fill-opacity:.22}
.f-water-line{fill:none;stroke:var(--cold);stroke-width:2;vector-effect:non-scaling-stroke}
.f-grounds{fill:var(--grounds)}
.f-speck{fill:url(#speck)}
.f-coffee{fill:var(--coffee);fill-opacity:.9}
.f-coffee-line{fill:none;stroke:#2c150a;stroke-width:1.5;vector-effect:non-scaling-stroke}
.f-puck{fill:var(--s1);fill-opacity:0}
.flow{fill:none;stroke:url(#heatGrad);stroke-width:19;stroke-linecap:butt;stroke-linejoin:round;opacity:0}
.cold-flow{fill:none;stroke:var(--cold);stroke-width:10.5;stroke-linecap:butt;stroke-linejoin:round;opacity:0}
.flow-glow{fill:none;stroke:var(--hot);stroke-width:44;stroke-linecap:round;opacity:0;filter:url(#glow)}
.flow-shim{fill:none;stroke:#fff;stroke-width:5.2;stroke-linecap:round;stroke-dasharray:22 58;opacity:0}
.cold-shim{fill:none;stroke:#fff;stroke-width:2.8;stroke-linecap:round;stroke-dasharray:14 42;opacity:0}
.rain line{stroke:var(--hot);stroke-opacity:.8;stroke-width:4.7;stroke-linecap:round;stroke-dasharray:13 19}
.splash ellipse{fill:none;stroke:var(--hot);stroke-opacity:.6;stroke-width:1.4;vector-effect:non-scaling-stroke}
.particles circle{fill:#6A4630}
.bubbles circle{fill:rgba(243,237,228,.55);stroke:#2c150a;stroke-opacity:.55;stroke-width:1;vector-effect:non-scaling-stroke}
.drip{stroke:var(--coffee);stroke-width:6.6;stroke-linecap:round;stroke-dasharray:23 13}
.beans ellipse{fill:#DCC7AE;stroke:var(--line);stroke-opacity:.55;stroke-width:1;vector-effect:non-scaling-stroke}
.beans path{fill:none;stroke:var(--line);stroke-opacity:.45;stroke-width:1;vector-effect:non-scaling-stroke}
.heater .coil{fill:none;stroke:var(--coil);stroke-width:2.2;vector-effect:non-scaling-stroke;stroke-linejoin:round}
.led{fill:var(--led);stroke:var(--line);stroke-width:1.2;vector-effect:non-scaling-stroke}
.leader{fill:none;stroke:var(--line);stroke-width:1;vector-effect:non-scaling-stroke}
.ldot{fill:var(--line);opacity:0}

.labels{position:absolute;inset:0;pointer-events:none}
.label{position:absolute;margin:0;transform:translateY(-50%);opacity:0;
  font:500 10.5px/1.4 var(--mono);letter-spacing:.09em;text-transform:uppercase;white-space:nowrap}
.label span{font-weight:400;color:var(--mute)}
.l-left{right:88.5%;text-align:right}
.l-right{left:88%}

.captions{position:absolute;left:var(--gutter);bottom:7svh;width:min(310px, max(180px, calc(50vw - var(--boxH) * 0.455 - var(--gutter) - 14px)));height:0;z-index:4;pointer-events:none}
.cap{position:absolute;left:0;bottom:0;opacity:0}
.cap-n{font:500 11px/1 var(--mono);letter-spacing:.14em;margin:0 0 14px;color:var(--mute)}
.cap-n i{font-style:normal;opacity:.5;margin:0 2px}
.cap h2{font:400 clamp(44px, 4.2vw, 64px)/.95 var(--serif);margin:0 0 12px;letter-spacing:-.02em;display:flex;align-items:baseline;gap:16px}
.cap p{font-size:15.5px;line-height:1.45;margin:0;color:#3d322b}
.temp{font:500 15px/1 var(--mono);color:var(--hot-ink);letter-spacing:.02em}

.scanline{position:absolute;left:0;right:0;height:1.5px;margin-top:-.75px;opacity:0;z-index:5;pointer-events:none;
  /* a hairline of white-hot light, tapered at both ends, with a soft bloom and a faint light sheet trailing above it */
  background:linear-gradient(90deg,rgba(217,72,43,0) 3%,#D9482B 20%,#F2784A 36%,#FFE4D2 50%,#F2784A 64%,#D9482B 80%,rgba(217,72,43,0) 97%)}
.scanline::after{content:'';position:absolute;left:0;right:0;top:-5px;height:11px;filter:blur(5px);
  background:linear-gradient(90deg,rgba(217,72,43,0) 6%,rgba(232,96,58,.6) 28%,rgba(255,150,105,.85) 50%,rgba(232,96,58,.6) 72%,rgba(217,72,43,0) 94%)}
.scanline::before{content:'';position:absolute;left:0;right:0;bottom:0;height:14svh;
  background:linear-gradient(0deg,rgba(232,96,58,.13),rgba(232,96,58,.04) 35%,rgba(232,96,58,0));
  -webkit-mask-image:linear-gradient(90deg,transparent 8%,#000 32%,#000 68%,transparent 92%);mask-image:linear-gradient(90deg,transparent 8%,#000 32%,#000 68%,transparent 92%)}
.scanline.s1{top:calc(var(--scan) * 1%)}
.scanline.s2{top:calc(var(--scan2) * 1%)}

/* the machine's own dial */
.knob-btn{position:absolute;left:66.19%;top:88.81%;width:7.4%;aspect-ratio:1;transform:translate(-50%,-50%);
  border:0;padding:0;border-radius:50%;background:transparent;cursor:grab;pointer-events:auto;touch-action:none;
  -webkit-tap-highlight-color:transparent}
.knob-btn::before{content:'';position:absolute;inset:-35%;border-radius:50%}   /* bigger grab area than the knob itself */
.is-dialing .knob-btn{cursor:grabbing}
/* the dial svg is always 120 site px wide (8.56% of the box), whatever the button's width (--kw, % of the box), so its rings sit on the knob */
.knob-btn{--kw:7.4}
.knob-btn svg{--s:calc(856% / var(--kw));position:absolute;left:calc((100% - var(--s)) / 2);top:calc((100% - var(--s)) / 2);width:var(--s);height:var(--s);transform:rotate(-90deg);overflow:visible}
.kr-track{fill:none;stroke:rgba(243,237,228,.75);stroke-width:2;vector-effect:non-scaling-stroke;animation:pulse 2.4s ease-out infinite;transform-box:view-box;transform-origin:50% 50%}   /* centred on the photo's knob (928.0, 996.5 on the 1402 x 1122 canvas) */
/* over the x-ray only (the photo stays clean): the progress line runs on the knob's own outline, a hot bead at its head,
   and a mark inside the rim for each stop, turning hot once passed. Nothing reaches past the knob, so the pot stays clear. */
.kr-ticks{opacity:0;transition:opacity .5s ease}
.kt{stroke:var(--ink);stroke-width:1.5;stroke-linecap:round;vector-effect:non-scaling-stroke;opacity:.55;transition:stroke .35s ease,stroke-width .2s ease,opacity .35s ease}
.kt.past{stroke:var(--hot);opacity:1}
.kt.hit{stroke-width:3.2;opacity:1;transition:none}
.kr-fill{fill:none;stroke:var(--hot);stroke-width:2.6;stroke-linecap:round;vector-effect:non-scaling-stroke;opacity:0;transition:opacity .5s ease;
  filter:drop-shadow(0 0 2.5px rgba(232,96,58,.7))}
.kr-head{fill:#FFF3EA;opacity:0;transition:opacity .5s ease;filter:drop-shadow(0 0 2px rgba(255,140,100,.95)) drop-shadow(0 0 5px rgba(217,72,43,.6))}
.dial-xray .kr-ticks,.dial-xray .kr-fill,.dial-xray .kr-head{opacity:1}
@keyframes pulse{0%{transform:scale(.96);opacity:0}26%{opacity:1}100%{transform:scale(1.34);opacity:0}}
.is-dialing .kr-track,.dial-on .kr-track{animation:none;opacity:0}
.knob-btn:focus-visible{outline:2px solid var(--ink);outline-offset:6px}
/* the knob's pointer, drawn so it can turn (the printed one is painted out of the cutouts) + the power light */
.dial-face{position:absolute;inset:0;z-index:2;width:100%;height:100%;pointer-events:none;overflow:visible}
.di-shadow{stroke:rgba(0,0,0,.42);stroke-width:6;stroke-linecap:round;fill:none}
.di-line{stroke:#F1F3F1;stroke-width:2.3;stroke-linecap:round;fill:none}
.led-glow{opacity:0;mix-blend-mode:screen}
.hold-hint{position:absolute;right:39.5%;top:88.81%;transform:translateY(-50%);   /* left of the dial */
  margin:0;white-space:nowrap;
  font:500 10.5px/1 var(--mono);letter-spacing:.12em;text-transform:uppercase;
  background:var(--ink);color:var(--paper);padding:9px 12px;border-radius:99px}
.hh-on{display:none}
.is-dialing .hh-idle,.dial-on .hh-idle{display:none}
.is-dialing .hh-on,.dial-on .hh-on{display:inline}

/* ---------- shared section bits ---------- */
.sticky{position:sticky;top:0;height:100vh;height:100svh;overflow:hidden}
.media{position:absolute;inset:0}
.media img{width:100%;height:100%;object-fit:cover;will-change:transform}
.eyebrow{font:500 11px/1 var(--mono);letter-spacing:.16em;text-transform:uppercase;margin:0 0 22px}
.huge{font:400 clamp(70px, 12.5vw, 240px)/.84 var(--serif);letter-spacing:-.035em;margin:0}
.macro .huge{font-size:clamp(54px, 8.75vw, 168px);line-height:.96}         /* generous editorial leading between Six streams. / Every grain. */
.cup .huge{line-height:.77}                                                /* First / cup. sit 8% closer */
.macro .body{margin-top:calc(clamp(8px, 1.36vw, 26px) + 30px)}             /* clear of the descenders (y, g), then a real gap */
.cup-copy .body{margin-top:calc(clamp(13px, 2.4vw, 46px) + 26px)}
.huge .ln{display:block}
.body{font-size:16px;line-height:1.5;max-width:36ch;margin:24px 0 0}

/* rain head */
.macro{height:140vh;position:relative;background:#140c07;color:var(--paper)}
.macro .media::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(14,8,4,.68) 0%,rgba(14,8,4,.26) 11%,rgba(14,8,4,0) 22%),linear-gradient(90deg,rgba(14,8,4,.72) 0%,rgba(14,8,4,.25) 45%,rgba(14,8,4,0) 70%),linear-gradient(0deg,rgba(14,8,4,.6),rgba(14,8,4,0) 45%)}
/* the rain head stays in view when the screen crops the photo: nearer the top on wide screens, right of centre on tall ones */
.macro .media img{object-position:50% 25%}
@media (max-aspect-ratio: 1/1){.macro .media img{object-position:62% 50%}}
.macro-copy{position:absolute;left:var(--gutter);bottom:9svh;z-index:2}

/* first cup */
.cup{height:140vh;position:relative;background:#D9B79C;color:var(--ink)}
.cup .media::after{content:"";position:absolute;inset:0;background:linear-gradient(180deg,rgba(243,234,222,.82) 0%,rgba(243,234,222,.44) 10%,rgba(243,234,222,0) 22%),radial-gradient(ellipse 60% 70% at 18% 20%,rgba(243,226,208,.55),rgba(243,226,208,0) 70%)}
.steam{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.cup-copy{position:absolute;left:var(--gutter);top:14svh;z-index:2}
.cup-copy .body{font:500 11px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;opacity:.7}

/* finishes */
.finishes{position:relative;background:linear-gradient(90deg,var(--bg-l) 0%,var(--bg-m) 48%,var(--bg-r) 100%);height:calc(100svh + 35svh)}   /* holds for a third of a screen */
.fin-stage{position:sticky;top:0;height:100vh;height:100svh;min-height:620px;overflow:hidden;isolation:isolate}
.fin-photos img{position:absolute;inset:0;z-index:1;opacity:0;transition:opacity .9s ease}
.fin-photos img.on{opacity:1}
.fin-name{--word-y:.358;position:absolute;left:0;right:0;top:calc(50% + 2.5svh - var(--boxH) / 2 + var(--boxH) * var(--word-y));margin:0;text-align:center;pointer-events:none;
  font:italic 400 clamp(96px, 22vw, 420px)/.8 var(--serif);letter-spacing:-.03em;color:var(--bg-ink);mix-blend-mode:multiply;
  transform:translateY(-92.6%);transition:color .9s ease}
.fin-ui{position:absolute;left:var(--gutter);right:var(--gutter);bottom:5svh;display:flex;align-items:flex-end;justify-content:space-between;gap:24px;z-index:3}
.fin-name span{display:inline-block}
.fin-meta{max-width:29ch}
@media (min-aspect-ratio: 1001/1000){.finishes{min-height:620px}.fin-meta{max-width:min(29ch, calc(50vw - var(--boxH) * 0.455 - var(--gutter) - 28px))}}
.fin-ui .eyebrow{margin:0 0 8px}
.fin-note{margin:0;font:400 clamp(17px, 1.35vw, 22px)/1.28 var(--serif);letter-spacing:-.005em;color:var(--ink);text-wrap:balance}
.swatches{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.swatches button{display:flex;align-items:center;gap:9px;border:1px solid rgba(30,26,23,.25);background:rgba(243,237,228,.72);
  border-radius:99px;padding:8px 14px 8px 8px;
  font:500 13px/1 var(--sans);color:var(--ink);cursor:pointer}
.swatches button i{width:20px;height:20px;border-radius:50%;background:var(--c);display:block}
.swatches button[aria-checked="true"]{background:var(--ink);color:var(--paper);border-color:var(--ink)}
.swatches button:focus-visible{outline:2px solid var(--ink);outline-offset:3px}

/* details (3-up macro triptych) */
.details{position:relative;background:#15110E;color:var(--paper);padding:clamp(88px, 12svh, 148px) var(--gutter) clamp(96px, 13svh, 156px)}
.det-inner{max-width:1520px;margin:0 auto}
.det-head{display:flex;justify-content:space-between;align-items:flex-end;gap:24px 48px;flex-wrap:wrap;margin-bottom:clamp(42px, 6svh, 68px)}
.det-head .eyebrow{margin:0 0 14px;color:rgba(243,237,228,.66)}
.det-title{font:400 clamp(42px, 4.8vw, 82px)/.94 var(--serif);letter-spacing:-.03em;margin:0;color:var(--paper)}
.det-lede{margin:0;max-width:34ch;font-size:15.5px;line-height:1.55;color:rgba(243,237,228,.74)}
.det-grid{display:grid;grid-template-columns:repeat(3, minmax(0, 1fr));gap:clamp(18px, 2vw, 28px)}
.det-card{margin:0;display:flex;flex-direction:column}
.det-frame{position:relative;aspect-ratio:4 / 3;overflow:hidden;border-radius:6px;background:#100C09;border:1px solid rgba(243,237,228,.11)}
.det-frame img{width:100%;height:100%;object-fit:cover;display:block}
@media (hover:hover) and (prefers-reduced-motion:no-preference){
  .det-frame img{transition:transform .9s cubic-bezier(.16,1,.3,1)}
  .det-card:hover .det-frame img{transform:scale(1.035)}
}
.det-cap{margin-top:18px;padding-top:14px;border-top:1px solid rgba(243,237,228,.13)}
.det-meta{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px;
  font:500 10.5px/1 var(--mono);letter-spacing:.14em;text-transform:uppercase;color:rgba(243,237,228,.62)}
.det-cap h3{margin:0 0 8px;font:400 clamp(24px, 1.9vw, 30px)/1.08 var(--serif);letter-spacing:-.015em;color:var(--paper)}
.det-cap p{margin:0;font-size:14.5px;line-height:1.5;color:rgba(243,237,228,.72);max-width:38ch}
@media (max-width:900px){
  .det-grid{grid-template-columns:1fr;gap:42px}
  .det-cap p{max-width:none}
}

/* reserve */
/* --pour-runway = extra scroll the page holds at the end while the word fills */
.reserve{--pour-runway:70svh;position:relative;background:#EDE5D9;height:calc(100vh + 70vh);height:calc(100svh + var(--pour-runway))}
.res-sticky{position:sticky;top:0;height:100vh;height:100svh;display:flex;flex-direction:column;padding:12svh var(--gutter) 28px;overflow:hidden}
.res-glass{position:relative;flex:1;min-height:0;margin-top:3svh;touch-action:pan-y}
.res-glass canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.res-top{display:flex;justify-content:space-between;align-items:flex-end;gap:32px;flex-wrap:wrap}
.res-head .eyebrow{margin:0 0 14px;color:var(--mute);line-height:1.45}
.res-line{font:400 clamp(44px, 5.2vw, 100px)/.92 var(--serif);letter-spacing:-.03em;margin:0}
.res-cta-wrap{position:relative;display:inline-flex;flex-direction:column;align-items:flex-end}
.res-btn{font:500 15px/1 var(--sans);background:var(--btn);background:color-mix(in oklab, var(--accent), #000 18%);color:var(--paper);text-decoration:none;padding:18px 24px;border-radius:99px;white-space:nowrap;transition:background-color .9s ease,transform .2s ease}
.res-btn:hover,.res-btn:focus-visible{transform:translateY(-1px)}
.res-btn:focus-visible{outline:2px solid var(--ink);outline-offset:4px}
.res-tip{position:absolute;bottom:calc(100% + 12px);right:0;margin:0;padding:9px 14px;border-radius:10px;
  background:var(--ink);color:var(--paper);font:500 10.5px/1.35 var(--mono);letter-spacing:.08em;text-transform:uppercase;white-space:nowrap;
  opacity:0;transform:translateY(4px);pointer-events:none;transition:opacity .24s ease,transform .24s ease;
  box-shadow:0 8px 24px rgba(30,26,23,.18)}
.res-tip span{text-decoration:underline;text-underline-offset:3px}
.res-cta-wrap:hover .res-tip,.res-cta-wrap:focus-within .res-tip{opacity:1;transform:translateY(0)}
@media (max-width:680px){.res-cta-wrap{align-items:flex-start}.res-tip{left:0;right:auto;white-space:normal;max-width:min(320px, calc(100vw - var(--gutter) * 2))}}
.res-foot{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px 16px;font:500 11px/1.4 var(--mono);letter-spacing:.12em;text-transform:uppercase;color:var(--mute);margin-top:24px}
.res-foot a{text-decoration:underline;text-underline-offset:3px;text-decoration-color:rgba(99,88,79,.45);transition:color .2s ease,text-decoration-color .2s ease}
.res-foot a:hover,.res-foot a:focus-visible{color:var(--ink);text-decoration-color:var(--ink)}

/* ---------- small screens ---------- */
@media (max-aspect-ratio: 1/1){
  :root{--boxH:102vw}
  .box{top:44svh;width:127.4vw}
  /* film: the machine gets the room first. Nav, then the word, then the machine, then the dial label and text; on short
     screens the word and the text give way. --below = space kept under the machine. The machine itself fills 3.8%-96.6%
     of its box (the .462 and .928 below). */
  .film{--wf:min(27vw, 13.5svh);--fs:min(30px, 4.5svh);--bm:5svh;--below:198px;
    --mt:calc(68px + var(--wf) * 1.04);
    --boxH:min(102vw, calc((100svh - var(--mt) - var(--below)) / .928));
    --slack:calc(100svh - var(--mt) - var(--below) - var(--boxH) * .928);
    --bc:calc(var(--mt) + var(--boxH) * .462 + var(--slack) * .75)}
  .film .box{top:var(--bc);width:calc(var(--boxH) * 1.24955)}
  .nav-links{display:none}
  .labels{display:none}
  .xray #leaders{display:none}   /* no labels on phones, so no lines pointing at them */
  br.wide{display:none}
  .giant{top:calc(var(--mt) + var(--slack) * .75 - var(--wf) * .68);font-size:var(--wf)}
  .g-watched{font-size:min(15vw, 7.2svh);top:calc(var(--mt) + var(--slack) * .75 - var(--wf) * .68)}
  .giant-photo{font-size:27vw}
  .giant-photo.hero-word{font-size:var(--wf);top:calc(var(--bc) - var(--boxH) * .462 - var(--wf) * .3)}  /* baseline just above the machine */
  .captions{left:var(--gutter);right:var(--gutter);width:auto;bottom:var(--bm)}
  .hero-sub,.ready-sub{bottom:var(--bm);left:var(--gutter);right:var(--gutter);max-width:none;text-align:left}
  .hero-sub .lede,.ready-sub .lede{font-size:var(--fs)}
  .ready-sub .lede{margin-bottom:0}   /* "First cup." is placed from the line count: no extra space under the lines */
  /* "First cup." too short to read behind the machine here: it sits in clear space above the closing line */
  .giant-photo.ready-word{top:auto;bottom:calc(var(--bm) + var(--fs) * 2.04 + 11px);left:var(--gutter);right:var(--gutter);text-align:left;font-size:min(19vw, 9.5svh);line-height:.9;transform:none}
  .scroll-cue{display:none}
  .knob-btn{width:11%;--kw:11}
  .hold-hint{left:66.19%;right:auto;top:99%;transform:translate(-50%,0);transition:opacity .4s}
  .is-ready .hold-hint{opacity:0 !important}
  /* glazes: name in clear space above the machine, swatches right under it, group centred */
  .finishes{--nav:72px;--off:max(0px, calc((100svh - var(--nav) - 140vw - 226px) / 2))}
  .finishes{height:auto}   /* phones: no hold (the stage can be taller than the screen); it still settles into place */
  .fin-stage{position:relative;min-height:100vh;min-height:100svh;height:auto}
  .finishes .box{top:calc(var(--nav) + var(--off) + 82vw)}
  .fin-name{top:calc(var(--nav) + var(--off));font-size:22.5vw;line-height:.9;transform:none}
  .fin-ui{position:relative;inset:auto;margin-inline:var(--gutter);padding:calc(var(--nav) + var(--off) + 140vw + 12px) 0 24px;flex-direction:column;align-items:flex-start;gap:12px}
  .fin-meta{max-width:none}
  .fin-note{font-size:18px}
  .swatches{display:grid;grid-template-columns:1fr 1fr;width:100%}   /* six glazes: three even rows of two */
  /* rain head: retain subtle top scrim on portrait so dark nav stays crisp over bright glass */
  .macro .media::after{background:linear-gradient(180deg,rgba(14,8,4,.62) 0%,rgba(14,8,4,.22) 10%,rgba(14,8,4,0) 20%),linear-gradient(0deg,rgba(14,8,4,.9) 0%,rgba(14,8,4,.66) 32%,rgba(14,8,4,0) 60%)}
  .macro-copy{bottom:7svh;right:var(--gutter)}
  /* first cup: warm haze behind the copy */
  .cup .media::after{background:radial-gradient(ellipse 120% 34% at 0% 20%,rgba(238,222,205,.93) 0%,rgba(238,222,205,.78) 45%,rgba(238,222,205,0) 100%)}
  .cup-copy .body{opacity:.9}
}

/* short phones (a real phone with the browser's bars showing): tighter text, so the machine stays large */
@media (max-aspect-ratio: 1/1) and (max-height: 700px){
  .film{--below:188px;--bm:3.5svh}
  .hero-sub .lede,.ready-sub .lede{margin-bottom:11px}
  .ready-sub .lede{margin-bottom:0}
  .cap-n{margin-bottom:8px}
  .cap h2{font-size:38px;margin-bottom:6px}
  .cap p{font-size:14.5px;line-height:1.4}
}
@media (max-aspect-ratio: 1/1) and (max-height: 600px){
  .film{--below:132px}
  .hero-sub .small{display:none}   /* very short screens: the headline alone (the Rain step says the rest) */
  .cap{right:0}
  .cap-n{position:absolute;right:0;top:9px;margin:0}   /* step number beside the title, not above it */
  .cap h2{font-size:32px}
  .cap p{font-size:14px}
  .dial-xray .hold-hint{opacity:0 !important}   /* the caption already names the step */
}

@media (prefers-reduced-motion: reduce){
  .scroll-cue i,.kr-track{animation:none}
}
