/* Mira — public information site. No external fonts, no scripts. */

:root {
  --bg: #f6f4ee;
  --surface: #fffdf8;
  --text: #1c2032;
  --muted: #4a5068;
  --line: #dcd8cc;
  --accent: #36427f;
  --accent-soft: #e8e9f3;
  --moon: #cbbd94;
  --hero-moon-opacity: 0.5;
  --focus: #b4530a;
  --measure: 40rem;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1324;
    --surface: #161b31;
    --text: #ebe7dc;
    --muted: #b3b7c8;
    --line: #2b3150;
    --accent: #b9c2f5;
    --accent-soft: #1f2645;
    --moon: #ece6d4;
    --hero-moon-opacity: 0.22;
    --focus: #ffb26b;
  }
}

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

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main { flex: 1; }

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

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

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.wrap {
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
.brand svg { width: 1.6rem; height: 1.6rem; flex: none; }

.moon-mark { fill: var(--moon); }

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  display: inline-block;
  padding: 0.35rem 0.1rem;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}
.site-nav a:hover { color: var(--text); text-decoration: underline; }
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/* Home */
.hero { padding: 5rem 0 3.5rem; position: relative; overflow: hidden; }
.hero .wrap { position: relative; }
.hero-moon {
  position: absolute;
  right: 1rem;
  top: -1.5rem;
  width: 13rem;
  height: 13rem;
  opacity: var(--hero-moon-opacity);
  pointer-events: none;
}
.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--serif); font-weight: 500; line-height: 1.2; }
.hero h1 {
  margin: 0 0 1.25rem;
  font-size: clamp(2.4rem, 6vw, 3.6rem);
  letter-spacing: -0.01em;
  max-width: 14ch;
}
.lede { max-width: 36rem; margin: 0; font-size: 1.2rem; color: var(--muted); }

.features { padding: 1rem 0 3.5rem; }
.features ul {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.5rem 1.5rem 1.35rem;
}
.card h2 { margin: 0 0 0.5rem; font-size: 1.3rem; }
.card p { margin: 0; color: var(--muted); }
.card .phase {
  display: block;
  width: 1.4rem;
  height: 1.4rem;
  margin-bottom: 0.9rem;
}

.notes { padding: 0 0 4rem; }
.notes .wrap > div {
  max-width: var(--measure);
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.notes h2 { font-size: 1.4rem; margin: 0 0 0.75rem; }
.notes p { margin: 0 0 1rem; }

/* Policy pages */
.doc { padding: 3.5rem 0 4rem; }
.doc article { max-width: var(--measure); }
.doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin: 0 0 0.5rem; }
.doc .meta { margin: 0 0 2rem; color: var(--muted); font-size: 0.95rem; }
.doc h2 { font-size: 1.35rem; margin: 2.5rem 0 0.6rem; }
.doc h3 { font-size: 1.1rem; margin: 1.5rem 0 0.4rem; }
.doc p, .doc ul { margin: 0 0 1rem; }
.doc ul { padding-left: 1.25rem; }
.doc li { margin-bottom: 0.4rem; }
.doc code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
  background: var(--accent-soft);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: anywhere;
}
.callout {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0;
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
}
.callout p:last-child { margin-bottom: 0; }

.toc {
  margin: 0 0 2rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}
.toc h2 { margin: 0 0 0.5rem; font-size: 1rem; font-family: var(--sans); font-weight: 600; }
.toc ol { margin: 0; padding-left: 1.25rem; columns: 2 14rem; column-gap: 2rem; }
.toc li { margin-bottom: 0.25rem; break-inside: avoid; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 2rem;
}
.site-footer p { margin: 0; }
.site-footer ul { display: flex; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }

@media (max-width: 40rem) {
  body { font-size: 1rem; }
  .wrap { padding: 0 1.15rem; }
  .hero { padding: 3rem 0 2.5rem; }
  .hero-moon { width: 8rem; height: 8rem; right: -1.5rem; top: -2.25rem; opacity: calc(var(--hero-moon-opacity) * 0.7); }
  .doc { padding: 2.25rem 0 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
}

@media print {
  .site-header nav, .skip-link, .hero-moon { display: none; }
  body { background: #fff; color: #000; }
  a { color: #000; }
}
