:root {
  /* Brand colors */
  --color-brand-primary: #2563eb;
  --color-brand-secondary: #0f766e;
  --color-brand-accent: #f97316;

  /* Surfaces */
  --color-surface-base: #f6f3ee;
  --color-surface-raised: #fffdf8;
  --color-surface-sunken: #efe7dc;
  --color-surface-overlay: rgba(255, 253, 248, 0.94);

  /* Text */
  --color-text-primary: #1f2933;
  --color-text-secondary: #4b5a67;
  --color-text-muted: #73808c;
  --color-text-inverse: #fffdf8;

  /* Borders */
  --color-border-subtle: #e7ddd1;
  --color-border-default: #d6c6b5;
  --color-border-strong: #b59f88;

  /* Feedback */
  --color-status-success: #15803d;
  --color-status-warning: #b45309;
  --color-status-error: #b91c1c;
  --color-status-info: #1d4ed8;

  /* Typography */
  --font-display: "Fraunces", serif;
  --font-body: "Manrope", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --font-size-xs: 11px;
  --font-size-sm: 13px;
  --font-size-base: 15px;
  --font-size-md: 17px;
  --font-size-lg: 20px;
  --font-size-xl: 24px;
  --font-size-2xl: 30px;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 600;

  --line-height-tight: 1.3;
  --line-height-normal: 1.6;
  --line-height-loose: 1.9;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Shape */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 9999px;

  /* Elevation */
  --shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.08);
  --shadow-md: 0 4px 12px rgba(31, 41, 51, 0.12);
  --shadow-lg: 0 8px 24px rgba(31, 41, 51, 0.16);

  /* Motion */
  --duration-fast: 120ms;
  --duration-normal: 220ms;
  --duration-slow: 360ms;
  --ease-default: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  color-scheme: light;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--color-surface-base);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button,
input,
select,
textarea {
  font: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-text-primary);
}

code,
pre,
kbd,
samp {
  font-family: var(--font-mono);
}

a {
  color: var(--color-brand-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

a:hover {
  color: var(--color-brand-secondary);
}

:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--color-brand-accent) 60%, white);
  outline-offset: 2px;
}

::selection {
  background: color-mix(in srgb, var(--color-brand-accent) 22%, white);
  color: var(--color-text-primary);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
