/* ============================================
   PALPOCALYPSE — dark clean w/ apocalyptic edge
   ============================================ */

:root {
  --bg: #0a0908;
  --bg-2: #12100e;
  --bg-3: #1a1714;
  --border: #26221e;
  --border-2: #35302a;
  --text: #ece7de;
  --muted: #8a827a;
  --muted-2: #6b645d;
  --accent: #e8763a;
  --accent-2: #ff8a3d;
  --accent-dim: #a8542a;
  --danger: #c44532;
  --success: #6b9b5e;

  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 14px;

  --font-display: "Oswald", "Bebas Neue", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --shadow-glow: 0 0 40px -10px rgba(232, 118, 58, 0.35);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  font-size: 15px;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

/* Subtle noise + ember background */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(1200px 600px at 50% -10%, rgba(232, 118, 58, 0.08), transparent 60%),
    radial-gradient(800px 400px at 90% 110%, rgba(196, 69, 50, 0.06), transparent 60%);
  z-index: 0;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  z-index: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

main, header, footer { position: relative; z-index: 1; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.05;
  text-transform: uppercase;
  color: var(--text);
}

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--accent);
}

a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 9, 8, 0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
  gap: 24px;
}
.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: 0.05em;
}
.nav-brand img { height: 36px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}
.nav-links a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
  position: relative;
  padding: 4px 0;
}
.nav-links a:hover { color: var(--text); }
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.2s;
}
.nav-links a:hover::after { width: 100%; }

.nav-right {
  display: flex;
  align-items: center;
  gap: 14px;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.lang-switch button {
  background: transparent;
  border: 0;
  color: var(--muted);
  padding: 6px 10px;
  cursor: pointer;
  font-family: inherit;
  font-size: inherit;
  letter-spacing: inherit;
  transition: all 0.15s;
}
.lang-switch button.active {
  background: var(--accent);
  color: var(--bg);
}
.lang-switch button:not(.active):hover { color: var(--text); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--accent);
  color: #1a0f08;
  border-color: var(--accent);
}
.btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  box-shadow: 0 8px 24px -8px rgba(232, 118, 58, 0.5);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-2);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn-discord {
  background: #5865F2;
  color: #fff;
  border-color: #5865F2;
}
.btn-discord:hover {
  background: #4752c4;
  border-color: #4752c4;
  transform: translateY(-1px);
}
.btn svg { width: 16px; height: 16px; }

/* ============ HERO ============ */
.hero {
  padding: 100px 0 120px;
  text-align: center;
  position: relative;
}
.hero-logo {
  max-width: 520px;
  width: 80%;
  height: auto;
  margin: 0 auto 8px;
  display: block;
  filter: drop-shadow(0 0 60px rgba(232, 118, 58, 0.25));
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 40px;
}
.hero-tagline .dot {
  color: var(--accent);
  margin: 0 12px;
}
.hero-ctas {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

/* Countdown */
.countdown-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 20px 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(20, 18, 16, 0.5);
  backdrop-filter: blur(8px);
}
.countdown-label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
}
.countdown-label .pulse {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  margin-right: 8px;
  animation: pulse 1.6s ease-in-out infinite;
  vertical-align: middle;
}
@keyframes pulse {
  0%, 100% { opacity: 0.3; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); box-shadow: 0 0 12px var(--accent); }
}
.countdown {
  display: flex;
  gap: 18px;
  font-family: var(--font-display);
}
.countdown-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 56px;
}
.countdown-num {
  font-size: 36px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.countdown-lbl {
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
  margin-top: 6px;
}

/* ============ SECTION HEADERS ============ */
section { padding: 80px 0; position: relative; }
.section-head {
  text-align: center;
  margin-bottom: 48px;
}
.section-head h2 {
  font-size: clamp(32px, 4vw, 44px);
  margin: 14px 0 10px;
}
.section-head p {
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
}

/* ============ SERVER ============ */
.server-card {
  max-width: 780px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}
.server-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.server-connect {
  padding: 34px 28px 32px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.server-connect-label {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.server-connect-ip {
  font-family: var(--font-display);
  font-size: clamp(30px, 4vw, 46px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-shadow: 0 0 26px rgba(232, 118, 58, 0.22);
  overflow-wrap: anywhere;
}
.server-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 2px;
}
.server-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: rgba(107, 155, 94, 0.12);
  border: 1px solid rgba(107, 155, 94, 0.3);
  border-radius: 100px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--success);
  font-family: var(--font-display);
}
.server-status .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
  animation: pulse-green 2s ease-in-out infinite;
}
.server-status.offline {
  background: rgba(196, 69, 50, 0.12);
  border-color: rgba(196, 69, 50, 0.35);
  color: var(--danger);
}
.server-status.offline .dot {
  background: var(--danger);
  box-shadow: 0 0 8px var(--danger);
}
.server-players {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
@keyframes pulse-green {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.server-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
}
.server-cell {
  background: var(--bg-2);
  padding: 24px 20px;
  text-align: center;
}
.server-cell .lbl {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
  font-family: var(--font-display);
  margin-bottom: 8px;
}
.server-cell .val {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--text);
  letter-spacing: 0.03em;
}
.server-cell .val.accent { color: var(--accent); }

/* ============ VIP ============ */
.vip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  max-width: 980px;
  margin: 0 auto;
  align-items: stretch;
}
.vip-card {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-3) 100%);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  text-align: center;
  position: relative;
  box-shadow: var(--shadow-glow);
  display: flex;
  flex-direction: column;
}
.vip-card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: var(--radius-lg);
  padding: 1px;
  background: linear-gradient(180deg, var(--accent) 0%, transparent 60%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}
