:root {
  /* Type scale */
  --text-xs: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
  --text-sm: clamp(0.875rem, 0.8rem + 0.35vw, 1rem);
  --text-base: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --text-lg: clamp(1.125rem, 1rem + 0.75vw, 1.5rem);
  --text-xl: clamp(1.5rem, 1.2rem + 1.25vw, 2.25rem);
  --text-2xl: clamp(2rem, 1.2rem + 2.5vw, 3.5rem);

  /* Spacing */
  --space-1: 0.25rem; --space-2: 0.5rem; --space-3: 0.75rem; --space-4: 1rem;
  --space-5: 1.25rem; --space-6: 1.5rem; --space-8: 2rem; --space-10: 2.5rem;
  --space-12: 3rem; --space-16: 4rem; --space-20: 5rem; --space-24: 6rem; --space-32: 8rem;

  --radius-sm: 0.375rem; --radius-md: 0.5rem; --radius-lg: 0.75rem; --radius-xl: 1rem;
  --radius-full: 9999px;
  --transition: 200ms cubic-bezier(0.16, 1, 0.3, 1);

  --content-default: 1080px;
  --content-narrow: 720px;

  --font-display: 'Clash Grotesk', 'General Sans', system-ui, sans-serif;
  --font-body: 'General Sans', system-ui, -apple-system, sans-serif;
}

/* LIGHT */
:root, [data-theme="light"] {
  --color-bg: #f6f7f7;
  --color-surface: #ffffff;
  --color-surface-2: #eef1f1;
  --color-border: #dde1e2;
  --color-text: #15201f;
  --color-text-muted: #5c6766;
  --color-text-faint: #99a3a2;
  --color-text-inverse: #f6f7f7;
  --brand: #106e6e;
  --brand-hover: #0c5454;
  --brand-soft: #d3e6e5;
  --shadow-sm: 0 1px 2px rgba(20,40,40,0.06);
  --shadow-md: 0 6px 20px rgba(20,40,40,0.08);
  --shadow-lg: 0 18px 48px rgba(20,40,40,0.12);
}

/* DARK */
[data-theme="dark"] {
  --color-bg: #0e1413;
  --color-surface: #161e1d;
  --color-surface-2: #1c2625;
  --color-border: #2a3534;
  --color-text: #dde4e3;
  --color-text-muted: #8b9695;
  --color-text-faint: #5f6968;
  --color-text-inverse: #0e1413;
  --brand: #4fb3b0;
  --brand-hover: #6cc6c3;
  --brand-soft: #1e3534;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 6px 20px rgba(0,0,0,0.4);
  --shadow-lg: 0 18px 48px rgba(0,0,0,0.5);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --color-bg: #0e1413; --color-surface: #161e1d; --color-surface-2: #1c2625;
    --color-border: #2a3534; --color-text: #dde4e3; --color-text-muted: #8b9695;
    --color-text-faint: #5f6968; --color-text-inverse: #0e1413;
    --brand: #4fb3b0; --brand-hover: #6cc6c3; --brand-soft: #1e3534;
  }
}

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

html {
  -webkit-text-size-adjust: none; text-size-adjust: none;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility; scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  min-height: 100dvh; line-height: 1.6;
  font-family: var(--font-body); font-size: var(--text-base);
  color: var(--color-text); background-color: var(--color-bg);
}

img, picture, svg { display: block; max-width: 100%; height: auto; }
ul[role="list"], ol[role="list"] { list-style: none; }
input, button, textarea, select { font: inherit; color: inherit; }

h1, h2, h3, h4 { text-wrap: balance; line-height: 1.12; font-family: var(--font-display); font-weight: 600; }
p, li { text-wrap: pretty; }

a { color: inherit; text-decoration: none; }

::selection { background: var(--brand-soft); color: var(--color-text); }

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

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

button { cursor: pointer; background: none; border: none; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border-width: 0;
}

.skip-link {
  position: absolute; left: var(--space-4); top: -3rem; z-index: 200;
  background: var(--brand); color: #fff; padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md); transition: top var(--transition);
}
.skip-link:focus { top: var(--space-4); }

.container { width: 100%; max-width: var(--content-default); margin-inline: auto; padding-inline: var(--space-6); }
