/* VoxelMapper — Kaboom Golden Voxel site chrome (landing, login, register). */

:root {
  --bg: #07080c;
  --ink: #f3ead2;
  --muted: #b8a888;
  --gold: #ffd34d;
  --gold-deep: #c9a227;
  --gold-hot: #ffe680;
  --kaboom: #ff6a12;
  --panel: rgba(10, 12, 16, 0.78);
  --line: rgba(255, 211, 77, 0.32);
  --danger: #ff6b6b;
  --ok: #7dffb0;
}

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

html, body {
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Segoe UI", system-ui, sans-serif;
}

img { max-width: 100%; display: block; }
a { color: var(--gold); }
button, input { font: inherit; }

.hidden { display: none !important; }

/* ---------- shared nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 28px;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0.92), rgba(7, 8, 12, 0.62));
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--gold-hot);
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 14px;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(255, 200, 40, 0.55));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.nav-links a,
.auth-bar-btn {
  color: #efe3c0;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
}

.nav-links a:hover,
.auth-bar-btn:hover {
  border-color: var(--line);
  color: var(--gold-hot);
}

.btn-gold,
.auth-bar-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid #ffe9a0;
  background: linear-gradient(180deg, #ffe27a 0%, #c9a227 58%, #8a6a12 100%);
  color: #1a1408 !important;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 0 0 1px #6a4e08, 0 8px 24px rgba(201, 162, 39, 0.35);
}

.btn-gold:hover,
.auth-bar-cta:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255, 211, 77, 0.08);
  color: var(--gold-hot);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
}

.btn-ghost:hover { background: rgba(255, 211, 77, 0.16); }

.auth-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-bar-name { font-size: 13px; color: var(--muted); }

/* ---------- landing ---------- */

.hero {
  position: relative;
  min-height: min(92vh, 920px);
  display: grid;
  align-items: end;
  overflow: hidden;
  isolation: isolate;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.hero-media img,
.hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.hero-movie {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-poster {
  position: absolute;
  inset: 0;
}

.hero-grain {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9  0 0 0 0 0.7  0 0 0 0 0.2  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 180px 180px;
  animation: hero-grain 0.8s steps(4) infinite;
}

@keyframes hero-grain {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-12px, 8px); }
  50% { transform: translate(8px, -10px); }
  75% { transform: translate(-6px, -4px); }
  100% { transform: translate(0, 0); }
}

.landing-music {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.hero-sound {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 3;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(7, 8, 12, 0.55);
  color: var(--gold-hot);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.hero-sound:hover,
.hero-sound[aria-pressed="true"] {
  background: rgba(255, 211, 77, 0.16);
  color: var(--gold);
}

.hero-sound.is-waiting {
  animation: hero-sound-pulse 1.4s ease-in-out infinite;
}

@keyframes hero-sound-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 211, 77, 0.0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 211, 77, 0.22); }
}

@media (prefers-reduced-motion: reduce) {
  .hero-movie,
  .hero-grain { display: none; }
  .hero-sound.is-waiting,
  .kaboom-stamp { animation: none; }
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(180deg, rgba(7, 8, 12, 0.18) 0%, rgba(7, 8, 12, 0.22) 42%, rgba(7, 8, 12, 0.92) 100%),
    radial-gradient(ellipse at 70% 35%, rgba(255, 140, 20, 0.28), transparent 55%);
}

.hero-copy {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto 64px;
}

.kaboom-stamp {
  display: inline-block;
  font-size: clamp(28px, 6vw, 72px);
  font-weight: 900;
  letter-spacing: 0.14em;
  color: var(--gold);
  text-shadow:
    0 0 18px rgba(255, 120, 0, 0.9),
    0 5px 0 #8a2b00,
    0 0 48px rgba(255, 60, 0, 0.55);
  animation: kaboom-in 1.15s ease-out both;
}

