:root {
  --bg: #030507;
  --bg-soft: #080c10;
  --panel: rgba(255, 255, 255, 0.055);
  --panel-strong: rgba(255, 255, 255, 0.082);
  --text: #f2f5f7;
  --muted: #aeb8c2;
  --quiet: #7f8992;
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.23);
  --accent: #8fd7ff;
  --accent2: #ff9a5c;
  --grave: #bb7d67;
  --dust: #d8b47e;
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 10%, rgba(143, 215, 255, 0.13), transparent 30rem),
    radial-gradient(circle at 78% 18%, rgba(255, 154, 92, 0.11), transparent 34rem),
    radial-gradient(circle at 50% 95%, rgba(143, 215, 255, 0.08), transparent 40rem),
    linear-gradient(145deg, #020304 0%, var(--bg) 58%, #080604 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 50% 30%, black, transparent 75%);
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
.shell { width: min(100% - 34px, var(--max)); margin: 0 auto; }
header { padding: 26px 0 0; }
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  background: rgba(4, 6, 9, 0.78);
  backdrop-filter: blur(18px);
  border-radius: 999px;
  padding: 12px 14px 12px 18px;
  position: relative;
  z-index: 10;
}
.brand {
  color: var(--accent);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.nav-links { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.nav-links a {
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 8px 10px;
  font-size: 0.88rem;
  transition: border-color 160ms ease, color 160ms ease, background 160ms ease;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255,255,255,0.05);
}
.hero { padding: clamp(38px, 7vw, 86px) 0 46px; }
.hero-card {
  display: grid;
  grid-template-columns: 0.86fr 1.14fr;
  gap: clamp(26px, 5vw, 60px);
  align-items: center;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035)),
    rgba(255,255,255,0.04);
  backdrop-filter: blur(18px);
  border-radius: 34px;
  padding: clamp(24px, 5vw, 58px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
  overflow: hidden;
  position: relative;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 30%;
  height: 360px;
  background: radial-gradient(circle, rgba(255,154,92,0.18), transparent 62%);
  pointer-events: none;
}
.logo-wrap {
  border: 1px solid var(--line);
  background: #020304;
  border-radius: 26px;
  overflow: hidden;
  box-shadow: 0 20px 70px rgba(0,0,0,0.38);
}
.logo-wrap img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; }
.kicker,
.eyebrow {
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 800;
  margin-bottom: 20px;
}
h1, h2, h3, h4 {
  font-kerning: normal;
  text-rendering: optimizeLegibility;
}
h1 {
  font-size: clamp(3.35rem, 11vw, 8.2rem);
  line-height: 0.92;
  letter-spacing: -0.042em;
  margin: 0 0 26px;
}
h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.6rem, 4vw, 2.55rem);
  letter-spacing: -0.014em;
}
h3 { letter-spacing: -0.012em; }
.subtitle {
  max-width: 660px;
  color: var(--muted);
  font-size: clamp(1.08rem, 2.2vw, 1.35rem);
  line-height: 1.62;
  margin: 0 0 28px;
}
.status {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: #dce7ed;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.95rem;
  background: rgba(0,0,0,0.16);
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent2);
  box-shadow: 0 0 22px rgba(255, 154, 92, 0.85);
}
section { padding: 34px 0; }
.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.section-label {
  color: var(--quiet);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}
