/* ============================================================
   ClipCite — Marketing Site Styles
   Design tokens: DESIGN.md  |  Fonts: Schibsted Grotesk + Spline Sans Mono
   ============================================================ */

/* ── 1. Reset & base ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

/* ── 2. Design tokens (OKLCH — DESIGN.md) ── */
:root {
  /* Brand palette */
  --brand:        oklch(0.48 0.20 277);   /* icon indigo ≈ #4338ca */
  --brand-deep:   oklch(0.32 0.13 278);   /* hero / drenched backgrounds */
  --brand-bright: oklch(0.62 0.20 277);   /* gradient highlight, hovers */

  /* Ink */
  --ink:          oklch(0.24 0.03 278);   /* body text on light ≥4.5:1 */
  --ink-soft:     oklch(0.46 0.03 278);   /* secondary text */

  /* Surface */
  --bg:           oklch(0.985 0.004 277); /* near-white, faint indigo tint */
  --surface:      oklch(1 0 0);           /* cards / panels */
  --line:         oklch(0.90 0.012 277);  /* hairline borders */

  /* Accent (Pro / amber) */
  --accent:       oklch(0.80 0.14 78);    /* warm amber — Pro badge / secondary CTA */
  --accent-ink:   oklch(0.24 0.03 278);   /* dark ink on amber, never white */

  /* Hero / drenched text */
  --hero-text:    oklch(0.97 0.01 277);
  --hero-muted:   oklch(0.85 0.04 277);

  /* Layout */
  --max-w:        1120px;
  --reading-w:    68ch;
  --radius:       0.5rem;
  --radius-lg:    1rem;

  /* Typography */
  --ff:           'Schibsted Grotesk', system-ui, -apple-system, sans-serif;
  --ff-mono:      'Spline Sans Mono', 'Courier New', monospace;
}

/* ── 3. Base typography ── */
body {
  font-family: var(--ff);
  background: var(--bg);
  color: var(--ink);
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: 1.65;
  text-wrap: pretty;
}

h1, h2, h3, h4 {
  font-family: var(--ff);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  text-wrap: balance;
  color: var(--ink);
}

h1 { font-size: clamp(2.25rem, 5vw, 4rem); letter-spacing: -0.03em; }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); letter-spacing: -0.025em; }
h3 { font-size: clamp(1.05rem, 1.8vw, 1.25rem); letter-spacing: -0.015em; font-weight: 700; }

p { max-width: var(--reading-w); }

a { color: var(--brand); text-decoration: none; transition: color 0.15s; }
a:hover { color: var(--brand-bright); }
a:focus-visible {
  outline: 2.5px solid var(--brand);
  outline-offset: 3px;
  border-radius: 3px;
}

code, pre {
  font-family: var(--ff-mono);
  font-size: 0.875em;
}

/* ── 4. Layout utilities ── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

section { padding-block: clamp(3.5rem, 7vw, 6rem); }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ── 5. Navigation ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.nav-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  height: 3.75rem;
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  text-decoration: none;
  flex-shrink: 0;
}

.nav-brand:hover { color: var(--brand); }

.nav-brand svg {
  width: 1.75rem;
  height: 1.75rem;
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2vw, 1.75rem);
  list-style: none;
  margin-inline-start: 0.25rem;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.15s;
}

.nav-links a:hover { color: var(--ink); }

.nav-end {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-inline-start: auto;
}

/* Language toggle */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.1rem;
}

.lang-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--ff);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink-soft);
  padding: 0.25rem 0.3rem;
  border-radius: 4px;
  transition: color 0.12s;
  line-height: 1;
}

.lang-btn:hover { color: var(--ink); }
.lang-btn[aria-pressed="true"] { color: var(--brand); font-weight: 700; }
.lang-btn:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

.lang-sep {
  color: var(--line);
  font-size: 0.8rem;
  user-select: none;
  pointer-events: none;
}

/* Nav CTA */
.btn-nav {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--brand);
  color: #fff;
  font-family: var(--ff);
  font-size: 0.825rem;
  font-weight: 600;
  padding: 0.5rem 1.1rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
  text-decoration: none;
}

.btn-nav:hover { background: var(--brand-bright); color: #fff; transform: translateY(-1px); }
.btn-nav:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; }

.btn-nav[aria-disabled="true"],
.btn-nav.coming-soon {
  background: var(--ink-soft);
  opacity: 0.6;
  cursor: default;
  transform: none;
}

