@font-face {
  font-family: "Bricolage";
  src: url("/assets/fonts/bricolage-latin.woff2") format("woff2");
  font-weight: 600 800;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2212;
}

/* Brand colours sampled from the app icon: #e8f2f2 field, #007e7e teal, #33cc97 worm green,
   #bfffcf mint, #002233 ink. The hero and final band stay dark in both schemes. */
:root {
  --bg: #f3f8f7;
  --surface: #ffffff;
  --ink: #06222a;
  --muted: #47605f;
  --teal: #007e7e;
  --teal-ink: #006b6b;
  --green: #33cc97;
  --mint: #bfffcf;
  --line: rgba(0, 34, 51, 0.12);
  --tile: #dcf3ea;
  --tile-2: #c9ebde;
  --hero-bg: #04181b;
  --hero-ink: #eef8f6;
  --hero-muted: #a9c6c2;
  --shadow: 0 1px 2px rgba(0, 34, 51, 0.06), 0 8px 24px rgba(0, 34, 51, 0.08);
  --radius: 22px;
  --display: "Bricolage", ui-rounded, system-ui, -apple-system, "Segoe UI", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #071517;
    --surface: #0c2023;
    --ink: #e8f4f2;
    --muted: #9fbcb8;
    --teal-ink: #5fd6c0;
    --line: rgba(255, 255, 255, 0.1);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    --tile: #123234;
    --tile-2: #0d2729;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--teal-ink); }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
.muted { color: var(--muted); }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }

