/* StartupWars "Coming soon" page. Same tokens as the app (frontend/src/styles/tokens.css,
   style A "Air"): dark by default, light when the visitor's system asks for it. */

@font-face {
  font-family: 'Unbounded';
  src: url('fonts/unbounded-latin-wght-normal.woff2') format('woff2');
  font-weight: 200 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('fonts/geist-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --faction-1: #7c74ff;
  --faction-2: #ff7a52;
  --faction-3: #ffc531;
  --faction-4: #2fd39b;
  --faction-5: #f062c0;
  --faction-6: #38bdf8;
  --siege: #ff4d4f;

  --font-display: 'Unbounded', ui-sans-serif, system-ui, sans-serif;
  --font-body: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --radius-s: 12px;
  --radius-l: 20px;
  --page-max: 1280px;
  --gutter: clamp(16px, 3vw, 40px);

  --bg: #0e0f13;
  --surface: #16181e;
  --surface-2: #1f2229;
  --line: #21242b;
  --line-strong: #2c2f38;
  --text: #f2f3f6;
  --text-2: #c9ccd4;
  --muted: #9a9eab;
  --accent: #c6f432;
  --accent-hover: #ddfb7a;
  --on-accent: #0e0f13;
  --accent-text: #c6f432;
  --accent-soft: rgb(198 244 50 / 0.12);
  --pos: #2fd39b;
  --neg: #ffb59e;
  --map: #121419;
  --free: #1c1f25;
  --land-0: #1a1c23;
  --land-1: #1d2027;
  --land-2: #181a20;
  --land-3: #1f2229;
  --marker-ink: #f2f3f6;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #ffffff;
    --surface: #f5f5f3;
    --surface-2: #ecede9;
    --line: #e9eae6;
    --line-strong: #d5d7d1;
    --text: #0e0f13;
    --text-2: #3d4049;
    --muted: #6b6f7a;
    --accent-hover: #b8e824;
    --accent-text: #4a7200;
    --accent-soft: #f1fad3;
    --pos: #0e7a55;
    --neg: #b42318;
    --siege: #e5383b;
    --map: #eff1eb;
    --free: #e2e4de;
    --land-0: #e3e5df;
    --land-1: #e0e2db;
    --land-2: #e6e8e2;
    --land-3: #dddfd8;
    --marker-ink: #3d4049;
    color-scheme: light;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent); color: var(--on-accent); }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3, p { margin: 0; }

