/* =====================================================================
   MineralsCoins — Neon Arcade Design System
   Movie & TV quiz platform. Dark, layered, high-contrast.
   ===================================================================== */

/* ------------------------------- Tokens ---------------------------- */
:root {
  /* Brand neon */
  --lime: #a8e02a;
  --lime-soft: #c6f45c;
  --pink: #ff4d9d;
  --pink-soft: #ff8ac0;
  --violet: #7b4bff;
  --violet-soft: #a98cff;

  /* Semantic */
  --correct: #a8e02a;
  --wrong: #ff3b5c;

  /* Surfaces */
  --void: #05050b;
  --bg: #08080f;
  --bg-2: #0c0c16;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --ink: #f4f4fa;
  --ink-2: #b9b9cc;
  --ink-3: #7c7c93;

  /* Type */
  --font-display: "Chakra Petch", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;

  /* Rhythm */
  --shell: 1200px;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --radius-s: 10px;
  --radius: 16px;
  --radius-l: 24px;

  /* Glow */
  --glow-pink: 0 0 24px rgba(255, 77, 157, 0.45);
  --glow-lime: 0 0 24px rgba(168, 224, 42, 0.4);
  --glow-violet: 0 0 28px rgba(123, 75, 255, 0.45);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* Overridden per category by [data-accent]; these are the neutral fallback. */
  --accent: var(--lime);
  --accent-wash: rgba(168, 224, 42, 0.2);
}

/* ------------------------------- Reset ----------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  background: var(--void);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--lime);
  text-decoration: none;
}

a:hover {
  color: var(--lime-soft);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul,
ol {
  padding-left: 1.25rem;
}

:focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 999;
  padding: 0.75rem 1.25rem;
  background: var(--lime);
  color: #06060c;
  font-weight: 700;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------- Atmosphere ---------------------------- */
/* Layer 1: colour fog. Layer 2: perspective grid. Layer 3: grain. */
.atmosphere {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(70rem 40rem at 12% -10%, rgba(123, 75, 255, 0.22), transparent 60%),
    radial-gradient(60rem 36rem at 92% 4%, rgba(255, 77, 157, 0.18), transparent 62%),
    radial-gradient(52rem 34rem at 50% 108%, rgba(168, 224, 42, 0.14), transparent 60%),
    linear-gradient(180deg, var(--void) 0%, #07070e 45%, #05050b 100%);
}

.atmosphere::before {
  content: "";
  position: absolute;
  left: -25%;
  right: -25%;
  bottom: -12%;
  height: 62%;
  background-image:
    linear-gradient(rgba(123, 75, 255, 0.32) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 77, 157, 0.18) 1px, transparent 1px);
  background-size: 100% 3.2rem, 3.2rem 100%;
  transform: perspective(38rem) rotateX(74deg);
  transform-origin: bottom center;
  mask-image: linear-gradient(to top, #000 5%, transparent 82%);
  -webkit-mask-image: linear-gradient(to top, #000 5%, transparent 82%);
  opacity: 0.5;
}

.atmosphere::after {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* Scanlines sit above content but below interaction. */
.scanlines {
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0.35;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.028) 0px,
    rgba(255, 255, 255, 0.028) 1px,
    transparent 1px,
    transparent 4px
  );
}

/* ------------------------------ Layout ----------------------------- */
.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.shell-wide {
  max-width: 1440px;
}

.section {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section-tight {
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

main {
  position: relative;
  z-index: 1;
}

/* --------------------------- Typography ---------------------------- */
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.display {
  font-size: clamp(2.3rem, 4.6vw, 3.7rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.7rem, 3.6vw, 2.6rem);
}

h3 {
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
}

p {
  color: var(--ink-2);
}

.lede {
  font-size: clamp(1.05rem, 1.9vw, 1.25rem);
  color: var(--ink-2);
  max-width: 62ch;
}

.text-glow-lime {
  color: var(--lime);
  text-shadow: 0 0 28px rgba(168, 224, 42, 0.55);
}

.text-glow-pink {
  color: var(--pink);
  text-shadow: 0 0 28px rgba(255, 77, 157, 0.5);
}

/* Eyebrow label above section headings */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--lime);
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--lime));
  box-shadow: var(--glow-lime);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: clamp(1.75rem, 4vw, 3rem);
}

