/* ════════════════════════════════════════════════════════════════════
   Lecto — showcase
   A small system: one type scale, one spacing scale, one motion curve.
   Everything below is built on those four blocks, so nothing needs a
   one-off breakpoint to look right.
   ════════════════════════════════════════════════════════════════════ */

:root {
  /* Colour — the app's palette */
  --coral: #f16743;
  --coral-2: #ff8a5c;
  --coral-ink: #a83a1c;
  --ink: #1c1917;
  --ink-2: #453e39;
  --muted: #7c756d;
  --line: #ece4d9;
  --line-2: #ddd2c3;
  --bg: #faf7f2;
  --bg-2: #f4efe7;
  --surface: #fff;
  --mint: #dcf7ea;
  --mint-ink: #0e6245;
  --sky: #e1f1ff;
  --sky-ink: #16528e;
  --lav: #efeaff;
  --lav-ink: #47368b;
  --cream: #fef4dc;
  --cream-ink: #a66e0a;
  --amber: #ffc857;

  /* Type — fluid, so a phone and a 27" screen both read well */
  --step--1: clamp(0.82rem, 0.79rem + 0.15vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.13rem, 1.06rem + 0.35vw, 1.3rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.75vw, 1.85rem);
  --step-3: clamp(1.85rem, 1.55rem + 1.5vw, 2.7rem);
  --step-4: clamp(2.4rem, 1.8rem + 3vw, 4.4rem);

  /* Space — one ladder, used everywhere */
  --s-1: 8px;
  --s-2: 14px;
  --s-3: 22px;
  --s-4: 34px;
  --s-5: 52px;
  --s-6: 76px;
  --section: clamp(76px, 9vw, 136px);

  --radius: 26px;
  --radius-lg: 34px;
  --wrap: 1180px;
  --prose: 62ch;
  --ease: cubic-bezier(0.22, 0.68, 0.24, 1);
  --shadow-card: 0 30px 60px -40px rgba(28, 25, 23, 0.45);
  --shadow-phone: 0 60px 100px -50px rgba(28, 25, 23, 0.55);
}

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

html {
  scroll-behavior: smooth;
  /* clip, not hidden: hidden makes html/body a scroll container, which
     silently breaks every position: sticky on the page. */
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

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

h1, h2, h3 {
  margin: 0;
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  text-wrap: balance;
}
h1 { font-size: var(--step-4); }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-1); letter-spacing: -0.02em; line-height: 1.25; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; text-decoration: none; }

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

.wrap { width: min(100% - 2 * var(--s-3), var(--wrap)); margin-inline: auto; }
.prose { max-width: var(--prose); }

.eyebrow {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: var(--s-2);
}
.eyebrow.light { color: var(--amber); }
.lede { margin-top: var(--s-3); color: var(--muted); font-size: var(--step-1); }
.lede.light { color: rgba(255, 255, 255, 0.7); }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 99; background: var(--surface); padding: 10px 16px; border-radius: 100px; }

.progress {
  position: fixed; inset: 0 auto auto 0;
  height: 2px; width: 0;
  background: linear-gradient(90deg, var(--coral), var(--coral-2));
  z-index: 60;
}

/* Older browsers without overflow: clip keep the page tidy; they lose the
   sticky tour, which is why clip comes first. */
@supports not (overflow: clip) {
  html, body { overflow-x: hidden; }
}

/* ── Nav ─────────────────────────────────────────────────────────── */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: var(--s-2) 0;
  transition: background 0.4s var(--ease), box-shadow 0.4s, padding 0.4s;
}
.nav.scrolled {
  padding: 10px 0;
  background: rgba(250, 247, 242, 0.8);
  backdrop-filter: blur(20px) saturate(150%);
  box-shadow: 0 1px 0 rgba(28, 25, 23, 0.06);
}
.nav-inner { display: flex; align-items: center; gap: var(--s-3); }
.brand-logo { height: 32px; width: auto; }
.nav-links {
  display: flex; gap: var(--s-3); margin-inline: auto;
  font-size: var(--step--1); font-weight: 600; color: var(--ink-2);
}
.nav-links a { padding: 8px 12px; border-radius: 100px; transition: background 0.25s, color 0.25s; }
.nav-links a:hover { background: rgba(28, 25, 23, 0.06); color: var(--ink); }
.nav-right { display: flex; align-items: center; gap: var(--s-1); }

.burger {
  display: none; width: 44px; height: 44px;
  border: 1px solid var(--line-2); border-radius: 100px;
  background: var(--surface); cursor: pointer; padding: 0;
}
.burger span { display: block; width: 16px; height: 2px; margin: 3.5px auto; background: var(--ink); border-radius: 2px; transition: transform 0.3s var(--ease); }
.burger[aria-expanded="true"] span:first-child { transform: translateY(3.5px) rotate(45deg); }
.burger[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }

