/* duetpad — "use it for" pages
   Styled on the house design system (.impeccable.md / tokens.css):
   Inter single-family, JetBrains Mono for identifiers, near-white surface,
   one blue scale (action) + Claude-orange accent (AI presence), quiet chrome.
   Token values mirrored from src/design-system/tokens.css — if tokens change,
   re-sync these. */

/* ---------- fonts ----------
   Self-hosted, exactly as the app itself does it: `next/font/google`
   (src/design-system/fonts.ts) downloads Inter + JetBrains Mono at BUILD time
   and serves them from our own origin — it never emits a fonts.googleapis.com
   request. These static pages cannot use next/font, so they carry the same
   two latin-subset variable faces as files instead. This keeps the CSP
   (`style-src 'self' 'unsafe-inline'`, `font-src 'self' data:`,
   lib/security/csp.ts) intact: a Google Fonts <link> is a cross-origin
   stylesheet plus a cross-origin font file, so BOTH directives would have to
   be widened to keep these pages' type alive once CSP_ENFORCE flips (#1424).
   Both families are SIL Open Font License 1.1 — see assets/fonts/OFL.txt. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("assets/fonts/inter-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("assets/fonts/jetbrains-mono-latin-var.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --background: oklch(0.99 0.002 240);
  --foreground: oklch(0.15 0.01 240);
  --muted-fg: oklch(0.45 0.015 240);
  --faint: oklch(0.58 0.01 240);
  --brand-50: oklch(0.97 0.02 250);
  --brand-100: oklch(0.94 0.04 250);
  --brand-600: oklch(0.55 0.15 250);
  --brand-700: oklch(0.48 0.13 250);
  --brand-900: oklch(0.32 0.09 250);
  --primary: var(--brand-700);
  --accent: oklch(0.70 0.17 55);       /* Claude = orange */
  --accent-deep: oklch(0.58 0.16 55);
  --border: oklch(0.91 0.01 240);
  --card: #ffffff;
  --muted-surface: oklch(0.95 0.005 240);
  --success: oklch(0.55 0.13 150);
  --shadow-card: 0 1px 2px rgb(20 22 30 / 0.04), 0 6px 18px rgb(20 22 30 / 0.06);
  --shadow-card-hover: 0 2px 4px rgb(20 22 30 / 0.05), 0 10px 28px rgb(20 22 30 / 0.09);
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-card: 14px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --body: "Inter", "Helvetica Neue", sans-serif;
  --mono: "JetBrains Mono", "SF Mono", monospace;
  --ease: cubic-bezier(0.25, 1, 0.5, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--body);
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--brand-100); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 2px;
  border-radius: var(--radius-md);
}

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 32px; }

/* ---------- mockup ribbon ---------- */
.mock-ribbon {
  position: fixed; top: 18px; right: -44px; z-index: 60;
  transform: rotate(45deg);
  background: var(--foreground); color: var(--background);
  font-family: var(--mono); font-size: 10px; letter-spacing: .18em;
  padding: 6px 48px; text-transform: uppercase;
  pointer-events: none;
}

/* ---------- nav ---------- */
nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: 26px 0;
}
.wordmark {
  font-weight: 650; font-size: 20px; letter-spacing: -0.02em;
  color: var(--foreground); text-decoration: none;
}
.wordmark span { color: inherit; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  color: var(--muted-fg); text-decoration: none; font-size: 14.5px;
}
.nav-links a:hover { color: var(--foreground); }
.nav-cta {
  background: var(--primary); color: #fff !important;
  padding: 9px 18px; border-radius: var(--radius-md); font-weight: 500;
  transition: background .15s var(--ease);
}
.nav-cta:hover { background: var(--brand-900); }

