/* ==========================================================================
   Ember & Oak Roasters — one continuous film
   tokens · base · chrome (nav, HUD) · stage · hero · pour · roast · bag · cup
   · subscribe · footer · responsive · reduced motion
   ========================================================================== */

@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-vf-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("../assets/fonts/fraunces-vf-italic-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans-vf-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../assets/fonts/dm-mono-400-latin.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "DM Mono";
  src: url("../assets/fonts/dm-mono-500-latin.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}

:root {
  /* colour */
  --paper: #efe6d8;
  --paper-2: #e4d8c5;
  --ink: #1b1410;
  --ink-2: #3a2c23;
  --ember: #c4501e;
  --crema: #d9a873;
  --night: #120c09;
  --mute-d: rgba(239, 230, 216, 0.74);
  --mute-l: rgba(27, 20, 16, 0.7);
  --hair-d: rgba(239, 230, 216, 0.26);
  --hair-l: rgba(27, 20, 16, 0.24);
  --error: #eba27a;

  /* type */
  --f-display: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Arial, system-ui, sans-serif;
  --f-mono: "DM Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  /* grid */
  --gutter: clamp(20px, 4.4vw, 72px);
  --gap: clamp(12px, 1.6vw, 24px);
  --col: calc((100vw - 2 * var(--gutter) - 11 * var(--gap)) / 12);
  --vh: 1vh;

  /* motion */
  --ease-out: cubic-bezier(0.22, 0.61, 0.24, 1);
  --ease-film: cubic-bezier(0.65, 0.05, 0.2, 1);

  /* chrome colour (nav + HUD), switched per scene */
  --chrome: var(--ink);

  /* the die-cut window on the bag, shared with the cup portal */
  --wx: 58vw;
  --wy: 16vh;
  --ww: 27vw;
  --wh: 68vh;
}

@supports (height: 100svh) {
  :root { --vh: 1svh; }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--night);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 400 1.0625rem/1.55 var(--f-body);
  color: var(--ink);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, dl, dd, ol, figure { margin: 0; }
ol { padding: 0; list-style: none; }
img, canvas, svg { display: block; }
.roast__photo picture, .label__window picture, .cup__beans picture, .order__arch picture { display: contents; }
a { color: inherit; }
em { font-style: italic; }

::selection { background: var(--ember); color: var(--paper); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: fixed;
  left: var(--gutter);
  top: 12px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--ink);
  color: var(--paper);
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 0.3s var(--ease-out);
}
.skip:focus { transform: none; }

:focus-visible { outline: 2px solid var(--crema); outline-offset: 3px; }

/* shared type */

.eyebrow {
  font: 500 12px/1.4 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.eyebrow--ember { color: var(--crema); }

.display {
  font-family: var(--f-display);
  font-weight: 340;
  font-variation-settings: "opsz" 144, "SOFT" 60, "WONK" 0;
  line-height: 0.84;
  letter-spacing: -0.04em;
  text-wrap: balance;
}
.display em {
  font-weight: 300;
  letter-spacing: -0.03em;
}

.beat__body {
  font-size: 1.0625rem;
  line-height: 1.55;
  max-width: 36ch;
  text-wrap: pretty;
}

.lede {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 380;
  font-variation-settings: "opsz" 72, "SOFT" 100;
  font-size: clamp(26px, 2.6vw, 42px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  max-width: 30ch;
}

/* grain: static, one layer, no blend */
.grain {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 1'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- chrome: nav + HUD ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 22px var(--gutter);
  color: var(--chrome);
  transition: color 0.6s var(--ease-out), opacity 0.5s var(--ease-out);
}
.nav.is-off { opacity: 0; pointer-events: none; }

.nav__mark {
  justify-self: start;
  font-family: var(--f-display);
  font-weight: 560;
  font-variation-settings: "opsz" 36, "SOFT" 100, "WONK" 1;
  font-size: 21px;
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.nav__mark em { font-weight: 400; color: var(--ember); }

.nav__loc {
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.8;
}

.nav__cta {
  justify-self: end;
  position: relative;
  padding: 12px 18px 11px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out);
}
.nav__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--ember);
  transform: translateY(101%);
  transition: transform 0.45s var(--ease-film);
}
.nav__cta:hover { color: var(--paper); border-color: var(--ember); }
.nav__cta:hover::before { transform: none; }

.hud {
  position: fixed;
  right: var(--gutter);
  bottom: 22px;
  z-index: 40;
  width: 196px;
  color: var(--chrome);
  font: 500 12px/1.3 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-variant-numeric: tabular-nums;
  transition: color 0.6s var(--ease-out), opacity 0.5s var(--ease-out);
}
.hud.is-off { opacity: 0; }
.hud.is-ready [data-hud="time"] { color: var(--crema); }
.hud.is-ready .hud__bar i { background: var(--crema); }
.hud__row { display: flex; justify-content: space-between; gap: 12px; }
.hud__row:first-child { justify-content: flex-start; gap: 10px; }
.hud__num { opacity: 0.7; }
.hud__read {
  margin-top: 8px;
  font-size: 19px;
  letter-spacing: 0.01em;
  text-transform: none;
}
.hud__bar {
  height: 1px;
  margin-top: 10px;
  background: color-mix(in srgb, currentColor 28%, transparent);
}
.hud__bar i {
  display: block;
  height: 1px;
  background: var(--ember);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

/* ---------- the film ---------- */

.film {
  position: relative;
  background: var(--night);
}

.stage {
  position: sticky;
  top: 0;
  height: calc(100 * var(--vh));
  margin-bottom: calc(-100 * var(--vh));
  overflow: hidden;
  z-index: 0;
  background: var(--night);
}

.track { pointer-events: none; }
.track--hero { height: 120vh; }
.track--pour { height: 420vh; }
.track--roast { height: 290vh; }
.track--bag { height: 270vh; }
.track--cup { height: 230vh; }

.layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.js .layer--roast,
.js .layer--bag,
.js .layer--cup,
.js .beat {
  visibility: hidden;
  opacity: 0;
}

.seq {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
/* one grade for all footage: warm, a touch of density, no neon */
.seq,
.seq-poster img {
  filter: sepia(0.2) saturate(0.88) contrast(1.05);
}
#seq-cup { filter: sepia(0.3) saturate(1.05) hue-rotate(-6deg) contrast(1.15) brightness(0.88); }
.seq-poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 50%;
}

/* ---------- opening: the name as a window ---------- */

.hero {
  position: absolute;
  inset: 0;
  z-index: 5;
  color: var(--ink);
}
.hero__svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.js .hero__svg { visibility: hidden; }
.js .hero.is-set .hero__svg { visibility: visible; }

.hero__paper { fill: var(--paper); }
.hero__fill { fill: var(--paper-2); }
.hero__t {
  font-family: var(--f-display);
  font-weight: 900;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  letter-spacing: -0.045em;
}
.hero__t2 {
  font-style: italic;
  font-weight: 640;
  letter-spacing: -0.02em;
}

.hero__meta {
  position: absolute;
  left: var(--gutter);
  bottom: clamp(28px, 6vh, 64px);
  width: min(36ch, calc(3 * var(--col) + 2 * var(--gap)));
  color: var(--ink-2);
}
.hero__sub {
  font-size: 1.0625rem;
  line-height: 1.5;
  text-wrap: pretty;
}
.hero__cue {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
}
.hero__cue-line {
  width: 44px;
  height: 1px;
  background: var(--ember);
  transform-origin: 0 50%;
  animation: cue 2.6s var(--ease-film) infinite;
}
@keyframes cue {
  0% { transform: scaleX(0); transform-origin: 0 50%; }
  48% { transform: scaleX(1); transform-origin: 0 50%; }
  52% { transform: scaleX(1); transform-origin: 100% 50%; }
  100% { transform: scaleX(0); transform-origin: 100% 50%; }
}

.hero__origin {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  font: 500 12px/1 var(--f-mono);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-2);
  writing-mode: vertical-rl;
  transform: translateY(-50%) rotate(180deg);
}
.js .hero__meta { opacity: 0; }
.hero__origin { display: none; }
/* Paper until the name is set, so the footage never flashes before the window exists. */
.js .hero:not(.is-set) { background: var(--paper); }

/* ---------- I–II · the pour ---------- */

.layer--pour { z-index: 1; background: var(--night); }

.pour__shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(56% 60% at 90% 26%, rgba(18, 12, 9, 0.62), rgba(18, 12, 9, 0) 72%),
    linear-gradient(to top, rgba(18, 12, 9, 0.78) 0%, rgba(18, 12, 9, 0.2) 38%, rgba(18, 12, 9, 0) 55%),
    linear-gradient(to right, rgba(18, 12, 9, 0.45) 0%, rgba(18, 12, 9, 0) 40%);
  opacity: 0;
}

