/* ==========================================================================
   VibeBrass landing — the OVVO landing language, in the 2026 palette.
   Paper, forest ink, one deep jade, a mist band, tight Jakarta headings with a
   single Instrument Serif italic word, and a real product shot in a soft white frame.
   Two widths only: 720 (layout) and 1040 (navigation).

   BRAND, in one line each (full rules: AGENTS.md Rule 17 and brand/MARK-RULES.md):
   · Palette — paper #f7f4ee, ink #16211c, stone #eae6dc, mist #d5e3da, jade #146b52,
     soft jade #9cc4b5 (large type on ink only, 1.74 on paper so never there).
     Tokens keep their old names: --bone is now paper, --stone stone, --wash mist,
     --signal jade, --signal-deep deep jade.
   · The mark is SOFT (blur 1.45% of its own width) at 40px and wider, SHARP below 40px.
     The nav mark is 26px, therefore sharp, with no blur.
   · The wordmark is NEVER blurred, at any size.
   · The logo with text is the official one. The mark alone is the everyday one:
     favicon, app icon, avatar, tab, anything where the name is written next to it.
     Here the favicon is the mark alone; the header carries the mark with VIBE.
   ========================================================================== */

:root {
  --ink: #16211c;
  --ink-2: #223028;
  --bone: #f7f4ee;
  --stone: #eae6dc;
  --wash: #d5e3da;
  --peach: #f2ece0;
  --mint: #e6efe8;
  --signal: #146b52;
  --signal-deep: #0f5540;
  --signal-hover: #0c4635;
  --jade-mid: #3f8b72;
  --jade-pale: #9cc4b5;
  --teal: #3f8b72;
  --sage: #9cc4b5;
  --hair: rgba(22, 33, 28, 0.12);
  --hair-soft: rgba(22, 33, 28, 0.06);
  --muted: rgba(22, 33, 28, 0.72);
  --quiet: rgba(22, 33, 28, 0.68);
  --on-ink: rgba(247, 244, 238, 0.72);
  --on-ink-quiet: rgba(247, 244, 238, 0.55);
  --hair-ink: rgba(247, 244, 238, 0.16);

  --shell: 1280px;
  --pad: clamp(22px, 4.6vw, 64px);

  --font-display: "Plus Jakarta Sans", Inter, system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --shadow-xl: 0 50px 110px -60px rgba(22, 33, 28, 0.6), 0 12px 30px -22px rgba(22, 33, 28, 0.25);
  --shadow-card: 0 26px 60px -46px rgba(22, 33, 28, 0.55);
  --ease: cubic-bezier(0.22, 0.75, 0.2, 1);
  --radius: 24px;
  --radius-sm: 16px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bone);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.022;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.7'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

img,
svg {
  display: block;
  max-width: 100%;
}

p,
h1,
h2,
h3,
ul,
li {
  margin: 0;
  padding: 0;
}

ul {
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

::selection {
  background: var(--signal);
  color: #fff;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 999px;
}

.skip {
  position: fixed;
  top: -100px;
  left: 10px;
  z-index: 200;
  padding: 14px 18px;
  background: var(--ink);
  color: var(--bone);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: top 0.2s var(--ease);
}
.skip:focus-visible {
  top: 10px;
}

.shell {
  width: min(var(--shell), 100% - var(--pad) * 2);
  margin-inline: auto;
}

/* Jumping to a section must not park its heading under the fixed bar. */
section[id] {
  scroll-margin-top: 96px;
}

/* Tight tracking also tightens the space between words, which at display sizes
   runs "in one" together into "inone". The word space is given back. */
h1,
h2,
.section-title,
.method-title {
  word-spacing: 0.18em;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}

/* ------------------------------------------------------------------ nav */

.nav {
  /* Sticky, not fixed: it takes its own strip of the page, so nothing can ride under it
     and no telephone browser can lose it. Fully opaque paper at every width — the mist
     hero behind it must never show through. (His order, 21 November 2026.) */
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bone);
  border-bottom: 1px solid var(--hair);
  transition: box-shadow 0.25s var(--ease);
}
.nav.is-scrolled {
  background: var(--bone);
  box-shadow: 0 10px 30px -24px rgba(22, 33, 28, 0.5);
}

.nav-inner {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 30px;
  height: 78px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-height: 44px;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}

/* The mark: the drawn globe, ink on paper. 26px, so sharp — never blur it here. */
.wordmark-mark {
  width: 28px;
  height: 28px;
  flex: none;
  color: var(--ink);
  filter: none;
}

/* The full logo in the header, both lines. Rule 17.10 asks for VIBE with BRASS under it at
   every width, so BRASS is carried and made readable rather than dropped: the pixel face at
   9px, tight enough to stay inside VIBE's width and heavy enough not to read as a row of dots. */
.lockup {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
}
.lockup-vibe {
  font-family: "Pixelify Sans", var(--font-mono);
  font-size: 24px;
  font-weight: 400;
  letter-spacing: 0.055em;
  line-height: 0.92;
}
/* The full logo in the header, both lines, at his order of 21 November 2026:
   "The logo is incomplete (VIBE only)". BRASS is spread letter by letter so it is exactly
   as wide as VIBE, and it is never blurred (Rule 17.7).

   The face matters here: a pixel face at this size has one pixel per stroke, so at 7.5px in
   BBH Bogle and again at 9px in Pixelify Sans the word read as a row of dashes at both widths.
   The display face at 8.5px is the one that reads as five letters, and the rule asks for a
   readable name more than it asks for a matching face. */
