:root {
  --bg: oklch(97.2% 0.007 85);
  --surface: oklch(99.4% 0.004 85);
  --surface-2: oklch(95% 0.009 85);
  --line: oklch(88.5% 0.011 80);
  --ink: oklch(21% 0.012 70);
  --muted: oklch(45% 0.013 70);
  --faint: oklch(56% 0.012 70);
  --accent: oklch(47% 0.09 190);
  --accent-hover: oklch(41% 0.09 190);
  --accent-ink: oklch(99% 0.005 190);
  --accent-soft: oklch(93.5% 0.032 190);
  --mark: oklch(90% 0.05 190);
  --shadow: 0 1px 2px oklch(30% 0.02 70 / 0.06), 0 10px 28px oklch(30% 0.02 70 / 0.08);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --body: "Hanken Grotesk", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: oklch(17.5% 0.009 250);
  --surface: oklch(21.5% 0.01 250);
  --surface-2: oklch(25.5% 0.011 250);
  --line: oklch(30% 0.013 250);
  --ink: oklch(93% 0.006 85);
  --muted: oklch(73% 0.011 85);
  --faint: oklch(63% 0.012 85);
  --accent: oklch(79% 0.1 190);
  --accent-hover: oklch(85% 0.09 190);
  --accent-ink: oklch(18% 0.03 190);
  --accent-soft: oklch(27% 0.038 190);
  --mark: oklch(35% 0.06 190);
  --shadow: 0 1px 2px oklch(0% 0 0 / 0.35), 0 12px 28px oklch(0% 0 0 / 0.3);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(17.5% 0.009 250);
    --surface: oklch(21.5% 0.01 250);
    --surface-2: oklch(25.5% 0.011 250);
    --line: oklch(30% 0.013 250);
    --ink: oklch(93% 0.006 85);
    --muted: oklch(73% 0.011 85);
    --faint: oklch(63% 0.012 85);
    --accent: oklch(79% 0.1 190);
    --accent-hover: oklch(85% 0.09 190);
    --accent-ink: oklch(18% 0.03 190);
    --accent-soft: oklch(27% 0.038 190);
    --mark: oklch(35% 0.06 190);
    --shadow: 0 1px 2px oklch(0% 0 0 / 0.35), 0 12px 28px oklch(0% 0 0 / 0.3);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2 { font-family: var(--display); color: var(--ink); margin: 0; }
::selection { background: var(--mark); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
img, svg { display: block; }

.page { min-height: 100dvh; display: flex; flex-direction: column; }

.gutter { padding-left: clamp(16px, 4.4vw, 56px); padding-right: clamp(16px, 4.4vw, 56px); }

/* ---- Header ---- */
.site-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.wordmark { font-family: var(--display); font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font: 600 13px/1 var(--body);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); background: var(--surface-2); }
.theme-toggle .icon { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Hero ---- */
.hero {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding-bottom: clamp(16px, 3vh, 28px);
}

.hero-copy { flex: none; max-width: 62ch; margin-bottom: clamp(14px, 2.6vh, 24px); }

h1.title {
  font-size: clamp(1.9rem, 3.6vw + 1rem, 3.1rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  text-wrap: balance;
  max-width: 16ch;
}

.pain {
  margin: 12px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--muted);
  max-width: 52ch;
  text-wrap: pretty;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 22px;
  margin-top: 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-ink);
  font: 650 15px/1 var(--body);
  text-decoration: none;
  border: 1px solid var(--accent);
  transition: background-color 150ms, transform 120ms;
}
.cta:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.cta:active { transform: translateY(1px); }

/* ---- Demo: the call ---- */
.demo {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 300px);
  gap: 14px;
}

.call-frame {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: oklch(15% 0.01 250);
  overflow: hidden;
}

.tiles {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 1fr;
  gap: 6px;
  padding: 6px;
}
.tile {
  position: relative;
  min-height: 0;
  padding: 8px;
  border-radius: 8px;
  background: oklch(24% 0.015 255);
  display: flex;
  align-items: center;
  justify-content: center;
}
.tile.you { background: oklch(21% 0.018 255); }
.avatar {
  width: clamp(34px, 8vh, 56px);
  height: clamp(34px, 8vh, 56px);
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font: 650 15px/1 var(--body);
}
.tile-name {
  position: absolute;
  left: 10px;
  bottom: 10px;
  font: 500 11.5px/1 var(--body);
  color: oklch(92% 0.005 250 / 0.9);
  background: oklch(0% 0 0 / 0.32);
  padding: 3px 7px;
  border-radius: 5px;
}
.tile.talking .avatar { box-shadow: 0 0 0 3px var(--accent); }