.beat { position: absolute; color: var(--paper); }
.beat .eyebrow { color: var(--mute-d); margin-bottom: 18px; }
.beat .beat__body { color: var(--mute-d); margin-top: 26px; }

.beat--dose {
  left: var(--gutter);
  bottom: clamp(44px, 10vh, 110px);
  width: calc(5 * var(--col) + 4 * var(--gap));
}
.beat--pour {
  right: var(--gutter);
  top: 27vh;
  width: calc(5 * var(--col) + 4 * var(--gap));
  text-align: right;
}
.beat--pour .beat__body { margin-left: auto; text-align: left; }

/* soft local scrims: the type carries its own shadow over bright footage */
.beat--dose,
.beat--pour,
.bloom__text { isolation: isolate; }
.beat--dose::before,
.beat--pour::before,
.bloom__text::before {
  content: "";
  position: absolute;
  inset: -24% -18%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(22, 15, 11, 0.55), rgba(22, 15, 11, 0.32) 55%, rgba(22, 15, 11, 0));
}

.display--dose,
.display--pour {
  font-size: clamp(96px, 17vw, 320px);
  margin-left: -0.04em;
}
.display--pour { margin: 0 -0.02em 0 0; }

.beat--bloom { inset: 0; }
.display--bloom {
  --wght: 200;
  --soft: 0;
  position: absolute;
  left: var(--gutter);
  bottom: clamp(36px, 7vh, 80px);
  margin-left: -0.05em;
  font-size: clamp(110px, 21vw, 380px);
  font-weight: var(--wght);
  font-variation-settings: "opsz" 144, "SOFT" var(--soft), "WONK" 1;
  line-height: 0.8;
  letter-spacing: -0.045em;
  white-space: nowrap;
}
.bloom__text {
  position: absolute;
  right: var(--gutter);
  top: 17vh;
  width: calc(3 * var(--col) + 2 * var(--gap));
}
.bloom__text .beat__body { margin-top: 18px; }

