/* PartidaYa — Editorial Neo-Arcade Visual Identity
   Palette: Sunlit Arcade Cream (#FFF8EE), Deep Ink (#14121F),
   Arcade Vermilion (#FF4D3D), Trophy Gold (#FFB800), Electric Cobalt (#2463EB), Go Emerald (#10B981) */

:root {
  --bg-cream: #fff8ee;
  --bg-warm: #f6ebd9;
  --surface: #ffffff;
  --ink: #14121f;
  --ink-muted: #524d66;
  --vermilion: #ff4d3d;
  --vermilion-dark: #c92d1f;
  --gold: #ffb800;
  --gold-dark: #c78b00;
  --cobalt: #2463eb;
  --cobalt-dark: #1843a8;
  --emerald: #10b981;
  --emerald-dark: #077d56;
  --border-w: 3px;
  --shadow-sm: 0 3px 0 var(--ink);
  --shadow-md: 0 5px 0 var(--ink);
  --shadow-lg: 0 8px 0 var(--ink);
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 30px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background-color: var(--bg-cream);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(255, 184, 0, 0.16), transparent 36%),
    radial-gradient(circle at 90% 14%, rgba(255, 77, 61, 0.13), transparent 34%),
    radial-gradient(rgba(20, 18, 31, 0.045) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 22px 22px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 18px;
}

/* ================= TOPBAR ================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 248, 238, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: var(--border-w) solid var(--ink);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 70px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand img {
  width: 42px;
  height: 42px;
  object-fit: contain;
  filter: drop-shadow(0 2px 0 var(--ink));
  transition: transform 0.18s ease;
}

.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
}

.brand-wordmark {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}

.brand-wordmark span {
  color: var(--vermilion);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 24px;
  font-weight: 700;
  font-size: 0.94rem;
}

.nav-links a {
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 3px;
  background: var(--vermilion);
  border-radius: 3px;
  transition: width 0.2s ease;
}

.nav-links a:hover::after {
  width: 100%;
}

/* ================= TACTILE 3D BUTTONS ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  padding: 12px 22px;
  border-radius: 15px;
  border: var(--border-w) solid var(--ink);
  box-shadow: var(--shadow-md);
  transition: transform 0.1s ease, box-shadow 0.1s ease, background-color 0.15s ease;
  touch-action: manipulation;
  white-space: nowrap;
}

.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 0.88rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.btn-sm:active {
  transform: translateY(2px);
  box-shadow: 0 1px 0 var(--ink);
}

.btn-go {
  background: var(--emerald);
  color: #ffffff;
  text-shadow: 0 2px 0 rgba(20, 18, 31, 0.45);
}

.btn-go:hover {
  background: #14c98e;
}

.btn-vermilion {
  background: var(--vermilion);
  color: #ffffff;
  text-shadow: 0 2px 0 rgba(20, 18, 31, 0.35);
}

.btn-vermilion:hover {
  background: #ff5f50;
}

.btn-gold {
  background: var(--gold);
  color: var(--ink);
}

.btn-gold:hover {
  background: #ffc629;
}

.btn-ink {
  background: var(--ink);
  color: #ffffff;
}

.btn-ink:hover {
  background: #242138;
}

.btn-surface {
  background: var(--surface);
  color: var(--ink);
}

.btn-surface:hover {
  background: var(--bg-warm);
}

/* ================= HERO ================= */
.hero {
  padding: 36px 0 28px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: center;
}

.hero-copy h1 {
  margin: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(2.25rem, 6vw, 3.65rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.035em;
  color: var(--ink);
}

.hero-highlight {
  display: inline-block;
  background: var(--gold);
  padding: 0 10px 2px;
  border: var(--border-w) solid var(--ink);
  border-radius: 14px;
  box-shadow: 0 4px 0 var(--ink);
  transform: rotate(-1.5deg);
  margin-top: 4px;
}

.hero-lead {
  margin: 18px 0 24px;
  font-size: 1.06rem;
  font-weight: 600;
  color: var(--ink-muted);
  max-width: 540px;
}

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

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

.stat-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--surface);
  border: 2.5px solid var(--ink);
  border-radius: 12px;
  padding: 7px 12px;
  font-size: 0.84rem;
  font-weight: 800;
  box-shadow: 0 3px 0 var(--ink);
}

.stat-chip i {
  width: 16px;
  height: 16px;
  color: var(--vermilion);
}

/* ================= FEATURED GAME SHOWCASE ================= */
.featured-card {
  position: relative;
  background: var(--surface);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.featured-media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #14369c;
  border-bottom: var(--border-w) solid var(--ink);
  overflow: hidden;
}

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

.featured-card:hover .featured-media img {
  transform: scale(1.03);
}

.live-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--emerald);
  color: #ffffff;
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 5px 12px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  box-shadow: 0 3px 0 var(--ink);
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffffff;
}