.section-head p {
  max-width: 52ch;
  margin-top: 0.75rem;
}

/* ------------------------------ Buttons ---------------------------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
    background 0.25s var(--ease), color 0.25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, var(--pink) 0%, var(--violet) 100%);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14) inset,
    0 10px 30px rgba(255, 77, 157, 0.32), 0 0 40px rgba(123, 75, 255, 0.28);
}

.btn-primary:hover {
  color: #fff;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.24) inset,
    0 14px 38px rgba(255, 77, 157, 0.45), 0 0 60px rgba(123, 75, 255, 0.4);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(8px);
}

.btn-ghost:hover {
  color: var(--lime);
  border-color: rgba(168, 224, 42, 0.55);
  box-shadow: 0 0 26px rgba(168, 224, 42, 0.18);
}

.btn-lime {
  background: var(--lime);
  color: #07070d;
  box-shadow: 0 10px 30px rgba(168, 224, 42, 0.25), 0 0 32px rgba(168, 224, 42, 0.3);
}

.btn-lime:hover {
  color: #07070d;
  background: var(--lime-soft);
  box-shadow: 0 14px 36px rgba(168, 224, 42, 0.35), 0 0 48px rgba(168, 224, 42, 0.42);
}

.btn-sm {
  padding: 0.6rem 1.2rem;
  font-size: 0.82rem;
}

.btn-block {
  width: 100%;
}

/* ------------------------------ Header ----------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(6, 6, 13, 0.72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(140%);
}

.site-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 224, 42, 0.6), rgba(255, 77, 157, 0.6), transparent);
  opacity: 0.75;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 5.5rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  height: clamp(2.4rem, 3.4vw, 3.1rem);
  width: auto;
  filter: drop-shadow(0 0 14px rgba(168, 224, 42, 0.35));
  transition: filter 0.3s var(--ease);
}

.brand:hover img {
  filter: drop-shadow(0 0 22px rgba(168, 224, 42, 0.6));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-links a {
  position: relative;
  display: block;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-2);
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.nav-links a:hover {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.05);
}

.nav-links a[aria-current="page"] {
  color: var(--lime);
  background: rgba(168, 224, 42, 0.1);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.nav-toggle {
  display: none;
  width: 2.9rem;
  height: 2.9rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  place-items: center;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.28s var(--ease), opacity 0.2s var(--ease);
}

.nav-toggle span + span {
  margin-top: 4px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 940px) {
  .nav-toggle {
    display: grid;
  }

  .nav-cta .btn {
    display: none;
  }

  .nav-links {
    position: fixed;
    inset: 4.75rem 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding: 1rem var(--gutter) 2rem;
    background: rgba(7, 7, 14, 0.97);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(20px);
    transform: translateY(-120%);
    transition: transform 0.4s var(--ease);
    max-height: calc(100vh - 4.75rem);
    overflow-y: auto;
  }

  .nav-links.is-open {
    transform: translateY(0);
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    font-size: 1.02rem;
    border-radius: 12px;
  }

  .nav-links .mobile-cta {
    margin-top: 0.75rem;
  }
}

@media (min-width: 941px) {
  .nav-links .mobile-cta {
    display: none;
  }
}

/* ------------------------------- Hero ------------------------------ */
.hero {
  position: relative;
  padding-block: clamp(3rem, 7vw, 5.5rem) clamp(3.5rem, 8vw, 6rem);
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: clamp(1.5rem, 3.5vw, 3rem);
}