.wrap { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.top { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--text); text-decoration: none;
  font-family: var(--font-display); font-weight: 700; font-size: 18px;
}
.top-cta { color: var(--text-2); text-decoration: none; font-size: 15px; font-weight: 500; }
.top-cta:hover { color: var(--accent-text); }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
  padding-top: clamp(24px, 6vh, 72px);
  padding-bottom: 72px;
}
.soon {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  letter-spacing: 0.14em; text-transform: uppercase;
  margin-bottom: 24px;
}
.soon .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 0 rgb(198 244 50 / 0.6);
  animation: beat 1.8s ease-out infinite;
}
@keyframes beat { 0% { box-shadow: 0 0 0 0 rgb(198 244 50 / 0.55); } 80%, 100% { box-shadow: 0 0 0 9px rgb(198 244 50 / 0); } }

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(40px, 5.4vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { margin-top: 24px; font-size: clamp(17px, 1.4vw, 20px); color: var(--text-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 36px; }
.hint { color: var(--muted); font-size: 15px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  border: 0; border-radius: var(--radius-s);
  background: var(--accent); color: var(--on-accent);
  font: 600 17px/1 var(--font-body);
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, transform 0.15s;
}
.btn:hover { background: var(--accent-hover); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-wide { width: 100%; }

/* Map illustration */
.hero-map { margin: 0; position: relative; }
.map {
  display: block; width: 100%; height: auto;
  background: var(--map);
  border-radius: var(--radius-l);
}
.map .plot { transition: fill 0.5s ease; }
.map .drive { opacity: 0.4; animation: tint 1.2s ease-in-out infinite; }
.map .siege { fill: none; stroke: var(--neg); stroke-width: 3; stroke-linejoin: round; animation: pulse 0.9s ease-in-out infinite; }
.map .held { fill: none; stroke: var(--pos); stroke-width: 2.5; stroke-linejoin: round; }
.map .burst { animation: burst 0.7s ease-out forwards; transform-box: fill-box; transform-origin: center; }
.map .burst path { fill: none; stroke-width: 3; stroke-linejoin: round; }
.map .shield .veil { fill: var(--text); opacity: 0.07; }
.map .shield .hatch { stroke: var(--text); stroke-width: 1; stroke-linecap: round; opacity: 0.28; }
.map .marker { animation: pop 0.4s ease-out; transform-box: fill-box; transform-origin: center; }
.map .marker-bg { fill: var(--siege); }
.map .marker-swords { stroke: #fff; stroke-width: 2.2; stroke-linecap: round; fill: none; }
.map .pill-bg { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1; }
.map .pill-dot { stroke: #f2f3f6; stroke-width: 1.5; }
.map .pill-ini { font: 700 9px var(--font-display); text-anchor: middle; dominant-baseline: central; fill: #0e0f13; }
.map .pill-name { font: 600 12px var(--font-body); dominant-baseline: central; fill: var(--text); }
.map .pill-shield { fill: none; stroke: var(--text-2); stroke-width: 1.4; stroke-linejoin: round; }
.map .pill { pointer-events: none; }
@keyframes tint { 0%, 100% { opacity: 0.25; } 50% { opacity: 0.55; } }
@keyframes pulse { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: 0.35; } }
@keyframes burst { from { transform: scale(1); opacity: 1; } to { transform: scale(1.6); opacity: 0; } }
@keyframes pop { 0% { transform: scale(0.6); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

.feed {
  list-style: none; margin: 0; padding: 0;
  position: absolute; left: 16px; bottom: 16px; right: 16px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  pointer-events: none;
}
.feed li {
  display: inline-flex; align-items: center; gap: 8px;
  max-width: 100%;
  padding: 6px 12px; border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(6px);
  font-size: 13px; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  animation: feedin 0.35s ease-out;
}
.feed li b { color: var(--text); font-weight: 600; }
.feed .sw { width: 9px; height: 9px; border-radius: 3px; flex: none; }
@keyframes feedin { from { opacity: 0; transform: translateY(6px); } }

/* How it works */
.how { padding-top: 48px; padding-bottom: 88px; }
.how h2, .join h2 {
  font-size: clamp(26px, 2.6vw, 36px);
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.modes {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(28px, 4vw, 56px);
  margin-top: 40px;
}
.mode h3 { font-size: 21px; font-weight: 600; margin-top: 18px; letter-spacing: -0.01em; }
.mode p { margin-top: 10px; color: var(--text-2); }
.mode-icon { width: 52px; height: 52px; display: block; }
.mode-icon .hx { fill: var(--accent-soft); stroke: var(--accent-text); stroke-width: 2; stroke-linejoin: round; }
.mode-icon .hx.siege { fill: color-mix(in srgb, var(--siege) 14%, transparent); stroke: var(--siege); }
.mode-icon .plus, .mode-icon .swords { stroke: var(--text); stroke-width: 2.6; stroke-linecap: round; fill: none; }
.mode-icon .shield { fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linejoin: round; }
.catalog-note {
  margin-top: 56px; padding-top: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted); max-width: 46em;
}

/* Whitelist: the one tinted block on the page. */
.join { padding-bottom: 88px; scroll-margin-top: 24px; }
.join-box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  padding: clamp(28px, 5vw, 64px);
  border-radius: var(--radius-l);
  background: var(--surface);
}
.join-copy p { margin-top: 16px; color: var(--text-2); max-width: 30em; }

.wl { display: flex; flex-direction: column; gap: 20px; }
.kind { border: 0; padding: 0; margin: 0; }
.kind legend { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.kind {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0;
}
.kind legend { grid-column: 1 / -1; }
.kind label { position: relative; }
.kind input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.kind span {
  display: flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 0 12px;
  background: var(--surface-2); color: var(--text-2);
  font-size: 15px; font-weight: 500; cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}
.kind label:first-of-type span { border-radius: var(--radius-s) 0 0 var(--radius-s); }
.kind label:last-of-type span { border-radius: 0 var(--radius-s) var(--radius-s) 0; }
.kind input:checked + span { background: var(--text); color: var(--bg); }
.kind input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.field { display: flex; flex-direction: column; gap: 8px; }
.field-label { font-size: 15px; font-weight: 500; color: var(--text-2); }
.opt { color: var(--muted); font-weight: 400; margin-left: 4px; }
.field input {
  width: 100%; min-height: 52px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-s);
  background: var(--bg); color: var(--text);
  font: 400 17px var(--font-body);
  transition: border-color 0.15s;
}
.field input::placeholder { color: var(--muted); opacity: 0.8; }
.field input:focus { outline: none; border-color: var(--accent-text); }
.field input[aria-invalid='true'] { border-color: var(--neg); }
.field-help { font-size: 14px; color: var(--muted); }
.field-help.err { color: var(--neg); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.status { min-height: 1.5em; font-size: 15px; color: var(--text-2); }
.status.ok { color: var(--pos); }
.status.err { color: var(--neg); }

.wl.done .kind, .wl.done .field, .wl.done .btn { display: none; }
.done-card { display: flex; flex-direction: column; gap: 10px; }
.done-card h3 { font-size: 22px; font-weight: 600; }
.done-card p { color: var(--text-2); }
.done-card button {
  align-self: flex-start; margin-top: 6px; padding: 0;
  border: 0; background: none; color: var(--accent-text);
  font: 500 15px var(--font-body); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

/* Footer */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
  padding-top: 24px; padding-bottom: 40px;
  color: var(--muted); font-size: 14px;
}

@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; padding-bottom: 48px; }
  .join-box { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .modes { grid-template-columns: 1fr; gap: 36px; }
  .how { padding-bottom: 64px; }
  .feed li:nth-child(n + 3) { display: none; }
  .feed { position: static; margin-top: 12px; min-height: 70px; justify-content: flex-end; }
  .feed li { background: var(--surface); backdrop-filter: none; }
}
@media (max-width: 420px) {
  .top-cta { display: none; }
  .hero-actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