/* ── Buttons ─────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 26px;
  border-radius: 100px;
  font-weight: 700; font-size: var(--step-0);
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
}
.btn:active { transform: scale(0.97) !important; }
.btn-primary {
  background: var(--ink); color: #fff;
  box-shadow: 0 16px 30px -18px rgba(28, 25, 23, 0.9);
}
.btn-primary:hover { background: #000; box-shadow: 0 22px 40px -18px rgba(28, 25, 23, 1); }
.btn-coral {
  background: linear-gradient(135deg, var(--coral-2), var(--coral)); color: #fff;
  box-shadow: 0 16px 34px -16px rgba(241, 103, 67, 0.9);
}
.btn-sm { height: 42px; padding: 0 18px; font-size: var(--step--1); }
.btn-line { border: 1px solid var(--line-2); background: var(--surface); }
.btn-line:hover { border-color: var(--ink); }
.btn-line.light { background: transparent; border-color: rgba(255, 255, 255, 0.35); color: #fff; }
.btn-line.light:hover { border-color: #fff; }
.btn-white { background: #fff; color: var(--coral-ink); }

/* ── Device ──────────────────────────────────────────────────────── */
/* A real frame: bezel, side buttons, and a screen that clips its content. */
.device {
  position: relative;
  width: var(--device-w, 300px);
  padding: 10px;
  border-radius: 46px;
  background: linear-gradient(160deg, #272220, #100d0c 60%);
  box-shadow: var(--shadow-phone), inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.device::before,
.device::after {
  content: "";
  position: absolute; right: -2px;
  width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #3a3330, #221d1b);
}
.device::before { top: 22%; height: 44px; }
.device::after { top: 36%; height: 72px; }
.device .screen {
  position: relative;
  border-radius: 37px;
  overflow: hidden;
  background: var(--bg);
  aspect-ratio: 540 / 1124;
}
.device .screen img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.device .screen img.on,
.device .screen img:only-child { opacity: 1; transform: none; }

/* ── Hero ────────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: calc(var(--section) + 60px) 0 var(--section);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: -160px 0 auto 0; height: 820px;
  background: url("images/mesh-hero.jpg") center / cover no-repeat;
  opacity: 0.85;
  mask-image: linear-gradient(180deg, #000 55%, transparent);
  animation: breathe 26s ease-in-out infinite alternate;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background: url("images/grain.png") repeat;
  opacity: 0.5;
  pointer-events: none;
}
@keyframes breathe {
  from { transform: scale(1) translateY(0); }
  to { transform: scale(1.08) translateY(-18px); }
}

.hero-inner { position: relative; z-index: 2; display: grid; gap: var(--s-5); }
.hero-copy { text-align: center; max-width: 900px; margin-inline: auto; }

.badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 16px 8px 12px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 30px -20px rgba(28, 25, 23, 0.6);
  font-size: var(--step--1); font-weight: 600; color: var(--ink-2);
  margin-bottom: var(--s-3);
}
.dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--coral);
  box-shadow: 0 0 0 0 rgba(241, 103, 67, 0.5);
  animation: ping 2.4s infinite;
}
@keyframes ping {
  0% { box-shadow: 0 0 0 0 rgba(241, 103, 67, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(241, 103, 67, 0); }
  100% { box-shadow: 0 0 0 0 rgba(241, 103, 67, 0); }
}

/* Headline, a line at a time */
.line { display: block; overflow: hidden; }
.line > span {
  display: block;
  transform: translateY(105%);
  animation: rise 0.9s var(--ease) forwards;
}
@keyframes rise { to { transform: none; } }

.hero-copy .lede { margin-inline: auto; max-width: 58ch; }
.cta { display: flex; gap: var(--s-1); justify-content: center; flex-wrap: wrap; margin-top: var(--s-4); }
.fineprint { margin-top: var(--s-2); font-size: var(--step--1); color: var(--muted); }
.fineprint.light { color: rgba(255, 255, 255, 0.65); }

/* Phone with real fragments of the app beside it */
.hero-stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s-2);
  max-width: 1080px;
  margin-inline: auto;
}
.hero-stage .device { --device-w: clamp(240px, 26vw, 310px); }
.frag-col { display: grid; gap: var(--s-4); }
.frag-col.left { justify-items: end; }
.frag { width: min(100%, 330px); filter: drop-shadow(0 26px 40px rgba(28, 25, 23, 0.16)); }
.frag-note {
  display: block;
  margin-top: 10px;
  font-size: var(--step--1);
  color: var(--muted);
  max-width: 300px;
}
.frag-col.left .frag-note { text-align: right; }
.float { animation: float 9s ease-in-out infinite; }
.float:nth-child(2) { animation-delay: -4.5s; }
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

