/* ==========================================================================
   EP-NW — The Epic Network
   Design tokens
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* colors */
  --void: #06080a;
  --void-2: #0a0d11;
  --panel: rgba(13, 16, 20, 0.82);
  --panel-solid: #0d1014;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);

  --blue-deep: #1d4ed8;
  --blue: #3b7bff;
  --blue-bright: #6fa3ff;
  --green: #2ecc71;
  --amber: #e8a23c;
  --red: #e4483c;

  --text: #eef1f5;
  --text-muted: #97a1af;
  --text-dim: #5c6472;

  /* type */
  --f-display: 'Oswald', sans-serif;
  --f-body: 'Inter', sans-serif;
  --f-mono: 'JetBrains Mono', monospace;

  /* layout */
  --nav-h: 72px;
  --radius: 10px;
  --radius-sm: 6px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--void);
  color: var(--text);
  font-family: var(--f-body);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }

::selection { background: var(--blue); color: #fff; }

/* ==========================================================================
   Background wipe slideshow
   ========================================================================== */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: var(--void);
}

.bg-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  will-change: clip-path;
  filter: brightness(1.55) contrast(1.05) saturate(1.2);
}

.bg-layer.base { z-index: 1; }

.bg-layer.wipe {
  z-index: 2;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 2.6s cubic-bezier(0.83, 0, 0.17, 1);
}

.bg-layer.wipe.revealed {
  clip-path: inset(0 0 0 0);
}

.bg-veil {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 55% 46% at 50% 34%, rgba(4, 6, 9, 0.62) 0%, rgba(4, 6, 9, 0.22) 65%, rgba(4, 6, 9, 0) 100%),
    linear-gradient(180deg, rgba(6, 8, 10, 0.6) 0%, rgba(6, 8, 10, 0.08) 16%, rgba(6, 8, 10, 0.04) 58%, rgba(4, 6, 8, 0.38) 100%);
}

.bg-wipe-edge {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 56px);
  z-index: 100;
  background: rgba(6, 8, 10, 0.55);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-brand img { height: 28px; width: auto; border-radius: 6px; }

.nav-brand span {
  font-family: var(--f-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: var(--text);
}

.nav-brand .sub {
  color: var(--text-dim);
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 11px;
  letter-spacing: 0.03em;
  margin-left: 2px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.6vw, 34px);
}

.nav-links a {
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  padding: 6px 0;
  transition: color 0.2s ease;
}

.nav-links a:hover { color: var(--text); }

.nav-links a.active { color: var(--blue-bright); }

.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--blue-bright);
}

.nav-links a.discord {
  color: var(--text);
  border: 1px solid var(--border-strong);
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, background 0.2s ease;
}

.nav-links a.discord:hover {
  border-color: var(--blue);
  background: rgba(59, 123, 255, 0.08);
}

.lang-toggle {
  display: flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.lang-toggle button {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.lang-toggle button + button { border-left: 1px solid var(--border-strong); }

.lang-toggle button.active {
  color: #fff;
  background: var(--blue);
}

.lang-toggle button:not(.active):hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

/* ==========================================================================
   Music toggle
   ========================================================================== */
.music-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 95;
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.music-toggle:hover { border-color: var(--blue); transform: scale(1.05); }

.music-toggle svg { width: 19px; height: 19px; }

.music-toggle .icon-muted { display: none; }
.music-toggle.muted .icon-on { display: none; }
.music-toggle.muted .icon-muted { display: block; }

.music-toggle .bars span {
  animation: bar-bounce 0.9s ease-in-out infinite;
}
.music-toggle.muted .bars span { animation: none; }
.music-toggle .bars span:nth-child(1) { animation-delay: 0s; }
.music-toggle .bars span:nth-child(2) { animation-delay: 0.15s; }
.music-toggle .bars span:nth-child(3) { animation-delay: 0.3s; }

@keyframes bar-bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

.fivem-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--f-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 6px 0;
  white-space: nowrap;
}

.fivem-badge .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 6px var(--amber);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 22px;
  cursor: pointer;
}

@media (max-width: 780px) {
  .nav-links {
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--panel-solid);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }
  .nav-links.open { max-height: 320px; }
  .nav-links a {
    width: 100%;
    padding: 16px 24px;
    border-bottom: 1px solid var(--border);
  }
  .nav-links a.active::after { display: none; }
  .nav-toggle { display: block; }
}

/* ==========================================================================
   Status pill (bottom)
   ========================================================================== */
.status-pill {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  color: var(--text-muted);
  backdrop-filter: blur(8px);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: pulse 2s ease-in-out infinite;
}

.status-pill strong { color: var(--text); font-weight: 500; }

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

/* ==========================================================================
   Hero (hub)
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 20px 100px;
}

.hero-mark {
  width: 200px;
  border-radius: 18px;
  margin-bottom: 28px;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.15s;
}

.hero-eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--blue-bright);
  margin-bottom: 14px;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.3s;
}

.hero h1 {
  font-family: var(--f-display);
  font-size: clamp(40px, 7vw, 84px);
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
  color: var(--text);
  opacity: 0;
  animation: rise 0.9s ease forwards 0.45s;
}

.hero p.lead {
  margin-top: 18px;
  font-size: clamp(15px, 1.6vw, 18px);
  color: var(--text-muted);
  max-width: 560px;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.6s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

/* server select cards */
.server-grid {
  margin-top: 64px;
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 300px));
  gap: 22px;
  opacity: 0;
  animation: rise 0.9s ease forwards 0.78s;
}

@media (max-width: 920px) {
  .server-grid { grid-template-columns: 1fr; width: 100%; max-width: 380px; }
}

.server-card.disabled {
  cursor: default;
  opacity: 0.72;
}
.server-card.disabled:hover { transform: none; border-color: var(--border); }