.vip-card.featured {
  border-color: rgba(232, 118, 58, 0.7);
  transform: translateY(-8px);
}
.vip-badge {
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 12px;
  background: rgba(232, 118, 58, 0.14);
  border: 1px solid rgba(232, 118, 58, 0.45);
  color: var(--accent);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.vip-tier {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 22px 0 8px;
}
.vip-price {
  font-family: var(--font-display);
  font-size: 64px;
  font-weight: 600;
  color: var(--text);
  line-height: 1;
  margin: 16px 0 4px;
}
.vip-price .currency {
  font-size: 24px;
  vertical-align: top;
  margin-right: 4px;
  color: var(--muted);
}
.vip-price .cents {
  font-size: 24px;
  color: var(--muted);
}
.vip-period {
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: var(--font-display);
  margin-bottom: 32px;
}
.vip-features {
  list-style: none;
  text-align: left;
  margin: 0 0 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.vip-features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14px;
  color: var(--text);
}
.vip-features li svg {
  flex-shrink: 0;
  margin-top: 3px;
  color: var(--accent);
  width: 14px;
  height: 14px;
}
.vip-card .btn { width: 100%; }
.vip-note {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin: 24px auto 0;
  max-width: 620px;
}
@media (max-width: 760px) {
  .vip-grid { grid-template-columns: 1fr; }
  .vip-card.featured { transform: none; }
}

/* ============ RANKING ============ */
.ranking {
  max-width: 820px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.ranking-row {
  display: grid;
  grid-template-columns: 60px 1fr 100px 100px 100px;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}
.ranking-row:last-child { border-bottom: 0; }
.ranking-row.head {
  background: var(--bg-3);
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.ranking-row:not(.head):hover {
  background: rgba(232, 118, 58, 0.04);
}
.rank-pos {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--muted-2);
}
.ranking-row:nth-child(2) .rank-pos { color: var(--accent); }
.ranking-row:nth-child(3) .rank-pos { color: #c9a45c; }
.ranking-row:nth-child(4) .rank-pos { color: #a08876; }
.rank-tribe {
  font-family: var(--font-display);
  font-size: 17px;
  letter-spacing: 0.03em;
}
.rank-stat {
  font-family: var(--font-display);
  font-size: 17px;
  text-align: right;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.rank-stat.dim { color: var(--muted); }

/* ============ RULES ============ */
.rules-grid {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.rule {
  display: flex;
  gap: 16px;
  padding: 20px 22px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.15s;
}
.rule:hover { border-color: var(--border-2); }
.rule-num {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--accent);
  line-height: 1;
  flex-shrink: 0;
  min-width: 28px;
}
.rule-body h4 {
  font-size: 15px;
  margin-bottom: 4px;
  letter-spacing: 0.05em;
}
.rule-body p {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ============ DISCORD ============ */
.discord-widget {
  max-width: 780px;
  margin: 0 auto;
  background: linear-gradient(135deg, #2a2440 0%, #1a1725 100%);
  border: 1px solid #3a3352;
  border-radius: var(--radius-lg);
  padding: 40px 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 32px;
  position: relative;
  overflow: hidden;
}
.discord-widget::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(88, 101, 242, 0.2), transparent 60%);
  pointer-events: none;
}
.discord-body { position: relative; }
.discord-body h3 {
  font-size: 26px;
  margin-bottom: 8px;
}
.discord-body p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 4px;
}
.discord-stats {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}
.discord-stats span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.discord-stats .g-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: #43b581;
  box-shadow: 0 0 6px #43b581;
}
.discord-cta { position: relative; }

/* ============ FOOTER ============ */
footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 60px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}
.footer-brand img { height: 48px; margin-bottom: 14px; }
.footer-brand p {
  font-size: 13px;
  color: var(--muted);
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted-2);
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a {
  font-size: 13px;
  color: var(--text);
  transition: color 0.15s;
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted-2);
  flex-wrap: wrap;
  gap: 12px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .hero { padding: 60px 0 80px; }
  .hero-logo { max-width: 340px; width: 85%; }
  .hero-tagline { font-size: 12px; letter-spacing: 0.2em; }
  .hero-tagline .dot { margin: 0 8px; }
  .countdown-wrap { padding: 16px 20px; width: 100%; max-width: 340px; }
  .countdown { gap: 10px; }
  .countdown-unit { min-width: 44px; }
  .countdown-num { font-size: 28px; }
  section { padding: 60px 0; }
  .server-grid { grid-template-columns: repeat(2, 1fr); }
  .ranking-row { grid-template-columns: 40px 1fr 70px 70px; padding: 14px 16px; }
  .ranking-row .rank-stat:nth-of-type(3) { display: none; }
  .ranking-row.head span:nth-child(5) { display: none; }
  .rules-grid { grid-template-columns: 1fr; }
  .discord-widget {
    grid-template-columns: 1fr;
    text-align: center;
    padding: 32px 24px;
  }
  .discord-stats { justify-content: center; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Focus states for accessibility */
button:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Server connect layout refresh */
.server-card .server-connect {
  padding: 38px 28px 34px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.server-card .server-connect-label {
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--muted-2);
}
.server-card .server-connect-ip {
  font-family: var(--font-display);
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 0 28px rgba(232, 118, 58, 0.25);
  overflow-wrap: anywhere;
}
.server-card .server-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.server-card .server-grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 760px) {
  .server-card .server-connect-ip {
    font-size: 30px;
  }
}