.lockup-name {
  display: flex;
  justify-content: space-between;
  margin-top: 0.1em;
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
}

@media (max-width: 719.98px) {
  /* The phone keeps both lines too; 8px is the smallest the word still reads at. */
  .lockup-name {
    font-size: 8px;
  }
}
.nav-links {
  display: flex;
  gap: 26px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a {
  position: relative;
  padding-block: 12px;
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 6px;
  height: 2px;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a:hover::after {
  transform: scaleX(1);
}

.nav-more {
  display: none;
}

@media (max-width: 719.98px) {
  .nav-more {
    display: block;
    position: relative;
    margin-left: 8px;
  }
  .nav-more > summary {
    list-style: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--hair);
    border-radius: 999px;
    background: #fff;
  }
  .nav-more > summary::-webkit-details-marker {
    display: none;
  }
  .nav-more > summary svg {
    width: 20px;
    height: 20px;
  }
  .nav-sheet {
    position: absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 190px;
    display: grid;
    gap: 2px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--hair-soft);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    z-index: 30;
  }
  .nav-sheet a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 12px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
  }
  .nav-sheet a:hover {
    background: var(--bone);
  }
}

.nav-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 20px;
}

.nav-live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--quiet);
}

.nav-cta {
  /* It never wraps and never shrinks below its own text. */
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.nav-cta:hover {
  background: var(--ink);
  color: var(--bone);
  border-color: var(--ink);
}

/* ----------------------------------------------------------------- hero */

.hero {
  position: relative;
  padding-top: clamp(48px, 5.2vw, 72px);
  padding-bottom: clamp(52px, 6vw, 84px);
  /* Chosen by the founder on 19 November 2026: the hero sits on the jade wash,
     not on bone. Everything else stays bone paper. */
  background: var(--wash);
  overflow: hidden;
  isolation: isolate;
}

.hero-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* The hero's WebGL object: a jade wireframe globe sitting behind the product
   card. It is decoration, so it never catches a tap and never sits over text. */
.hero-scene {
  position: absolute;
  top: 46%;
  right: -4%;
  transform: translateY(-50%);
  width: min(80vw, 1100px);
  aspect-ratio: 1;
  opacity: 0.85;
  pointer-events: none;
  z-index: 2;
  /* Fades out at the edges so the globe never reaches the bar or the copy. */
  -webkit-mask-image: radial-gradient(circle at 72% 48%, #000 30%, transparent 64%);
  mask-image: radial-gradient(circle at 72% 48%, #000 30%, transparent 64%);
}

.hero-disc {
  position: absolute;
  z-index: 1;
  top: -18vw;
  right: -10vw;
  width: min(58vw, 820px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(
    circle at 34% 28%,
    #f2f9f5 0%,
    #ddefe7 42%,
    #d8ece3 62%,
    var(--wash) 82%
  );
  opacity: 0.95;
}

.hero-ring {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.6);
}
.hero-ring--a {
  top: -22vw;
  right: -14vw;
  width: min(70vw, 1000px);
  aspect-ratio: 1;
}
.hero-ring--b {
  top: -26vw;
  right: -18vw;
  width: min(82vw, 1180px);
  aspect-ratio: 1;
  border-color: rgba(22, 33, 28, 0.07);
}

.hero-inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quiet);
}

.hero-title {
  margin-top: 26px;
  font-size: clamp(2.9rem, 6.5vw, 6.4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.065em;
}
.hero-line {
  display: block;
}
.hero-title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.02em;
  color: var(--signal);
}

.lede {
  margin-top: 26px;
  max-width: 44ch;
  font-size: 17px;
  line-height: 1.68;
  color: var(--muted);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 500;
  transition: transform 0.2s var(--ease), background 0.2s var(--ease), color 0.2s var(--ease),
    border-color 0.2s var(--ease);
}
.btn:hover {
  transform: translateY(-1px);
}
.btn--fill {
  background: var(--signal-deep);
  border-color: var(--signal-deep);
  color: #fff;
}
.btn--fill:hover {
  background: var(--signal-hover);
  border-color: var(--signal-hover);
}
.btn--ghost {
  background: #fff;
  border-color: var(--hair);
  color: var(--ink);
}
.btn--ghost:hover {
  border-color: var(--ink);
}
.btn--on-ink {
  background: transparent;
  border-color: var(--hair-ink);
  color: var(--bone);
}
.btn--on-ink:hover {
  border-color: var(--bone);
}

.trust {
  margin-top: 20px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--quiet);
  text-wrap: balance;
}
.trust--on-ink {
  color: var(--on-ink-quiet);
}

/* the product shot */

.hero-art {
  position: relative;
}

.shot {
  position: relative;
  border-radius: 22px;
  background: #fff;
  border: 1px solid var(--hair-soft);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.shot-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--hair-soft);
  background: color-mix(in srgb, var(--bone) 60%, #fff);
}
.shot-dots {
  display: inline-flex;
  gap: 5px;
}
.shot-dots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(22, 33, 28, 0.16);
}
.shot-bar .mono {
  letter-spacing: 0.06em;
  text-transform: none;
}
.shot-bar .state {
  margin-left: auto;
}

.shot-body {
  padding: 20px;
}