/* ---------- hero ---------- */
header.hero { padding: 72px 0 40px; position: relative; }
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--muted-fg); font-weight: 500;
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before {
  content: ""; width: 26px; height: 1.5px; background: var(--brand-600);
}
h1 {
  font-weight: 650; font-size: clamp(38px, 5.4vw, 62px);
  line-height: 1.06; letter-spacing: -0.03em; margin: 22px 0 26px;
  max-width: 17ch;
}
h1 em { font-style: normal; color: var(--primary); }
.lede {
  font-size: 19px; color: var(--muted-fg); max-width: 54ch; line-height: 1.55;
}
.lede strong { color: var(--foreground); font-weight: 600; }
.lede em { font-style: normal; }

/* ---------- persona strip ---------- */
.persona {
  margin: 56px 0 0; display: grid; grid-template-columns: 56px 1fr;
  gap: 20px; align-items: start;
  border-top: 1px solid var(--border); padding-top: 34px;
}
.persona-dot {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--brand-100); color: var(--brand-700);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 650;
}
.persona p { font-size: 16.5px; color: var(--muted-fg); max-width: 64ch; }
.persona p strong { color: var(--foreground); }

/* ---------- problem band ---------- */
.problem { padding: 84px 0 10px; }
.problem-inner {
  border-top: 1px solid var(--border);
  padding-top: 44px; max-width: 62ch;
}
/* The band is the TURN only: the hero states the before-state once, then this
   is the canvas doing the work. It used to carry a second, literal restatement
   of the persona's pain above it (a `p.big`); David cut that on 09-03. */
.problem p.turn {
  font-size: clamp(21px, 2.4vw, 27px); font-weight: 550;
  letter-spacing: -0.02em; line-height: 1.35; color: var(--foreground);
}

/* ---------- pillars ---------- */
.pillars { padding: 70px 0 20px; }
.pillars-head { max-width: 62ch; margin-bottom: 30px; }
.pillars-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.pillar { border-top: 2px solid var(--brand-600); padding-top: 18px; }
.pillar:nth-child(2) { border-top-color: var(--accent); }
.pillar h3 { font-size: 19px; margin-bottom: 8px; }
.pillar p { font-size: 15px; color: var(--muted-fg); }

/* ---------- stage extras (on top of .moment) ---------- */
.duet { margin-top: 18px; display: grid; gap: 8px; }
.duet div { font-size: 14.5px; color: var(--muted-fg); padding-left: 14px; position: relative; }
.duet div::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 7px; height: 7px; border-radius: 50%;
}
.duet .you::before { background: var(--brand-600); }
.duet .claude::before { background: var(--accent); }
.duet b { color: var(--foreground); font-weight: 600; }
.feature-chips { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.feature-chips span {
  font-family: var(--mono); font-size: 11px; letter-spacing: .02em;
  border: 1px solid var(--border); background: var(--card);
  padding: 4px 10px; border-radius: var(--radius-md); color: var(--muted-fg);
}
.feature-chips span.invented { border-style: dashed; color: var(--accent-deep); }

/* ---------- prompt gallery ---------- */
.prompts { padding: 80px 0 20px; }
.prompts-head { max-width: 62ch; margin-bottom: 30px; }
.prompts-head p { color: var(--muted-fg); font-size: 17px; }
.prompt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.prompt-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 20px 22px;
  box-shadow: var(--shadow-card);
}
.prompt-card .p-label {
  font-family: var(--mono); font-size: 10px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-deep); margin-bottom: 10px;
  display: block; font-weight: 500;
}
.prompt-card p {
  font-family: var(--mono); font-size: 13px; line-height: 1.6;
  color: var(--foreground);
}
.prompts-foot { margin-top: 18px; font-size: 14px; color: var(--faint); }

/* ---------- proof / stack band ---------- */
.proof { padding: 70px 0 10px; }
.proof-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px;
  border-top: 1px solid var(--border); padding-top: 40px;
}
.proof-inner h3 { font-size: 19px; margin-bottom: 8px; }
.proof-inner p { font-size: 15px; color: var(--muted-fg); max-width: 46ch; }
.proof-inner a { color: var(--primary); text-decoration: none; }
.proof-inner a:hover { text-decoration: underline; }

