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

:root {
  --header-footer-bg: linear-gradient(135deg, #0070C9, #054298);
  --main-bg: #022556;
  --accent-gradient: linear-gradient(135deg, #FECE27, #F0671C);
  --hero-bg: linear-gradient(135deg, #0070C9, #054298);
  --heading-color: #FFD27B;
  --main-text-color: #FFFFFF;
  --line-soft: #19CDFF;
}

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

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--main-bg);
  color: var(--main-text-color);
  min-height: 100vh;
  line-height: 1.55;
}

main h1,
main h2,
main h3,
main h4 {
  color: var(--heading-color);
  font-weight: 600;
  letter-spacing: -0.01em;
}

.wrap {
  width: min(1180px, 92%);
  margin: 0 auto;
}

/* ==================== Masthead ==================== */

.masthead {
  background: var(--header-footer-bg);
  border-bottom: 1px solid var(--line-soft);
  position: sticky;
  top: 0;
  z-index: 20;
}

.masthead-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
}

.brandmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex: 0 0 auto;
}

.brandmark img {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.gateway {
  display: flex;
  gap: 10px;
  align-items: center;
}

.gateway-btn {
  padding: 10px 22px;
  border-radius: 2px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.gateway-btn:active {
  transform: translateY(1px);
}

.gateway-btn--ghost {
  background: transparent;
  color: var(--heading-color);
  border: 1px solid var(--line-soft);
}

.gateway-btn--solid {
  background: var(--accent-gradient);
  color: var(--heading-color);
  border: none;
}

.masthead-toggle {
  display: none;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 1px solid var(--line-soft);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
}

.masthead-toggle span,
.masthead-toggle span::before,
.masthead-toggle span::after {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--heading-color);
  position: relative;
}

.masthead-toggle span::before,
.masthead-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
}

.masthead-toggle span::before { top: -6px; }
.masthead-toggle span::after  { top:  6px; }

.masthead-nav {
  border-top: 1px solid var(--line-soft);
}

.masthead-nav-list {
  list-style: none;
  display: flex;
  gap: 32px;
  justify-content: center;
  padding: 14px 0;
  flex-wrap: wrap;
}

.masthead-nav-list a {
  color: var(--heading-color);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s ease;
}

.masthead-nav-list a:hover {
  border-bottom-color: var(--heading-color);
}

/* ==================== Stage (hero canvas + inline games + lede) ==================== */

.stage {
  background: var(--main-bg);
}

.stage-canvas {
  position: relative;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: min(64vh, 560px);
  padding: 64px 0 72px;
  overflow: hidden;
}

.stage-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 13, 11, 0.75) 0%, rgba(15, 13, 11, 0.55) 55%, rgba(15, 13, 11, 0.85) 100%);
  pointer-events: none;
}

.stage-canvas > .wrap {
  position: relative;
  z-index: 1;
}

.stage-crest {
  max-width: 640px;
  margin: 0 auto 0 0;
  text-align: left;
  display: flex;
  flex-direction: column;
  min-height: calc(min(64vh, 560px) - 136px);
}

.stage-headline {
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.1;
  margin-bottom: 22px;
  color: var(--heading-color);
}

.stage-bonus {
  margin: 4px 0 48px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stage-bonus-label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 236, 216, 0.65);
}

.stage-bonus-value {
  font-size: clamp(1.5rem, 2.8vw, 2.1rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--heading-color);
}

.stage-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0 0 22px;
  padding: 0;
  margin-top: auto;
}

.stage-features li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--heading-color);
  font-size: 0.94rem;
  font-weight: 500;
  line-height: 1.3;
  padding: 0;
  background: transparent;
  border: none;
}

.stage-features li::before {
  content: "⭐";
  font-size: 1.25rem;
  line-height: 1;
  flex: 0 0 auto;
}

.stage-features li:nth-child(1)::before { content: "🎁"; }
.stage-features li:nth-child(2)::before { content: "🎰"; }
.stage-features li:nth-child(3)::before { content: "🏆"; }
.stage-features li:nth-child(4)::before { content: "💎"; }

.stage-cta-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.stage-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  border-radius: 2px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.stage-cta:hover {
  transform: translateY(-1px);
}

.stage-cta--solid {
  background: var(--accent-gradient);
  color: var(--heading-color);
  border: none;
}

.stage-cta--ghost {
  background: transparent;
  color: var(--heading-color);
  border: 1px solid var(--heading-color);
}

/* ---------- Games rail inside stage ---------- */

.stage-catalogue {
  padding: 48px 0 24px;
  background: var(--main-bg);
}

.stage-catalogue-head {
  margin-bottom: 22px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.stage-catalogue-label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--heading-color);
  border-bottom: 2px solid var(--heading-color);
  padding-bottom: 6px;
}

.stage-catalogue-rail {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--line-soft) transparent;
}

.stage-catalogue-rail::-webkit-scrollbar {
  height: 8px;
}

.stage-catalogue-rail::-webkit-scrollbar-track {
  background: transparent;
}

.stage-catalogue-rail::-webkit-scrollbar-thumb {
  background: var(--line-soft);
  border-radius: 4px;
}

/* Shared class from build.py — styled inside .stage-catalogue-rail */
.stage-catalogue-rail .game-card {
  flex: 0 0 180px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  padding: 0;
  background: transparent;
  border: none;
}