.route {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 26px;
  grid-template-areas:
    "from rail"
    "to rail";
  row-gap: 14px;
  align-items: center;
}
.route-field {
  grid-area: from;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border: 1px solid var(--hair-soft);
  border-radius: 12px;
  background: var(--bone);
}
.route-field + .route-rail + .route-field {
  grid-area: to;
}
.route-field strong {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.route-rail {
  grid-area: rail;
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding-block: 14px;
}
.route-rail .line {
  position: absolute;
  top: 22px;
  bottom: 22px;
  width: 2px;
  background: rgba(22, 33, 28, 0.14);
}
.route-rail .node {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: #fff;
  z-index: 1;
}
.route-rail .node--end {
  border-radius: 2px;
  background: var(--ink);
}

.trips {
  margin-top: 16px;
  border-top: 1px solid var(--hair-soft);
}
.trips li {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--hair-soft);
}
.trip-time {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
}
.trip-mid {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.trip-mid strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.trip-mid span {
  font-size: 13px;
  color: var(--quiet);
}
.trip-dur {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal-deep);
}

.shot-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-top: 14px;
}

.shot-caption {
  margin-top: 16px;
  text-align: right;
}

/* hero stats */

.hero-stats {
  position: relative;
  z-index: 1;
  margin-top: clamp(36px, 4.5vw, 56px);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stats li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 22px;
  background: #fff;
  border: 1px solid var(--hair-soft);
  border-radius: 999px;
  box-shadow: 0 18px 40px -34px rgba(22, 33, 28, 0.45);
}
.stat-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--quiet);
}
.stat-value {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* -------------------------------------------------------------- marquee */

.marquee {
  overflow: hidden;
  background: var(--wash);
  border-block: 1px solid rgba(22, 33, 28, 0.07);
  padding-block: 14px;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 48s linear infinite;
}
.marquee-track span {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(22, 33, 28, 0.72);
  padding-right: 18px;
  white-space: nowrap;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}

/* ------------------------------------------------------------- sections */

.section {
  /* Re-measured in phase 1: at 1440 the old 148px top and bottom was 296px of empty colour on
     every band, which read as a slab rather than as a pause. */
  padding-block: clamp(68px, 7.2vw, 108px);
}
.section--bone {
  background: var(--bone);
}
.section--stone {
  background: var(--stone);
}
.section--wash {
  background: var(--wash);
}
.section--ink {
  background: var(--ink);
  color: var(--bone);
}

.section-head {
  position: relative;
  max-width: 800px;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--quiet);
}
.kicker--on-ink {
  color: var(--on-ink-quiet);
}

.section-title {
  margin-top: 20px;
  font-size: clamp(2.2rem, 5.1vw, 4.4rem);
  font-weight: 700;
  line-height: 0.99;
  letter-spacing: -0.06em;
}
.section-title em,
.finale-title em,
.method-title em {
  margin-inline: 0.04em -0.02em;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--signal);
}
.method-title em {
  color: #a9c9db;
}

.lead {
  margin-top: 22px;
  max-width: 58ch;
  font-size: 17px;
  line-height: 1.68;
  color: var(--muted);
}
.lead--on-ink {
  color: var(--on-ink);
}


/* --------------------------------------------------------------- bento */

.bento {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: clamp(40px, 5vw, 64px);
}

/* ---- the showroom: real screens of the running app, at their own size ----
   Nothing here is redrawn. Each file is a picture taken of the app while it ran, in a window
   that names the address it came from, with a sentence about what is on it. */
.showroom {
  margin: clamp(48px, 5.6vw, 82px) 0 0;
}
.showroom-head {
  max-width: 780px;
}
.showroom-title {
  margin-top: 14px;
  font-size: clamp(1.9rem, 3.4vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.showroom-lede {
  margin-top: 14px;
  max-width: 64ch;
  font-size: 16px;
  line-height: 1.6;
  color: var(--muted);
}
.showroom-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 30px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--hair);
}
.showroom-facts li {
  display: flex;
  align-items: baseline;
  gap: 8px;
}
.showroom-facts b {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.03em;
}
.showroom-facts span {
  font-size: 12.5px;
  color: var(--muted);
}
.showroom-windows {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(18px, 2.2vw, 30px);
  margin-top: clamp(26px, 3.4vw, 46px);
}
.window {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--hair-soft);
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.window--lead {
  grid-column: 1 / -1;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--hair-soft);
  background: color-mix(in srgb, var(--bone) 70%, #fff);
}
.window-dots {
  display: inline-flex;
  gap: 5px;
}
.window-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--hair);
}
.window-url {
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.window-live {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--signal-deep);
}
.window img {
  display: block;
  width: 100%;
  height: auto;
}
.window-cap {
  padding: 14px 16px 18px;
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--muted);
}
.window-cap b {
  color: var(--ink);
  font-weight: 600;
}

.window picture {
  display: block;
}

@media (max-width: 719.98px) {
  /* The windows stack, and each one is the width of the phone: a screen captured at this size
     is read at this size, which is the one place a 1440-wide picture would turn into noise. */
  .showroom-windows {
    grid-template-columns: 1fr;
  }
  .window-cap {
    font-size: 13px;
  }
  .window-url,
  .window-live {
    font-size: 11px;
  }
  .showroom-facts b {
    font-size: 22px;
  }
}

