/* Star Sovereign website. Same look as the game's title screen
   (client/src/MainScreen.css): gold Cinzel logo, gold buttons, dark
   translucent panels over the cover art. No neon. */
:root {
  --bg: #0a0d13;
  --panel: rgba(16, 19, 27, 0.82);
  --line: rgba(217, 160, 82, 0.22);
  --ink: #e6e9f2;
  --muted: #9aa5bd;
  --gold: #e0ad62;
  --gold-soft: #f1e3c8;
  --gold-dim: #b9a582;
  --bad: #e0616f;
  --good: #6fdc8c;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 64px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "IBM Plex Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; }
a { color: var(--gold); }

/* ---- Top bar ---- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px clamp(16px, 4vw, 40px);
  background: linear-gradient(180deg, rgba(10, 13, 19, 0.92), rgba(10, 13, 19, 0.7));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.topbar-brand {
  font-family: "Cinzel", serif; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; text-decoration: none; color: var(--gold-soft);
  white-space: nowrap;
}
.topbar-links { display: flex; align-items: center; gap: clamp(10px, 2.5vw, 26px); }
.topbar-links a:not(.btn) {
  color: var(--muted); text-decoration: none; font-family: "Chakra Petch", sans-serif;
  font-weight: 600; letter-spacing: 0.04em;
}
.topbar-links a:not(.btn):hover { color: var(--gold-soft); }

/* ---- Buttons (the title screen's gold) ---- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 3px;
  font-family: "Chakra Petch", sans-serif; font-weight: 600; font-size: 1rem;
  letter-spacing: 0.03em; text-decoration: none; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, rgba(34, 28, 22, 0.92), rgba(18, 15, 13, 0.92));
  border: 1px solid rgba(217, 160, 82, 0.35); color: var(--gold-soft);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.btn:hover { border-color: var(--gold); box-shadow: 0 0 14px rgba(224, 173, 98, 0.35); }
.btn-primary {
  background: linear-gradient(180deg, #f3d08f 0%, #d9a052 55%, #b27432 100%);
  border-color: #f3d08f; color: #2a1a0b;
}
.btn:disabled { opacity: 0.6; cursor: wait; }
.btn-small { padding: 7px 14px; font-size: 0.9rem; }
.btn-wide { width: 100%; }

/* ---- Hero: the title cover ---- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: flex-start; justify-content: center;
  padding: max(110px, 14vh) 16px 40px;
  background:
    linear-gradient(180deg, rgba(10, 13, 19, 0.15) 0%, rgba(10, 13, 19, 0) 55%, var(--bg) 100%),
    url("art/title-cover.webp") center / cover no-repeat;
  text-align: center;
}
.hero-inner { max-width: 760px; }
.logo {
  margin: 0; font-family: "Cinzel", serif; font-weight: 700;
  font-size: clamp(2.4rem, 7.5vw, 6rem); letter-spacing: 0.12em; line-height: 1.05;
  text-transform: uppercase;
  background: linear-gradient(180deg, #fff6df 0%, #f6d89a 38%, #d9a052 68%, #a8672a 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.85)) drop-shadow(0 0 22px rgba(240, 170, 80, 0.35));
}
.logo-rule {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 14px auto 10px; width: min(520px, 80vw);
  color: #f3c77c; font-size: 0.9rem; text-shadow: 0 0 10px rgba(240, 170, 80, 0.6);
}
.logo-rule::before, .logo-rule::after {
  content: ""; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(243, 199, 124, 0.8));
}
.logo-rule::after { background: linear-gradient(90deg, rgba(243, 199, 124, 0.8), transparent); }
.tagline {
  margin: 0; font-family: "Cinzel", serif; font-weight: 600;
  font-size: clamp(0.72rem, 1.6vw, 0.95rem); letter-spacing: 0.28em; text-transform: uppercase;
  color: #e9d3ae; text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}
.hero-pitch {
  margin: 26px auto 0; max-width: 560px; font-size: 1.1rem; color: var(--ink);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.95);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 26px; }
.hero-note {
  margin-top: 18px; font-size: 0.95rem; color: var(--gold-soft); letter-spacing: 0.04em; line-height: 1.7;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 1), 0 0 14px rgba(0, 0, 0, 0.9);
}

/* ---- Sections ---- */
.section { max-width: 1120px; margin: 0 auto; padding: 72px 16px; }
.section-title {
  margin: 0 0 12px; font-family: "Cinzel", serif; font-weight: 700;
  font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: 0.06em; color: var(--gold-soft);
  text-align: center;
}
.section-lead { max-width: 640px; margin: 0 auto 40px; text-align: center; color: var(--muted); font-size: 1.05rem; }
.muted { color: var(--muted); }

/* The in-game sci-fi frame: dark panel, faint gold rim, corner brackets. */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: 3px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 14px 40px rgba(0, 0, 0, 0.45);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 12px; height: 12px; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--gold); border-left: 2px solid var(--gold); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); }