.hero-copy {
  position: relative;
  z-index: 3;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.95rem 0.45rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(168, 224, 42, 0.35);
  background: rgba(168, 224, 42, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--lime-soft);
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 12px var(--lime);
  animation: pulse 2.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.8); }
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero .lede {
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-bottom: 2.5rem;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.25rem, 4vw, 2.75rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line);
}

.hero-stats div {
  min-width: 5.5rem;
}

.hero-stats .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.hero-stats .lbl {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* Hero artwork: screen image + floating panels, deliberately overflowing.
   The bleed is one gutter, not the full distance to the viewport edge —
   chasing the edge made the frame balloon past the headline on wide screens. */
.hero-art {
  position: relative;
  z-index: 1;
  width: calc(100% + var(--gutter));
  margin-right: calc(-1 * var(--gutter));
}

.hero-art-frame {
  position: relative;
  border-radius: var(--radius-l);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7), 0 0 70px rgba(123, 75, 255, 0.25);
  animation: float-slow 9s ease-in-out infinite;
}

.hero-art-frame img {
  width: 100%;
  height: auto;
  transform: scale(1.02);
}

.hero-art-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(5, 5, 11, 0.85) 100%);
}

@keyframes float-slow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-chip {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 10, 20, 0.82);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
}

.hero-chip .k {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.hero-chip-a {
  top: 8%;
  left: -6%;
  animation: float-slow 7s ease-in-out infinite;
}

.hero-chip-a .k {
  color: var(--lime);
  text-shadow: var(--glow-lime);
}

/* Inset rather than overhanging: the frame now bleeds to the viewport edge,
   so anything hanging off its right side gets clipped by the hero. */
.hero-chip-b {
  bottom: 9%;
  right: 6%;
  animation: float-slow 8.5s ease-in-out 0.6s infinite;
}

.hero-chip-b .k {
  color: var(--pink);
  text-shadow: var(--glow-pink);
}

@media (max-width: 900px) {
  /* minmax(0,…) rather than 1fr: an auto minimum lets the 1024px hero image
     blow the track out past the viewport. */
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-art {
    order: -1;
    width: 100%;
    margin-right: 0;
  }

  .hero-chip-a {
    left: -2%;
  }

  .hero-chip-b {
    right: 4%;
  }
}

@media (max-width: 560px) {
  .hero-chip {
    display: none;
  }

  /* Four stats read better as a 2x2 block than as a 3 + 1 wrap. */
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.35rem 1rem;
  }
}

/* ------------------------------ Marquee ---------------------------- */
.marquee {
  position: relative;
  padding-block: 1rem;
  border-block: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: slide 42s linear infinite;
}

.marquee span {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}

.marquee span em {
  font-style: normal;
  color: var(--lime);
}

@keyframes slide {
  to { transform: translateX(-50%); }
}

/* --------------------------- Category tiles ------------------------ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: clamp(0.9rem, 2vw, 1.4rem);
}

/* Per-accent tint, set on the element so the glyph and the glow stay in sync. */
[data-accent="lime"] {
  --accent: var(--lime);
  --accent-wash: rgba(168, 224, 42, 0.2);
}

[data-accent="pink"] {
  --accent: var(--pink);
  --accent-wash: rgba(255, 77, 157, 0.2);
}

[data-accent="violet"] {
  --accent: var(--violet-soft);
  --accent-wash: rgba(123, 75, 255, 0.26);
}

.cat-tile {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 14.5rem;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  overflow: hidden;
  isolation: isolate;
  transition: transform 0.4s var(--ease), border-color 0.4s var(--ease),
    box-shadow 0.4s var(--ease);
}

/* Accent haze anchored to the emblem corner, so the card has depth without
   an image fighting the headline for attention. */