.card {
  grid-column: span 4;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 34px 70px -44px rgba(22, 33, 28, 0.5);
}
.card--wide {
  grid-column: span 7;
}
.card--tall {
  grid-column: span 5;
}
.card--blue {
  background: var(--wash);
}
.card--sand {
  background: linear-gradient(170deg, #fbf3e8 0%, #f2e8d8 100%);
}
.card--mint {
  background: var(--mint);
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  font-size: 23px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.035em;
}
.card h3 em {
  margin-inline: 0.03em -0.01em;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.14em;
  letter-spacing: -0.005em;
  color: var(--signal-deep);
}

.card p {
  font-size: 15px;
  line-height: 1.66;
  color: var(--muted);
}

.card-name {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.card-meta {
  margin-top: -6px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

.state {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(22, 33, 28, 0.06);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
  white-space: nowrap;
}
.state--live {
  background: var(--mint);
  color: var(--signal-hover);
}
.state--early {
  background: rgba(246, 239, 229, 0.9);
  color: #7a5c3d;
}
.state--planned {
  background: transparent;
  border: 1px dashed var(--hair);
  color: var(--quiet);
}

/* specimens inside cards */

.mini {
  margin-top: auto;
  padding: 16px 18px 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 33, 28, 0.07);
  border-radius: var(--radius-sm);
}
.mini-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
}
.mini-row strong {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  /* At the narrow desktop widths a station name has no room for one line, so it
     wraps. Truncating it to "Amsterdam Ce..." read as a broken card. */
  min-width: 0;
  white-space: normal;
  overflow-wrap: break-word;
}
.mini-time {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--signal-deep);
}
.mini-rail {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid rgba(22, 33, 28, 0.07);
}
.mini-rail i {
  height: 3px;
  border-radius: 2px;
  background: rgba(22, 33, 28, 0.14);
}
.mini-rail i:nth-child(1) {
  width: 34%;
  background: var(--signal);
}
.mini-rail i:nth-child(2) {
  width: 22%;
  background: var(--teal);
}
.mini-rail i:nth-child(3) {
  flex: 1;
}

