/* ============================================================
   Small Hello — "Every hello is a door"
   A cinematic riso-print scrapbook of possible futures.
   Paper, ink, coral-red heat, amber light, a little riso blue.
   No dependencies. No CDN. All fonts bundled.
   ============================================================ */

/* ---------- Fonts ---------- */
@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-normal-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/fonts/InstrumentSerif-italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Caveat";
  src: url("assets/fonts/Caveat-normal-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  color-scheme: light;

  --paper: #f6edda;
  --paper-deep: #f0e4cb;
  --card: #fdf8ec;
  --ink: #1a1714;
  --ink-2: #6d6353;
  --red: #e8462e;
  --red-deep: #c93a25;
  --amber: #f0a028;
  --amber-soft: #f7d9a4;
  --blue: #4a6b8a;
  --blue-soft: #d9e2ea;
  --cream: #f6edda;

  /* the demo phone mirrors the app's neutral shell */
  --app-canvas: #fafaf8;
  --app-surface: #ffffff;
  --app-ink: #282525;
  --app-ink-2: #676261;
  --app-action: #282525;
  --app-action-ink: #ffffff;

  --hairline: rgba(26, 23, 20, 0.14);
  --img-outline: rgba(0, 0, 0, 0.08);
  --shadow-card: 0 1px 2px rgba(26, 23, 20, 0.07),
    0 18px 42px -18px rgba(26, 23, 20, 0.28);
  --shadow-soft: 0 1px 2px rgba(26, 23, 20, 0.05),
    0 10px 26px -14px rgba(26, 23, 20, 0.2);

  --font-display: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    system-ui, sans-serif;
  --font-scrawl: "Caveat", "Bradley Hand", cursive;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;

  --fs-hero: clamp(2.55rem, 6.2vw + 0.9rem, 5.9rem);
  --fs-h2: clamp(2.1rem, 3.8vw + 0.8rem, 3.7rem);
  --fs-sub: clamp(1.04rem, 0.5vw + 0.94rem, 1.26rem);
  --fs-body: clamp(1rem, 0.2vw + 0.95rem, 1.09rem);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, p, ul, ol, li, figure, blockquote {
  margin: 0;
  padding: 0;
}

ul, ol {
  list-style: none;
}

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

::selection {
  background: var(--red);
  color: var(--cream);
}

:focus-visible {
  outline: 2.5px solid var(--red);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 60;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  transform: translateY(-64px);
  transition: transform 0.3s var(--ease-out);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* riso print grain over everything.
   No blend mode: blending a full-viewport fixed layer forces the GPU to
   re-composite every pixel every frame and makes scrolling stutter on
   Retina displays. Plain low-alpha noise on its own layer is nearly
   indistinguishable and costs one rasterization, ever. */
.grain {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: 0.05;
  transform: translateZ(0);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

/* ---------- Shared voice pieces ---------- */
.scrawl {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: clamp(1.25rem, 1.8vw, 1.6rem);
  line-height: 1.2;
  color: var(--red);
  display: inline-block;
  transform: rotate(-1.6deg);
}

.misreg-red {
  color: var(--red);
  text-shadow: 0.045em 0.045em 0 var(--amber-soft);
}

.fineprint {
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--ink-2);
}

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) clamp(16px, 4vw, 36px) 10px;
  transition: background-color 0.45s ease, box-shadow 0.45s ease;
}

.nav.scrolled {
  background: color-mix(in srgb, var(--paper) 84%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--hairline);
}

.nav-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
  transition: scale 0.2s var(--ease-out);
}

.nav-mark:active {
  scale: 0.96;
}

.nav-mark img {
  border-radius: 9px;
  box-shadow: var(--shadow-soft);
}

.nav-word {
  font-family: var(--font-display);
  font-size: 1.22rem;
  letter-spacing: 0.005em;
}

.nav-chip {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--red);
  transform: rotate(-2deg);
  border: 1.5px solid var(--red);
  padding: 3px 14px 5px;
  border-radius: 999px;
}

/* ---------- Shared section chrome ---------- */
.section {
  position: relative;
  padding: clamp(80px, 12vh, 140px) clamp(20px, 5vw, 40px);
}

.section-inner {
  max-width: 1060px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--fs-h2);
  line-height: 1.04;
  letter-spacing: -0.005em;
  text-wrap: balance;
}

.section-sub {
  margin-top: 16px;
  font-size: var(--fs-sub);
  color: var(--ink-2);
  max-width: 46ch;
  text-wrap: pretty;
}

/* ---------- Entrances ---------- */
.js [data-rise],
.js [data-rise-group] > * {
  opacity: 0;
  transform: translateY(18px);
}

.js .is-in[data-rise],
.js .is-in[data-rise-group] > * {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  transition-delay: calc(var(--rise-i, 0) * 90ms);
}

/* ============================================================
   1 · COLD OPEN
   ============================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-content: center;
  justify-items: center;
  text-align: center;
  padding: 120px clamp(20px, 5vw, 40px) 100px;
  overflow: clip;
}

.hero-scrawl {
  margin-bottom: 18px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.01em;
  display: grid;
  gap: 0.22em;
  max-width: min(92vw, 820px);
}

.hero-line {
  display: block;
  font-size: clamp(1.7rem, 2.3vw + 0.75rem, 3rem);
}

.hero-wink {
  font-style: italic;
}

.hero-line-rot {
  font-size: clamp(2.3rem, 4.3vw + 0.7rem, 4.6rem);
  min-height: 1.12em;
  display: grid;
  place-items: center;
}

@media (max-width: 700px) {
  .hero-line-rot {
    min-height: 2.2em;
  }
}

.rotator {
  display: inline-block;
  font-style: italic;
  transition: opacity 0.28s ease, transform 0.28s var(--ease-out);
}

.rotator.rot-out {
  opacity: 0;
  transform: translateY(-0.28em);
}

.rotator.rot-in {
  opacity: 0;
  transform: translateY(0.28em);
  transition: none;
}

.hero-sub {
  margin-top: 30px;
  font-size: var(--fs-sub);
  line-height: 1.65;
  color: var(--ink-2);
  max-width: 52ch;
  text-wrap: pretty;
}

.hero-cta {
  margin-top: 34px;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.store-badge {
  display: inline-block;
  line-height: 0;
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  user-select: none;
  animation: badge-breathe 5s ease-in-out infinite;
}

@keyframes badge-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.015); }
}

.store-badge img {
  display: block;
  width: auto;
  height: 54px;
}

.store-badge-big img {
  height: 62px;
}

.scroll-cue {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 2px;
}

.cue-arrow {
  width: 26px;
  height: auto;
  overflow: visible;
}

.cue-label {
  font-size: 1.2rem;
}

/* ============================================================
   2 · THE ACHE
   ============================================================ */