.series-grid { display: grid; gap: 22px; }
.series-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.035)),
    rgba(255,255,255,0.04);
  border-radius: 30px;
  box-shadow: 0 22px 70px rgba(0,0,0,0.32);
}
.series-card:nth-child(even) { grid-template-columns: 0.95fr 1.05fr; }
.series-card:nth-child(even) .series-image { order: 2; }
.series-image {
  min-height: 320px;
  background: #07090c;
  position: relative;
  overflow: hidden;
}
.series-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3,5,7,0.42), transparent 42%, rgba(3,5,7,0.08)),
    linear-gradient(0deg, rgba(3,5,7,0.20), transparent 34%);
  pointer-events: none;
}
.series-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 100%;
  filter: saturate(1.02) contrast(1.03);
}
.series-content {
  padding: clamp(26px, 4vw, 44px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.series-tag {
  color: var(--accent2);
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 16px;
}
.series-content h3 {
  margin: 0 0 18px;
  font-size: clamp(1.55rem, 4vw, 2.3rem);
  line-height: 1.06;
}
.series-content p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 1.04rem; }

/* Tombstone home card */
.tombstone-feature {
  display: grid;
  grid-template-columns: minmax(300px, .9fr) 1.1fr;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(75, 29, 22, .48), rgba(255,255,255,.035));
  box-shadow: 0 22px 70px rgba(0,0,0,.34);
}
.tombstone-art {
  min-height: 400px;
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 35%, rgba(255,154,92,.2), transparent 44%),
    linear-gradient(150deg, #130b09, #050607 65%);
}
.tombstone-art::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -50px;
  width: 205px;
  height: 305px;
  transform: translateX(-50%);
  border: 2px solid rgba(235,222,205,.52);
  border-bottom: 0;
  border-radius: 104px 104px 12px 12px;
  background:
    linear-gradient(rgba(255,255,255,.04), rgba(0,0,0,.22)),
    #151516;
  box-shadow: 0 20px 55px rgba(0,0,0,.55), inset 0 0 35px rgba(255,255,255,.03);
}
.tombstone-mark {
  position: absolute;
  z-index: 3;
  left: 50%;
  top: 135px;
  transform: translateX(-50%);
  text-align: center;
  color: #efe4d6;
  font-weight: 900;
  letter-spacing: .18em;
  text-transform: uppercase;
  text-shadow: 0 4px 22px rgba(0,0,0,.8);
}
.tombstone-mark span { display: block; color: var(--accent2); font-size: 2.4rem; letter-spacing: 0; margin-bottom: 12px; }
.play-card {
  position: absolute;
  width: 105px;
  height: 150px;
  border-radius: 12px;
  background: #ece6da;
  color: #171717;
  border: 1px solid rgba(0,0,0,.6);
  box-shadow: 0 18px 34px rgba(0,0,0,.46);
  padding: 12px;
  font-weight: 900;
  font-size: 1.35rem;
}
.play-card.red { color: #8d2d27; }
.card-a { left: 12%; top: 54px; transform: rotate(-17deg); }
.card-k { right: 12%; top: 74px; transform: rotate(16deg); }
.card-q { left: 19%; bottom: 26px; transform: rotate(-8deg); }
.card-j { right: 18%; bottom: 18px; transform: rotate(10deg); }
.feature-actions,
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  border-radius: 13px;
  padding: 11px 15px;
  border: 1px solid var(--line);
  color: var(--text);
  background: rgba(0,0,0,.18);
  font-weight: 750;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-1px); border-color: rgba(143,215,255,.62); background: rgba(143,215,255,.08); }