.specimen {
  margin-top: auto;
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.specimen--sand {
  position: relative;
  height: 130px;
  background: linear-gradient(180deg, #fdf6ec 0%, #f0e3cf 100%);
  border: 1px solid rgba(22, 33, 28, 0.07);
}
.specimen--sand .grain {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(22, 33, 28, 0.16) 1px, transparent 1.4px);
  background-size: 7px 7px;
  opacity: 0.9;
}
.specimen--sand .sand-pile {
  position: absolute;
  left: 50%;
  bottom: -26px;
  width: 170%;
  height: 90px;
  transform: translateX(-50%);
  border-radius: 50% 50% 0 0;
  background: linear-gradient(180deg, #e6d3b4, #d8bd97);
}

.specimen--swatches {
  display: flex;
  gap: 8px;
  padding: 0;
}
.specimen--swatches i {
  flex: 1;
  height: 62px;
  border-radius: 10px;
  background: var(--c);
  border: 1px solid rgba(22, 33, 28, 0.07);
}

.specimen--money {
  position: relative;
  height: 84px;
}
.specimen--money .note {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 46px;
  border-radius: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  background: #fff;
  border: 1px solid rgba(22, 33, 28, 0.1);
  box-shadow: 0 10px 22px -16px rgba(22, 33, 28, 0.6);
}
.specimen--money .n1 {
  left: 0;
  bottom: 4px;
  transform: rotate(-6deg);
}
.specimen--money .n2 {
  left: 72px;
  bottom: 18px;
  transform: rotate(2deg);
  background: #eef6ee;
}
.specimen--money .n3 {
  left: 150px;
  bottom: 0;
  transform: rotate(7deg);
  background: #f6f0e4;
}

.specimen--chat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: auto;
}
.bubble {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
}
.bubble--in {
  background: var(--stone);
  color: var(--muted);
  border-bottom-left-radius: 5px;
}
.bubble--out {
  align-self: flex-end;
  background: var(--signal-deep);
  color: #fff;
  border-bottom-right-radius: 5px;
}

/* --------------------------------------------------------------- method */

.method {
  position: relative;
}
.method-title {
  margin-top: 20px;
  max-width: 20ch;
  font-size: clamp(2.1rem, 4.6vw, 3.9rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.055em;
}
.method-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: clamp(36px, 4.5vw, 56px);
  padding-top: 28px;
  border-top: 1px solid var(--hair-ink);
}
.method-grid .mono {
  color: var(--on-ink-quiet);
}
.method-grid p {
  margin-top: 10px;
  font-size: 15px;
  line-height: 1.66;
  color: var(--on-ink);
}

/* --------------------------------------------------------------- rules */

.rules {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: clamp(40px, 5vw, 64px);
}

.rule {
  padding: 30px 28px 32px;
  background: #fff;
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.rule-num {
  display: block;
  color: var(--signal-deep);
}
.rule h3 {
  margin-top: 18px;
  font-size: 23px;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.rule p {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.66;
  color: var(--muted);
}

/* ------------------------------------------------------------- account */

.account-grid {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.account-card {
  padding: 28px;
  background: #fff;
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
}
.account-address {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: clamp(16px, 2.1vw, 21px);
  letter-spacing: -0.01em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.account-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 10px;
  margin-top: 22px;
}
.account-form .mono {
  grid-column: 1 / -1;
}
.account-input {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  min-height: 50px;
  padding: 0 18px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: var(--bone);
  font-size: 14.5px;
  color: var(--quiet);
}
.account-go {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--signal-deep);
  color: #fff;
  font-size: 14.5px;
  font-weight: 500;
}
.account-note {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.66;
  color: var(--muted);
}

/* ------------------------------------------------------------- finale */

.section--ink.finale-wrap {
  padding-block: clamp(88px, 11vw, 150px);
}

/* The breath between two big bands. It is deliberately smaller than its neighbours, which is
   what makes a long page read as composed rather than stacked. */
.section--tight {
  padding-block: clamp(44px, 4.2vw, 72px);
}
.finale {
  max-width: 860px;
}
.finale-title {
  margin-top: 20px;
  /* Phase 3: the page's largest type is the line that asks for the click. Every other heading
     sits a step below it, so there is one loud thing rather than six equally loud ones. */
  font-size: clamp(2.9rem, 7.2vw, 6.4rem);
  font-weight: 700;
  line-height: 0.94;
  letter-spacing: -0.065em;
}
.finale .actions {
  margin-top: 32px;
}

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

.footer {
  background: var(--bone);
  border-top: 1px solid var(--hair);
  padding-block: 26px;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  justify-content: space-between;
  align-items: center;
}

/* --------------------------------------------------------------- reveal */

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .marquee-track {
    animation: none;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .btn:hover,
  .card:hover {
    transform: none;
  }
}

/* ------------------------------------------------------------ chapters */

/* Two stages from LANDING-CHAPTERS-PLAN.md, phase 1: the sand and the brand sheet.
   Both draw only while they are on screen, and both stand still when the device asks for
   less motion. Nothing here loads a library or adds a colour. */

.chapter {
  padding-block: clamp(60px, 6.6vw, 96px);
}
.chapter--sand {
  background: var(--stone);
}
.chapter--sheet {
  background: var(--bone);
}

.chapter-head {
  max-width: 760px;
}

.chapter-title {
  margin-top: 18px;
  font-size: clamp(2rem, 4.4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.01;
  letter-spacing: -0.055em;
  word-spacing: 0.18em;
}
.chapter-title em {
  margin-inline: 0.04em -0.02em;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  letter-spacing: -0.005em;
  color: var(--signal);
}

/* ---- the spine */

.chapter--spine {
  background: var(--ink);
  color: var(--bone);
}
.chapter--spine .chapter-title em {
  color: var(--jade-pale);
}

.spine-inner {
  display: grid;
  justify-items: center;
  gap: clamp(14px, 1.8vw, 22px);
  text-align: center;
}

.spine-art {
  position: relative;
  width: 100%;
  /* The drawing fills the column instead of floating in it: the globe comes out about a
     third larger, and the five labels move out with it because the whole drawing scales. */
  max-width: 1180px;
}

.spine-svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

/* The globe is the same drawing as the header's mark, and it is always well over 40px across
   on screen, so it is soft. A blur inside an SVG is measured in the drawing's own units, which
   are then scaled up by the group (2.6667) and by the element. Both scale together, so the
   1.45% holds at every width and at every size of the drawing. */
.spine-globe {
  color: var(--bone);
  filter: blur(1.04px);
}

/* Sizes are in the drawing's own units, so they are divided by how much the drawing is scaled
   up: at 1180px wide a 900-unit drawing is 1.31 times bigger than it was at 880px. */
.spine-svg text {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  fill: var(--bone);
}
.spine-svg .spine-state {
  font-size: 8px;
  letter-spacing: 0.1em;
  fill: var(--on-ink-quiet);
}

/* The nodes are hidden by the script until the lines reach them; nothing here sets the
   group's own opacity, because that would hide every child no matter what the script said. */

.spine-line {
  min-height: 1.7em;
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--on-ink);
  transition: opacity 0.3s var(--ease);
}

.spine-list {
  display: none;
}

@media (min-width: 720px) {
  .spine-scroll {
    /* Phase 1: three screens of scroll for one drawing was the emptiest thing on the page.
       Sixty vh of scrolling now carries the whole opening and closing. */
    height: 160vh;
  }
  .spine-pin {
    position: sticky;
    top: 78px;
    min-height: calc(100vh - 78px);
    display: grid;
    align-content: center;
    padding-block: clamp(24px, 3vw, 48px);
  }
}

@media (max-width: 719.98px) {
  /* On a phone the picture is only the globe; the five are a list under it, because 13px
     type inside a 900-wide drawing would arrive at five pixels. */
  .spine-svg .spine-nodes,
  .spine-connectors {
    display: none;
  }
  .spine-art {
    max-width: 300px;
  }
  .spine-list {
    display: grid;
    gap: 0;
    width: 100%;
    margin-top: 18px;
    text-align: left;
  }
  .spine-list li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--hair-ink);
  }
  .spine-list b {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: -0.02em;
  }
  .spine-list .mono {
    font-size: 11px;
    color: var(--on-ink-quiet);
    text-align: right;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spine-scroll {
    height: auto;
  }
  .spine-pin {
    position: static;
    min-height: 0;
  }
}

/* ---- the sand */

.sand-stage {
  position: relative;
  margin-top: clamp(26px, 3.6vw, 44px);
  background: linear-gradient(180deg, #f5f1e8 0%, #e6dfd1 100%);
  border-block: 1px solid var(--hair);
  overflow: hidden;
}

.sand-canvas {
  display: block;
  width: 100%;
  height: clamp(220px, 26vw, 340px);
  /* Pixelated because the grains are pixels; smoothing would grey them into fog. */
  image-rendering: pixelated;
  cursor: crosshair;
  /* A vertical drag still scrolls the page; a sideways drag cuts the sand. */
  touch-action: pan-y;
}

.sand-hint {
  position: absolute;
  left: clamp(14px, 3vw, 28px);
  bottom: clamp(12px, 2.4vw, 22px);
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(247, 244, 238, 0.82);
  pointer-events: none;
}

.sand-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 28px;
  margin-top: 20px;
}

.sand-sands {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sand-swatch {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 0 15px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13.5px;
  cursor: pointer;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.sand-swatch::before {
  content: "";
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(22, 33, 28, 0.16);
}
.sand-swatch[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bone);
}

.sand-facts {
  max-width: 44ch;
}

.sand-note {
  margin-top: 16px;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--quiet);
}

/* ---- the board */

.chapter--board {
  background: var(--wash);
}

/* Phase 3, the second silhouette: from 720 up the board leaves the column and runs edge to
   edge, so this band reads as a departure hall and not as another card in another slab. */
@media (min-width: 720px) {
  .chapter--board .board-wrap {
    width: 100vw;
    margin-left: calc(50% - 50vw);
  }
  /* The band selector is needed: the plain .board rule below sets its own max-width, and a
     later rule of equal weight wins over this one. */
  .chapter--board .board {
    max-width: none;
    border-radius: 0;
    border-inline: 0;
  }
  .board-top {
    padding-inline: clamp(24px, 5vw, 72px);
  }
  .board-rows li {
    padding-inline: clamp(24px, 5vw, 72px);
  }
  .board-foot {
    padding-inline: clamp(24px, 5vw, 72px);
  }
}

.board-wrap {
  margin-top: clamp(26px, 3.6vw, 44px);
}

.board {
  max-width: 900px;
  margin-inline: auto;
  background: #fff;
  border: 1px solid var(--hair-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}

.board-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--hair-soft);
}

.board-clock {
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--ink);
}

