/* =========================================================
   betmatchstrategy.pro — Tactical Strategy Design System
   Sharp · Organized · Analytical
   ========================================================= */

:root {
  --bg-0: #070a0f;
  --bg-1: #0b1018;
  --bg-2: #111824;
  --bg-3: #16202e;
  --line: #1e2a3a;
  --line-bright: #2c3e57;
  --ink: #e6edf3;
  --ink-dim: #8b9bb4;
  --ink-mute: #5a6b85;
  --cyan: #19e0ff;
  --cyan-dim: #0b7d96;
  --amber: #ffb02e;
  --amber-dim: #8a5e16;
  --red: #ff5c5c;
  --green: #38e08a;
  --mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --max: 1240px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg-0);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Tactical grid backdrop */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(30, 42, 58, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 42, 58, 0.35) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(ellipse at 50% 0%, #000 30%, transparent 80%);
}

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--amber); }

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

/* ---------- Layout helpers ---------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

.tag {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.tag::before { content: "▸"; color: var(--amber); }

.section { padding: 84px 0; border-top: 1px solid var(--line); position: relative; }

.section-head {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 32px;
  margin-bottom: 48px;
  align-items: start;
}
.section-head .idx {
  font-family: var(--mono);
  color: var(--ink-mute);
  font-size: 13px;
  letter-spacing: 0.15em;
  border-top: 1px solid var(--line-bright);
  padding-top: 10px;
}
.section-head h2 {
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  border-top: 1px solid var(--line-bright);
  padding-top: 10px;
}
.section-head p { color: var(--ink-dim); margin-top: 14px; max-width: 640px; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 10, 15, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink);
}
.brand-mark {
  width: 30px; height: 30px;
  border: 1px solid var(--cyan);
  display: grid;
  place-items: center;
  color: var(--cyan);
  font-size: 13px;
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed rgba(25, 224, 255, 0.4);
}
.brand small { color: var(--ink-mute); font-size: 10px; letter-spacing: 0.2em; }

.nav { display: flex; gap: 26px; font-family: var(--mono); font-size: 13px; }
.nav a { color: var(--ink-dim); letter-spacing: 0.06em; }
.nav a:hover { color: var(--cyan); }
.nav .live { color: var(--amber); }
.nav .live::before { content: "● "; animation: pulse 1.6s infinite; }

@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:0.25} }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 90px 0 70px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 80% 10%, rgba(25, 224, 255, 0.10), transparent 50%),
    radial-gradient(ellipse at 10% 90%, rgba(255, 176, 46, 0.08), transparent 55%),
    var(--bg-0);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}
.hero-copy .coord {
  font-family: var(--mono);
  color: var(--ink-mute);
  font-size: 12px;
  letter-spacing: 0.2em;
  margin-bottom: 22px;
}
.hero-copy h1 {
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
}
.hero-copy h1 .accent { color: var(--cyan); }
.hero-copy h1 .strike {
  text-decoration: line-through;
  text-decoration-color: var(--amber-dim);
  color: var(--ink-dim);
}
.hero-copy p.lead {
  color: var(--ink-dim);
  font-size: 18px;
  max-width: 560px;
  margin-bottom: 32px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.1em;
  padding: 13px 22px;
  border: 1px solid var(--line-bright);
  color: var(--ink);
  background: var(--bg-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all .18s ease;
}
.btn:hover { border-color: var(--cyan); color: var(--cyan); background: var(--bg-3); }
.btn.primary { border-color: var(--cyan); color: var(--bg-0); background: var(--cyan); }
.btn.primary:hover { background: var(--amber); border-color: var(--amber); color: var(--bg-0); }
.btn .arrow { transition: transform .18s ease; }
.btn:hover .arrow { transform: translateX(4px); }

.hero-visual {
  position: relative;
  border: 1px solid var(--line-bright);
  background: var(--bg-1);
}
.hero-visual img { width: 100%; height: 360px; object-fit: cover; opacity: 0.92; }
.hero-visual .overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 60%, rgba(7,10,15,0.7) 100%),
    repeating-linear-gradient(0deg, rgba(25,224,255,0.04) 0 2px, transparent 2px 4px);
}
.hero-visual .hud {
  position: absolute;
  left: 14px; top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  color: var(--cyan);
  border: 1px solid var(--cyan-dim);
  padding: 4px 10px;
  background: rgba(7,10,15,0.6);
}
.hero-visual .hud.b { left: auto; right: 14px; top: auto; bottom: 14px; color: var(--amber); border-color: var(--amber-dim); }

.hero-stats {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
}
.hero-stats .stat {
  padding: 18px 16px;
  border-right: 1px solid var(--line);
  background: var(--bg-1);
}
.hero-stats .stat:last-child { border-right: none; }
.hero-stats .num {
  font-family: var(--mono);
  font-size: 24px;
  font-weight: 700;
  color: var(--cyan);
}
.hero-stats .lbl {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  color: var(--ink-mute);
  text-transform: uppercase;
  margin-top: 6px;
}

/* ---------- Strategy map ---------- */
.map-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.map-canvas {
  border: 1px solid var(--line-bright);
  background: var(--bg-1);
  padding: 22px;
  position: relative;
  min-height: 360px;
}
.map-canvas .ttl {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
}
.hex-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 6px;
}
.hex {
  aspect-ratio: 1 / 1.1;
  border: 1px solid var(--line);
  background: var(--bg-2);
  position: relative;
  transition: all .2s ease;
}
.hex:hover { border-color: var(--cyan); background: var(--bg-3); }
.hex.cyan { border-color: var(--cyan-dim); background: rgba(25,224,255,0.08); }
.hex.amber { border-color: var(--amber-dim); background: rgba(255,176,46,0.08); }
.hex.red { border-color: rgba(255,92,92,0.4); background: rgba(255,92,92,0.07); }
.hex .dot {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--ink-mute);
}
.hex.cyan .dot { color: var(--cyan); }
.hex.amber .dot { color: var(--amber); }