.server-card .soon-tag {
  position: absolute;
  top: 16px;
  right: 16px;
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(232, 162, 60, 0.4);
  background: rgba(232, 162, 60, 0.08);
  padding: 3px 8px;
  border-radius: 999px;
}

.server-card {
  position: relative;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 22px 22px;
  text-align: left;
  overflow: hidden;
  backdrop-filter: blur(6px);
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.server-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.server-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--stripe, var(--blue));
}

.server-card .clearance {
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.server-card h3 {
  font-family: var(--f-display);
  font-size: 22px;
  font-weight: 600;
  margin-top: 8px;
  color: var(--text);
}

.server-card p {
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--text-muted);
  min-height: 42px;
}

.server-card .meta {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--text-dim);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.server-card .go {
  margin-top: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-display);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--blue-bright);
}

.server-card .go svg { width: 13px; height: 13px; transition: transform 0.2s ease; }
.server-card:hover .go svg { transform: translateX(3px); }

/* ==========================================================================
   Server sub-page hero
   ========================================================================== */
.server-hero {
  min-height: 62vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: calc(var(--nav-h) + 40px) 20px 60px;
}

.server-hero .badge {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 6px 14px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.server-hero h1 {
  font-family: var(--f-display);
  font-size: clamp(34px, 6vw, 60px);
  font-weight: 700;
  color: var(--text);
}

.server-hero p.lead {
  margin-top: 14px;
  color: var(--text-muted);
  max-width: 540px;
  font-size: 15.5px;
}

.connect-box {
  margin-top: 30px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 20px;
  font-family: var(--f-mono);
  font-size: 13.5px;
  color: var(--text);
  backdrop-filter: blur(6px);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

a.connect-box:hover {
  border-color: var(--blue);
  background: rgba(59, 123, 255, 0.08);
  transform: translateY(-1px);
}

.connect-box .status-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
}
.connect-box .status-live .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.connect-box .lbl { color: var(--text-dim); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }

.copy-btn {
  background: rgba(59, 123, 255, 0.12);
  border: 1px solid rgba(59, 123, 255, 0.35);
  color: var(--blue-bright);
  font-family: var(--f-mono);
  font-size: 11.5px;
  padding: 5px 10px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.copy-btn:hover { background: rgba(59, 123, 255, 0.22); }

/* ==========================================================================
   Tab system
   ========================================================================== */
.tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 0 20px 0;
  flex-wrap: wrap;
}

.tab-btn {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid transparent;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
  color: var(--blue-bright);
  border-color: var(--border);
  background: var(--panel);
}

.tab-panel { display: none; padding: 40px 20px 120px; }
.tab-panel.active { display: block; animation: rise 0.5s ease; }

.content-shell {
  max-width: 860px;
  margin: 0 auto;
}

.content-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(10px);
  padding: clamp(24px, 4vw, 44px);
}

.content-card h2 {
  font-family: var(--f-display);
  font-size: clamp(22px, 3vw, 30px);
  color: var(--text);
  text-align: center;
}

.content-card .sub-lead {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 520px;
  margin: 12px auto 0;
}

/* language switch */
.lang-switch {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 20px 0 28px;
}

.lang-switch button {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-switch button.active {
  color: var(--void);
  background: var(--blue-bright);
  border-color: var(--blue-bright);
}

/* rules list */
.rule-list { display: flex; flex-direction: column; gap: 0; margin-top: 8px; }

.rule-row {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 16px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--border);
}
.rule-row:last-child { border-bottom: none; }

.rule-num {
  font-family: var(--f-mono);
  font-size: 13px;
  color: var(--accent, var(--blue-bright));
  padding-top: 1px;
}

.rule-row p { font-size: 14.5px; color: var(--text); }
.rule-row p .note { color: var(--text-dim); font-size: 12.5px; }

.placeholder-note {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--amber);
  background: rgba(232, 162, 60, 0.06);
}

/* modlist */
.mod-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.mod-item {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}

.mod-item .top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mod-item h4 {
  font-family: var(--f-display);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--text);
}

.tag {
  font-family: var(--f-mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.tag.qol { color: #6fd0ff; background: rgba(111, 208, 255, 0.1); border: 1px solid rgba(111, 208, 255, 0.25); }
.tag.gameplay { color: #8fe6a8; background: rgba(143, 230, 168, 0.1); border: 1px solid rgba(143, 230, 168, 0.25); }
.tag.utility { color: #d8b4fe; background: rgba(216, 180, 254, 0.1); border: 1px solid rgba(216, 180, 254, 0.25); }
.tag.balance { color: #ffcf7d; background: rgba(255, 207, 125, 0.1); border: 1px solid rgba(255, 207, 125, 0.25); }

.mod-item p { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }

.mod-section-title {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin: 32px 0 12px;
}
.mod-section-title:first-child { margin-top: 0; }

/* discord CTA at bottom of tabs */
.discord-cta {
  max-width: 860px;
  margin: 28px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 26px;
  backdrop-filter: blur(10px);
  flex-wrap: wrap;
}

.discord-cta .txt h3 {
  font-family: var(--f-display);
  font-size: 16px;
  color: var(--text);
}
.discord-cta .txt p { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

.btn-primary {
  font-family: var(--f-display);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(135deg, var(--blue-deep), var(--blue));
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  transition: filter 0.2s ease, transform 0.2s ease;
  display: inline-block;
}
.btn-primary:hover { filter: brightness(1.12); transform: translateY(-1px); }

/* footer */
.site-footer {
  text-align: center;
  padding: 40px 20px 60px;
  font-family: var(--f-mono);
  font-size: 11.5px;
  color: var(--text-dim);
}
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--blue-bright); }
