/* Equator SMP — colours from the EquatorSMP branding (logo backgrounds, ring and stars). */
:root {
  --night: #1a1226;      /* sky at the top of the logo */
  --dusk: #34203f;       /* sky in the middle */
  --ember: #6b3a4a;      /* glow above the horizon */
  --ground: #160f1c;     /* hills silhouette; page background */
  --outline: #140c0a;    /* pixel outline around the planet and letters */
  --gold: #ffe07a;       /* equator ring */
  --gold-deep: #c46414;  /* ring shadow */
  --moon: #c9d6ff;       /* pale stars */
  --ink: #f2ecfa;
  --muted: #b4a7c8;
  --line: #3a2a48;

  --display: "Silkscreen", "Courier New", monospace;
  --body: "Rubik", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 48px);
  --max: 1200px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
img[src$=".svg"], .people img { image-rendering: pixelated; }

a { color: var(--moon); text-underline-offset: 3px; }
a:hover { color: #fff; }

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

h1, h2 { margin: 0; font-family: var(--display); font-weight: 700; line-height: 1.1; }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.5rem); letter-spacing: -0.01em; }
p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.skip {
  position: absolute; left: var(--gutter); top: -60px; z-index: 10;
  background: var(--gold); color: var(--outline); padding: 8px 14px;
  font-family: var(--display); text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header sits on top of the hero sky. */
.site-header {
  position: absolute; inset: 0 0 auto; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 700; font-size: 1.05rem;
}
.site-header nav { display: flex; gap: clamp(14px, 3vw, 32px); }
.site-header nav a {
  color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 0.95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.site-header nav a:hover { color: var(--gold); border-bottom-color: var(--gold); }

/* Hero: the logo's night sky, stars and hills, built from the same layers. */
.hero {
  position: relative;
  min-height: min(100svh, 860px);
  display: grid; align-items: center;
  padding: 104px var(--gutter) clamp(120px, 15vw, 210px);
  background:
    url("/assets/hills.svg") bottom center / max(100%, 1100px) auto no-repeat,
    url("/assets/stars.svg") top left / 960px 540px repeat,
    radial-gradient(ellipse 70% 80% at 40% 78%, var(--ember) 0%, var(--dusk) 50%, var(--night) 100%);
  image-rendering: pixelated;
  overflow: hidden;
}
.hero-inner {
  width: 100%; max-width: var(--max); margin: 0 auto;
  display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
  align-items: center; gap: clamp(24px, 4vw, 64px);
}
.planet {
  width: 100%; max-width: 520px; justify-self: center;
  filter: drop-shadow(0 0 48px rgba(255, 224, 122, 0.12));
  animation: bob 3.2s steps(4, end) infinite alternate;
}
@keyframes bob { from { transform: translateY(0); } to { transform: translateY(-12px); } }
@media (prefers-reduced-motion: reduce) { .planet { animation: none; } }

.wordmark { display: block; width: min(100%, 620px); }
.wordmark .wm-equator { width: 100%; }
.wordmark .wm-smp { width: 37.5%; margin: -1% auto 0; }

.lede {
  max-width: 34ch; margin-top: 28px;
  font-size: clamp(1.1rem, 1.6vw, 1.3rem); line-height: 1.55; color: var(--ink);
}

.join { margin-top: 32px; }
.join-label { font-size: 0.9rem; color: var(--muted); margin-bottom: 8px; }
.join-note { margin-top: 12px; font-size: 0.95rem; color: var(--muted); }
.status::before {
  content: ""; display: inline-block; width: 8px; height: 8px; margin: 0 6px 1px 2px;
  background: var(--muted);
}
.status[data-state="online"]::before { background: #7fc25a; }
.status[data-state="offline"]::before { background: #e8433a; }

/* The address plate: dark plate with the pixel outline, gold text, copy key on the right. */
.ip {
  display: inline-flex; align-items: stretch; max-width: 100%;
  padding: 0; border: 3px solid var(--outline);
  background: var(--outline); cursor: pointer;
  box-shadow: 0 6px 0 var(--gold-deep);
  font: inherit; color: inherit;
  transition: transform 80ms steps(2), box-shadow 80ms steps(2);
}
.ip:hover { transform: translateY(2px); box-shadow: 0 4px 0 var(--gold-deep); }
.ip:active { transform: translateY(6px); box-shadow: 0 0 0 var(--gold-deep); }
.ip-text {
  padding: 14px 20px; background: var(--night);
  font-family: var(--display); font-weight: 700; color: var(--gold);
  font-size: clamp(1rem, 4.4vw, 1.9rem); line-height: 1.1;
  white-space: nowrap;
}
.ip-action {
  display: grid; place-items: center; min-width: 6.5em; padding: 0 16px;
  background: var(--gold); color: var(--outline);
  font-family: var(--display); font-weight: 700; font-size: 1rem;
}
.ip[data-copied] .ip-action { background: #7fc25a; }

.ip-small { box-shadow: 0 4px 0 var(--gold-deep); }
.ip-small .ip-text { font-size: 1.1rem; padding: 10px 14px; }
.ip-small .ip-action { font-size: 0.9rem; min-width: 5.5em; }

/* Plain gold key, same shape as the copy key. */
.button {
  display: inline-block; margin-top: 32px; padding: 14px 22px;
  border: 3px solid var(--outline); background: var(--gold); color: var(--outline);
  box-shadow: 0 6px 0 var(--gold-deep);
  font-family: var(--display); font-weight: 700; font-size: 1.05rem; text-decoration: none;
  transition: transform 80ms steps(2), box-shadow 80ms steps(2);
}
.button:hover { color: var(--outline); transform: translateY(2px); box-shadow: 0 4px 0 var(--gold-deep); }
.button:active { transform: translateY(6px); box-shadow: none; }

/* Sections */
.map, .team, .faq {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) var(--gutter) 0;
}
.map p, .team p, .faq-intro p { color: var(--muted); max-width: 60ch; }
h2 + p { margin-top: 16px; }

.map { padding-top: clamp(48px, 7vw, 96px); }
.map-head {
  display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between;
  gap: 24px 48px; margin-bottom: 32px;
}
.map-head p { color: var(--ink); }
.map-head .button { margin-top: 0; }
.facts {
  margin: 36px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px 32px;
}
.facts li { position: relative; padding-left: 22px; color: var(--muted); }
.facts li::before {
  content: ""; position: absolute; left: 0; top: 0.62em;
  width: 8px; height: 8px; background: var(--gold);
}

.map-figure { margin: 0; }
.map-frame {
  position: relative;
  border: 4px solid var(--outline);
  outline: 2px solid var(--line); outline-offset: 0;
  background: var(--night);
}
.map-frame img { width: 100%; }
/* Dam Square, Amsterdam (x 1089, z -11660) on the cropped Europe image. */
.pin {
  position: absolute; left: 52.7%; top: 46.5%;
  width: 14px; height: 14px; margin: -7px 0 0 -7px;
  background: #e8433a; border: 3px solid var(--outline);
}
.pin span {
  position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%);
  padding: 3px 8px; white-space: nowrap;
  background: var(--outline); color: var(--ink);
  font-family: var(--display); font-size: 0.8rem;
}
.map-figure figcaption, .map-caption { margin-top: 12px; font-size: 0.9rem; color: var(--muted); max-width: 72ch; }

/* Tabs sit on the map frame like folder tabs. */
.map-tabs { display: flex; gap: 6px; }
.map-tabs [role="tab"] {
  padding: 10px 20px 8px; cursor: pointer;
  border: 4px solid var(--outline); border-bottom: 0;
  background: var(--dusk); color: var(--muted);
  font-family: var(--display); font-weight: 700; font-size: 1rem;
}
.map-tabs [role="tab"]:hover { color: var(--ink); }
.map-tabs [role="tab"][aria-selected="true"] { background: var(--gold); color: var(--outline); }
.map-tabs [role="tab"]:focus-visible { outline-offset: -7px; outline-color: var(--outline); }
.map-figure, .ore-panel { margin: 0; }

/* Ore map */
.ore-frame { overflow: hidden; }
.ore-map { display: block; width: 100%; aspect-ratio: 2 / 1; cursor: grab; user-select: none; touch-action: pan-y; }
.ore-map.dragging { cursor: grabbing; }
.reg { cursor: pointer; }
.reg-edge { fill: none; stroke: var(--outline); stroke-width: 5; vector-effect: non-scaling-stroke; }
.reg-box { fill-opacity: 0.4; stroke-width: 2; vector-effect: non-scaling-stroke; }
.reg-dot { stroke: var(--outline); stroke-width: 2; vector-effect: non-scaling-stroke; }
.reg:hover .reg-box, .reg.on .reg-box { fill-opacity: 0.7; }

.ore-zoom { position: absolute; top: 10px; right: 10px; display: flex; gap: 6px; }
.ore-zoom button {
  min-width: 36px; height: 36px; padding: 0 10px; cursor: pointer;
  border: 3px solid var(--outline); background: var(--night); color: var(--ink);
  font-family: var(--display); font-weight: 700; font-size: 1rem;
}
.ore-zoom button:hover { background: var(--gold); color: var(--outline); }

.ore-tip {
  position: absolute; z-index: 2; pointer-events: none; width: max-content; max-width: 260px;
  padding: 10px 12px; display: grid; gap: 2px;
  background: var(--night); border: 3px solid var(--outline); color: var(--muted);
  font-size: 0.85rem; line-height: 1.45;
}
.ore-tip[hidden] { display: none; }
.ore-tip strong { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.ore-tip .ore-name { display: flex; align-items: center; gap: 8px; color: var(--ink); }

.swatch { display: inline-block; width: 12px; height: 12px; flex: none; border: 2px solid var(--outline); }

.ore-filters { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ore-filters button {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 10px; cursor: pointer;
  border: 2px solid var(--line); background: transparent; color: var(--muted);
  font: 500 0.9rem/1.2 var(--body);
}
.ore-filters button:hover { color: var(--ink); border-color: var(--muted); }
.ore-filters button[aria-pressed="true"] { border-color: var(--gold); color: var(--ink); }
.ore-filters .count { font-variant-numeric: tabular-nums; opacity: 0.7; }

.people {
  margin: 36px 0 0; padding: 0; list-style: none;
  display: flex; flex-wrap: wrap; gap: 20px 40px;
}
.people li {
  display: grid; grid-template-columns: 72px auto; grid-template-rows: auto auto;
  column-gap: 16px; align-items: center;
}
.people img {
  grid-row: 1 / 3; width: 72px; height: 72px;
  border: 3px solid var(--outline); background: var(--dusk);
}
.person-name { font-family: var(--display); font-weight: 700; font-size: 1.2rem; align-self: end; }
.person-role { color: var(--muted); font-size: 0.95rem; align-self: start; }

.faq {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(24px, 5vw, 72px); align-items: start;
  padding-bottom: clamp(72px, 10vw, 128px);
}
.faq-intro { position: sticky; top: 24px; }
.faq-list { border-top: 2px solid var(--line); }
.faq details { border-bottom: 2px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 0; cursor: pointer; list-style: none;
  font-weight: 500; font-size: 1.1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; flex: none; width: 1.4em; text-align: center;
  font-family: var(--display); font-size: 1.4rem; color: var(--gold);
}
.faq details[open] summary::after { content: "−"; }
.faq summary:hover { color: var(--gold); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 62ch; }
.faq details strong { color: var(--ink); font-weight: 600; }

.site-footer {
  background: var(--outline);
  border-top: 2px solid var(--line);
  padding: 40px var(--gutter);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px;
}
.fineprint { flex-basis: 100%; font-size: 0.85rem; color: var(--muted); }

/* Narrow screens: stack like the square logo. */
@media (max-width: 860px) {
  .hero { min-height: 0; padding-top: 88px; text-align: center; }
  .hero-inner { grid-template-columns: 1fr; gap: 8px; }
  .planet { width: min(64vw, 340px); }
  .wordmark, .lede { margin-left: auto; margin-right: auto; }
  .wordmark { width: min(92%, 480px); }
  .join-label { margin-bottom: 6px; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .faq { grid-template-columns: 1fr; }
  .faq-intro { position: static; }
}
@media (max-width: 480px) {
  .site-header { padding-top: 14px; }
  .brand span { display: none; }
  .facts { grid-template-columns: 1fr; }
  .pin span { font-size: 0.7rem; }
  .map-tabs [role="tab"] { flex: 1; }
  .ore-zoom { top: 6px; right: 6px; }
  .ore-zoom button { min-width: 30px; height: 30px; padding: 0 6px; font-size: 0.85rem; }
  .ip { width: 100%; }
  .ip-text { flex: 1; text-align: left; padding: 14px 12px; }
  .ip-action { min-width: 4.5em; padding: 0 10px; }
}
