/* Chalkline launch site. Tokens are the app's own (docs/DESIGN.md). */
:root {
  color-scheme: light dark;
  /* paper (page) */
  --bg: #faf6ef;
  --bg-glow: #fdeee6;
  --surface: #ffffff;
  --surface-sunken: #f1ebe0;
  --text: #24201c;
  --text-muted: #6b6259;
  --border: #e4dccf;
  --border-strong: #cbbfae;
  /* tomato */
  --accent: #d6402b;
  --accent-strong: #b8321f;
  --accent-soft: #fbe3dd;
  --on-accent: #ffffff;
  --focus: #1f6feb;
  /* board (charcoal, chalk) */
  --board: #1f2321;
  --board-raised: #2a2f2c;
  --board-rule: #3b413d;
  --chalk: #f4f1ea;
  --chalk-muted: #b5b0a6;
  /* status pills, exactly as in the app */
  --open-bg: #1e7a46;
  --open-text: #ffffff;
  --closing-bg: #f2b33d;
  --closing-text: #2a1d00;
  --closed-bg: #5d625f;
  --closed-text: #ffffff;
  /* shadows tinted with warm ink */
  --shadow-sm: 0 1px 2px rgb(36 32 28 / 0.06), 0 2px 6px rgb(36 32 28 / 0.05);
  --shadow-md: 0 2px 4px rgb(36 32 28 / 0.06), 0 10px 24px -6px rgb(36 32 28 / 0.12);
  --shadow-lg: 0 4px 8px rgb(36 32 28 / 0.06), 0 30px 60px -20px rgb(36 32 28 / 0.28);
  --shadow-accent: 0 6px 18px -6px rgb(214 64 43 / 0.55);

  /* site-only tokens */
  --chalk-accent: #ff7a63; /* --accent fails AA as small text on charcoal */
  --font-display:
    "Nunito", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  --font-chalk: "Caveat", "Bradley Hand", cursive;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --rhythm: clamp(5rem, 12vw, 9rem);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --switch-w: 3.25rem;
  --switch-h: 1.875rem;
  --switch-thumb: 1.375rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #171513;
    --bg-glow: #24170f;
    --surface: #221f1c;
    --surface-sunken: #1b1917;
    --text: #f3eee6;
    --text-muted: #a89f94;
    --border: #3a352f;
    --border-strong: #544c43;
    --accent: #f0604a;
    --accent-strong: #ff7a63;
    --accent-soft: #3d1f19;
    --on-accent: #1a0904;
    --focus: #7ab4ff;
    --board: #141716;
    --board-raised: #1e2220;
    --board-rule: #2e3431;
    --chalk: #f4f1ea;
    --chalk-muted: #a39e94;
    --open-bg: #34b36b;
    --open-text: #04210f;
    --closing-bg: #f5c25a;
    --closing-text: #2a1d00;
    --closed-bg: #4a4f4c;
    --closed-text: #f4f1ea;
    --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.4);
    --shadow-md: 0 10px 24px -6px rgb(0 0 0 / 0.5);
    --shadow-lg: 0 30px 60px -20px rgb(0 0 0 / 0.7);
    --shadow-accent: 0 6px 18px -6px rgb(240 96 74 / 0.5);
    /* the logo's board gets a rule so it doesn't vanish on dark paper */
    --logo-rule: var(--board-rule);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 64px;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-x: clip;
  overflow-wrap: anywhere;
}

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

ul,
ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
}

em {
  font-style: normal;
  font-weight: 700;
}

svg {
  display: block;
}

.sprite {
  position: absolute;
}

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

a,
button {
  -webkit-tap-highlight-color: transparent;
  transition: transform 120ms var(--ease-out);
}

a:active,
button:active {
  transform: scale(0.97);
}

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

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  font-weight: 700;
  transform: translateY(-200%);
}

.skip-link:focus-visible {
  transform: none;
}