/* The day passing, as a hairline under the clock. */
.board-bar {
  height: 2px;
  background: rgba(22, 33, 28, 0.08);
}
.board-bar i {
  display: block;
  height: 100%;
  background: var(--signal);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.16s linear;
}

.board-rows {
  display: flex;
  flex-direction: column;
}

.board-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1.25fr) minmax(0, 1.55fr) 64px 96px;
  align-items: center;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--hair-soft);
  transition: opacity 0.35s var(--ease), background 0.35s var(--ease);
}
.board-row:last-child {
  border-bottom: 0;
}

.board-time {
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.01em;
}
.board-service {
  font-weight: 600;
  letter-spacing: -0.02em;
}
.board-platform,
.board-dur {
  font-size: 12px;
}
/* The tracking on the mono face is what pushed the platform line onto two lines. */
.board-platform {
  letter-spacing: 0.06em;
}
.board-dur {
  text-align: right;
}
.board-flag {
  font-size: 11px;
  text-align: right;
  color: var(--quiet);
}

/* The next train is marked, and it is the mark that travels down the board. */
.board-row.is-next {
  background: rgba(213, 227, 218, 0.38);
}
.board-row.is-next .board-flag {
  color: var(--signal-deep);
}

/* A train that has reached its time is still on the board, greyed, as on a real one. */
.board-row.is-gone {
  opacity: 0.4;
}

.board-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  padding: 14px 24px;
  border-top: 1px solid var(--hair-soft);
  background: color-mix(in srgb, var(--bone) 55%, #fff);
}
.board-source {
  font-size: 11px;
}
.board-link {
  color: var(--signal-deep);
}

@media (max-width: 719.98px) {
  .board-top {
    padding: 14px 16px;
  }
  .board-clock {
    font-size: 16px;
  }
  /* Phase 4: two lines, and the second one runs the whole width. The old grid gave the
     detail line only the width of the service name, so "SPOOR 5 → SPOOR 12 · STEP-FREE"
     broke into three pieces and a row grew to twice its height on a 320 phone. */
  .board-row {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    grid-template-areas:
      "time service flag"
      "plat plat dur";
    row-gap: 6px;
    column-gap: 12px;
    padding: 13px 16px;
  }
  .board-time {
    grid-area: time;
    font-size: 16px;
  }
  .board-service {
    grid-area: service;
  }
  .board-platform {
    grid-area: plat;
    font-size: 11px;
    /* A hair less tracking buys the whole route one line at 320. */
    letter-spacing: 0.04em;
  }
  .board-dur {
    grid-area: dur;
    text-align: right;
    font-size: 11px;
  }
  .board-flag {
    grid-area: flag;
    font-size: 11px;
  }
  .board-foot {
    padding: 8px 16px;
  }
  .board-source {
    font-size: 11px;
  }
  /* The way out of the board is a target, not a line of 18px text. */
  .board-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding-right: 4px;
  }
}

/* ---- the world */

.chapter--world {
  background: var(--ink);
  color: var(--bone);
}
.chapter--world .chapter-title em {
  color: var(--jade-pale);
}

/* Phase 3, the third silhouette: from 720 up the town sits beside its words instead of under
   them, so two neighbouring bands no longer share a shape. */
@media (min-width: 720px) {
  .chapter--world {
    display: grid;
    padding-inline: clamp(22px, 4.5vw, 64px);
    grid-template-columns: 1.05fr 0.95fr;
    grid-template-areas:
      "stage head"
      "stage foot"
      "stage note";
    align-content: start;
    column-gap: clamp(26px, 3.4vw, 56px);
  }
  .chapter--world .world-stage {
    grid-area: stage;
    margin-top: 0;
    align-self: start;
    border: 1px solid var(--hair-ink);
    border-radius: var(--radius);
    overflow: hidden;
  }
  .chapter--world .chapter-head {
    grid-area: head;
    padding-inline: 0;
  }
  .chapter--world .world-foot {
    grid-area: foot;
    padding-inline: 0;
  }
  .chapter--world .world-note {
    grid-area: note;
    padding-inline: 0;
  }
  .chapter--world .world-canvas {
    height: clamp(420px, 46vw, 620px);
  }
}

