/* ==========================================================================
   Landkreis Kernstadt – Website Styles
   ========================================================================== */

:root {
  --bg: #07090d;
  --bg-2: #0c1017;
  --surface: #11161f;
  --surface-2: #161c27;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #e8ecf2;
  --text-2: #a3adbd;
  --text-3: #6b7587;
  --accent: #ff2e3b;
  --accent-2: #ff6b74;
  --accent-soft: rgba(255, 46, 59, 0.12);
  --blue: #2f5fd8;
  --red: #e5534b;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.7);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI", "Inter", system-ui, sans-serif;
  --nav-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 24px); }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent); color: #fff; }

.container { width: min(1200px, 100% - 48px); margin-inline: auto; }
.container-narrow { width: min(900px, 100% - 48px); margin-inline: auto; }

/* Noise / grain overlay */
body::before {
  content: "";
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 1000;
  display: grid; place-items: center;
  background: var(--bg);
  transition: opacity .6s var(--ease), visibility .6s;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-inner { display: grid; justify-items: center; gap: 18px; }
.preloader .logo-mark { width: 64px; height: 64px; animation: pulse 1.4s var(--ease) infinite; }
.preloader-bar { width: 160px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.preloader-bar span { display: block; height: 100%; width: 40%; background: var(--accent); animation: loadbar 1s var(--ease) infinite; }
@keyframes loadbar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.92); opacity: .7; } }

/* ---------- Progress bar ---------- */
.progress {
  position: fixed; top: 0; left: 0; height: 2px; width: 100%;
  transform-origin: 0 50%; transform: scaleX(0);
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 60;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s, border-color .3s, backdrop-filter .3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(7, 9, 13, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.nav .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: .2px; }
.brand .logo-mark { width: 38px; height: 38px; transition: transform .5s var(--ease); }
.brand:hover .logo-mark { transform: rotate(-8deg) scale(1.06); }
.brand-text { display: grid; line-height: 1.1; }
.brand-text small { font-size: 11px; font-weight: 600; color: var(--accent); letter-spacing: 2.4px; text-transform: uppercase; }
.brand-text span { font-size: 16px; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  position: relative; display: block;
  padding: 8px 14px; border-radius: 10px;
  color: var(--text-2); font-size: 14.5px; font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-links a:hover { color: var(--text); background: rgba(255,255,255,.04); }
.nav-links a.active { color: var(--text); }
.nav-links a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 2px;
  background: var(--accent); border-radius: 2px;
}
.nav-cta { display: flex; align-items: center; gap: 10px; }

.burger {
  display: none; width: 42px; height: 42px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  color: var(--text); cursor: pointer; position: relative;
}
.burger span, .burger span::before, .burger span::after {
  position: absolute; left: 50%; width: 18px; height: 2px; background: currentColor; border-radius: 2px;
  transform: translateX(-50%); transition: transform .3s var(--ease), opacity .2s;
}
.burger span { top: 50%; margin-top: -1px; }
.burger span::before, .burger span::after { content: ""; left: 0; transform: none; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.nav-open .burger span { background: transparent; }
.nav-open .burger span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .burger span::after { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  position: fixed; inset: var(--nav-h) 0 0 0; z-index: 49;
  background: rgba(7, 9, 13, .97);
  backdrop-filter: blur(16px);
  padding: 32px 24px;
  display: flex; flex-direction: column; gap: 6px;
  opacity: 0; visibility: hidden; transform: translateY(-10px);
  transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
}
.nav-open .mobile-menu { opacity: 1; visibility: visible; transform: none; }
.mobile-menu a {
  padding: 16px 4px; font-size: 22px; font-weight: 600;
  border-bottom: 1px solid var(--line); color: var(--text-2);
}
.mobile-menu a.active { color: var(--accent); }
.mobile-menu .btn { margin-top: 24px; justify-content: center; }

/* ---------- Buttons ---------- */
.btn {
  --b: var(--line-strong);
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px;
  font-weight: 600; font-size: 15px; line-height: 1;
  border: 1px solid var(--b);
  background: rgba(255,255,255,.03);
  color: var(--text);
  cursor: pointer;
  transition: transform .25s var(--ease), border-color .25s, background .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.28); background: rgba(255,255,255,.06); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), #991d24);
  color: #ffffff; border-color: transparent;
  box-shadow: inset 0 0 18px rgba(255,46,59,.3);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--accent-2), var(--accent)); box-shadow: inset 0 0 26px rgba(255,46,59,.5); border-color: transparent; }