.ache-section {
  text-align: center;
}

.ache-inner {
  max-width: 880px;
}

.ache-scrawl {
  margin-top: 10px;
  color: var(--blue);
}

.ache-wall {
  margin: clamp(40px, 6vh, 60px) auto 0;
  max-width: 980px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 16px 18px;
}

.ache-wall li {
  display: flex;
}

.scrap {
  position: relative;
  font: inherit;
  border: none;
  text-align: left;
  cursor: pointer;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  padding: 18px 20px 16px;
  max-width: 290px;
  transform: rotate(var(--r, 0deg));
  transition: transform 0.3s var(--ease-out), background-color 0.35s ease,
    box-shadow 0.3s ease;
  clip-path: polygon(
    0% 6px, 5% 1px, 12% 7px, 22% 2px, 33% 6px, 44% 1px, 55% 6px, 66% 2px,
    77% 7px, 88% 2px, 96% 6px, 100% 3px,
    100% calc(100% - 5px), 94% 100%, 84% calc(100% - 6px), 72% 100%,
    60% calc(100% - 4px), 47% 100%, 34% calc(100% - 6px), 21% 100%,
    10% calc(100% - 5px), 0% 100%
  );
}

.ache-wall:not(.cluster) .scrap:hover {
  transform: rotate(var(--r, 0deg)) translateY(-3px);
  box-shadow: var(--shadow-card);
}

.ache-wall:not(.cluster) .scrap:active {
  transform: rotate(var(--r, 0deg)) scale(0.96);
}

/* ---- cluster mode: a living pile of notes, one reads to you big ---- */
.ache-wall.cluster {
  position: relative;
  display: block;
  height: 680px;
  max-width: 1040px;
}

.ache-wall.cluster li {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  z-index: 1;
  animation: note-bob var(--bob, 7s) ease-in-out var(--bob-delay, 0s) infinite alternate;
}

.ache-wall.cluster li:nth-child(3n) { --bob: 8.5s; --bob-delay: -3s; }
.ache-wall.cluster li:nth-child(4n) { --bob: 6.2s; --bob-delay: -2s; }
.ache-wall.cluster li:nth-child(5n) { --bob: 9.4s; --bob-delay: -5s; }

@keyframes note-bob {
  from { transform: translateY(-6px); }
  to { transform: translateY(7px); }
}

.ache-wall.cluster li.featured {
  z-index: 6;
  animation: none;
}

.ache-wall.cluster .scrap {
  --s: 0.36;
  width: min(520px, 92vw);
  max-width: none;
  padding: 26px 30px 24px;
  opacity: 0.5;
  transform: translate(-50%, -50%) translate(var(--dx, 0px), var(--dy, 0px))
    rotate(var(--r, 0deg)) scale(var(--s));
  transition: transform 0.95s var(--ease-out), opacity 0.7s ease,
    background-color 0.35s ease, box-shadow 0.7s ease;
  will-change: transform;
}

.ache-wall.cluster .scrap blockquote {
  font-size: 1.62rem;
  line-height: 1.34;
}

.ache-wall.cluster .scrap.wide {
  width: min(540px, 94vw);
}

.ache-wall.cluster .scrap.wide blockquote {
  font-size: 1.66rem;
}

.ache-wall.cluster li:not(.featured) .scrap:hover {
  opacity: 0.85;
}

.ache-wall.cluster li.featured .scrap {
  --dx: 0px;
  --dy: 0px;
  --s: 1;
  opacity: 1;
  box-shadow: var(--shadow-card);
}

.ache-wall.cluster li.featured .scrap:active {
  transform: translate(-50%, -50%) rotate(var(--r, 0deg)) scale(0.97);
}

.ache-wall.cluster li.featured .scrap-check {
  width: 58px;
  top: -18px;
  right: -12px;
}

@media (max-width: 900px) {
  .ache-wall.cluster {
    height: 600px;
  }
}

@media (max-width: 560px) {
  .ache-wall.cluster {
    height: 540px;
  }

  .ache-wall.cluster .scrap {
    --s: 0.3;
  }

  .ache-wall.cluster .scrap blockquote {
    font-size: 1.34rem;
  }

  .ache-wall.cluster .scrap.wide blockquote {
    font-size: 1.38rem;
  }
}

.scrap blockquote {
  font-family: var(--font-scrawl);
  font-weight: 500;
  font-size: 1.22rem;
  line-height: 1.28;
  color: var(--blue);
  transition: color 0.35s ease;
}

.scrap.wide {
  max-width: 350px;
  padding: 26px 24px 20px;
}

.scrap.wide blockquote {
  font-size: 1.38rem;
  line-height: 1.32;
}

.ache-wall li:nth-child(6n + 1) .scrap { --r: -1.7deg; }
.ache-wall li:nth-child(6n + 2) .scrap { --r: 1.2deg; }
.ache-wall li:nth-child(6n + 3) .scrap { --r: -0.8deg; }
.ache-wall li:nth-child(6n + 4) .scrap { --r: 1.8deg; }
.ache-wall li:nth-child(6n + 5) .scrap { --r: -1.2deg; }
.ache-wall li:nth-child(6n + 6) .scrap { --r: 0.9deg; }

/* tapped: the paper warms, the ink commits, a red check lands */
.scrap.me {
  background: #fbeecf;
}

.scrap.me blockquote {
  color: var(--ink);
}

.scrap-check {
  position: absolute;
  top: -13px;
  right: -9px;
  width: 42px;
  height: auto;
  transform: rotate(7deg);
  pointer-events: none;
  overflow: visible;
}

