/*
 * Marketing site (/). Layout and sections only; colours, type and spacing come from
 * tokens.css, shared parts (buttons, badges, wordmark) from base.css.
 */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + var(--space-4)); }
body { background: var(--background); font-size: var(--text-base); }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--space-6); }
h1, h2, h3 { font-family: var(--font-display); color: var(--foreground); margin: 0; }
p { margin: 0; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header); border-bottom: 1px solid var(--border); backdrop-filter: saturate(180%) blur(10px); -webkit-backdrop-filter: saturate(180%) blur(10px); }
.site-header-inner { display: flex; align-items: center; gap: var(--space-8); height: var(--header-height); }
.site-nav { display: flex; gap: var(--space-6); flex: 1; }
.site-nav a { color: var(--muted-foreground); text-decoration: none; font-size: var(--text-sm); font-weight: var(--weight-medium); }
.site-nav a:hover { color: var(--foreground); }
.site-header-actions { display: flex; align-items: center; gap: var(--space-2); margin-left: auto; }
.header-demo { font-size: var(--text-sm); color: var(--foreground); }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; padding: var(--space-20) 0 var(--space-24); border-bottom: 1px solid var(--border); background:
  radial-gradient(60% 60% at 85% 0%, var(--brand-soft) 0%, transparent 70%),
  linear-gradient(var(--background), var(--page)); }
.hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px; -webkit-mask-image: radial-gradient(70% 60% at 70% 20%, #000 0%, transparent 75%); mask-image: radial-gradient(70% 60% at 70% 20%, #000 0%, transparent 75%); }
.hero-grid { position: relative; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: var(--space-16); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: var(--text-sm); font-weight: var(--weight-medium); color: var(--muted-foreground); margin-bottom: var(--space-6); }
.hero h1 { font-size: var(--text-6xl); line-height: 1.04; letter-spacing: var(--tracking-tighter); font-weight: var(--weight-bold); text-wrap: balance; }
.lede { margin-top: var(--space-6); font-size: var(--text-lg); line-height: var(--leading-relaxed); color: var(--muted-foreground); max-width: 36rem; }
.hero-actions { display: flex; gap: var(--space-3); flex-wrap: wrap; margin-top: var(--space-8); }
.hero-note { margin-top: var(--space-5); font-size: var(--text-sm); color: var(--muted-foreground); max-width: 34rem; }

/* Illustrative API panel */
.hero-panel { margin: 0; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-lg); overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); background: var(--page); }
.panel-dots { display: flex; gap: 6px; }
.panel-dots span { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.panel-title { font-family: var(--font-mono); font-size: var(--text-xs); font-weight: var(--weight-semibold); color: var(--muted-foreground); }
.panel-code { margin: 0; padding: var(--space-4) var(--space-5); background: var(--code-bg); color: var(--code-fg); font-size: var(--text-xs); line-height: 1.7; overflow-x: auto; }
.panel-code .c { color: var(--code-muted); }
.panel-code .k { color: var(--code-key); }
.panel-code .s { color: var(--code-string); }
.panel-offers { list-style: none; margin: 0; padding: var(--space-3); display: grid; gap: var(--space-2); }
.panel-offers li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: var(--space-3); align-items: center; padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-lg); font-size: var(--text-sm); }
.panel-offers li:first-child { border-color: var(--brand-border); background: var(--brand-soft); }
.panel-offers li.excluded { border-style: dashed; color: var(--muted-foreground); }
.offer-rank { font-weight: var(--weight-semibold); color: var(--muted-foreground); font-variant-numeric: tabular-nums; text-align: center; }
.offer-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.offer-main strong { font-weight: var(--weight-semibold); line-height: var(--leading-snug); }
.excluded .offer-main strong { font-weight: var(--weight-medium); color: var(--muted-foreground); }
.offer-main span { font-size: var(--text-xs); color: var(--muted-foreground); }
.offer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-variant-numeric: tabular-nums; }
.rel { display: inline-flex; align-items: center; gap: 6px; font-size: var(--text-xs); color: var(--muted-foreground); }
.rel-bar { display: block; width: 48px; height: 4px; border-radius: var(--radius-full); background: linear-gradient(90deg, var(--brand) var(--w), var(--border) var(--w)); }
.rel-92 { --w: 92%; }
.rel-71 { --w: 71%; }
.price { font-weight: var(--weight-semibold); }
.excluded .price { text-decoration: line-through; font-weight: var(--weight-normal); }
.panel-caption { padding: 0 var(--space-4) var(--space-4); font-size: var(--text-xs); color: var(--muted-foreground); }

/* ---------- sections ---------- */
.section { padding: var(--space-24) 0; }
.section-alt { background: var(--page); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { max-width: 44rem; margin-bottom: var(--space-12); }
.kicker { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--brand-ink); margin-bottom: var(--space-3); }
.section h2 { font-size: var(--text-4xl); line-height: var(--leading-tight); letter-spacing: var(--tracking-tight); font-weight: var(--weight-bold); text-wrap: balance; }
.section-head p:last-child { margin-top: var(--space-4); font-size: var(--text-lg); color: var(--muted-foreground); line-height: var(--leading-relaxed); }