.cat-tile::before {
  content: "";
  position: absolute;
  right: -6rem;
  bottom: -7rem;
  width: 16rem;
  height: 16rem;
  z-index: -1;
  background: radial-gradient(circle, var(--accent-wash), transparent 68%);
  opacity: 0.85;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.5s var(--ease);
}

.cat-tile .glyph {
  position: absolute;
  right: 1.35rem;
  bottom: 1.25rem;
  width: 5rem;
  height: 5rem;
  color: var(--accent);
  opacity: 0.58;
  z-index: -1;
  pointer-events: none;
  filter: drop-shadow(0 0 10px var(--accent-wash));
  transition: transform 0.5s var(--ease), opacity 0.4s var(--ease);
}

.cat-tile:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.55), 0 0 46px var(--accent-wash);
}

.cat-tile:hover .glyph {
  transform: translateY(-4px) scale(1.06);
  opacity: 0.85;
}

.cat-tile:hover::before {
  opacity: 1;
  transform: scale(1.12);
}

.cat-tile h3 {
  font-size: 1.22rem;
  margin-bottom: 0.45rem;
}

.cat-tile h3 a {
  color: var(--ink);
}

.cat-tile h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.cat-tile:hover h3 a {
  color: var(--lime);
}

.cat-tile p {
  font-size: 0.9rem;
  max-width: 21ch;
}

.cat-tile .count {
  margin-top: auto;
  padding-top: 1rem;
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ----------------------------- Quiz cards -------------------------- */
.quiz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: clamp(1rem, 2.2vw, 1.6rem);
}

.quiz-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  overflow: hidden;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease),
    box-shadow 0.35s var(--ease);
}

.quiz-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--lime), var(--pink), var(--violet));
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

.quiz-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 55px rgba(0, 0, 0, 0.55), 0 0 40px rgba(255, 77, 157, 0.14);
}

.quiz-card:hover::before {
  opacity: 1;
}

.quiz-card .meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.quiz-card h3 {
  margin-bottom: 0.6rem;
}

.quiz-card h3 a {
  color: var(--ink);
}

.quiz-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

.quiz-card:hover h3 a {
  color: var(--lime);
}

.quiz-card p {
  font-size: 0.93rem;
  margin-bottom: 1.4rem;
}

.quiz-card .foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-3);
}

.quiz-card .play {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--lime);
}

.quiz-card:hover .play {
  color: var(--lime-soft);
}

/* Featured card breaks the grid rhythm on wide screens */
.quiz-card-featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: center;
  gap: 2rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: linear-gradient(120deg, rgba(123, 75, 255, 0.16), rgba(255, 77, 157, 0.08) 45%, rgba(255, 255, 255, 0.015));
}

/* min-width:0 on both items: without it the emblem sets the flex minimum and
   squeezes the text column until the heading clips. */
.quiz-card-featured .art {
  flex: 0 0 clamp(6rem, 12vw, 9rem);
  min-width: 0;
  align-self: center;
  height: auto;
  aspect-ratio: 1;
  color: var(--accent);
  opacity: 0.8;
  filter: drop-shadow(0 0 18px var(--accent-wash));
  animation: float-slow 7s ease-in-out infinite;
}

.quiz-card-featured .body {
  flex: 1 1 auto;
  min-width: 0;
}

.quiz-card-featured h3 {
  font-size: clamp(1.4rem, 2.6vw, 2rem);
}

@media (max-width: 720px) {
  .quiz-card-featured {
    grid-column: span 1;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }

  .quiz-card-featured .art {
    flex-basis: 6rem;
  }
}

/* ------------------------------- Tags ------------------------------ */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.tag-lime {
  color: var(--lime);
  border-color: rgba(168, 224, 42, 0.4);
  background: rgba(168, 224, 42, 0.1);
}

.tag-pink {
  color: var(--pink);
  border-color: rgba(255, 77, 157, 0.4);
  background: rgba(255, 77, 157, 0.1);
}

