/* SWBFO's website: deep space, hologram panels, a gold call to action.
   Fonts are served from here (no third parties): Michroma and Exo 2, both
   under the SIL Open Font License (fonts/OFL-*.txt). */
@font-face {
  font-family: "Michroma";
  src: url("/fonts/michroma-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Exo 2";
  src: url("/fonts/exo-2-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --space: #03050b;
  --space-2: #070b16;
  --panel: rgba(10, 16, 30, 0.78);
  --panel-solid: #0b1222;
  --line: rgba(125, 195, 255, 0.16);
  --line-strong: rgba(125, 195, 255, 0.34);
  --text: #e9eef8;
  --dim: #9ba8c0;
  --faint: #66728a;
  --gold: #ffc94a;
  --gold-hot: #ffe08a;
  --gold-ink: #1a1203;
  --holo: #6fd6ff;
  --holo-dim: rgba(111, 214, 255, 0.55);
  --red: #ff6450;
  --good: #6fe0a0;
  --display: "Michroma", "Eurostile", "Segoe UI", sans-serif;
  --body: "Exo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --cut: 14px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { background: var(--space); }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 600px at 85% -10%, rgba(64, 110, 200, 0.18), transparent 60%),
    radial-gradient(900px 500px at -10% 30%, rgba(140, 60, 160, 0.10), transparent 60%),
    linear-gradient(180deg, var(--space) 0%, var(--space-2) 100%);
  color: var(--text);
  font: 17px/1.6 var(--body);
  font-weight: 400;
  overflow-x: hidden;
}
#stars { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
body > header, body > main, body > footer { position: relative; z-index: 1; }

a { color: var(--holo); text-decoration-color: rgba(111, 214, 255, 0.4); text-underline-offset: 3px; }
a:hover { color: var(--gold-hot); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
strong { color: #fff; font-weight: 600; }

/* --- The bar along the top ---------------------------------------------- */
body > header {
  max-width: 1120px; margin: 0 auto; padding: 22px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--display); font-size: 19px; letter-spacing: 0.32em; color: var(--gold);
  text-decoration: none; text-shadow: 0 0 18px rgba(255, 201, 74, 0.35);
}
.brand:hover { color: var(--gold-hot); }
.brand img { width: 30px; height: 30px; flex: none; filter: drop-shadow(0 0 8px rgba(255, 201, 74, 0.35)); }
body > header nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
body > header nav a {
  font-family: var(--display); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--dim); text-decoration: none; padding: 9px 12px; border: 1px solid transparent;
}
body > header nav a:hover, body > header nav a[aria-current="page"] {
  color: var(--text); border-color: var(--line); background: rgba(111, 214, 255, 0.05);
}

main { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* --- Type ------------------------------------------------------------------ */
h1, h2, h3 { font-family: var(--display); font-weight: 400; letter-spacing: 0.04em; line-height: 1.25; }
h1 { font-size: clamp(26px, 4.6vw, 48px); margin: 0 0 18px; }
h2 { font-size: clamp(19px, 2.6vw, 26px); margin: 0 0 14px; }
h3 { font-size: 14px; letter-spacing: 0.14em; text-transform: uppercase; margin: 0 0 10px; color: #fff; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 22px;
  font-family: var(--display); font-size: 11px; letter-spacing: 0.3em; text-transform: uppercase; color: var(--holo);
}
.kicker::before { content: ""; width: 22px; height: 1px; background: var(--holo); }
.kicker.live::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--good);
  box-shadow: 0 0 10px var(--good); animation: pulse 2.4s ease-in-out infinite;
}
.lead { font-size: clamp(17px, 2vw, 20px); color: var(--dim); max-width: 640px; margin: 0; }
.fine { color: var(--faint); font-size: 14px; margin: 16px 0 0; }
.label {
  font-family: var(--display); font-size: 10px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--holo-dim);
  margin: 0 0 10px; display: block;
}

