/* Slake — one variable runs the page. --heat: 1 at the top (coals, scorch), 0 at the
   bottom (pour, frost). It is animated by the stage's view timeline; everything that
   changes register derives from it. Tokens and reasons live in DESIGN.md. */

@font-face {
  font-family: "Bodoni Moda";
  src: url("fonts/BodoniModa.woff2") format("woff2");
  font-weight: 400 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bodoni Moda";
  src: url("fonts/BodoniModa-Italic.woff2") format("woff2");
  font-weight: 400 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/Archivo-Italic.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: italic;
  font-display: swap;
}

@property --heat {
  syntax: "<number>";
  inherits: true;
  initial-value: 1;
}

:root {
  --scorch: #150703;
  --flame: #ff5a1f;
  --ginger: #f2b544;
  --frost: #eef5f7;
  --glacier: #0f6e93;
  --tarn: #0f2a36;
  --ash: #c9b9ae;
  --slate: #4c6470;

  --display: "Bodoni Moda", "Bodoni 72", Didot, Georgia, serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --t-wordmark: clamp(5.5rem, 22vw, 20rem);
  --t-display: clamp(2.6rem, 6.5vw, 6.5rem);
  --t-h2: clamp(2rem, 4vw, 3.5rem);
  --t-quote: clamp(1.25rem, 1.8vw, 1.6rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;
  --t-label: 0.8125rem;

  --gutter: clamp(16px, 2.5vw, 40px);
  --margin: max(clamp(16px, 5vw, 96px), env(safe-area-inset-left), env(safe-area-inset-right));
  --section: clamp(5rem, 12vh, 10rem);

  /* the mixes — the only places the two registers meet */
  --heat-pct: calc(var(--heat) * 100%);
  --surface: color-mix(in oklab, var(--scorch) var(--heat-pct), var(--frost));
  --ink: color-mix(in oklab, var(--ginger) var(--heat-pct), var(--tarn));
  --ink-strong: color-mix(in oklab, var(--flame) var(--heat-pct), var(--tarn));

  timeline-scope: --stage;
  /* the form and most of the page live in the cold (light) register; native controls follow that */
  color-scheme: light;
}

/* Native scroll-driven engine. Firefox gets the same value from site.js. */
@supports ((animation-timeline: view()) and (animation-range: entry)) {
  :root {
    animation: cool linear both;
    animation-timeline: --stage;
    animation-range: cover 30% cover 70%;
  }
}
@keyframes cool {
  from { --heat: 1; }
  to   { --heat: 0; }
}

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

html {
  background: var(--surface);
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* the fixed header must never sit over a focused or anchored element */
}
[id] { scroll-margin-top: 5rem; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--t-body);
  line-height: 1.55;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, p, figure, dl, dd, ol, ul { margin: 0; }
h2 { text-wrap: balance; }
p { text-wrap: pretty; }
ol, ul { padding: 0; list-style: none; }
img, video { display: block; max-width: 100%; }
a { color: inherit; }
a, button, input { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }

:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
}

.skip {
  position: fixed;
  top: 0.75rem;
  left: 50%;
  z-index: 20;
  translate: -50% -150%;
  padding: 0.75rem 1rem;
  background: var(--tarn);
  color: var(--frost);
  font-weight: 600;
  text-decoration: none;
}
.skip:focus-visible { translate: -50% 0; outline-color: var(--frost); }

/* ---------- the furnace: coals behind the whole heat register ---------- */

.furnace {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: var(--heat);
  pointer-events: none;
}
.furnace.is-off { visibility: hidden; }
.furnace__video,
.furnace__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
}
.furnace__poster { display: none; }

/* ---------- header ---------- */