/* ---------- FAQ ---------- */
.faq { padding: 80px 0 30px; }
.faq h2 { margin-bottom: 22px; }
.faq details {
  border-top: 1px solid var(--border); padding: 18px 0;
}
.faq details:last-of-type { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer; font-weight: 600; font-size: 16.5px;
  list-style: none; display: flex; justify-content: space-between; gap: 20px;
}
.faq summary::after { content: "+"; color: var(--faint); font-weight: 400; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { margin-top: 10px; color: var(--muted-fg); font-size: 15.5px; max-width: 62ch; }

/* ---------- board frame ---------- */
.board-stage { padding: 64px 0 30px; }
.browser {
  background: var(--card); border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card-hover);
  overflow: hidden;
}
.browser-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--muted-surface);
}
.b-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.b-url {
  margin-left: 14px; font-family: var(--mono); font-size: 11.5px;
  color: var(--faint); background: var(--card); border: 1px solid var(--border);
  padding: 4px 14px; border-radius: var(--radius-md); flex: 1; max-width: 420px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.b-live {
  font-family: var(--mono); font-size: 10px; letter-spacing: .12em;
  color: var(--muted-fg); background: var(--card); border: 1px solid var(--border);
  border-radius: 100px; padding: 4px 12px;
  display: inline-flex; align-items: center; gap: 6px;
}
.b-live::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-600);
  box-shadow: 10px 0 0 0 var(--accent);
  margin-right: 10px;
}
.browser img { display: block; width: 100%; height: auto; }

.stage-caption {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 24px; margin-top: 18px; flex-wrap: wrap;
}
.stage-caption .real {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
}
.stage-caption .real b { color: var(--primary); font-weight: 500; }
.stage-caption a {
  font-size: 14px; color: var(--primary); text-decoration: none;
  border-bottom: 1px solid var(--brand-100);
}
.stage-caption a:hover { border-color: var(--primary); }
.stage-caption .asof { font-size: 14px; color: var(--muted-fg); }

/* ---------- moments ---------- */
.moments { padding: 90px 0 20px; }
.moments-head { max-width: 62ch; margin-bottom: 26px; }
h2 {
  font-weight: 650; font-size: clamp(28px, 3.2vw, 40px);
  letter-spacing: -0.025em; line-height: 1.14; margin-bottom: 14px;
}
h2 em { font-style: normal; color: var(--primary); }
.moments-head p { color: var(--muted-fg); font-size: 17px; }