.hero-dots { display: flex; gap: 7px; justify-content: center; margin-top: var(--s-3); }
.hero-dots button {
  width: 7px; height: 7px; padding: 0; border: 0; border-radius: 50%;
  background: var(--line-2); cursor: pointer;
  transition: width 0.35s var(--ease), background 0.35s;
}
.hero-dots button.on { width: 24px; border-radius: 100px; background: var(--coral); }

/* ── Strip ───────────────────────────────────────────────────────── */
.strip { border-block: 1px solid var(--line); background: var(--surface); }
.strip-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-3) var(--s-4);
  padding: var(--s-4) 0;
  text-align: center;
}
.strip-inner strong {
  display: block;
  font-size: var(--step-2);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1.1;
}
.strip-inner span { font-size: var(--step--1); color: var(--muted); }

/* ── Sections ────────────────────────────────────────────────────── */
.section { padding: var(--section) 0; position: relative; }
.section.alt { background: var(--surface); }
.section.dark {
  color: #fff;
  background: var(--ink) url("images/mesh-dark.jpg") center / cover no-repeat;
  overflow: hidden;
}
.section-head { max-width: 760px; margin-bottom: var(--s-5); }
.section-head.center { margin-inline: auto; text-align: center; }

/* ── Sticky tour ─────────────────────────────────────────────────── */
.tour-inner { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: clamp(40px, 6vw, 96px); align-items: start; }
.tour-sticky { position: sticky; top: max(90px, calc(50vh - 330px)); display: flex; gap: var(--s-2); align-items: center; }
.tour-sticky .device { --device-w: clamp(250px, 24vw, 300px); }
.tour-rail { display: grid; gap: 7px; }
.tour-rail span { width: 3px; height: 24px; border-radius: 100px; background: var(--line-2); transition: background 0.4s, height 0.4s var(--ease); }
.tour-rail span.on { background: var(--coral); height: 42px; }

.tour-steps { list-style: none; margin: 0; padding: 0; }
.tour-step {
  min-height: min(74vh, 620px);
  display: flex; flex-direction: column; justify-content: center;
  opacity: 0.28;
  transition: opacity 0.6s var(--ease);
}
.tour-step.on { opacity: 1; }
.tour-step h2 { margin-bottom: var(--s-2); }
.tour-step p { color: var(--muted); max-width: 52ch; }
.step-no {
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--step--1); color: var(--coral); letter-spacing: 0.16em;
  margin-bottom: var(--s-2);
}

/* ── Demo ────────────────────────────────────────────────────────── */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-4); }
.tabs button {
  border: 1px solid var(--line-2); background: var(--surface);
  border-radius: 100px; padding: 10px 18px;
  font: inherit; font-size: var(--step--1); font-weight: 700; color: var(--ink-2);
  cursor: pointer; transition: all 0.25s var(--ease);
}
.tabs button:hover { border-color: var(--coral); color: var(--coral); }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: #fff; }

.demo-body { display: grid; grid-template-columns: minmax(240px, 300px) 1fr; gap: clamp(32px, 5vw, 72px); align-items: center; }
.demo-body .device { --device-w: 100%; }
.panes { display: grid; }
.pane {
  grid-area: 1 / 1;
  opacity: 0; transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}
.pane.on { opacity: 1; transform: none; pointer-events: auto; }
.pane h3 { font-size: var(--step-2); margin-bottom: var(--s-2); }
.pane p { color: var(--muted); }
.quote {
  margin: 0 0 var(--s-2);
  padding: var(--s-3);
  border-radius: 22px;
  background: linear-gradient(135deg, var(--coral-2), var(--coral));
  color: #fff; font-weight: 600;
  box-shadow: 0 24px 46px -28px rgba(241, 103, 67, 0.95);
}
.stamp {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: var(--s-3);
  padding: 8px 15px; border-radius: 100px;
  background: var(--bg-2); color: var(--coral-ink);
  font-size: var(--step--1); font-weight: 700;
}

