/* Hallmark · genre: modern-minimal · theme: Teal Instrument (custom)
 * paper: light cool near-white · display: grotesk-sans · accent: cool teal 184
 * pre-emit critique: P5 H4 E5 S4 R5 V4
 * Source of truth: /design.md
 */

@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  /* Colour — light (OKLCH) */
  --paper:        oklch(98.5% 0.004 196);
  --paper-2:      oklch(97%   0.006 196);
  --paper-3:      oklch(94.5% 0.008 196);
  --ink:          oklch(22%   0.03  220);
  --ink-2:        oklch(45%   0.02  220);
  --ink-3:        oklch(68%   0.015 220);
  --line:         oklch(90%   0.01  200);
  --line-2:       oklch(84%   0.012 200);
  --accent:       oklch(58%   0.11  184);
  --accent-ink:   oklch(50%   0.12  184);
  --accent-hover: oklch(52%   0.115 184);
  --accent-wash:  oklch(58%   0.11  184 / 0.08);
  --on-accent:    oklch(99%   0.004 196);
  --success:      oklch(60%   0.14  150);
  --warning:      oklch(70%   0.14  70);
  --danger:       oklch(58%   0.17  27);
  --danger-wash:  oklch(58%   0.17  27 / 0.08);

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, 'SF Mono', monospace;
  --fw-body: 400;

  --text-label: 0.6875rem;
  --text-sm:    0.8125rem;
  --text-body:  1rem;
  --text-md:    1rem;
  --text-lg:    1.25rem;
  --text-xl:    1.5625rem;
  --text-2xl:   1.953rem;
  --text-3xl:   clamp(2.4rem, 4vw + 1rem, 3.5rem);

  /* Spacing — 4pt */
  --space-3xs: 0.125rem;
  --space-2xs: 0.25rem;
  --space-xs:  0.5rem;
  --space-sm:  0.75rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;
  --space-4xl: 9rem;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;

  /* Depth */
  --shadow-card: 0 1px 2px oklch(22% 0.03 220 / 0.06);

  /* Motion */
  --ease-out:    cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:     cubic-bezier(0.7, 0, 0.84, 0);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-micro: 120ms;
  --dur-short: 220ms;
  --dur-long:  420ms;

  /* Z-index */
  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 200;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper:        oklch(17%   0.02  235);
    --paper-2:      oklch(21%   0.025 232);
    --paper-3:      oklch(25%   0.028 230);
    --ink:          oklch(95%   0.01  210);
    --ink-2:        oklch(74%   0.015 215);
    --ink-3:        oklch(55%   0.02  220);
    --line:         oklch(30%   0.02  228);
    --line-2:       oklch(36%   0.022 226);
    --accent:       oklch(72%   0.12  184);
    --accent-ink:   oklch(78%   0.12  184);
    --accent-hover: oklch(80%   0.11  184);
    --accent-wash:  oklch(72%   0.12  184 / 0.1);
    --on-accent:    oklch(18%   0.03  220);
    --success:      oklch(72%   0.14  150);
    --warning:      oklch(78%   0.14  70);
    --danger:       oklch(68%   0.17  27);
    --danger-wash:  oklch(68%   0.17  27 / 0.12);
    --fw-body: 350;
    --shadow-card: none;
  }
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  font-family: var(--font-body);
  font-weight: var(--fw-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv05" 1, "ss01" 1;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; }

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 150ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 150ms !important;
  }
}
