/* Starfall site. Colours and surfaces follow the game's kit (packages/client/src/kit.css):
   indigo-slate panels, ice-blue raised buttons with dark text, champagne gold.
   Calm on purpose: nothing blinks, pulses, spins or scrolls by itself. */

@font-face { font-family: "Saira Semi Condensed"; font-weight: 500; font-display: swap; src: url("../fonts/saira-semi-condensed-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira Semi Condensed"; font-weight: 600; font-display: swap; src: url("../fonts/saira-semi-condensed-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Saira Semi Condensed"; font-weight: 700; font-display: swap; src: url("../fonts/saira-semi-condensed-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #070b13;
  --text: #e6ebf2;
  --muted: #a3aec2;
  --accent: #8fd0ff;
  --gold: #e2c27a;
  --panel-top: #2b3254;
  --panel-mid: #1d2339;
  --panel-bot: #161b2d;
  --panel-line: rgba(176, 186, 255, 0.5);
  --well: #0e1220;
  --ice-top: #c4e7ff;
  --ice-mid: #78bdf0;
  --ice-bot: #4f95d2;
  --ice-line: #22507f;
  --ice-ink: #06142a;
  --grey-top: #4a5373;
  --grey-bot: #2c3350;
  --good: #8be3b0;
  --bad: #ff9c92;
  --label: "Saira Semi Condensed", "Inter", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, sans-serif;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font: 400 16px/1.55 var(--body);
  background:
    radial-gradient(ellipse 60% 40% at 78% 6%, rgba(255, 170, 110, 0.14), transparent 70%),
    radial-gradient(ellipse 70% 50% at 18% 0%, rgba(110, 160, 255, 0.18), transparent 70%),
    var(--bg);
  overflow-x: hidden;
}

img, video { display: block; max-width: 100%; height: auto; }

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

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

h1, h2, h3 {
  margin: 0;
  font-family: var(--label);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.15;
}
h2 { font-size: clamp(22px, 3.2vw, 30px); }
h3 { font-size: 17px; letter-spacing: 0.08em; }

p { margin: 0 0 12px; }

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter-r);
}

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus { left: 16px; top: 8px; z-index: 10; background: var(--well); padding: 8px 12px; }

/* ---- raised buttons, as in the game ---- */
.btn {
  min-height: 48px;
  padding: 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 6px;
  border: 1px solid var(--ice-line);
  color: var(--ice-ink);
  background: linear-gradient(180deg, var(--ice-top), var(--ice-mid) 50%, var(--ice-bot));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 2px 4px rgba(0, 0, 0, 0.45);
  font: 700 15px/1 var(--label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { color: var(--ice-ink); filter: brightness(1.07); }
.btn:active { box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35); transform: translateY(1px); }
.btn:disabled { filter: saturate(0.25) brightness(0.7); cursor: default; }
.btn.grey {
  border-color: #1a1f33;
  color: #e6ebf6;
  background: linear-gradient(180deg, var(--grey-top), var(--grey-bot));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), inset 0 -3px 0 rgba(0, 0, 0, 0.22), 0 2px 4px rgba(0, 0, 0, 0.45);
}
.btn.grey:hover { color: #fff; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 13px; }

/* ---- header ---- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
  padding-bottom: 12px;
}
.brand {
  font: 700 18px/1 var(--label);
  letter-spacing: 0.3em;
  color: #f2f5fb;
  text-decoration: none;
}
.brand:hover { color: #fff; }

/* ---- hero ---- */
.hero {
  position: relative;
  padding-top: 28px;
  padding-bottom: 40px;
}
.hero::before {
  /* The real galaxy map, dimmed, behind the hero. */
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("../img/shots/galaxy-3d.webp") center 30% / cover no-repeat;
  opacity: 0.28;
  -webkit-mask-image: linear-gradient(180deg, #000 40%, transparent);
  mask-image: linear-gradient(180deg, #000 40%, transparent);
}
.hero-grid {
  display: grid;
  gap: 24px;
  align-items: center;
}
.logo {
  font: 700 clamp(40px, 8vw, 68px)/1 var(--label);
  letter-spacing: 0.28em;
  margin-right: -0.28em;
  color: #f2f5fb;
  text-shadow: 0 0 22px rgba(143, 208, 255, 0.45);
}
.tagline {
  margin: 12px 0 16px;
  font: 500 14px/1.3 var(--label);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
}
.lead { font-size: 17px; color: #d5dceb; max-width: 34em; }

.facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.facts li {
  padding: 5px 10px;
  border-radius: 5px;
  background: var(--well);
  box-shadow: inset 0 0 0 1px rgba(176, 186, 255, 0.18);
  font: 600 12px/1.2 var(--label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #cfd6ea;
}

/* ---- sign-up form ---- */
.signup { max-width: 460px; }
.signup .row { display: flex; flex-wrap: wrap; gap: 8px; }
.signup input[type="email"] {
  flex: 1 1 200px;
  min-width: 0;
  min-height: 48px;
  padding: 0 14px;
  border-radius: 6px;
  border: 1px solid rgba(176, 186, 255, 0.35);
  background: var(--well);
  box-shadow: inset 0 2px 7px rgba(0, 0, 0, 0.6);
  color: var(--text);
  font: 400 16px/1 var(--body);
}
.signup input[type="email"]::placeholder { color: #8390a8; }
.signup .btn { flex: 0 0 auto; }
.signup .hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.signup .msg { min-height: 1.5em; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.signup .msg.ok { color: var(--good); }
.signup .msg.err { color: var(--bad); }
.after { margin-top: 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }

/* ---- screenshots: a phone held sideways ---- */
.shot {
  margin: 0;
}
.shot .frame {
  border-radius: 16px;
  padding: 6px;
  background: linear-gradient(180deg, #2a3150, #12172a);
  border: 1px solid rgba(176, 186, 255, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 40px rgba(0, 0, 0, 0.55);
}
.shot img, .shot video {
  width: 100%;
  border-radius: 11px;
  background: var(--well);
}
.shot figcaption {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

/* ---- sections ---- */
section { padding: 40px 0; }
.kicker {
  display: block;
  margin-bottom: 8px;
  font: 600 12px/1 var(--label);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
}
.feature {
  display: grid;
  gap: 20px;
  align-items: center;
}
.feature h2 { margin-bottom: 12px; }
.feature p { color: #d0d7e6; }
.feature .shots { display: grid; gap: 12px; }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}
.chips li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, var(--panel-top), var(--panel-bot));
  border: 1px solid rgba(176, 186, 255, 0.28);
  font-size: 14px;
}
.chips li.text { padding-left: 10px; }
.chips img { width: 30px; height: 30px; }
.chips b { font: 600 14px/1 var(--label); letter-spacing: 0.06em; }
.chips span { color: var(--muted); font-size: 13px; }

/* ---- panels ---- */
.panel {
  border-radius: 8px;
  border: 1px solid var(--panel-line);
  background: linear-gradient(180deg, var(--panel-top), var(--panel-mid) 32%, var(--panel-bot));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 14px 44px rgba(0, 0, 0, 0.45);
}

/* ---- species ---- */
.species-head { max-width: 46em; margin-bottom: 20px; }
.species-head p { color: #d0d7e6; }
.species {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.sp {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 14px;
  padding: 14px;
}
.sp > img {
  width: 96px;
  height: 96px;
  border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(176, 186, 255, 0.35);
}
.sp h3 { margin-bottom: 4px; }
.sp p { font-size: 14px; color: #cdd5e5; margin-bottom: 8px; }
.sp .quote { font-size: 13px; color: var(--muted); margin: 0 0 10px; }
.sp .quote b { color: #e6ebf2; font-weight: 600; }
.crew {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin: 0;
  padding: 10px 0 0;
  list-style: none;
  border-top: 1px solid rgba(176, 186, 255, 0.16);
}
.crew li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.crew img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(176, 186, 255, 0.4);
}
.crew span { color: var(--muted); display: block; font-size: 12px; }

.recruit {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
}
.recruit img { width: 56px; height: 56px; flex: none; }
.recruit p { margin: 0; color: #d0d7e6; }

/* ---- join ---- */
.join { text-align: left; padding: 20px; }
.join h2 { margin-bottom: 10px; }
.join p { color: #d0d7e6; max-width: 40em; }

.clip-btn { display: flex; width: fit-content; margin-top: 8px; }

/* ---- footer ---- */
footer {
  margin-top: 24px;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(176, 186, 255, 0.16);
  font-size: 14px;
  color: var(--muted);
}
footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 20px; }
footer a { color: #c9d3e6; }

/* ---- plain pages (privacy, support) ---- */
.page { padding-top: 16px; padding-bottom: 32px; }
.page article { max-width: 44em; padding: 20px; }
.page h1 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 16px; }
.page h2 { font-size: 18px; margin: 24px 0 8px; }
.page p, .page li { color: #d0d7e6; }
.page ul { padding-left: 20px; margin: 0 0 12px; }
.page .updated { color: var(--muted); font-size: 14px; }

/* ---- wider screens, including a phone held sideways (844 x 390) ---- */
@media (min-width: 640px) {
  .hero { padding-top: 40px; padding-bottom: 56px; }
  .hero-grid { grid-template-columns: 1fr 1.05fr; gap: 32px; }
  .feature { grid-template-columns: 1fr 1.2fr; gap: 32px; }
  .feature.flip > .text { order: 2; }
  .feature .shots.two { grid-template-columns: 1fr 1fr; }
  .species { grid-template-columns: 1fr 1fr; }
  section { padding: 48px 0; }
  .join { padding: 28px; }
}
@media (min-width: 1000px) {
  .species { grid-template-columns: 1fr 1fr 1fr; }
  .lead { font-size: 18px; }
}
/* A phone held sideways is short: keep the hero tight so the form is on the first screen. */
@media (max-height: 480px) and (min-width: 640px) {
  .hero { padding-top: 20px; padding-bottom: 32px; }
  .logo { font-size: 44px; }
  .tagline { margin: 8px 0 10px; }
  .lead { font-size: 15px; margin-bottom: 10px; }
  .facts { margin-bottom: 12px; }
}
