/* Ranchu design tokens. Every color, size and timing on the site comes from here; see web/DESIGN.md. */

:root {
  color-scheme: light dark;

  /* Brand. Green from the app icon; goldfish orange for small highlights only (the name's goldfish). */
  --green-900: #12321f;
  --green-700: #1f7a4a;
  --green-500: #2fae66;
  --green-300: #3ccf7c;
  --green-100: #dff6e8;
  --goldfish-500: #ff7a3d;
  --goldfish-100: #ffeadf;

  /* Neutrals, slightly green-tinted so they sit with the brand. */
  --gray-0: #ffffff;
  --gray-50: #fbfcfb;
  --gray-100: #f3f5f4;
  --gray-150: #eef1ef;
  --gray-200: #e3e8e4;
  --gray-400: #c9cfcb;
  --gray-600: #5d6b62;
  --gray-800: #233029;
  --gray-850: #1b211e;
  --gray-900: #151c18;
  --gray-950: #0e1310;

  /* macOS window chrome. */
  --mac-red: #ff5f57;
  --mac-yellow: #febc2e;
  --mac-green: #28c840;

  /* Semantic colors (light). Components use only these. */
  --bg: var(--gray-50);
  --surface: var(--gray-0);
  --surface-sunken: var(--gray-100);
  --surface-stage: var(--gray-150);
  --border: var(--gray-200);
  --text: #16201a;
  --text-muted: var(--gray-600);
  --accent: var(--green-700);
  --accent-strong: var(--green-500);
  --accent-soft: color-mix(in srgb, var(--green-700) 16%, transparent);
  --on-accent: #ffffff;
  --highlight: var(--goldfish-500);

  /* Type. The system font is SF Pro on Apple devices, like the app. */
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
  --text-xs: 12px;
  --text-sm: 14px;
  --text-md: 17px;
  --text-lg: 20px;
  --text-xl: clamp(24px, 3vw, 28px);
  --text-2xl: clamp(28px, 4vw, 40px);
  --text-display: clamp(48px, 8vw, 80px);
  --leading-tight: 1.05;
  --leading-snug: 1.2;
  --leading-body: 1.55;
  --tracking-display: -0.035em;
  --tracking-heading: -0.02em;

  /* Spacing, on a 4 px grid. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --space-16: 64px;
  --space-24: 96px;
  --space-32: 128px;

  /* Layout. */
  --width-page: 1120px;
  --width-text: 640px;

  /* Shape: continuous-looking corners like macOS. */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-pill: 999px;

  /* Elevation. */
  --shadow-sm: 0 1px 2px rgb(20 40 28 / 0.06), 0 0 0 1px var(--border);
  --shadow-window: 0 30px 80px -20px rgb(20 40 28 / 0.35), 0 0 0 1px rgb(0 0 0 / 0.06);
  --shadow-icon: 0 12px 24px rgb(31 122 74 / 0.35);

  /* Materials: the nav uses a translucent "glass" bar. */
  --glass-bg: color-mix(in srgb, var(--bg) 80%, transparent);
  --glass-blur: saturate(180%) blur(16px);

  /* Motion. Short and calm; disabled for reduced motion in base.css. */
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 120ms;
  --duration-base: 200ms;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--gray-950);
    --surface: var(--gray-900);
    --surface-sunken: #222a25;
    --surface-stage: #141a16;
    --border: var(--gray-800);
    --text: #e8efe9;
    --text-muted: #9aa89f;
    --accent: var(--green-300);
    --accent-strong: var(--green-500);
    --accent-soft: color-mix(in srgb, var(--green-300) 18%, transparent);
    --shadow-sm: 0 0 0 1px var(--border);
    --shadow-window: 0 30px 80px -20px rgb(0 0 0 / 0.7), 0 0 0 1px rgb(255 255 255 / 0.08);
  }
}