/* --- Buttons: cut corners ---------------------------------------------------- */
.button {
  --edge: var(--line-strong);
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 26px;
  font-family: var(--display); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text); text-decoration: none; cursor: pointer;
  border: 0; background: var(--edge);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
  transition: filter 0.15s, transform 0.15s;
}
.button::before {  /* the face, inset 1px: the background around it is the border */
  content: ""; position: absolute; inset: 1px; z-index: -1; background: rgba(8, 14, 26, 0.92);
  clip-path: inherit;
}
.button { isolation: isolate; }
.button:hover { --edge: var(--holo); color: #fff; }
.button:active { transform: translateY(1px); }
.button.primary { background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 30px rgba(255, 201, 74, 0.25); }
.button.primary::before { background: linear-gradient(180deg, var(--gold-hot), var(--gold)); }
.button.primary:hover { filter: brightness(1.08) drop-shadow(0 0 14px rgba(255, 201, 74, 0.45)); color: var(--gold-ink); }
.button:disabled { opacity: 0.5; cursor: default; filter: none; }
.button svg { width: 18px; height: 18px; }
.buttons { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 30px; }

/* --- Hologram panels, with corner brackets ------------------------------------ */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); padding: 26px;
  backdrop-filter: blur(6px);
}
.panel::before, .panel::after {
  content: ""; position: absolute; width: 16px; height: 16px; pointer-events: none;
}
.panel::before { top: -1px; left: -1px; border-top: 2px solid var(--holo); border-left: 2px solid var(--holo); }
.panel::after { bottom: -1px; right: -1px; border-bottom: 2px solid var(--holo); border-right: 2px solid var(--holo); }
.panel.gold::before, .panel.gold::after { border-color: var(--gold); }
.panel p { margin: 0; color: var(--dim); }
.panel p + p { margin-top: 10px; }

section { margin: 84px 0; }
.section-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 26px; }
.section-head h2 { margin: 0; }
.section-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.three { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid.three { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); } }
.icon { width: 34px; height: 34px; color: var(--gold); margin-bottom: 14px; display: block; }

/* --- The front page's opening: a world at dusk --------------------------- */
.hero { position: relative; padding: 48px 0 0; display: flex; flex-direction: column; }
.hero-text { position: relative; z-index: 2; max-width: 720px; }

.hero h1 .accent { color: var(--gold); }
.horizon {  /* the full width of the window, fading out at the top and the sides */
  position: relative; z-index: 1; height: 340px; pointer-events: none;
  width: 100vw; margin: 10px 0 0 calc(50% - 50vw);
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 30%),
    linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(180deg, transparent 0, #000 30%),
    linear-gradient(90deg, transparent 0, #000 18%, #000 82%, transparent 100%);
  mask-composite: intersect;
}
.horizon svg { width: 100%; height: 100%; display: block; }

/* --- Screenshots ---------------------------------------------------------- */
.gallery { position: relative; z-index: 2; margin-top: -34px; }
.shots { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-flow: dense; gap: 12px; }
.shot {
  position: relative; margin: 0; grid-column: span 2; aspect-ratio: 16 / 9; overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-solid);
}
.shot.wide { grid-column: span 4; grid-row: span 2; aspect-ratio: auto; }
.shot.wide.right { grid-column: 3 / span 4; }
.shot a { display: block; width: 100%; height: 100%; }
.shot img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.5s ease, filter 0.3s;
}
.shot:hover img { transform: scale(1.04); filter: brightness(1.08); }
.shot::after {  /* corner brackets, lit on hover */
  content: ""; position: absolute; inset: 8px; pointer-events: none; opacity: 0; transition: opacity 0.2s;
  background:
    linear-gradient(var(--holo), var(--holo)) top left / 16px 2px no-repeat,
    linear-gradient(var(--holo), var(--holo)) top left / 2px 16px no-repeat,
    linear-gradient(var(--holo), var(--holo)) bottom right / 16px 2px no-repeat,
    linear-gradient(var(--holo), var(--holo)) bottom right / 2px 16px no-repeat;
}
.shot:hover::after { opacity: 1; }
.shot figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 34px 16px 12px; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(2, 4, 10, 0.88));
  font-family: var(--display); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: #fff;
}
.shot figcaption b { display: block; font-weight: 400; font-size: 9px; letter-spacing: 0.3em; margin-bottom: 4px; color: var(--gold); }
.shot figcaption b.calm { color: var(--holo); }
.shot figcaption b.game { color: var(--good); }
.shot.wide figcaption { font-size: 13px; padding: 50px 20px 16px; }

.lightbox {
  border: 1px solid var(--line-strong); padding: 0; background: #000; max-width: min(1600px, 96vw); width: 96vw;
  color: var(--text);
}
.lightbox::backdrop { background: rgba(1, 2, 6, 0.9); backdrop-filter: blur(4px); }
.lightbox img { display: block; width: 100%; height: auto; max-height: 86vh; object-fit: contain; }
.lightbox p {
  margin: 0; padding: 12px 16px; font-family: var(--display); font-size: 11px; letter-spacing: 0.18em;
  text-transform: uppercase; display: flex; justify-content: space-between; gap: 16px; background: var(--panel-solid);
}
.lightbox p span { color: var(--faint); }

