/* DirtyLeague — match-3 league theme · light scheme · unique design */
:root {
  --bg: #f7f3ec;
  --card: #ffffff;
  --ink: #23262e;
  --muted: #6b7280;
  --primary: #c8102e;
  --primary-dark: #9c0d24;
  --gold: #e8a33d;
  --green: #2e9e6b;
  --blue: #2f6fb2;
  --purple: #7a4fb0;
  --line: #e7e0d4;
  --shadow: 0 10px 30px rgba(35, 38, 46, 0.08);
  --radius: 14px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  font-size: 17px;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- Header ---------- */
.site-header {
  background: var(--card);
  border-bottom: 4px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 12px rgba(35, 38, 46, 0.06);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.brand-name {
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-transform: uppercase;
}
.brand-name em { color: var(--primary); font-style: normal; }

.nav { display: flex; align-items: center; gap: 18px; }
.nav-links { display: flex; align-items: center; gap: 18px; list-style: none; }
.nav-links a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); text-decoration: none; }

.btn-play {
  display: inline-block;
  background: var(--primary);
  color: #fff !important;
  font-weight: 800;
  padding: 10px 22px;
  border-radius: 999px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-size: 0.9rem;
  box-shadow: 0 4px 14px rgba(200, 16, 46, 0.35);
  transition: transform 0.15s ease, background 0.15s ease;
}
.btn-play:hover { background: var(--primary-dark); transform: translateY(-2px); text-decoration: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 72px 0 64px;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 20%, rgba(200, 16, 46, 0.10), transparent 42%),
    radial-gradient(circle at 88% 15%, rgba(232, 163, 61, 0.16), transparent 40%),
    radial-gradient(circle at 70% 90%, rgba(47, 111, 178, 0.10), transparent 45%);
  pointer-events: none;
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy h1 {
  font-size: clamp(2.1rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 10px 0 18px;
}
.hero-copy h1 em { color: var(--primary); font-style: normal; }
.hero-eyebrow {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  padding: 5px 12px;
  border-radius: 6px;
}
.hero-tagline { font-size: 1.15rem; color: var(--muted); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 26px; }

.btn {
  display: inline-block;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: 10px;
  border: 2px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 6px 18px rgba(200, 16, 46, 0.3); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: rgba(200, 16, 46, 0.08); }

.hero-media { position: relative; }
.hero-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 6px solid #fff;
}
.hero-badge {
  position: absolute;
  bottom: -16px;
  left: 24px;
  background: var(--gold);
  color: #3a2c08;
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ---------- Hero sub-page ---------- */
.hero-subpage {
  background: linear-gradient(135deg, #fff 0%, #fdf3e3 100%);
  border-bottom: 1px solid var(--line);
  padding: 46px 0 40px;
}
.hero-subpage h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.02em; }
.hero-subpage .lede { color: var(--muted); font-size: 1.1rem; max-width: 46em; margin-top: 12px; }
.breadcrumb { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section-alt { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.kicker {
  display: inline-block;
  color: var(--primary);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  margin-bottom: 8px;
}
.section-title {
  font-size: clamp(1.6rem, 3.4vw, 2.2rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.section-sub { color: var(--muted); margin-top: 10px; max-width: 52em; }

/* ---------- Facts / standings table ---------- */
.facts-wrap { margin-top: 26px; overflow-x: auto; }
.facts-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  font-size: 0.98rem;
}
.facts-table th, .facts-table td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.facts-table th {
  background: var(--ink);
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.facts-table td:first-child { font-weight: 700; width: 32%; color: var(--primary); }
.facts-table tr:nth-child(even) td { background: #fbf8f2; }
.facts-table tr:last-child td { border-bottom: none; }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 30px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-top: 5px solid var(--primary);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 4px 14px rgba(35, 38, 46, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { font-size: 1.12rem; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.96rem; }
.gem-dots { display: flex; gap: 6px; margin-bottom: 12px; }
.gem-dots i {
  width: 12px; height: 12px; border-radius: 50%;
  display: inline-block;
  box-shadow: inset -2px -2px 3px rgba(0,0,0,0.2);
}
.gem-red { background: var(--primary); }
.gem-gold { background: var(--gold); }
.gem-blue { background: var(--blue); }
.gem-green { background: var(--green); }
.gem-purple { background: var(--purple); }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 30px;
}
.gallery-item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  border: 1px solid var(--line);
  box-shadow: 0 4px 14px rgba(35, 38, 46, 0.06);
  background: var(--card);
}
.gallery-item img { transition: transform 0.25s ease; }
.gallery-item:hover img { transform: scale(1.045); }
.gallery-item figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: linear-gradient(transparent, rgba(35, 38, 46, 0.85));
  color: #fff;
  font-size: 0.85rem;
  padding: 22px 12px 10px;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(20, 22, 28, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: min(1080px, 94vw);
  max-height: 86vh;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 22px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- Quotes ---------- */
.quote-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 30px; }
.quote-block {
  background: var(--card);
  border-left: 5px solid var(--gold);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: 0 4px 14px rgba(35, 38, 46, 0.05);
}
.quote-block p { font-style: italic; }
.quote-author {
  display: block;
  margin-top: 10px;
  font-size: 0.85rem;
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
}

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--primary) 0%, #a30f2b 100%);
  border-radius: var(--radius);
  padding: 44px 40px;
  color: #fff;
  text-align: center;
  box-shadow: 0 14px 34px rgba(200, 16, 46, 0.35);
}
.cta-banner h2 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -0.01em; }
.cta-banner p { margin: 10px auto 22px; max-width: 34em; color: #ffd9de; }
.cta-banner .btn-play { background: #fff; color: var(--primary) !important; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2); }
.cta-banner .btn-play:hover { background: #ffe9ec; }

/* ---------- Prose (sub-pages) ---------- */
.prose { max-width: 46em; }
.prose p { margin: 0 0 18px; }
.prose h2 {
  font-size: 1.45rem;
  letter-spacing: -0.01em;
  margin: 40px 0 14px;
  padding-top: 12px;
  border-top: 2px dashed var(--line);
}
.prose h3 { font-size: 1.12rem; margin: 24px 0 8px; color: var(--primary-dark); }
.prose ul, .prose ol { margin: 0 0 18px 1.4em; }
.prose li { margin-bottom: 8px; }
.prose img {
  border-radius: var(--radius);
  border: 5px solid #fff;
  box-shadow: var(--shadow);
  margin: 26px 0;
}

/* ---------- Characters ---------- */
.cast-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-top: 30px; }
.cast-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: 0 4px 14px rgba(35, 38, 46, 0.05);
  display: flex;
  gap: 16px;
  align-items: flex-start;
}
.cast-tag {
  flex: 0 0 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 1.3rem;
  color: #fff;
}
.tag-red { background: var(--primary); }
.tag-blue { background: var(--blue); }
.tag-green { background: var(--green); }
.tag-gold { background: var(--gold); color: #3a2c08; }
.tag-purple { background: var(--purple); }
.tag-ink { background: var(--ink); }
.cast-card h3 { font-size: 1.05rem; margin-bottom: 4px; }
.cast-card .role { font-size: 0.82rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--primary); }
.cast-card p { color: var(--muted); font-size: 0.93rem; margin-top: 6px; }

/* ---------- Guide ---------- */
.step-list { counter-reset: step; list-style: none; margin: 0 0 20px; }
.step-list li {
  counter-increment: step;
  position: relative;
  padding: 0 0 16px 46px;
}
.step-list li::before {
  content: counter(step);
  position: absolute;
  left: 0; top: 0;
  width: 32px; height: 32px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.95rem;
}
.tip-box {
  background: #fff8ea;
  border: 1px solid #f0dcb0;
  border-left: 5px solid var(--gold);
  border-radius: 10px;
  padding: 16px 20px;
  margin: 18px 0;
  font-size: 0.97rem;
}
.ref-table { width: 100%; border-collapse: collapse; margin: 22px 0; background: var(--card); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); font-size: 0.95rem; }
.ref-table th { background: var(--ink); color: #fff; padding: 11px 14px; text-align: left; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; }
.ref-table td { padding: 11px 14px; border-bottom: 1px solid var(--line); }
.ref-table tr:nth-child(even) td { background: #fbf8f2; }

/* ---------- FAQ ---------- */
.faq-list { margin-top: 30px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
  overflow: hidden;
}
.faq-q {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 18px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.faq-q::after {
  content: "+";
  font-size: 1.4rem;
  color: var(--primary);
  font-weight: 800;
  transition: transform 0.2s ease;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.faq-a p { padding: 0 20px 18px; color: var(--muted); font-size: 0.97rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c9ccd4;
  padding: 34px 0;
  margin-top: 40px;
  font-size: 0.9rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.lang-switch { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; list-style: none; }
.lang-switch a {
  display: inline-block;
  padding: 5px 12px;
  border: 1px solid #454a56;
  border-radius: 999px;
  color: #d7dae2;
  font-size: 0.82rem;
  font-weight: 600;
  text-transform: uppercase;
}
.lang-switch a:hover { border-color: var(--gold); color: var(--gold); text-decoration: none; }
.copyright { font-size: 0.82rem; color: #8b90a0; }

/* ---------- Skip link ---------- */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  z-index: 300;
}
.skip-link:focus { left: 8px; top: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
  body { font-size: 16px; }
  .hero { padding: 48px 0 44px; }
  .hero-inner { grid-template-columns: 1fr; gap: 34px; }
  .card-grid, .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .quote-grid, .cast-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--card);
    flex-direction: column;
    padding: 16px 20px;
    gap: 14px;
    border-bottom: 3px solid var(--primary);
    box-shadow: var(--shadow);
  }
  .nav.open .nav-links { display: flex; }
  .cta-banner { padding: 34px 24px; }
}

@media (max-width: 480px) {
  body { font-size: 15.5px; }
  .header-inner { flex-wrap: wrap; }
  .card-grid, .gallery-grid { grid-template-columns: 1fr; }
  .facts-table th, .facts-table td { padding: 10px 12px; font-size: 0.88rem; }
  .hero-actions .btn { width: 100%; text-align: center; }
  .section { padding: 40px 0; }
  .hero-subpage { padding: 34px 0 30px; }
}