/* ---------- III · Ember: the roast log ---------- */

.layer--roast {
  --r: -30%;
  z-index: 2;
  background: var(--night);
  color: var(--paper);
  -webkit-mask-image: radial-gradient(circle at 50% 58%, #000 var(--r), transparent calc(var(--r) + 28%));
  mask-image: radial-gradient(circle at 50% 58%, #000 var(--r), transparent calc(var(--r) + 28%));
}
.layer--roast.is-open { -webkit-mask-image: none; mask-image: none; }

.roast__photo {
  position: absolute;
  inset: -8% 0;
  will-change: transform;
}
.roast__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 45%;
  filter: sepia(0.18) saturate(0.82) brightness(0.84) contrast(1.05);
}
.roast__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to right, rgba(18, 12, 9, 0.9) 0%, rgba(18, 12, 9, 0.62) 42%, rgba(18, 12, 9, 0.5) 100%),
    linear-gradient(to top, rgba(18, 12, 9, 0.85) 0%, rgba(18, 12, 9, 0) 50%);
}

.roast__head {
  position: absolute;
  left: var(--gutter);
  top: 14vh;
  width: calc(7 * var(--col) + 6 * var(--gap));
}
.roast__head .eyebrow { color: var(--crema); margin-bottom: 20px; }
.roast__head .beat__body {
  margin-top: 28px;
  color: var(--mute-d);
  max-width: 34ch;
}
.display--ember {
  font-size: clamp(96px, 16.5vw, 300px);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 30, "WONK" 1;
  margin-left: -0.05em;
}