.tag-violet {
  color: var(--violet-soft);
  border-color: rgba(123, 75, 255, 0.45);
  background: rgba(123, 75, 255, 0.14);
}

/* ---------------------------- Page header -------------------------- */
.page-head {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.75rem, 4vw, 3rem);
}

.page-head .lede {
  margin-top: 1rem;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
  padding: 0;
  list-style: none;
  font-size: 0.82rem;
  color: var(--ink-3);
}

.breadcrumb li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb li + li::before {
  content: "/";
  color: var(--ink-3);
  opacity: 0.6;
}

.breadcrumb a {
  color: var(--ink-2);
}

.breadcrumb a:hover {
  color: var(--lime);
}

/* Category hero: artwork is a grid column, so it can never be clipped by the
   header box. The radial mask hides the asset's own dark backing. */
.cat-head-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.cat-head-art {
  position: relative;
  display: grid;
  place-items: center;
  width: min(12rem, 20vw);
  aspect-ratio: 1;
  pointer-events: none;
}

.cat-head-art::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: radial-gradient(circle, var(--accent-wash), transparent 66%);
}

.cat-head-art .glyph {
  position: relative;
  width: 62%;
  height: 62%;
  color: var(--accent);
  filter: drop-shadow(0 0 16px var(--accent-wash));
  animation: float-slow 10s ease-in-out infinite;
}

@media (max-width: 820px) {
  .cat-head-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .cat-head-art {
    order: -1;
    width: 9rem;
    margin-inline: auto 0;
  }
}

/* ---------------------------- Quiz engine -------------------------- */
.quiz-stage {
  position: relative;
  max-width: 52rem;
  margin-inline: auto;
}

/* Ambient category colour behind the panel — atmosphere, not an image. */
.quiz-aura {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -1;
  width: min(46rem, 130%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, var(--accent-wash), transparent 62%);
  opacity: 0.85;
  pointer-events: none;
}

.quiz-stage::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: -2;
  width: min(52rem, 120%);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(123, 75, 255, 0.28), transparent 62%);
  pointer-events: none;
}

.quiz-panel {
  position: relative;
  padding: clamp(1.35rem, 3.5vw, 2.5rem);
  border-radius: var(--radius-l);
  border: 1px solid var(--line-strong);
  background: linear-gradient(165deg, rgba(18, 18, 32, 0.92), rgba(9, 9, 17, 0.92));
  box-shadow: 0 34px 80px rgba(0, 0, 0, 0.62), 0 0 60px rgba(123, 75, 255, 0.14);
  backdrop-filter: blur(12px);
}

.quiz-panel::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(168, 224, 42, 0.5), transparent 35%, transparent 65%, rgba(255, 77, 157, 0.5));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Status bar: counter, score, progress */
.quiz-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.quiz-status .score {
  color: var(--lime);
  text-shadow: 0 0 18px rgba(168, 224, 42, 0.45);
}

.progress {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}

.progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lime), var(--pink) 60%, var(--violet));
  box-shadow: 0 0 18px rgba(255, 77, 157, 0.55);
  transition: width 0.5s var(--ease);
}

.question-text {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: clamp(1.25rem, 3vw, 1.9rem);
  color: var(--ink);
}

.options {
  display: grid;
  gap: 0.7rem;
}

.option {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  text-align: left;
  font-size: 1rem;
  line-height: 1.45;
  color: var(--ink);
  transition: transform 0.2s var(--ease), border-color 0.2s var(--ease),
    background 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.option .key {
  display: grid;
  place-items: center;
  flex: 0 0 2rem;
  height: 2rem;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.05);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink-2);
  transition: inherit;
}

.option:not(:disabled):hover {
  transform: translateX(4px);
  border-color: rgba(168, 224, 42, 0.5);
  background: rgba(168, 224, 42, 0.07);
  box-shadow: 0 0 26px rgba(168, 224, 42, 0.14);
}

