/*
 * Static pages (how to play, about; EN and PT). Same palette, fonts and button
 * styles as the game (src/ui/styles.css), but a normal scrolling document.
 */
:root {
  --bg: #05060f;
  --panel: rgba(12, 16, 38, 0.72);
  --panel-solid: #0c1026;
  --line: rgba(130, 170, 255, 0.18);
  --text: #e8eeff;
  --body: #cfd8f5;
  --muted: #9aa6cf;
  --accent: #5ad1ff;
  --accent-2: #b36bff;
  --sun: #ffcf3a;
  --font: 'Exo 2', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Orbitron', 'Exo 2', system-ui, sans-serif;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  color: var(--body);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(ellipse 80% 50% at 85% -10%, rgba(139, 77, 255, 0.22), transparent 70%),
    radial-gradient(ellipse 70% 45% at 0% 20%, rgba(47, 140, 255, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 100% 70%, rgba(255, 122, 26, 0.07), transparent 70%),
    var(--bg);
  background-attachment: fixed;
  overflow-x: hidden;
}

/* A sparse starfield, drawn once behind everything. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff, transparent),
    radial-gradient(1px 1px at 28% 72%, #cfe3ff, transparent),
    radial-gradient(1.5px 1.5px at 44% 34%, #ffd9a8, transparent),
    radial-gradient(1px 1px at 63% 12%, #fff, transparent),
    radial-gradient(1.5px 1.5px at 78% 58%, #b9d8ff, transparent),
    radial-gradient(1px 1px at 90% 86%, #fff, transparent),
    radial-gradient(1px 1px at 8% 92%, #e6d4ff, transparent),
    radial-gradient(1.5px 1.5px at 55% 88%, #fff, transparent);
  background-size: 420px 420px;
}

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

a:hover {
  color: #9be4ff;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

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

.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 10px;
  background: var(--panel-solid);
  border: 1px solid var(--accent);
  color: var(--text);
}

.skip:focus {
  top: 12px;
}

.wrap {
  width: min(960px, 100%);
  margin: 0 auto;
  padding: 0 16px;
}

/* Header & nav ------------------------------------------------------ */

.site-head {
  position: sticky;
  top: 0;
  z-index: 5;
  background: rgba(5, 6, 15, 0.82);
  backdrop-filter: blur(12px) saturate(1.2);
  -webkit-backdrop-filter: blur(12px) saturate(1.2);
  border-bottom: 1px solid var(--line);
}

.head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.brand {
  font-family: var(--display);
  font-weight: 900;
  font-size: 22px;
  letter-spacing: 0.08em;
  text-decoration: none;
  background: linear-gradient(180deg, #ffffff 10%, #9fd8ff 45%, #b98bff 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 10px rgba(120, 170, 255, 0.4));
  white-space: nowrap;
}

.head-row .btn {
  flex: none;
}

.brand span {
  margin-left: 0.12em;
  font-size: 0.6em;
  vertical-align: super;
  background: linear-gradient(135deg, #ffcf3a, #ff7a1a);
  -webkit-background-clip: text;
  background-clip: text;
}

/* Links wrap onto as many rows as they need, so every one (the language switch included) stays visible. */
.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding-bottom: 10px;
  font-size: 14.5px;
}

.nav a {
  padding: 5px 12px;
  /* Fixed line box: the nav keeps its height when Exo 2 replaces the fallback font (no layout shift). */
  line-height: 20px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(40, 56, 110, 0.3);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}

.nav a:hover {
  border-color: rgba(140, 190, 255, 0.5);
  background: rgba(70, 96, 180, 0.4);
}

.nav a[aria-current='page'] {
  border-color: rgba(90, 209, 255, 0.7);
  background: rgba(90, 209, 255, 0.16);
  color: #fff;
}

/* The other-language twin of the current page. */
.nav a.lang {
  margin-left: auto;
  border-style: dashed;
  color: var(--muted);
}

/* Buttons (the game's .btn.primary) ----------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(40, 56, 110, 0.35);
  color: var(--text);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.12s, background 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.btn:hover {
  color: #fff;
  background: rgba(70, 96, 180, 0.45);
  border-color: rgba(140, 190, 255, 0.45);
  transform: translateY(-1px);
}

.btn.primary {
  /* A shade deeper than the game's #2f8cff → #8b4dff so white text passes 4.5:1. */
  background: linear-gradient(135deg, #2563eb, #6d3fd6);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 24px rgba(90, 120, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
}

.btn.primary:hover {
  background: linear-gradient(135deg, #2f6ff5, #7a4ae3);
  box-shadow: 0 8px 30px rgba(110, 140, 255, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn.small {
  min-height: 38px;
  padding: 6px 14px;
  font-size: 14px;
}

.btn.big {
  min-height: 58px;
  padding: 12px 30px;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.btn.big::after {
  content: '\25B6';
  font-size: 0.7em;
}

.btn.small.primary::after {
  content: '\25B6';
  font-size: 0.7em;
}

/* Hero --------------------------------------------------------------- */

.hero {
  padding: 40px 0 8px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  color: var(--text);
  line-height: 1.2;
  text-wrap: balance;
}

h1 {
  margin: 0 0 14px;
  font-family: var(--display);
  font-weight: 900;
  font-size: clamp(30px, 6.4vw, 50px);
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, #ffffff 20%, #b7e3ff 60%, #c9a6ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(120, 170, 255, 0.35));
}

.lead {
  margin: 0 0 22px;
  font-size: clamp(18px, 2.4vw, 21px);
  color: #dfe6ff;
  max-width: 44em;
}

.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

.cta .note {
  font-size: 15px;
  color: var(--muted);
}

/* Content ------------------------------------------------------------ */

main {
  padding-bottom: 32px;
}

.section {
  margin: 28px 0;
  padding: 26px 26px 22px;
  border-radius: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(21px, 3.4vw, 27px);
  letter-spacing: 0.02em;
}

h2::before {
  content: '';
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 12px;
  vertical-align: 0.18em;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent) 60%);
  box-shadow: 0 0 12px var(--accent);
}

h3 {
  margin: 22px 0 6px;
  font-size: 19px;
  font-weight: 700;
}

p {
  margin: 0 0 14px;
}

strong {
  color: var(--text);
}

ul,
ol {
  margin: 0 0 14px;
  padding-left: 22px;
}

li {
  margin: 6px 0;
}

li::marker {
  color: var(--accent);
}

.shot {
  margin: 20px 0 6px;
}

.shot video {
  display: block;
  max-width: 100%;
  height: auto;
}

.shot img,
.shot video {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(90, 120, 255, 0.12);
  background: #0c1026;
}

.shot figcaption {
  margin-top: 8px;
  font-size: 15px;
  color: var(--muted);
}

.hero .shot {
  margin-top: 30px;
}

/* A phone screenshot sits beside text on wide screens. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 26px;
  align-items: start;
}

.split .shot {
  margin-top: 4px;
}

/* Controls ------------------------------------------------------------ */

.keys {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px 16px;
  margin: 8px 0 16px;
  align-items: baseline;
}

.keys dt {
  white-space: nowrap;
  text-align: right;
}

.keys dd {
  margin: 0;
}

kbd {
  display: inline-block;
  min-width: 30px;
  padding: 1px 9px 2px;
  border-radius: 8px;
  border: 1px solid rgba(160, 190, 255, 0.4);
  border-bottom-width: 3px;
  background: linear-gradient(180deg, rgba(60, 80, 150, 0.55), rgba(24, 32, 70, 0.8));
  color: #fff;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  line-height: 1.5;
}

/* Modes & modifiers --------------------------------------------------- */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin: 12px 0 16px;
}

.card {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.035);
}

.card h3 {
  margin: 0 0 4px;
  font-size: 18px;
}

.card p {
  margin: 0;
  font-size: 16.5px;
}

.card .tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  vertical-align: 0.15em;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #1a0d00;
  background: linear-gradient(135deg, #ffcf3a, #ff9a3b);
}

.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
  padding: 0;
  list-style: none;
}

.chips li {
  margin: 0;
  padding: 10px 14px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  font-size: 16.5px;
  line-height: 1.5;
}

.chips .chip {
  display: table;
  margin: 0 0 6px;
}

.chip {
  display: inline-block;
  margin-right: 6px;
  padding: 3px 11px;
  border-radius: 999px;
  border: 1px solid rgba(255, 200, 90, 0.7);
  background: linear-gradient(135deg, rgba(255, 150, 40, 0.3), rgba(255, 70, 160, 0.26));
  color: #fff;
  font-size: 14.5px;
  font-weight: 700;
  white-space: nowrap;
}

/* Timeline (about) ---------------------------------------------------- */

.timeline {
  list-style: none;
  padding: 0;
  margin: 8px 0 14px;
  border-left: 2px solid var(--line);
}

.timeline li {
  position: relative;
  margin: 0 0 18px;
  padding-left: 22px;
}

.timeline li::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 8px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--accent-2) 60%);
  box-shadow: 0 0 10px var(--accent-2);
}

