/* ==========================================================================
   KingSpeed Game — Imperial Crimson & Championship Gold Theme
   Bespoke Esports & Mobile Racing Championship Design System
   ========================================================================== */

:root {
  --bg: #110609;
  --bg-deep: #0b0305;
  --surface: #1b0b10;
  --surface-2: #251017;
  --surface-3: #31151f;
  --border: rgba(255, 255, 255, 0.09);
  --border-gold: rgba(247, 183, 49, 0.32);
  --border-ruby: rgba(255, 42, 75, 0.4);
  --text: #fff7f8;
  --text-soft: #cbb5ba;
  --text-dim: #8c7077;
  --scarlet: #ff2a4b;
  --scarlet-dark: #c8102e;
  --gold: #f7b731;
  --gold-light: #ffe38f;
  --grad-crown: linear-gradient(135deg, #ffe38f 0%, #f7b731 50%, #eb8205 100%);
  --grad-speed: linear-gradient(135deg, #ff2a4b 0%, #ff5e3a 100%);
  --grad-royal: linear-gradient(135deg, #ff2a4b 0%, #f7b731 100%);
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius: 12px;
  --shadow: 0 26px 64px -20px rgba(0, 0, 0, 0.85);
  --shadow-ruby: 0 16px 42px -10px rgba(255, 42, 75, 0.45);
  --shadow-gold: 0 16px 42px -10px rgba(247, 183, 49, 0.35);
  --maxw: 1220px;
  --font-display: "Russo One", system-ui, sans-serif;
  --font-sans: "Nunito Sans", system-ui, -apple-system, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Championship spotlight aura */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(60vw 45vw at 18% -8%, rgba(255, 42, 75, 0.18), transparent 62%),
    radial-gradient(50vw 42vw at 88% 8%, rgba(247, 183, 49, 0.13), transparent 60%),
    radial-gradient(50vw 50vw at 50% 105%, rgba(200, 16, 46, 0.14), transparent 65%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: 0.015em;
}

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

img {
  max-width: 100%;
  display: block;
}

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Text Gradients & Crown Badges
   ========================================================================== */
.crown-text {
  background: var(--grad-crown);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.scarlet-text {
  background: var(--grad-speed);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.crest-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 15px;
  border-radius: 6px;
  background: rgba(247, 183, 49, 0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: var(--radius);
  font-weight: 800;
  font-size: 0.94rem;
  letter-spacing: 0.03em;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.btn-scarlet {
  background: var(--grad-speed);
  color: #ffffff;
  box-shadow: var(--shadow-ruby);
}

.btn-scarlet:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -8px rgba(255, 42, 75, 0.65);
}

.btn-crown {
  background: var(--grad-crown);
  color: #1a0900;
  box-shadow: var(--shadow-gold);
}

.btn-crown:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 48px -8px rgba(247, 183, 49, 0.55);
}

.btn-velvet {
  background: var(--surface-2);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.btn-velvet:hover {
  background: var(--surface-3);
  border-color: var(--gold);
  transform: translateY(-2px);
}

/* ==========================================================================
   Championship Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(17, 6, 9, 0.86);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-gold);
}

.nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
}

.brand-emblem {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  overflow: hidden;
  border: 1.5px solid var(--gold);
  box-shadow: 0 8px 24px -6px rgba(247, 183, 49, 0.45);
  flex-shrink: 0;
}

.brand-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: var(--font-display);
  font-size: 1.28rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.brand-copy span {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 3px;
}

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

.nav-links a {
  font-weight: 700;
  font-size: 0.93rem;
  color: var(--text-soft);
  transition: color 0.18s;
}

.nav-links a:hover {
  color: var(--gold-light);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-cta .btn {
  padding: 10px 18px;
  font-size: 0.85rem;
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border-gold);
  background: var(--surface-2);
  color: var(--gold-light);
  cursor: pointer;
}

/* ==========================================================================
   Asymmetric Bento Championship Hero
   ========================================================================== */
.hero {
  padding: 68px 0 76px;
}

.hero-bento {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 40px;
  align-items: stretch;
}

.hero-main {
  background:
    radial-gradient(80% 90% at 100% 0%, rgba(255, 42, 75, 0.16), transparent 60%),
    linear-gradient(160deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 46px 42px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow);
}

.hero-main h1 {
  font-size: clamp(2.35rem, 4.6vw, 3.75rem);
  line-height: 1.06;
  margin: 20px 0 18px;
}

.hero-main p.lead {
  color: var(--text-soft);
  font-size: 1.08rem;
  max-width: 540px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.trophy-row {
  margin-top: 38px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.trophy-stat .val {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--gold-light);
  line-height: 1.1;
}

.trophy-stat .lbl {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 3px;
}

/* Right Column: 3-Tile Mosaic */
.hero-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1.25fr 1fr;
  gap: 16px;
}

.mosaic-tile {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  min-height: 190px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.mosaic-tile.featured-tile {
  grid-column: span 2;
  min-height: 250px;
  border-color: var(--border-ruby);
}

.mosaic-tile img.tile-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  transition: transform 0.4s ease;
}

.mosaic-tile:hover img.tile-bg {
  transform: scale(1.05);
}

.mosaic-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(17, 6, 9, 0.12) 0%, rgba(17, 6, 9, 0.92) 100%);
}

.tile-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}

.tile-content img.mini-ic {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  border: 1.5px solid var(--gold);
  flex-shrink: 0;
}

.tile-content strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.02rem;
  line-height: 1.2;
}

.tile-content span {
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ==========================================================================
   Section Scaffolding & Filter Tabs
   ========================================================================== */
.section {
  padding: 96px 0;
}

.section.deep-bg {
  background: var(--bg-deep);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 44px;
  flex-wrap: wrap;
}

.section-top.center {
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

.section-top h2 {
  font-size: clamp(1.95rem, 3.8vw, 2.9rem);
  line-height: 1.1;
  margin-top: 14px;
}

.section-top p {
  color: var(--text-soft);
  max-width: 560px;
  margin-top: 10px;
}

.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-btn {
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-soft);
  font-weight: 800;
  font-size: 0.83rem;
  cursor: pointer;
  transition: all 0.18s ease;
}

.filter-btn:hover {
  border-color: var(--border-gold);
  color: var(--text);
}

.filter-btn.active {
  background: var(--grad-crown);
  color: #1a0900;
  border-color: transparent;
}

/* ==========================================================================
   5-Game Championship Showcase Grid (#games)
   ========================================================================== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.game-showcase {
  background: linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.game-showcase:hover {
  transform: translateY(-5px);
  border-color: var(--border-gold);
}

.game-showcase.crown-flagship {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 34px;
  align-items: center;
  border-color: var(--border-ruby);
  background:
    radial-gradient(60% 90% at 0% 0%, rgba(255, 42, 75, 0.14), transparent 60%),
    linear-gradient(180deg, var(--surface-2) 0%, var(--surface) 100%);
}

.game-showcase[hidden] {
  display: none !important;
}

.gs-head {
  display: flex;
  align-items: center;
  gap: 16px;
}

.gs-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  overflow: hidden;
  border: 2px solid var(--border-gold);
  flex-shrink: 0;
  box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.7);
}

.gs-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gs-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 5px;
}

.pill-cat {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gold-light);
}

.pill-dl {
  font-size: 0.68rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 5px;
  background: rgba(255, 42, 75, 0.2);
  color: #ff8598;
  border: 1px solid rgba(255, 42, 75, 0.4);
}

.gs-head h3 {
  font-size: 1.42rem;
  line-height: 1.18;
}

.crown-flagship .gs-head h3 {
  font-size: 1.75rem;
}

.gs-desc {
  color: var(--text-soft);
  font-size: 0.96rem;
}

.gs-perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gs-perks li {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 11px;
}

/* Screenshot Strip inside Card */
.shot-strip {
  display: grid;
  gap: 10px;
}

.shot-strip.landscape {
  grid-template-columns: repeat(3, 1fr);
}

.crown-flagship .shot-strip.landscape {
  grid-template-columns: 1fr 1fr;
}

.crown-flagship .shot-strip.landscape .shot-box:first-child {
  grid-column: span 2;
}

.shot-strip.portrait {
  grid-template-columns: repeat(3, 1fr);
}

.shot-box {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-deep);
}

.shot-strip.landscape .shot-box {
  aspect-ratio: 16 / 9;
}

.shot-strip.portrait .shot-box {
  aspect-ratio: 9 / 16;
}

.shot-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.game-showcase:hover .shot-box img {
  transform: scale(1.03);
}

.gs-footer {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ==========================================================================
   Championship Standards (#pillars) & Studio Lab (#lab)
   ========================================================================== */
.crest-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.crest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--gold);
  border-radius: var(--radius-lg);
  padding: 32px 26px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

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

.crest-ic {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: rgba(255, 42, 75, 0.14);
  border: 1px solid var(--border-ruby);
  color: var(--scarlet);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.crest-ic svg {
  width: 25px;
  height: 25px;
}

.crest-card h4 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.crest-card p {
  color: var(--text-soft);
  font-size: 0.94rem;
}

/* 4-Stage Racing Lab */
.lab-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.lab-step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
}

.lab-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 12px;
}

.lab-step h4 {
  font-size: 1.12rem;
  margin-bottom: 8px;
}

.lab-step p {
  color: var(--text-soft);
  font-size: 0.9rem;
}

/* ==========================================================================
   Royal CTA Banner (#contact) & Footer
   ========================================================================== */
.royal-cta {
  background:
    radial-gradient(70% 120% at 95% 50%, rgba(247, 183, 49, 0.24), transparent 65%),
    linear-gradient(135deg, #3a0d19 0%, #1c080e 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  box-shadow: var(--shadow);
}

.royal-cta h2 {
  font-size: clamp(1.85rem, 3.5vw, 2.65rem);
  margin: 12px 0 10px;
}

.royal-cta p {
  color: var(--text-soft);
  max-width: 540px;
}

.royal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer {
  background: var(--bg-deep);
  border-top: 1px solid var(--border-gold);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.35fr 1.1fr 0.85fr 1fr;
  gap: 38px;
}

.footer-brand p {
  color: var(--text-soft);
  margin-top: 14px;
  font-size: 0.92rem;
  max-width: 310px;
}

.footer-col h5 {
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}

.footer-col a, .footer-col span.addr {
  display: block;
  color: var(--text-soft);
  font-size: 0.91rem;
  margin-bottom: 10px;
  transition: color 0.18s;
}

.footer-col a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.84rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Policy & Contact Subpages
   ========================================================================== */
.policy-hero {
  padding: 64px 0 32px;
  text-align: center;
}

.policy-hero h1 {
  font-size: clamp(2.1rem, 4vw, 3rem);
  margin-top: 14px;
}

.policy-hero p {
  color: var(--text-soft);
  margin-top: 10px;
}

.policy-wrap {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px 96px;
}

.policy-card {
  background: var(--surface);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 46px 50px;
  box-shadow: var(--shadow);
}

.policy-card h2 {
  font-size: 1.4rem;
  margin: 34px 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--gold-light);
}

.policy-card h2:first-child {
  margin-top: 0;
}

.policy-card h3 {
  font-size: 1.12rem;
  margin: 22px 0 10px;
  color: var(--scarlet);
}

.policy-card h4 {
  font-size: 1rem;
  margin: 18px 0 8px;
}

.policy-card p {
  color: var(--text-soft);
  margin-bottom: 14px;
}

.policy-card ul, .policy-card ol {
  margin: 0 0 16px 4px;
  padding-left: 22px;
  color: var(--text-soft);
}

.policy-card ul li, .policy-card ol li {
  margin-bottom: 9px;
}

.policy-card a {
  color: var(--gold-light);
  word-break: break-word;
}

.policy-card a:hover {
  text-decoration: underline;
}

.policy-card blockquote {
  background: var(--surface-2);
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 24px;
}

#data-deletion {
  background: var(--surface-2);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius);
  padding: 22px 24px;
  margin: 24px 0;
}

/* ==========================================================================
   Reveal & Responsive
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.in {
  opacity: 1;
  transform: none;
}

@media (max-width: 980px) {
  .hero-bento,
  .catalog-grid,
  .game-showcase.crown-flagship {
    grid-template-columns: 1fr;
  }
  .crest-grid {
    grid-template-columns: 1fr;
  }
  .lab-steps {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .nav-links {
    display: none;
  }
  .menu-toggle {
    display: grid;
    place-items: center;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--border-gold);
    padding: 24px;
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .section {
    padding: 72px 0;
  }
  .hero-main {
    padding: 30px 22px;
  }
  .hero-mosaic,
  .trophy-row,
  .shot-strip.landscape,
  .lab-steps,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .mosaic-tile.featured-tile {
    grid-column: span 1;
  }
  .royal-cta {
    padding: 36px 24px;
  }
  .policy-card {
    padding: 28px 20px;
  }
  .nav-cta .btn-velvet {
    display: none;
  }
}