.moment {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px;
  align-items: center; padding: 64px 0;
  border-top: 1px solid var(--border);
}
.moment:first-of-type { border-top: 0; }
.moment.flip .m-media { order: 2; }
.m-kicker {
  font-family: var(--mono); font-size: 11px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.m-kicker b { color: var(--primary); font-weight: 500; }
h3 {
  font-weight: 650; font-size: 25px;
  letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 14px;
}
.m-copy p { color: var(--muted-fg); font-size: 16px; max-width: 48ch; }
.m-copy p + p { margin-top: 12px; }
.m-copy em { font-style: italic; }
.m-aha {
  margin-top: 22px; font-size: 17px; font-weight: 500; color: var(--foreground);
  padding-left: 16px; border-left: 3px solid var(--brand-600);
}

.shot {
  border-radius: var(--radius-card); border: 1px solid var(--border);
  overflow: hidden; background: var(--card);
  box-shadow: var(--shadow-card);
}
.shot img { display: block; width: 100%; height: auto; }
.shot-cap {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
  padding: 10px 14px; border-top: 1px solid var(--border);
  background: var(--background);
}
.shot-cap b { color: var(--primary); font-weight: 500; }

/* ---------- phone moment ---------- */
.phone-scene {
  display: flex; flex-direction: column; gap: 0; align-items: stretch;
}
.phone-scene > div:first-child { align-self: flex-start; margin-left: 8px; }
.phone {
  width: 264px; flex-shrink: 0;
  background: oklch(0.18 0.01 240); border-radius: 40px; padding: 10px;
  box-shadow: var(--shadow-card-hover), inset 0 0 0 1.5px oklch(0.3 0.01 240);
}
.phone-screen {
  background: oklch(0.12 0.01 240); border-radius: 31px; overflow: hidden;
  min-height: 430px; display: flex; flex-direction: column;
  position: relative;
}
.phone-notch {
  width: 84px; height: 22px; background: oklch(0.18 0.01 240);
  border-radius: 100px; margin: 8px auto 0;
}
.chat-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px 10px;
  border-bottom: 1px solid oklch(0.22 0.01 240);
}
.chat-head .spark {
  width: 22px; height: 22px; border-radius: 7px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px;
}
.chat-head span { color: oklch(0.93 0.01 240); font-size: 12.5px; font-weight: 500; }
.chat-head small { color: oklch(0.55 0.01 240); font-size: 10px; margin-left: auto; font-family: var(--mono); }
.chat { padding: 16px 12px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.bubble {
  max-width: 88%; padding: 10px 13px; border-radius: 16px;
  font-size: 12.5px; line-height: 1.45;
}
.bubble.user {
  align-self: flex-end; background: oklch(0.28 0.05 250); color: oklch(0.96 0.005 240);
  border-bottom-right-radius: 5px;
}
.bubble.ai {
  align-self: flex-start; background: oklch(0.19 0.01 240); color: oklch(0.85 0.005 240);
  border-bottom-left-radius: 5px;
}
.tool-chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .04em;
  color: oklch(0.78 0.12 55); background: oklch(0.18 0.03 55);
  border: 1px solid oklch(0.3 0.05 55);
  border-radius: 100px; padding: 5px 11px;
}
.tool-chip::before { content: "✓"; font-size: 10px; }
.phone-cap {
  text-align: center; margin-top: 14px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--faint);
}
.phone-result {
  width: min(100%, 350px); align-self: flex-end;
  margin-top: -140px; position: relative; z-index: 2;
}
.phone-result .shot { box-shadow: var(--shadow-card-hover); }

/* ---------- cards used ---------- */
.cards-used { padding: 80px 0; }
.cards-used-inner {
  background: var(--brand-50); border-radius: var(--radius-xl); padding: 52px 56px;
  border: 1px solid var(--border);
}
.cards-used h2 { font-size: 28px; }
.cards-used p.sub { color: var(--muted-fg); margin-bottom: 26px; max-width: 58ch; }
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; }
.kind-chip {
  font-family: var(--mono); font-size: 12px; letter-spacing: .02em;
  background: var(--card); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: var(--radius-md); color: var(--foreground);
}
.kind-chip.invented { border-style: dashed; color: var(--accent-deep); }
.chip-note {
  margin-top: 18px; font-size: 13.5px; color: var(--faint);
}
.chip-note b { color: var(--accent-deep); font-weight: 500; }

/* ---------- CTA ---------- */
.cta { padding: 30px 0 110px; text-align: center; }
.cta-inner {
  background: var(--card); color: var(--foreground);
  border: 1px solid var(--border); border-radius: var(--radius-2xl);
  padding: 84px 40px; box-shadow: var(--shadow-card);
}
.cta h2 { font-size: clamp(30px, 3.8vw, 46px); margin-bottom: 12px; }
.cta h2 em { color: var(--primary); }
.cta p { color: var(--muted-fg); font-size: 17px; margin-bottom: 34px; }
.btn-primary {
  display: inline-block; background: var(--primary); color: #fff;
  font-weight: 550; font-size: 16px; text-decoration: none;
  padding: 14px 30px; border-radius: var(--radius-md);
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.btn-primary:hover { background: var(--brand-900); transform: translateY(-1px); }
.btn-ghost {
  display: inline-block; color: var(--muted-fg); text-decoration: none;
  font-size: 15px; margin-left: 18px; border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}
.btn-ghost:hover { color: var(--primary); border-color: var(--primary); }

/* ---------- other pages footer nav ---------- */
.more-uses { padding: 0 0 90px; }
.more-uses h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--faint); margin-bottom: 18px;
  font-weight: 500;
}
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.more-grid a {
  display: block; text-decoration: none; color: var(--foreground);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px; font-size: 16.5px; font-weight: 600;
  letter-spacing: -0.01em;
  transition: box-shadow .15s var(--ease), transform .15s var(--ease);
  box-shadow: var(--shadow-card);
}
.more-grid a small {
  display: block; font-size: 13px; color: var(--muted-fg);
  margin-top: 4px; font-weight: 400;
}
.more-grid a:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-2px); }

