/* AIEONME Foundation — design system
   Brand: Navy #0D1B2A · Gold #C4972F · Teal #1B6B7D
   Type: Inter (display/UI) + Source Serif 4 (editorial body) */

:root {
  --navy-deep: #060B14;
  --navy: #0D1B2A;
  --navy-mid: #0F1923;
  --navy-low: #080E18;
  --gold: #C4972F;
  --gold-soft: rgba(196, 151, 47, 0.16);
  --teal: #1B6B7D;
  --teal-soft: rgba(27, 107, 125, 0.22);
  --red: #E85555;
  --ink: #E8ECF1;
  --muted: #97A4B2;
  --faint: rgba(232, 236, 241, 0.55);
  --line: rgba(232, 236, 241, 0.09);
  --glass: rgba(255, 255, 255, 0.055);
  --maxw: 1140px;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, "Segoe UI", Arial, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  font-family: var(--serif);
  font-size: 1.075rem;
  line-height: 1.72;
  color: var(--ink);
  background: var(--navy);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1100px 600px at 85% -10%, rgba(196,151,47,0.07), transparent 60%),
    radial-gradient(900px 700px at -10% 30%, rgba(27,107,125,0.08), transparent 55%),
    linear-gradient(170deg, var(--navy-deep), var(--navy) 35%, var(--navy-mid) 65%, var(--navy-low));
}

h1, h2, h3, h4, .sans { font-family: var(--sans); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.08; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: 1.2rem; font-weight: 700; letter-spacing: -0.01em; }
a { color: var(--ink); text-decoration: none; }
p a, .prose a, li a { color: var(--gold); border-bottom: 1px solid rgba(196,151,47,0.35); transition: border-color .15s; }
p a:hover, .prose a:hover, li a:hover { border-color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }
img, svg { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(196,151,47,0.35); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.eyebrow {
  font-family: var(--sans); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.32em; text-transform: uppercase; color: var(--gold);
}
.lede { font-size: 1.18rem; color: var(--faint); max-width: 62ch; }
.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(8, 14, 24, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--sans); }
.brand svg { width: 30px; height: 30px; flex: none; }
.brand b { font-weight: 800; font-size: 1.06rem; letter-spacing: 0.06em; }
.brand span { font-weight: 500; font-size: 1.06rem; letter-spacing: 0.06em; color: var(--muted); }
.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a {
  font-family: var(--sans); font-size: 0.92rem; font-weight: 600;
  color: var(--faint); padding: 8px 13px; border-radius: 8px; transition: color .15s, background .15s;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); background: var(--glass); }
.nav-toggle { display: none; }

