@font-face {
  font-family: "Big Shoulders Display";
  src: url("/annexa/fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2");
  font-weight: 900; font-display: swap;
}
@font-face {
  font-family: "Big Shoulders Display";
  src: url("/annexa/fonts/big-shoulders-display-latin-800-normal.woff2") format("woff2");
  font-weight: 800; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/annexa/fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/annexa/fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}

:root {
  --sea: #10364f;
  --sea-deep: #0b2638;
  --shoal: #1b5470;
  --bone: #eef2ec;
  --mist: #a9c0c9;
  --gold: #f2b33d;
  --gold-dark: #8a5a00;
  --ember: #e76f51;
  --display: "Big Shoulders Display", "Arial Narrow", Impact, sans-serif;
  --body: "Atkinson Hyperlegible", system-ui, sans-serif;
  --measure: 38rem;
  --gutter: clamp(1.25rem, 5vw, 4rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sea);
  color: var(--bone);
  font: 400 1.0625rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--gold); text-underline-offset: 0.18em; }
a:hover { color: #ffd27a; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--gold); color: var(--sea-deep); padding: 0.6rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 1; margin: 0; letter-spacing: 0.01em; }
h2 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h3 { font-size: 1.6rem; }
p { margin: 0; }

/* ---------- Hero: the map is the headline ---------- */
.hero {
  position: relative;
  min-height: min(100svh, 56rem);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
  background: var(--sea);
}
.hero-map {
  position: absolute; inset: 0; width: 100%; height: 100%;
  image-rendering: pixelated; image-rendering: crisp-edges;
}
.hero-shade {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(11, 38, 56, 0.94) 0%, rgba(11, 38, 56, 0.78) 34%, rgba(11, 38, 56, 0) 62%),
    linear-gradient(0deg, var(--sea) 0%, rgba(16, 54, 79, 0) 18%);
}

.topbar {
  position: relative; z-index: 2;
  display: flex; align-items: center; gap: 1.75rem;
  padding: 1.25rem var(--gutter);
}
.brand {
  font-family: var(--display); font-weight: 900; font-size: 1.5rem; letter-spacing: 0.04em;
  color: var(--bone); text-decoration: none; margin-right: auto;
}
.topbar-link { color: var(--bone); text-decoration: none; font-size: 0.95rem; opacity: 0.85; }
.topbar-link:hover { opacity: 1; color: var(--bone); text-decoration: underline; }

.hero-copy {
  position: relative; z-index: 2;
  align-self: center;
  padding: 2rem var(--gutter) 5rem;
  max-width: 44rem;
}
.wordmark {
  font-weight: 900;
  font-size: clamp(5rem, 17vw, 12.5rem);
  line-height: 0.82;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--bone);
  /* the dark edge a nation gets on the map */
  text-shadow: 0.035em 0.035em 0 var(--sea-deep);
  margin-left: -0.04em;
}
.pitch {
  font-family: var(--display); font-weight: 800;
  font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.1;
  margin-top: 1.25rem; max-width: 22ch; color: var(--gold);
}
.sub { margin-top: 1rem; max-width: 34rem; color: var(--bone); font-size: 1.125rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; padding: 0 1.6rem;
  font: 800 1.35rem/1 var(--display); letter-spacing: 0.03em;
  text-decoration: none; border-radius: 3px;
}
.btn-play {
  background: var(--gold); color: var(--sea-deep);
  box-shadow: 0 4px 0 var(--gold-dark);
  min-width: 12rem; font-size: 1.6rem; min-height: 3.75rem;
}
.btn-play:hover { background: #ffc85c; color: var(--sea-deep); }
.btn-play:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--gold-dark); }
.btn-ghost { color: var(--bone); border: 2px solid rgba(238, 242, 236, 0.5); }
.btn-ghost:hover { color: var(--bone); border-color: var(--bone); }

.facts { margin-top: 1.5rem; color: var(--mist); font-size: 0.95rem; }
.facts span { margin: 0 0.35rem; opacity: 0.5; }