footer {
  border-top: 1px solid var(--border); padding: 28px 0 44px;
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  color: var(--faint); font-size: 13.5px;
}
footer .close-line { color: var(--muted-fg); }

/* ---------- index hub ---------- */
.hub-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 40px 0 90px;
}
.hub-card {
  display: block; text-decoration: none; color: var(--foreground);
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden; transition: transform .18s var(--ease), box-shadow .18s var(--ease);
  box-shadow: var(--shadow-card);
}
.hub-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card-hover);
}
.hub-thumb { overflow: hidden; border-bottom: 1px solid var(--border); aspect-ratio: 16/9.6; }
.hub-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; transition: transform .3s var(--ease); }
.hub-card:hover .hub-thumb img { transform: scale(1.02); }
.hub-body { padding: 24px 26px 26px; }
.hub-body .eyebrow { font-size: 10.5px; }
.hub-body h3 { margin: 10px 0 8px; font-size: 22px; }
.hub-body p { color: var(--muted-fg); font-size: 14.5px; }
.hub-arrow {
  margin-top: 16px; font-family: var(--mono); font-size: 12px;
  color: var(--primary); letter-spacing: .04em;
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}

/* ---------- phone board swap (David 2026-09-03, option b) ----------
   The full-board shot is a postage stamp on a 390px screen, so below 640px it
   is replaced by a single real card close-up. Desktop keeps the whole board. */
.board-phone { display: none; }
.board-phone .shot { max-width: 460px; margin: 0 auto; }

/* "See it live" link inside the as-of caption. */
.stage-caption .asof a {
  color: var(--primary); text-decoration: none;
  border-bottom: 1px solid color-mix(in oklab, var(--primary) 35%, transparent);
  white-space: nowrap;
}
.stage-caption .asof a:hover { border-bottom-color: var(--primary); }

/* The phone moment is a single full-width beat, not a two-column split. */
.phone-moment .moment {
  grid-template-columns: 1fr; padding-top: 8px; border-top: 0;
}
.m-media-wide { width: 100%; }

/* ---------- responsive ---------- */
@media (max-width: 880px) {
  .wrap { padding: 0 20px; }
  .moment { grid-template-columns: 1fr; gap: 32px; padding: 48px 0; }
  .moment.flip .m-media { order: 0; }
  .hub-grid { grid-template-columns: 1fr; }
  .more-grid { grid-template-columns: 1fr; }
  .phone-result { margin-top: -90px; }
  .mock-ribbon { display: none; }
  .pillars-grid { grid-template-columns: 1fr; gap: 28px; }
  .prompt-grid { grid-template-columns: 1fr; }
  .proof-inner { grid-template-columns: 1fr; gap: 28px; }
  .cards-used-inner { padding: 34px 26px; }
  .nav-links a:not(.nav-cta) { display: none; }
}

@media (max-width: 640px) {
  /* Option b: swap the full board for a card close-up you can actually read. */
  .board-stage .browser { display: none; }
  .board-phone { display: block; }
  .board-stage { padding: 40px 0 24px; }
  .stage-caption { gap: 6px; }
}