.world-stage {
  position: relative;
  margin-top: clamp(26px, 3.6vw, 44px);
  background: var(--ink);
  border-block: 1px solid var(--hair-ink);
  overflow: hidden;
}

.world-canvas {
  display: block;
  width: 100%;
  height: clamp(300px, 40vw, 560px);
}

.world-hint {
  position: absolute;
  right: 18px;
  top: 14px;
  color: var(--on-ink-quiet);
  pointer-events: none;
}

.world-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px 24px;
  margin-top: 20px;
}

.world-facts {
  max-width: 54ch;
  color: var(--on-ink-quiet);
}

.state--on-ink {
  background: rgba(247, 244, 238, 0.08);
  color: var(--on-ink);
}

.world-note {
  margin-top: 14px;
  max-width: 62ch;
  font-size: 14px;
  line-height: 1.6;
  color: var(--on-ink-quiet);
}

/* ---- the brand sheet */

.sheet-inner {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: clamp(28px, 4vw, 64px);
  align-items: center;
}

.sheet-copy .lead {
  max-width: 40ch;
}

.sheet-state {
  margin-top: 20px;
}

.sheet {
  position: relative;
  width: 100%;
  max-width: 540px;
  margin-inline: auto;
  aspect-ratio: 4 / 5;
  perspective: 1800px;
}

.sheet-leaf {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.3vw, 18px);
  padding: clamp(18px, 2.2vw, 32px);
  background: #fff;
  border: 1px solid var(--hair-soft);
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  backface-visibility: hidden;
  overflow: hidden;
}

.sheet-leaf--back {
  z-index: 0;
  justify-content: center;
  gap: clamp(14px, 1.8vw, 22px);
}

.sheet-leaf--front {
  z-index: 1;
  transform-origin: left center;
  transform: rotateY(calc(var(--turn, 0) * -84deg));
}

.sheet-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: clamp(8px, 1vw, 14px);
  border-bottom: 1px solid var(--hair-soft);
}

.sheet-lockup {
  display: flex;
  align-items: center;
  gap: clamp(12px, 1.6vw, 20px);
  padding-block: clamp(10px, 1.4vw, 20px);
}

/* The mark here is 54px, so it is SOFT: 1.45% of its own size, measured, not guessed.
   The name beside it is never blurred (Rule 17.7). */
.sheet-mark {
  width: 54px;
  height: 54px;
  flex: none;
  color: var(--ink);
  filter: blur(calc(54px * 0.0145));
}

.sheet-name {
  display: flex;
  flex-direction: column;
  align-items: stretch;
}
.sheet-vibe {
  font-family: "Pixelify Sans", var(--font-mono);
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0.055em;
  line-height: 0.92;
}
.sheet-brass {
  display: flex;
  justify-content: space-between;
  margin-top: 0.05em;
  font-family: "Pixelify Sans", var(--font-mono);
  font-size: clamp(10px, 1.25vw, 13px);
  font-weight: 500;
  line-height: 1;
}

.sheet-palette {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.sheet-palette i {
  height: clamp(38px, 5vw, 58px);
  border-radius: 8px;
  background: var(--c);
  border: 1px solid rgba(22, 33, 28, 0.1);
}

.sheet-type {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: clamp(8px, 1vw, 14px);
  border-top: 1px solid var(--hair-soft);
}
.sheet-type div {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: baseline;
  gap: 14px;
}
.sheet-sample {
  font-size: clamp(17px, 2vw, 22px);
  font-weight: 600;
  letter-spacing: -0.035em;
}
.sheet-serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(19px, 2.2vw, 25px);
  color: var(--signal);
}
.sheet-mono {
  font-family: var(--font-mono);
  font-size: clamp(11px, 1.2vw, 13px);
  letter-spacing: 0.1em;
  color: var(--quiet);
}

.sheet-foot {
  margin-top: auto;
  padding-top: clamp(8px, 1vw, 14px);
  border-top: 1px solid var(--hair-soft);
  font-size: 11px;
}

.sheet-values {
  /* The list takes the middle of the back page, so the six values sit in the sheet rather
     than clustering under its top edge. */
  display: flex;
  flex: 1;
  flex-direction: column;
  justify-content: center;
  gap: clamp(12px, 1.8vw, 22px);
}
.sheet-values li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 12px;
}
.sheet-values i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--c);
  border: 1px solid rgba(22, 33, 28, 0.14);
}
.sheet-values b {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}

/* The assembly. The finished sheet is the default, and the earlier steps take parts away,
   so with scripting off, or at the top of the band, nothing is missing for long and nothing
   is ever hidden for a device that cannot run the script. */

.sheet-mark,
.sheet-palette i,
.sheet-type div {
  transition: opacity 0.5s var(--ease), transform 0.55s var(--ease);
}

[data-step="0"] .sheet-mark {
  opacity: 0;
  transform: translateY(12px) scale(0.94);
}

[data-step="0"] .sheet-palette i,
[data-step="1"] .sheet-palette i {
  opacity: 0;
  transform: translateY(10px) scaleY(0.55);
}
.sheet-palette i:nth-child(1) {
  transition-delay: 0.02s;
}
.sheet-palette i:nth-child(2) {
  transition-delay: 0.08s;
}
.sheet-palette i:nth-child(3) {
  transition-delay: 0.14s;
}
.sheet-palette i:nth-child(4) {
  transition-delay: 0.2s;
}
.sheet-palette i:nth-child(5) {
  transition-delay: 0.26s;
}
.sheet-palette i:nth-child(6) {
  transition-delay: 0.32s;
}