.top {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem var(--margin);
  color: var(--ink);
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--surface), transparent 45%),
    transparent
  );
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
}
.wordmark:hover { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-thickness: 2px; }
.top__nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.5rem);
}
.top__motion {
  font: inherit;
  font-size: var(--t-small);
  font-weight: 500;
  color: inherit;
  background: none;
  border: 0;
  padding: 0.75rem 0;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
.top__motion:hover { text-decoration-thickness: 2px; }
.top__motion[hidden] { display: none; }
.top__link {
  font-size: var(--t-small);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  padding: 0.75rem 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}
.top__link:hover { text-decoration-thickness: 2px; }

main { position: relative; z-index: 1; }

/* ---------- hero (heat) ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-content: end;
  min-height: 100vh;
  padding: 8rem var(--margin) clamp(2rem, 5vh, 4rem);
  color: var(--ginger);
}
.hero::before {
  /* scrim so the descriptor and cue read over the coals; the wordmark reads on its own */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, color-mix(in oklab, var(--scorch), transparent 15%) 0%, transparent 55%);
  pointer-events: none;
}
.hero > * { position: relative; }
.hero__line {
  grid-column: 8 / -1;
  grid-row: 1;
  align-self: start;
  max-width: 34ch;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.4;
  color: var(--ash);
  margin-bottom: clamp(3rem, 12vh, 9rem);
}
.hero__mark {
  grid-column: 1 / -1;
  grid-row: 2;
  font-family: var(--display);
  font-weight: 900;
  font-size: var(--t-wordmark);
  line-height: 0.82;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  color: var(--flame);
  margin-left: -0.06em;
  overflow-wrap: normal;
}
.hero__cue {
  grid-column: 1 / 7;
  grid-row: 3;
  margin-top: 2rem;
  font-size: var(--t-small);
  font-weight: 500;
  color: var(--ash);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  width: max-content;
  min-height: 44px;
  padding: 0.5rem 0;
}
.hero__cue::before {
  content: "";
  width: 4rem;
  height: 1px;
  background: currentColor;
}
.hero__cue:hover { color: var(--ginger); }

/* ---------- the burn (heat) ---------- */

.burn {
  position: relative;
  padding: var(--section) var(--margin);
  color: var(--ash);
  background: linear-gradient(
    to bottom,
    color-mix(in oklab, var(--scorch), transparent 20%),
    color-mix(in oklab, var(--scorch), transparent 8%)
  );
}
.burn__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(3rem, 8vh, 6rem);
}
.burn__title {
  grid-column: 1 / 8;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--ginger);
  max-width: 16ch;
}
.burn__copy {
  grid-column: 1 / 7;
  max-width: 58ch;
  display: grid;
  gap: 1.25rem;
}
.burn__copy strong { font-weight: 600; color: var(--ginger); }

/* the label: condensed Archivo, hairline rules, name left / amount right — it's a list, not a spec sheet */
.label {
  grid-column: 8 / -1;
  grid-row: 1 / 3;
  align-self: start;
  font-stretch: 75%;
  font-size: var(--t-label);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: 0.01em;
  color: var(--ginger);
  border-top: 1px solid color-mix(in oklab, currentColor, transparent 60%);
}
.label__title {
  padding: 0.75rem 0;
  font-weight: 700;
  border-bottom: 1px solid color-mix(in oklab, currentColor, transparent 78%);
}
.label__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid color-mix(in oklab, currentColor, transparent 78%);
}
.label__row dd { text-align: right; font-variant-numeric: tabular-nums; }
.label__note {
  padding-top: 0.75rem;
  color: var(--ash);
  font-weight: 400;
  max-width: 30ch;
}

/* the four seconds — a real timed sequence, so the markers are earned */
.seconds {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 2rem;
  border-top: 1px solid color-mix(in oklab, var(--ginger), transparent 60%);
  padding-top: 2rem;
}
.seconds__title {
  grid-column: 1 / -1;
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 2.2vw, 2rem);
  color: var(--ginger);
}
.seconds__item {
  display: grid;
  gap: 0.75rem;
  align-content: start;
  max-width: 28ch;
}
.seconds__t {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 3.2vw, 3rem);
  line-height: 1;
  color: var(--flame);
  font-variant-numeric: tabular-nums;
}
.seconds__t small {
  font-size: 0.45em;
  font-weight: 500;
  font-family: var(--text);
  margin-left: 0.15em;
  color: var(--ginger);
}

/* ---------- the stage: coals → pour, scorch → frost ---------- */

