:root {
  /* ── Color: surfaces (CDMAG cool editorial) ──────────────── */
  --color-bg: #ffffff;
  --color-bg-soft: #ffffff;
  --color-surface: #ffffff;
  --color-surface-muted: #e8f0fe;
  --color-surface-strong: #dbeafe;
  --color-accent-soft: #e0e7ff;

  /* ── Color: text (near-black + slate) ────────────────────── */
  --color-text: #1a1a1a;
  --color-text-muted: #4b5563;
  --color-text-soft: #64748b;

  /* ── Color: borders ──────────────────────────────────────── */
  --color-border: #e2e8f0;
  --color-border-strong: #1a1a1a;

  /* ── Color: accent (primary actions) ───────────────────── */
  --color-accent: #1a1a1a;
  --color-accent-hover: #333333;

  /* ── Color: inverted (OS section) ──────────────────────── */
  --color-inverted-bg: #1a1a1a;
  --color-inverted-surface: #2a2a2a;
  --color-inverted-text: #f8fafc;
  --color-inverted-muted: #94a3b8;
  --color-inverted-border: #404040;

  /* ── Color: links ────────────────────────────────────────── */
  --color-link: #1a1a1a;
  --color-link-hover: #404040;

  /* ── Color: overlays (image captions) ────────────────────── */
  --color-overlay: rgba(26, 26, 26, 0.62);

  /* ── Layout ────────────────────────────────────────────── */
  --container-max: 80rem;
  --container-narrow: 720px;
  --space-section: 5rem;
  --space-section-sm: 2.5rem;
  --space-after-hero: clamp(2.5rem, 4vw, 3.75rem);
  --space-page-x: 1.5rem;

  /* ── Radius (minimal — editorial) ──────────────────────── */
  --radius-sm: 2px;
  --radius-md: 4px;

  /* ── Typography ────────────────────────────────────────── */
  --font-main: "Ubuntu", system-ui, sans-serif;
  --font-mono: "Ubuntu Mono", ui-monospace, monospace;

  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.0625rem;
  --text-xl: 1.25rem;
  --text-2xl: clamp(1.35rem, 2.5vw, 1.75rem);
  --text-hero: clamp(2.25rem, 5vw, 3.5rem);

  --line-height-tight: 1.15;
  --line-height-snug: 1.3;
  --line-height-body: 1.7;

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;

  --letter-spacing-tight: -0.03em;
  --letter-spacing-snug: -0.02em;

  /* ── Motion ──────────────────────────────────────────────── */
  --transition-fast: 150ms ease;
  --transition-base: 200ms ease;

  /* ── Components (cards, placeholders) ──────────────────── */
  --card-border-width: 1px;
  --card-padding: 1.25rem;
  --card-media-filter: grayscale(25%);
  --card-media-filter-hover: grayscale(0%);
  --placeholder-line: rgba(26, 26, 26, 0.06);

  /* ── Page layout (home) ────────────────────────────────── */
  --mosaic-row-height: 240px;
  --mosaic-gap: 3px;
  --media-card-title-size: clamp(1.5rem, 3vw, 2.25rem);
  --media-grid-gap: 1.5rem;
}

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

html {
  font-size: 16px;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: clip;
  font-family: var(--font-main);
  font-size: var(--text-base);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin: 0;
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--letter-spacing-snug);
  color: var(--color-text);
}

h1 {
  font-size: var(--text-hero);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-tight);
}

h2 {
  font-size: var(--text-2xl);
  line-height: var(--line-height-tight);
}

h3 {
  font-size: var(--text-xl);
  line-height: var(--line-height-snug);
}

h4,
h5,
h6 {
  font-size: var(--text-lg);
  line-height: var(--line-height-snug);
}

p,
figure,
blockquote {
  margin: 0;
}

p + p {
  margin-top: 1em;
}

a {
  color: var(--color-link);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-link-hover);
  text-decoration: none;
}

a:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 3px;
  text-decoration: none;
}

ul,
ol {
  margin: 0;
  padding-left: 1.5em;
}

img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

address {
  font-style: normal;
}

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

:focus {
  outline: none;
}

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

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--color-border-strong);
  outline-offset: 2px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
