/* ————————————————————————————————————————————————
   One page. Three lines. Nothing to scroll.
   Solid #1e1e1e. Host Grotesk, self-hosted.
   ———————————————————————————————————————————————— */

@font-face {
  font-family: "Host Grotesk";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/host-grotesk-roman.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Host Grotesk";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/host-grotesk-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #1e1e1e;
  --bone: #f2ecdc;
  --font-display: "Host Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --pad: clamp(20px, 6vw, 96px);
}

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

html, body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--bg);
}

body {
  font-family: var(--font-display);
  font-weight: 400;
  color: var(--bone);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}

/* ---------- Stage ---------- */
.stage {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--pad);
}

/* ---------- The lines ---------- */
.line {
  max-width: 100%;
  font-size: 48px;
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.035em;
  text-align: center;
  color: var(--bone);
}

.line__quiet { opacity: 0.6; }
.line__key   { opacity: 1; }

.line em {
  font-style: italic;
  padding-right: 0.02em;
}

/* ---------- Heat map ----------
   heat.js paints Bencho's "Heat map" pass into a canvas laid over this line.
   The canvas *is* the visible type: a blurred, faded silhouette at rest, with
   the Pop heat following the pointer. The DOM text stays for a11y/selection
   and is only hidden once the canvas has actually painted (`.heat-ready`). */
.line__key {
  position: relative;
  display: inline-block;
}

.line__key.heat-ready {
  color: rgba(242, 236, 220, 0);
}

.line__key .heat {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* wrapped lines (very narrow screens) fall back to plain, visible type */
.line__key.no-heat {
  color: var(--bone);
}
.line__key.no-heat .heat {
  display: none;
}

/* `backwards` (not `both`): once the intro finishes its animated values are
   dropped, leaving no lingering filter/transform layer around the canvas. */
html.ready .line {
  animation: line-in 1.15s cubic-bezier(0.22, 0.72, 0.16, 1) 0.1s backwards;
}

/* ---------- Phones: keep the three authored lines, scale to fit ---------- */
@media (max-width: 640px) {
  .line {
    font-size: clamp(1.35rem, 7.5vw, 42px);
    line-height: 1.14;
    letter-spacing: -0.03em;
    max-width: none;
  }
}

/* ---------- Keyframes ---------- */
@keyframes line-in {
  from { opacity: 0; transform: translateY(14px); filter: blur(6px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0); }
}

/* ---------- Details ---------- */
::selection {
  background: var(--bone);
  color: var(--bg);
}

:focus-visible {
  outline: 1px solid rgba(242, 236, 220, 0.6);
  outline-offset: 8px;
  border-radius: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html.ready .line { animation: none; }
}