.stage {
  position: relative;
  height: 300vh;
  view-timeline: --stage block;
}
.stage__pin {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: clip;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  align-content: center;
  padding: 0 var(--margin);
}
.pour,
.pour-poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 50%; /* crop the left edge of ice, keep the black void on the right for the headline */
  opacity: calc(1 - var(--heat));
}
.pour-poster { display: none; }
.stage__scrim {
  /* keeps the headline legible over both clips regardless of where the glass lands */
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom, rgb(0 0 0 / 0.55) 0%, rgb(0 0 0 / 0.25) 40%, transparent 65%);
}
.stage__frost {
  /* the frost bloom: cold light rising from the bottom as the heat leaves */
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: calc(1 - var(--heat));
  background:
    radial-gradient(120% 70% at 50% 110%, color-mix(in oklab, var(--frost), transparent 20%) 0%, transparent 60%),
    linear-gradient(to top, var(--frost) 0%, transparent 38%);
}
.stage__title {
  position: relative;
  grid-column: 8 / -1;
  font-family: var(--display);
  font-weight: 700;
  font-size: var(--t-display);
  line-height: 0.95;
  letter-spacing: -0.015em;
  display: grid;
}
.stage__title > span {
  grid-area: 1 / 1;
  align-self: start;
}
.stage__a {
  color: var(--flame);
  /* gone by heat 0.55 */
  opacity: clamp(0, calc((var(--heat) - 0.55) / 0.35), 1);
}
.stage__b {
  /* the cold line sits on the clip's black void, so it's frost, not tarn (tarn on black is 1.5:1) */
  color: var(--frost);
  opacity: clamp(0, calc((0.45 - var(--heat)) / 0.35), 1);
}
.stage__note {
  position: relative;
  grid-column: 8 / 12;
  margin-top: 1.5rem;
  max-width: 34ch;
  color: color-mix(in oklab, var(--frost), transparent 15%);
  opacity: clamp(0, calc((0.45 - var(--heat)) / 0.35), 1);
}

/* ---------- cold register ---------- */

.cold {
  padding: var(--section) var(--margin);
  color: var(--slate);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(3rem, 8vh, 6rem);
}
.cold__title {
  grid-column: 1 / 8;
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-h2);
  line-height: 1.02;
  letter-spacing: -0.01em;
  color: var(--tarn);
  max-width: 18ch;
}
.cold__copy {
  grid-column: 1 / 7;
  max-width: 58ch;
  display: grid;
  gap: 1.25rem;
}
.cold__copy strong { font-weight: 600; color: var(--tarn); }
.facts {
  grid-column: 8 / -1;
  grid-row: 1 / 3;
  align-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  row-gap: 2.5rem;
}
.facts__item {
  border-top: 1px solid color-mix(in oklab, var(--tarn), transparent 70%);
  padding-top: 1rem;
  display: grid;
  gap: 0.35rem;
  max-width: 26ch;
}
.facts__item dt {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.5rem, 2.4vw, 2.25rem);
  line-height: 1.05;
  color: var(--tarn);
}
.facts__item dd { font-size: var(--t-small); }

/* ---------- people: scattered moments on the frost ---------- */