.option:not(:disabled):hover .key {
  color: var(--lime);
  border-color: rgba(168, 224, 42, 0.5);
}

.option:disabled {
  cursor: default;
}

.option.is-correct {
  border-color: rgba(168, 224, 42, 0.75);
  background: rgba(168, 224, 42, 0.14);
  box-shadow: 0 0 30px rgba(168, 224, 42, 0.22);
}

.option.is-correct .key {
  background: var(--lime);
  border-color: var(--lime);
  color: #07070d;
}

.option.is-wrong {
  border-color: rgba(255, 59, 92, 0.7);
  background: rgba(255, 59, 92, 0.12);
}

.option.is-wrong .key {
  background: var(--wrong);
  border-color: var(--wrong);
  color: #fff;
}

.option.is-muted {
  opacity: 0.42;
}

/* Feedback strip after each answer */
.feedback {
  margin-top: 1.2rem;
  padding: 1.05rem 1.2rem;
  border-radius: 14px;
  border-left: 3px solid var(--lime);
  background: rgba(168, 224, 42, 0.08);
  animation: rise 0.35s var(--ease);
}

.feedback.is-wrong {
  border-left-color: var(--wrong);
  background: rgba(255, 59, 92, 0.09);
}

.feedback .verdict {
  display: block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--lime);
  margin-bottom: 0.3rem;
}

.feedback.is-wrong .verdict {
  color: var(--wrong);
}

.feedback p {
  font-size: 0.94rem;
  color: var(--ink-2);
  margin: 0;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Start + result screens */
.quiz-screen {
  text-align: center;
  padding-block: clamp(0.5rem, 2vw, 1.5rem);
}

.quiz-screen h2 {
  margin-bottom: 0.9rem;
}

.quiz-screen p {
  margin-inline: auto;
  max-width: 46ch;
}

.quiz-screen .quiz-actions {
  justify-content: center;
  margin-top: 2rem;
}

.rules {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.6rem;
}

.score-ring {
  position: relative;
  display: grid;
  place-items: center;
  width: clamp(9rem, 26vw, 12rem);
  aspect-ratio: 1;
  margin: 0.5rem auto 1.5rem;
  border-radius: 50%;
  background:
    conic-gradient(var(--lime) calc(var(--pct) * 1%), rgba(255, 255, 255, 0.07) 0);
  box-shadow: 0 0 60px rgba(168, 224, 42, 0.22);
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #0a0a14;
}

.score-ring .val {
  position: relative;
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 2.9rem);
  font-weight: 700;
  line-height: 1;
  color: var(--ink);
}

.score-ring .val small {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 0.35rem;
}

.rank {
  display: inline-block;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 77, 157, 0.45);
  background: rgba(255, 77, 157, 0.12);
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--pink-soft);
  margin-bottom: 1.1rem;
}

.is-hidden {
  display: none !important;
}

/* ------------------------------- Prose ----------------------------- */
.prose {
  max-width: 70ch;
}

.prose > * + * {
  margin-top: 1.15rem;
}

.prose h2 {
  margin-top: 2.75rem;
  font-size: clamp(1.45rem, 2.8vw, 1.9rem);
  scroll-margin-top: 6rem;
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.2rem;
  color: var(--lime);
}

.prose p,
.prose li {
  color: var(--ink-2);
}

.prose li + li {
  margin-top: 0.5rem;
}

.prose strong {
  color: var(--ink);
  font-weight: 600;
}

.prose a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(168, 224, 42, 0.4);
}

.prose blockquote {
  margin-inline: 0;
  padding: 1.1rem 1.4rem;
  border-left: 3px solid var(--pink);
  border-radius: 0 14px 14px 0;
  background: rgba(255, 77, 157, 0.07);
}

.prose blockquote p {
  color: var(--ink);
  font-size: 1.05rem;
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.94rem;
}

.prose th,
.prose td {
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
}

.prose th {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--lime);
}

.prose td {
  color: var(--ink-2);
}