.map-legend {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 24px;
}
.map-legend h3 {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--ink);
  margin-bottom: 18px;
  text-transform: uppercase;
}
.legend-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14px;
}
.legend-row:last-child { border-bottom: none; }
.legend-row .sw { width: 18px; height: 18px; border: 1px solid; }
.legend-row .sw.cyan { border-color: var(--cyan); background: rgba(25,224,255,0.12); }
.legend-row .sw.amber { border-color: var(--amber); background: rgba(255,176,46,0.12); }
.legend-row .sw.red { border-color: var(--red); background: rgba(255,92,92,0.12); }
.legend-row .sw.grey { border-color: var(--line-bright); background: var(--bg-2); }
.legend-row .pct { font-family: var(--mono); color: var(--ink-dim); font-size: 12px; }

/* ---------- Game comparison ---------- */
.compare-table {
  border: 1px solid var(--line);
  background: var(--bg-1);
  overflow: hidden;
}
.compare-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 0.8fr;
  border-bottom: 1px solid var(--line);
}
.compare-row:last-child { border-bottom: none; }
.compare-row.head {
  background: var(--bg-2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.compare-row > div { padding: 18px 20px; border-right: 1px solid var(--line); font-size: 14px; }
.compare-row > div:last-child { border-right: none; }
.compare-row .name { font-weight: 600; color: var(--ink); }
.compare-row .name small { display: block; color: var(--ink-mute); font-family: var(--mono); font-size: 11px; margin-top: 4px; }
.compare-row .bar {
  height: 6px;
  background: var(--bg-3);
  margin-top: 8px;
  position: relative;
}
.compare-row .bar i {
  position: absolute; left: 0; top: 0; bottom: 0;
  background: var(--cyan);
}
.compare-row .tier { font-family: var(--mono); font-weight: 700; }
.tier.s { color: var(--amber); }
.tier.a { color: var(--cyan); }
.tier.b { color: var(--green); }
.tier.c { color: var(--ink-dim); }

/* ---------- Tactics cards ---------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.card {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 26px;
  position: relative;
  transition: all .2s ease;
}
.card:hover { border-color: var(--cyan); transform: translateY(-3px); }
.card .code {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--ink-mute);
  margin-bottom: 14px;
  display: flex;
  justify-content: space-between;
}
.card .code .id { color: var(--cyan); }
.card h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.01em; }
.card p { color: var(--ink-dim); font-size: 14px; margin-bottom: 18px; }
.card .meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.chip {
  border: 1px solid var(--line-bright);
  padding: 4px 9px;
  color: var(--ink-dim);
}
.chip.hot { color: var(--amber); border-color: var(--amber-dim); }
.chip.ok { color: var(--green); border-color: rgba(56,224,138,0.4); }

/* ---------- Progress board ---------- */
.board {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.board-panel {
  border: 1px solid var(--line-bright);
  background: var(--bg-1);
  padding: 28px;
}
.board-panel h3 {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 22px;
  display: flex;
  justify-content: space-between;
  color: var(--ink);
}
.board-panel h3 span { color: var(--cyan); }

.skill { margin-bottom: 18px; }
.skill-top {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 7px;
}
.skill-top .v { font-family: var(--mono); color: var(--cyan); }
.skill-track { height: 8px; background: var(--bg-3); position: relative; }
.skill-track i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--cyan), var(--amber)); }