/* ── 6. Primary CTA buttons ── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--hero-text);
  color: var(--brand-deep);
  font-family: var(--ff);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  letter-spacing: -0.01em;
  transition: background 0.15s, transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary:hover {
  background: #fff;
  color: var(--brand-deep);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px oklch(0 0 0 / 0.2);
}

.btn-primary:focus-visible {
  outline: 2.5px solid var(--hero-text);
  outline-offset: 3px;
}

.btn-primary[aria-disabled="true"],
.btn-primary.coming-soon {
  background: oklch(0.75 0.05 277);
  color: var(--brand-deep);
  opacity: 0.7;
  cursor: default;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: transparent;
  color: var(--brand);
  font-family: var(--ff);
  font-size: 0.925rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s, transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-secondary:hover {
  border-color: var(--brand);
  color: var(--brand-bright);
  transform: translateY(-1px);
}

.btn-pro {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--ff);
  font-size: 0.925rem;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: filter 0.15s, transform 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-pro:hover { filter: brightness(1.05); transform: translateY(-1px); color: var(--accent-ink); }

/* ── 7. Hero section ── */
#hero {
  background: var(--brand-deep);
  color: var(--hero-text);
  padding-block: clamp(4rem, 9vw, 7rem) clamp(3rem, 7vw, 6rem);
  overflow: hidden;
  position: relative;
}

/* Subtle ambient light */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 50% -10%, oklch(0.55 0.22 277 / 0.4) 0%, transparent 70%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy { max-width: 52ch; }

.hero-headline {
  color: var(--hero-text);
  margin-bottom: 1.25rem;
  max-width: 18ch;
}

.hero-sub {
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--hero-muted);
  max-width: 46ch;
  line-height: 1.7;
  margin-bottom: 2rem;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-trust {
  font-size: 0.825rem;
  color: var(--hero-muted);
  letter-spacing: 0.01em;
}

.hero-trust strong { color: var(--hero-text); font-weight: 600; }

/* ── 8. Popup demo (hero visual) ── */
.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.demo-wrapper {
  position: relative;
  width: 100%;
  max-width: 340px;
}

/* Faux article background */
.demo-article {
  background: oklch(0.97 0.01 277 / 0.08);
  border: 1px solid oklch(0.97 0.01 277 / 0.12);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  margin-bottom: -2.5rem;
}

.demo-line {
  height: 0.6rem;
  border-radius: 4px;
  background: oklch(0.97 0.01 277 / 0.15);
  margin-bottom: 0.6rem;
}

.demo-line--title {
  height: 0.9rem;
  width: 85%;
  background: oklch(0.97 0.01 277 / 0.3);
  margin-bottom: 0.8rem;
}

.demo-line--highlight {
  height: 0.65rem;
  width: 90%;
  background: oklch(0.80 0.14 78 / 0.35);
  border-radius: 3px;
}

.demo-line--short { width: 55%; }
.demo-line--med { width: 75%; }
.demo-line--long { width: 92%; }

/* Popup card */
.demo-popup {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 48px oklch(0.2 0.1 278 / 0.35), 0 4px 12px oklch(0.2 0.1 278 / 0.2);
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.demo-popup-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem 0.6rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

.demo-popup-brand {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--brand);
  letter-spacing: -0.01em;
}

.demo-popup-brand svg {
  width: 1.1rem;
  height: 1.1rem;
}

.demo-popup-close {
  background: none;
  border: none;
  font-size: 1rem;
  color: var(--ink-soft);
  cursor: default;
  padding: 0.1rem 0.25rem;
  tabindex: -1;
  line-height: 1;
}

.demo-popup-meta {
  padding: 0.65rem 1rem 0.75rem;
  border-bottom: 1px solid var(--line);
}

.demo-popup-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.demo-popup-source {
  font-size: 0.7rem;
  color: var(--ink-soft);
  font-family: var(--ff-mono);
}

.demo-popup-actions {
  padding: 0.65rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.demo-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  font-family: var(--ff);
  font-size: 0.775rem;
  font-weight: 500;
  cursor: default;
  transition: none;
  text-align: left;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.2;
}

.demo-btn-primary {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}

.demo-btn-pro {
  color: var(--ink-soft);
  justify-content: space-between;
}

.demo-btn-upgrade {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: transparent;
  font-weight: 700;
  justify-content: center;
  font-size: 0.775rem;
}

