/* ==========================================================================
   Base / Reset / Typography
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-ink);
  background: var(--color-ivory);
  background-image:
    radial-gradient(ellipse 900px 500px at 8% -10%, rgba(201, 162, 83, 0.10), transparent 60%),
    radial-gradient(ellipse 700px 500px at 100% 0%, rgba(94, 119, 101, 0.07), transparent 55%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  color: var(--color-ink);
  letter-spacing: -0.01em;
}
h1 { font-size: var(--text-4xl); font-weight: 500; }
h2 { font-size: var(--text-2xl); }
h3 { font-size: var(--text-xl); }
h4 { font-size: var(--text-lg); font-family: var(--font-body); font-weight: 600; }

p { margin: 0 0 var(--space-4); max-width: 65ch; color: var(--color-ink-soft); }

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

.hanzi { font-family: var(--font-hanzi); }

ul, ol { padding-left: 1.2em; }

button, input, select { font-family: inherit; font-size: inherit; }

img, svg { display: block; max-width: 100%; }

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

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

/* --- Layout primitives --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

.page-main { padding-block: var(--space-7); min-height: 60vh; }

.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

.text-muted { color: var(--color-ink-soft); }
.text-sm { font-size: var(--text-sm); }
.text-center { text-align: center; }

.eyebrow {
  font-size: var(--text-sm);
  color: var(--color-cinnabar);
  font-weight: 600;
  margin: 0 0 var(--space-2);
}

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

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