:root {
  --bg: #0b0a08;
  --bg-alt: #111009;
  --ink: #ffffff;
  --ink-dim: #b3b3b3;
  --gold: #af9128;
  --gold-bright: #c9a83e;
  --line: color-mix(in srgb, var(--ink) 18%, transparent);
  --bg-scrim-strong: color-mix(in srgb, var(--bg) 82%, transparent);
  --bg-scrim-soft: color-mix(in srgb, var(--bg) 70%, transparent);
  --gold-glow: color-mix(in srgb, var(--gold) 14%, transparent);
  --serif: 'Cinzel', serif;
  --sans: 'Literata', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 28px;
}

.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.035;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Full-width banners */
.full-banner {
  width: 100%;
  height: 420px;
  background-color: var(--bg-alt);
  background-size: cover;
  background-position: center;
}

.full-banner--video {
  position: relative;
  height: auto;
  aspect-ratio: 21 / 9;
  background-color: #000;
}

.full-banner--video iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-scrim-strong);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  letter-spacing: 0.02em;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.brand-name {
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--ink-dim);
}

.site-nav a:hover { color: var(--gold-bright); }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  flex-direction: column;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.mobile-nav:not([hidden]) { display: flex; }

.mobile-nav a {
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-dim);
}

.mobile-nav a:hover,
.mobile-nav a:active { color: var(--gold-bright); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 26px;
  border-radius: 2px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  border: 1px solid transparent;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.btn-small { padding: 9px 18px; font-size: 12px; }

.btn-primary {
  background: linear-gradient(135deg, var(--gold-bright), var(--gold));
  color: #ffffff;
}
.btn-primary:hover { transform: translateY(-2px); }

.btn-ghost {
  border-color: var(--line);
  color: var(--ink);
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bright); }

/* Hero */
.hero {
  position: relative;
  padding: 160px 0 120px;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 50% at 50% 0%, var(--gold-glow), transparent 70%),
    linear-gradient(180deg, #0b0a08 0%, #0e0c09 100%);
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, var(--bg) 100%),
    repeating-linear-gradient(115deg, rgba(175,145,40,0.06) 0 2px, transparent 2px 140px);
  pointer-events: none;
}

.hero-inner { position: relative; }

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin: 0 0 22px;
}

.hero h1 {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.12;
  margin: 0 0 26px;
  font-weight: 600;
}

.hero h1 .accent { color: var(--gold-bright); }

.hero-sub {
  max-width: 620px;
  margin: 0 auto 42px;
  color: var(--ink-dim);
  font-size: 17px;
}

.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin-bottom: 72px;
  flex-wrap: wrap;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 64px;
  flex-wrap: wrap;
}

.stat { display: flex; flex-direction: column; gap: 4px; }

.stat-num {
  font-family: var(--serif);
  font-size: 30px;
  color: var(--gold-bright);
}

.stat-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* Sections */
.section { padding: 110px 0; }
.section-alt { background: var(--bg-alt); }

.section-head {
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
}

.section-head h2 {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 40px);
  margin: 8px 0 14px;
  font-weight: 600;
}

.section-sub { color: var(--ink-dim); font-size: 15.5px; margin: 0; }

/* Section feature (widescreen embed) */
.section-feature { margin-bottom: 26px; }

.section-feature-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 26px;
}

.section-feature-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #000;
}

.section-feature-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}

.world-card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-alt);
  transition: transform 0.25s ease, border-color 0.25s ease;
  opacity: 0;
  transform: translateY(18px);
}

.world-card.is-visible { opacity: 1; transform: translateY(0); }

.world-card:hover {
  transform: translateY(-6px);
  border-color: var(--gold);
}

.world-card--soon { cursor: default; }
.world-card--soon:hover { transform: none; border-color: var(--line); }

.poster--image {
  background-size: cover;
  background-position: center;
}

.coming-soon {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1;
  padding: 5px 11px;
  border: 1px solid var(--gold);
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-bright);
  background: var(--bg-scrim-soft);
}

.poster {
  position: relative;
  aspect-ratio: 3 / 4;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
}

.poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.75) 100%);
}

.poster--embed {
  padding: 0;
  aspect-ratio: 9 / 16;
  background: #000;
}

.poster--embed::after { content: none; }

.poster--embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.card-link {
  color: var(--gold-bright);
  white-space: nowrap;
}

.card-link:hover { color: var(--ink); }

.poster-tag {
  position: relative;
  z-index: 1;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 8px;
}

.poster-title {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: 21px;
  line-height: 1.25;
  font-weight: 600;
}

.card-desc {
  margin: 0;
  padding: 16px 20px 20px;
  font-size: 13.5px;
  color: var(--ink-dim);
}