.rank-row {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.rank-row:last-child { border-bottom: none; }
.rank-row .pos {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink-mute);
}
.rank-row .pos.gold { color: var(--amber); }
.rank-row .pos.silver { color: #c9d4e3; }
.rank-row .pos.bronze { color: #cd7f32; }
.rank-row .who { font-weight: 600; }
.rank-row .who small { display: block; color: var(--ink-mute); font-family: var(--mono); font-size: 11px; }
.rank-row .score { font-family: var(--mono); color: var(--cyan); }
.rank-row .delta { font-family: var(--mono); font-size: 11px; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }

/* ---------- Knowledge base ---------- */
.kb {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.kb-col { display: grid; gap: 14px; }
.kb-item {
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 22px 24px;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: 18px;
  align-items: center;
  transition: all .18s ease;
}
.kb-item:hover { border-color: var(--cyan); }
.kb-item .ico {
  width: 44px; height: 44px;
  border: 1px solid var(--line-bright);
  display: grid; place-items: center;
  font-family: var(--mono);
  color: var(--cyan);
  font-size: 16px;
}
.kb-item h4 { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.kb-item p { color: var(--ink-mute); font-size: 12px; font-family: var(--mono); letter-spacing: 0.04em; }
.kb-item .go { color: var(--ink-mute); font-family: var(--mono); font-size: 18px; }
.kb-item:hover .go { color: var(--cyan); }

.kb-visual {
  grid-column: 1 / -1;
  margin-top: 8px;
  border: 1px solid var(--line-bright);
  background: var(--bg-1);
  position: relative;
}
.kb-visual img { width: 100%; height: 280px; object-fit: cover; opacity: 0.9; }
.kb-visual .cap {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 16px 22px;
  background: linear-gradient(0deg, rgba(7,10,15,0.92), transparent);
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  color: var(--ink-dim);
}
.kb-visual .cap b { color: var(--cyan); }

/* ---------- CTA strip ---------- */
.cta-strip {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 56px 0;
  background:
    repeating-linear-gradient(135deg, rgba(25,224,255,0.03) 0 12px, transparent 12px 24px),
    var(--bg-1);
  text-align: center;
}
.cta-strip h2 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; letter-spacing: -0.02em; margin-bottom: 14px; }
.cta-strip p { color: var(--ink-dim); margin-bottom: 26px; }

/* ---------- Footer ---------- */
.footer {
  background: var(--bg-1);
  border-top: 1px solid var(--line-bright);
  padding: 64px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 48px;
}
.footer h4 {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 18px;
}
.footer ul { list-style: none; }
.footer li { margin-bottom: 10px; }
.footer li a { color: var(--ink-dim); font-size: 14px; }
.footer li a:hover { color: var(--cyan); }
.footer-about p { color: var(--ink-dim); font-size: 14px; margin-top: 14px; max-width: 320px; }
.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  color: var(--ink-mute);
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Legal pages ---------- */
.legal-hero {
  border-bottom: 1px solid var(--line);
  padding: 60px 0 40px;
  background:
    radial-gradient(ellipse at 90% 0%, rgba(25,224,255,0.08), transparent 50%),
    var(--bg-0);
}
.legal-hero .coord { font-family: var(--mono); color: var(--ink-mute); font-size: 12px; letter-spacing: 0.2em; margin-bottom: 14px; }
.legal-hero h1 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; letter-spacing: -0.02em; }
.legal-hero h1 .accent { color: var(--cyan); }
.legal-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-mute);
  margin-top: 16px;
  display: flex;
  gap: 26px;
  flex-wrap: wrap;
}
.legal-meta b { color: var(--ink-dim); }

.legal-body { padding: 56px 0 80px; }
.legal-cols { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.legal-toc {
  position: sticky;
  top: 90px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  padding: 22px;
}
.legal-toc h4 {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.2em;
  color: var(--ink-mute);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.legal-toc ul { list-style: none; }
.legal-toc li { margin-bottom: 9px; }
.legal-toc a { color: var(--ink-dim); font-size: 13px; line-height: 1.4; display: block; padding: 4px 0; border-left: 2px solid transparent; padding-left: 10px; }
.legal-toc a:hover { color: var(--cyan); border-left-color: var(--cyan); }

.legal-content h2 {
  font-size: 22px; font-weight: 700; margin: 40px 0 16px; letter-spacing: -0.01em;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.legal-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.legal-content h3 { font-size: 16px; margin: 24px 0 10px; color: var(--ink); }
.legal-content p { color: var(--ink-dim); margin-bottom: 14px; font-size: 15px; }
.legal-content ul { margin: 0 0 16px 22px; color: var(--ink-dim); }
.legal-content li { margin-bottom: 8px; }
.legal-content .note {
  border-left: 3px solid var(--amber);
  background: rgba(255,176,46,0.06);
  padding: 16px 20px;
  margin: 22px 0;
  font-size: 14px;
  color: var(--ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual img { height: 280px; }
  .map-grid { grid-template-columns: 1fr; }
  .board { grid-template-columns: 1fr; }
  .kb { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .section-head { grid-template-columns: 1fr; gap: 10px; }
  .section-head .idx { display: none; }
  .legal-cols { grid-template-columns: 1fr; }
  .legal-toc { position: static; }
  .compare-row { grid-template-columns: 1.4fr 1fr 1fr; }
  .compare-row > div:nth-child(4),
  .compare-row > div:nth-child(5) { display: none; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat:nth-child(2) { border-right: none; }
  .hero-stats .stat:nth-child(1),
  .hero-stats .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .nav { display: none; }
  .compare-row > div:nth-child(3) { display: none; }
  .compare-row { grid-template-columns: 1.4fr 1fr; }
}