.roast__log {
  position: absolute;
  right: var(--gutter);
  bottom: 96px;
  width: calc(6 * var(--col) + 5 * var(--gap));
}
.roast__chart {
  position: relative;
  aspect-ratio: 1000 / 400;
  margin-bottom: 104px;
}
.roast__chart svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.roast__grid line {
  stroke: var(--hair-d);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.roast__grid .roast__base { stroke: rgba(239, 230, 216, 0.5); }
.roast__ghost {
  fill: none;
  stroke: rgba(239, 230, 216, 0.28);
  stroke-width: 1;
  stroke-dasharray: 2 5;
  vector-effect: non-scaling-stroke;
}
.roast__curve {
  fill: none;
  stroke: var(--ember);
  stroke-width: 2.5;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.roast__axis {
  position: absolute;
  right: 18px;
  top: var(--y);
  transform: translateY(-140%);
  font: 400 12px/1 var(--f-mono);
  letter-spacing: 0.08em;
  color: rgba(239, 230, 216, 0.55);
}
.roast__probe {
  position: absolute;
  left: 0;
  top: 0;
  width: 11px;
  height: 11px;
  margin: -5.5px 0 0 -5.5px;
  border-radius: 50%;
  background: var(--paper);
  box-shadow: 0 0 0 4px rgba(196, 80, 30, 0.35), 0 0 18px 4px rgba(196, 80, 30, 0.45);
  opacity: 0;
  will-change: transform;
}

.roast__events li {
  --drop: 44px;
  position: absolute;
  left: var(--x);
  top: var(--y);
  bottom: calc(-1 * var(--drop));
  border-left: 1px dashed rgba(239, 230, 216, 0.3);
  opacity: 0;
}
.roast__events li:nth-child(even) { --drop: 92px; }
.roast__events li::before {
  content: "";
  position: absolute;
  left: -4.5px;
  top: -4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--night);
  border: 1.5px solid var(--crema);
}
.roast__events li > span {
  position: absolute;
  left: 9px;
  bottom: 0;
  white-space: nowrap;
  font: 400 13px/1.35 var(--f-mono);
  letter-spacing: 0.06em;
}
.roast__events .ev__n {
  bottom: 17px;
  color: var(--paper);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.roast__events .ev__t { color: var(--mute-d); }
.roast__events .ev__v { left: 60px; color: var(--crema); }
.roast__events .ev--drop { border-left: 0; border-right: 1px dashed rgba(239, 230, 216, 0.3); width: 0; }
.roast__events .ev--drop::before { left: auto; right: -4.5px; background: var(--ember); border-color: var(--ember); }
.roast__events .ev--drop > span { left: auto; right: 9px; text-align: right; }
.roast__events .ev--drop .ev__t { right: 70px; }
.roast__events .ev--drop .ev__v { left: auto; right: 9px; }

.roast__cap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 18px;
  padding-top: 12px;
  border-top: 1px solid var(--hair-d);
  font: 400 13px/1.3 var(--f-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute-d);
}
.roast__cap span:last-child { color: rgba(239, 230, 216, 0.5); }

/* ---------- IV · the bag ---------- */

.layer--bag {
  z-index: 3;
  color: var(--ink);
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255, 250, 240, 0.55), rgba(255, 250, 240, 0) 60%),
    radial-gradient(90% 80% at 90% 100%, rgba(120, 90, 60, 0.12), rgba(120, 90, 60, 0) 70%),
    var(--paper);
  clip-path: circle(0% at 90% 20%);
}

.label { position: absolute; inset: 0; }
/* paper fibre: one static tile, rasterised once */
.label::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.55 .09' numOctaves='2' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .38 0 0 0 0 .28 0 0 0 0 .19 2.4 0 0 0 -1.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  background-size: 260px 260px;
}

.label__rule::before {
  /* the debossed edge: light catches the lower lip of the pressed rule */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: rgba(255, 252, 244, 0.7);
}
.label__rule {
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  top: 11vh;
  display: flex;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 12px;
  border-top: 1.5px solid var(--ink);
  font: 500 12px/1.3 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.label__title {
  position: absolute;
  left: var(--gutter);
  top: 19vh;
  width: calc(7 * var(--col) + 6 * var(--gap));
}
.label__origin {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 400;
  font-variation-settings: "opsz" 72, "SOFT" 100, "WONK" 1;
  font-size: clamp(30px, 3.4vw, 56px);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--ember);
  margin: 0 0 0.08em 0.06em;
}
.label__name {
  font-family: var(--f-display);
  font-weight: 760;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 0;
  font-size: clamp(110px, 19vw, 340px);
  line-height: 0.8;
  letter-spacing: -0.05em;
  margin-left: -0.05em;
}

.label__slot {
  position: absolute;
  left: var(--gutter);
  top: 64vh;
  width: calc(6 * var(--col) + 5 * var(--gap));
  height: 20vh;
}
.slot {
  position: absolute;
  inset: 0 0 auto 0;
  visibility: hidden;
  opacity: 0;
}
.slot--specs {
  display: grid;
  grid-template-columns: repeat(5, auto);
  justify-content: space-between;
  gap: 18px 28px;
  padding-top: 14px;
  border-top: 1px solid var(--hair-l);
}
.slot dt {
  font: 500 12px/1.3 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute-l);
  margin-bottom: 8px;
}
.slot dd { margin: 0; font-size: 1.125rem; line-height: 1.3; font-weight: 500; }