h3 { margin: 12px 0 6px; font-family: "Chakra Petch", sans-serif; font-size: 1.2rem; color: var(--gold-soft); }

/* Five planet cards (2026-10-20, white planet = Onslaught): 3 on top, 2
   centred below on wide screens, the same centring as the species row. */
.features { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.features > .feature { flex: 1 1 340px; max-width: 380px; } /* same size as the ship cards */
.feature { padding: 24px; }
.feature img { display: block; width: 64px; height: 64px; }
.feature p, .species p { margin: 0; color: var(--muted); }

.section-band {
  display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 32px;
}
.section-band .section-title { text-align: left; }
.band-text p { font-size: 1.05rem; }
/* A soft sunrise behind the Command Ship so the dark hull stands out
   (user, 2026-10-10): the cover art's gold, fading into the page. */
.band-art-wrap { position: relative; }
.band-art-wrap::before {
  content: ""; position: absolute; inset: -18% -8%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 30% at 50% 44%, rgba(255, 214, 150, 0.45), transparent 72%),
    radial-gradient(ellipse 68% 52% at 50% 48%, rgba(190, 115, 45, 0.30), transparent 78%);
}
.band-art {
  position: relative; z-index: 1; display: block; width: 100%;
  filter: drop-shadow(0 0 1px rgba(255, 230, 190, 0.35)) drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
}

/* Card rows centre any leftover cards (2026-10-10 review: a lone last card
   sat on the left). Species: 4 across; ships: a 3x3 grid on wide screens. */
.species-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
/* 3 on top, 2 centred below (2026-10-20, fifth "mystery" card) - same as the planet row. */
.species-grid > .species { flex: 1 1 340px; max-width: 380px; } /* same size as the ship cards */
.species { padding: 20px 22px 24px; }
.species img { display: block; height: 190px; width: 100%; object-fit: contain; object-position: center bottom; margin-bottom: 8px; }
.species .leader { margin: -4px 0 10px; font-family: "Chakra Petch", sans-serif; font-size: 0.9rem; letter-spacing: 0.02em; color: var(--gold-soft); }

.fleet-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.fleet-grid > .ship { flex: 1 1 340px; max-width: 380px; }
.ship { padding: 18px 22px 22px; }
/* A faint light rim so dark hulls don't sink into the dark panel (user, 2026-10-10). */
.ship img, .species img {
  filter: drop-shadow(0 0 1px rgba(255, 230, 190, 0.45)) drop-shadow(0 0 6px rgba(255, 220, 170, 0.12));
}
/* The coming fifth species (user, 2026-10-20): a ship shown only as a shadow. */
.species--mystery img { filter: brightness(0) drop-shadow(0 0 1px rgba(255, 230, 190, 0.55)) drop-shadow(0 0 10px rgba(255, 220, 170, 0.18)); }
.ship img { display: block; height: 128px; width: 100%; object-fit: contain; }
.ship p { margin: 0; color: var(--muted); }