.scrap-check path {
  fill: none;
  stroke: var(--red);
  stroke-width: 6.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 62;
  stroke-dashoffset: 62;
}

.scrap.me .scrap-check path {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 0.3s ease-out 0.04s;
}

.ache-tally {
  display: block;
  margin-top: 30px;
  font-size: clamp(1.35rem, 2.1vw, 1.75rem);
  min-height: 1.5em;
  transform: rotate(-1.2deg);
}

.ache-tally.pop {
  animation: tally-pop 0.45s var(--ease-out);
}

.ache-source {
  margin: 26px auto 0;
  max-width: 52ch;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--ink-2);
}

@keyframes tally-pop {
  0% { transform: rotate(-1.2deg) scale(0.92); }
  55% { transform: rotate(-1.2deg) scale(1.06); }
  100% { transform: rotate(-1.2deg) scale(1); }
}

.tape {
  position: absolute;
  top: -12px;
  left: 50%;
  width: 86px;
  height: 26px;
  transform: translateX(-50%) rotate(-3deg);
  background: color-mix(in srgb, var(--amber-soft) 62%, transparent);
  box-shadow: 0 1px 2px rgba(26, 23, 20, 0.08);
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  border-right: 1px solid rgba(255, 255, 255, 0.5);
}

.flip {
  margin-top: clamp(56px, 9vh, 92px);
  display: grid;
  gap: 14px;
  justify-items: center;
}

.flip-a {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.2vw, 2.6rem);
  line-height: 1.1;
}

.flip-a::after {
  content: "";
  position: absolute;
  left: -2%;
  right: -2%;
  top: 55%;
  height: 0.09em;
  border-radius: 99px;
  background: var(--red);
  transform: scaleX(0) rotate(-1.1deg);
  transform-origin: left center;
  transition: transform 0.6s cubic-bezier(0.7, 0, 0.3, 1) 0.5s;
}

.js .is-in .flip-a::after,
.js .flip.is-in .flip-a::after {
  transform: scaleX(1) rotate(-1.1deg);
}

.flip-b {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.3rem, 4.6vw, 3.8rem);
  line-height: 1.05;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.7s var(--ease-out) 1s, transform 0.7s var(--ease-out) 1s;
}

.js .flip.is-in .flip-b {
  opacity: 1;
  transform: none;
}

/* ============================================================
   3 · THE DOORS — souvenir collage
   ============================================================ */
.doors-section {
  overflow: clip;
}

.doors-section .section-inner {
  text-align: center;
}

.doors-section .section-title {
  max-width: 22ch;
  margin-inline: auto;
}

.doors-section .section-sub {
  margin-inline: auto;
}

.collage {
  position: relative;
  max-width: 1080px;
  margin: clamp(48px, 7vh, 84px) auto 0;
  height: 1170px;
}

.souvenir-note {
  position: absolute;
  bottom: -38px;
  left: 6px;
  font-size: 1.22rem;
  white-space: nowrap;
}

.souvenir {
  position: absolute;
  transform: translateY(var(--dy, 0)) rotate(var(--rot, 0deg));
  will-change: transform;
}

/* polaroids */
.polaroid {
  width: min(340px, 78vw);
  background: #fffdf6;
  padding: 13px 13px 52px;
  box-shadow: var(--shadow-card);
  outline: 1px solid var(--img-outline);
  outline-offset: -1px;
}

.polaroid img {
  width: 100%;
  height: auto;
  background: var(--paper-deep);
}

.polaroid figcaption {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 1.35rem;
  color: var(--ink);
  transform: rotate(-1deg);
}

.develop {
  filter: grayscale(0.85) sepia(0.25) brightness(0.72) contrast(0.85) blur(5px);
  transition: filter 1.8s ease 0.15s;
}

.develop.developed {
  filter: none;
}

.pol-cinema { --rot: -3deg; left: 1%; top: 12px; }
.pol-road { --rot: 2.4deg; right: 3%; top: 468px; }

/* ticket stubs */
.tickets { --rot: 4deg; left: 39%; top: 0; width: 190px; }

.ticket {
  position: relative;
  width: 168px;
  background: #fbf3e0;
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 13px 15px 12px 22px;
  box-shadow: var(--shadow-soft);
}

.ticket-2 {
  position: absolute;
  top: 12px;
  left: 26px;
  transform: rotate(7deg);
  z-index: -1;
}

.ticket-punch {
  position: absolute;
  left: -7px;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hairline);
  transform: translateY(-50%);
}

.ticket-head {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--red);
}

.ticket-body {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.5;
  color: var(--ink);
}

.barcode {
  display: block;
  margin-top: 9px;
  height: 20px;
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 2px,
    transparent 2px 4px,
    var(--ink) 4px 5px,
    transparent 5px 9px
  );
  opacity: 0.8;
}

.ticket-note {
  position: absolute;
  bottom: -38px;
  left: 8px;
  font-size: 1.25rem;
  white-space: nowrap;
}

/* receipt */
.receipt {
  --rot: 2deg;
  right: 5%;
  top: 26px;
  width: 212px;
  background: #fffdf6;
  padding: 16px 16px 18px;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-mono);
  color: var(--ink);
  clip-path: polygon(
    0 0, 100% 0,
    100% calc(100% - 6px), 92% 100%, 84% calc(100% - 6px), 76% 100%,
    68% calc(100% - 6px), 60% 100%, 52% calc(100% - 6px), 44% 100%,
    36% calc(100% - 6px), 28% 100%, 20% calc(100% - 6px), 12% 100%,
    4% calc(100% - 6px), 0 100%
  );
}

.receipt-head {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  padding-bottom: 9px;
  border-bottom: 1px dashed var(--hairline);
}

.receipt-line {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  margin-top: 8px;
}

.receipt-foot {
  margin-top: 11px;
  padding-top: 9px;
  border-top: 1px dashed var(--hairline);
  text-align: center;
  font-size: 10px;
  color: var(--red);
}

/* boarding pass */
.boarding {
  --rot: -2.6deg;
  left: 6%;
  top: 560px;
  width: 252px;
  background: #fffdf6;
  border-radius: 10px;
  overflow: clip;
  box-shadow: var(--shadow-card);
}