.btn-primary::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .8s var(--ease);
}
.btn-primary:hover::after { transform: translateX(120%); }
.btn-discord { background: #5865f2; border-color: transparent; color: #fff; }
.btn-discord:hover { background: #6b77f5; border-color: transparent; box-shadow: inset 0 0 26px rgba(88,101,242,.55); }
.btn-sm { padding: 10px 16px; font-size: 14px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--nav-h) + 40px) 0 80px;
  overflow: hidden; isolation: isolate;
}
.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-bg canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-grid {
  position: absolute; inset: -2px;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 40%, #000 30%, transparent 75%);
  animation: gridmove 24s linear infinite;
}
@keyframes gridmove { to { background-position: 64px 64px, 64px 64px; } }
.orb {
  position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55;
  animation: float 18s ease-in-out infinite;
}
.orb-1 { width: 520px; height: 520px; background: radial-gradient(circle, rgba(255,46,59,.55), transparent 65%); top: -120px; right: -80px; }
.orb-2 { width: 600px; height: 600px; background: radial-gradient(circle, rgba(75,139,255,.38), transparent 65%); bottom: -220px; left: -160px; animation-delay: -6s; }
.orb-3 { width: 340px; height: 340px; background: radial-gradient(circle, rgba(229,83,75,.28), transparent 65%); top: 40%; left: 45%; animation-delay: -11s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(40px, -30px) scale(1.06); }
  66% { transform: translate(-30px, 25px) scale(.95); }
}
.hero-vignette { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, var(--bg) 100%); }

.hero-content { position: relative; max-width: 880px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 10px; border-radius: 999px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: .3px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: ping 2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(61,220,132,.55); } 70% { box-shadow: 0 0 0 10px rgba(61,220,132,0); } 100% { box-shadow: 0 0 0 0 rgba(61,220,132,0); } }