@media (max-width: 820px) {
  .nav-toggle {
    display: block; background: none; border: 1px solid var(--line); border-radius: 8px;
    color: var(--ink); font-family: var(--sans); font-size: 0.9rem; font-weight: 600; padding: 8px 14px; cursor: pointer;
  }
  .site-nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; padding: 12px 20px 18px;
    background: rgba(8, 14, 24, 0.97); border-bottom: 1px solid var(--line);
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 14px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; padding: 92px 0 76px; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: radial-gradient(rgba(232,236,241,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(700px 500px at 30% 40%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(700px 500px at 30% 40%, #000 0%, transparent 75%);
}
.hero-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 48px; align-items: center; position: relative; }
.hero h1 { margin: 18px 0 20px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lede { margin-bottom: 34px; }
.cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--sans); font-weight: 700; font-size: 0.95rem;
  padding: 13px 24px; border-radius: 10px; display: inline-flex; align-items: center; gap: 9px;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn-gold { background: var(--gold); color: #14110A; box-shadow: 0 6px 24px rgba(196,151,47,0.28); }
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(196,151,47,0.38); }
.btn-ghost { border: 1px solid rgba(232,236,241,0.22); color: var(--ink); background: var(--glass); }
.btn-ghost:hover { border-color: rgba(232,236,241,0.45); }
.btn .tri {
  width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent;
  border-left: 7px solid currentColor; display: inline-block;
}
.hero-meta { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 38px; }
.hero-meta div { font-family: var(--sans); font-size: 0.82rem; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.hero-meta i { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); display: inline-block; }

@media (max-width: 900px) {
  .hero { padding: 56px 0 56px; }
  .hero-grid { grid-template-columns: 1fr; gap: 30px; }
  .orb-stage { order: -1; transform: scale(0.78); margin: -34px auto -44px; }
}

/* ---------- Containment Orb (signature) ---------- */
.orb-stage { position: relative; width: 340px; height: 340px; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.orb-stage > div { position: absolute; border-radius: 50%; }
.orb-core {
  width: 132px; height: 132px;
  background: radial-gradient(circle at 34% 30%, #f4dca2 0%, var(--gold) 28%, #8a6a1e 62%, #3d2f0d 100%);
  box-shadow:
    0 0 26px rgba(196,151,47,0.55),
    0 0 70px rgba(196,151,47,0.30),
    0 0 130px rgba(196,151,47,0.16),
    inset -10px -12px 30px rgba(0,0,0,0.45),
    inset 8px 8px 22px rgba(255,236,180,0.30);
  animation: orbPulse 5.5s ease-in-out infinite;
}
@keyframes orbPulse {
  0%, 100% { box-shadow: 0 0 26px rgba(196,151,47,0.55), 0 0 70px rgba(196,151,47,0.30), 0 0 130px rgba(196,151,47,0.16), inset -10px -12px 30px rgba(0,0,0,0.45), inset 8px 8px 22px rgba(255,236,180,0.30); }
  50% { box-shadow: 0 0 34px rgba(196,151,47,0.7), 0 0 90px rgba(196,151,47,0.4), 0 0 150px rgba(196,151,47,0.22), inset -10px -12px 30px rgba(0,0,0,0.45), inset 8px 8px 22px rgba(255,236,180,0.30); }
}
.orb-r1 { width: 176px; height: 176px; border: 1px solid rgba(196,151,47,0.45); }
.orb-r2 { width: 236px; height: 236px; border: 1px solid transparent; border-top-color: rgba(196,151,47,0.5); border-right-color: rgba(196,151,47,0.5); transform: rotate(-25deg); animation: spinSlow 26s linear infinite; }
.orb-r3 { width: 236px; height: 236px; border: 1px solid transparent; border-bottom-color: rgba(27,107,125,0.55); transform: rotate(55deg); animation: spinSlowR 34s linear infinite; }
.orb-r4 { width: 288px; height: 288px; border: 1px solid transparent; border-top-color: rgba(232,85,85,0.45); border-left-color: rgba(232,85,85,0.30); transform: rotate(18deg); animation: spinSlow 44s linear infinite; }
.orb-r5 { width: 288px; height: 288px; border: 1px solid transparent; border-bottom-color: rgba(196,151,47,0.35); transform: rotate(-65deg); animation: spinSlowR 52s linear infinite; }
.orb-edge { width: 308px; height: 308px; border: 1px solid rgba(255,255,255,0.1); }
@keyframes spinSlow { to { transform: rotate(335deg); } }
@keyframes spinSlowR { to { transform: rotate(-305deg); } }
.orb-ch { position: absolute; background: linear-gradient(90deg, transparent, rgba(196,151,47,0.4), transparent); width: 340px; height: 1px; border-radius: 0 !important; }
.orb-cv { position: absolute; background: linear-gradient(180deg, transparent, rgba(27,107,125,0.45), transparent); width: 1px; height: 340px; border-radius: 0 !important; }
.orb-dot { width: 6px; height: 6px; }
.orb-dot.d1 { background: var(--gold); top: 28px; left: 168px; box-shadow: 0 0 8px var(--gold); }
.orb-dot.d2 { background: var(--red); top: 96px; right: 30px; box-shadow: 0 0 8px var(--red); }
.orb-dot.d3 { background: var(--teal); bottom: 64px; right: 56px; box-shadow: 0 0 8px var(--teal); }
.orb-dot.d4 { background: var(--gold); bottom: 26px; left: 132px; box-shadow: 0 0 8px var(--gold); }
.orb-dot.d5 { background: var(--teal); top: 120px; left: 26px; box-shadow: 0 0 8px var(--teal); }
.orb-dot.d6 { background: var(--red); top: 210px; left: 48px; box-shadow: 0 0 8px var(--red); }

/* ---------- Sections ---------- */
.section { padding: 72px 0; position: relative; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 38px; }
.section-head h2 { margin: 14px 0 12px; }
.section-head p { color: var(--faint); max-width: 64ch; }

/* ---------- Cards ---------- */
.card {
  position: relative; background: var(--glass);
  border: 1px solid var(--line); border-radius: 16px;
  padding: 28px; transition: transform .18s, border-color .18s, background .18s;
}
.card:hover { transform: translateY(-3px); border-color: rgba(196,151,47,0.35); background: rgba(255,255,255,0.075); }
.card .corner { position: absolute; width: 16px; height: 16px; pointer-events: none; }
.card .corner.tl { top: 10px; left: 10px; border-top: 1.5px solid rgba(196,151,47,0.55); border-left: 1.5px solid rgba(196,151,47,0.55); }
.card .corner.br { bottom: 10px; right: 10px; border-bottom: 1.5px solid rgba(196,151,47,0.55); border-right: 1.5px solid rgba(196,151,47,0.55); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.paper-card { display: flex; flex-direction: column; gap: 12px; min-height: 100%; }
.paper-card .tag { font-family: var(--sans); font-size: 0.7rem; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--teal); }
.paper-card .tag.gold { color: var(--gold); }
.paper-card h3 { font-size: 1.32rem; line-height: 1.22; }
.paper-card h3 a { color: var(--ink); }
.paper-card h3 a:hover { color: var(--gold); }
.paper-card p { color: var(--faint); font-size: 0.99rem; flex: 1; }
.paper-card .meta { font-family: var(--sans); font-size: 0.8rem; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }

.featured {
  display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center;
  background: linear-gradient(135deg, rgba(196,151,47,0.10), rgba(27,107,125,0.10));
  border: 1px solid rgba(196,151,47,0.25); border-radius: 20px; padding: 44px;
}
.featured h3 { font-size: clamp(1.5rem, 2.8vw, 2rem); margin: 12px 0 14px; }
.featured p { color: var(--faint); }
@media (max-width: 900px) { .featured { grid-template-columns: 1fr; padding: 30px 24px; } }

/* ---------- Map section ---------- */
.map-panel { background: rgba(6,11,20,0.55); border: 1px solid var(--line); border-radius: 20px; padding: 28px; }
.map-panel img, .map-panel svg { width: 100%; height: auto; }
.map-legend { display: flex; gap: 26px; flex-wrap: wrap; margin-top: 18px; font-family: var(--sans); font-size: 0.82rem; color: var(--muted); }
.map-legend i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; margin-right: 8px; vertical-align: -1px; }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 26px; }
.stat { background: var(--glass); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.stat b { font-family: var(--sans); font-size: 2rem; font-weight: 800; color: var(--gold); display: block; letter-spacing: -0.02em; }
.stat.alert b { color: var(--red); }
.stat span { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); }
@media (max-width: 900px) { .stat-row { grid-template-columns: 1fr; } }

/* ---------- Glossary ---------- */
.term-hero { background: var(--glass); border: 1px solid rgba(196,151,47,0.3); border-radius: 20px; padding: 40px; }
.term-hero .tagline { font-size: 1.35rem; color: var(--gold); font-style: italic; margin: 14px 0 18px; }
.term-soon { opacity: 0.65; }
.term-soon .badge { font-family: var(--sans); font-size: 0.68rem; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px; }

/* ---------- Paper page ---------- */
.paper-head { padding: 64px 0 44px; border-bottom: 1px solid var(--line); }
.paper-head h1 { max-width: 18ch; margin: 16px 0 14px; }
.paper-head .sub { font-size: 1.25rem; color: var(--faint); max-width: 56ch; }
.byline { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 26px; font-family: var(--sans); font-size: 0.88rem; color: var(--muted); }
.byline b { color: var(--ink); font-weight: 600; }
.paper-body { display: grid; grid-template-columns: 1fr 320px; gap: 56px; padding: 52px 0 72px; }
.prose > * + * { margin-top: 1.15em; }
.prose h2 { margin-top: 1.8em; }
.aside-box { background: var(--glass); border: 1px solid var(--line); border-radius: 16px; padding: 24px; position: sticky; top: 92px; }
.aside-box h4 { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.cite-block { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.8rem; line-height: 1.6; color: var(--faint); background: rgba(6,11,20,0.6); border: 1px solid var(--line); border-radius: 10px; padding: 14px; word-break: break-word; }
.aside-box .btn { width: 100%; justify-content: center; margin-bottom: 12px; }
@media (max-width: 980px) { .paper-body { grid-template-columns: 1fr; } .aside-box { position: static; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 56px 0 40px; margin-top: 40px; background: rgba(6,11,20,0.5); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; }
.site-footer h4 { font-size: 0.74rem; letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 16px; }
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: var(--faint); font-family: var(--sans); font-size: 0.92rem; }
.site-footer a:hover { color: var(--ink); }
.footer-brand p { color: var(--muted); font-size: 0.92rem; margin-top: 14px; max-width: 36ch; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-family: var(--sans); font-size: 0.8rem; color: var(--muted); }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Page head (generic) ---------- */
.page-head { padding: 64px 0 18px; }
.page-head h1 { margin: 14px 0 14px; }

/* ---------- Frontier band ---------- */
.frontier-band {
  background: linear-gradient(135deg, #0B1B2A, #122836);
  border: 1px solid rgba(27,107,125,0.4); border-radius: 20px; padding: 38px;
  display: grid; grid-template-columns: 1fr auto; gap: 26px; align-items: center;
}
@media (max-width: 760px) { .frontier-band { grid-template-columns: 1fr; } }

/* ---------- Tables ---------- */
table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 0.94rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
th { color: var(--gold); font-size: 0.76rem; letter-spacing: 0.18em; text-transform: uppercase; }
