/* ── Reset & Base ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:         #080004;
  --bg2:        #0d0005;
  --bg3:        #060002;
  --card:       #110007;
  --card2:      #180009;
  --border:     #2e0012;
  --border2:    #450018;
  --red:        #8b0000;
  --red2:       #a80000;
  --red-bright: #d41111;
  --gold:       #c9a227;
  --gold2:      #e8bb30;
  --gold-dim:   #8a6e18;
  --text:       #e8ddd5;
  --text-dim:   #9a8880;
  --text-muted: #5a4040;
  --white:      #ffffff;
  --radius:     6px;
  --radius-lg:  12px;
  --font-head:  'Orbitron', sans-serif;
  --font-body:  'Exo 2', sans-serif;
  --transition: 0.2s ease;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(100,0,0,0.18) 0%, transparent 70%);
}

a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold2); }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ── Buttons ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 26px;
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--red);
  color: var(--white);
  border-color: var(--red);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover {
  background: var(--red-bright);
  border-color: var(--red-bright);
  color: var(--white);
  box-shadow: 0 0 20px rgba(180,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
}
.btn-gold {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
  font-weight: 900;
}
.btn-gold:hover {
  background: var(--gold2);
  border-color: var(--gold2);
  color: #000;
  box-shadow: 0 0 20px rgba(201,162,39,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: var(--border2);
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.btn-lg { padding: 14px 32px; font-size: 0.78rem; }

/* ── Section headers ──────────────────────────────── */
.section-label {
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}
.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3.5vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 14px;
  line-height: 1.15;
}
.section-sub {
  color: var(--text-dim);
  font-size: 1rem;
  max-width: 580px;
  margin-bottom: 48px;
  line-height: 1.7;
}