.container {
  width: 100%;
  max-width: calc(72rem + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 1.5rem;
}

.grid > * {
  grid-column: 1 / -1;
}

.span-8 {
  grid-column: 3 / span 8;
}

.centred {
  text-align: center;
}

.centred-text {
  margin-inline: auto;
}

@media (max-width: 860px) {
  .span-8 {
    grid-column: 1 / -1;
  }
}

/* ---------- Type ---------- */
.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent-strong);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow--chalk {
  color: var(--chalk-accent);
}

.h2,
.hero__title,
.closing__title {
  font-family: var(--font-display);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
  text-wrap: balance;
}

.h2 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
}

.h3 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.25;
}

.body {
  max-width: 60ch;
  margin-top: 1.25rem;
  color: var(--text-muted);
}

/* ---------- Pills (buttons) ---------- */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 1.25rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    transform 120ms var(--ease-out),
    background-color 160ms var(--ease-out),
    border-color 160ms var(--ease-out);
}

.pill--big {
  min-height: 52px;
  padding: 0 1.5rem;
  font-size: 1.0625rem;
}

.pill--small {
  font-size: 0.9375rem;
}

.pill--primary {
  background-color: var(--accent);
  color: var(--on-accent);
  box-shadow: var(--shadow-accent);
}

.pill--quiet {
  border: 1.5px solid var(--border-strong);
  color: var(--text);
  white-space: normal;
  text-align: center;
}

.pill__arrow {
  width: 1.25rem;
  height: 1.25rem;
  transition: transform 160ms var(--ease-out);
}

