/* =========================================================================
   Classical Arts — Base: reset, typography, layout primitives
   ========================================================================= */

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--leading-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1;
  overflow-x: hidden;
}

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

/* ---- Typography ---- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  text-wrap: balance;
  color: var(--fg);
}
h1 { font-size: var(--step-5); font-weight: 600; }
h2 { font-size: var(--step-4); }
h3 { font-size: var(--step-2); line-height: var(--leading-snug); }
h4 { font-size: var(--step-1); line-height: var(--leading-snug); }

p { text-wrap: pretty; }
p, li { max-width: var(--measure); }

a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-color: var(--accent); }

strong, b { font-weight: 600; }

/* Editorial helpers */
.eyebrow {
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
}
.eyebrow::before {
  content: "";
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}
.eyebrow--center::before { display: none; }

.lead {
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--fg-muted);
  max-width: 54ch;
}

.display-num {
  font-family: var(--font-display);
  font-weight: 500;
  font-variant-numeric: lining-nums;
  color: var(--accent);
}

/* ---- Layout primitives ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--space-5xl); }
.section--tight { padding-block: var(--space-4xl); }

.stack > * + * { margin-top: var(--flow, var(--space-md)); }
.stack-lg > * + * { margin-top: var(--space-lg); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--space-md); align-items: center; }

.grid-auto {
  display: grid;
  gap: var(--space-xl);
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
}

.rule { border: 0; height: 1px; background: var(--border); }

/* Skip link */
.skip-link {
  position: absolute; left: var(--space-md); top: var(--space-md);
  z-index: 1000; transform: translateY(-150%);
  background: var(--ink); color: var(--paper);
  padding: var(--space-sm) var(--space-md); border-radius: var(--radius-md);
  transition: transform var(--dur) var(--ease-out);
}
.skip-link:focus { transform: translateY(0); }

/* Focus visibility */
:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

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

/* Dark band utility */
.on-lacquer {
  background: var(--lacquer);
  color: var(--on-lacquer);
  --fg: var(--on-lacquer);
  --fg-muted: var(--on-lacquer-2);
  --accent: var(--brass);
  --border: var(--line-on-dark);
  --surface: var(--lacquer-2);
}
.on-lacquer h1, .on-lacquer h2, .on-lacquer h3, .on-lacquer h4 { color: var(--on-lacquer); }
