/*
 * The site's pages (about, how to play, classes, bosses, updates, privacy,
 * terms): the game's own look. Same tokens as src/css/base-hud.css, the
 * hub's bordered buttons and panels, Chakra Petch, the logo's cyan glow.
 */
@font-face {
  font-family: "Chakra Petch";
  font-weight: 500;
  font-display: swap;
  src: url("fonts/chakra-petch-latin-500-normal.woff2") format("woff2");
}

@font-face {
  font-family: "Chakra Petch";
  font-weight: 700;
  font-display: swap;
  src: url("fonts/chakra-petch-latin-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0b0e1a;
  --ui-panel: rgba(14, 18, 36, 0.86);
  --ui-border: #2a3358;
  --ui-accent: #4de1ff;
  --ui-text: #eef1ff;
  --ui-muted: #8a93b8;
  --core-glow: #7fe8ff;
  --gold: #ffc93c;
  --danger: #ff2e4d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100dvh;
  background:
    radial-gradient(
      60rem 40rem at 10% -10%,
      rgba(77, 225, 255, 0.1),
      transparent 60%
    ),
    radial-gradient(
      50rem 40rem at 110% 30%,
      rgba(166, 107, 255, 0.08),
      transparent 60%
    ),
    var(--bg);
  background-attachment: fixed;
  color: var(--ui-text);
  font:
    500 17px/1.6 "Chakra Petch",
    system-ui,
    sans-serif;
}

a {
  color: var(--ui-accent);
}

a:focus-visible,
.btn:focus-visible {
  outline: 2px solid var(--ui-accent);
  outline-offset: 2px;
}

/* The menu: the hub's top buttons. */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 12px max(16px, env(safe-area-inset-left));
  background: rgba(11, 14, 26, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 2px solid var(--ui-border);
}

.site-nav .brand {
  margin-right: auto;
  color: var(--ui-text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-shadow: 0 0 14px rgba(77, 225, 255, 0.6);
}

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--ui-border);
  border-radius: 10px;
  color: var(--ui-text);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
  transition: border-color 120ms;
}

.btn:hover,
.btn[aria-current="page"] {
  border-color: var(--ui-accent);
}

.btn.primary {
  background: var(--ui-accent);
  border-color: var(--ui-accent);
  color: var(--bg);
  box-shadow: 0 0 18px rgba(77, 225, 255, 0.45);
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px 20px 64px;
}

main.narrow {
  max-width: 780px;
}

h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.15;
  text-transform: uppercase;
  text-shadow: 0 0 22px rgba(77, 225, 255, 0.55);
  text-wrap: balance;
}

h2 {
  margin: 48px 0 14px;
  color: var(--core-glow);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h3 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

p,
li {
  text-wrap: pretty;
}

.lead {
  max-width: 760px;
  color: #c9cff0;
  font-size: 19px;
}

.muted,
.updated {
  color: var(--ui-muted);
  font-size: 15px;
}

li + li {
  margin-top: 0.5em;
}

/* The hub's panels. */
.panel {
  padding: 20px 24px;
  background: var(--ui-panel);
  border: 2px solid var(--ui-border);
  border-radius: 12px;
}

/* Cards with a live sprite (enemies, bosses, classes). */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.card {
  --c: var(--ui-accent);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px 18px;
  background: var(--ui-panel);
  border: 2px solid var(--ui-border);
  border-radius: 12px;
  transition: border-color 120ms;
}

.card:hover {
  border-color: var(--c);
}

.card h3 {
  color: var(--c);
  text-shadow: 0 0 12px color-mix(in srgb, var(--c) 55%, transparent);
}

.card p {
  margin: 0;
  color: #c9cff0;
  font-size: 15px;
  line-height: 1.5;
}

.sprite {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  margin-bottom: 6px;
  border-radius: 8px;
  background: radial-gradient(
    circle closest-side,
    color-mix(in srgb, var(--c) 14%, transparent),
    transparent
  );
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 1px 8px;
  border: 1px solid var(--ui-border);
  border-radius: 6px;
  color: var(--ui-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Bosses: big cards, sprite beside the text. */
.boss {
  display: grid;
  grid-template-columns: minmax(180px, 300px) 1fr;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
}

.boss .sprite {
  margin: 0;
}

.boss p {
  font-size: 17px;
}

@media (max-width: 640px) {
  .boss {
    grid-template-columns: 1fr;
  }
}

/* Keys, as in the game's key hints. */
kbd {
  display: inline-block;
  min-width: 28px;
  padding: 1px 7px;
  border: 2px solid var(--ui-border);
  border-radius: 6px;
  background: rgba(22, 28, 51, 0.9);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--ui-border);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--core-glow);
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: none;
}

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  padding: 0;
  list-style: none;
}

.steps li {
  margin: 0;
}

.steps strong {
  display: block;
  margin-bottom: 4px;
  color: var(--core-glow);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Updates: a timeline. */
.release {
  position: relative;
  margin: 0 0 20px;
  padding-left: 22px;
  border-left: 2px solid var(--ui-border);
}

.release::before {
  content: "";
  position: absolute;
  top: 6px;
  left: -7px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--ui-accent);
  box-shadow: 0 0 10px var(--ui-accent);
}

.release h2 {
  margin: 0 0 8px;
}

.hero-shot {
  width: 100%;
  height: auto;
  margin: 24px 0 8px;
  border: 2px solid var(--ui-border);
  border-radius: 12px;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.cta .btn {
  min-height: 52px;
  padding: 0 28px;
  font-size: 16px;
}

.site-footer {
  margin-top: 56px;
  padding-top: 16px;
  border-top: 2px solid var(--ui-border);
  color: var(--ui-muted);
  font-size: 15px;
}

/* Phones: a menu that scrolls away, two cards a row. */
@media (max-width: 640px) {
  .site-nav {
    position: static;
    gap: 6px;
  }

  .site-nav .brand {
    flex-basis: 100%;
  }

  .btn {
    min-height: 40px;
    padding: 0 10px;
    font-size: 12px;
  }

  main {
    padding-top: 24px;
  }

  .cards {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .card {
    padding: 10px 12px 14px;
  }
}

/* Inside the game's window (?embed=1): the game shows its own tabs. */
.embed .site-nav,
.embed .site-footer,
.embed .cta {
  display: none;
}

.embed main {
  padding-top: 24px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card {
    transition: none;
  }
}