/* Two-column article layout with sticky rail */
.with-rail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 19rem;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.rail {
  position: sticky;
  top: 6.5rem;
  display: grid;
  gap: 1.25rem;
}

@media (max-width: 900px) {
  .with-rail {
    grid-template-columns: minmax(0, 1fr);
  }

  .rail {
    position: static;
  }
}

.panel {
  padding: 1.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
}

.panel h3 {
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}

.panel ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.92rem;
}

.panel ul a {
  color: var(--ink-2);
}

.panel ul a:hover {
  color: var(--lime);
}

/* ----------------------------- Fact strip -------------------------- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr));
  gap: 1px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
  overflow: hidden;
}

.facts div {
  padding: 1.5rem 1.4rem;
  background: #08080f;
}

.facts .num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(120deg, var(--lime), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.facts p {
  margin-top: 0.5rem;
  font-size: 0.88rem;
}

/* ------------------------------- Steps ----------------------------- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: clamp(1rem, 2.5vw, 2rem);
  counter-reset: step;
}

.step {
  position: relative;
  padding-top: 2.5rem;
  counter-increment: step;
}

.step::before {
  content: counter(step, decimal-leading-zero);
  position: absolute;
  top: 0;
  left: 0;
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(168, 224, 42, 0.55);
}

.step h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.step p {
  font-size: 0.93rem;
}

/* ------------------------------ Filters ---------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 2rem;
  padding: 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.025);
}

.field {
  position: relative;
  flex: 1 1 14rem;
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(8, 8, 16, 0.8);
  color: var(--ink);
  font-size: 0.95rem;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.field input::placeholder {
  color: var(--ink-3);
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(168, 224, 42, 0.6);
  box-shadow: 0 0 24px rgba(168, 224, 42, 0.16);
}

.field select option {
  background: #0c0c16;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chip {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: all 0.2s var(--ease);
}

.chip:hover {
  color: var(--ink);
  border-color: var(--line-strong);
}

.chip.is-active {
  color: #07070d;
  background: var(--lime);
  border-color: var(--lime);
  box-shadow: 0 0 24px rgba(168, 224, 42, 0.35);
}

.empty-state {
  padding: 3rem 1.5rem;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  color: var(--ink-3);
}

/* ------------------------------- CTA ------------------------------- */
.cta-band {
  position: relative;
  padding: clamp(2.25rem, 6vw, 4rem);
  border-radius: var(--radius-l);
  border: 1px solid var(--line-strong);
  background:
    radial-gradient(40rem 20rem at 15% 0%, rgba(123, 75, 255, 0.3), transparent 65%),
    radial-gradient(36rem 20rem at 90% 100%, rgba(255, 77, 157, 0.26), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015));
  overflow: hidden;
  text-align: center;
}

.cta-band h2 {
  margin-bottom: 0.9rem;
}

.cta-band p {
  margin-inline: auto;
  max-width: 50ch;
  margin-bottom: 2rem;
}

.cta-band .hero-actions {
  justify-content: center;
  margin-bottom: 0;
}

/* ------------------------------ Footer ----------------------------- */
.site-footer {
  position: relative;
  margin-top: clamp(3rem, 8vw, 6rem);
  padding-top: clamp(3rem, 6vw, 4.5rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  padding-bottom: 3rem;
}

@media (max-width: 820px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

.footer-brand img {
  height: 2.9rem;
  margin-bottom: 1.1rem;
}

.footer-brand p {
  font-size: 0.92rem;
  max-width: 34ch;
}

.site-footer h4 {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1rem;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.55rem;
  font-size: 0.92rem;
}

.site-footer ul a {
  color: var(--ink-3);
}

.site-footer ul a:hover {
  color: var(--lime);
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--ink-3);
}

.footer-bottom p {
  font-size: 0.85rem;
  margin: 0;
}

/* --------------------------- Motion safety ------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