.boarding-band {
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 7px 14px;
}

.boarding-route {
  font-family: var(--font-display);
  font-size: 1.75rem;
  padding: 10px 14px 0;
}

.boarding-meta {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: var(--ink-2);
  padding: 4px 14px 14px;
}

/* contact card */
.contactcard {
  --rot: 1.6deg;
  left: 29%;
  top: 345px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fffdf6;
  border-radius: 16px;
  padding: 13px 20px 13px 13px;
  box-shadow: var(--shadow-card);
}

.contact-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--amber);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1.15rem;
}

.contact-name {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink);
}

.contact-meta {
  margin-top: 4px;
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}

/* save the date */
.savethedate {
  --rot: -2deg;
  right: 23%;
  top: 262px;
  width: 212px;
  background: #fffdf6;
  border: 1px solid var(--hairline);
  outline: 1.5px solid var(--amber);
  outline-offset: -7px;
  padding: 26px 18px 22px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.std-head {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.24em;
  color: var(--red);
}

.std-names {
  font-family: var(--font-display);
  font-size: 2.1rem;
  line-height: 1.1;
  margin-top: 8px;
}

.std-meta {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  color: var(--ink-2);
  margin-top: 8px;
}

/* HELLO name tag — day one at the new job */
.hellotag {
  --rot: 2.5deg;
  left: 7%;
  top: 400px;
  width: 192px;
  background: #fffdf6;
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}

.hellotag-band {
  border-radius: 10px 10px 0 0;
  background: var(--red);
  color: var(--cream);
  text-align: center;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: 0.06em;
  padding: 8px 0 2px;
  line-height: 1;
}

.hellotag-band span {
  display: block;
  font-family: var(--font-scrawl);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding-bottom: 5px;
}

.hellotag-name {
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 1.7rem;
  color: var(--ink);
  text-align: center;
  padding: 14px 10px 16px;
  transform: rotate(-1.5deg);
}

.hellotag .souvenir-note {
  left: calc(100% + 12px);
  right: auto;
  bottom: 40px;
}

/* race bib */
.bib {
  --rot: -1.5deg;
  left: 22%;
  top: 890px;
  width: 204px;
  background: #fffdf6;
  border-radius: 10px;
  padding: 18px 16px 16px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.bib-hole {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hairline);
}

.bib-hole.h1 { top: 7px; left: 9px; }
.bib-hole.h2 { top: 7px; right: 9px; }
.bib-hole.h3 { bottom: 7px; left: 9px; }
.bib-hole.h4 { bottom: 7px; right: 9px; }

.bib-race {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--red);
}

.bib-number {
  font-family: var(--font-mono);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--ink);
}

/* best-man toast cue card */
.toastcard {
  --rot: 1.8deg;
  left: 52%;
  top: 910px;
  width: 248px;
  background: #fffdf6;
  padding: 14px 18px 18px;
  box-shadow: var(--shadow-card);
  background-image: linear-gradient(var(--red) 1.5px, transparent 1.5px),
    repeating-linear-gradient(
      to bottom,
      transparent 0 27px,
      color-mix(in srgb, var(--blue) 30%, transparent) 27px 28px
    );
  background-size: 100% 12px, 100% 100%;
  background-repeat: no-repeat, repeat;
  background-position: 0 10px, 0 24px;
}

.toast-title {
  font-family: var(--font-scrawl);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--ink);
  margin-top: 12px;
}

.toast-lines {
  font-family: var(--font-scrawl);
  font-weight: 500;
  font-size: 1.24rem;
  line-height: 28px;
  color: var(--blue);
  margin-top: 10px;
}

/* apartment key tag */
.keytag {
  --rot: -4deg;
  right: 12%;
  top: 880px;
  width: 132px;
  background: var(--amber);
  border-radius: 14px;
  padding: 26px 12px 14px;
  text-align: center;
  box-shadow: var(--shadow-card);
}

.keytag-hole {
  position: absolute;
  top: 9px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid color-mix(in srgb, var(--ink) 35%, transparent);
}

.keytag-flat {
  font-family: var(--font-display);
  font-size: 2.4rem;
  line-height: 1;
  color: var(--ink);
}

.keytag-meta {
  font-family: var(--font-mono);
  font-size: 8.5px;
  letter-spacing: 0.08em;
  color: color-mix(in srgb, var(--ink) 72%, transparent);
  margin-top: 7px;
}

/* sticky note */
.sticky {
  --rot: -5deg;
  right: 28%;
  top: 600px;
  width: 158px;
  background: var(--amber-soft);
  padding: 16px 15px 20px;
  box-shadow: var(--shadow-soft);
  font-family: var(--font-scrawl);
  font-weight: 600;
  font-size: 1.22rem;
  line-height: 1.25;
  color: var(--ink);
}

.sticky s {
  text-decoration-color: var(--red);
  text-decoration-thickness: 2px;
}

/* collage → stacked scrapbook on small screens */
@media (max-width: 900px) {
  .collage {
    height: auto;
    display: grid;
    justify-items: center;
    gap: 40px;
    padding: 0 10px;
  }

  .souvenir {
    position: relative;
    inset: auto;
  }

  .pol-cinema { justify-self: start; margin-left: 2%; }
  .pol-road { justify-self: end; margin-right: 2%; }
  .tickets { justify-self: start; margin-left: 8%; margin-bottom: 26px; }
  .receipt { justify-self: end; margin-right: 6%; }
  .savethedate { justify-self: start; margin-left: 8%; margin-bottom: 22px; }
  .boarding { justify-self: start; margin-left: 4%; }
  .hellotag { justify-self: end; margin-right: 10%; margin-bottom: 22px; }

  .hellotag .souvenir-note {
    left: 6px;
    right: auto;
    bottom: -36px;
  }
  .bib { justify-self: start; margin-left: 10%; margin-bottom: 22px; }
  .contactcard { justify-self: end; margin-right: 4%; }
  .toastcard { justify-self: center; }
  .sticky { justify-self: start; margin-left: 12%; }
  .keytag { justify-self: end; margin-right: 14%; margin-bottom: 22px; }
}

