/* The opening: the heat film. One field of dots, seven beats, driven by the page scroll (heat.js).
   Color is physics: grey dots are reflected light; orange and off-white dots are steel glowing.
   html.heat-on is set before first paint unless the visitor prefers reduced motion. Without it the opening and
   the seven beats read as a plain page over a still of the first heat field. */

.heat { position: relative; background: var(--black); color: var(--paper); }
.heat-track { position: relative; }
.heat-stage { position: relative; isolation: isolate; overflow: hidden; background: var(--black); }
.heat-field, .heat-rail { display: none; }

.heat-poster { position: absolute; inset: 0 0 auto 0; z-index: -1; height: 100vh; height: 100svh; }
.heat-poster img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}

/* ---------- Type ---------- */
.heat h1 {
  /* The opening headline is the machine's name, so it runs big. */
  font: 500 clamp(56px, 9.2vw, 160px)/0.9 var(--sans);
  letter-spacing: -0.055em;
  max-width: 11em;
  text-wrap: balance;
}
.heat-lead {
  max-width: 36ch;
  margin-top: clamp(14px, 1.6vw, 22px);
  font: 400 clamp(16px, 1.35vw, 20px)/1.45 var(--sans);
  letter-spacing: -0.01em;
  color: rgba(236, 232, 227, 0.92);
  text-wrap: pretty;
}
.heat .hero-actions { margin-top: clamp(22px, 3vw, 40px); }
.heat-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: clamp(16px, 2vw, 26px);
  font: 400 12px/1.5 var(--mono);
  color: var(--stone);
}
.heat-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--paper);
}
.heat-hint::before { content: ""; width: 28px; height: 1px; background: currentColor; }
.heat-y { margin: 0; font: 500 13px/1 var(--mono); letter-spacing: 0.12em; color: var(--paper); }
.heat-year {
  margin: 0;
  font: 500 clamp(56px, 8.6vw, 132px)/0.9 var(--mono);
  letter-spacing: -0.045em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  color: var(--paper);
}
.heat-line {
  margin: 0;
  max-width: 19em;
  font: 500 clamp(24px, 2.9vw, 46px)/1.1 var(--sans);
  letter-spacing: -0.035em;
  color: var(--paper);
  text-wrap: balance;
}
.heat-cred { margin: 0; max-width: 78ch; font: 400 12px/1.5 var(--mono); color: var(--stone); }

/* ---------- The meter: the hottest steel in frame, on the same scale as the brand's heat field ---------- */
.heat-readout {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  font: 500 12px/1.3 var(--mono);
}
.heat-cap { letter-spacing: 0.12em; text-transform: uppercase; color: var(--stone); }
.heat-temp { font-size: 14px; font-variant-numeric: tabular-nums; color: var(--paper); }
.heat-bar { position: relative; margin-top: 8px; }
.heat-bar img {
  display: block;
  width: 100%;
  height: 12px;
  outline: 1px solid var(--slate);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.heat-mark {
  position: absolute;
  top: -5px;
  left: 96.1%;
  width: 2px;
  height: 22px;
  margin-left: -2px;
  border: 1px solid var(--black);
  background: var(--paper);
}
.heat-ticks { position: relative; height: 16px; margin-top: 6px; font: 500 11px/16px var(--mono); color: var(--stone); }
.heat-ticks span { position: absolute; top: 0; }
.heat-ticks span:last-child { right: 0; }
.heat-legend p { display: flex; align-items: center; gap: 10px; margin: 0; font: 500 12px/1.6 var(--mono); color: var(--paper); }
.heat-swatch { display: block; flex: none; width: 7px; height: 7px; }

/* ---------- Film on ---------- */
.heat-on .heat-track { height: 700vh; height: 700svh; }
.heat-on .heat-stage { position: sticky; top: 0; height: 100vh; height: 100svh; }
.heat-on .heat-poster { display: none; }
.heat-on .heat-field {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
}
.heat-on .heat-hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0 var(--gutter) clamp(28px, 4.4vh, 48px);
  pointer-events: none;
}
/* The film's words sit over the opening's buttons and over each other, faded out or not, so they never take a click.
   Only links do, and heat.js makes inert whichever buttons have faded out. */