.skip { position: absolute; left: 16px; top: -100px; background: var(--surface); color: var(--ink); padding: 10px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(60% 70% at 85% 30%, rgba(0, 126, 126, 0.45), transparent 70%),
    radial-gradient(45% 55% at 10% 100%, rgba(51, 204, 151, 0.16), transparent 70%),
    var(--hero-bg);
  color: var(--hero-ink);
  padding-bottom: clamp(40px, 7vw, 96px);
  overflow: hidden;
}
.nav { display: flex; align-items: center; justify-content: space-between; padding-block: 18px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font: 700 1.25rem/1 var(--display); letter-spacing: -0.01em; min-height: 44px; }
.brand img { border-radius: 9px; }
.nav-cta {
  color: var(--hero-bg); background: var(--mint); text-decoration: none; font-weight: 650; font-size: 0.95rem;
  padding: 10px 18px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center;
  transition: background 0.15s ease;
}
.nav-cta:hover { background: #ffffff; }

.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 72px); align-items: center; padding-top: clamp(16px, 4vw, 48px); }
.eyebrow { color: var(--green); font-weight: 650; font-size: 0.95rem; letter-spacing: 0.01em; margin-bottom: 18px; }
.hero h1 { font-size: clamp(2.6rem, 6.4vw, 4.75rem); font-weight: 800; }
.hl { color: var(--mint); }
.lede { color: var(--hero-muted); font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; margin-top: 22px; max-width: 34ch; }
.cta-row { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 24px; margin-top: 34px; }
.badge { display: inline-block; border-radius: 12px; line-height: 0; }
.badge img { width: 180px; height: auto; }
.proof { font-size: 0.95rem; line-height: 1.45; color: var(--hero-ink); white-space: nowrap; }
.proof .muted { color: var(--hero-muted); }
.stars { color: #ffd257; }

.hero-art { position: relative; justify-self: center; width: min(340px, 78vw); }
.phone {
  position: relative; border-radius: 46px; padding: 10px;
  background: linear-gradient(145deg, #2b3c3f, #0d1719 40%, #23393c);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), 0 40px 80px rgba(0, 0, 0, 0.55), 0 0 120px rgba(0, 126, 126, 0.25);
  transform: rotate(2.5deg);
}
.phone img { border-radius: 37px; width: 100%; height: auto; }
.worm-bubble {
  position: absolute; width: 42%; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  background: radial-gradient(75% 75% at 50% 40%, #145250, #0b2e30); box-shadow: 0 0 0 6px var(--hero-bg), 0 18px 40px rgba(0, 0, 0, 0.5);
}
.worm-hero { left: -18%; bottom: 8%; }

/* Worm art is keyed to transparent WebP by scripts/key_clips.py. */
.worm-tile { background: radial-gradient(80% 80% at 50% 35%, var(--tile), var(--tile-2)); border-radius: 18px; overflow: hidden; aspect-ratio: 1; }
.card .worm-tile { aspect-ratio: 16 / 10; display: grid; place-items: center; }
.card .worm-tile .clip { width: 62.5%; height: 100%; }
.worm-tile picture, .worm-bubble picture { display: contents; }
.clip { width: 100%; height: 100%; object-fit: contain; }
.worm-bubble .clip { width: 92%; height: 92%; margin: 8% auto 0; }

/* ---------- Steps ---------- */
section { padding-block: clamp(56px, 9vw, 112px); }
section h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); font-weight: 750; }
.steps h2 { max-width: 18ch; }
.step-grid { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 14px 26px; box-shadow: var(--shadow); }
.card .worm-tile { margin-bottom: 20px; }
.step-n { font: 750 0.85rem/1 var(--display); color: var(--teal-ink); letter-spacing: 0.04em; margin: 0 10px 8px; }
.card h3 { font-size: 1.5rem; margin: 0 10px 8px; }
.card p:last-child { color: var(--muted); margin: 0 10px; }

/* ---------- Ways ---------- */
.ways { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 56px; align-items: center; border-top: 1px solid var(--line); }
.ways-copy p { color: var(--muted); margin-top: 14px; max-width: 40ch; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 12px; }
.chips li {
  display: inline-flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); font-weight: 600; box-shadow: var(--shadow);
}
.chips svg { width: 22px; height: 22px; fill: none; stroke: var(--teal-ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 760px) { .chips { display: grid; grid-template-columns: 1fr 1fr; } }

/* ---------- Features ---------- */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding-top: 0; }
.feature { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.feature .worm-tile { border-radius: 16px; }
.feature h3 { font-size: 1.2rem; margin: 6px 0 6px; }
.feature p { color: var(--muted); font-size: 0.98rem; }

/* ---------- Final CTA ---------- */
.final { background: var(--hero-bg); color: var(--hero-ink); border-block: 1px solid rgba(255, 255, 255, 0.06); }
.final-inner { display: grid; grid-template-columns: 200px 1fr auto; gap: 40px; align-items: center; }
.worm-final { background: none; }
.final h2 { max-width: 16ch; }
.final-copy p { color: var(--hero-muted); margin: 12px 0 24px; }
.qr { margin: 0; text-align: center; max-width: 168px; }
.qr img { background: #fff; padding: 12px; border-radius: 16px; width: 156px; height: 156px; margin-inline: auto; }
.qr figcaption { color: var(--hero-muted); font-size: 0.85rem; line-height: 1.4; margin-top: 10px; }

/* ---------- Footer ---------- */
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-block: 28px 40px; font-size: 0.95rem; }
.foot-brand { display: inline-flex; align-items: center; gap: 8px; font: 700 1.05rem/1 var(--display); }
.foot-brand img { border-radius: 6px; }
.foot nav { display: flex; gap: 4px 20px; flex-wrap: wrap; }
.foot nav a { color: var(--ink); text-decoration: none; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }
.foot nav a:hover { color: var(--teal-ink); text-decoration: underline; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr; max-width: 640px; }
  .ways { grid-template-columns: 1fr; }
  .final-inner { grid-template-columns: 140px 1fr; }
  .qr { display: none; }
}
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { margin-top: 12px; width: min(300px, 74vw); }
  .worm-hero { left: -14%; }
  .step-grid { grid-template-columns: 1fr; max-width: 460px; }
  .card { display: grid; grid-template-columns: 112px 1fr; gap: 0 16px; padding: 14px; align-items: center; }
  .card .worm-tile { grid-row: span 3; margin: 0; aspect-ratio: 1; }
  .card .worm-tile .clip { width: 100%; }
  .card .step-n, .card h3, .card p:last-child { margin-inline: 0; }
  .card h3 { margin-bottom: 4px; }
  .final-inner { grid-template-columns: 1fr; text-align: left; gap: 20px; }
  .worm-final { width: 120px; }
}
@media (max-width: 380px) {
  .card { grid-template-columns: 1fr; }
  .card .worm-tile { width: 120px; grid-row: auto; margin-bottom: 14px; }
  .feature { grid-template-columns: 72px 1fr; }
}
@media (hover: none), (pointer: coarse) { .qr { display: none; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- 404 ---------- */
.nf-main { min-height: 100vh; min-height: 100svh; display: grid; place-content: center; justify-items: center; text-align: center; gap: 14px; padding-block: 48px; }
.nf-worm { width: 180px; height: 180px; }
.nf-main h1 { font-size: clamp(2rem, 6vw, 3rem); margin-top: 10px; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 12px; }
.nf-links a { min-height: 44px; display: inline-flex; align-items: center; font-weight: 600; }
.nf-home { background: var(--teal); color: #fff; padding: 0 20px; border-radius: 999px; text-decoration: none; }
