:root {
  --ocean: #0d1a2b;
  --ocean-2: #13253b;
  --ink: #f4efe3;
  --ink-soft: #b9c2cf;
  --land: #e9dfc6;
  --accent: #e07a5f;
  --accent-ink: #1a0f0b;
  --line: rgba(244, 239, 227, 0.14);
  --radius: 10px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ocean);
  color: var(--ink);
  font: 16px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; }

.demo-ribbon {
  background: #f2c14e; color: #2a1f00; text-align: center;
  font-size: 13px; padding: 6px 12px;
}

.topbar {
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 20px 24px;
}
.brand {
  font-family: var(--serif); font-size: 22px; font-weight: 600;
  letter-spacing: 0.02em; text-decoration: none;
}
.topbar-cta {
  font-size: 14px; text-decoration: none; color: var(--ink-soft);
  border-bottom: 1px solid var(--line); padding-bottom: 2px;
}
.topbar-cta:hover { color: var(--ink); }

/* Hero */
.hero {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px 80px;
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 56px; align-items: start;
}
.eyebrow {
  margin: 0 0 16px; font-size: 13px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
h1 { font-size: clamp(36px, 4.6vw, 56px); letter-spacing: -0.01em; }
.lede { font-size: 18px; color: var(--ink-soft); margin: 20px 0 32px; max-width: 34em; }
.lede strong { color: var(--ink); font-weight: 600; }

/* Form */
.join, .joined {
  background: var(--ocean-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px;
}
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field em { font-style: normal; font-weight: 400; color: var(--ink-soft); }
.field input {
  width: 100%; font: inherit; color: var(--ink);
  background: var(--ocean); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 14px;
}
.field input:focus, .share-row input:focus {
  outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent;
}
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-soft); margin: 4px 0 20px; }
.consent input { margin-top: 3px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }
.btn {
  display: inline-block; font: 600 16px var(--sans); color: var(--accent-ink);
  background: var(--accent); border: 0; border-radius: 8px;
  padding: 14px 22px; cursor: pointer; text-decoration: none;
  transition: transform 0.1s ease, filter 0.15s ease;
}
.join .btn { width: 100%; }
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-small { padding: 10px 16px; font-size: 14px; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); margin-top: 10px; }
.form-error { color: #ff9b85; font-size: 14px; margin: 12px 0 0; }
.fine { font-size: 13px; color: var(--ink-soft); margin: 14px 0 0; }

.joined h2 { font-size: 28px; margin-bottom: 8px; }
.joined p { color: var(--ink-soft); margin: 8px 0; }
.joined #joinedNation { color: var(--ink); }
.share-row { display: flex; gap: 8px; margin-top: 12px; }
.share-row input {
  flex: 1; min-width: 0; font: 14px var(--sans); color: var(--ink);
  background: var(--ocean); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px;
}
.survey { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 20px; }
.survey h3 { font-size: 18px; margin-bottom: 4px; }
.survey h3 span { font-family: var(--sans); font-weight: 400; font-size: 14px; color: var(--ink-soft); }
.q p { color: var(--ink); font-size: 14px; margin: 14px 0 8px; }
.opts { display: flex; flex-wrap: wrap; gap: 8px; }
.opts button {
  font: 14px var(--sans); color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.opts button:hover { border-color: var(--ink-soft); }
.opts button[aria-pressed="true"] { background: var(--ink); color: var(--ocean); border-color: var(--ink); }
.survey-thanks { color: var(--accent) !important; font-size: 14px; }

/* Map */
.map-frame { margin: 0; position: sticky; top: 24px; }
#map {
  display: block; width: 100%; aspect-ratio: 12 / 7;
  border-radius: var(--radius); background: var(--ocean);
  border: 1px solid var(--line);
}
.map-frame figcaption {
  display: flex; gap: 10px; align-items: center;
  font-size: 13px; color: var(--ink-soft); margin-top: 12px;
}
.sim-tag {
  font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase;
  border: 1px solid var(--line); border-radius: 4px; padding: 2px 6px;
}

.map-legend {
  display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px;
  font-size: 12.5px; color: var(--ink-soft);
}
.map-legend span { display: inline-flex; align-items: center; gap: 7px; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 2px; flex: none; }
.swatch-fill { background: #5b8def; }
.swatch-border { background: #e9dfc6; box-shadow: inset 0 0 0 3px #7a2f20; }
.swatch-holding { background: #d64c6a; box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 1px #0d1a2b; }
.swatch-stripe {
  background: repeating-linear-gradient(-45deg, #5b8def 0 3px, #7a2f20 3px 5px);
}

/* Sections */
section h2 { font-size: clamp(28px, 3.2vw, 38px); }
.war-intro { color: var(--ink-soft); font-size: 17px; margin: 16px 0 0; max-width: 40em; }
.war-grid {
  list-style: none; padding: 0; margin: 36px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
}
.war-grid li {
  background: var(--ocean-2); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px 22px;
}
.war-grid h3 { font-size: 19px; margin-bottom: 8px; }
.war-grid p { color: var(--ink-soft); margin: 0; font-size: 15px; }
.steps a { color: var(--accent); }

.how, .war, .sealed, .faq, .cta-final {
  max-width: 1200px; margin: 0 auto; padding: 72px 24px;
  border-top: 1px solid var(--line);
}
.steps {
  list-style: none; padding: 0; margin: 40px 0 0;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px;
}
.step-num {
  display: inline-grid; place-items: center; width: 32px; height: 32px;
  border-radius: 50%; border: 1px solid var(--accent); color: var(--accent);
  font-weight: 600; font-size: 14px; margin-bottom: 16px;
}
.steps h3 { font-size: 21px; margin-bottom: 8px; }
.steps p { color: var(--ink-soft); margin: 0; }

.sealed { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.sealed-copy p { color: var(--ink-soft); font-size: 17px; margin: 16px 0 0; max-width: 32em; }
.sealed-copy .muted { color: var(--ink); }
.timeline { list-style: none; padding: 0; margin: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px;
  width: 1px; background: var(--line);
}
.timeline li { position: relative; padding: 0 0 28px 36px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: ""; position: absolute; left: 0; top: 5px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--ocean); border: 1px solid var(--ink-soft);
}
.timeline li:first-child::before { background: var(--accent); border-color: var(--accent); }
.timeline .when { display: block; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.timeline .what { font-family: var(--serif); font-size: 21px; }

.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; max-width: 760px; }
.faq h2 { margin-bottom: 24px; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.faq details p { color: var(--ink-soft); margin: 10px 0 0; }

.cta-final { text-align: center; }
.cta-final h2 { margin-bottom: 28px; }

.footer {
  max-width: 1200px; margin: 0 auto; padding: 32px 24px 48px;
  display: flex; justify-content: space-between; font-size: 14px; color: var(--ink-soft);
  border-top: 1px solid var(--line);
}

/* Privacy page */
.legal { max-width: 720px; margin: 0 auto; padding: 24px 24px 80px; }
.legal h1 { font-size: 40px; margin-bottom: 8px; }
.legal h2 { font-size: 22px; margin: 36px 0 8px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal strong { color: var(--ink); }
.todo { background: #f2c14e; color: #2a1f00; padding: 0 4px; border-radius: 3px; }
.consent strong { color: var(--ink); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 8px; }
  .map-frame { position: static; }
  .steps, .war-grid { grid-template-columns: 1fr 1fr; }
  .sealed { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 520px) {
  .steps, .war-grid { grid-template-columns: 1fr; }
  .topbar { padding: 14px 18px; }
  .hero { padding: 4px 18px 56px; }
  .eyebrow { font-size: 11.5px; margin-bottom: 10px; }
  h1 { font-size: 32px; }
  .lede { font-size: 16px; margin: 12px 0 20px; }
  .field { margin-bottom: 12px; }
  .field input { padding: 10px 12px; }
  .consent { margin-bottom: 14px; }
  .join, .joined { padding: 18px; }
}
