:root {
  --ink: #eef4ff;
  --muted: #aab5c8;
  --night: #080b12;
  --panel: rgba(18, 25, 38, 0.86);
  --line: rgba(255, 255, 255, 0.12);
  --gold: #f4b942;
  --orange: #ec6b35;
  --cyan: #54d6d0;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--night); }
body {
  margin: 0;
  width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--night);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { font: inherit; }

.header {
  position: fixed;
  z-index: 20;
  inset: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: 0 5vw;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 11, 18, 0.88);
  backdrop-filter: blur(16px);
}
.brand { display: flex; align-items: center; gap: .8rem; font-weight: 700; }
.brand b, h1, h2, h3 { font-family: Orbitron, Inter, ui-sans-serif, system-ui, sans-serif; }
.brand b { color: var(--gold); font-size: 1.25rem; letter-spacing: .08em; }
.header nav { display: flex; align-items: center; gap: 1.6rem; }
.header nav a { color: var(--muted); font-size: .92rem; transition: color .2s ease; }
.header nav a:hover { color: white; }
.pill { padding: .55rem 1rem; border: 1px solid var(--gold); border-radius: 999px; }
.menu { display: none; padding: .5rem; border: 0; background: none; }
.menu i { display: block; width: 24px; height: 2px; margin: 5px; background: white; }

.hero {
  position: relative;
  margin-top: 70px;
  width: 100%;
  background: #080b12;
}
.hero-image {
  display: block;
  width: 100%;
  height: auto;
}
.kicker {
  display: inline-block;
  color: var(--gold);
  font-size: .76rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}
h1 { margin: .7rem 0 1rem; font-size: clamp(2.7rem, 6vw, 5.6rem); line-height: 1.02; letter-spacing: -.04em; }
h1 em { color: var(--gold); font-style: normal; }
.hero-content > p { max-width: 640px; color: #d0d8e5; font-size: 1.08rem; }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.primary { color: #171006; border-color: var(--gold); background: var(--gold); }
.ghost { background: rgba(8, 11, 18, .5); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 3rem; background: var(--line); }
.stats div { display: flex; flex-direction: column; padding: 1rem; background: rgba(8, 11, 18, .8); }
.stats strong { color: var(--gold); font-size: 1.5rem; }
.stats span { color: var(--muted); font-size: .78rem; }

.section { padding: 100px max(6vw, 24px); }
.section, .heading, .worlds, .steps, .roles, .rules { min-width: 0; }
.heading { max-width: 720px; margin-bottom: 3rem; }
h2 { margin: .45rem 0 .7rem; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.12; }
h3 { margin: .5rem 0; }
.heading p, .world p, .steps p, .roles p, .rules p { color: var(--muted); }
.worlds { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.world, .roles article, .steps article, .dice, .rulelist div {
  border: 1px solid var(--line);
  background: var(--panel);
}
.world { min-height: 360px; padding: clamp(1.5rem, 4vw, 3rem); }
.world.quest { border-top: 3px solid var(--gold); }
.world.coqui { border-top: 3px solid var(--cyan); }
.faction-icon {
  display: block;
  width: 112px;
  height: 112px;
  margin-bottom: 1.15rem;
  object-fit: contain;
  object-position: center;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .35));
}
.world ul { padding-left: 1.2rem; color: #cfd7e5; }
.band { background: #0d121d; }
.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; }
.steps article { padding: 1.4rem; }
.steps b, .rulelist b { color: var(--orange); }
.roles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.roles article { padding: 1.5rem; }
.roles article > span { font-size: 2rem; }
.rules { display: grid; grid-template-columns: 1.2fr .8fr; gap: 3rem; align-items: start; }
.rulelist { display: grid; gap: .65rem; margin-top: 2rem; }
.rulelist div { display: flex; gap: 1rem; padding: 1rem 1.2rem; }
.dice { padding: 2rem; }
.dicegrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; margin-top: 1.5rem; }
.dicegrid div { display: flex; flex-direction: column; padding: 1rem; border: 1px solid var(--line); }
.dicegrid strong { color: var(--cyan); font-size: 1.5rem; }
.dicegrid small { color: var(--muted); }
.cta { display: grid; place-items: center; min-height: 540px; text-align: center; background: radial-gradient(circle, rgba(236,107,53,.18), transparent 55%); }
.cta > div { max-width: 760px; }
.centered { justify-content: center; }
.cta small { display: block; margin-top: 1rem; color: var(--muted); }
footer { display: flex; justify-content: space-between; gap: 2rem; padding: 2rem 6vw; border-top: 1px solid var(--line); color: var(--muted); }
footer div { display: flex; flex-direction: column; }
footer p { margin: 0; }
.toast { display: none; }

@media (max-width: 900px) {
  .menu { display: block; }
  .header nav {
    position: absolute;
    inset: 70px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 1.5rem 6vw;
    background: #0b101a;
  }
  .header nav.open { display: flex; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .roles { grid-template-columns: repeat(2, 1fr); }
  .rules { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .brand span { display: none; }
  .hero { margin-top: 70px; }
  .shade { background: linear-gradient(0deg, var(--night) 0%, rgba(5,8,14,.76) 68%, rgba(5,8,14,.35)); }
  .stats, .worlds, .steps, .roles { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .section { padding-block: 72px; }
  h2 { overflow-wrap: anywhere; }
  .dicegrid { grid-template-columns: 1fr; }
  footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