/* the closer */
.doors-closer {
  margin-top: clamp(56px, 8vh, 96px);
  text-align: center;
  display: grid;
  justify-items: center;
  gap: 6px;
}

.closer-scrawl {
  font-size: clamp(1.4rem, 2.2vw, 1.8rem);
}

.hello-script {
  width: min(520px, 80vw);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.hello-script:focus-visible {
  outline: 2.5px solid var(--red);
  outline-offset: 8px;
  border-radius: 12px;
}

.hello-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.hello-script.waving .hello-svg {
  animation: hello-wave 0.9s var(--ease-out);
  transform-origin: 50% 62%;
}

@keyframes hello-wave {
  0% { transform: rotate(0deg) scale(1); }
  25% { transform: rotate(-2.2deg) scale(1.015); }
  55% { transform: rotate(2deg) scale(1.015); }
  80% { transform: rotate(-0.8deg) scale(1.005); }
  100% { transform: rotate(0deg) scale(1); }
}

.closer-under {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.25rem;
  color: var(--ink-2);
}

/* ============================================================
   4 · THE TRAINING (phone)
   ============================================================ */
.phone-grid {
  display: grid;
  gap: clamp(44px, 6vw, 84px);
  align-items: center;
}

@media (min-width: 900px) {
  .phone-grid {
    grid-template-columns: 1.05fr 0.95fr;
  }

  .phone-stage {
    order: -1;
  }
}

.feature-rows {
  margin-top: clamp(30px, 4vh, 44px);
  display: grid;
  gap: 26px;
}

.feature-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.feature-dot {
  margin-top: 7px;
  width: 12px;
  height: 12px;
  border-radius: 45% 55% 52% 48% / 55% 46% 54% 45%;
  flex: none;
}

.dot-red { background: var(--red); }
.dot-amber { background: var(--amber); }
.dot-blue { background: var(--blue); }
.dot-ink { background: var(--ink); }

.feature-row h3 {
  font-size: 1.06rem;
  font-weight: 700;
  letter-spacing: -0.005em;
}

.feature-row p {
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 0.97rem;
  max-width: 46ch;
}

/* the device */
.phone-stage {
  display: grid;
  justify-items: center;
}

.phone {
  position: relative;
  width: min(330px, 86vw);
  aspect-ratio: 330 / 672;
  background: #1c1a19;
  border-radius: 54px;
  padding: 11px;
  box-shadow: 0 2px 4px rgba(26, 23, 20, 0.14),
    0 34px 70px -24px rgba(26, 23, 20, 0.42);
  animation: phone-float 9s ease-in-out infinite alternate;
}

@keyframes phone-float {
  from { transform: translateY(-6px) rotate(-0.4deg); }
  to { transform: translateY(8px) rotate(0.5deg); }
}

.phone-island {
  position: absolute;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 86px;
  height: 25px;
  border-radius: 999px;
  background: #100f0e;
  z-index: 3;
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 43px; /* concentric: 54px frame − 11px padding */
  background: var(--app-canvas);
  overflow: clip;
}

.ph-view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 18px 20px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
  pointer-events: none;
}

.ph-view.is-active {
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

.ph-statusbar {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 600;
  color: var(--app-ink);
  padding: 4px 8px 0;
}

.ph-status-icons {
  letter-spacing: 2px;
  font-size: 10px;
  opacity: 0.85;
}

.ph-header {
  margin-top: 26px;
  display: grid;
  gap: 7px;
}

.ph-today {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--app-ink);
}

.ph-rhythm {
  justify-self: start;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--app-ink);
  background: var(--blue-soft);
  padding: 5px 11px;
  border-radius: 999px;
}

.ph-card {
  margin-top: 16px;
  background: var(--app-surface);
  border-radius: 24px;
  padding: 17px 16px 16px;
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 9px;
}

.ph-chip {
  justify-self: start;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--ink);
  background: var(--amber);
  padding: 4px 10px;
  border-radius: 999px;
}

.ph-quest {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.015em;
  color: var(--app-ink);
}

.ph-instruction {
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--app-ink-2);
}

.ph-phrase {
  font-size: 13px;
  font-weight: 600;
  color: var(--app-ink);
  background: color-mix(in srgb, var(--amber) 26%, transparent);
  border-radius: 12px;
  padding: 7px 11px;
  justify-self: start;
}

.ph-safety {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  color: var(--app-ink-2);
}

.ph-safety-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  flex: none;
}

.ph-btn {
  margin-top: 5px;
  background: var(--app-action);
  color: var(--app-action-ink);
  font-family: inherit;
  font-size: 14.5px;
  font-weight: 650;
  text-align: center;
  border: none;
  border-radius: 16px;
  padding: 13px;
  cursor: pointer;
  transition: transform 0.25s var(--ease-out);
}

.ph-btn:active {
  transform: scale(0.96);
}

.ph-tab-hint {
  margin-top: auto;
  height: 4px;
  width: 108px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--app-ink) 22%, transparent);
  align-self: center;
}

.ph-go-body {
  margin: auto 0;
  display: grid;
  justify-items: center;
  gap: 13px;
  text-align: center;
  padding-bottom: 26px;
}

.ph-ring {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  border: 3px solid var(--amber);
  display: grid;
  place-items: center;
  margin-bottom: 8px;
}

.ph-ring span {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--amber) 34%, transparent);
  animation: ring-breathe 4.2s ease-in-out infinite;
}

@keyframes ring-breathe {
  0%, 100% { transform: scale(0.82); opacity: 0.75; }
  50% { transform: scale(1.06); opacity: 1; }
}

.ph-go-body h4 {
  font-size: 23px;
  font-weight: 800;
  color: var(--app-ink);
  letter-spacing: -0.01em;
}

.ph-go-body p {
  font-size: 12.5px;
  color: var(--app-ink-2);
  max-width: 22ch;
  line-height: 1.5;
}

.ph-btn-outline {
  background: transparent;
  color: var(--app-ink);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--app-ink) 30%, transparent);
  padding: 11px 26px;
  margin-top: 8px;
}

.ph-reflect-body {
  margin-top: 34px;
  display: grid;
  gap: 15px;
}