.timeline li:last-child::before {
  background: radial-gradient(circle at 35% 30%, #fff, var(--sun) 60%);
  box-shadow: 0 0 12px var(--sun);
}

.timeline h3 {
  margin: 0 0 4px;
}

/* FAQ ----------------------------------------------------------------- */

.faq h3 {
  margin-top: 20px;
}

.faq p {
  margin-bottom: 8px;
}

/* Closing call to action --------------------------------------------- */

.outro {
  margin: 34px 0 10px;
  padding: 28px 24px;
  border-radius: 22px;
  text-align: center;
  border: 1px solid rgba(90, 209, 255, 0.35);
  background: radial-gradient(ellipse at 50% 0%, rgba(90, 120, 255, 0.28), rgba(12, 16, 38, 0.7) 70%);
}

.outro p {
  margin: 0 0 16px;
  font-size: 19px;
  color: #dfe6ff;
}

/* Footer -------------------------------------------------------------- */

.site-foot {
  margin-top: 24px;
  padding: 22px 0 34px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--muted);
}

.site-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 10px;
}

.site-foot p {
  margin: 0 0 6px;
}

/* Small screens ------------------------------------------------------- */

@media (max-width: 720px) {
  /* On phones the header scrolls away instead of covering a third of the screen. */
  .site-head {
    position: static;
  }

  /* A grid of equal cells: how many rows it takes depends on the link count, not on the font, so
     swapping in the web font can't reflow it. */
  .nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
    gap: 5px;
    font-size: 13.5px;
  }

  .nav a {
    padding: 4px 6px;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav a.lang {
    margin-left: 0;
  }

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

  .split .shot {
    width: min(260px, 70%);
    margin: 6px auto 0;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 17px;
  }

  .hero {
    padding-top: 26px;
  }

  .section {
    padding: 20px 16px 16px;
    border-radius: 18px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .keys {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .keys dt {
    text-align: left;
    margin-top: 10px;
  }

  .btn.big,
  .cta .btn {
    width: 100%;
  }
}

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