@keyframes kaboom-in {
  0% { opacity: 0; transform: scale(0.4) rotate(-8deg); }
  18% { opacity: 1; transform: scale(1.18) rotate(3deg); }
  40% { transform: scale(1.02) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); }
}

.hero h1 {
  font-size: clamp(44px, 9vw, 108px);
  font-weight: 900;
  letter-spacing: 0.03em;
  line-height: 0.92;
  margin: 4px 0 14px;
  background: linear-gradient(180deg, #fff6c8 0%, #ffd34d 42%, #c98a10 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 6px 0 #5a3200) drop-shadow(0 0 28px rgba(255, 160, 0, 0.4));
}

.hero-lead {
  max-width: 640px;
  font-size: clamp(16px, 2.2vw, 22px);
  color: #f2e4bf;
  line-height: 1.45;
  margin-bottom: 22px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-pill {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.35);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gold-hot);
}

.wrap {
  width: min(1120px, calc(100% - 48px));
  margin: 0 auto;
}

section { padding: 72px 0; }

.section-kicker {
  color: var(--gold-deep);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 8px;
}

h2.section-title {
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--gold-hot);
  margin-bottom: 12px;
}

.section-lead {
  max-width: 640px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.5;
  margin-bottom: 28px;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.feature-card {
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #101218;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.feature-card img {
  width: 100%;
  height: 210px;
  object-fit: cover;
}

.feature-card .body { padding: 18px; }
.feature-card h3 { color: var(--gold); font-size: 18px; margin-bottom: 8px; }
.feature-card p { color: var(--muted); font-size: 14px; line-height: 1.5; }

.shot-strip {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.shot-strip img {
  width: 100%;
  height: 100%;
  min-height: 260px;
  object-fit: cover;
  border-radius: 16px;
  border: 1px solid var(--line);
}

.characters {
  background:
    linear-gradient(180deg, rgba(7, 8, 12, 0.55), rgba(7, 8, 12, 0.88)),
    url("assets/site/characters-lineup.jpg") center/cover no-repeat;
  border-block: 1px solid var(--line);
}

.roster {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin-top: 28px;
}

.roster-card {
  text-align: center;
  padding: 16px 10px 14px;
  border-radius: 14px;
  background: rgba(8, 10, 14, 0.72);
  border: 1px solid var(--line);
}

.roster-card img {
  height: 180px;
  width: auto;
  margin: 0 auto 10px;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.55));
}

.roster-card strong { display: block; color: var(--gold-hot); font-size: 13px; }
.roster-card span { color: var(--muted); font-size: 12px; }

.how-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.how-card {
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.how-card .n {
  color: var(--gold);
  font-weight: 900;
  font-size: 22px;
  margin-bottom: 6px;
}

.how-card h3 { font-size: 16px; margin-bottom: 6px; }
.how-card p { color: var(--muted); font-size: 14px; line-height: 1.45; }

kbd {
  display: inline-block;
  min-width: 1.5em;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(255, 211, 77, 0.35);
  background: rgba(255, 211, 77, 0.1);
  font-size: 11px;
  color: var(--gold-hot);
}

.board {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 22px;
  align-items: start;
}

.gold-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.55), 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 230, 128, 0.1);
  backdrop-filter: blur(12px);
}

.score-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 14px;
}

.score-row:first-child { color: var(--gold); font-weight: 700; }
.score-empty, .score-err { color: var(--muted); font-size: 14px; }

.cta-band {
  position: relative;
  overflow: hidden;
  min-height: 380px;
  display: grid;
  place-items: center;
  text-align: center;
}

.cta-band img.bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.cta-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(6, 7, 10, 0.62);
}

.cta-band h2 {
  font-size: clamp(32px, 5vw, 56px);
  color: var(--gold-hot);
  margin-bottom: 10px;
}

.cta-band p { color: #efe3c0; margin-bottom: 18px; }

.site-footer {
  padding: 28px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }

/* ---------- auth screens ---------- */

body.auth-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.auth-stage {
  flex: 1;
  position: relative;
  display: grid;
  grid-template-columns: minmax(320px, 460px) 1fr;
  min-height: calc(100vh - 61px);
  overflow: hidden;
}

.auth-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 0;
}

