/* Visual language matches the in-game main menu and the existing admin
   dashboard: warm amber accents on a near-black background, parchment
   text. Arena-background.png sits behind a tinted overlay so the page
   stays legible regardless of where it falls on the image. */

:root {
  --bg: #0f0f14;
  --panel: #1a1a22;
  --panel-2: rgba(26, 26, 34, 0.85);
  --fg: #f5f2e8;
  --muted: #c8c0a8;
  --muted-soft: #9a9a9a;
  --accent: #ffb000;
  --accent-hover: #ffc840;
  --accent-deep: #c98800;
  --border: #3a3a4a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
}

/* Hero background — single fixed image, dark overlay for legibility. The
   .bg layer is the asset itself; .bg-overlay is a vignette + dim so any
   region of the image works as a text backdrop. */
.bg {
  position: fixed;
  inset: 0;
  background: url("assets/arena-background.png") center/cover no-repeat;
  z-index: -2;
}
.bg-overlay {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.85) 90%),
    linear-gradient(180deg, rgba(15, 15, 20, 0.4) 0%, rgba(15, 15, 20, 0.7) 100%);
  z-index: -1;
}

.hero {
  max-width: 720px;
  margin: 0 auto;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
}

/* Title image — KayKit-style logo. Keep it crisp at any width up to the
   intrinsic size; scale down responsively below that. */
.title {
  max-width: 520px;
  width: 80%;
  height: auto;
  display: block;
  margin: 0 auto 0.5rem;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.6));
}

.tagline {
  margin: 0 0 2.5rem;
  color: var(--muted);
  font-size: 1.15rem;
  letter-spacing: 0.04em;
}
.version {
  display: inline-block;
  margin-left: 0.5rem;
  color: var(--muted-soft);
  font-size: 0.9rem;
}

/* ---------- Download CTAs ---------- */

.downloads {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 2rem 1.75rem 1.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
}

.cta-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.15rem;
  padding: 1.1rem 2.5rem;
  background: var(--accent);
  color: #1a0e00;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.04em;
  transition: background 0.15s, transform 0.1s;
  border: 2px solid var(--accent-deep);
  box-shadow: 0 4px 0 var(--accent-deep), 0 8px 24px rgba(255, 176, 0, 0.25);
  margin-bottom: 1rem;
}
.cta-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}
.cta-primary:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--accent-deep), 0 4px 12px rgba(255, 176, 0, 0.25);
}
.cta-primary .cta-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  opacity: 0.85;
}
.cta-primary .cta-platform {
  font-size: 1.3rem;
  font-weight: 700;
}
.cta-primary.hidden { display: none; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.cta-alt {
  flex: 1 1 140px;
  max-width: 200px;
  padding: 0.75rem 1rem;
  background: rgba(26, 26, 34, 0.6);
  color: var(--fg);
  text-decoration: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color 0.15s, background 0.15s;
}
.cta-alt:hover {
  border-color: var(--accent);
  background: rgba(40, 32, 16, 0.7);
}
.cta-alt-icon {
  color: var(--accent);
  margin-right: 0.35rem;
}

/* When the primary CTA is showing, the matching-OS alt button is dimmed
   so it's clearly the secondary "I'd rather have this one" option. */
.cta-alt.matched {
  opacity: 0.55;
}

.platform-note {
  margin: 1.25rem 0 0;
  color: var(--muted-soft);
  font-size: 0.82rem;
  line-height: 1.5;
}
.platform-note + .platform-note { margin-top: 0.6rem; }
.platform-note code,
.how code {
  background: #000;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
  color: var(--accent);
  font-size: 0.9em;
}

/* ---------- How to play ---------- */

.how {
  margin: 3rem auto 0;
  text-align: left;
  max-width: 480px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.5rem 2rem;
  backdrop-filter: blur(4px);
}
.how h2 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.how ol {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  line-height: 1.7;
}

/* ---------- Credits row (studio + chain attribution) ---------- */

.credits {
  margin: 3rem auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}
.credit-link {
  display: inline-flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity 0.15s, transform 0.15s;
}
.credit-link:hover {
  opacity: 1.0;
  transform: translateY(-1px);
}
.credit-logo {
  display: block;
  height: auto;
}
/* Black Squirrel Studio mark — square-ish PNG; size by height. Not a
   link (just an attribution image), so apply the dimmed opacity directly
   to match the visual weight of the GalaChain mark next to it. */
.credit-logo.bss {
  max-height: 64px;
  width: auto;
  opacity: 0.75;
}
/* GalaChain "Powered by" — wide SVG banner, scales by width for legibility. */
.credit-logo.gala {
  max-width: 200px;
  width: 100%;
  /* Asset is dark-tone for light backgrounds; invert so it reads on
     the dark hero. Slight brightness tweak keeps it from looking like
     pure white text. */
  filter: invert(0.95) brightness(0.95);
}

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

footer {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted-soft);
  font-size: 0.85rem;
}
footer a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--muted-soft);
}
footer a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

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

@media (max-width: 520px) {
  .hero { padding: 2.5rem 1rem 2rem; }
  .downloads { padding: 1.5rem 1.25rem 1.25rem; }
  .cta-primary { padding: 0.9rem 1.5rem; font-size: 1rem; }
  .cta-alt { flex-basis: calc(50% - 0.25rem); }
}