.slot--notes .eyebrow { color: var(--mute-l); margin-bottom: 10px; }
.notes {
  font-family: var(--f-display);
  font-style: italic;
  font-weight: 360;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: clamp(40px, 5vw, 86px);
  line-height: 0.98;
  letter-spacing: -0.025em;
}
.notes span { color: var(--ember); }

.slot--recipe {
  display: grid;
  grid-template-columns: repeat(4, auto);
  justify-content: space-between;
  gap: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--hair-l);
}
.slot--recipe dd {
  font-family: var(--f-display);
  font-weight: 420;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(38px, 4.6vw, 80px);
  line-height: 0.95;
  letter-spacing: -0.035em;
  font-variant-numeric: lining-nums;
}

.label__foot {
  position: absolute;
  left: var(--gutter);
  bottom: 30px;
  font: 500 12px/1.3 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute-l);
}

.label__window,
.cup__beans {
  position: absolute;
  left: var(--wx);
  top: var(--wy);
  width: var(--ww);
  height: var(--wh);
  overflow: hidden;
  background: var(--night);
}
.label__window {
  border-radius: 999px 999px 0 0;
  box-shadow: 0 0 0 1px rgba(27, 20, 16, 0.18), 0 1px 0 1px rgba(255, 255, 255, 0.35);
}
.label__window::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 10px 22px rgba(0, 0, 0, 0.55), inset 0 0 0 1px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}
.label__window img,
.cup__beans img {
  position: absolute;
  left: 0;
  top: -8%;
  width: 100%;
  height: 116%;
  object-fit: cover;
  object-position: 50% 82%;
  filter: sepia(0.14) saturate(0.9) contrast(1.05);
  will-change: transform;
}

/* ---------- V · the cup ---------- */

.layer--cup {
  z-index: 4;
  background: var(--night);
  color: var(--paper);
}
.cup__beans { z-index: 1; }
/* Roast-brown multiply over the footage: the steel mugs and counter take the palette. */
.cup__tone {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: #7a4a28;
  mix-blend-mode: multiply;
  opacity: 0.22;
}
.cup__shade {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to right, rgba(18, 12, 9, 0.7) 0%, rgba(18, 12, 9, 0.25) 42%, rgba(18, 12, 9, 0) 60%),
    linear-gradient(to top, rgba(18, 12, 9, 0.6) 0%, rgba(18, 12, 9, 0) 40%);
  opacity: 0;
}
.cup__copy {
  position: absolute;
  z-index: 3;
  left: var(--gutter);
  bottom: clamp(48px, 13vh, 130px);
  width: calc(5 * var(--col) + 4 * var(--gap));
  visibility: hidden;
  opacity: 0;
}
.cup__copy .eyebrow { color: var(--crema); margin-bottom: 20px; }
.cup__copy .beat__body { margin-top: 26px; color: var(--mute-d); }
.display--cup {
  font-size: clamp(64px, 7.4vw, 136px);
  line-height: 0.9;
}
.display--cup em { color: var(--crema); }

/* ---------- the resolution: subscribe ---------- */

.subscribe {
  position: relative;
  z-index: 2;
  min-height: calc(100 * var(--vh));
  padding: 19vh var(--gutter) 11vh;
  color: var(--paper);
  background: linear-gradient(to bottom,
    rgba(18, 12, 9, 0) 0%,
    rgba(18, 12, 9, 0.2) 30%,
    rgba(18, 12, 9, 0.6) 64%,
    var(--night) 100%);
}
.nav__loc { transition: opacity 0.5s ease; }
.nav.is-quiet .nav__loc { opacity: 0; }
/* The form is the call to action now; the nav's shortcut to it steps back. */
.nav.is-quiet .nav__cta { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity 0.5s ease, visibility 0s 0.5s; }
.subscribe__panel { position: relative; isolation: isolate; }
.subscribe__panel::before {
  content: "";
  position: absolute;
  inset: -14% -12% -10%;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(closest-side, rgba(18, 12, 9, 0.72), rgba(18, 12, 9, 0.45) 60%, rgba(18, 12, 9, 0));
}
.subscribe__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  align-items: end;
}
.subscribe__intro { grid-column: 1 / span 6; }
.subscribe__intro .eyebrow { margin-bottom: 22px; }
.subscribe__intro .beat__body { margin-top: 30px; color: var(--mute-d); }
.display--sub {
  font-size: clamp(76px, 10.4vw, 190px);
  font-weight: 320;
  line-height: 0.86;
}
.display--sub em { color: var(--crema); font-weight: 300; }