.ph-reflect-body h4 {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--app-ink);
}

.ph-wins {
  display: grid;
  gap: 8px;
}

.ph-win {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 11px;
  background: var(--app-surface);
  border: none;
  border-radius: 15px;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  color: var(--app-ink);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.2s var(--ease-out);
}

.ph-win:active {
  transform: scale(0.98);
}

.ph-check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--app-ink) 25%, transparent);
  flex: none;
  display: grid;
  place-items: center;
  transition: background-color 0.4s ease, border-color 0.4s ease;
}

.ph-check::after {
  content: "";
  width: 10px;
  height: 6px;
  border-left: 2.5px solid var(--ink);
  border-bottom: 2.5px solid var(--ink);
  transform: rotate(-45deg) scale(0);
  translate: 0 -1px;
  transition: transform 0.35s var(--ease-out);
}

.ph-win.done .ph-check {
  background: var(--amber);
  border-color: var(--amber);
}

.ph-win.done .ph-check::after {
  transform: rotate(-45deg) scale(1);
}

.ph-light {
  justify-self: center;
  margin-top: 6px;
  background: var(--amber);
  color: var(--ink);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 750;
  border: none;
  border-radius: 999px;
  padding: 9px 20px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.ph-light.show {
  opacity: 1;
  transform: scale(1);
}

.ph-light:active {
  transform: scale(0.96);
}

.ph-done-body {
  margin: auto 0;
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding-bottom: 30px;
}

.ph-done-glow {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0.55;
  filter: blur(2px);
  margin-bottom: 6px;
}

.ph-done.is-active .ph-done-glow {
  animation: done-pop 0.9s var(--ease-out);
}

@keyframes done-pop {
  0% { transform: scale(0.3); opacity: 0; }
  60% { transform: scale(1.12); opacity: 0.6; }
  100% { transform: scale(1); opacity: 0.55; }
}

.ph-done-body h4 {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: var(--app-ink);
}

.ph-done-body p {
  font-size: 12.5px;
  color: var(--app-ink-2);
}

.phone-hint {
  margin-top: 18px;
  text-align: center;
  transition: opacity 0.6s ease;
}

.phone-hint.gone {
  opacity: 0;
}

/* ============================================================
   5 · YOUR TURN
   ============================================================ */
.turn-section {
  text-align: center;
}

.turn-inner {
  max-width: 680px;
}

.turn-inner .section-sub {
  margin-inline: auto;
}

.sim-card {
  position: relative;
  margin-top: clamp(38px, 5vh, 56px);
  background: var(--card);
  border-radius: 6px;
  box-shadow: var(--shadow-card);
  padding: clamp(26px, 4.5vw, 42px);
  text-align: left;
  min-height: 320px;
}

.tape-sim {
  top: -13px;
  transform: translateX(-50%) rotate(2deg);
}

.sim-scene {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  line-height: 1.3;
  letter-spacing: -0.005em;
  text-wrap: pretty;
}

.sim-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.sim-log:empty {
  margin-top: 0;
}

.bubble {
  max-width: 82%;
  padding: 12px 17px;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 20px;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.bubble.on {
  opacity: 1;
  transform: none;
}

.bubble-you {
  align-self: flex-end;
  background: var(--red);
  color: var(--cream);
  border-bottom-right-radius: 6px;
}

.bubble-them {
  align-self: flex-start;
  background: #fffdf6;
  color: var(--ink);
  border-bottom-left-radius: 6px;
  box-shadow: var(--shadow-soft);
}

.sim-note {
  align-self: center;
  text-align: center;
  font-family: var(--font-scrawl);
  font-weight: 500;
  font-size: 1.3rem;
  line-height: 1.3;
  color: var(--blue);
  max-width: 34ch;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.sim-note.on {
  opacity: 1;
  transform: none;
}

.sim-choices {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.sim-choice {
  text-align: left;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid var(--hairline);
  border-radius: 14px;
  padding: 13px 17px;
  min-height: 44px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease-out), transform 0.3s var(--ease-out),
    border-color 0.2s ease, background-color 0.2s ease;
  transition-delay: var(--choice-delay, 0s), 0s, 0s, 0s;
}

.sim-choice.on {
  opacity: 1;
  transform: none;
}

.sim-choice:hover {
  border-color: var(--red);
  background: #fffdf6;
}

.sim-choice:active {
  transform: scale(0.96);
}

.sim-outcome {
  margin-top: 26px;
}

.sim-wins {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sim-win {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: 999px;
  padding: 9px 14px;
  border: 1.5px dashed var(--hairline);
  color: var(--ink-2);
  opacity: 0.5;
  transform: scale(0.92);
  transition: opacity 0.4s ease, transform 0.45s var(--ease-out),
    border-color 0.4s ease, background-color 0.4s ease, box-shadow 0.4s ease;
  transition-delay: var(--win-delay, 0s);
}

.sim-win.shown {
  opacity: 0.55;
  transform: scale(1);
}

.sim-win.earned {
  opacity: 1;
  border: 1.5px solid transparent;
  background: #fffdf6;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  transform: scale(1);
}

.sim-win-dot {
  width: 10px;
  height: 10px;
  border-radius: 45% 55% 52% 48% / 55% 46% 54% 45%;
  flex: none;
  opacity: 0.5;
  transition: opacity 0.4s ease;
}

.sim-win.earned .sim-win-dot {
  opacity: 1;
}

.sim-light {
  display: inline-block;
  margin-top: 16px;
  background: var(--amber);
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 750;
  border-radius: 999px;
  padding: 9px 18px;
  opacity: 0;
  transform: scale(0.6);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.sim-light.zero {
  background: transparent;
  border: 1.5px solid var(--blue);
  color: var(--ink);
}

.sim-light.show {
  opacity: 1;
  transform: scale(1);
}

.sim-meaning {
  margin-top: 18px;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 2vw, 1.55rem);
  line-height: 1.35;
  text-wrap: pretty;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.6s var(--ease-out) 0.15s, transform 0.6s var(--ease-out) 0.15s;
}

.sim-meaning.on {
  opacity: 1;
  transform: none;
}

.sim-again {
  margin-top: 22px;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  background: transparent;
  border: 1.5px solid var(--hairline);
  border-radius: 999px;
  padding: 11px 19px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s, border-color 0.2s ease, transform 0.2s var(--ease-out);
}

.sim-again.on {
  opacity: 1;
}

.sim-again:hover {
  border-color: var(--red);
}

.sim-again:active {
  transform: scale(0.96);
}

/* ============================================================
   6 · THE TRAIL
   ============================================================ */
.trail-section .section-inner {
  text-align: center;
}

.trail-section .section-title {
  margin-inline: auto;
  max-width: 24ch;
}

.trail-section .section-sub {
  margin-inline: auto;
}

.trail {
  position: relative;
  max-width: 860px;
  margin: clamp(50px, 7vh, 84px) auto 0;
  padding: 20px 0 30px;
}

.trail-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.trail-path-bg,
.trail-path {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.trail-path-bg {
  stroke: var(--amber);
  opacity: 0.5;
  stroke-dasharray: 0.1 13;
}

.trail-path {
  stroke: var(--red);
}

.trail-stops {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(54px, 9vh, 92px);
}

.trail-stop {
  display: flex;
  align-items: center;
  gap: 17px;
  width: min(400px, 78%);
}

.trail-stop:nth-child(odd) {
  margin-right: auto;
  margin-left: 4%;
}

.trail-stop:nth-child(even) {
  margin-left: auto;
  margin-right: 4%;
  flex-direction: row-reverse;
  text-align: right;
}

@media (min-width: 760px) {
  .trail-stop:nth-child(odd) { margin-left: 12%; }
  .trail-stop:nth-child(even) { margin-right: 12%; }
}

.trail-stop[data-tone="red"] { --stop-color: var(--red); --stop-num: var(--cream); }
.trail-stop[data-tone="amber"] { --stop-color: var(--amber); --stop-num: var(--ink); }
.trail-stop[data-tone="blue"] { --stop-color: var(--blue); --stop-num: var(--cream); }
.trail-stop[data-tone="ink"] { --stop-color: var(--ink); --stop-num: var(--cream); }

.stop-dot {
  width: 47px;
  height: 47px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink-2);
  background: var(--paper);
  border: 2.5px solid var(--stop-color);
  transition: background-color 0.5s ease, color 0.5s ease, transform 0.5s var(--ease-out);
}

.trail-stop.lit .stop-dot {
  background: var(--stop-color);
  color: var(--stop-num);
  animation: stop-pop 0.55s var(--ease-out);
}

@keyframes stop-pop {
  0% { transform: scale(0.75); }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); }
}

.stop-text h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.9vw, 1.7rem);
  letter-spacing: -0.005em;
  color: var(--ink-2);
  transition: color 0.5s ease;
}

