/* ---------- design tokens ---------- */
:root {
  --bg:          #f7f8fa;
  --bg-elev:     #ffffff;
  --border:      #e2e5ea;
  --text:        #1a1d23;
  --text-muted:  #5c6370;
  --accent:      #2f6feb;
  --accent-text: #ffffff;
  --code-bg:     #eceff4;
  --shadow:      0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);

  --radius: 12px;
  --maxw:   68rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:          #0d1117;
    --bg-elev:     #161b22;
    --border:      #262c36;
    --text:        #e6edf3;
    --text-muted:  #9198a1;
    --accent:      #4f8bf0;
    --accent-text: #0d1117;
    --code-bg:     #1f242c;
    --shadow:      0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px rgba(0, 0, 0, .3);
  }
}

/* ---------- base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Malgun Gothic",
               "Apple SD Gothic Neo", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

a { color: var(--accent); }

code {
  background: var(--code-bg);
  border-radius: 5px;
  padding: .15em .4em;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas,
               "Liberation Mono", Menlo, monospace;
  font-size: .875em;
}

img { max-width: 100%; height: auto; }

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4.5rem) clamp(1.25rem, 5vw, 2rem) 3rem;
}

/* ---------- hero ---------- */
.hero { text-align: center; }

.eyebrow {
  margin: 0 0 .75rem;
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 6vw, 3.25rem);
  line-height: 1.15;
  letter-spacing: -.02em;
}

.lead {
  max-width: 42rem;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: clamp(1rem, 2.2vw, 1.125rem);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin: 2rem 0 0;
}

.btn {
  display: inline-block;
  padding: .625rem 1.25rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elev);
  color: var(--text);
  font-size: .9375rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, border-color .15s ease;
}

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

.btn-primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-text);
}

/* ---------- cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: clamp(3rem, 8vw, 4.5rem) 0 0;
}

.card {
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  box-shadow: var(--shadow);
}

.card-icon { font-size: 1.75rem; line-height: 1; }

.card h2 {
  margin: .75rem 0 .5rem;
  font-size: 1.125rem;
  letter-spacing: -.01em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: .9375rem;
}

/* ---------- how it works ---------- */
.how { margin-top: clamp(3rem, 8vw, 4.5rem); }

.how > h2 {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
  letter-spacing: -.01em;
}

.steps {
  margin: 0;
  padding-left: 1.35rem;
  display: grid;
  gap: 1rem;
}

.steps li strong { display: block; }

.steps li span {
  color: var(--text-muted);
  font-size: .9375rem;
}

.callout {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--bg-elev);
}

.callout p {
  margin: .35rem 0 .85rem;
  color: var(--text-muted);
  font-size: .9375rem;
}

/* wide content must scroll inside its own box, never the page */
.code-scroll { overflow-x: auto; }

.code-scroll pre {
  margin: 0;
  padding: .85rem 1rem;
  border-radius: 8px;
  background: var(--code-bg);
}

.code-scroll code {
  background: none;
  padding: 0;
  white-space: pre;
}

/* ---------- footer ---------- */
.footer {
  margin-top: clamp(3rem, 8vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .875rem;
  text-align: center;
}

.footer p { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