.heat-on .heat-hud a { pointer-events: auto; }
.heat-on .heat-open { position: absolute; left: var(--gutter); right: var(--gutter); bottom: clamp(28px, 4.4vh, 48px); max-width: 780px; }
.heat-on .heat-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "year" "line" "meter" "cred" "cta";
  row-gap: 10px;
}
.heat-on .heat-beats, .heat-on .heat-beat { display: contents; }
.heat-on .heat-y { display: none; }
.heat-on .heat-year { grid-area: year; opacity: 0; }
.heat-on .heat-line { grid-area: line; align-self: start; opacity: 0; }
.heat-on .heat-line sup a, .heat-on .heat-note sup a { pointer-events: none; }
.heat-on .heat-cred { grid-area: cred; align-self: end; opacity: 0; }
.heat-on .heat-meter { grid-area: meter; align-self: end; display: grid; margin-top: 8px; }
.heat-on .heat-scale, .heat-on .heat-legend { grid-area: 1 / 1; align-self: end; }
.heat-on .heat-legend { opacity: 0; }
/* The way in stays on screen through the whole film (the opening has its own). Off-white: the field is the heat. */
.heat-cta { display: none; }
.heat-on .heat-cta {
  grid-area: cta;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-height: 44px;
  margin-top: 6px;
  padding: 0 16px;
  background: var(--paper);
  color: var(--black);
  font: 500 15px/1 var(--sans);
  letter-spacing: -0.01em;
  opacity: 0;
  transition: background 0.2s;
}
.heat-on .heat-cta span { transition: transform 0.25s var(--ease); }
.heat-on .heat-cta:hover { background: var(--stone); }
.heat-on .heat-cta:hover span { transform: translate(3px, -3px); }
.heat-on .heat-rail {
  display: block;
  position: absolute;
  left: var(--gutter);
  right: var(--gutter);
  bottom: 12px;
  height: 1px;
  background: rgba(236, 232, 227, 0.16);
}
.heat-rail span { position: absolute; inset: 0; transform: scaleX(0); transform-origin: 0 50%; background: rgba(236, 232, 227, 0.85); }

@media (min-width: 900px) {
  .heat-on .heat-open { right: calc(var(--gutter) + 472px); }
  .heat-on .heat-grid {
    grid-template-columns: minmax(0, 1fr) minmax(300px, 424px);
    grid-template-areas: "year cta" "line meter" "cred cred";
    column-gap: 48px;
  }
  .heat-on .heat-meter { margin-top: 0; }
  .heat-on .heat-cta { justify-self: end; align-self: start; margin-top: 0; }
}

/* ---------- Film off: a plain page ---------- */
html:not(.heat-on) .heat-stage { padding: 0 var(--gutter) clamp(56px, 8vw, 104px); }
html:not(.heat-on) .heat-open { padding-top: max(56vh, 420px); padding-top: max(56svh, 420px); }
@media (min-width: 900px) {
  html:not(.heat-on) .heat-open { padding-top: max(66vh, 440px); padding-top: max(66svh, 440px); }
}
html:not(.heat-on) .heat-hint, html:not(.heat-on) .heat-year, html:not(.heat-on) .heat-meter { display: none; }
html:not(.heat-on) .heat-grid { max-width: 940px; margin-top: clamp(56px, 9vw, 120px); }
html:not(.heat-on) .heat-beats { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-dark); }
html:not(.heat-on) .heat-beat { display: grid; gap: 10px; padding: 24px 0; border-bottom: 1px solid var(--rule-dark); }
html:not(.heat-on) .heat-line { font-size: clamp(21px, 2.3vw, 32px); }