.hero h1 {
  margin: 26px 0 22px;
  font-family: var(--font-display);
  font-size: clamp(44px, 8.2vw, 104px);
  line-height: .98; letter-spacing: -0.035em; font-weight: 800;
}
.hero h1 .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero h1 .line > span { display: inline-block; transform: translateY(110%); animation: rise 1.1s var(--ease) forwards; }
.hero h1 .line:nth-child(2) > span { animation-delay: .12s; }
.gradient-text {
  background: linear-gradient(100deg, #ff8080 0%, var(--accent) 45%, #4a78ff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% auto; animation: rise 1.1s var(--ease) .12s forwards, shine 6s linear infinite 1.2s;
}
@keyframes shine { to { background-position: 200% center; } }
@keyframes rise { to { transform: translateY(0); } }

.hero-lead { font-size: clamp(17px, 2vw, 20px); color: var(--text-2); max-width: 620px; margin: 0 0 36px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.fade-up { opacity: 0; transform: translateY(24px); animation: fadeup 1s var(--ease) forwards; }
.d1 { animation-delay: .35s; } .d2 { animation-delay: .5s; } .d3 { animation-delay: .65s; } .d4 { animation-delay: .8s; }
@keyframes fadeup { to { opacity: 1; transform: none; } }

.hero-meta { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 56px; color: var(--text-3); font-size: 14px; }
.hero-meta div { display: flex; align-items: center; gap: 10px; }
.hero-meta svg { width: 18px; height: 18px; color: var(--accent); }

.scroll-hint {
  position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 8px;
  color: var(--text-3); font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase;
}
.scroll-hint .mouse { width: 22px; height: 34px; border: 2px solid var(--text-3); border-radius: 12px; position: relative; }
.scroll-hint .mouse::after { content: ""; position: absolute; left: 50%; top: 6px; width: 3px; height: 7px; margin-left: -1.5px; border-radius: 2px; background: var(--accent); animation: wheel 1.8s infinite; }
@keyframes wheel { 0% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(12px); } }

/* ---------- Ticker ---------- */
.ticker { border-block: 1px solid var(--line); background: var(--bg-2); overflow: hidden; padding: 18px 0; }
.ticker-track { display: flex; gap: 56px; width: max-content; animation: marquee 40s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item { display: flex; align-items: center; gap: 14px; white-space: nowrap; color: var(--text-2); font-weight: 600; font-size: 15px; letter-spacing: .3px; text-transform: uppercase; }
.ticker-item::before { content: ""; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: 120px 0; }
.section-alt { background: var(--bg-2); border-block: 1px solid var(--line); }
.section-head { max-width: 680px; margin-bottom: 60px; }
.section-head.center { text-align: center; margin-inline: auto; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: 2.4px; text-transform: uppercase;
}
.kicker::before { content: ""; width: 24px; height: 2px; background: currentColor; }
.section-head.center .kicker::after { content: ""; width: 24px; height: 2px; background: currentColor; }
.section-head h2, .h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4.6vw, 54px); line-height: 1.06; letter-spacing: -0.025em; font-weight: 800;
  margin: 16px 0 18px;
}
.section-head p { color: var(--text-2); font-size: 18px; margin: 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(36px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal-left { opacity: 0; transform: translateX(-40px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-left.in { opacity: 1; transform: none; }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal-scale.in { opacity: 1; transform: none; }

/* ---------- Stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--bg); padding: 36px 30px; }
.stat-num { font-family: var(--font-display); font-size: clamp(38px, 4.5vw, 56px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat-num .unit { color: var(--accent); }
.stat-label { margin-top: 10px; color: var(--text-2); font-size: 15px; }

/* ---------- Cards / features ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--surface), var(--bg-2));
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 32px;
  transition: transform .5s var(--ease), border-color .4s, box-shadow .5s var(--ease);
}
.card::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%), rgba(255,46,59,.14), transparent 45%);
  opacity: 0; transition: opacity .4s;
}
.card:hover { transform: translateY(-6px); border-color: rgba(255,46,59,.28); box-shadow: inset 0 0 40px rgba(255,46,59,.1); }
.card:hover::before { opacity: 1; }
.card-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(255,46,59,.25);
  margin-bottom: 24px;
  transition: transform .5s var(--ease);
}
.card:hover .card-icon { transform: rotate(-6deg) scale(1.08); }
.card-icon svg { width: 24px; height: 24px; }
.card h3 { font-size: 21px; margin: 0 0 10px; letter-spacing: -0.01em; }
.card p { margin: 0; color: var(--text-2); font-size: 15.5px; }

/* Rule link cards (big) */
.doc-card { display: flex; flex-direction: column; min-height: 340px; padding: 40px; }
.doc-card .doc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: auto; }
.doc-card .doc-tag { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-3); border: 1px solid var(--line); padding: 6px 10px; border-radius: 8px; }
.doc-card .doc-big { font-family: var(--font-display); font-size: 120px; line-height: .8; font-weight: 800; color: rgba(255,255,255,.04); letter-spacing: -0.05em; transition: color .5s, transform .6s var(--ease); }
.doc-card:hover .doc-big { color: rgba(255,46,59,.14); transform: translateX(-8px); }
.doc-card h3 { font-size: 30px; margin: 30px 0 12px; }
.doc-card .doc-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 26px; padding: 0; list-style: none; }
.doc-card .doc-list li { font-size: 13px; color: var(--text-2); background: rgba(255,255,255,.04); border: 1px solid var(--line); border-radius: 8px; padding: 5px 10px; }
.arrow-link { display: inline-flex; align-items: center; gap: 10px; color: var(--accent); font-weight: 600; }
.arrow-link svg { width: 18px; height: 18px; transition: transform .35s var(--ease); }
.card:hover .arrow-link svg, .arrow-link:hover svg { transform: translateX(6px); }

/* Steps */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; position: relative; }
.steps::before {
  content: ""; position: absolute; top: 31px; left: 6%; right: 6%; height: 2px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 10%, var(--line-strong) 90%, transparent);
}
.step { position: relative; text-align: left; }
.step-num {
  position: relative; z-index: 1;
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--bg); border: 1px solid var(--line-strong);
  font-family: var(--font-display); font-weight: 800; font-size: 22px; color: var(--accent);
  margin-bottom: 24px;
  transition: background .4s, color .4s, transform .5s var(--ease), box-shadow .4s;
}
.step:hover .step-num { background: var(--accent); color: #ffffff; transform: scale(1.08); box-shadow: none; }
.step h3 { font-size: 19px; margin: 0 0 8px; }
.step p { color: var(--text-2); font-size: 15px; margin: 0; }

/* Factions */
.faction-tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 36px; }
.faction-tab {
  border: 0; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px;
  padding: 11px 20px; border-radius: 10px; color: var(--text-2); background: transparent;
  transition: color .25s, background .25s;
}
.faction-tab.active { background: var(--accent); color: #ffffff; }
.faction-panel { display: none; }
.faction-panel.active { display: block; animation: fadeup .6s var(--ease); }
.chips { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.chip {
  display: flex; align-items: center; gap: 12px;
  padding: 18px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line);
  font-weight: 600; font-size: 15px;
  transition: border-color .3s, transform .4s var(--ease), background .3s;
}
.chip:hover { border-color: rgba(255,46,59,.35); transform: translateY(-3px); background: var(--surface-2); }
.chip-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; }