.subscribe__panel { grid-column: 8 / span 5; }
/* Side by side, the two columns share a top line (eyebrow / first choice) and a
   bottom line (body copy / fine print). */
@media (min-width: 1101px) {
  .subscribe__grid { align-items: stretch; }
  .subscribe__intro { display: flex; flex-direction: column; }
  .subscribe__intro .beat__body { margin-top: auto; padding-top: 30px; }
}

.order { display: grid; gap: 22px; }
.field { border: 0; margin: 0; padding: 0; min-width: 0; }
.field__label {
  display: block;
  padding: 0;
  margin-bottom: 12px;
  font: 500 12px/1.2 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute-d);
}

.seg {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--hair-d);
  border-radius: 3px;
  overflow: hidden;
}
.seg--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg__opt { position: relative; cursor: pointer; }
.seg__opt + .seg__opt { border-left: 1px solid var(--hair-d); }
.seg__opt input {
  position: absolute;
  inset: 0;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.seg__opt span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 8px 12px;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  color: var(--mute-d);
  transition: background-color 0.35s var(--ease-out), color 0.35s var(--ease-out);
}
.seg__opt:hover span { color: var(--paper); background: rgba(239, 230, 216, 0.06); }
.seg__opt input:checked + span { background: var(--paper); color: var(--ink); }
.seg__opt input:focus-visible + span { outline: 2px solid var(--crema); outline-offset: -5px; }

.input {
  width: 100%;
  padding: 10px 0 12px;
  border: 0;
  border-bottom: 1px solid rgba(239, 230, 216, 0.42);
  border-radius: 0;
  background: transparent;
  color: var(--paper);
  font: 400 22px/1.3 var(--f-body);
  outline: none;
  transition: border-color 0.3s var(--ease-out);
}
.input::placeholder { color: rgba(239, 230, 216, 0.36); }
.input:focus { border-bottom-color: var(--crema); }
.input:-webkit-autofill {
  -webkit-text-fill-color: var(--paper);
  transition: background-color 9999s;
}
.is-invalid .input { border-bottom-color: var(--error); }
.field__msg {
  min-height: 1.5em;
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.5;
  color: var(--error);
}
.is-valid .field__msg { color: var(--mute-d); }

/* the bag you are ordering: the label's arch, carried to the button */
.order__bag {
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: end;
  gap: 22px;
  padding-top: 22px;
  border-top: 1px solid var(--hair-d);
}
.order__arch {
  display: block;
  width: 84px;
  aspect-ratio: 6 / 7;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  background: var(--ink-2);
  box-shadow: 0 0 0 1px var(--hair-d);
}
.order__arch img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: sepia(0.2) saturate(0.88) contrast(1.05);
}
.order__bag p { display: grid; gap: 6px; }
.order__kicker {
  font: 500 12px/1.2 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--crema);
}
.order__line { font-size: 1.0625rem; line-height: 1.4; color: var(--mute-d); }
.order__line strong {
  display: block;
  font-family: var(--f-display);
  font-weight: 500;
  font-variation-settings: "opsz" 72, "SOFT" 50;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--paper);
}