.trail-stop.lit .stop-text h3 {
  color: var(--ink);
}

.stop-text p {
  margin-top: 3px;
  font-size: 0.9rem;
  color: var(--ink-2);
  opacity: 0.85;
}

/* marquee of quest stubs */
.marquee-block {
  margin-top: clamp(64px, 9vh, 110px);
}

.marquee-caption {
  text-align: center;
  font-size: 0.92rem;
  letter-spacing: 0.03em;
  color: var(--ink-2);
  padding: 0 20px;
}

.marquee {
  margin-top: 22px;
  display: grid;
  gap: 12px;
  overflow: clip;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.marquee-row {
  display: flex;
  width: max-content;
}

.marquee-track {
  display: flex;
  gap: 12px;
  padding-right: 12px;
  animation: marquee-drift 52s linear infinite;
}

.marquee-right .marquee-track {
  animation-direction: reverse;
  animation-duration: 60s;
}

.marquee:hover .marquee-track,
.marquee.paused .marquee-track,
.marquee.offscreen .marquee-track {
  animation-play-state: paused;
}

@keyframes marquee-drift {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.marquee-track li {
  display: inline-flex;
}

.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
  background: #fbf3e0;
  border: 1px solid var(--hairline);
  border-left: 1px dashed var(--hairline);
  border-radius: 7px;
  padding: 10px 17px 10px 19px;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out),
    background-color 0.25s ease, color 0.25s ease;
}

.chip::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--hairline);
  transform: translateY(-50%);
}

.chip:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.chip:active {
  transform: scale(0.96);
}

.chip.active {
  background: var(--ink);
  color: var(--paper);
}

.marquee-track i {
  width: 10px;
  height: 10px;
  border-radius: 45% 55% 52% 48% / 55% 46% 54% 45%;
  flex: none;
}

/* quest viewer */
.quest-viewer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.55s var(--ease-out);
}

.quest-viewer.open {
  grid-template-rows: 1fr;
}

.qv-card {
  overflow: hidden;
  max-width: 620px;
  margin: 0 auto;
  background: var(--card);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.45s var(--ease-out) 0.1s, transform 0.45s var(--ease-out) 0.1s;
}

.quest-viewer.open .qv-card {
  opacity: 1;
  transform: none;
}

.qv-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 20px 0 26px;
}

.qv-chapter {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--qv-color, var(--amber));
  padding: 6px 12px;
  border-radius: 6px;
}

.qv-chapter.tone-red,
.qv-chapter.tone-blue,
.qv-chapter.tone-ink {
  color: var(--cream);
}

.qv-close {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--hairline);
  background: transparent;
  color: var(--ink-2);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out);
}

.qv-close:hover {
  background: var(--paper);
  color: var(--ink);
}

.qv-close:active {
  transform: scale(0.96);
}

.qv-title {
  font-family: var(--font-display);
  font-size: 1.9rem;
  letter-spacing: -0.005em;
  padding: 14px 26px 0;
}

.qv-instruction {
  padding: 8px 26px 0;
  color: var(--ink-2);
  font-size: 0.97rem;
  line-height: 1.55;
}

.qv-phrase {
  margin: 14px 26px 0;
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  background: color-mix(in srgb, var(--amber) 30%, transparent);
  border-radius: 10px;
  padding: 8px 13px;
}

.qv-phrase:empty {
  display: none;
}

.qv-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px 24px;
  font-size: 0.85rem;
  color: var(--ink-2);
}