.stage-catalogue-rail .game-card-media {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid var(--line-soft);
}

.stage-catalogue-rail .game-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.stage-catalogue-rail .game-card:hover .game-card-media img {
  transform: scale(1.04);
}

.stage-catalogue-rail .game-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 13, 11, 0.7);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.stage-catalogue-rail .game-card-overlay .game-play-btn {
  padding: 8px 22px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--heading-color);
  background: var(--accent-gradient);
  border: none;
}

@media (hover: hover) {
  .stage-catalogue-rail .game-card:hover .game-card-overlay {
    opacity: 1;
  }
}

.stage-catalogue-rail .game-title {
  font-size: 0.78rem;
  color: var(--main-text-color);
  letter-spacing: 0.04em;
  text-align: center;
  line-height: 1.35;
  word-break: break-word;
}

/* ---------- Lede (hero-intro) — placed after games, outside image area ---------- */

.stage-lede {
  padding: 24px 0 60px;
  background: var(--main-bg);
}

.stage-lede-inner {
  max-width: 820px;
}

.stage-lede-inner p {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--main-text-color);
  margin-bottom: 16px;
}

.stage-lede-inner p:last-child {
  margin-bottom: 0;
}

/* ==================== Column (long-form content) ==================== */

.column {
  padding: 40px 0 80px;
}

.column-inner {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.02rem;
}

.column-inner h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin: 44px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.column-inner h2:first-child {
  margin-top: 0;
}

.column-inner h3 {
  font-size: clamp(1.15rem, 1.6vw, 1.35rem);
  margin: 32px 0 10px;
}

.column-inner p {
  margin-bottom: 18px;
  line-height: 1.75;
}

.column-inner ul,
.column-inner ol {
  margin: 0 0 20px 22px;
  display: grid;
  gap: 8px;
  line-height: 1.65;
}

.column-inner ul {
  list-style: square;
}

.column-inner img {
  width: 100%;
  max-width: 100%;
  margin: 20px 0;
  display: block;
}

/* Shared classes from build.py */
.table-wrapper {
  overflow-x: auto;
  margin: 0 0 24px;
  border: 1px solid var(--line-soft);
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--heading-color);
  font-size: 0.94rem;
}

.data-table th,
.data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line-soft);
}

.data-table thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  background: rgba(244, 236, 216, 0.04);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

/* ==================== Register (FAQ) ==================== */

.register {
  padding: 0 0 80px;
}

.register-inner {
  max-width: 820px;
  margin: 0 auto;
}

/* Shared class from build.py */
.register-inner .faq-item {
  padding: 20px 0;
  border-top: 1px solid var(--line-soft);
}

.register-inner .faq-item:first-child {
  border-top: 2px solid var(--heading-color);
}

.register-inner .faq-item:last-child {
  border-bottom: 1px solid var(--line-soft);
}

.register-inner .faq-item h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--heading-color);
}

.register-inner .faq-item p {
  color: var(--main-text-color);
  line-height: 1.7;
}

/* ==================== Colophon (footer) ==================== */

.colophon {
  background: var(--header-footer-bg);
  border-top: 1px solid var(--line-soft);
  padding: 44px 0;
}

.colophon-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 32px;
  align-items: start;
}

.colophon-brand {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: flex-start;
}

.colophon-brandmark img {
  height: 44px;
  width: auto;
  max-width: 200px;
  object-fit: contain;
  display: block;
}

.colophon-age {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  border: 1px solid var(--heading-color);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--heading-color);
  letter-spacing: 0.06em;
}

.colophon-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.colophon-nav a {
  color: var(--heading-color);
  text-decoration: none;
  font-size: 0.82rem;
  letter-spacing: 0.08em;
}

.colophon-nav a:hover {
  text-decoration: underline;
}

.colophon-line {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.colophon-disclaimer,
.colophon-copyright {
  font-size: 0.76rem;
  color: var(--main-text-color);
  line-height: 1.6;
}

/* ==================== Responsive ==================== */

@media (max-width: 900px) {
  .colophon-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .masthead-row {
    flex-wrap: wrap;
    gap: 12px;
  }

  .masthead-toggle {
    display: inline-flex;
    order: 2;
    margin-left: auto;
  }

  .gateway {
    width: 100%;
    order: 3;
    justify-content: space-between;
  }

  .gateway-btn {
    flex: 1;
    padding: 12px;
  }

  .masthead-nav {
    display: none;
  }

  .masthead.nav-open .masthead-nav {
    display: block;
  }

  .masthead-nav-list {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }

  .stage-canvas {
    min-height: 480px;
    padding: 48px 0 56px;
  }

  .stage-features {
    gap: 12px 20px;
    margin-bottom: 22px;
  }

  .stage-features li {
    font-size: 0.88rem;
  }

  .stage-features li::before {
    font-size: 1.1rem;
  }

  .stage-catalogue {
    padding: 36px 0 20px;
  }

  .stage-catalogue-rail .game-card {
    flex: 0 0 140px;
  }

  .stage-lede {
    padding: 20px 0 40px;
  }

  .column {
    padding: 32px 0 60px;
  }

  .column-inner {
    font-size: 0.98rem;
  }
}