/* Poster theme gradients */
[data-theme="scifi-1"] .poster { background: linear-gradient(155deg, #142238, #3a1f52); }
[data-theme="scifi-2"] .poster { background: linear-gradient(155deg, #16233a, #4a1f2e); }
[data-theme="scifi-3"] .poster { background: linear-gradient(155deg, #131c33, #2a3a5c); }
[data-theme="scifi-4"] .poster { background: linear-gradient(155deg, #1c2f3a, #123a4a); }
[data-theme="primal"] .poster { background: linear-gradient(155deg, #2a2312, #3d3418); }
[data-theme="gothic"] .poster { background: linear-gradient(155deg, #1a1414, #38151f); }
[data-theme="period"] .poster { background: linear-gradient(155deg, #241a12, #4a2e1a); }
[data-theme="western"] .poster { background: linear-gradient(155deg, #241810, #4a2a14); }
[data-theme="andean"] .poster { background: linear-gradient(155deg, #2a1a14, #513a1e); }
[data-theme="myth-1"] .poster { background: linear-gradient(155deg, #1c1420, #3a1530); }
[data-theme="myth-2"] .poster { background: linear-gradient(155deg, #101d2a, #123a4e); }
[data-theme="myth-3"] .poster { background: linear-gradient(155deg, #1a1420, #2e1a3c); }
[data-theme="myth-4"] .poster { background: linear-gradient(155deg, #26241c, #4a4530); }
[data-theme="myth-5"] .poster { background: linear-gradient(155deg, #2a2412, #5c4a1a); }
[data-theme="myth-6"] .poster { background: linear-gradient(155deg, #2a1a12, #5c2e14); }
[data-theme="lit-1"] .poster { background: linear-gradient(155deg, #1e1a14, #3a2e1e); }
[data-theme="lit-2"] .poster { background: linear-gradient(155deg, #182016, #2a3a24); }
[data-theme="lit-3"] .poster { background: linear-gradient(155deg, #16201a, #1e3a26); }
[data-theme="lit-4"] .poster { background: linear-gradient(155deg, #201814, #3e2a1a); }
[data-theme="lit-5"] .poster { background: linear-gradient(155deg, #1a1a20, #2e2e42); }

/* Powered by */
.powered-by { padding: 64px 0; text-align: center; }
.powered-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 16px;
}
.powered-logos {
  font-family: var(--serif);
  font-size: 18px;
  color: var(--gold-bright);
}
.powered-logos .dot { color: var(--ink-dim); margin: 0 18px; }
.powered-logos a:hover { color: var(--ink); }

/* Community */
.community-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.community-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: 4px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.community-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
}

.community-title {
  display: block;
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 600;
  color: var(--gold-bright);
}

.community-desc { font-size: 13.5px; color: var(--ink-dim); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 22px;
  font-size: 13px;
  color: var(--ink-dim);
}

.footer-links a:hover { color: var(--gold-bright); }

.footer-copy {
  font-size: 12px;
  color: var(--ink-dim);
  opacity: 0.7;
  margin: 0;
}

/* Arcade — one wide panel rather than a lone card in the 3-up grid.
   Also carries .world-card so it picks up the reveal observer and the
   reduced-motion reset for free. */
.arcade-card {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.arcade-art {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 260px;
  padding: 24px;
  background: linear-gradient(155deg, #2c0d07, #7d2c10);
}

/* Scanline wash, so the panel reads as a screen without needing artwork. */
.arcade-art::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.22) 0 2px,
    rgba(0, 0, 0, 0) 2px 4px
  );
  pointer-events: none;
}

.arcade-badge {
  position: relative;
  z-index: 1;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 8px;
}

.arcade-wordmark {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f2cf72;
  line-height: 1.1;
}

.arcade-tagline {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.72);
}

.arcade-copy {
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.arcade-copy h3 {
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 0.04em;
  margin: 0;
  color: var(--ink);
}

.arcade-copy p {
  margin: 0;
  font-size: 14px;
  color: var(--ink-dim);
  line-height: 1.65;
}

.arcade-meta {
  font-size: 12.5px !important;
  letter-spacing: 0.04em;
  opacity: 0.8;
}

.arcade-copy .card-link { margin-top: 2px; }

/* Responsive */
@media (max-width: 900px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .community-grid { grid-template-columns: repeat(2, 1fr); }
  .site-nav { display: none; }
  .nav-toggle { display: flex; }
}

@media (min-width: 901px) {
  .mobile-nav { display: none !important; }
}

@media (max-width: 640px) {
  .header-inner {
    flex-wrap: wrap;
    height: auto;
    padding: 14px 0;
    row-gap: 12px;
    justify-content: center;
  }
  .brand { order: 1; }
  .header-actions {
    order: 2;
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .card-grid { grid-template-columns: 1fr; }
  .community-grid { grid-template-columns: 1fr; }
  .section-feature-grid { grid-template-columns: 1fr; }
  .arcade-card { grid-template-columns: 1fr; }
  .arcade-art { min-height: 190px; }
  .hero { padding: 130px 0 90px; }
  .stats { gap: 36px; }
  .full-banner { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
  .world-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
  html { scroll-behavior: auto; }
}