.qv-meta i {
  width: 9px;
  height: 9px;
  border-radius: 45% 55% 52% 48% / 55% 46% 54% 45%;
}

/* ============================================================
   7 · WHAT WE NEVER SCORE
   ============================================================ */
.never-section {
  background: var(--ink);
  color: var(--cream);
  border-radius: clamp(22px, 4vw, 40px);
  margin: 0 clamp(10px, 2vw, 26px);
  padding-top: clamp(90px, 13vh, 150px);
  padding-bottom: clamp(90px, 13vh, 150px);
}

.never-title {
  color: var(--cream);
  text-align: center;
}

.never-list {
  margin: clamp(44px, 6vh, 70px) auto 0;
  max-width: 620px;
  display: grid;
  gap: clamp(16px, 2.6vh, 26px);
  text-align: center;
}

.never-item {
  position: relative;
  justify-self: center;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.6vw, 2.7rem);
  letter-spacing: -0.005em;
  line-height: 1.15;
  color: var(--cream);
  transition: opacity 0.7s ease;
}

.never-item::after {
  content: "";
  position: absolute;
  left: -3%;
  right: -3%;
  top: 55%;
  height: 0.085em;
  border-radius: 99px;
  background: var(--red);
  transform: scaleX(0) rotate(var(--tilt, -1deg));
  transform-origin: left center;
  transition: transform 0.65s cubic-bezier(0.7, 0, 0.3, 1);
}

.never-item:nth-child(1) { --tilt: -1.3deg; }
.never-item:nth-child(2) { --tilt: 1deg; }
.never-item:nth-child(3) { --tilt: -0.8deg; }
.never-item:nth-child(4) { --tilt: 1.2deg; }
.never-item:nth-child(5) { --tilt: -1.1deg; }

.never-item.is-struck {
  opacity: 0.5;
}

.never-item.is-struck::after {
  transform: scaleX(1) rotate(var(--tilt, -1deg));
}

.never-affirm {
  margin: clamp(48px, 7vh, 76px) auto 0;
  text-align: center;
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1.45rem, 2.6vw, 2rem);
  letter-spacing: -0.005em;
  max-width: 30ch;
  color: var(--amber);
}

.never-facts {
  margin: clamp(40px, 5vh, 60px) auto 0;
  max-width: 680px;
  display: grid;
  gap: 14px;
}

.never-facts li {
  background: color-mix(in srgb, var(--cream) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--cream) 14%, transparent);
  border-radius: 14px;
  padding: 15px 20px;
  font-size: 0.97rem;
  line-height: 1.55;
  color: color-mix(in srgb, var(--cream) 86%, transparent);
}

.never-facts strong {
  color: var(--cream);
  font-weight: 700;
}

/* ============================================================
   8 · FINAL CTA + FOOTER
   ============================================================ */
.cta-section {
  overflow: clip;
  text-align: center;
  padding-top: clamp(110px, 16vh, 190px);
  padding-bottom: clamp(110px, 15vh, 170px);
}

.cta-inner {
  display: grid;
  justify-items: center;
  max-width: 680px;
}

.cta-inner .section-sub {
  margin-inline: auto;
  text-align: center;
}

.cta-icon {
  border-radius: 22.5%;
  box-shadow: var(--shadow-card);
  margin-bottom: 26px;
}

.cta-title {
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  max-width: 15ch;
}

.cta-title em {
  font-style: italic;
}

.cta-inner > div {
  margin-top: 30px;
  display: grid;
  justify-items: center;
  gap: 10px;
}

.cta-scrawl {
  font-size: 1.35rem;
}

.cta-inner .fineprint {
  margin-top: 18px;
}

/* footer */
.footer {
  border-top: 1px solid var(--hairline);
  text-align: center;
  padding: 44px 24px calc(46px + env(safe-area-inset-bottom));
}

.footer-line {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--ink);
}

.footer-meta {
  margin-top: 10px;
  font-size: 0.82rem;
  color: var(--ink-2);
  letter-spacing: 0.02em;
}

/* ============================================================
   Delights — the little light, the wave, the toast
   ============================================================ */
.companion {
  position: fixed;
  top: 0;
  left: 0;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 14px 4px color-mix(in srgb, var(--amber) 45%, transparent);
  z-index: 30;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.9s ease;
}

.companion.on {
  opacity: 0.95;
}

.hey-toast {
  position: fixed;
  bottom: calc(28px + env(safe-area-inset-bottom));
  left: 50%;
  translate: -50% 0;
  background: var(--red);
  color: var(--cream);
  font-size: 0.98rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 20px 20px 6px 20px;
  box-shadow: var(--shadow-card);
  z-index: 55;
  opacity: 0;
  transform: translateY(14px) scale(0.94);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
  pointer-events: none;
}

.hey-toast.on {
  opacity: 1;
  transform: none;
}

/* ============================================================
   Reduced motion — everything settles into stillness
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .phone,
  .ph-ring span,
  .marquee-track,
  .store-badge,
  .rotator {
    animation: none;
  }

  .js [data-rise],
  .js [data-rise-group] > *,
  .bubble,
  .sim-choice,
  .sim-note,
  .sim-meaning,
  .sim-win,
  .sim-again {
    opacity: 1;
    transform: none;
    transition: opacity 0.4s ease;
  }

  .flip-a::after {
    transition-delay: 0s;
  }

  .js .flip.is-in .flip-b {
    transition-delay: 0.1s, 0.1s;
  }

  .trail-stop.lit .stop-dot {
    animation: none;
  }

  .companion {
    display: none;
  }

  .souvenir {
    transform: rotate(var(--rot, 0deg));
  }

  .develop {
    filter: none;
    transition: none;
  }

  .hello-script.waving .hello-svg,
  .ph-done.is-active .ph-done-glow {
    animation: none;
  }

  .never-item::after,
  .ph-view,
  .ph-check,
  .ph-check::after,
  .ph-light,
  .quest-viewer,
  .qv-card,
  .sim-light {
    transition-duration: 0.2s;
  }

  .scrap.me .scrap-check path {
    transition-duration: 0.05s;
  }

  .ache-tally.pop,
  .ache-wall.cluster li {
    animation: none;
  }
}