.featured-body {
  padding: 20px;
}

.featured-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.game-thumb-logo {
  width: 50px;
  height: 50px;
  object-fit: contain;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 0 var(--ink));
}

.featured-top h2 {
  margin: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.1;
}

.game-sub {
  margin: 3px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.featured-desc {
  margin: 14px 0 16px;
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 18px;
}

.tag {
  font-size: 0.76rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9px;
  border: 2px solid var(--ink);
  background: var(--bg-warm);
}

.featured-cta {
  width: 100%;
  font-size: 1.05rem;
  padding: 14px 20px;
}

/* ================= CATALOG SECTION ================= */
.section-space {
  padding: 36px 0 48px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(1.65rem, 4vw, 2.3rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.section-head p {
  margin: 6px 0 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-muted);
}

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

.filter-btn {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 0.86rem;
  padding: 8px 14px;
  border-radius: 12px;
  border: 2.5px solid var(--ink);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.1s ease, background-color 0.15s ease;
}

.filter-btn[aria-pressed='true'] {
  background: var(--ink);
  color: #ffffff;
}

.filter-btn:active {
  transform: translateY(2px);
}

.catalog-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.game-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform 0.18s ease;
}

.game-card:hover {
  transform: translateY(-3px);
}

.card-banner {
  position: relative;
  height: 148px;
  border-bottom: var(--border-w) solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.card-banner.is-critword {
  background: #14369c;
}

.card-banner.is-critword img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-banner.is-quiz {
  background: #ffb800;
}

.card-banner.is-memory {
  background: #ff4d3d;
}

.card-banner.is-math {
  background: #2463eb;
}

.banner-emblem {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 20px;
  border: var(--border-w) solid var(--ink);
  background: var(--bg-cream);
  color: var(--ink);
  box-shadow: 0 5px 0 var(--ink);
  transform: rotate(-4deg);
}

.banner-emblem i {
  width: 34px;
  height: 34px;
}

.status-pill {
  position: absolute;
  top: 12px;
  right: 12px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink);
}

.status-pill.live {
  background: var(--emerald);
  color: #ffffff;
}

.status-pill.soon {
  background: var(--bg-cream);
  color: var(--ink);
}

.card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px;
}

.card-meta {
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--vermilion);
}

.card-body h3 {
  margin: 4px 0 8px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.32rem;
  font-weight: 800;
  line-height: 1.15;
}

.card-body p {
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
  flex: 1;
}

.vote-btn {
  width: 100%;
  justify-content: space-between;
}

.vote-btn[aria-pressed='true'] {
  background: var(--gold);
  color: var(--ink);
}

.vote-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 8px;
  border: 2px solid var(--ink);
  background: var(--surface);
  font-size: 0.8rem;
}

/* ================= PILLARS ================= */
.pillars-band {
  background: var(--ink);
  color: #ffffff;
  border-top: var(--border-w) solid var(--ink);
  border-bottom: var(--border-w) solid var(--ink);
  padding: 42px 0;
}

.pillars-band .section-head h2 {
  color: #ffffff;
}

.pillars-band .section-head p {
  color: #c9c4db;
}

.pillars-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.pillar-item {
  background: #201c33;
  border: 2.5px solid rgba(255, 255, 255, 0.14);
  border-radius: 20px;
  padding: 20px;
}

.pillar-icon {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  border: 2.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  box-shadow: 0 3px 0 #09080f;
}

.pillar-icon.gold {
  background: var(--gold);
  color: var(--ink);
}

.pillar-icon.emerald {
  background: var(--emerald);
  color: #ffffff;
}

.pillar-icon.vermilion {
  background: var(--vermilion);
  color: #ffffff;
}

.pillar-item h3 {
  margin: 0 0 6px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.15rem;
  font-weight: 800;
}

.pillar-item p {
  margin: 0;
  font-size: 0.9rem;
  color: #d4cfe6;
  font-weight: 500;
}

/* ================= FOOTER ================= */
.footer {
  padding: 32px 0 40px;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 2.5px solid rgba(20, 18, 31, 0.15);
  padding-top: 24px;
}

.footer-copy {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.86rem;
  font-weight: 800;
}

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

/* ================= LEGAL PAGE ================= */
.legal-card {
  max-width: 740px;
  margin: 0 auto;
  background: var(--surface);
  border: var(--border-w) solid var(--ink);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 28px;
}

.legal-card h1 {
  margin: 0 0 6px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 2rem;
}

.legal-card h2 {
  margin: 22px 0 8px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 1.2rem;
}

.legal-meta {
  margin: 0 0 18px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.is-hidden {
  display: none !important;
}

/* ================= RESPONSIVE ================= */
@media (min-width: 720px) {
  .nav-links {
    display: flex;
  }

  .catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pillars-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .hero {
    padding: 52px 0 40px;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 40px;
  }

  .catalog-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