/* How it works */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); counter-reset: step; }
.step-card { position: relative; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-6) var(--space-5); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-xl); box-shadow: var(--shadow-xs); }
.step-card + .step-card::before { content: ""; position: absolute; top: 38px; left: calc(-1 * var(--space-4) - 1px); width: var(--space-4); height: 1px; background: var(--border-strong); }
.step-n { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--brand-foreground); font-size: var(--text-sm); font-weight: var(--weight-semibold); }
.step-card h3 { font-size: var(--text-base); font-weight: var(--weight-semibold); letter-spacing: -0.01em; }
.step-card p { font-size: var(--text-sm); color: var(--muted-foreground); line-height: var(--leading-normal); flex: 1; }
.step-card code { font-size: var(--text-2xs); color: var(--foreground); background: var(--muted); padding: 3px 6px; border-radius: var(--radius-sm); width: fit-content; max-width: 100%; overflow-wrap: anywhere; }

/* Audiences */
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.audience { display: flex; flex-direction: column; padding: var(--space-10); background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-2xl); box-shadow: var(--shadow-sm); scroll-margin-top: calc(var(--header-height) + var(--space-4)); }
.audience h2 { font-size: var(--text-3xl); }
.ticks { list-style: none; margin: var(--space-8) 0; padding: 0; display: grid; gap: var(--space-4); flex: 1; }
.ticks li { position: relative; padding-left: var(--space-8); color: var(--muted-foreground); font-size: var(--text-base); line-height: var(--leading-normal); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--brand-soft) var(--check-brand) no-repeat center / 12px 12px; border: 1px solid var(--brand-border); }
.ticks strong { color: var(--foreground); font-weight: var(--weight-semibold); }
.text-link { color: var(--brand-ink); font-weight: var(--weight-semibold); text-decoration: none; font-size: var(--text-sm); width: fit-content; }
.text-link:hover { text-decoration: underline; }

/* Trust */
.trust-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-4); }
.trust-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding: var(--space-6); border: 1px solid var(--border); border-radius: var(--radius-xl); background: var(--card); }
.trust-card h3 { font-size: var(--text-base); font-weight: var(--weight-semibold); margin-top: var(--space-1); }
.trust-card p { font-size: var(--text-sm); color: var(--muted-foreground); }
.trust-card a { color: var(--foreground); font-family: var(--font-mono); font-size: var(--text-xs); overflow-wrap: anywhere; }
.standards { margin-top: var(--space-8); font-size: var(--text-sm); color: var(--muted-foreground); }

/* CTAs */
.section-cta { padding-top: 0; }
.cta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-6); }
.cta-card { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); padding: var(--space-10); border-radius: var(--radius-2xl); border: 1px solid var(--border); }
.cta-card h2 { font-size: var(--text-2xl); }
.cta-card p { color: var(--muted-foreground); flex: 1; max-width: 32rem; }
.cta-demo { background: var(--brand-soft); border-color: var(--brand-border); }
.cta-demo p { color: var(--brand-ink); }
.cta-contact { background: var(--page); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--page); padding: var(--space-10) 0; }
.site-footer-inner { display: flex; align-items: center; gap: var(--space-8); flex-wrap: wrap; }
.site-footer .wordmark-name { font-size: var(--text-sm); }
.footer-nav { display: flex; gap: var(--space-6); flex-wrap: wrap; flex: 1; }
.footer-nav a { color: var(--muted-foreground); text-decoration: none; font-size: var(--text-sm); }
.footer-nav a:hover { color: var(--foreground); text-decoration: underline; }
.footer-note { font-size: var(--text-xs); color: var(--muted-foreground); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-card + .step-card::before { display: none; }
  .trust-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--space-12); }
  .hero h1 { font-size: var(--text-5xl); }
  .site-nav { display: none; }
}
@media (max-width: 760px) {
  .container { padding: 0 var(--space-4); }
  .hero { padding: var(--space-12) 0 var(--space-16); }
  .hero h1 { font-size: 2.375rem; }
  .lede { font-size: var(--text-base); }
  .hero-actions .btn { flex: 1 1 100%; }
  .section { padding: var(--space-16) 0; }
  .section h2 { font-size: var(--text-3xl); }
  .audience h2 { font-size: var(--text-2xl); }
  .steps, .trust-grid, .audience-grid, .cta-grid { grid-template-columns: 1fr; }
  .audience, .cta-card { padding: var(--space-6); }
  .cta-card .btn { width: 100%; }
  .site-header-inner { gap: var(--space-3); }
  .site-header-actions { gap: 0; }
  .panel-offers li { grid-template-columns: 18px minmax(0, 1fr) auto; gap: var(--space-2); }
  .rel-bar { display: none; }
}