.demo-pro-badge {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent);
  background: oklch(0.95 0.06 78);
  padding: 0.1rem 0.35rem;
  border-radius: 999px;
  flex-shrink: 0;
}

.demo-toast {
  margin: 0 1rem 0.75rem;
  background: oklch(0.35 0.15 155);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.45rem 0.75rem;
  border-radius: calc(var(--radius) - 2px);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ── 9. Trust strip ── */
#trust {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}

.trust-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 3rem;
  align-items: center;
  justify-content: center;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--ink-soft);
}

.trust-icon {
  width: 2rem;
  height: 2rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--brand);
}

.trust-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--line);
  flex-shrink: 0;
}

/* ── 10. Problem → Solution ── */
#problem {
  background: var(--bg);
}

.problem-header {
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.problem-header h2 { margin-bottom: 0.5rem; }

.problem-header p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.problem-split {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.problem-col {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.25rem, 3vw, 2rem);
}

.problem-col--before {
  border-color: oklch(0.88 0.05 15);
  background: oklch(0.99 0.005 15);
}

.problem-col--after {
  border-color: oklch(0.82 0.1 155);
  background: oklch(0.99 0.005 155);
}

.problem-col-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.problem-col--before .problem-col-label {
  color: oklch(0.45 0.15 15);
  background: oklch(0.92 0.05 15);
}

.problem-col--after .problem-col-label {
  color: oklch(0.38 0.14 155);
  background: oklch(0.88 0.08 155);
}

.problem-chain {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.problem-chain li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.4;
  max-width: none;
}

.problem-chain li::before {
  content: '';
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: oklch(0.70 0.1 15);
  flex-shrink: 0;
  margin-top: 0.45rem;
}

.problem-chain--after li::before {
  background: oklch(0.55 0.14 155);
}

.problem-chain--after li {
  font-weight: 500;
  color: var(--ink);
}

.problem-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 3rem;
  color: var(--brand);
}

/* ── 11. Features ── */
#features { background: var(--surface); }

.features-header {
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.features-header h2 { margin-bottom: 0.5rem; }

.features-header p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.feature-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  padding-block: clamp(2.5rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}

.feature-row:first-of-type { border-top: none; padding-top: 0; }

.feature-row--flip { direction: rtl; }
.feature-row--flip > * { direction: ltr; }

.feature-copy { }

.feature-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}

.feature-copy h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  margin-bottom: 0.75rem;
  color: var(--ink);
}

.feature-copy p {
  color: var(--ink-soft);
  font-size: clamp(0.9rem, 1.1vw, 1rem);
  line-height: 1.7;
  max-width: 42ch;
}