.caption-strip {
  flex: none;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: oklch(10% 0.008 250);
  border-top: 1px solid oklch(100% 0 0 / 0.06);
}
.caption-speaker {
  flex: none;
  font: 650 12.5px/1 var(--body);
  color: oklch(80% 0.01 250);
}
.caption-text {
  font: 500 14px/1.35 var(--body);
  color: oklch(94% 0.004 250);
}
.caption-text mark {
  background: transparent;
  color: var(--accent);
  font-weight: 650;
  opacity: 0;
  transition: opacity 260ms var(--ease-out);
}
.caption-text mark.on { opacity: 1; }

/* ---- Demo: panel mock ---- */
.panel-mock {
  min-height: 0;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  overflow: hidden;
}
.panel-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font: 650 13.5px/1 var(--body);
}
.panel-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); flex: none; }
.panel-body { flex: 1; min-height: 0; padding: 12px; overflow: hidden; }

.panel-card {
  padding: 12px 12px 11px;
  border: 1px solid color-mix(in oklch, var(--accent) 32%, var(--line));
  border-radius: 10px;
  background: var(--accent-soft);
  opacity: 0;
  transform: translateY(-8px);
  filter: blur(2px);
}
.panel-card.in {
  animation: arrive 420ms var(--ease-out) forwards;
}
@keyframes arrive {
  to { opacity: 1; transform: none; filter: none; }
}
.panel-term { margin: 0; font: 680 15.5px/1.3 var(--body); letter-spacing: -0.01em; }
.panel-def { margin: 5px 0 0; font-size: 13.5px; line-height: 1.45; color: var(--ink); }
.panel-quote {
  margin: 9px 0 0;
  padding: 7px 9px;
  border-radius: 7px;
  background: color-mix(in oklch, var(--surface) 55%, transparent);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.4;
}
.panel-quote .who { color: var(--ink); font-weight: 600; }

/* ---- Sections ---- */
.section {
  padding-top: clamp(48px, 8vh, 96px);
  padding-bottom: clamp(48px, 8vh, 96px);
  border-top: 1px solid var(--line);
}
.section h2 {
  font-size: clamp(1.3rem, 1.8vw + 0.8rem, 1.7rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  max-width: 20ch;
  text-wrap: balance;
}
.bullets {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 16px;
  max-width: 640px;
}
.bullets li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
}
.bullets .icon {
  flex: none;
  width: 22px;
  height: 22px;
  margin-top: 2px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.catchup-line {
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  max-width: 56ch;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
kbd {
  font: 600 12.5px/1 var(--mono);
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-bottom-width: 2px;
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface);
}

.closing {
  padding-top: clamp(56px, 10vh, 120px);
  padding-bottom: clamp(40px, 7vh, 80px);
  border-top: 1px solid var(--line);
}
.closing h2 {
  font-size: clamp(1.6rem, 2.6vw + 1rem, 2.3rem);
  max-width: 16ch;
  text-wrap: balance;
  margin-bottom: 18px;
}

footer {
  flex: none;
  padding-top: 18px;
  padding-bottom: 28px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--faint);
  max-width: 64ch;
}
footer a { color: var(--muted); text-decoration: underline; }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---- Phone: collapse the call to caption + card ---- */
@media (max-width: 720px) {
  h1.title { max-width: 14ch; font-size: clamp(1.7rem, 7.2vw, 2.1rem); }
  .pain { font-size: 15px; }
  .demo { grid-template-columns: 1fr; grid-template-rows: auto auto; }
  .call-frame { min-height: 96px; }
  .tiles { display: none; }
  .caption-strip { min-height: 64px; }
  .panel-mock { min-height: 150px; }
}

@media (max-width: 720px) and (max-height: 700px) {
  .site-header { padding-top: 10px; padding-bottom: 8px; }
  h1.title { font-size: clamp(1.5rem, 7vw, 1.85rem); }
  .hero-copy { margin-bottom: 12px; }
  .pain { margin-top: 8px; }
  .cta { height: 40px; margin-top: 14px; }
}