/* ── Nav ──────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  transition: background var(--transition), backdrop-filter var(--transition), border-color var(--transition);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(8,0,4,0.97);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--gold-dim);
  box-shadow: 0 1px 20px rgba(100,0,0,0.3);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.nav-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  overflow: hidden;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold-dim);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  background: #000;
}
.nav-logo-img {
  display: block;
  width: 46px !important;
  height: 46px !important;
  max-width: 46px !important;
  max-height: 46px !important;
  object-fit: contain;
  flex-shrink: 0;
}
.nav-logo:hover {
  border-color: var(--gold);
  box-shadow: 0 0 14px rgba(201,162,39,0.4);
  transform: scale(1.08);
}
.nav-links {
  display: flex;
  list-style: none;
  gap: 28px;
  align-items: center;
  margin-left: auto;
}
.nav-links a {
  color: var(--text-dim);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}
.nav-links a:hover { color: var(--white); }
.nav-forum-link {
  background: var(--red) !important;
  color: var(--white) !important;
  padding: 6px 14px !important;
  border-radius: var(--radius);
  font-family: var(--font-head) !important;
  font-size: 0.65rem !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em;
  border: 1px solid var(--gold-dim) !important;
}
.nav-forum-link:hover {
  background: var(--red-bright) !important;
  color: var(--white) !important;
  border-color: var(--gold) !important;
}
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-hamburger span { display: block; width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

/* ── Hero ─────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(ellipse at 50% 20%, #3d0000 0%, #1a0005 35%, #0a0002 65%, var(--bg) 100%);
  padding: 80px 24px 60px;
}
#starfield {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.hero-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
  pointer-events: none;
}
.hero-watermark img {
  width: min(520px, 70vw);
  height: auto;
  opacity: 0.07;
  filter: saturate(0.6);
  animation: slowSpin 120s linear infinite;
}
@keyframes slowSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Banner in hero */
.hero-banner-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1100px;
  margin-bottom: 40px;
  animation: fadeInDown 0.9s ease both;
}
.hero-banner-border {
  padding: 4px;
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dim) 30%, var(--gold-dim) 70%, var(--gold) 100%);
  border-radius: 6px;
  box-shadow:
    0 0 40px rgba(0,0,0,0.8),
    0 0 0 1px rgba(201,162,39,0.2),
    inset 0 0 30px rgba(139,0,0,0.3);
  animation: borderGlow 4s ease-in-out infinite;
  position: relative;
  overflow: hidden;
}
/* Scanline effect across the banner */
.hero-banner-border::before {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 3px;
  background: linear-gradient(to right, transparent, rgba(201,162,39,0.6), transparent);
  z-index: 3;
  animation: scanline 5s ease-in-out infinite;
  pointer-events: none;
}
.hero-banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  filter: brightness(1.05) contrast(1.05);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 760px;
  animation: fadeInUp 0.9s ease 0.2s both;
}
.hero-sub {
  color: var(--text-dim);
  font-size: clamp(0.95rem, 2vw, 1.1rem);
  margin-bottom: 32px;
  line-height: 1.7;
}
.hero-ctas {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 48px;
}
.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(8px);
  animation: glowPulse 6s ease-in-out infinite;
}
.hero-stat {
  padding: 16px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.hero-stat-num {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
}
.hero-stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-stat-divider {
  width: 1px;
  height: 40px;
  background: var(--gold-dim);
  opacity: 0.4;
}

.hero-scroll-hint {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.scroll-arrow {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
  margin: 0 auto;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.3; } 50% { opacity: 0.9; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 12px rgba(201,162,39,0.15), 0 0 30px rgba(139,0,0,0.08); }
  50%       { box-shadow: 0 0 24px rgba(201,162,39,0.35), 0 0 50px rgba(139,0,0,0.2); }
}
@keyframes borderGlow {
  0%, 100% { border-color: var(--gold-dim); }
  50%       { border-color: var(--gold); }
}
@keyframes scanline {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 0.4; }
  90%  { opacity: 0.4; }
  100% { transform: translateY(400%); opacity: 0; }
}
@keyframes shimmerSlide {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
@keyframes countUp {
  from { opacity: 0; transform: scale(0.8); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Gold divider ─────────────────────────────────── */
.gold-divider {
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold-dim), var(--gold), var(--gold-dim), transparent);
}

/* ── About ────────────────────────────────────────── */
.about {
  padding: 90px 0;
  background: var(--bg2);
  border-top: 1px solid var(--gold-dim);
  border-bottom: 1px solid var(--gold-dim);
}
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.about-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
}
.about-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--gold-dim), var(--red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.about-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top left, rgba(139,0,0,0.05) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.about-card:hover {
  border-color: var(--gold-dim);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.6), 0 0 30px rgba(139,0,0,0.12);
}
.about-card:hover::before { transform: scaleX(1); }
.about-card:hover::after { opacity: 1; }
.about-icon-bar {
  width: 36px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold-dim));
  margin-bottom: 18px;
}
.about-card h3 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.about-card p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }

/* ── Squads ───────────────────────────────────────── */
.squads { padding: 90px 0; background: var(--bg); }
.squad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 16px;
}
.squad-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}
.squad-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--squad-color, var(--red));
}
.squad-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.01) 0%, transparent 60%);
  pointer-events: none;
}
.squad-card:hover {
  border-color: var(--squad-color, var(--red));
  transform: translateY(-5px);
  box-shadow: 0 16px 40px rgba(0,0,0,0.6), 0 0 0 1px var(--squad-color, var(--red)), 0 0 30px rgba(0,0,0,0.3);
}
.squad-card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.squad-logo-img {
  width: 64px;
  height: 64px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  transition: transform 0.3s ease;
}
.squad-card:hover .squad-logo-img { transform: scale(1.08) rotate(5deg); }
.squad-abbr {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: var(--squad-color, var(--red));
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  letter-spacing: 0.03em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}
.squad-card-info h3 {
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
}
.squad-card-city { font-size: 0.78rem; color: var(--text-muted); }
.squad-card-desc { font-size: 0.87rem; color: var(--text-dim); line-height: 1.65; margin-bottom: 14px; }
.squad-card-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.squad-card-link {
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.squad-card-link::after { content: '→'; }
.squad-card-event {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(139,0,0,0.2);
  border: 1px solid rgba(139,0,0,0.5);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e08080;
  transition: all var(--transition);
}
.squad-card-event:hover {
  background: rgba(139,0,0,0.4);
  border-color: var(--red-bright);
  color: #ffbbbb;
}

/* ── Squad Badge Grid ────────────────────────────── */
.squad-badge-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 24px 20px;
  padding: 36px 24px 40px;
  max-width: 820px;
  margin: 0 auto;
}
.squad-badge-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.squad-badge-ring {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  padding: 3px;
  background: linear-gradient(135deg, var(--border2), var(--border));
  transition: background 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}