.tier-table, .data-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  font-size: 15px;
}
.tier-table th, .tier-table td, .data-table th, .data-table td { padding: 16px 20px; text-align: left; border-bottom: 1px solid var(--line); }
.tier-table th, .data-table th { background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 13px; letter-spacing: .6px; text-transform: uppercase; }
.tier-table tr:last-child td, .data-table tr:last-child td { border-bottom: 0; }
.tier-table tbody tr, .data-table tbody tr { transition: background .2s; }
.tier-table tbody tr:hover, .data-table tbody tr:hover { background: rgba(255,255,255,.025); }
.yes { color: #3ddc84; font-weight: 600; }
.no { color: var(--text-3); }
.badge-num {
  display: inline-grid; place-items: center; min-width: 36px; height: 30px; padding: 0 10px;
  border-radius: 8px; background: var(--accent-soft); color: var(--accent); font-weight: 700;
  border: 1px solid rgba(255,46,59,.25);
}
.table-wrap { overflow-x: auto; border-radius: var(--radius); }

/* FAQ */
.faq { display: grid; gap: 12px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; transition: border-color .3s; }
.faq-item.open { border-color: rgba(255,46,59,.3); }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 26px; background: none; border: 0; color: var(--text);
  font: inherit; font-size: 17px; font-weight: 600; text-align: left; cursor: pointer;
}
.faq-q .plus { position: relative; width: 18px; height: 18px; flex: none; }
.faq-q .plus::before, .faq-q .plus::after { content: ""; position: absolute; left: 0; top: 50%; width: 18px; height: 2px; margin-top: -1px; background: var(--accent); border-radius: 2px; transition: transform .4s var(--ease); }
.faq-q .plus::after { transform: rotate(90deg); }
.faq-item.open .plus::after { transform: rotate(0); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.faq-item.open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { margin: 0; padding: 0 26px 24px; color: var(--text-2); }

/* CTA */
.cta {
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: 28px; padding: 80px 60px; text-align: center;
  background: linear-gradient(135deg, #1c0b0e, #0f1320 60%);
  border: 1px solid rgba(255,46,59,.22);
}
.cta::before {
  content: ""; position: absolute; inset: -50%; z-index: -1;
  background: conic-gradient(from 0deg, transparent, rgba(255,46,59,.18), transparent 30%);
  animation: spin 12s linear infinite;
}
.cta::after { content: ""; position: absolute; inset: 1px; border-radius: 27px; background: linear-gradient(135deg, #160a0d, #0b1020 60%); z-index: -1; }
@keyframes spin { to { transform: rotate(360deg); } }
.cta h2 { font-size: clamp(30px, 4.5vw, 50px); margin: 0 0 16px; letter-spacing: -0.025em; line-height: 1.08; }
.cta p { color: var(--text-2); max-width: 560px; margin: 0 auto 34px; font-size: 18px; }
.cta .hero-actions { justify-content: center; }

/* ---------- Page header (sub pages) ---------- */
.page-hero {
  position: relative; overflow: hidden; isolation: isolate;
  padding: calc(var(--nav-h) + 90px) 0 80px;
  border-bottom: 1px solid var(--line);
}
.page-hero .hero-grid { mask-image: radial-gradient(ellipse 60% 80% at 30% 0%, #000 20%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse 60% 80% at 30% 0%, #000 20%, transparent 70%); }
.page-hero .orb-1 { width: 420px; height: 420px; top: -200px; right: 10%; }
.breadcrumb { display: flex; gap: 10px; align-items: center; font-size: 14px; color: var(--text-3); margin-bottom: 24px; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb span.sep { opacity: .5; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(40px, 6.5vw, 76px); line-height: 1; letter-spacing: -0.035em; margin: 0 0 20px; font-weight: 800; }
.page-hero p.lead { color: var(--text-2); font-size: 19px; max-width: 640px; margin: 0; }
.page-meta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; font-size: 13.5px; color: var(--text-2); background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.pill svg { width: 15px; height: 15px; color: var(--accent); }

/* ---------- Rules layout ---------- */
.rules-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 64px; padding: 64px 0 120px; align-items: start; }
.toc { position: sticky; top: calc(var(--nav-h) + 24px); max-height: calc(100vh - var(--nav-h) - 48px); overflow-y: auto; padding-right: 6px; scrollbar-width: thin; }
.toc-title { font-size: 12px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; color: var(--text-3); margin: 0 0 14px; }
.search {
  position: relative; margin-bottom: 22px;
}
.search input {
  width: 100%; padding: 12px 14px 12px 40px; border-radius: 12px;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font: inherit; font-size: 14.5px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.search input:focus { border-color: rgba(255,46,59,.5); box-shadow: inset 0 0 16px rgba(255,46,59,.18); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-3); }
.search-count { font-size: 13px; color: var(--text-3); margin: -12px 0 18px; min-height: 1em; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 1px solid var(--line); }
.toc li a {
  display: flex; gap: 12px; padding: 8px 14px; margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--text-3); font-size: 14.5px; transition: color .2s, border-color .2s, background .2s;
}
.toc li a:hover { color: var(--text); }
.toc li a.active { color: var(--text); border-left-color: var(--accent); background: linear-gradient(90deg, var(--accent-soft), transparent); }
.toc li a .n { color: var(--accent); font-weight: 700; min-width: 32px; font-variant-numeric: tabular-nums; }
.toc-other { margin-top: 28px; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.toc-other p { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }

.para {
  scroll-margin-top: calc(var(--nav-h) + 24px);
  padding-bottom: 56px; margin-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.para:last-of-type { border-bottom: 0; }
.para-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: 28px; }
.para-num {
  font-family: var(--font-display); font-weight: 800; font-size: 18px;
  color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(255,46,59,.25);
  padding: 6px 12px; border-radius: 10px; flex: none; line-height: 1.2;
}
.para-head h2 { font-family: var(--font-display); font-size: clamp(26px, 3.2vw, 36px); line-height: 1.15; letter-spacing: -0.02em; margin: 0; }

.rules { list-style: none; margin: 0; padding: 0; counter-reset: r; display: grid; gap: 4px; }
.rules > li {
  counter-increment: r;
  position: relative; display: grid; grid-template-columns: 44px 1fr; gap: 6px;
  padding: 16px 18px 16px 10px; border-radius: 12px;
  color: #d3d9e3; font-size: 16.5px;
  transition: background .25s;
  scroll-margin-top: calc(var(--nav-h) + 30px);
}
.rules > li::before {
  content: counter(r) ".";
  font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; text-align: right; padding-right: 10px;
  transition: color .25s;
}
.rules > li:hover { background: rgba(255,255,255,.025); }
.rules > li:hover::before { color: var(--accent); }
.rules > li.target { background: var(--accent-soft); animation: flash 2s var(--ease); }
@keyframes flash { 0% { box-shadow: inset 3px 0 0 var(--accent); } 100% { box-shadow: inset 3px 0 0 transparent; } }
.rules > li .rule-body { min-width: 0; }
.rules strong { color: var(--text); font-weight: 650; }
.rules .sub { list-style: none; counter-reset: s; margin: 12px 0 0; padding: 0; display: grid; gap: 8px; }
.rules .sub li { counter-increment: s; position: relative; padding-left: 34px; color: var(--text-2); }
.rules .sub li::before {
  content: counter(s, lower-alpha) ")"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 600;
}
.rule-link {
  position: absolute; right: 10px; top: 14px;
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text-3);
  opacity: 0; cursor: pointer; transition: opacity .2s, color .2s;
}
.rule-link svg { width: 14px; height: 14px; }
.rules > li:hover .rule-link { opacity: 1; }
.rule-link:hover { color: var(--accent); }
.rules > li.has-link { padding-right: 52px; }
mark { background: rgba(255,46,59,.35); color: var(--text); border-radius: 3px; padding: 0 2px; }
.hidden-by-search { display: none !important; }

.callout {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 22px 24px; border-radius: var(--radius); margin: 0 0 48px;
  background: linear-gradient(135deg, rgba(255,46,59,.09), rgba(255,46,59,.02));
  border: 1px solid rgba(255,46,59,.22);
}
.callout svg { width: 22px; height: 22px; color: var(--accent); flex: none; margin-top: 2px; }
.callout p { margin: 0; color: var(--text-2); font-size: 15.5px; }
.callout strong { color: var(--text); }

.table-title { font-weight: 700; font-size: 15px; margin: 34px 0 14px 10px; color: var(--text); display: flex; align-items: center; gap: 10px; }
.table-title::before { content: ""; width: 4px; height: 18px; border-radius: 2px; background: var(--accent); }
.para .table-wrap { margin-left: 10px; }

.copy-toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 80;
  transform: translate(-50%, 20px); opacity: 0;
  padding: 12px 20px; border-radius: 12px;
  background: var(--surface-2); border: 1px solid var(--line-strong);
  font-size: 14px; font-weight: 600; box-shadow: inset 0 0 20px rgba(255,46,59,.25);
  transition: opacity .3s, transform .4s var(--ease); pointer-events: none;
}
.copy-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Legal pages ---------- */
.legal { padding: 72px 0 120px; }
.legal h2 { font-size: 24px; margin: 48px 0 14px; letter-spacing: -0.01em; }
.legal h2:first-child { margin-top: 0; }
.legal h3 { font-size: 18px; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--text-2); }
.legal a { color: var(--accent); }
.legal a:hover { text-decoration: underline; }
.legal-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px 36px; margin-bottom: 24px; }
.legal-card p { margin: 0 0 6px; }
.placeholder { background: rgba(229,83,75,.12); color: #ff9b94; border: 1px dashed rgba(229,83,75,.45); border-radius: 6px; padding: 1px 7px; font-size: .95em; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 72px 0 32px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 48px; margin-bottom: 56px; }
.footer p { color: var(--text-3); font-size: 15px; max-width: 320px; }
.footer h4 { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: var(--text-3); margin: 6px 0 18px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer ul a { color: var(--text-2); font-size: 15px; transition: color .2s; }
.footer ul a:hover { color: var(--accent); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding-top: 28px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 13.5px; }
.socials { display: flex; gap: 10px; margin-top: 22px; }
.socials a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.04); border: 1px solid var(--line); color: var(--text-2); transition: color .2s, border-color .2s, transform .3s var(--ease); }
.socials a:hover { color: var(--accent); border-color: rgba(255,46,59,.4); transform: translateY(-3px); }
.socials svg { width: 18px; height: 18px; }

/* Back to top */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 40;
  width: 48px; height: 48px; border-radius: 14px;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface-2); border: 1px solid var(--line-strong); color: var(--text);
  opacity: 0; visibility: hidden; transform: translateY(16px);
  transition: opacity .3s, transform .4s var(--ease), visibility .3s, border-color .2s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { border-color: var(--accent); color: var(--accent); }
.to-top svg { width: 20px; height: 20px; }

/* Custom cursor glow (desktop) */
.cursor-glow {
  position: fixed; top: 0; left: 0; width: 420px; height: 420px; border-radius: 50%;
  pointer-events: none; z-index: 0;
  background: radial-gradient(circle, rgba(255,46,59,.07), transparent 60%);
  transform: translate(-50%, -50%);
  transition: opacity .3s;
}

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .chips { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .rules-layout { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: relative; top: 0; max-height: none; }
  .toc ol { display: none; }
  .toc-other { display: none; }
}
@media (max-width: 900px) {
  .nav-links, .nav-cta .btn { display: none; }
  .burger { display: block; }
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps::before { display: none; }
  .section { padding: 88px 0; }
  .cta { padding: 60px 28px; }
  .cursor-glow { display: none; }
}
@media (max-width: 560px) {
  .container, .container-narrow { width: calc(100% - 32px); }
  .chips { grid-template-columns: repeat(2, 1fr); }
  .grid-4, .steps { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .stat { padding: 26px 20px; }
  .doc-card { padding: 28px; }
  .doc-card .doc-big { font-size: 84px; }
  .rules > li { grid-template-columns: 32px 1fr; font-size: 15.5px; padding-left: 4px; }
  .faction-tabs { display: flex; width: 100%; }
  .faction-tab { flex: 1; padding: 10px; font-size: 14px; }
  .hero-meta { gap: 16px; }
  .legal-card { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  html { scroll-behavior: auto; }
  .reveal, .reveal-left, .reveal-scale, .fade-up { opacity: 1; transform: none; }
}

/* ==========================================================================
   Branding: Wappen & Skyline
   ========================================================================== */
.logo-mark { object-fit: contain; }
.brand .logo-mark { width: 34px; height: 40px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
.preloader .logo-mark { width: 72px; height: 88px; }

.hero-photo {
  position: absolute; inset: -40px;
  background: url("img/skyline.jpg") center 60% / cover no-repeat;
  opacity: .38; filter: saturate(1.1);
  transform: scale(1.08);
  animation: kenburns 30s ease-in-out infinite alternate;
}
.page-hero .hero-photo { opacity: .22; background-position: center 45%; }
@keyframes kenburns { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.18) translate(-2%, -1%); } }
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(7,9,13,.92) 0%, rgba(7,9,13,.55) 55%, rgba(7,9,13,.35) 100%),
    linear-gradient(180deg, rgba(7,9,13,.4) 0%, transparent 30%, var(--bg) 100%);
}
.page-hero .hero-bg::after { background: linear-gradient(180deg, rgba(7,9,13,.55), var(--bg)); }

