/* Palette pulled from the game's UI/menu_theme.tres and nebula shader */
:root {
  --bg-deep: #030510;
  --text: #b8dbff;
  --text-bright: #e6f5ff;
  --accent: #9eccff;
  --border: #73b8ff;
  --border-soft: rgba(140, 204, 255, 0.35);
  --panel: rgba(20, 31, 56, 0.72);
  --panel-edge: rgba(28, 66, 128, 0.55);
  --glow: rgba(71, 184, 255, 0.45);

  --font-display: "Waukegan", "Fira Sans Condensed", system-ui, sans-serif;
  --font-body: "Fira Sans Condensed", "Arial Narrow", system-ui, sans-serif;
}

@font-face {
  font-family: "Waukegan";
  src: url("../assets/fonts/Waukegan.ttf") format("truetype");
  font-display: swap;
}

@font-face {
  font-family: "Fira Sans Condensed";
  src: url("../assets/fonts/FiraSansCondensed-Regular.otf") format("opentype");
  font-weight: 400;
  font-display: swap;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg-deep);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.125rem;
  line-height: 1.6;
}

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

/* ---------- Background video ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  background: var(--bg-deep) url("../assets/img/menu-poster.jpg") center / cover no-repeat;
}

.backdrop__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.backdrop__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 5, 16, 0.78) 0%, rgba(3, 5, 16, 0.35) 55%, rgba(3, 5, 16, 0.2) 100%),
    linear-gradient(180deg, rgba(3, 5, 16, 0.55) 0%, rgba(3, 5, 16, 0) 30%, rgba(3, 5, 16, 0) 70%, rgba(3, 5, 16, 0.75) 100%);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem 0;
}

.brand img {
  width: clamp(180px, 28vw, 340px);
  filter: drop-shadow(0 4px 18px rgba(0, 0, 0, 0.6));
}

/* ---------- Game section ---------- */
main {
  flex: 1;
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) 1rem;
}

.game {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
  width: 100%;
}

.game__info,
.teaser {
  background: var(--panel);
  border: 1px solid var(--border-soft);
  border-left: 3px solid var(--border);
  border-radius: 4px;
  padding: clamp(1.25rem, 3vw, 2.25rem);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--panel-edge);
}

.game__title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  line-height: 1.05;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-bright);
  text-shadow: 0 0 24px var(--glow);
}

.game__title { margin-bottom: 1.25rem; }

/* ---------- Player modes ---------- */
.modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem 2.5rem;
  margin: 0.5rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.modes__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-bright);
}

.modes__icon {
  height: 2.25rem;
  width: auto;
  fill: var(--accent);
  filter: drop-shadow(0 0 6px var(--glow));
}

.game__blurb p { margin: 0 0 1em; }
.game__blurb p:first-child { color: var(--text-bright); font-size: 1.2em; line-height: 1.45; }

/* ---------- Steam button ---------- */
.btn-steam {
  align-items: center;
  gap: 0.75rem;
  display: flex;
  width: fit-content;
  margin: 0.5rem auto 0;
  padding: 0.85rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-bright);
  background: linear-gradient(180deg, rgba(71, 140, 230, 0.55), rgba(28, 66, 128, 0.75));
  border: 1px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 0 0 0 var(--glow);
  transition: box-shadow 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.btn-steam:hover,
.btn-steam:focus-visible {
  background: linear-gradient(180deg, rgba(100, 170, 255, 0.7), rgba(40, 90, 170, 0.85));
  box-shadow: 0 0 24px 2px var(--glow);
  transform: translateY(-1px);
}

.btn-steam:focus-visible { outline: 2px solid var(--text-bright); outline-offset: 3px; }

.btn-steam__icon { width: 1.5em; height: 1.5em; flex: none; }

/* Pre-launch: no link, greyed out, with a stamp across it. */
.btn-steam.is-soon {
  position: relative;
  cursor: default;
  color: rgba(200, 210, 225, 0.55);
  background: linear-gradient(180deg, rgba(90, 98, 112, 0.55), rgba(45, 50, 60, 0.75));
  border-color: rgba(150, 160, 175, 0.45);
  box-shadow: none;
  transform: none;
}

.btn-steam__soon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  display: flex;
  align-items: center;
  gap: 0.5em;
  padding: 0.2rem 1rem 0.2rem 0.7rem;
  white-space: nowrap;
  font-size: 1.2em;
  letter-spacing: 0.08em;
  color: var(--text-bright);
  background: rgba(28, 66, 128, 0.92);
  border: 2px solid var(--border);
  border-radius: 3px;
  box-shadow: 0 0 18px var(--glow), 0 4px 12px rgba(0, 0, 0, 0.6);
}

.btn-steam__soon .btn-steam__icon { width: 1.15em; height: 1.15em; }

/* ---------- Carrier art ---------- */
.game__art { margin: 0; }

.game__art img {
  width: 100%;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.7)) drop-shadow(0 0 30px rgba(71, 140, 255, 0.18));
}

/* All ships share one grid cell and crossfade. Every image is the same 1400x800 canvas,
   so the box never changes size between ships. */
.fleet__stage { display: grid; grid-template-columns: minmax(0, 1fr); }

.fleet__ship {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateX(3%) scale(0.98);
  transition: opacity 1.2s ease, transform 1.6s ease;
}

.fleet__ship.is-active {
  opacity: 1;
  transform: none;
}

.game__art figcaption {
  margin-top: 0.5rem;
  text-align: right;
  font-family: var(--font-display);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.8;
}

/* ---------- Footer ---------- */
/* Three columns so the teaser sits bottom left while the copyright stays centred. */
.site-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 1rem;
  padding: 1rem;
  font-size: 0.9rem;
  color: rgba(184, 219, 255, 0.6);
}

.site-footer__copy {
  grid-column: 2;
  margin: 0;
  text-align: center;
}

/* Small panel in the blurb box style, linking to the about page. */
.teaser {
  grid-column: 1;
  justify-self: start;
  padding: 0.75rem 1.25rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-bright);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.teaser:hover,
.teaser:focus-visible {
  border-color: var(--border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--panel-edge), 0 0 20px var(--glow);
}

.teaser:focus-visible { outline: 2px solid var(--text-bright); outline-offset: 3px; }

/* ---------- About page: plain black, image left, blurb right ---------- */
.page-about { background: #000; }

.game--reverse { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }

@media (min-width: 900px) {
  .game--reverse .game__art { order: -1; }
}

.about__shot img {
  border: 1px solid var(--border-soft);
  border-radius: 4px;
}

.about__shot figcaption { text-align: left; }

/* ---------- Small screens: stack, blurb first ---------- */
@media (max-width: 899px) {
  main { align-items: flex-start; }
  .game { grid-template-columns: 1fr; }
  .game__art { max-width: 640px; margin: 0 auto; }
  .game--reverse .game__info { width: 100%; max-width: 640px; margin: 0 auto; }
  .game__art figcaption { text-align: center; }
  .backdrop__shade { background: rgba(3, 5, 16, 0.6); }
  .btn-steam { width: 100%; justify-content: center; }
  .site-footer { grid-template-columns: 1fr; justify-items: center; }
  .teaser { justify-self: center; }
  .site-footer__copy { grid-column: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .backdrop__video { display: none; }
  .btn-steam,
  .fleet__ship { transition: none; transform: none; }
}