.squad-badge-item:hover .squad-badge-ring {
  background: linear-gradient(135deg, var(--squad-color, var(--red)), rgba(0,0,0,0));
  box-shadow: 0 0 28px var(--squad-color, var(--red)), 0 0 8px rgba(0,0,0,0.8);
  transform: scale(1.1) translateY(-4px);
}
.squad-badge-item.active .squad-badge-ring {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  box-shadow: 0 0 32px rgba(201,162,39,0.8), 0 0 8px rgba(0,0,0,0.8);
  transform: scale(1.08) translateY(-3px);
}
.squad-badge-img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: contain;
  background: #060002;
  filter: brightness(0.88) saturate(0.9);
  transition: filter 0.25s ease;
}
.squad-badge-item:hover .squad-badge-img,
.squad-badge-item.active .squad-badge-img {
  filter: brightness(1.1) saturate(1.1);
}
.squad-badge-label {
  font-family: var(--font-head);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s ease;
  text-align: center;
  max-width: 110px;
  line-height: 1.4;
}
.squad-badge-item:hover .squad-badge-label { color: var(--gold); }
.squad-badge-item.active .squad-badge-label { color: var(--gold2); }

/* Hotspot pins — crosshair targeting reticle */
.squad-hotspot {
  position: absolute;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: crosshair;
  padding: 0;
  z-index: 10;
}

/* Red crosshair — hidden at rest, snaps in on hover */
.squad-hotspot::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 58 58' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='29' cy='29' r='20' fill='none' stroke='%23d41111' stroke-width='1.5'/%3E%3Cline x1='2' y1='29' x2='16' y2='29' stroke='%23d41111' stroke-width='1.5'/%3E%3Cline x1='42' y1='29' x2='56' y2='29' stroke='%23d41111' stroke-width='1.5'/%3E%3Cline x1='29' y1='2' x2='29' y2='16' stroke='%23d41111' stroke-width='1.5'/%3E%3Cline x1='29' y1='42' x2='29' y2='56' stroke='%23d41111' stroke-width='1.5'/%3E%3Ccircle cx='29' cy='29' r='2.5' fill='%23d41111'/%3E%3Cpath d='M5 14 L5 5 L14 5' fill='none' stroke='%23d41111' stroke-width='1.5'/%3E%3Cpath d='M44 5 L53 5 L53 14' fill='none' stroke='%23d41111' stroke-width='1.5'/%3E%3Cpath d='M5 44 L5 53 L14 53' fill='none' stroke='%23d41111' stroke-width='1.5'/%3E%3Cpath d='M44 53 L53 53 L53 44' fill='none' stroke='%23d41111' stroke-width='1.5'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transform: scale(0.65);
  transition: opacity 0.08s ease, transform 0.1s ease, filter 0.08s ease;
}

