/* MakYak — design tokens & base */
:root {
  --paper: oklch(0.985 0.006 85);
  --paper-2: oklch(0.965 0.008 85);
  --paper-3: oklch(0.93 0.01 85);
  --rule: oklch(0.86 0.012 85);
  --rule-2: oklch(0.78 0.014 85);
  --ink: oklch(0.18 0.018 250);
  --ink-2: oklch(0.32 0.02 250);
  --ink-3: oklch(0.5 0.018 250);
  --ink-4: oklch(0.62 0.014 250);

  --accent: oklch(0.60 0.09 150);        /* sage */
  --accent-ink: oklch(0.30 0.06 150);
  --accent-soft: oklch(0.93 0.03 150);

  /* Secondary tone — warm clay, complements sage on warm paper */
  --clay: oklch(0.74 0.06 40);
  --clay-soft: oklch(0.93 0.025 40);
  --clay-ink: oklch(0.42 0.07 40);

  --ok: oklch(0.62 0.14 150);
  --warn: oklch(0.72 0.16 75);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.04);
  --shadow-2: 0 1px 2px rgb(0 0 0 / 0.04), 0 8px 24px -12px rgb(0 0 0 / 0.10);

  --max: 1240px;
  --gutter: clamp(20px, 4vw, 48px);
}

:root[data-theme="dark"] {
  --paper: oklch(0.18 0.02 255);
  --paper-2: oklch(0.22 0.02 255);
  --paper-3: oklch(0.27 0.02 255);
  --rule: oklch(0.34 0.018 255);
  --rule-2: oklch(0.42 0.018 255);
  --ink: oklch(0.94 0.01 95);
  --ink-2: oklch(0.84 0.014 95);
  --ink-3: oklch(0.70 0.014 95);
  --ink-4: oklch(0.58 0.014 95);

  --accent-soft: color-mix(in oklab, var(--accent) 22%, transparent);
  --clay-soft: oklch(0.26 0.03 35);
  --clay: oklch(0.52 0.05 35);
  --clay-ink: oklch(0.72 0.05 35);

  --shadow-1: 0 1px 1px rgb(0 0 0 / 0.28);
  --shadow-2: 0 4px 22px rgb(0 0 0 / 0.32);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  transition: background-color 220ms ease, color 220ms ease;
}
body { min-height: 100vh; }

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

::selection { background: var(--accent); color: white; }

/* Type ramp — disciplined */
.h-display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.98;
  font-size: clamp(48px, 8vw, 104px);
}
.h-display.serif {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  letter-spacing: -0.025em;
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 144;
}
.h1 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.04;
  font-size: clamp(36px, 5vw, 64px);
}
.h2 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.08;
  font-size: clamp(28px, 3.4vw, 44px);
}
.h3 {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.18;
  font-size: clamp(20px, 2vw, 26px);
}
.lede {
  font-size: clamp(17px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 60ch;
}
.body { font-size: 16px; color: var(--ink-2); }
.small { font-size: 13px; color: var(--ink-3); }

.mono { font-family: var(--font-mono); font-feature-settings: "ss01"; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.eyebrow .dot {
  display: inline-block; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
  margin-right: 8px; vertical-align: 1px;
}

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.section { padding: clamp(64px, 10vw, 128px) 0; }
.section.tight { padding: clamp(48px, 7vw, 96px) 0; }

.rule { height: 1px; background: var(--rule); border: 0; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 44px; padding: 0 18px;
  border-radius: var(--r-sm);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: transform 120ms ease-out, background 160ms ease, color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  border: 1px solid transparent;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.btn-primary:hover { background: black; }
.btn-accent {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-accent:hover { filter: brightness(0.95); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule-2);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--ink-3); }
.btn-link {
  background: transparent;
  border: 0;
  padding: 0;
  height: auto;
  color: var(--ink);
  border-bottom: 1px solid var(--ink);
  border-radius: 0;
  padding-bottom: 2px;
}
.btn .arr { display: inline-block; transition: transform 200ms ease-out; }
.btn:hover .arr { transform: translateX(3px); }
.btn-sm { height: 36px; padding: 0 14px; font-size: 13px; }

/* Cards */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.card.warm { background: var(--paper-2); }

@media (hover: hover) {
  .card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-2);
    border-color: color-mix(in oklab, var(--accent) 35%, var(--rule));
  }
  .btn:hover {
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 16%, transparent);
  }
}

/* Pill */
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  height: 26px; padding: 0 10px;
  border: 1px solid var(--rule-2);
  border-radius: 999px;
  background: var(--paper);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--ink-2);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok);
}

/* Inputs */
.input, .textarea, .select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: var(--paper);
  border: 1px solid var(--rule-2);
  border-radius: var(--r-sm);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  transition: border-color 140ms ease, box-shadow 140ms ease, background-color 140ms ease;
}
.textarea { padding: 12px 14px; height: auto; min-height: 120px; resize: vertical; line-height: 1.5; }
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px oklch(0.18 0.018 250 / 0.08);
}
.label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 8px;
}

/* Marquee */
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.marquee {
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, black 8%, black 92%, transparent);
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 50s linear infinite;
}
.marquee:hover .marquee-track { animation-play-state: paused; }

/* Subtle reveal */
@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.rise { animation: rise 600ms cubic-bezier(.2,.8,.2,1) both; }
.rise.delay-1 { animation-delay: 60ms; }
.rise.delay-2 { animation-delay: 120ms; }
.rise.delay-3 { animation-delay: 180ms; }
.rise.delay-4 { animation-delay: 240ms; }
.rise.delay-5 { animation-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  .rise, .marquee-track { animation: none !important; }
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* Grid helpers */
.grid { display: grid; gap: 24px; }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
  .cols-2, .cols-3, .cols-4 { grid-template-columns: 1fr; }
  .cols-3.keep-2-md { grid-template-columns: repeat(2, 1fr); }
}

/* Focus rings */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* Number tabular for stats */
.tnum { font-variant-numeric: tabular-nums; }

/* Smooth page transitions (View Transitions API) */
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 180ms;
  animation-timing-function: cubic-bezier(.2,.8,.2,1);
}