/* Feature visuals */
.feature-visual {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Markdown preview card */
.md-preview {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  line-height: 1.8;
  color: var(--ink);
  width: 100%;
  max-width: 360px;
  overflow: hidden;
}

.md-h1 { color: var(--brand); font-weight: 700; font-size: 0.85rem; }
.md-bold { font-weight: 700; }
.md-italic { font-style: italic; color: var(--ink-soft); }
.md-meta { color: var(--ink-soft); }
.md-blockquote {
  padding-left: 0.75rem;
  color: var(--ink-soft);
  font-style: italic;
  margin-block: 0.4rem;
}
.md-link { color: var(--brand); text-decoration: underline; }
.md-divider { color: var(--line); }

/* BibTeX block */
.bibtex-block {
  background: oklch(0.14 0.04 278);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  width: 100%;
  max-width: 400px;
  overflow: auto;
}

.bibtex-block pre {
  font-family: var(--ff-mono);
  font-size: 0.78rem;
  line-height: 1.7;
  color: oklch(0.88 0.03 277);
  white-space: pre;
}

.bt-at    { color: oklch(0.75 0.15 277); }
.bt-type  { color: oklch(0.72 0.16 200); }
.bt-key   { color: oklch(0.82 0.12 90); }
.bt-field { color: oklch(0.68 0.13 155); }
.bt-value { color: oklch(0.85 0.04 277); }
.bt-brace { color: oklch(0.65 0.05 277); }

/* Destination buttons visual */
.dest-visual {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  width: 100%;
  max-width: 300px;
}

.dest-btn {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  cursor: default;
}

.dest-btn-icon {
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 4px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

.dest-btn-icon--clip  { background: oklch(0.92 0.05 277); color: var(--brand); }
.dest-btn-icon--md    { background: oklch(0.90 0.03 277); color: var(--brand); }
.dest-btn-icon--notion{ background: oklch(0.20 0.02 278); color: #fff; }
.dest-btn-icon--obs   { background: oklch(0.42 0.15 295); color: #fff; }

.dest-pro-tag {
  margin-inline-start: auto;
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
}

/* Highlight visual */
.highlight-visual {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  width: 100%;
  max-width: 360px;
}

.hl-article-text {
  font-size: 0.85rem;
  line-height: 1.7;
  color: var(--ink-soft);
  margin-bottom: 1rem;
}

.hl-selected {
  background: oklch(0.97 0.10 78 / 0.6);
  color: var(--ink);
  border-radius: 2px;
  padding: 0 2px;
}

.hl-result {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.65rem 0.9rem;
  font-family: var(--ff-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-style: italic;
}

/* Local / language visual */
.local-visual {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  max-width: 300px;
}

.local-badge {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.6rem 0.9rem;
  font-size: 0.825rem;
  color: var(--ink);
}

.local-badge-icon {
  font-size: 1rem;
}

.local-lang-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.local-lang-chip {
  background: oklch(0.92 0.04 277);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

/* ── 12. How it works ── */
#how { background: var(--bg); }

.how-header { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.how-header h2 { margin-bottom: 0.5rem; }
.how-header p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  position: relative;
}

.steps::before {
  content: '';
  position: absolute;
  top: 1.3rem;
  left: calc(33.33% - 0.5px);
  right: calc(33.33% - 0.5px);
  height: 1px;
  background: var(--line);
  pointer-events: none;
}

.step { display: flex; flex-direction: column; gap: 0.9rem; }

.step-num {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step h3 { font-size: 1.05rem; color: var(--ink); margin-bottom: 0.1rem; }

.step p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: none;
}

/* ── 13. Pricing ── */
#pricing { background: var(--surface); }

.pricing-header { margin-bottom: clamp(2rem, 4vw, 3.5rem); }
.pricing-header h2 { margin-bottom: 0.5rem; }
.pricing-header p {
  color: var(--ink-soft);
  font-size: clamp(1rem, 1.3vw, 1.1rem);
}

.plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2rem);
  align-items: start;
}

.plan {
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.plan--pro {
  background: var(--surface);
  border-color: var(--brand);
  position: relative;
  box-shadow: 0 0 0 4px oklch(0.48 0.20 277 / 0.08);
}

.plan-badge {
  position: absolute;
  top: -0.75rem;
  left: 1.5rem;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
}

.plan-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.75rem;
}

.plan-price-block {}

.plan-price {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 0.3rem;
}

.plan-price sup {
  font-size: 0.5em;
  font-weight: 700;
  vertical-align: super;
  letter-spacing: 0;
}

.plan-price-unit {
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0;
}

.plan-price-secondary {
  font-size: 0.8rem;
  color: var(--ink-soft);
  line-height: 1.5;
}

.plan-tagline {
  font-size: 0.875rem;
  color: var(--ink-soft);
  margin-top: -0.5rem;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--ink);
  line-height: 1.45;
  max-width: none;
}

.plan-features li::before {
  content: '';
  width: 1rem;
  height: 1rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Ccircle cx='8' cy='8' r='7' fill='oklch(0.48 0.20 277)'/%3E%3Cpath d='M5 8l2 2 4-4' stroke='white' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.plan .btn-secondary,
.plan .btn-pro {
  width: 100%;
  justify-content: center;
  margin-top: auto;
}

/* ── 14. FAQ ── */
#faq { background: var(--bg); }

.faq-header { margin-bottom: clamp(2rem, 4vw, 3rem); }
.faq-header h2 { margin-bottom: 0.5rem; }

.faq-list {
  max-width: 720px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

details {
  border-top: 1px solid var(--line);
}

details:last-child { border-bottom: 1px solid var(--line); }

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }

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

summary .faq-chevron {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  color: var(--ink-soft);
  transition: transform 0.2s ease;
}

details[open] summary .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  padding: 0 0 1.25rem;
  font-size: 0.925rem;
  color: var(--ink-soft);
  line-height: 1.7;
  max-width: 60ch;
}

/* ── 15. Final CTA ── */
#final-cta {
  background: var(--brand-deep);
  color: var(--hero-text);
  text-align: center;
  padding-block: clamp(4rem, 8vw, 6.5rem);
  position: relative;
  overflow: hidden;
}

#final-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 70% at 50% 110%, oklch(0.55 0.22 277 / 0.35) 0%, transparent 65%);
  pointer-events: none;
}

.fcta-inner {
  position: relative;
  max-width: 580px;
  margin-inline: auto;
}

#final-cta h2 {
  color: var(--hero-text);
  margin-bottom: 1rem;
}

