/* ==========================================================================
   KINGDOMS — Minecraft Server
   Design tokens: dusk-stone background, aged gold accent, parchment text.
   Type: Cinzel (display / regal), Manrope (body), JetBrains Mono (data/IP).
   ========================================================================== */

@view-transition {
  navigation: auto;
}

:root {
  /* -- Color -- */
  --bg: #0d0b10;
  --bg-alt: #121016;
  --surface: #18151f;
  --surface-2: #1e1a26;
  --line: rgba(232, 179, 76, 0.12);
  --line-strong: rgba(232, 179, 76, 0.28);

  --gold: #d4a03d;
  --gold-bright: #f2c97d;
  --gold-dim: #7a5c20;

  --text: #e6dfd1;
  --text-muted: #9a92a0;
  --text-faint: #5d5665;

  --danger: #c9634a;
  --ok: #8fae5e;

  /* -- Type -- */
  --font-display: "Cinzel", "Georgia", serif;
  --font-body: "Manrope", "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", "Consolas", monospace;

  /* -- Layout -- */
  --maxw: 1100px;
  --radius: 12px;
  --radius-sm: 8px;

  /* -- Motion -- */
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --fast: 160ms;
  --med: 340ms;
}

/* ==========================================================================
   Custom Scrollbar
   ========================================================================== */

::-webkit-scrollbar {
  width: 10px !important;
  background-color: var(--bg) !important;
}

::-webkit-scrollbar-thumb {
  background-color: var(--surface-2) !important;
  border: 2px solid var(--bg) !important;
  border-radius: 10px !important;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--gold-dim) !important;
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--surface-2) var(--bg);
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(1000px 600px at 50% -5%, rgba(212, 160, 61, 0.04), transparent 70%);
}

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4 { margin: 0; color: var(--text); }
a { color: inherit; text-decoration: none; transition: 0.2s; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img, svg { display: block; max-width: 100%; }

/* ==========================================================================
   Buttons (SPOJNE)
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 28px;
  font-weight: 700;
  font-size: 15px;
  border-radius: var(--radius-sm);
  transition: all var(--fast) var(--ease);
  text-align: center;
  gap: 10px;
}

.btn-primary {
  background: var(--gold);
  color: #120e05;
}

.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px -8px rgba(212, 160, 61, 0.5);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border: 1px solid var(--line-strong);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--gold);
}

.btn-sm {
  padding: 10px 20px;
  font-size: 13px;
}

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 24px 0;
  transition: all 0.3s var(--ease);
}

.navbar.is-scrolled {
  padding: 14px 0;
  background: rgba(13, 11, 16, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.brand-logo { height: 40px; width: auto; }

.nav-links { display: flex; gap: 8px; align-items: center; }
.nav-links a {
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}

.nav-links a:hover, .nav-links a.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Przycisk IP w Navbarze */
.nav-ip-btn {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  color: var(--gold-bright);
  padding: 10px 18px;
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  transition: 0.2s;
}

.nav-ip-btn:hover {
  background: var(--gold);
  color: #000;
  border-color: var(--gold);
}

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  position: relative;
  padding: 180px 0 120px;
  text-align: center;
}

