/* Swarmtide site: one stylesheet for the landing page and the press kit. No web fonts: system faces only. */

:root {
  --sky: #18214e;          /* the key art's sky at its top edge: the hero fades into it */
  --night: #0b0d17;
  --amber: #f4a63a;        /* muzzle-flash amber, the main button */
  --amber-hi: #ffc266;
  --steel: #c9d2e3;
  --hero-ink: #eef2fa;

  --bg: #0d1019;
  --panel: #151a29;
  --ink: #e6eaf3;
  --muted: #9aa5bb;
  --rule: #263049;
  --link: #ffc266;

  --display: "Bahnschrift", "DIN Alternate", "Avenir Next Condensed", "Roboto Condensed", "Arial Narrow",
             system-ui, sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #eceff4;
    --panel: #ffffff;
    --ink: #161b28;
    --muted: #4c566b;
    --rule: #cfd6e2;
    --link: #8a4b00;
  }
}
:root[data-theme="light"] {
  --bg: #eceff4; --panel: #ffffff; --ink: #161b28; --muted: #4c566b; --rule: #cfd6e2; --link: #8a4b00;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/1.6 var(--text);
}
img { display: block; max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 0.18em; }
a:focus-visible, .btn:focus-visible { outline: 3px solid var(--amber-hi); outline-offset: 3px; }

/* ---------- Hero (phone first: logo in the sky, the art tucked under it, the words over the art's foot) ---------- */

.hero {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  background: linear-gradient(to bottom, var(--sky) 0, var(--sky) 35%, var(--night) 80%);
  color: var(--hero-ink);
  overflow: hidden;
  padding-bottom: max(26px, env(safe-area-inset-bottom));
}
.hero-content { display: contents; }

.logo {
  order: 1;
  position: relative;
  z-index: 2;
  margin: 0 auto;
  padding-top: max(18px, env(safe-area-inset-top));
  width: min(78vw, 360px);
}
.logo img { width: 100%; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.55)); }

.hero-art {
  order: 2;
  position: relative;
  z-index: 0;
  display: block;
  margin-top: calc(-1 * min(22vw, 120px));
}
.hero-art img {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 74svh;
  object-fit: cover;
  object-position: 50% 30%;
  /* the painted sky fades into the flat sky colour behind the logo */
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
          mask-image: linear-gradient(to bottom, transparent 0, #000 16%);
}
/* darkens the creatures behind the words */
.hero-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 58%, rgba(11, 13, 23, 0.7) 78%, var(--night) 100%);
  pointer-events: none;
}

.pitch {
  order: 3;
  position: relative;
  z-index: 1;
  margin-top: calc(-1 * min(30vw, 22svh));
  padding: 0 16px;
  text-align: center;
}
.line {
  margin: 0 auto;
  max-width: 24ch;
  font: 600 clamp(1.3rem, 5.6vw, 1.75rem)/1.2 var(--display);
  letter-spacing: 0.01em;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9);
}
.soon {
  margin: 0.5em 0 0;
  font: 500 1rem/1.3 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* Buttons. data-primary on .cta says which one leads; the other is the second button, or hidden. */
.cta {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin: 18px auto 0;
  max-width: 340px;
}
.btn {
  display: block;
  padding: 14px 22px;
  border-radius: 6px;
  font: 700 1.08rem/1.2 var(--display);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: center;
  text-decoration: none;
  color: var(--hero-ink);
  border: 2px solid rgba(201, 210, 227, 0.55);
  background: rgba(11, 13, 23, 0.55);
  transition: background-color 120ms, border-color 120ms, transform 120ms;
}
.btn:hover { border-color: var(--steel); background: rgba(11, 13, 23, 0.8); }
.cta[data-primary="discord"] .btn-steam { display: none; }
.cta[data-primary="discord"] .btn-discord,
.cta[data-primary="steam"] .btn-steam {
  order: -1;
  color: #1a1206;
  background: var(--amber);
  border-color: var(--amber);
  box-shadow: 0 6px 22px rgba(244, 166, 58, 0.3);
}
.cta[data-primary="discord"] .btn-discord:hover,
.cta[data-primary="steam"] .btn-steam:hover { background: var(--amber-hi); border-color: var(--amber-hi); }
.btn:active { transform: translateY(1px); }

.socials {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  margin-top: 16px;
}
.socials a {
  padding: 8px 10px;
  color: var(--steel);
  font: 600 0.92rem/1 var(--display);
  letter-spacing: 0.05em;
  text-decoration: none;
  border-radius: 4px;
}
.socials a:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }

/* ---------- Wide screens: the whole 16:9 scene, logo and words in the sky on the right ---------- */

@media (min-width: 900px) and (min-aspect-ratio: 5/4) {
  .hero {
    min-height: min(100svh, 56.25vw);
    padding-bottom: 0;
    background: var(--night);
  }
  .hero-art { position: absolute; inset: 0; margin: 0; z-index: -1; }
  .hero-art img {
    width: 100%;
    height: 100%;
    max-height: none;
    aspect-ratio: auto;
    object-position: 40% 40%;
    -webkit-mask-image: none;
            mask-image: none;
  }
  .hero-art::after {
    background:
      linear-gradient(to left, rgba(9, 10, 22, 0.86) 0, rgba(9, 10, 22, 0.66) 28%, rgba(9, 10, 22, 0.25) 42%, transparent 54%),
      linear-gradient(to bottom, transparent 75%, rgba(9, 10, 20, 0.55) 100%);
  }
  .hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    width: min(44vw, 560px);
    margin-left: auto;
    padding: 5vh 5vw 5vh 0;
  }
  .logo { width: min(100%, 420px); padding-top: 0; }
  .pitch { margin-top: 16px; padding: 0; }
  .cta { flex-direction: row; justify-content: center; max-width: none; }
  .btn { padding: 14px 26px; }
}

/* ---------- Below the hero ---------- */

main, .foot, .press-page { padding: 0 16px; }
.about {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 0 36px;
}
h2 {
  margin: 0 0 0.6em;
  font: 700 1.05rem/1.2 var(--display);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.about p { margin: 0; font-size: 1.12rem; }

.foot {
  max-width: 680px;
  margin: 0 auto;
  padding-top: 24px;
  padding-bottom: max(40px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.95rem;
}
.foot p { margin: 0 0 0.9em; }
.foot .press { color: var(--ink); font-size: 1.02rem; }
.disclosure { font-size: 0.88rem; }
.studio { font-size: 0.85rem; }

/* ---------- Press kit ---------- */

.press-page { max-width: 900px; margin: 0 auto; padding-top: 28px; }
.press-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.press-top .back { font-size: 0.95rem; }
.press-top img { width: 180px; }
.press-page h1 { margin: 28px 0 8px; font: 700 clamp(1.6rem, 6vw, 2.2rem)/1.15 var(--display); letter-spacing: 0.02em; }
.press-page section { margin: 36px 0; }
.press-page p { margin: 0 0 0.9em; }

.facts { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.facts th, .facts td { text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--rule); }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 34%; font-weight: 600; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; padding: 0; margin: 0; list-style: none; }
.grid li { background: var(--panel); border: 1px solid var(--rule); border-radius: 8px; overflow: hidden; }
.grid a { display: block; color: inherit; text-decoration: none; }
.grid .thumb { aspect-ratio: 16 / 10; background: var(--night); display: flex; align-items: center; justify-content: center; }
.grid .thumb img { width: 100%; height: 100%; object-fit: contain; }
.grid .cap { padding: 10px 14px 12px; font-size: 0.92rem; }
.grid .cap strong { display: block; color: var(--ink); }
.grid .cap span { color: var(--muted); }
.grid a:hover strong { color: var(--link); text-decoration: underline; }

.press-page .foot { max-width: none; padding-left: 0; padding-right: 0; }