.btn {
  --mx: 50%;
  --my: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 70px;
  padding: 0 28px;
  border: 0;
  border-radius: 3px;
  background: var(--ember);
  color: #fff5ec;
  font: 600 1.125rem/1 var(--f-body);
  letter-spacing: 0.005em;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: background-color 0.3s var(--ease-out), transform 0.6s var(--ease-out);
}
.btn__light {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(255, 214, 168, 0.5), rgba(255, 214, 168, 0) 62%);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out);
}
.btn:hover .btn__light,
.btn:focus-visible .btn__light { opacity: 1; }
.btn__arrow {
  font-family: var(--f-body);
  font-size: 22px;
  transition: transform 0.5s var(--ease-out);
}
.btn:hover .btn__arrow { transform: translateX(6px); }
.btn:active { background-color: #ad4417; }
.btn:focus-visible { outline: 2px solid var(--crema); outline-offset: 4px; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn__arrow { animation: busy 0.9s linear infinite; }
@keyframes busy { to { transform: translateX(6px); opacity: 0.2; } }

.fine { font-size: 15px; line-height: 1.5; color: var(--mute-d); }

.done { padding-top: 6px; }
.done:focus { outline: none; }
.done .eyebrow { margin-bottom: 18px; }
.done__title {
  font-family: var(--f-display);
  font-weight: 340;
  font-variation-settings: "opsz" 144, "SOFT" 60;
  font-size: clamp(40px, 4vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.done__title em { color: var(--crema); }
.done .beat__body { margin-top: 22px; color: var(--mute-d); }
.done strong { color: var(--paper); font-weight: 600; }
.link {
  margin-top: 26px;
  padding: 0 0 4px;
  border: 0;
  border-bottom: 1px solid currentColor;
  background: none;
  color: var(--paper);
  font: 500 12px/1.3 var(--f-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
}

/* ---------- footer ---------- */

.foot {
  position: relative;
  z-index: 2;
  padding: 14vh var(--gutter) 30px;
  background: var(--night);
  color: var(--paper);
  border-top: 1px solid rgba(239, 230, 216, 0.1);
}
.foot__mark {
  margin: 0 0 9vh -0.05em;
  font-family: var(--f-display);
  font-weight: 820;
  font-variation-settings: "opsz" 144, "SOFT" 100, "WONK" 1;
  font-size: 16.2vw;
  line-height: 0.8;
  letter-spacing: -0.055em;
  white-space: nowrap;
}
.foot__mark em { font-weight: 560; color: var(--ember); letter-spacing: -0.02em; }
.foot__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
  padding-top: 26px;
  border-top: 1px solid var(--hair-d);
}
.foot__grid > div { grid-column: span 3; }
.foot__grid > div:last-child { grid-column: 9 / span 4; }
.foot__grid .eyebrow { color: rgba(239, 230, 216, 0.6); margin-bottom: 12px; }
.foot__grid p:not(.eyebrow) { color: var(--mute-d); }
.foot__grid a { text-decoration-thickness: 1px; text-underline-offset: 4px; }
.foot__grid a:hover { color: var(--crema); }
.foot__legal {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12vh;
  font: 400 12px/1.3 var(--f-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(239, 230, 216, 0.6);
}
.foot__legal a { text-decoration: none; }
.foot__legal a:hover { color: var(--paper); }

/* ---------- tablet ---------- */

@media (max-width: 1100px) {
  :root { --wx: 56vw; --wy: 20vh; --ww: 36vw; --wh: 58vh; }
  .beat--dose, .beat--pour { width: calc(7 * var(--col) + 6 * var(--gap)); }
  .bloom__text { width: calc(4 * var(--col) + 3 * var(--gap)); }
  .roast__head .beat__body { max-width: 28ch; }
  .label__rule { top: 12vh; }
  .label__title { top: 20vh; }
  .label__name { font-size: 18vw; }
  .label__slot { width: calc(6 * var(--col) + 5 * var(--gap)); top: 60vh; }
  .slot--specs { grid-template-columns: repeat(3, auto); justify-content: start; }
  .subscribe__intro { grid-column: 1 / span 12; }
  .subscribe__panel { grid-column: 1 / span 9; margin-top: 7vh; }
  .subscribe__grid { align-items: start; }
  .foot__grid > div,
  .foot__grid > div:last-child { grid-column: span 4; }
}

/* ---------- phone ---------- */

@media (max-width: 760px) {
  :root {
    --gutter: 20px;
    --wx: 22vw;
    --wy: calc(33 * var(--vh));
    --ww: 56vw;
    --wh: calc(30 * var(--vh));
  }

  .nav { padding: 16px var(--gutter); grid-template-columns: 1fr auto; }
  .nav__loc { display: none; }
  .nav__mark { font-size: 19px; }
  .nav__cta { padding: 10px 14px 9px; }

  .hud { width: 150px; bottom: 14px; }
  .hud__read { font-size: 16px; margin-top: 6px; }
  .hud__row:first-child { font-size: 12px; }

  .track--hero { height: 100vh; }
  .track--pour { height: 360vh; }
  .track--roast { height: 250vh; }
  .track--bag { height: 240vh; }
  .track--cup { height: 200vh; }

  .hero__meta { width: calc(100vw - 2 * var(--gutter)); bottom: 88px; }
  .hero__sub { max-width: 30ch; }
  .hero__origin { display: none; }

  .beat--dose,
  .beat--pour {
    left: var(--gutter);
    right: var(--gutter);
    width: auto;
  }
  .beat--dose { bottom: 92px; }
  .beat--pour { top: auto; bottom: 92px; }
  .display--dose, .display--pour { font-size: 27vw; }
  .beat .beat__body { margin-top: 18px; max-width: 32ch; }
  .display--bloom { font-size: 26vw; bottom: 92px; }
  .bloom__text { left: var(--gutter); right: var(--gutter); top: 10vh; width: auto; }
  .pour__shade {
    background:
      linear-gradient(to bottom, rgba(18, 12, 9, 0.82) 0%, rgba(18, 12, 9, 0.55) 30%, rgba(18, 12, 9, 0) 50%),
      linear-gradient(to top, rgba(18, 12, 9, 0.8) 0%, rgba(18, 12, 9, 0.22) 40%, rgba(18, 12, 9, 0) 58%);
  }
  .lede { font-size: 30px; }

  .roast__head { top: 11vh; width: auto; right: var(--gutter); }
  .roast__head .eyebrow { margin-bottom: 14px; }
  .roast__head .beat__body { margin-top: 18px; }
  .display--ember { font-size: 27vw; }
  .roast__log { left: var(--gutter); right: var(--gutter); width: auto; bottom: 76px; }
  .roast__chart { margin-bottom: 132px; }
  .roast__events li { --drop: 40px; }
  .roast__events li:nth-child(even) { --drop: 84px; }
  .roast__events li:nth-child(4) { --drop: 126px; }
  /* Phone: temperatures live on the axis; late events hang to the left of their line. */
  .roast__events .ev__v { display: none; }
  .roast__events .ev--drop .ev__t { right: 9px; }
  .roast__events li:nth-child(4) > span { left: auto; right: 9px; text-align: right; }
  .roast__cap span:nth-child(2) { display: none; }

  .label__rule { top: 9.5vh; }
  .label__rule span:first-child { display: none; }
  .label__title { top: 17vh; width: auto; right: var(--gutter); }
  .label__origin { font-size: 26px; }
  .label__name { font-size: 24vw; }
  .label__slot { top: calc(66 * var(--vh)); left: var(--gutter); right: var(--gutter); width: auto; height: 20vh; }
  .slot--specs { grid-template-columns: repeat(3, auto); gap: 14px 18px; justify-content: start; }
  .slot dd { font-size: 1.0625rem; }
  .notes { font-size: 40px; }
  .slot--recipe { grid-template-columns: repeat(4, auto); }
  .slot--recipe dd { font-size: 34px; }
  .label__foot { display: none; }

  .cup__copy { left: var(--gutter); right: var(--gutter); width: auto; bottom: 100px; }
  .display--cup { font-size: 15vw; }
  .cup__shade {
    background:
      linear-gradient(to bottom, rgba(18, 12, 9, 0.55) 0%, rgba(18, 12, 9, 0) 16%),
      linear-gradient(to top, rgba(18, 12, 9, 0.9) 0%, rgba(18, 12, 9, 0.5) 45%, rgba(18, 12, 9, 0) 70%);
  }

  .subscribe {
    padding: 22vh var(--gutter) 10vh;
    background: linear-gradient(to bottom,
      rgba(18, 12, 9, 0) 0%,
      rgba(18, 12, 9, 0.62) 14%,
      rgba(18, 12, 9, 0.9) 32%,
      var(--night) 56%);
  }
  .subscribe__panel::before { display: none; }
  .subscribe__panel { grid-column: 1 / -1; }
  .order__bag { border-top: 0; padding-top: 2px; }
  .display--sub { font-size: 20vw; }
  .seg__opt span { min-height: 52px; padding: 8px 6px; }
  .btn { padding: 0 22px; }

  .foot { padding-top: 10vh; }
  .foot__grid { grid-template-columns: 1fr; gap: 28px; }
  .foot__grid > div,
  .foot__grid > div:last-child { grid-column: 1; }
  .foot__legal { flex-direction: column; margin-top: 8vh; }
}

/* ---------- without JavaScript: a readable stack ---------- */

.no-js .stage { position: relative; height: auto; margin: 0; overflow: visible; }
.no-js .layer { position: relative; height: 100vh; }
.no-js .hero { display: none; }
.no-js .track { display: none; }
.no-js .beat--pour,
.no-js .beat--bloom { display: none; }

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .hero__cue-line { animation: none; transform: scaleX(1); }
  .btn, .btn__arrow, .nav__cta::before { transition: none; }
}