/* Gold locked crosshair — shown when active/clicked */
.squad-hotspot::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 58 58' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='29' cy='29' r='20' fill='none' stroke='%23c9a227' stroke-width='2'/%3E%3Cline x1='2' y1='29' x2='16' y2='29' stroke='%23c9a227' stroke-width='2'/%3E%3Cline x1='42' y1='29' x2='56' y2='29' stroke='%23c9a227' stroke-width='2'/%3E%3Cline x1='29' y1='2' x2='29' y2='16' stroke='%23c9a227' stroke-width='2'/%3E%3Cline x1='29' y1='42' x2='29' y2='56' stroke='%23c9a227' stroke-width='2'/%3E%3Ccircle cx='29' cy='29' r='3' fill='%23c9a227'/%3E%3Cpath d='M5 14 L5 5 L14 5' fill='none' stroke='%23c9a227' stroke-width='2'/%3E%3Cpath d='M44 5 L53 5 L53 14' fill='none' stroke='%23c9a227' stroke-width='2'/%3E%3Cpath d='M5 44 L5 53 L14 53' fill='none' stroke='%23c9a227' stroke-width='2'/%3E%3Cpath d='M44 53 L53 53 L53 44' fill='none' stroke='%23c9a227' stroke-width='2'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

.squad-hotspot:hover::before {
  opacity: 1;
  transform: scale(1);
  filter: drop-shadow(0 0 5px rgba(212,17,17,0.9));
}
.squad-hotspot.active::before { opacity: 0; transform: scale(1); }
.squad-hotspot.active::after {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(201,162,39,0.95));
}

/* Hotspot tooltip */
.squad-hotspot-tooltip {
  position: absolute;
  background: rgba(8,0,4,0.97);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 8px 14px;
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--gold);
  pointer-events: none;
  white-space: nowrap;
  z-index: 20;
  display: none;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.7);
  transform: translateX(-50%);
}
.squad-hotspot-tooltip.visible { display: block; }

/* ── Map Section ──────────────────────────────────── */
.map-section {
  padding: 90px 0 0;
  background: var(--bg2);
  border-top: 1px solid var(--gold-dim);
}
.map-wrapper {
  display: grid;
  grid-template-columns: 200px 1fr 320px;
  grid-template-rows: auto;
  height: 600px;
  margin-top: 32px;
  border-top: 2px solid var(--gold-dim);
  border-bottom: 2px solid var(--gold-dim);
  position: relative;
}
.map-controls {
  background: var(--card);
  border-right: 1px solid var(--border2);
  padding: 20px 14px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.map-legend { display: flex; flex-direction: column; gap: 8px; }
.map-legend-title {
  font-family: var(--font-head);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
}
.legend-item:hover, .legend-item.active {
  background: rgba(255,255,255,0.04);
  border-color: var(--border2);
}
.legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-label { font-size: 0.72rem; color: var(--text-dim); font-weight: 500; }

.county-search-wrap { position: relative; }
.county-search {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 8px 10px;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.78rem;
  outline: none;
  transition: border-color var(--transition);
}
.county-search::placeholder { color: var(--text-muted); }
.county-search:focus { border-color: var(--gold-dim); }
.county-search-results {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--card2);
  border: 1px solid var(--border2);
  border-top: none;
  border-radius: 0 0 var(--radius) var(--radius);
  max-height: 180px;
  overflow-y: auto;
  z-index: 50;
  display: none;
}
.county-search-results.open { display: block; }
.search-result-item {
  padding: 8px 10px;
  font-size: 0.78rem;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover { background: rgba(255,255,255,0.04); color: var(--white); }
.search-result-badge {
  font-size: 0.6rem;
  font-family: var(--font-head);
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 3px;
  color: #fff;
  flex-shrink: 0;
}

#sgMap { width: 100%; height: 100%; background: #080003; }

.map-tooltip {
  position: absolute;
  background: rgba(10,0,5,0.97);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text);
  pointer-events: none;
  z-index: 500;
  display: none;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
}
.map-tooltip.visible { display: block; }
.map-tooltip strong { color: var(--gold); font-family: var(--font-head); font-size: 0.75rem; }