/* ---------- Shared section frame: a graticule behind the sea ---------- */
main > section {
  padding: clamp(4rem, 9vw, 7rem) var(--gutter);
}
.how, .modes, .faq {
  background-image:
    linear-gradient(rgba(169, 192, 201, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(169, 192, 201, 0.06) 1px, transparent 1px);
  background-size: 6rem 6rem;
}

/* How a match goes: a real sequence, so it is numbered */
.steps {
  list-style: none; margin: 3rem 0 0; padding: 0;
  display: grid; gap: 2.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  counter-reset: step;
}
.steps li { counter-increment: step; position: relative; padding-top: 4.25rem; }
.steps li::before {
  content: counter(step);
  position: absolute; top: 0; left: 0;
  font: 900 4.5rem/1 var(--display); color: var(--shoal);
}
.steps h3 { color: var(--bone); }
.steps p { margin-top: 0.6rem; color: var(--mist); max-width: 30ch; }

/* What you can build: drawn like a map key */
.legend { background: var(--sea-deep); }
.legend-head p { margin-top: 0.75rem; color: var(--mist); max-width: var(--measure); }
.key {
  margin: 2.5rem 0 0;
  display: grid; gap: 0;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
  border-top: 1px solid rgba(169, 192, 201, 0.2);
}
.key > div {
  display: grid; grid-template-columns: 10rem 1fr; gap: 1rem; align-items: baseline;
  padding: 1rem 0.25rem 1rem 0;
  border-bottom: 1px solid rgba(169, 192, 201, 0.2);
}
.key dt { font-weight: 700; display: flex; align-items: center; gap: 0.7rem; }
.key dd { margin: 0; color: var(--mist); }
.glyph { width: 1.1rem; height: 1.1rem; flex: none; display: inline-block; }
.g-city { background: var(--bone); border-radius: 50%; box-shadow: inset 0 0 0 3px var(--sea-deep); outline: 2px solid var(--bone); }
.g-port { background: #2a9d8f; border-radius: 50% 50% 2px 2px; }
.g-factory { background: #e9c46a; clip-path: polygon(0 100%, 0 30%, 35% 50%, 35% 30%, 70% 50%, 70% 0, 100% 0, 100% 100%); }
.g-fort { background: repeating-linear-gradient(45deg, #8ab17d 0 3px, transparent 3px 6px); border: 2px solid #8ab17d; }
.g-warship { background: #7896d2; clip-path: polygon(0 55%, 100% 55%, 82% 100%, 18% 100%); }
.g-sam { border: 3px dashed var(--ember); border-radius: 50%; }
.g-silo { background: var(--ember); clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* Ways to play */
.mode-list {
  margin-top: 3rem;
  display: grid; gap: 2.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
}
.mode { border-left: 4px solid var(--gold); padding-left: 1.25rem; }
.mode:nth-child(2) { border-color: #2a9d8f; }
.mode:nth-child(3) { border-color: var(--ember); }
.mode p { margin-top: 0.75rem; color: var(--mist); max-width: 36ch; }
.maps { margin-top: 3rem; max-width: var(--measure); color: var(--bone); }

/* Final call to action */
.final {
  text-align: center;
  background: var(--shoal);
  display: grid; justify-items: center; gap: 1.75rem;
}
.final h2 { max-width: 16ch; }
.elsewhere { color: var(--bone); opacity: 0.9; }
.elsewhere a { color: var(--bone); }

/* FAQ */
.faq h2 { margin-bottom: 2rem; }
.faq details {
  max-width: 44rem;
  border-bottom: 1px solid rgba(169, 192, 201, 0.25);
}
.faq summary {
  cursor: pointer; list-style: none;
  padding: 1.1rem 2rem 1.1rem 0; position: relative;
  font-weight: 700; font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 0.25rem; top: 0.85rem;
  font: 800 1.6rem/1 var(--display); color: var(--gold);
}
.faq details[open] summary::after { content: "–"; }
.faq details p { padding: 0 0 1.25rem; color: var(--mist); max-width: var(--measure); }

.foot {
  padding: 2rem var(--gutter) 3rem;
  display: flex; flex-wrap: wrap; gap: 0.5rem 2rem; justify-content: space-between;
  color: var(--mist); font-size: 0.95rem;
  border-top: 1px solid rgba(169, 192, 201, 0.2);
}
.foot a { color: var(--bone); }

@media (max-width: 720px) {
  .topbar-link { display: none; }
  .hero { min-height: 100svh; }
  .hero-shade {
    background:
      linear-gradient(0deg, rgba(11, 38, 56, 0.96) 0%, rgba(11, 38, 56, 0.85) 48%, rgba(11, 38, 56, 0.1) 78%);
  }
  .hero-copy { align-self: end; padding-bottom: 3rem; }
  .btn-play { width: 100%; }
  .key > div { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ---------- How do you want to play? ---------- */
.choose {
  border: 0; padding: 2rem; border-radius: 6px;
  width: min(30rem, calc(100vw - 2rem));
  background: var(--sea-deep); color: var(--bone);
  box-shadow: 0 0 0 1px rgba(169, 192, 201, 0.25), 0 24px 60px rgba(0, 0, 0, 0.55);
}
.choose::backdrop { background: rgba(6, 22, 33, 0.72); }
.choose h2 { font-size: 2rem; margin: 0 2rem 1.25rem 0; }
.choose-x-form { position: absolute; top: 0.75rem; right: 0.75rem; margin: 0; }
.choose-x {
  font: 800 1.8rem/1 var(--display); color: var(--mist);
  background: none; border: 0; cursor: pointer; padding: 0.25rem 0.5rem;
}
.choose-x:hover { color: var(--bone); }
.choose-opt {
  display: block; text-decoration: none; color: var(--bone);
  padding: 1rem 1.15rem; border-radius: 4px; margin-top: 0.75rem;
  border: 2px solid rgba(169, 192, 201, 0.3);
}
.choose-opt b { display: block; font: 800 1.5rem/1.1 var(--display); letter-spacing: 0.02em; }
.choose-opt span { display: block; margin-top: 0.35rem; color: var(--mist); font-size: 0.98rem; line-height: 1.45; }
.choose-opt:hover { border-color: var(--bone); color: var(--bone); }
.choose-login { background: var(--gold); border-color: var(--gold); }
.choose-login b { color: var(--sea-deep); }
.choose-login span { color: #4a3300; }
.choose-login:hover { background: #ffc85c; border-color: #ffc85c; }