/* ── Proof ───────────────────────────────────────────────────────── */
.two-col { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: clamp(40px, 6vw, 90px); align-items: center; }
.two-col .device { --device-w: clamp(240px, 24vw, 290px); margin-inline: auto; }
.ticks { list-style: none; padding: 0; margin: var(--s-4) 0 0; display: grid; gap: var(--s-2); }
.ticks li { position: relative; padding-left: 32px; color: rgba(255, 255, 255, 0.82); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--amber); box-shadow: inset 0 0 0 5px var(--ink);
}
.ticks em { color: #fff; font-style: normal; font-weight: 700; }

/* ── Bento ───────────────────────────────────────────────────────── */
.bento { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: var(--s-2); }
.card {
  border-radius: var(--radius-lg);
  padding: var(--s-4) var(--s-4) 0;
  display: flex; flex-direction: column;
  overflow: hidden;
  min-height: 430px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }
.card h3 { margin-bottom: var(--s-1); }
.card p { font-size: var(--step--1); color: var(--muted); }
.card img { margin-top: auto; width: 100%; height: 220px; object-fit: cover; object-position: top center; border-radius: 22px 22px 0 0; box-shadow: 0 26px 50px -34px rgba(0, 0, 0, 0.7); }
.card-mint { background: var(--mint); } .card-mint h3 { color: var(--mint-ink); }
.card-lav { background: var(--lav); } .card-lav h3 { color: var(--lav-ink); }
.card-dark { background: var(--ink); color: #fff; } .card-dark p { color: rgba(255, 255, 255, 0.64); }

/* ── Numbered list ───────────────────────────────────────────────── */
.numbered { margin: var(--s-4) 0 0; padding: 0; list-style: none; display: grid; gap: var(--s-2); counter-reset: n; }
.numbered li { display: flex; gap: var(--s-2); align-items: baseline; color: var(--ink-2); }
.numbered li::before {
  counter-increment: n; content: counter(n);
  font-family: ui-monospace, Menlo, monospace;
  font-size: var(--step--1); color: var(--coral); font-weight: 700;
  min-width: 18px;
}

/* ── FAQ ─────────────────────────────────────────────────────────── */
.faq-grid { display: grid; grid-template-columns: minmax(260px, 0.8fr) 1.2fr; gap: clamp(36px, 5vw, 80px); align-items: start; }
.faq-mascot { width: 118px; margin-top: var(--s-4); animation: float 9s ease-in-out infinite; }
.faq-list { display: grid; gap: 8px; }
details {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 22px; padding: 2px var(--s-3);
  transition: background 0.3s, border-color 0.3s;
}
details[open] { background: var(--bg-2); border-color: transparent; }
summary {
  list-style: none; cursor: pointer; padding: var(--s-2) 0;
  font-weight: 700;
  display: flex; justify-content: space-between; align-items: center; gap: var(--s-2);
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.4rem; color: var(--coral); transition: transform 0.3s var(--ease); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding-bottom: var(--s-3); color: var(--muted); font-size: var(--step--1); }
details em { font-style: normal; font-weight: 700; color: var(--ink); }

/* ── CTA ─────────────────────────────────────────────────────────── */
.cta-band {
  position: relative;
  margin: 0 var(--s-3) var(--s-6);
  padding: var(--section) 0 0;
  border-radius: 46px;
  background: linear-gradient(140deg, #ff8a5c, #df4e28);
  color: #fff;
  overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; inset: 0;
  background: url("images/grain.png") repeat; opacity: 0.35; pointer-events: none;
}
.cta-inner { display: grid; grid-template-columns: 1fr minmax(220px, 290px); gap: var(--s-4); align-items: end; position: relative; z-index: 2; }
.cta-copy { padding-bottom: var(--section); }
.cta-mascot { width: 68px; margin-bottom: var(--s-3); animation: float 7s ease-in-out infinite; }
.cta-band p { margin-top: var(--s-2); color: rgba(255, 255, 255, 0.86); max-width: 46ch; }
.cta-band .cta { justify-content: flex-start; }
.cta-inner .device { --device-w: 100%; transform: translateY(40px); }

/* ── Footer ──────────────────────────────────────────────────────── */
.footer { padding-bottom: var(--s-4); }
.footer-inner {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--s-4);
  padding-bottom: var(--s-4); border-bottom: 1px solid var(--line);
}
.footer-brand p { margin-top: var(--s-2); color: var(--muted); font-size: var(--step--1); max-width: 34ch; }
.footer h4 { font-family: ui-monospace, Menlo, monospace; font-size: var(--step--1); letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 var(--s-1); font-weight: 600; }
.footer nav a { display: block; font-size: var(--step--1); font-weight: 600; color: var(--ink-2); padding: 5px 0; }
.footer nav a:hover { color: var(--coral); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: var(--s-1); padding-top: var(--s-3); font-size: var(--step--1); color: var(--muted); }

/* ── Reveal ──────────────────────────────────────────────────────── */
.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero::before, .dot, .float, .faq-mascot, .cta-mascot { animation: none !important; }
  .line > span { transform: none; animation: none; }
  html { scroll-behavior: auto; }
}

/* ══ Responsive ═══════════════════════════════════════════════════ */

/* Tablet and small laptop: the hero fragments step aside */
@media (max-width: 1100px) {
  .hero-stage { grid-template-columns: 1fr; justify-items: center; }
  .frag-col { grid-auto-flow: column; justify-items: center; gap: var(--s-3); }
  .frag-col.left { justify-items: center; order: 2; }
  .frag-col.right { order: 3; }
  .frag { width: min(46vw, 300px); }
  .frag-note, .frag-col.left .frag-note { text-align: center; max-width: 42ch; margin-inline: auto; }
  .hero-stage .device { --device-w: min(300px, 70vw); }
}

@media (max-width: 900px) {
  .tour-inner, .demo-body, .two-col, .faq-grid, .cta-inner { grid-template-columns: 1fr; }
  .tour-sticky { position: static; justify-content: center; }
  .tour-rail { grid-auto-flow: column; }
  .tour-rail span { width: 24px; height: 3px; }
  .tour-rail span.on { width: 40px; height: 3px; }
  .tour-step { min-height: auto; padding: var(--s-4) 0; opacity: 1; }
  .demo-body .device, .two-col .device { --device-w: min(300px, 74vw); margin-inline: auto; }
  .cta-copy { padding-bottom: var(--s-4); }
  .cta-inner .device { --device-w: min(280px, 70vw); transform: none; margin-inline: auto; }
  .faq-mascot { display: none; }
  .card { min-height: 360px; }
  .card img { height: 180px; }
}

@media (max-width: 760px) {
  .nav-links {
    position: absolute; inset: 68px var(--s-3) auto;
    flex-direction: column; gap: 2px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: 24px; padding: var(--s-2);
    box-shadow: 0 30px 60px -30px rgba(28, 25, 23, 0.5);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .burger { display: block; }
  .hero { padding-top: calc(var(--section) + 20px); }
  .frag-col { grid-auto-flow: row; }
  .frag { width: min(86vw, 330px); }
  .cta-band { border-radius: 34px; margin-inline: 12px; }
}

/* ════════════════════════════════════════════════════════════════════
   Hero fan, mascot and footer — added after the first pass
   ════════════════════════════════════════════════════════════════════ */

/* Three phones in perspective: the middle one live, the others quiet
   context. Better than cut-out cards floating in space. */
.fan {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(-40px, -3vw, 0px);
  perspective: 1600px;
  padding-block: var(--s-3);
}
.fan .device.lead {
  --device-w: clamp(250px, 25vw, 312px);
  position: relative;
  z-index: 3;
}
.fan .device.side {
  --device-w: clamp(190px, 19vw, 240px);
  position: relative;
  z-index: 2;
  opacity: 0.96;
  filter: saturate(0.96);
}
.fan .device.left {
  transform: rotateY(16deg) rotate(-5deg) translateX(34px) translateY(16px) scale(0.96);
  transform-origin: right center;
}
.fan .device.right {
  transform: rotateY(-16deg) rotate(5deg) translateX(-34px) translateY(16px) scale(0.96);
  transform-origin: left center;
}

/* ── The mascot ──────────────────────────────────────────────────── */
.mascot { width: 92px; height: auto; overflow: visible; }
.mascot .eyes { transform-box: fill-box; transform-origin: center; }
/* A blink every few seconds: squashed for a moment, then open. */
.mascot .eyes { animation: blink 6.5s infinite; }
.mascot-faq .eyes { animation-delay: 1.6s; }
.mascot-cta .eyes { animation-delay: 3.2s; }
@keyframes blink {
  0%, 92%, 100% { transform: scaleY(1); }
  94%, 96% { transform: scaleY(0.12); }
}
/* The little waveform "speaks" now and then. */
.mascot .wave rect { transform-box: fill-box; transform-origin: center; }
.mascot .wave rect:nth-child(1) { animation: talk 2.6s ease-in-out infinite; }
.mascot .wave rect:nth-child(2) { animation: talk 2.6s ease-in-out infinite 0.2s; }
.mascot .wave rect:nth-child(3) { animation: talk 2.6s ease-in-out infinite 0.4s; }
@keyframes talk {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(1.5); }
}

.mascot-hero {
  position: absolute;
  left: 4%;
  bottom: -6px;
  width: clamp(64px, 7vw, 96px);
  z-index: 4;
  filter: drop-shadow(0 18px 26px rgba(28, 25, 23, 0.22));
  animation: float 8s ease-in-out infinite;
}
.mascot-faq {
  width: clamp(84px, 9vw, 116px);
  margin-top: var(--s-4);
  animation: float 9s ease-in-out infinite;
}
.mascot-cta {
  width: clamp(56px, 6vw, 76px);
  margin-bottom: var(--s-3);
  animation: float 7s ease-in-out infinite;
}

/* ── Logo, bigger ────────────────────────────────────────────────── */
.brand-logo { height: clamp(30px, 3vw, 40px); }
.brand-logo.big { height: clamp(44px, 5vw, 62px); }

/* ── Footer with weight ──────────────────────────────────────────── */
.footer { padding-top: var(--s-5); }
.footer-top {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.4fr;
  gap: clamp(32px, 5vw, 80px);
  padding-bottom: var(--s-5);
}
.footer-brand p {
  margin: var(--s-3) 0 var(--s-3);
  color: var(--muted);
  max-width: 38ch;
}
.footer-nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--s-3);
}
.footer-nav a {
  display: block;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-2);
  padding: 6px 0;
  transition: color 0.25s, transform 0.25s var(--ease);
}
.footer-nav a:hover { color: var(--coral); transform: translateX(3px); }