/* --- Planets ---------------------------------------------------------------- */
.planets { display: flex; flex-wrap: wrap; gap: 10px; margin: 0; padding: 0; list-style: none; }
.planets li {
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px 10px 12px;
  border: 1px solid var(--line); background: rgba(10, 16, 30, 0.6);
  font-family: var(--display); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text);
}
.planets li i { width: 14px; height: 14px; border-radius: 50%; display: block; flex: none; box-shadow: inset -3px -2px 0 rgba(0, 0, 0, 0.35); }

/* --- Steps ------------------------------------------------------------------- */
.steps { counter-reset: step; }
.steps .panel { padding-top: 30px; }
.steps .panel h3::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-size: 30px; color: var(--gold); letter-spacing: 0.08em; margin-bottom: 12px;
}

.notice {
  border-left: 2px solid var(--gold); padding: 6px 0 6px 18px; color: var(--dim); font-size: 15px; max-width: 860px;
}

/* --- Forms ------------------------------------------------------------------- */
.page { max-width: 560px; margin: 40px auto 0; }
.page.wide { max-width: 760px; }
.page h1 { font-size: clamp(22px, 3.4vw, 32px); }
form { display: grid; gap: 16px; }
label {
  display: grid; gap: 7px; color: var(--dim);
  font-family: var(--display); font-size: 10px; letter-spacing: 0.24em; text-transform: uppercase;
}
label small { font-family: var(--body); font-size: 13px; letter-spacing: 0; text-transform: none; color: var(--faint); }
input {
  padding: 13px 14px; border: 1px solid var(--line-strong); border-radius: 0; background: rgba(3, 6, 14, 0.85);
  color: var(--text); font: 16px var(--body); letter-spacing: 0.01em; transition: border-color 0.15s, box-shadow 0.15s;
}
input:hover { border-color: var(--holo-dim); }
input:focus { outline: none; border-color: var(--holo); box-shadow: 0 0 0 3px rgba(111, 214, 255, 0.15); }
form .button { justify-self: start; }
.tabs { display: flex; margin-bottom: 26px; border: 1px solid var(--line); background: rgba(3, 6, 14, 0.6); }
.tabs button {
  flex: 1; background: none; border: 0; border-right: 1px solid var(--line); color: var(--dim); cursor: pointer;
  padding: 14px 8px; font-family: var(--display); font-size: 10px; letter-spacing: 0.2em; text-transform: uppercase;
}
.tabs button:last-child { border-right: 0; }
.tabs button:hover { color: var(--text); background: rgba(111, 214, 255, 0.05); }
.tabs button[aria-selected="true"] { color: var(--gold-ink); background: var(--gold); }
.message { min-height: 1.5em; font-size: 15px; }
.message.bad { color: var(--red); }
.message.good { color: var(--good); }
.hidden { display: none !important; }
.danger { margin-top: 40px; }
.danger.panel::before, .danger.panel::after { border-color: var(--red); }
ul.plain { padding-left: 20px; color: var(--dim); }
ul.plain li { margin: 6px 0; }
.prose h2 { margin-top: 34px; }
.prose p { color: var(--dim); }

/* --- Footer ----------------------------------------------------------------- */
body > footer {
  max-width: 1120px; margin: 100px auto 0; padding: 26px 20px 46px; border-top: 1px solid var(--line);
  display: flex; gap: 16px 28px; flex-wrap: wrap; justify-content: space-between; color: var(--faint); font-size: 14px;
}
body > footer nav { display: flex; gap: 20px; }
body > footer a { color: var(--dim); text-decoration: none; }
body > footer a:hover { color: var(--gold-hot); }

@keyframes pulse { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .kicker.live::before { animation: none; }
  .button { transition: none; }
}
@media (max-width: 420px) {
  body > header nav a[href="#play"], body > header nav a[href="/#play"] { display: none; }
}
@media (max-width: 640px) {
  body > header { padding: 16px; }
  .brand { letter-spacing: 0.2em; font-size: 15px; gap: 8px; }
  .brand img { width: 24px; height: 24px; }
  body > header nav { gap: 0; }
  body > header nav a { padding: 8px 6px; letter-spacing: 0.1em; font-size: 10px; }
  main { padding: 0 16px; }
  .hero { min-height: 0; padding-top: 24px; }
  .horizon { height: 220px; }
  .gallery { margin-top: -20px; }
  .shots { grid-template-columns: 1fr 1fr; gap: 8px; }
  .shot, .shot.wide, .shot.wide.right { grid-column: span 2; grid-row: auto; aspect-ratio: 16 / 9; }
  section { margin: 60px 0; }
  .panel { padding: 22px 18px; }
  .button { width: 100%; }
  form .button { justify-self: stretch; }
}