@media (hover: hover) {
  .pill--primary:hover {
    background-color: var(--accent-strong);
  }

  .pill--primary:hover .pill__arrow {
    transform: translateX(3px);
  }

  .pill--quiet:hover {
    border-color: var(--text-muted);
    background-color: var(--surface);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 64px;
  border-bottom: 1px solid transparent;
  transition: border-color 200ms var(--ease-out);
}

.site-header.is-scrolled {
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom-color: var(--border);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 100%;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  text-decoration: none;
}

.brand__mark {
  width: 32px;
  height: 32px;
  flex: none;
}

.brand__word {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  border-radius: 999px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  transition:
    transform 120ms var(--ease-out),
    background-color 160ms var(--ease-out);
}

.site-nav .pill {
  margin-left: 0.5rem;
}

@media (hover: hover) {
  .site-nav__link:hover {
    color: var(--text);
    background-color: var(--surface-sunken);
  }
}

@media (max-width: 639px) {
  .site-nav__link {
    display: none;
  }
}

/* ---------- Status pills and badges (as in the app) ---------- */
.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.875rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill--open {
  background-color: var(--open-bg);
  color: var(--open-text);
}

.status-pill--closing {
  background-color: var(--closing-bg);
  color: var(--closing-text);
}

.status-pill--closed {
  background-color: var(--closed-bg);
  color: var(--closed-text);
}

.sold-badge {
  display: inline-block;
  padding: 0.125rem 0.5rem;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  transform: rotate(-3deg);
}

/* ---------- 1. Hero ---------- */
.hero {
  position: relative;
  margin-top: -64px;
  padding-top: calc(64px + 2rem);
  padding-bottom: 3rem;
  background: radial-gradient(ellipse 70% 55% at 50% 0%, var(--bg-glow), transparent 70%);
}

.hero__grid {
  align-items: center;
  row-gap: 3.5rem;
  min-height: min(88vh, 52rem);
}

.hero__copy {
  grid-column: 1 / span 6;
}

.hero__art {
  grid-column: 7 / span 6;
  position: relative;
  padding: 0 24px 24px 0;
}

.hero__title {
  font-size: clamp(2.75rem, 8vw, 5.5rem);
  overflow-wrap: normal;
}

.line {
  display: block;
}

.line--accent {
  color: var(--accent-strong);
}

.hero__sub {
  max-width: 34ch;
  margin-top: 1.5rem;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1.5;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.hero__fine {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

.hero__paper {
  position: absolute;
  inset: 24px 0 0 24px;
  background: var(--accent-soft);
  border: 2px dashed var(--border-strong);
  border-radius: 28px;
  transform: rotate(-1.5deg);
}

.hero-board {
  position: relative;
  padding: clamp(1.5rem, 4vw, 2.25rem);
  background: var(--board);
  color: var(--chalk);
  border-radius: 28px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1.5deg);
}

.hero-board__eyebrow {
  color: var(--chalk-muted);
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.hero-board__truck {
  margin-top: 0.25rem;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.hero-board__pill {
  display: inline-grid;
  margin-top: 1rem;
  background-color: var(--open-bg);
}

.hero-pill__text {
  grid-area: 1 / 1;
}

.hero-pill__text--1,
.hero-pill__text--3 {
  color: var(--closing-text);
  opacity: 0;
}

.hero-pill__text--2 {
  color: var(--open-text);
}

.hero-board__loc {
  margin-top: 1rem;
  font-weight: 600;
}

.hero-board__note {
  color: var(--chalk-muted);
}

.hero-board__hours {
  margin-top: 0.25rem;
  font-weight: 600;
}

.hero-board__items {
  margin-top: 1.25rem;
  padding-top: 0.5rem;
  border-top: 2px dashed var(--board-rule);
}

.board-row {
  position: relative;
  display: grid;
  padding: 0.75rem 0;
}

.board-row + .board-row {
  border-top: 1px solid var(--board-rule);
}

.board-row__top {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 800;
}

.board-row__name {
  position: relative;
}

.board-row__desc {
  color: var(--chalk-muted);
  font-size: 0.9375rem;
}

.board-row--brisket .board-row__top,
.board-row--brisket .board-row__desc {
  opacity: 0.45;
}

.board-row__strike {
  position: absolute;
  left: -4px;
  right: -4px;
  top: 50%;
  width: calc(100% + 8px);
  height: 12px;
  transform: translateY(-50%);
  overflow: visible;
}

.board-row__strike path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.board-row--brisket .board-row__desc {
  padding-right: 6rem;
}

.board-row__badge {
  position: absolute;
  right: 0;
  bottom: 0.7rem;
}

/* The 9-second hero loop. The static styles above are its end state. */
@media (prefers-reduced-motion: no-preference) {
  .hero-board__pill {
    animation: hero-pill-bg 9s 600ms linear infinite both;
  }

  .hero-pill__text--1 {
    animation: hero-pill-1 9s 600ms linear infinite both;
  }

  .hero-pill__text--2 {
    animation: hero-pill-2 9s 600ms linear infinite both;
  }

  .hero-pill__text--3 {
    animation: hero-pill-3 9s 600ms linear infinite both;
  }

  .board-row__strike path {
    animation: hero-strike 9s 600ms linear infinite both;
  }

  .board-row--brisket .board-row__top,
  .board-row--brisket .board-row__desc {
    animation: hero-dim 9s 600ms linear infinite both;
  }

  .board-row__badge {
    animation: hero-stamp 9s 600ms linear infinite both;
  }
}

@keyframes hero-pill-bg {
  0%,
  21.5% {
    background-color: var(--closing-bg);
  }
  23.7%,
  53.5% {
    background-color: var(--open-bg);
  }
  55.7%,
  100% {
    background-color: var(--closing-bg);
  }
}

@keyframes hero-pill-1 {
  0%,
  21.5% {
    opacity: 1;
  }
  23.7%,
  95.5% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

@keyframes hero-pill-2 {
  0%,
  21.5% {
    opacity: 0;
  }
  23.7%,
  53.5% {
    opacity: 1;
  }
  55.7%,
  100% {
    opacity: 0;
  }
}

@keyframes hero-pill-3 {
  0%,
  53.5% {
    opacity: 0;
  }
  55.7%,
  95.5% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes hero-strike {
  0%,
  33% {
    stroke-dashoffset: 1;
    opacity: 1;
    animation-timing-function: var(--ease-out);
  }
  38.5%,
  95.5% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  100% {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes hero-dim {
  0%,
  33% {
    opacity: 1;
  }
  38.5%,
  95.5% {
    opacity: 0.45;
  }
  100% {
    opacity: 1;
  }
}

@keyframes hero-stamp {
  0%,
  38.5% {
    opacity: 0;
    transform: rotate(-3deg) scale(1.15);
  }
  40.5%,
  95.5% {
    opacity: 1;
    transform: rotate(-3deg) scale(1);
  }
  100% {
    opacity: 0;
    transform: rotate(-3deg) scale(1);
  }
}

@media (max-width: 860px) {
  .hero__grid {
    min-height: 0;
  }

  .hero__copy,
  .hero__art {
    grid-column: 1 / -1;
  }

  .hero__art {
    padding: 0;
  }

  .hero-board,
  .hero__paper {
    transform: none;
  }

  .hero__paper {
    display: none;
  }
}

/* ---------- Sections ---------- */
.section,
.isnt {
  padding-top: var(--rhythm);
}

.isnt {
  padding-bottom: var(--rhythm);
}

/* ---------- 2. The problem ---------- */
.guesses {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.75rem 2.25rem;
  margin-top: 3rem;
}

.guess s {
  position: relative;
  display: inline-block;
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  text-decoration: none;
}

.guess s::after {
  content: "";
  position: absolute;
  left: -4px;
  right: -4px;
  top: 52%;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
  transform: rotate(-1.5deg);
  transform-origin: left center;
}

.guesses__answer {
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
}

@media (max-width: 639px) {
  .guesses {
    flex-direction: column;
    align-items: center;
  }
}

/* ---------- Charcoal board bands ---------- */
.board-band {
  position: relative;
  margin-top: var(--rhythm);
  padding-block: clamp(5rem, 10vw, 7.5rem);
  background: var(--board);
  color: var(--chalk);
}

.board-band::before,
.board-band::after {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  border-top: 2px dashed var(--board-rule);
}

.board-band::before {
  top: 24px;
}

.board-band::after {
  bottom: 24px;
}

/* ---------- 3. How it works ---------- */
.rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2rem;
  margin-top: 4rem;
}

.rail::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(2.25rem + 0.5rem + 6px);
  border-top: 2px dashed var(--chalk-muted);
  transform-origin: left center;
}

.rail__stop {
  position: relative;
}

.rail__time {
  display: block;
  height: 2.25rem;
  color: var(--chalk-muted);
  font-family: var(--font-chalk);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2.25rem;
}

.rail__dot {
  display: block;
  width: 14px;
  height: 14px;
  margin: 0.5rem 0 1.5rem;
  border-radius: 50%;
  background: var(--chalk);
  box-shadow: 0 0 0 5px var(--board);
}

.rail__step p {
  max-width: 60ch;
  margin-top: 0.5rem;
  color: var(--chalk-muted);
}

.mini {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.chalk-pill {
  display: inline-grid;
  align-items: center;
  min-height: 2.25rem;
  padding: 0 1rem;
  border: 2px solid var(--chalk);
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.9375rem;
}

.mini__posted {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--open-bg);
  font-weight: 700;
  font-size: 0.9375rem;
}

@media (prefers-color-scheme: light) {
  .mini__posted {
    color: #4fc884; /* the app's green, lifted for AA on charcoal */
  }
}

.mini__posted svg {
  width: 1.125rem;
  height: 1.125rem;
}

.mini__posted path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mini__muted {
  color: var(--chalk-muted);
  font-size: 0.875rem;
}

.mini-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--chalk);
  font-weight: 700;
  font-size: 0.9375rem;
}

.mini-switch__track {
  position: relative;
  width: var(--switch-w);
  height: var(--switch-h);
  border-radius: 999px;
  border: 1px solid var(--accent);
  background-color: var(--accent);
  transition:
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out);
}

.mini-switch__track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.25rem;
  width: var(--switch-thumb);
  height: var(--switch-thumb);
  border-radius: 999px;
  background: var(--chalk);
  transform: translate(calc(var(--switch-w) - var(--switch-thumb) - 0.5rem - 2px), -50%);
  transition: transform 260ms var(--ease-spring);
}

.copy-pill > span {
  grid-area: 1 / 1;
  text-align: center;
  transition: opacity 200ms var(--ease-out);
}

.copy-pill__a {
  opacity: 0;
}

@media (max-width: 860px) {
  .rail {
    grid-template-columns: minmax(0, 1fr);
    gap: 2.5rem;
    padding-left: 2.25rem;
  }

  .rail::before {
    left: 6px;
    right: auto;
    top: 0.5rem;
    bottom: 0.5rem;
    border-top: 0;
    border-left: 2px dashed var(--chalk-muted);
    transform-origin: center top;
  }

  .rail__time {
    height: auto;
  }

  .rail__dot {
    position: absolute;
    left: calc(-2.25rem);
    top: 0.75rem;
    margin: 0;
  }
}

/* ---------- 4. Try it ---------- */
.try__grid {
  margin-top: 3.5rem;
  row-gap: 2rem;
  align-items: start;
}

.try__stage {
  grid-column: 6 / span 7;
  grid-row: 1;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}

.try__controls {
  grid-column: 1 / span 5;
  grid-row: 1;
  align-self: center;
}

/* Frame inner is always 390×760; on short viewports main.js sets --phone-scale and this
   wrapper takes the scaled size so the layout leaves no gap. */
.phone-fit {
  flex: none;
  width: calc(414px * var(--phone-scale, 1));
  height: calc(784px * var(--phone-scale, 1));
}

.phone {
  position: relative;
  width: 414px;
  height: 784px;
  padding: 12px;
  transform: scale(var(--phone-scale, 1));
  transform-origin: 0 0;
  background: #111312;
  border-radius: 48px;
  box-shadow: var(--shadow-lg);
}

.phone::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  z-index: 1;
  width: 90px;
  height: 24px;
  margin-left: -45px;
  border-radius: 999px;
  background: #111312;
}

/* The board needs about 870px of height at 390 wide to show Churros, so the app renders
   at 1/0.84 of the frame and is scaled back down to fill the 390×760 screen exactly. */
.phone__screen {
  --screen-zoom: 0.84;
  display: block;
  width: calc(100% / var(--screen-zoom));
  height: calc(100% / var(--screen-zoom));
  border: 0;
  border-radius: calc(36px / var(--screen-zoom));
  background: var(--bg);
  transform: scale(var(--screen-zoom));
  transform-origin: 0 0;
}

.try__note {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  max-width: 10rem;
  color: var(--text-muted);
  font-family: var(--font-chalk);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.15;
}

.try__note-arrow {
  width: 80px;
  height: 60px;
  order: 1;
}

.try__note-arrow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.try__noscript {
  flex-basis: 100%;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.control-card {
  padding: 1.75rem;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

.control-card__sub {
  color: var(--text-muted);
}

.control-list {
  margin-top: 1rem;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 56px;
}

.control-row + .control-row {
  border-top: 1px solid var(--border);
}

.control-row__name {
  font-family: var(--font-display);
  font-weight: 800;
}

.control-row__price {
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* The app's sold-out switch */
.demo-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0 0.25rem;
  background: none;
  border: 0;
  border-radius: 999px;
  color: var(--accent-strong);
  font: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.demo-switch__track {
  position: relative;
  flex: none;
  width: var(--switch-w);
  height: var(--switch-h);
  background-color: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  transition:
    background-color 200ms var(--ease-out),
    border-color 200ms var(--ease-out);
}

.demo-switch__track::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0.25rem;
  width: var(--switch-thumb);
  height: var(--switch-thumb);
  background: var(--surface);
  border-radius: 999px;
  box-shadow: var(--shadow-md);
  transform: translateY(-50%);
  transition: transform 200ms var(--ease-spring);
}

.demo-switch[aria-checked="true"] .demo-switch__track {
  background-color: var(--accent);
  border-color: var(--accent);
}

.demo-switch[aria-checked="true"] .demo-switch__track::after {
  transform: translate(calc(var(--switch-w) - var(--switch-thumb) - 0.5rem - 2px), -50%);
}

@media (hover: hover) {
  .demo-switch:hover .demo-switch__track {
    border-color: var(--text-muted);
  }

  .demo-switch[aria-checked="true"]:hover .demo-switch__track {
    border-color: var(--accent);
  }
}

.control-card__summary {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.try__hint {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.quiet-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-top: 0.5rem;
}

.quiet-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.25em;
}

@media (hover: hover) {
  .quiet-link:hover {
    text-decoration-color: currentColor;
  }
}

.try__honest {
  max-width: 60ch;
  margin-top: 2.5rem;
  color: var(--text-muted);
  font-size: 0.875rem;
}

@media (max-width: 860px) {
  .try__stage,
  .try__controls {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .phone-fit {
    width: 100%;
    height: auto;
  }

  .phone {
    width: 100%;
    height: auto;
    padding: 0;
    transform: none;
    background: none;
    border-radius: 24px;
  }

  .phone::before,
  .try__note {
    display: none;
  }

  .phone__screen {
    width: 100%;
    height: 680px;
    border: 1px solid var(--border);
    border-radius: 24px;
    transform: none;
  }
}

/* Phone: stack price under the name so every name keeps one line. */
@media (max-width: 639px) {
  .control-card {
    padding: 1.25rem;
  }

  .control-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "name switch"
      "price switch";
    row-gap: 0;
    padding-block: 0.5rem;
  }

  .control-row__name {
    grid-area: name;
  }

  .control-row__price {
    grid-area: price;
    font-size: 0.875rem;
  }

  .demo-switch {
    grid-area: switch;
  }
}

/* ---------- 5. Features ---------- */
.bento {
  margin-top: 3rem;
  gap: 1.25rem;
}

.tile {
  padding: 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.tile p {
  max-width: 60ch;
  margin-top: 0.5rem;
  color: var(--text-muted);
}

.tile__art {
  display: flex;
  align-items: center;
  min-height: 9rem;
  margin-bottom: 1.5rem;
}

.tile--a {
  grid-column: 1 / span 7;
}

.tile--b {
  grid-column: 8 / span 5;
}

.tile--c {
  grid-column: 1 / span 4;
}

.tile--d {
  grid-column: 5 / span 4;
}

.tile--e {
  grid-column: 9 / span 4;
}

.tile--f {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
}

.pill-fan {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.pill-fan .status-pill {
  box-shadow: var(--shadow-sm);
  transition: transform 240ms var(--ease-spring);
}

.pill-fan .status-pill + .status-pill {
  margin-top: -0.375rem;
}

.pill-fan .status-pill:nth-child(2) {
  margin-left: 1rem;
}

.pill-fan .status-pill:nth-child(3) {
  margin-left: 2rem;
}

.pill-fan .status-pill:nth-child(4) {
  margin-left: 3rem;
}

@media (hover: hover) {
  .tile--a:hover .status-pill:nth-child(2) {
    transform: translateY(4px);
  }

  .tile--a:hover .status-pill:nth-child(3) {
    transform: translateY(8px);
  }

  .tile--a:hover .status-pill:nth-child(4) {
    transform: translateY(12px);
  }
}

.mini-board {
  position: relative;
  width: 100%;
  padding: 1.25rem 1.5rem;
  background: var(--board);
  color: var(--chalk);
  border-radius: 16px;
}

.mini-board__row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.125rem;
}

.mini-board__row,
.mini-board__desc {
  opacity: 0.45;
}

.mini-board__name {
  position: relative;
}

.mini-board__name::after,
.date-chip--struck::after,
.tablet__line--struck::after {
  content: "";
  position: absolute;
  left: -3px;
  right: -3px;
  top: 50%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 3px;
  background: var(--accent);
  transform: rotate(-2deg);
}

.mini-board__desc {
  display: block;
  color: var(--chalk-muted);
  font-size: 0.875rem;
}

.mini-board__badge {
  position: absolute;
  right: 1.25rem;
  bottom: -0.625rem;
}

.date-chips {
  gap: 0.75rem;
}

.date-chip {
  position: relative;
  padding: 0.5rem 0.875rem;
  background: var(--surface-sunken);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.date-chip--struck {
  color: var(--text-muted);
}

.date-chips__arrow,
.price-art__arrow {
  width: 1.5rem;
  height: 1.5rem;
  color: var(--text-muted);
}

.tablet {
  width: 11rem;
  aspect-ratio: 4 / 3;
  padding: 10px;
  border: 2px solid var(--border-strong);
  border-radius: 14px;
}

.tablet__board {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 10px 12px;
  background: var(--board);
  border-radius: 6px;
}

.tablet__truck {
  color: var(--chalk);
  font-family: var(--font-display);
  font-size: 0.625rem;
  font-weight: 900;
}

.tablet__pill {
  width: 2.5rem;
  height: 0.5rem;
  border-radius: 999px;
  background: var(--open-bg);
}

.tablet__line {
  position: relative;
  height: 4px;
  width: 80%;
  border-radius: 4px;
  background: var(--chalk-muted);
}

.tablet__line:nth-of-type(odd) {
  width: 64%;
}

.tablet__line--struck {
  opacity: 0.7;
}

.price-art {
  gap: 0.75rem;
  flex-wrap: wrap;
}

.price-art__inputs {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.input-chip {
  padding: 0.25rem 0.625rem;
  background: var(--surface-sunken);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.875rem;
}

.price-art__out {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.tile--f__text {
  max-width: 44rem;
}

.tag-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag-pill {
  padding: 0.375rem 0.875rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 860px) {
  .bento > .tile {
    grid-column: 1 / -1;
  }

  .tile--f {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ---------- 6. What it isn't ---------- */
.isnt__text {
  max-width: 60ch;
  margin-inline: auto;
  color: var(--text-muted);
  font-size: 1rem;
}

/* ---------- 7. Closing ---------- */
.closing {
  margin-top: 0;
}

.closing__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.closing__mark {
  width: 72px;
  height: 72px;
  --logo-board: var(--board-raised);
  --logo-rule: var(--board-rule);
}

.closing__title {
  margin-top: 1.5rem;
  font-size: clamp(2.25rem, 6vw, 4rem);
  color: var(--chalk);
}

.underline-word {
  position: relative;
  display: inline-block;
}

.underline-word__line {
  position: absolute;
  left: 0;
  bottom: -0.2em;
  width: 100%;
  height: 0.3em;
  overflow: visible;
}

.underline-word__line path {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.closing__body {
  max-width: 60ch;
  margin: 1.5rem 0 2rem;
  color: var(--chalk-muted);
}

.closing__chalk {
  margin-top: 1.25rem;
  color: var(--chalk-muted);
  font-family: var(--font-chalk);
  font-size: 1.375rem;
  font-weight: 600;
}

/* ---------- 8. Footer ---------- */
.site-footer {
  padding-block: 2.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.875rem;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}

.brand--footer {
  min-height: 0;
}

.brand--footer .brand__mark {
  width: 20px;
  height: 20px;
}

.brand--footer .brand__word {
  font-size: 1rem;
}

.site-footer__tag,
.site-footer__made {
  color: var(--text-muted);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
}

.site-footer__nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-weight: 600;
  text-decoration-color: var(--border-strong);
  text-underline-offset: 0.25em;
}

@media (hover: hover) {
  .site-footer__nav a:hover {
    text-decoration-color: currentColor;
  }
}

.site-footer__made {
  margin-top: 1.5rem;
}

/* ---------- Reveals: hidden only with JS and full motion; each fires once ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js [data-reveal] .guess s::after {
    transform: rotate(-1.5deg) scaleX(0);
    transition: transform 500ms var(--ease-out);
  }

  .js [data-reveal] .guess:nth-child(2) s::after {
    transition-delay: 200ms;
  }

  .js [data-reveal] .guess:nth-child(3) s::after {
    transition-delay: 400ms;
  }

  .js [data-reveal].is-in .guess s::after {
    transform: rotate(-1.5deg) scaleX(1);
  }

  .js .rail::before {
    transform: scaleX(0);
    transition: transform 900ms var(--ease-out);
  }

  .js .rail.is-in::before {
    transform: none;
  }

  .js .rail__stop {
    opacity: 0;
    transform: translateY(8px);
    transition:
      opacity 400ms var(--ease-out),
      transform 400ms var(--ease-out);
  }

  .js .rail__stop:nth-child(2) {
    transition-delay: 150ms;
  }

  .js .rail__stop:nth-child(3) {
    transition-delay: 300ms;
  }

  .js .rail.is-in .rail__stop {
    opacity: 1;
    transform: none;
  }

  .js .rail .mini__posted {
    opacity: 0;
    transition: opacity 300ms var(--ease-out) 900ms;
  }

  .js .rail.is-in .mini__posted {
    opacity: 1;
  }

  .js .rail .mini-switch__track {
    background-color: var(--board-raised);
    border-color: var(--board-rule);
    transition-delay: 1200ms;
  }

  .js .rail .mini-switch__track::after {
    transform: translate(0, -50%);
    transition-delay: 1200ms;
  }

  .js .rail.is-in .mini-switch__track {
    background-color: var(--accent);
    border-color: var(--accent);
  }

  .js .rail.is-in .mini-switch__track::after {
    transform: translate(calc(var(--switch-w) - var(--switch-thumb) - 0.5rem - 2px), -50%);
  }

  .js .rail .copy-pill__a {
    opacity: 1;
    transition-delay: 1500ms;
  }

  .js .rail .copy-pill__b {
    opacity: 0;
    transition-delay: 1500ms;
  }

  .js .rail.is-in .copy-pill__a {
    opacity: 0;
  }

  .js .rail.is-in .copy-pill__b {
    opacity: 1;
  }

  /* Each tile reveals on its own; the stagger only runs where tiles share a row. */
  .js .tile[data-reveal] {
    opacity: 0;
    transform: translateY(12px);
    transition:
      opacity 500ms var(--ease-out),
      transform 500ms var(--ease-out);
  }

  @media (min-width: 861px) {
    .js .tile[data-reveal]:nth-child(2) {
      transition-delay: 80ms;
    }

    .js .tile[data-reveal]:nth-child(3) {
      transition-delay: 160ms;
    }

    .js .tile[data-reveal]:nth-child(4) {
      transition-delay: 240ms;
    }

    .js .tile[data-reveal]:nth-child(5) {
      transition-delay: 320ms;
    }

    .js .tile[data-reveal]:nth-child(6) {
      transition-delay: 400ms;
    }
  }

  .js .tile[data-reveal].is-in {
    opacity: 1;
    transform: none;
  }

  .js .closing .underline-word__line path {
    stroke-dashoffset: 1;
    transition: stroke-dashoffset 700ms var(--ease-out) 300ms;
  }

  .js .closing.is-in .underline-word__line path {
    stroke-dashoffset: 0;
  }
}

@media (max-width: 860px) and (prefers-reduced-motion: no-preference) {
  .js .rail::before {
    transform: scaleY(0);
  }
}