/* The wordmark as a closing flourish, clipped by the page edge. */
.footer-word {
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding-top: var(--s-3);
}
.footer-word span {
  display: block;
  font-size: clamp(4rem, 17vw, 15rem);
  line-height: 0.82;
  font-weight: 800;
  letter-spacing: -0.06em;
  text-align: center;
  background: linear-gradient(180deg, var(--line-2), rgba(236, 228, 217, 0.15));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
}
.footer-bottom { border-top: 0; padding-top: var(--s-3); }

@media (max-width: 900px) {
  .fan { gap: 0; }
  .fan .device.side { display: none; }
  .footer-top { grid-template-columns: 1fr; }
}

/* ── The tour on a phone ─────────────────────────────────────────── */
/* Side by side gives neither the phone nor the writing enough width, so
   each step becomes a card you swipe through, carrying its own screen. */
.step-shot { display: none; }
.tour-dots { display: none; }

@media (max-width: 900px) {
  .tour-sticky { display: none; }

  .tour-steps {
    display: flex;
    gap: var(--s-3);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--s-3);
    /* Bleed to the screen edges so a card peeks in from the side. */
    margin-inline: calc(var(--s-3) * -1);
    padding: var(--s-1) var(--s-3) var(--s-3);
    scrollbar-width: none;
  }
  .tour-steps::-webkit-scrollbar { display: none; }

  .tour-step {
    flex: 0 0 min(84vw, 400px);
    scroll-snap-align: center;
    min-height: 0;
    padding: var(--s-3) var(--s-3) var(--s-4);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    opacity: 1;
  }
  .tour-step h2 { font-size: var(--step-2); }
  .tour-step p { font-size: var(--step-0); }

  .step-shot { display: block; margin-bottom: var(--s-2); }
  .step-shot .device {
    --device-w: min(148px, 38vw);
    margin-inline: auto;
    border-radius: 34px;
    padding: 7px;
  }
  .step-shot .screen { border-radius: 27px; }

  .tour-dots {
    display: flex;
    gap: 7px;
    justify-content: center;
    margin-top: var(--s-2);
  }
  .tour-dots span {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--line-2);
    transition: width 0.35s var(--ease), background 0.35s;
  }
  .tour-dots span.on { width: 24px; border-radius: 100px; background: var(--coral); }
}