/* ---- Sign-up ---- */
.signup { max-width: 460px; margin: 0 auto; padding: 32px clamp(20px, 5vw, 36px); }
.signup-lead { text-align: center; color: var(--muted); margin: 0 0 24px; }
.signup label { display: block; margin-top: 14px; font-family: "Chakra Petch", sans-serif; font-weight: 600; color: var(--gold-soft); }
.signup input {
  width: 100%; margin-top: 6px; padding: 11px 12px; font: inherit; color: var(--ink);
  background: rgba(6, 8, 12, 0.85); border: 1px solid rgba(217, 160, 82, 0.3); border-radius: 3px;
}
.signup input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(224, 173, 98, 0.2); }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.hint { margin: 4px 0 0; font-size: 0.85rem; color: #c3cad9; } /* brighter than --muted: small text (2026-10-10 review) */
.form-error {
  margin: 16px 0 0; padding: 10px 12px; border-radius: 3px; color: #f6c3c9;
  background: rgba(224, 97, 111, 0.12); border: 1px solid rgba(224, 97, 111, 0.45);
}
.signup button { margin-top: 22px; }
.signup-done { text-align: center; }
.done-title { font-family: "Cinzel", serif; font-size: 1.4rem; color: var(--gold-soft); margin: 0 0 8px; }
.signup-done .btn { margin-top: 18px; }

/* ---- Art credit ---- */
.credits { max-width: 680px; margin: 0 auto; padding: 32px clamp(20px, 5vw, 40px) 34px; text-align: center; }
.credits p { color: var(--muted); margin: 0 auto 22px; max-width: 520px; }
.credits strong { color: var(--gold-soft); font-weight: 600; }
.credits .credits-kicker {
  margin: 0 0 6px; font-family: "Chakra Petch", sans-serif; font-size: 0.8rem;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold-dim);
}
.ig-btn { display: inline-flex; align-items: center; gap: 10px; }
.ig-icon { flex: none; }

.footer {
  border-top: 1px solid var(--line); padding: 28px 16px 40px; text-align: center;
  color: var(--muted); font-size: 0.85rem;
}
.footer p { margin: 4px 0; }

/* ---- Phones ---- */
@media (max-width: 720px) {
  .topbar-links a:not(.btn) { display: none; }
  .section { padding: 56px 16px; }
  .section-band { grid-template-columns: 1fr; }
  .section-band .section-title { text-align: center; }
  .band-art-wrap { max-width: 360px; margin: 0 auto; }
  .hero-actions .btn { width: 100%; }
}

/* Big monitors (2026-10-10 review): let the content use more of the width,
   still centered, instead of a narrow column in a sea of space. */
@media (min-width: 1600px) {
  .section { max-width: 1320px; }
  .section-lead { font-size: 1.1rem; }
}
/* Tablets: species 2x2 instead of 3 + 1. */
@media (min-width: 560px) and (max-width: 960px) {
  .species-grid > .species { flex-basis: 40%; max-width: none; }
}

.platform-note { text-align: center; margin: -14px 0 20px; }

/* Privacy Policy + Terms of Use pages (2026-10-13). */
.legal { max-width: 820px; padding-top: 96px; }
.legal-panel { padding: clamp(18px, 4vw, 36px); }
.legal-panel .section-title { text-align: left; margin-bottom: 4px; }
.legal-date { color: var(--muted); margin-top: 0; }
.legal-panel h2 { font-size: 1.1rem; margin: 22px 0 6px; }
.legal-panel ul { padding-left: 20px; }
.legal-panel li { margin-bottom: 6px; }
.form-legal { font-size: 0.85rem; color: var(--muted); margin: 4px 0 10px; }

/* Wide screens (2026-10-20): planet, species and ship cards all exactly a
   third of the row, so a short last row (3 + 2) keeps the same card size. */
@media (min-width: 1100px) {
  .features > .feature, .species-grid > .species, .fleet-grid > .ship { max-width: calc((100% - 40px) / 3); }
  /* Five cards: a 6-column grid, 2 columns each, every row the same height;
     the last two start one column in so they sit centred under the three. */
  .features, .species-grid { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 1fr; }
  .features > .feature, .species-grid > .species { grid-column: span 2; max-width: none; min-height: 321px; box-sizing: border-box; } /* 321px = a ship card */
  .features > :nth-child(3n+1):nth-last-child(2), .species-grid > :nth-child(3n+1):nth-last-child(2) { grid-column: 2 / span 2; }
}