.hero-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); align-items: center; gap: 48px; }
.hero-crest { position: relative; display: grid; place-items: center; perspective: 1000px; }
.hero-crest::before {
  content: ""; position: absolute; width: 85%; aspect-ratio: 1; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,46,59,.35), rgba(47,95,216,.18) 45%, transparent 70%);
  filter: blur(30px); animation: pulse 6s ease-in-out infinite;
}
.hero-crest .ring {
  position: absolute; width: 112%; aspect-ratio: 1; border-radius: 50%;
  border: 1px dashed rgba(255,255,255,.12); animation: spin 60s linear infinite;
}
.hero-crest .ring:nth-of-type(2) { width: 90%; border-style: solid; border-color: rgba(255,46,59,.18); animation-duration: 40s; animation-direction: reverse; }
.crest-img {
  position: relative; width: min(380px, 100%);
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.65));
  opacity: 0; animation: crestIn 1.4s var(--ease) .4s forwards, bob 7s ease-in-out 1.8s infinite;
  transition: transform .2s ease-out; transform-style: preserve-3d;
}
.crest-shine { position: absolute; inset: 0; pointer-events: none; overflow: hidden; -webkit-mask: url("img/wappen.png") center / contain no-repeat; mask: url("img/wappen.png") center / contain no-repeat; }
.crest-shine::after {
  content: ""; position: absolute; inset: -50%;
  background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.55) 50%, transparent 58%);
  animation: sweep 5.5s ease-in-out 2s infinite;
}
.crest-wrap { position: relative; width: min(380px, 100%); }
.crest-wrap .crest-img { width: 100%; }
@keyframes crestIn { from { opacity: 0; transform: translateY(40px) scale(.9) rotateY(-25deg); } to { opacity: 1; transform: none; } }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -14px; } }
@keyframes sweep { 0% { transform: translateX(-60%); } 40%, 100% { transform: translateX(60%); } }

.hero h1 .line:first-child > span { color: #f0f2f6; }

.footer .brand .logo-mark { width: 40px; height: 48px; }

@media (max-width: 900px) {
  .hero-layout { grid-template-columns: 1fr; }
  .hero-crest { order: -1; }
  .crest-wrap { width: 200px; }
  .hero-crest .ring { width: 300px; }
  .hero-crest .ring:nth-of-type(2) { width: 240px; }
}

.rule-body a { color: var(--accent-2); border-bottom: 1px dashed rgba(255,107,107,.45); transition: color .2s, border-color .2s; }
.rule-body a:hover { color: #fff; border-bottom-color: #fff; }
.rule-body code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .9em; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 1px 6px; color: var(--text); }
.rules > li[data-n]::before { content: attr(data-n) "."; }
.crest-img { height: auto; }
.page-hero h1 { hyphens: manual; overflow-wrap: break-word; }
@media (max-width: 560px) {
  .page-hero h1 { font-size: 38px; }
  .page-hero { padding-top: calc(var(--nav-h) + 56px); padding-bottom: 56px; }
  .crest-wrap { width: 170px; }
}