/* ── The lecture, live ────────────────────────────────────────────── */
/* A phone that fills itself as you drag a two-hour lecture past it. */
.live-stage {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr);
  gap: clamp(var(--s-4), 5vw, var(--s-6));
  align-items: center;
  margin-top: var(--s-5);
}

.live-phone { --device-w: min(320px, 76vw); justify-self: center; }
.live-phone .screen { background: var(--bg); }
/* a hairline across the top of the screen: where the lecture has got to */
.device .screen.lit::after {
  content: "";
  position: absolute; top: 0; left: 0; z-index: 3;
  height: 3px; width: calc(var(--played, 0) * 100%);
  background: linear-gradient(90deg, var(--coral-2), var(--coral));
}
.device .screen img.live-head {
  position: absolute; inset: 0 0 auto 0; z-index: 2;
  height: auto; opacity: 1; transform: none;   /* beats .device .screen img */
}

.live-feed {
  position: absolute;
  /* the header is 423/540 of the screen's width tall, which is this much
     of its height — the feed starts right under it */
  inset: 37.6% 0 0 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  padding: 0 0 var(--s-4);
}
.live-feed::-webkit-scrollbar { display: none; }
.device .screen .live-feed img {
  position: static; width: 100%; height: auto; opacity: 1; transform: none;
}

.live-waiting {
  font-size: 12px; color: var(--muted); text-align: center;
  padding: var(--s-4) var(--s-3);
  max-height: 120px; overflow: hidden;
  transition: opacity 0.3s var(--ease), max-height 0.4s var(--ease), padding 0.4s var(--ease);
}
/* it has to collapse, not just fade, or it holds a gap above the first card */
.live-waiting.gone { opacity: 0; max-height: 0; padding: 0; }

.live-card {
  margin: 0;
  opacity: 0;
  transform: translateY(14px) scale(0.97);
  max-height: 0;
  overflow: hidden;
  transition:
    opacity 0.45s var(--ease),
    transform 0.55s var(--ease),
    max-height 0.55s var(--ease);
}
.live-card.here { opacity: 1; transform: none; max-height: 700px; }
.live-card.just::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: 20px;
  box-shadow: 0 0 0 3px var(--coral);
  animation: land 0.9s var(--ease) forwards;
}
.live-card { position: relative; }
@keyframes land { to { box-shadow: 0 0 0 3px rgba(241, 103, 67, 0); } }

