/* ============================================================
   Black & Orange — Growth Summit Design System
   system.css — tokens · reset · base · layout helpers
   ============================================================ */

/* ---------- Tokens ---------- */
:root {
  /* Foundation */
  --bg:        oklch(99% 0.002 60);
  --surface:   oklch(100% 0 0);
  --surface-2: oklch(96% 0.004 60);
  --ink:       oklch(13% 0.005 60);
  --ink-soft:  oklch(28% 0.008 60);
  --muted:     oklch(50% 0.01 60);
  --border:    oklch(88% 0.006 60);
  --border-strong: oklch(13% 0.005 60);

  /* Brand */
  --orange:        oklch(70% 0.20 45);
  --orange-hover:  oklch(64% 0.21 42);
  --orange-soft:   oklch(94% 0.04 60);
  --pink:          oklch(70% 0.22 0);
  --pink-hover:    oklch(64% 0.24 0);

  /* Status */
  --success: oklch(60% 0.16 145);
  --warn:    oklch(75% 0.16 75);
  --danger:  oklch(58% 0.22 25);

  /* Inverse */
  --ink-bg:       oklch(13% 0.005 60);
  --ink-surface:  oklch(20% 0.008 60);
  --ink-fg:       oklch(98% 0.002 60);
  --ink-muted:    oklch(72% 0.008 60);
  --ink-border:   oklch(28% 0.01 60);

  --accent: var(--orange);

  /* Type */
  --font-display: 'Söhne', 'Inter Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body:    -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', ui-monospace, Menlo, monospace;

  --t-display-xl: clamp(48px, 7vw, 96px);
  --t-display-l:  clamp(36px, 5vw, 64px);
  --t-h1:         clamp(28px, 3.2vw, 44px);
  --t-h2:         clamp(22px, 2.4vw, 32px);
  --t-h3:         clamp(18px, 1.6vw, 22px);
  --t-body:       16px;
  --t-body-l:     18px;
  --t-caption:    13px;
  --t-eyebrow:    12px;

  /* Spacing */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 96px; --s-10: 128px;

  /* Widths */
  --w-prose:   68ch;
  --w-content: 1200px;
  --w-wide:    1440px;

  /* Radii */
  --r-0: 0px;
  --r-1: 4px;
  --r-2: 8px;
  --r-3: 12px;
  --r-full: 9999px;

  /* Elevation */
  --shadow-1: 0 1px 2px oklch(13% 0.005 60 / 0.06), 0 4px 12px oklch(13% 0.005 60 / 0.04);
  --shadow-2: 0 8px 32px oklch(13% 0.005 60 / 0.08);

  /* Motion */
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-std:  cubic-bezier(0.4, 0, 0.2, 1);
  --dur-1: 120ms;
  --dur-2: 200ms;
  --dur-3: 320ms;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; tab-size: 4; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--t-body);
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img, svg, video, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; padding: 0; margin: 0; }
h1, h2, h3, h4, h5, h6, p { margin: 0; }
hr { border: 0; border-top: 1px solid var(--border); margin: 0; }
::selection { background: var(--ink); color: var(--ink-fg); }

/* ---------- Type styles ---------- */
.display-xl { font-family: var(--font-display); font-size: var(--t-display-xl); font-weight: 700; line-height: 0.96; letter-spacing: -0.03em; text-wrap: balance; }
.display-l  { font-family: var(--font-display); font-size: var(--t-display-l);  font-weight: 700; line-height: 0.98; letter-spacing: -0.025em; text-wrap: balance; }
.h1         { font-family: var(--font-display); font-size: var(--t-h1); font-weight: 600; line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; }
.h2         { font-family: var(--font-display); font-size: var(--t-h2); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; text-wrap: balance; }
.h3         { font-family: var(--font-display); font-size: var(--t-h3); font-weight: 600; line-height: 1.25; letter-spacing: -0.01em; }
.body-l     { font-size: var(--t-body-l); line-height: 1.55; text-wrap: pretty; }
.body       { font-size: var(--t-body);   line-height: 1.6;  text-wrap: pretty; }
.caption    { font-size: var(--t-caption); color: var(--muted); }
.eyebrow    {
  font-family: var(--font-mono);
  font-size: var(--t-eyebrow);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: currentColor;
  display: inline-block;
}
.lede { font-size: var(--t-body-l); color: var(--ink-soft); max-width: 60ch; text-wrap: pretty; }
.mono { font-family: var(--font-mono); }
.tab-num { font-variant-numeric: tabular-nums; }
.ink-orange { color: var(--orange); }
.ink-pink   { color: var(--pink); }
.muted      { color: var(--muted); }

/* ---------- Layout ---------- */
.container       { width: 100%; max-width: var(--w-content); margin: 0 auto; padding-inline: clamp(20px, 4vw, 48px); }
.container-wide  { width: 100%; max-width: var(--w-wide); margin: 0 auto; padding-inline: clamp(20px, 4vw, 48px); }
.section         { padding-block: clamp(64px, 10vw, 128px); }
.section-sm      { padding-block: clamp(40px, 6vw, 72px); }
.section-divider { border-top: 1px solid var(--border); }
.stack > * + *   { margin-top: var(--stack-gap, 16px); }
.row             { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid            { display: grid; gap: var(--grid-gap, 24px); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* ---------- Surface modifiers ---------- */
.surface-ink {
  background: var(--ink-bg);
  color: var(--ink-fg);
}
.surface-ink ::selection { background: var(--orange); color: var(--ink); }
.surface-ink .muted, .surface-ink .lede { color: var(--ink-muted); }
.surface-ink .eyebrow { color: var(--ink-muted); }
.surface-ink hr { border-color: var(--ink-border); }
.surface-soft { background: var(--surface-2); }

/* ---------- Doc-site shell (used in DS docs pages) ---------- */
.docs-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  min-height: 100vh;
}
.docs-side {
  border-right: 1px solid var(--border);
  background: var(--surface);
  padding: 32px 24px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow: auto;
}
.docs-brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  margin-bottom: 32px;
}
.docs-brand .dot {
  width: 14px; height: 14px;
  background: var(--orange);
  border-radius: 50%;
  flex: none;
}
.docs-nav-group { margin-bottom: 24px; }
.docs-nav-title {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--muted);
  margin-bottom: 8px;
  padding: 0 8px;
}
.docs-nav a {
  display: block;
  padding: 6px 8px;
  margin: 1px 0;
  border-radius: 4px;
  font-size: 14px;
  color: var(--ink-soft);
  transition: background var(--dur-1) var(--ease-std), color var(--dur-1) var(--ease-std);
}
.docs-nav a:hover { background: var(--surface-2); color: var(--ink); }
.docs-nav a[aria-current="page"] {
  background: var(--ink);
  color: var(--ink-fg);
  font-weight: 500;
}
.docs-main {
  padding: clamp(32px, 6vw, 72px) clamp(24px, 5vw, 64px);
  max-width: 1100px;
}
.docs-header { margin-bottom: 56px; }
.docs-section + .docs-section { margin-top: 80px; padding-top: 64px; border-top: 1px solid var(--border); }
.docs-section h2 { margin-bottom: 8px; }
.docs-section .lede { margin-bottom: 32px; }
.docs-section-header { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; flex-wrap: wrap; }

@media (max-width: 880px) {
  .docs-shell { grid-template-columns: 1fr; }
  .docs-side {
    position: static; height: auto;
    border-right: 0; border-bottom: 1px solid var(--border);
    padding: 20px 24px;
  }
  .docs-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 4px; }
  .docs-nav-group { margin-bottom: 0; }
  .docs-main { padding: 32px 24px; }
}