.button.primary { color: #071016; background: var(--accent); border-color: transparent; }
.button.primary:hover { background: #b5e6ff; }

.contact { padding-bottom: 54px; }
.contact-card {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.047);
  border-radius: 30px;
  padding: clamp(24px, 5vw, 44px);
}
.contact-card p { color: var(--muted); line-height: 1.62; margin: 12px 0 24px; max-width: 680px; }
.links { display: flex; flex-wrap: wrap; gap: 14px; }
.links a {
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 15px;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
  background: rgba(0,0,0,0.14);
}
.links a:hover { border-color: rgba(143, 215, 255, 0.65); background: rgba(143, 215, 255, 0.08); transform: translateY(-1px); }
footer { color: var(--quiet); border-top: 1px solid var(--line); padding: 22px 0 34px; font-size: 0.94rem; }

/* Rules page */
.rules-body { background-color: #030507; }
.rules-hero { padding: clamp(40px, 7vw, 80px) 0 28px; }
.rules-hero-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 34px;
  padding: clamp(28px, 6vw, 66px);
  background:
    radial-gradient(circle at 82% 25%, rgba(255,154,92,.18), transparent 30rem),
    linear-gradient(135deg, rgba(89,35,26,.46), rgba(255,255,255,.035));
  box-shadow: 0 30px 90px rgba(0,0,0,.44);
}
.rules-hero h1 { font-size: clamp(3.5rem, 12vw, 8.5rem); max-width: 900px; }
.rules-hero .subtitle { max-width: 820px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 0; }
.meta-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  color: #d9e1e5;
  background: rgba(0,0,0,.2);
  font-size: .9rem;
}
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 24px; }
.quick-card { border: 1px solid var(--line); border-radius: 18px; padding: 18px; background: var(--panel); }
.quick-card strong { display: block; font-size: 1.55rem; color: var(--accent2); margin-bottom: 6px; }
.quick-card span { color: var(--muted); line-height: 1.45; }
.rules-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 28px; align-items: start; }
.rules-toc {
  position: sticky;
  top: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: rgba(5,7,9,.82);
  backdrop-filter: blur(16px);
}
.rules-toc h2 { font-size: 1rem; letter-spacing: .12em; text-transform: uppercase; color: var(--quiet); margin-bottom: 10px; }
.rules-toc a { display: block; color: var(--muted); padding: 7px 4px; font-size: .9rem; }
.rules-toc a:hover { color: var(--accent); }
.rules-content { min-width: 0; }
.rule-section {
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: clamp(22px, 4vw, 38px);
  background: rgba(255,255,255,.04);
  margin-bottom: 18px;
  scroll-margin-top: 22px;
}
.rule-section h2 { margin-bottom: 16px; }
.rule-section h3 { margin: 25px 0 10px; font-size: 1.15rem; }
.rule-section p, .rule-section li { color: var(--muted); line-height: 1.65; }
.rule-section p { margin: 0 0 14px; }
.rule-section ul, .rule-section ol { margin: 10px 0 16px; padding-left: 1.4rem; }
.rule-section li + li { margin-top: 5px; }
.callout {
  border-left: 3px solid var(--accent2);
  background: rgba(255,154,92,.08);
  border-radius: 0 14px 14px 0;
  padding: 14px 16px;
  margin: 18px 0;
  color: #e8e0d8;
  line-height: 1.55;
}
.callout strong { color: var(--accent2); }
.rules-table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 14px; }
.rules-table { width: 100%; border-collapse: collapse; min-width: 620px; }
.rules-table th, .rules-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.rules-table th { background: rgba(255,255,255,.08); color: var(--text); font-size: .86rem; text-transform: uppercase; letter-spacing: .08em; }
.rules-table td { color: var(--muted); }
.rules-table tr:last-child td { border-bottom: 0; }
.rank-table td:first-child { width: 56px; color: var(--quiet); }
.rank-table td:nth-child(2) { min-width: 210px; color: var(--text); font-weight: 720; }
.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.glossary div { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(0,0,0,.13); }
.glossary dt { font-weight: 800; color: var(--text); margin-bottom: 4px; }
.glossary dd { margin: 0; color: var(--muted); line-height: 1.45; }
.download-strip {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  margin: 18px 0 40px;
  background: linear-gradient(135deg, rgba(143,215,255,.08), rgba(255,154,92,.06));
}
.download-strip p { margin: 5px 0 0; color: var(--muted); }

@media (max-width: 900px) {
  .quick-grid { grid-template-columns: repeat(2, 1fr); }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-toc { position: static; }
  .rules-toc nav { columns: 2; }
}
@media (max-width: 820px) {
  .hero-card, .series-card, .series-card:nth-child(even), .tombstone-feature { grid-template-columns: 1fr; }
  .series-card:nth-child(even) .series-image { order: 0; }
  .nav { align-items: flex-start; border-radius: 24px; flex-direction: column; }
  .nav-links { justify-content: flex-start; }
  .logo-wrap { max-width: 360px; }
  .series-image { min-height: 290px; }
  .tombstone-art { min-height: 360px; }
}
@media (max-width: 520px) {
  body {
    background:
      radial-gradient(circle at 18% 10%, rgba(143, 215, 255, 0.12), transparent 22rem),
      radial-gradient(circle at 78% 18%, rgba(255, 154, 92, 0.10), transparent 24rem),
      linear-gradient(145deg, #020304 0%, var(--bg) 58%, #080604 100%);
  }
  .shell { width: min(100% - 22px, var(--max)); }
  .hero-card, .series-card, .contact-card, .rules-hero-card { border-radius: 24px; }
  .hero-card { padding: 20px; }
  h1 { font-size: clamp(3rem, 17vw, 5.2rem); letter-spacing: -0.026em; }
  .subtitle, .series-content p { font-size: 1rem; }
  .links, .download-strip { flex-direction: column; align-items: stretch; }
  .links a, .download-strip .button { width: 100%; }
  .quick-grid, .glossary { grid-template-columns: 1fr; }
  .rules-toc nav { columns: 1; }
  .play-card { width: 84px; height: 122px; font-size: 1.1rem; }
  .tombstone-art::before { width: 180px; height: 270px; }
}