#final-cta p {
  color: var(--hero-muted);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
  margin-inline: auto;
  margin-bottom: 2rem;
}

/* ── 16. Footer ── */
.site-footer {
  background: var(--brand-deep);
  color: var(--hero-muted);
  font-size: 0.875rem;
}

.footer-top {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) clamp(1.5rem, 3vw, 2rem);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid oklch(0.97 0.01 277 / 0.1);
}

.footer-brand {
  font-size: 1rem;
  font-weight: 800;
  color: var(--hero-text);
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.footer-brand svg { width: 1.3rem; height: 1.3rem; }
.footer-brand:hover { color: #fff; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--hero-muted);
  font-size: 0.85rem;
  transition: color 0.15s;
}

.footer-links a:hover { color: var(--hero-text); }

.footer-bottom {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: oklch(0.7 0.04 278);
}

/* ── 17. Privacy section ── */
#privacy {
  background: var(--bg);
  border-top: 1px solid var(--line);
}

.privacy-header { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.privacy-header h2 { margin-bottom: 0.5rem; }
.privacy-header p { color: var(--ink-soft); }

.privacy-updated {
  display: inline-block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius);
  margin-bottom: 1.75rem;
  font-family: var(--ff-mono);
}

.privacy-body {
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.8;
  max-width: 72ch;
}

.privacy-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 1.75rem 0 0.5rem;
  letter-spacing: -0.01em;
}

.privacy-body h3:first-child { margin-top: 0; }
.privacy-body p { margin-bottom: 0.75rem; max-width: none; }
.privacy-body ul { padding-left: 1.25rem; margin-bottom: 0.75rem; }
.privacy-body ul li { margin-bottom: 0.4rem; }
.privacy-body a { color: var(--brand); }
.privacy-body code {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.825em;
}

/* ── 18. Animations ── */
@keyframes rise-fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-animate {
  animation: rise-fade 0.65s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-animate:nth-child(1) { animation-delay:   0ms; }
.hero-animate:nth-child(2) { animation-delay:  80ms; }
.hero-animate:nth-child(3) { animation-delay: 160ms; }
.hero-animate:nth-child(4) { animation-delay: 240ms; }
.hero-animate:nth-child(5) { animation-delay: 320ms; }

/* Scroll reveal
   Content is ALWAYS visible by default — no-JS users, crawlers, OG-preview bots,
   headless / full-page screenshots and slow-JS users all see every section.
   The hidden-then-rise enhancement applies ONLY once app.js adds the `.js` hook,
   and a JS failsafe guarantees nothing can stay hidden. Never gate content on JS. */
.reveal {
  opacity: 1;
  transform: none;
}

.js .reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease-out, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* ── 19. Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .hero-animate {
    animation: none;
    opacity: 1;
    transform: none;
  }

  .reveal,
  .js .reveal,
  .js .reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .btn-primary,
  .btn-secondary,
  .btn-pro,
  .btn-nav,
  summary .faq-chevron {
    transition: none;
  }
}

/* ── 20. Responsive ── */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-headline { max-width: none; }
  .hero-sub { margin-inline: auto; }

  .hero-cta-row {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
    margin-bottom: -1rem;
  }

  .demo-wrapper { max-width: 300px; }

  .feature-row {
    grid-template-columns: 1fr;
  }

  .feature-row--flip { direction: ltr; }

  .problem-split {
    grid-template-columns: 1fr;
  }

  .problem-arrow { padding: 0; transform: rotate(90deg); }

  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }

  .plans { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .nav-links { display: none; }
  .btn-nav { display: none; }

  .trust-divider { display: none; }
  .trust-inner { flex-direction: column; align-items: flex-start; gap: 1rem; }

  .footer-top { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .footer-links { gap: 0.5rem 1rem; }
}

@media (max-width: 420px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .hero-cta-row { flex-direction: column; align-items: stretch; }
  .btn-primary { text-align: center; justify-content: center; }
}

/* Ensure no text overflow on any breakpoint */
* { overflow-wrap: break-word; word-break: break-word; }
h1, h2, h3 { word-break: normal; hyphens: auto; }