.auth-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

body.page-login .auth-stage::before {
  background-image: url("assets/site/login-vault.jpg");
}

body.page-login .auth-stage::after {
  background:
    linear-gradient(90deg, rgba(6, 8, 12, 0.92) 0%, rgba(6, 8, 12, 0.72) 42%, rgba(6, 8, 12, 0.18) 100%),
    radial-gradient(ellipse at 78% 62%, rgba(255, 196, 40, 0.22), transparent 50%);
}

body.page-register .auth-stage::before {
  background-image: url("assets/site/register-plaza.jpg");
}

body.page-register .auth-stage::after {
  background:
    linear-gradient(90deg, rgba(28, 16, 6, 0.88) 0%, rgba(28, 16, 6, 0.55) 38%, rgba(28, 16, 6, 0.12) 100%),
    radial-gradient(ellipse at 80% 70%, rgba(255, 170, 40, 0.22), transparent 46%);
}

body.page-reset .auth-stage::before {
  background-image: url("assets/site/login-vault.jpg");
}

body.page-reset .auth-stage::after {
  background: linear-gradient(90deg, rgba(6, 8, 12, 0.92) 0%, rgba(6, 8, 12, 0.55) 100%);
}

.auth-card {
  position: relative;
  z-index: 2;
  margin: 36px 0 36px 36px;
  padding: 28px;
  max-width: 420px;
}

.auth-kicker {
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold-deep);
  font-weight: 700;
}

.auth-card h1 {
  font-size: 34px;
  margin: 6px 0 8px;
  color: var(--gold-hot);
  letter-spacing: 0.02em;
}

.auth-card .lead {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 18px;
}

.auth-form { display: grid; gap: 6px; }

.auth-form label {
  font-size: 12px;
  color: #d8c9a0;
  margin-top: 8px;
}

.auth-form input {
  background: rgba(8, 10, 14, 0.85);
  border: 1px solid rgba(255, 211, 77, 0.28);
  border-radius: 8px;
  color: var(--ink);
  padding: 11px 12px;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(255, 211, 77, 0.18);
}

.auth-hint { font-size: 12px; color: #8e8060; }

.auth-submit {
  margin-top: 16px;
  width: 100%;
  padding: 12px 16px;
}

.auth-alt {
  margin-top: 16px;
  font-size: 13px;
  color: var(--muted);
}

.auth-status {
  margin-top: 12px;
  min-height: 18px;
  font-size: 13px;
  color: var(--muted);
}

.auth-status.ok { color: var(--ok); }
.auth-status.error { color: var(--danger); }

.auth-figure {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 24px 0;
  pointer-events: none;
}

.pixel-hero {
  height: min(78vh, 680px);
  width: auto;
  object-fit: contain;
  image-rendering: pixelated;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, 0.55));
  animation: sprite-bob 3.6s ease-in-out infinite;
}

@keyframes sprite-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.gold-hero {
  width: min(42vw, 460px);
  border-radius: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 40px rgba(255, 196, 40, 0.35));
}

.figure-caption {
  position: absolute;
  right: 32px;
  bottom: 24px;
  color: var(--gold-hot);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
  text-shadow: 0 2px 10px #000;
}

.auth-current { margin-top: 16px; }

@media (max-width: 900px) {
  .feature-grid, .how-grid, .roster, .board, .shot-strip {
    grid-template-columns: 1fr;
  }
  .auth-stage { grid-template-columns: 1fr; }
  .auth-card { margin: 20px; max-width: none; }
  .auth-figure { min-height: 280px; }
  .pixel-hero { height: 280px; }
  .site-nav { padding: 10px 14px; }
  .hero-copy { width: min(1120px, calc(100% - 28px)); }
  .wrap { width: min(1120px, calc(100% - 28px)); }
}
