/* ==========================================================================
   ZERATHEON FOUNDATION — BASE / RESET / TYPOGRAPHY
   Blackbox dark skin — near-black canvas, warm off-white text, orange voice.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

html[lang="mm"] body,
html[lang="mm"] button,
html[lang="mm"] input,
html[lang="mm"] textarea {
  font-family: "Noto Sans Myanmar", "Segoe UI", system-ui, sans-serif;
}

body {
  background: var(--bg-deep);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ── Selection — the orange voice ─────────────────────────────────────── */
::selection { background: var(--accent); color: #0C0C0C; }

/* ── Scrollbar — quiet, hairline discipline ───────────────────────────── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--r-pill);
  border: 2px solid var(--bg-deep);
}
::-webkit-scrollbar-thumb:hover { background: var(--accent-deep); }

/* ── Focus — always visible, orange ───────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ── Typography ───────────────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-ui);
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.15;
  text-wrap: balance;
}

p { text-wrap: pretty; }

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}
a:hover { color: var(--accent-deep); }

img, canvas, svg { display: block; max-width: 100%; }

button {
  font-family: inherit;
  cursor: pointer;
}

/* ── Layout primitives ────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: 96px; }
.section--tight { padding-block: 64px; }
.section--rail {
  background: var(--bg-rail);
  border-block: 1px solid var(--border);
}

/* ── Section headers ──────────────────────────────────────────────────── */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.kicker::before {
  content: "";
  width: 22px;
  height: 1px;
  background: var(--accent);
}

.h2 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 16px;
}
.lead {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 60ch;
  margin-bottom: 40px;
}

/* ── Utility ──────────────────────────────────────────────────────────── */
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.gold { color: var(--gold); }
.muted { color: var(--text-muted); }
.faint { color: var(--text-faint); }
.center { text-align: center; }
.mx-auto { margin-inline: auto; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-40 { margin-top: 40px; }
.nowrap { white-space: nowrap; }

/* ── Motion safety ────────────────────────────────────────────────────── */
@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;
  }
}
/* ── Myanmar script — breathing room (stacked glyphs need air) ─────────── */
html[lang="mm"] h1,
html[lang="mm"] h2,
html[lang="mm"] h3,
html[lang="mm"] h4 {
  font-family: "Noto Sans Myanmar", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  letter-spacing: 0;          /* NEVER letter-space Burmese — breaks conjuncts */
  word-spacing: 0.06em;       /* a touch of air between words                */
}

html[lang="mm"] .h2 {
  font-size: clamp(24px, 3.4vw, 34px);
}

html[lang="mm"] .kicker {
  letter-spacing: 0.02em;     /* the wide mono tracking looks bad in MM       */
  word-spacing: 0.04em;
}

/* ── Hero title (interior pages use .h2/.h1 variants) ──────────────────── */
.hero-title {
  font-size: clamp(34px, 5.2vw, 56px);
  line-height: 1.12;
  margin-bottom: 18px;
}

html[lang="mm"] .hero-title {
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.55;
  margin-bottom: 20px;
}