.people {
  padding: var(--section) var(--margin) calc(var(--section) * 0.6);
  color: var(--slate);
}
.people__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-h2);
  line-height: 1.02;
  color: var(--tarn);
  max-width: 20ch;
  margin-bottom: clamp(3rem, 8vh, 6rem);
}
.moments {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: clamp(2rem, 5vh, 4rem);
}
.moment {
  display: grid;
  gap: 1rem;
  align-content: start;
  position: relative;
}
.moment__img {
  aspect-ratio: 3 / 2;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.moment__q {
  font-family: var(--display);
  font-style: italic;
  font-weight: 500;
  font-size: var(--t-quote);
  line-height: 1.25;
  color: var(--tarn);
  max-width: 30ch;
}
.moment__who {
  font-size: var(--t-small);
  font-weight: 500;
}

/* the composition: sizes vary, a few overlap, two tilt. Placed by hand, not by a masonry script. */
.moment--1 { grid-column: 1 / 6; }
.moment--2 { grid-column: 7 / 13; margin-top: clamp(4rem, 14vh, 12rem); }
.moment--3 { grid-column: 4 / 9; margin-top: -3rem; z-index: 2; rotate: -1.2deg; }
.moment--4 { grid-column: 10 / 13; margin-top: 2rem; }
.moment--5 { grid-column: 1 / 4; margin-top: -2rem; }
.moment--6 { grid-column: 5 / 10; margin-top: 4rem; rotate: 1deg; z-index: 2; }
.moment--7 { grid-column: 9 / 13; margin-top: -5rem; }
.moment--8 { grid-column: 2 / 7; margin-top: 3rem; }
.moment--2 .moment__img, .moment--6 .moment__img { aspect-ratio: 16 / 10; }
.moment--4 .moment__img, .moment--5 .moment__img, .moment--7 .moment__img { aspect-ratio: 4 / 5; }
.moment--4 .moment__img { object-position: 60% 40%; }

/* ---------- order ---------- */

.order {
  padding: var(--section) var(--margin);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
  row-gap: 2.5rem;
  color: var(--slate);
  border-top: 1px solid color-mix(in oklab, var(--tarn), transparent 80%);
}
.order__lead {
  grid-column: 1 / 7;
  display: grid;
  gap: 2.5rem;
  align-content: start;
}
.order__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: var(--t-h2);
  line-height: 1.02;
  color: var(--tarn);
  max-width: 16ch;
}
.order__price {
  display: grid;
  gap: 0.5rem;
  max-width: 44ch;
}
.order__price strong { font-weight: 600; color: var(--tarn); }
.order__form {
  grid-column: 8 / -1;
  align-self: start;
  display: grid;
  gap: 1.75rem;
}
.field { display: grid; gap: 0.35rem; }
.field label { font-size: var(--t-small); font-weight: 500; color: var(--tarn); }
.field input {
  font: inherit;
  color: var(--tarn);
  background: transparent;
  border: 0;
  border-bottom: 1px solid color-mix(in oklab, var(--tarn), transparent 60%);
  border-radius: 0;
  height: 3rem;
  padding: 0;
  width: 100%;
  min-width: 0;
}
.field input:focus { outline: none; border-bottom: 2px solid var(--glacier); }
.field input:focus-visible { outline: 2px solid var(--tarn); outline-offset: 4px; }
.field input:user-invalid { border-bottom: 2px solid var(--tarn); }
.field__hint { font-size: var(--t-small); color: var(--slate); }
.field input:user-invalid ~ .field__hint::before { content: "Check this. "; font-weight: 600; color: var(--tarn); }
.button {
  justify-self: start;
  font: inherit;
  font-weight: 600;
  font-stretch: 110%;
  color: var(--frost);
  background: var(--glacier);
  border: 0;
  border-radius: 0;
  padding: 1rem 1.5rem;
  min-height: 44px;
  min-width: 44px;
  cursor: pointer;
}
.button:hover { background: color-mix(in oklab, var(--glacier), black 8%); }
.button:focus-visible { outline: 2px solid var(--tarn); outline-offset: 4px; }
.button:active { translate: 0 1px; }
.button:disabled { opacity: 0.45; cursor: default; }
.order__done {
  color: var(--tarn);
  max-width: 40ch;
}
.order__done:empty { display: none; }

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

.foot {
  padding: 3rem var(--margin) 4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  color: var(--slate);
  font-size: var(--t-small);
}
.foot .wordmark { color: var(--tarn); }

/* ---------- motion preference ---------- */

@media (prefers-reduced-motion: reduce) {
  /* the register still changes with scroll position (that's state, not motion);
     the autoplaying footage does not — posters stand in */
  .furnace__video, .pour { display: none; }
  .furnace__poster, .pour-poster { display: block; }
}

/* ---------- narrow screens ---------- */

@media (max-width: 900px) {
  .hero__line { grid-column: 1 / -1; margin-bottom: clamp(2rem, 8vh, 5rem); max-width: 30ch; }
  .hero__cue { grid-column: 1 / -1; }
  .burn__title, .burn__copy, .label { grid-column: 1 / -1; grid-row: auto; }
  .label { max-width: 34rem; }
  .seconds { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage__title, .stage__note { grid-column: 1 / -1; }
  .stage__pin { align-content: start; padding-top: 22vh; }
  .pour, .pour-poster { object-position: 34% 50%; }
  .cold__title, .cold__copy, .facts { grid-column: 1 / -1; grid-row: auto; }
  .order__lead, .order__form { grid-column: 1 / -1; }
  .moment { rotate: none !important; margin-top: 0 !important; z-index: auto !important; }
  .moment--1, .moment--3, .moment--5, .moment--8 { grid-column: 1 / 11; }
  .moment--2, .moment--4, .moment--6, .moment--7 { grid-column: 3 / 13; }
  .moment--4 .moment__img, .moment--5 .moment__img, .moment--7 .moment__img { aspect-ratio: 3 / 2; }
}
@media (max-width: 560px) {
  .hero { min-height: calc(100vw * 1.85); padding-top: 6rem; }
  .seconds { grid-template-columns: minmax(0, 1fr); }
  .hero__mark { font-size: clamp(4.6rem, 27vw, 8rem); }
}