[data-step="0"] .sheet-type div,
[data-step="1"] .sheet-type div,
[data-step="2"] .sheet-type div {
  opacity: 0;
  transform: translateY(10px);
}

/* The band pins only from 720px up. On a phone a sticky band under a fixed bar is the one
   thing a phone browser reliably gets wrong, so there it simply assembles as it scrolls by. */
@media (min-width: 720px) {
  .sheet-scroll {
    /* The sheet starts already carrying its palette and finishes before the band lets go. */
    height: 140vh;
  }
  .sheet-pin {
    position: sticky;
    top: 78px;
    min-height: calc(100vh - 78px);
    display: grid;
    align-items: center;
    padding-block: clamp(20px, 3vw, 48px);
  }
}

@media (max-width: 719.98px) {
  .chapter {
    padding-block: clamp(62px, 11vw, 92px);
  }
  .sheet-inner {
    grid-template-columns: 1fr;
    gap: 26px;
  }
  .sheet {
    max-width: 420px;
  }
  .sand-canvas {
    height: clamp(220px, 62vw, 320px);
  }
  .world-canvas {
    height: clamp(260px, 68vw, 360px);
  }
  .world-hint {
    right: 14px;
    top: 10px;
    font-size: 11px;
  }
  /* Phase 4, the type floor: nothing on a phone is set below 11px. */

  /* The swatches keep their names, so they keep a thumb-sized height to go with them. */
  .sand-swatch {
    min-height: 44px;
  }
  .sand-facts {
    max-width: none;
    font-size: 11px;
  }
  .sheet-type div {
    grid-template-columns: 62px 1fr;
  }
  .sheet-values {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sheet-mark,
  .sheet-palette i,
  .sheet-type div {
    transition: none;
  }
  .sheet-leaf--front {
    transform: none;
  }
  .sheet-scroll {
    height: auto;
  }
  .sheet-pin {
    position: static;
    min-height: 0;
  }
}

/* ------------------------------------------------------------ 1040 nav */

@media (max-width: 1039.98px) {
  .nav-live {
    display: none;
  }
  .nav-links {
    gap: 20px;
  }
  .bento {
    gap: 14px;
  }
  .card {
    grid-column: span 6;
  }
  .card--wide,
  .card--tall {
    grid-column: span 6;
  }
}

/* --------------------------------------------------------- 720 layout */

@media (max-width: 719.98px) {
  /* His order, 21 November 2026: on a narrow phone the bar has NO background of its own.
     "Clear" is his word for see-through, so the hero's mist runs to the top edge and the
     logo and button float over it. From 720px up the bar keeps its solid paper strip. */
  .nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    border-bottom-color: transparent;
  }
  /* Over the hero the bar is clear, as he asked. The moment content passes behind it the
     bar takes paper again — a logo floating on top of a paragraph cannot be read. */
  .nav.is-scrolled {
    background: var(--bone);
    border-bottom-color: var(--hair);
    box-shadow: none;
  }
  /* The bar floats over the hero now, so the hero makes room for it again. */
  .hero {
    padding-top: 106px;
  }
  /* Still no background, but the mark and the name get a soft paper halo so they stay
     readable when a page of text passes behind them. This is a glow on the letters,
     not a band behind the bar. */
  .lockup-vibe,
  .lockup-name {
    text-shadow: 0 1px 2px rgba(247, 244, 238, 0.95), 0 0 10px rgba(247, 244, 238, 0.9);
  }
  .wordmark-mark {
    filter: drop-shadow(0 1px 2px rgba(247, 244, 238, 0.95)) drop-shadow(0 0 6px rgba(247, 244, 238, 0.8));
  }
  .nav-inner {
    height: 68px;
    gap: 14px;
  }
  .wordmark {
    gap: 9px;
  }
  .lockup-vibe {
    font-size: 22px;
  }
  .lockup-name {
    font-size: 6.9px;
  }
  .wordmark-mark {
    width: 24px;
    height: 24px;
  }
  /* A phone must never be widened by the account form: one column, nothing that
     refuses to shrink. */
  .account-form {
    grid-template-columns: 1fr;
  }
  .account-input,
  .account-go {
    min-width: 0;
    width: 100%;
  }
  .nav-links {
    display: none;
  }
  .nav-cta {
    min-height: 44px;
    padding: 0 18px;
    font-size: 13px;
  }

  .hero {
    padding-top: 106px;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .hero-scene {
    width: 128%;
    right: -26%;
    top: 30%;
    transform: none;
    opacity: 0.7;
    -webkit-mask-image: radial-gradient(circle at 58% 52%, #000 30%, transparent 66%);
    mask-image: radial-gradient(circle at 58% 52%, #000 30%, transparent 66%);
  }
  .hero-disc {
    width: 92vw;
    top: -26vw;
    right: -34vw;
  }
  .hero-title {
    font-size: clamp(2.3rem, 10.2vw, 3.3rem);
  }
  .lede,
  .lead {
    font-size: 16px;
  }
  .actions .btn {
    flex: 1 1 100%;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .stats li {
    padding: 14px 18px;
  }

  .bento {
    grid-template-columns: 1fr;
  }
  .card,
  .card--wide,
  .card--tall {
    grid-column: auto;
  }

  .method-grid,
  .rules {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  .account-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .section,
  .section--ink.finale-wrap {
    padding-block: clamp(64px, 12vw, 96px);
  }

  .shot-caption {
    text-align: left;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }
  /* The tracking pushes the middle line onto a second line, which then crowds the
     year. Tighter tracking keeps it on one line. */
  .footer-inner .mono {
    letter-spacing: 0.04em;
  }
}