.map-sidebar {
  background: var(--card);
  border-left: 1px solid var(--border2);
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
}
.map-sidebar-default {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
  gap: 14px;
  font-size: 0.88rem;
  line-height: 1.6;
}
.map-sidebar-default .map-sidebar-icon { font-size: 2.2rem; }
.map-sidebar-request-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 18px;
  background: var(--red);
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  transition: all var(--transition);
  margin-top: 4px;
}
.map-sidebar-request-btn:hover {
  background: var(--red-bright);
  border-color: var(--gold);
  color: var(--white);
  box-shadow: 0 0 18px rgba(139,0,0,0.5);
}
.map-squad-detail { display: flex; flex-direction: column; gap: 14px; }
.map-detail-header { display: flex; align-items: center; gap: 14px; }
.map-detail-badge {
  width: 52px; height: 52px;
  border-radius: 10px;
  color: #fff;
  font-family: var(--font-head);
  font-size: 0.75rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
}
.map-detail-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(0,0,0,0.6);
}
.map-detail-name {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}
.map-detail-city { font-size: 0.78rem; color: var(--text-muted); }
.map-detail-divider { height: 1px; background: var(--border); }
.map-detail-desc { font-size: 0.85rem; color: var(--text-dim); line-height: 1.65; }
.map-detail-county-label {
  font-family: var(--font-head);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.map-detail-county-name {
  font-size: 0.95rem;
  color: var(--white);
  font-weight: 600;
}
.map-detail-forum {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--gold-dim);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  transition: all var(--transition);
}
.map-detail-forum:hover {
  background: rgba(201,162,39,0.08);
  border-color: var(--gold);
  color: var(--gold2);
}