.hero h1 { font-family: var(--font-display); font-size: clamp(40px, 8vw, 72px); line-height: 1.1; margin-bottom: 24px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero-sub { font-size: clamp(17px, 2vw, 19px); color: var(--text-muted); max-width: 650px; margin: 0 auto 48px; }

.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

.ip-box {
  display: flex;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  min-width: 320px;
  overflow: hidden;
}

.ip-value {
  flex: 1;
  padding: 0 24px;
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 700;
  color: var(--gold-bright);
}

.ip-box button {
  background: var(--surface-2);
  padding: 16px 28px;
  font-weight: 800;
  font-size: 14px;
  border-left: 1px solid var(--line-strong);
  transition: 0.2s;
}

.ip-box button:hover { background: var(--gold); color: #000; }

/* ==========================================================================
   Stats
   ========================================================================== */

.stats { padding: 80px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stats-grid { display: flex; justify-content: center; gap: clamp(30px, 8vw, 100px); flex-wrap: wrap; }
.stat { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: clamp(32px, 5vw, 42px); color: var(--gold); line-height: 1; margin-bottom: 8px; }
.stat-label { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; }

/* ==========================================================================
   Features
   ========================================================================== */

.section { padding: 100px 0; }
.section-head { max-width: 700px; margin: 0 auto 60px; text-align: center; }
.section-head h2 { font-size: clamp(30px, 5vw, 40px); margin-bottom: 20px; }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature-card {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 48px 32px;
  border-radius: var(--radius);
  text-align: center;
  transition: 0.3s;
}
.feature-card:hover { transform: translateY(-5px); border-color: var(--gold-dim); }
.feature-icon { width: 40px; height: 40px; color: var(--gold); margin: 0 auto 24px; }

/* ==========================================================================
   Regulamin Page
   ========================================================================== */

.rules-header { padding: 180px 0 60px; text-align: center; background: var(--bg-alt); }
.rules-layout { display: grid; grid-template-columns: 280px 1fr; gap: 80px; padding: 80px 0; }

.rules-toc { position: sticky; top: 120px; align-self: start; }
.rules-toc span { display: block; font-family: var(--font-mono); font-size: 11px; color: var(--text-faint); text-transform: uppercase; margin-bottom: 20px; }
.rules-toc a {
  display: block;
  padding: 10px 20px;
  font-size: 14px;
  color: var(--text-muted);
  border-left: 2px solid var(--line);
  margin-bottom: 4px;
}
.rules-toc a:hover, .rules-toc a.is-active { color: var(--gold); border-left-color: var(--gold); background: rgba(212, 160, 61, 0.05); }

.rules-body section { margin-bottom: 80px; scroll-margin-top: 120px; }
.rules-body h2 { font-size: 26px; margin-bottom: 24px; border-bottom: 1px solid var(--line); padding-bottom: 12px; display: flex; gap: 12px; }
.rules-body .idx { color: var(--gold); font-family: var(--font-mono); font-size: 18px; }
.rules-body ol { list-style: none; counter-reset: r; padding: 0; }
.rules-body li { counter-increment: r; position: relative; padding-left: 40px; margin-bottom: 18px; color: var(--text-muted); line-height: 1.7; }
.rules-body li::before { content: counter(r, decimal-leading-zero); position: absolute; left: 0; color: var(--gold); font-family: var(--font-mono); font-size: 12px; top: 3px; }

.tag { font-family: var(--font-mono); font-size: 10px; padding: 2px 8px; border-radius: 4px; margin-left: 8px; vertical-align: middle; }
.tag-ban { background: rgba(201, 99, 74, 0.1); color: var(--danger); }

/* ==========================================================================
   Footer (MINIMAL)
   ========================================================================== */

.site-footer {
  padding: 60px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-logo { height: 32px; width: auto; margin: 0 auto 24px; opacity: 0.8; }
.footer-bottom { color: var(--text-faint); font-size: 13px; }

/* ==========================================================================
   Mobile
   ========================================================================== */

@media (max-width: 900px) {
  .nav-links {
    position: fixed; top: 0; right: 0; bottom: 0; width: 280px;
    background: var(--surface); flex-direction: column; padding: 120px 30px;
    transform: translateX(100%); transition: 0.3s;
  }
  body.menu-open .nav-links { transform: translateX(0); }
  .rules-layout { grid-template-columns: 1fr; }
  .rules-toc { display: none; }
  .features-grid { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
}

@media (max-width: 600px) {
  .hero { padding: 150px 0 80px; }
  .ip-box { flex-direction: column; min-width: auto; width: 100%; }
}