/* ScrollFlow demo site — flat, one motif: the circle.
   Ground slate, fields sage and blush, one accent: deep olive. */

:root {
  --bg: #a6b3bc;
  --surface: #b2bdc5;
  --sage: #b7c8be;
  --blush: #d6c4b8;
  --ink: #1c1c1c;
  --muted: #38424a;
  --accent: #2c3620;
  --accent-ink: #e3e2da;
  --sf-progress-color: #2c3620;
  --step-small: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 3.2vw, 4rem);
  --margin: 24px;
}

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

body {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: var(--step-body);
  line-height: 1.5;
  overflow-x: hidden;
}

a { color: var(--ink); }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.dot {
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  padding: 0.85rem 1.9rem;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-small { padding: 0.45rem 1.1rem; font-size: var(--step-small); }
.btn-ghost { background: var(--surface); color: var(--ink); }

/* Header */
.site-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding: 1.1rem var(--margin);
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: var(--step-lead);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem 1.4rem;
}
.site-nav a { text-decoration: none; font-weight: 500; }
.site-nav a:hover { text-decoration: underline; }
.site-nav a.btn { color: var(--accent-ink); }
.site-nav a.btn:hover { text-decoration: none; }

/* Hero */
.hero {
  position: relative;
  overflow: hidden;
  padding: 9vh var(--margin) 12vh;
  min-height: 82svh;
}
.hero-circle {
  position: absolute;
  width: 118vh;
  height: 118vh;
  border-radius: 50%;
  background: var(--accent);
  right: -38vh;
  top: -18vh;
  z-index: 0;
  display: flex;
  align-items: center;
}
.hero-circle span {
  margin-left: 15%;
  color: var(--accent-ink);
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.05;
  max-width: 9ch;
}
.hero-text { position: relative; z-index: 1; max-width: 1000px; }
.hero h1 {
  font-size: clamp(3.2rem, 9vw, 8.6rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 2rem;
}
.lead { font-size: var(--step-lead); max-width: 34ch; margin-bottom: 2.4rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.hero-fact { font-weight: 600; max-width: 38ch; }

/* Sections */
section { padding: 120px var(--margin); }
.section-inner { max-width: 1560px; margin: 0 auto; }
.band-sage { background: var(--sage); }
.band-blush { background: var(--blush); }
h2 {
  font-size: var(--step-head);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 1.4rem;
}
.section-lead { max-width: 56ch; margin-bottom: 3rem; }

/* Playground */
.playground {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}
.playground-stage {
  background: var(--surface);
  min-height: 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.playground-disc {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: var(--step-lead);
}
.playground-controls { display: grid; gap: 1.4rem; }
.control { display: grid; gap: 0.5rem; font-weight: 500; }
.control select {
  font: inherit;
  padding: 0.7rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  max-width: 320px;
}
.control input[type="range"] { width: 100%; max-width: 420px; accent-color: var(--accent); height: 44px; }
.playground-code {
  background: var(--ink);
  color: var(--accent-ink);
  padding: 1.1rem 1.3rem;
  overflow-x: auto;
  font-size: 0.95rem;
}

/* Ledger */
.ledger { display: grid; gap: 3.2rem; }
.ledger-row {
  display: grid;
  grid-template-columns: auto 240px 1fr auto;
  gap: 1.2rem;
  align-items: baseline;
}
.ledger-row h3 { font-size: var(--step-lead); font-weight: 600; letter-spacing: -0.01em; }
.ledger-row p { max-width: 52ch; }
.ledger-figure { font-weight: 600; white-space: nowrap; }
code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.92em;
}

/* Install */
.install-title { font-size: var(--step-lead); font-weight: 600; margin: 2.6rem 0 1rem; }
.install-note { max-width: 62ch; margin-bottom: 1rem; }
.code-block { position: relative; margin-bottom: 1.2rem; }
.code-block pre {
  background: var(--ink);
  color: var(--accent-ink);
  padding: 1.3rem 1.5rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 1rem;
  line-height: 1.55;
}
.code-block .copy-btn { position: absolute; top: 0.8rem; right: 0.8rem; }

/* Parallax demo */
.parallax-demo { padding: 72px 0; }
.parallax-demo .section-inner { padding: 0 var(--margin); margin-bottom: 3rem; }
.parallax-field {
  position: relative;
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-ink);
  min-height: 60svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6rem;
  padding: 6rem var(--margin);
}
.parallax-disc {
  position: absolute;
  width: 40vh;
  height: 40vh;
  border-radius: 50%;
  background: var(--sage);
  right: var(--margin);
  top: 14%;
}
.parallax-line { position: relative; z-index: 2; font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; max-width: 20ch; font-size: clamp(1.5rem, 2.4vw, 2.25rem); }
.parallax-fast { margin-left: 22vw; }
.parallax-disc-line { margin-left: 8vw; }

/* API */
.api-title { font-size: var(--step-lead); font-weight: 600; margin: 2.4rem 0 1rem; }
.table-wrap { overflow-x: auto; background: var(--surface); }
table { border-collapse: collapse; width: 100%; }
td code { overflow-wrap: anywhere; }
th, td { text-align: left; padding: 0.9rem 1.2rem; vertical-align: top; }
thead th { font-weight: 600; }
tbody tr:nth-child(even) { background: var(--bg); }
.api-note { margin-top: 2rem; max-width: 62ch; }

/* Footer */
.site-footer { background: var(--accent); color: var(--accent-ink); padding: 90px var(--margin) 48px; }

.footer-mark {
  font-size: clamp(3rem, 12.4vw, 12rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  white-space: nowrap;
  margin-bottom: 3rem;
}
.footer-cols {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}
.site-footer a { color: var(--accent-ink); }
.footer-legal { font-size: var(--step-small); }

/* Reduced motion on the demo itself: ScrollFlow handles the library side. */
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

@media (max-width: 900px) {
  .hero-circle { width: 52vh; height: 52vh; right: -20vh; top: -38vh; }
  .hero-circle span { display: none; }
  .lead { max-width: 30ch; }
  .ledger-row { grid-template-columns: auto 1fr; }
  .ledger-row p { grid-column: 2; }
  .playground { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  :root { --margin: 16px; }
  section { padding: 72px var(--margin); }
  .hero { padding-top: 5vh; min-height: 0; }
  .parallax-fast { margin-left: 0; }
  .parallax-field { min-height: 64svh; gap: 2.5rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .footer-mark { font-size: 13.5vw; }
  .code-block .copy-btn { position: static; margin-top: 0.6rem; }
}

@media (max-width: 480px) {
  .hero-circle { width: 40vh; height: 40vh; top: -30vh; right: -16vh; background: var(--sage); }
  .hero h1 { font-size: 16.5vw; }
  .parallax-disc-line { margin-left: 0; }
}