/* Leaflet overrides */
.leaflet-popup-content-wrapper {
  background: #0e0008 !important;
  border: 1px solid var(--gold-dim) !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.7) !important;
  color: var(--text) !important;
  font-family: var(--font-body) !important;
}
.leaflet-popup-tip { background: #0e0008 !important; }
.leaflet-popup-content { margin: 12px 14px !important; font-size: 0.85rem !important; }
.leaflet-control-zoom a {
  background: var(--card) !important;
  color: var(--text) !important;
  border-color: var(--border2) !important;
}
.leaflet-control-zoom a:hover { background: var(--card2) !important; color: var(--gold) !important; }
.leaflet-control-attribution {
  background: rgba(8,0,4,0.85) !important;
  color: var(--text-muted) !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a { color: var(--text-muted) !important; }

/* ── Resources ────────────────────────────────────── */
.resources {
  padding: 90px 0;
  background: var(--bg);
  border-top: 1px solid var(--gold-dim);
}
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}
.resource-group {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color var(--transition);
}
.resource-group:hover { border-color: var(--gold-dim); }
.resource-group-title {
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--gold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.resource-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.resource-list li { font-size: 0.87rem; }
.resource-list a {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color var(--transition), padding-left var(--transition);
}
.resource-list a::before { content: '›'; color: var(--gold-dim); font-size: 0.9em; flex-shrink: 0; }
.resource-list a:hover { color: var(--white); padding-left: 4px; }
.resource-coming-soon {
  color: var(--text-muted);
  font-size: 0.87rem;
  display: flex;
  align-items: center;
  gap: 6px;
}
.resource-coming-soon::before { content: '›'; color: var(--border2); font-size: 0.9em; flex-shrink: 0; }
.resource-coming-soon em { font-size: 0.78rem; opacity: 0.6; font-style: normal; }
.resource-list-plain li {
  font-size: 0.85rem;
  color: var(--text-dim);
  padding: 4px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  display: flex;
  gap: 8px;
}

/* ── Join ─────────────────────────────────────────── */
.join {
  padding: 90px 0;
  background: var(--bg2);
  border-top: 1px solid var(--gold-dim);
}
.steps {
  max-width: 700px;
  margin-bottom: 48px;
  display: flex;
  flex-direction: column;
}
.step:last-child { border-bottom: none; }
.step-number {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--red) 0%, #500000 100%);
  border: 2px solid var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 14px rgba(139,0,0,0.4);
}
.step-content h3 {
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
  margin-top: 14px;
}
.step-content p { color: var(--text-dim); font-size: 0.9rem; line-height: 1.7; }
.step-content p a { color: var(--gold); }
.join-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ── Footer ───────────────────────────────────────── */
.footer {
  background: var(--bg3);
  border-top: 2px solid var(--gold);
}
.footer-banner-strip {
  position: relative;
  height: 60px;
  overflow: hidden;
}
.footer-banner-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.5;
}
.footer-banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, var(--bg3) 0%, transparent 20%, transparent 80%, var(--bg3) 100%);
}
.footer .container { padding: 40px 24px 0; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
.footer-logo {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1rem;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.footer-brand p { color: var(--text-muted); font-size: 0.84rem; line-height: 1.7; margin-bottom: 16px; }
.footer-external { display: flex; gap: 16px; flex-wrap: wrap; }
.footer-external a {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 5px 12px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  transition: all var(--transition);
}
.footer-external a:hover { color: var(--gold); border-color: var(--gold-dim); }
.footer-links h4 {
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 14px;
}
.footer-links ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--text-muted); font-size: 0.85rem; transition: color var(--transition); }
.footer-links a:hover { color: var(--white); }
.footer-social {
  border-top: 1px solid var(--border);
  padding: 28px 0 20px;
}
.footer-social h4 {
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 16px;
}
.footer-social-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  font-size: 0.8rem;
  color: var(--text-muted);
  transition: all var(--transition);
}
.social-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.social-ig:hover { border-color: #c13584; color: #e1306c; box-shadow: 0 0 12px rgba(193,53,132,0.3); }
.social-fb:hover { border-color: #1877f2; color: #4299e1; box-shadow: 0 0 12px rgba(24,119,242,0.3); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 16px 0;
}
.footer-bottom p { color: var(--text-muted); font-size: 0.75rem; line-height: 1.6; }

/* ── Detachment Grid ─────────────────────────────── */
.detachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.detachment-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
}
.detachment-card:hover {
  border-color: var(--gold-dim);
  background: var(--card2);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  color: var(--text);
}
.detachment-abbr {
  font-family: var(--font-head);
  font-size: 0.62rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.detachment-full {
  font-size: 0.78rem;
  color: var(--text-dim);
  line-height: 1.4;
}
.detachment-card:hover .detachment-full { color: var(--text); }

/* ── Map Event Link ──────────────────────────────── */
.map-detail-event {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: rgba(139,0,0,0.12);
  border: 1px solid rgba(139,0,0,0.4);
  border-radius: var(--radius);
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #e08080;
  transition: all var(--transition);
  margin-top: 4px;
}
.map-detail-event:hover {
  background: rgba(139,0,0,0.25);
  border-color: var(--red-bright);
  color: #ffaaaa;
}

/* ── Step hover enhancements ─────────────────────── */
.step {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
  border-radius: 4px;
}
.step:hover .step-number {
  box-shadow: 0 0 24px rgba(139,0,0,0.6), 0 0 0 1px var(--gold-dim);
}
.step-number {
  transition: box-shadow 0.3s ease;
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 700px) {
  .squad-badge-ring { width: 84px; height: 84px; }
  .squad-badge-grid { gap: 16px 12px; padding: 24px 16px 28px; }
}

@media (max-width: 960px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 60px; left: 0; right: 0;
    background: rgba(8,0,4,0.99);
    border-bottom: 1px solid var(--gold-dim);
    padding: 16px 24px;
    gap: 16px;
  }
  .map-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: auto 480px auto;
    height: auto;
  }
  .map-controls {
    border-right: none;
    border-bottom: 1px solid var(--border2);
    flex-direction: row;
    flex-wrap: wrap;
    padding: 14px;
  }
  .map-legend { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .map-sidebar { border-left: none; border-top: 1px solid var(--border2); min-height: 160px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
  .hero-stats { flex-direction: column; border-radius: 0; border: none; gap: 0; }
  .hero-stat { border-bottom: 1px solid var(--gold-dim); width: 100%; }
  .hero-stat-divider { display: none; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .join-cta { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
}