.live-side { display: grid; gap: var(--s-3); align-content: start; }
.live-clock {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800; letter-spacing: -0.04em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.live-clock em { display: block; font: inherit; font-size: var(--step--1); font-style: normal; font-weight: 600; color: var(--muted); letter-spacing: 0; margin-top: 6px; }
.live-play { width: fit-content; }
.live-play-icon {
  width: 0; height: 0;
  border-left: 10px solid currentColor;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  margin-right: 2px;
}
.live-play.playing .live-play-icon {
  width: 11px; height: 13px; border: 0;
  background: linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px, currentColor 7px 11px);
}

.live-log {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 6px;
  min-height: 132px;
  align-content: start;
}
.live-log li {
  display: flex; align-items: center; gap: 10px;
  font-size: var(--step--1);
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 100px;
  animation: logIn 0.5s var(--ease) both;
}
.live-log b { font-variant-numeric: tabular-nums; color: var(--coral); font-weight: 700; }
@keyframes logIn { from { opacity: 0; transform: translateX(-10px); } }
.live-note { font-size: var(--step--1); color: var(--muted); }

/* the timeline: a waveform you can grab anywhere */
.live-track {
  position: relative;
  margin-top: var(--s-5);
  height: 104px;
  padding: 0 4px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.live-track:active { cursor: grabbing; }
.live-wave { display: flex; align-items: center; gap: 2px; height: 100%; padding: 0 var(--s-2); }
.live-wave i {
  flex: 1 1 auto;
  min-width: 2px;
  border-radius: 2px;
  background: var(--line-2);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.live-wave i.past { background: var(--coral); }

.live-marks { position: absolute; inset: 0; pointer-events: none; }
.live-marks button {
  position: absolute; top: 50%; translate: -50% -50%;
  width: 16px; height: 16px; padding: 0;
  border-radius: 50%;
  border: 2px solid var(--surface);
  background: var(--ink);
  cursor: pointer; pointer-events: auto;
  transition: transform 0.25s var(--ease), background 0.25s;
}
.live-marks button:hover { transform: translate(-50%, -50%) scale(1.3); }
.live-marks button.done { background: var(--coral); }

.live-needle {
  position: absolute; top: 6px; bottom: 6px; left: 0;
  width: 3px; border-radius: 3px;
  background: var(--ink);
  pointer-events: none;
  box-shadow: 0 0 0 4px rgba(28, 25, 23, 0.08);
}
.live-needle::after {
  content: ""; position: absolute; top: -7px; left: 50%; translate: -50% 0;
  width: 13px; height: 13px; border-radius: 50%; background: var(--ink);
}
.live-hint { margin-top: var(--s-2); font-size: var(--step--1); color: var(--muted); }

@media (max-width: 860px) {
  .live-stage { grid-template-columns: 1fr; }
  .live-side { justify-items: center; text-align: center; }
  .live-log { width: 100%; }
  .live-track { height: 84px; }
}

/* ── The curtain ──────────────────────────────────────────────────── */

/* ── Hand it over ─────────────────────────────────────────────────── */
.hand {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto minmax(230px, 0.9fr);
  gap: clamp(var(--s-3), 4vw, var(--s-5));
  align-items: center;
  margin-top: var(--s-5);
}

.file {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: var(--s-2);
  padding: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  cursor: grab;
  touch-action: none;
  transition: transform 0.35s var(--ease), box-shadow 0.35s, opacity 0.3s;
}
.file:hover { transform: translateY(-2px); }
.file.held { cursor: grabbing; transition: none; box-shadow: 0 30px 50px -22px rgba(28, 25, 23, 0.5); }
.file.gone { opacity: 0; transform: scale(0.85); pointer-events: none; }
.file-wave { display: flex; align-items: center; gap: 3px; height: 34px; padding: 0 4px; }
.file-wave i { width: 3px; border-radius: 2px; background: var(--coral); }
.file-wave i:nth-child(1) { height: 12px; }
.file-wave i:nth-child(2) { height: 26px; }
.file-wave i:nth-child(3) { height: 18px; }
.file-wave i:nth-child(4) { height: 8px; }
.file-name { font-weight: 700; font-size: var(--step-0); }
.file-name em { display: block; font-style: normal; font-weight: 500; font-size: var(--step--1); color: var(--muted); margin-top: 2px; }
.hand-hint { margin-top: var(--s-2); font-size: var(--step--1); color: var(--muted); }

.hand-targets { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }
.hand-targets button {
  width: 100%;
  padding: 14px 26px;
  border-radius: 100px;
  border: 1px dashed var(--line-2);
  background: var(--surface);
  font: inherit; font-weight: 700;
  cursor: pointer;
  transition: border-color 0.25s, transform 0.25s var(--ease), background 0.25s, color 0.25s;
}
.hand-targets button:hover { transform: translateY(-2px); border-color: var(--coral); }
.hand-targets button.over { border-style: solid; border-color: var(--coral); background: #fff4f0; transform: scale(1.06); }
.hand-targets button.chosen { border-style: solid; background: var(--coral); border-color: var(--coral); color: #fff; }

.hand-phone { --device-w: min(230px, 62vw); margin-inline: auto; }
.hand-result { margin-top: var(--s-3); font-size: var(--step--1); color: var(--muted); text-align: center; min-height: 3em; }
.hand-result b { color: var(--ink); }

/* the little dark chip that flies back with the answer */
.reply-chip {
  position: fixed; z-index: 40;
  padding: 10px 16px; border-radius: 100px;
  background: var(--ink); color: #fff;
  font-size: var(--step--1); font-weight: 700;
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.3, 0.8, 0.3, 1), opacity 0.4s 0.6s;
}

/* ── The reply lands, on scroll ───────────────────────────────────── */
.reply-scroll { background: var(--bg-2); }
.reply-track { height: 320vh; position: relative; }
.reply-mid { position: absolute; top: 58%; }
.reply-stage { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; }
.reply-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(var(--s-3), 3vw, var(--s-5));
  margin-top: var(--s-4);
  align-items: start;
}
.reply-tag {
  display: flex; align-items: center; gap: 8px;
  font-size: var(--step--1); font-weight: 600; color: var(--muted);
  margin-bottom: var(--s-2);
}
.reply-tag .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.reply-tag.light .dot { background: var(--coral); }

.reply-raw pre {
  margin: 0;
  height: min(52vh, 460px);
  overflow: hidden;
  padding: var(--s-3);
  background: var(--ink);
  color: #e8e1d8;
  border-radius: var(--radius);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12.5px; line-height: 1.7;
  white-space: pre-wrap;
  mask-image: linear-gradient(180deg, #000 72%, transparent);
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent);
}
.reply-raw pre::after { content: "▌"; color: var(--coral); }

.reply-phone {
  /* sized from the viewport's height: the whole stage has to fit on screen */
  --device-w: min(290px, 27vh);
  margin-inline: auto;
}
.reply-phone .live-feed { padding-bottom: var(--s-3); }
.reply-phone .live-feed img {
  border-radius: 0;
  display: none;
}
.reply-phone .live-feed img.in { display: block; animation: cardIn 0.5s var(--ease) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(14px) scale(0.98); } }

@media (max-width: 860px) {
  .hand { grid-template-columns: 1fr; }
  .hand-targets { grid-template-columns: repeat(3, 1fr); display: grid; }
  .hand-targets button { padding: 12px 10px; font-size: var(--step--1); }
  .reply-track { height: 300vh; }
  .reply-grid { grid-template-columns: 1fr; }
  .reply-raw pre { height: 30vh; font-size: 11.5px; }
  .reply-cards { height: 34vh; }
}

@media (prefers-reduced-motion: reduce) {
  .reply-cards img.in { animation: none; }
}

.linky {
  background: none; border: 0; padding: 0; cursor: pointer;
  font: inherit; color: var(--coral); font-weight: 700;
  border-bottom: 1px solid currentColor;
}


/* ---- the study site, framed as a browser window ---- */
/* A laptop screenshot wants a window around it, or it reads as a stray
   picture rather than as a thing you could be looking at right now. */
.browser {
  max-width: 980px; margin: 0 auto 44px; border-radius: 16px; overflow: hidden;
  background: #fff; border: 1px solid rgba(0,0,0,.1);
  box-shadow: 0 24px 70px rgba(28,25,23,.16);
}
.browser-bar {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  background: #f1ece6; border-bottom: 1px solid rgba(0,0,0,.07);
}
.browser-bar .dot {
  width: 11px; height: 11px; border-radius: 50%; background: rgba(0,0,0,.14);
}
.browser-url {
  margin-left: 10px; padding: 4px 14px; border-radius: 999px;
  background: #fff; font-size: .78rem; color: #78716c; font-weight: 600;
}
.browser img { display: block; width: 100%; height: auto; }
.bento.two { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }

@media (prefers-color-scheme: dark) {
  .browser { background: #1f1c1a; border-color: rgba(255,255,255,.12); }
  .browser-bar { background: #2a2622; border-bottom-color: rgba(255,255,255,.08); }
  .browser-bar .dot { background: rgba(255,255,255,.18); }
  .browser-url { background: rgba(255,255,255,.07); color: #a8a29e; }
}
