/* ═══════════════════════════════════════════════════════════════════════════
   CD z ESPORTS — DESIGN SYSTEM v2
   Farbidentität unverändert: Schwarz/Dunkelflächen, Weiß/Neutraltöne,
   CD-z-Lila (#8B2FC9 / #a855f7). Alles andere: neu.
   Variablen- und Shell-Klassennamen sind ein stabiler Vertrag —
   overlays.html und Inline-Styles der Seiten bauen darauf auf.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── FONTS (selbst gehostet, keine externen Abhängigkeiten) ── */
@font-face {
  font-family: 'Archivo Var';
  src: url('fonts/archivo-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Var';
  src: url('fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono Var';
  src: url('fonts/jbmono-var.woff2') format('woff2-variations');
  font-weight: 100 800;
  font-display: swap;
}

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

:root {
  /* Farbidentität — exakt wie zuvor */
  --bg-0:         #060606;
  --bg-1:         #0a0a0a;
  --bg-2:         #111111;
  --bg-3:         #181818;
  --border:       #1c1c1c;
  --border-mid:   #252525;
  --accent:       #8B2FC9;
  --accent-light: #a855f7;
  --glow-soft:    rgba(139,47,201,0.07);
  --glow-mid:     rgba(139,47,201,0.15);
  --text-1:       #fff;
  --text-2:       #9d9da6;
  --text-3:       #3e3e46;

  /* Typografie */
  --font-d:       'Archivo Var', 'Archivo', 'Arial Narrow', sans-serif;
  --font-b:       'Inter Var', 'Inter', system-ui, sans-serif;
  --font-m:       'JetBrains Mono Var', 'JetBrains Mono', ui-monospace, monospace;
  --wide:         125%;   /* Display-Breite */

  /* Geometrie & Motion */
  --r:            3px;
  --gutter:       clamp(20px, 4.5vw, 64px);
  --ease:         cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
  --t:            0.22s var(--ease);
  --notch:        10px;   /* markante Eck-Kappung */
}

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

html { height: 100%; border-top: 2px solid var(--accent); scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }

body {
  font-family: var(--font-b);
  background: var(--bg-0); color: var(--text-1);
  min-height: 100%; display: flex; flex-direction: column;
  overflow-x: hidden; overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { display: block; max-width: 100%; }

/* ── TYPO-UTILITIES ── */
.d       { font-family: var(--font-d); font-stretch: var(--wide); font-weight: 850; text-transform: uppercase; letter-spacing: -0.01em; }
.mono    { font-family: var(--font-m); }
.kicker  { font-family: var(--font-m); font-size: 10px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--text-2); }
.kicker em { color: var(--accent-light); font-style: normal; }

/* ── BACKGROUND ── */
.bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.bg-glow {
  position: absolute; inset: -10%; will-change: transform;
  background:
    radial-gradient(ellipse 55% 60% at 28% 50%, rgba(139,47,201,0.05) 0%, transparent 62%),
    radial-gradient(ellipse 30% 40% at 86% 8%, rgba(139,47,201,0.025) 0%, transparent 55%);
}
.bg-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 110% 100% at 30% 40%, black 0%, transparent 78%);
}

/* Diagonale Struktur-Textur für schmale Bänder */
.tex {
  background-image: repeating-linear-gradient(-45deg,
    rgba(255,255,255,0.05) 0 1px, transparent 1px 7px);
}

/* ── HEADER (Klassenvertrag mit overlays.html) ── */
header {
  position: relative; z-index: 10;
  min-height: 68px; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border-bottom: 1px solid var(--border);
  background: rgba(6,6,6,0.85);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  animation: fadeIn 0.5s var(--ease-out) both;
}

.logo { display: flex; align-items: center; gap: 12px; }
.logo-mark {
  width: 40px; height: 40px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-d); font-stretch: 110%; font-weight: 900; font-size: 13px;
  letter-spacing: -0.02em; color: #fff; flex-shrink: 0;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, var(--notch) 100%, 0 calc(100% - var(--notch)));
  transition: background var(--t), transform var(--t);
}
.logo:hover .logo-mark { background: var(--accent-light); transform: scale(1.05); }
.logo-name { display: flex; flex-direction: column; }
.logo-sub {
  font-family: var(--font-m); font-size: 8px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--text-3); line-height: 1; margin-bottom: 3px;
}
.logo-text {
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 850;
  font-size: 15px; letter-spacing: 0.02em; text-transform: uppercase; line-height: 1;
}
.logo-text em { color: var(--accent-light); font-style: normal; }

/* ── NAV ── */
.nav-links { display: flex; align-items: center; gap: 2px; justify-content: center; }
.nav-link {
  font-family: var(--font-d); font-stretch: 112%; font-size: 11.5px; font-weight: 750;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-2); padding: 8px 14px;
  transition: color var(--t), background var(--t);
  white-space: nowrap; cursor: pointer; position: relative;
}
.nav-link:hover { color: var(--text-1); background: rgba(255,255,255,0.05); }
.nav-link.active { color: var(--text-1); }
.nav-link.active::after {
  content: '';
  position: absolute; bottom: 2px; left: 14px; right: 14px;
  height: 2px; background: var(--accent);
}
.nav-soon { color: var(--text-3); opacity: 0.4; pointer-events: none; cursor: default; }
.nav-sep  { width: 1px; height: 14px; background: var(--border-mid); margin: 0 8px; flex-shrink: 0; align-self: center; }

.header-right { display: flex; align-items: center; gap: 18px; justify-content: flex-end; flex-shrink: 0; }
.header-domain { font-family: var(--font-m); font-size: 10px; color: var(--text-3); letter-spacing: 0.08em; }

/* ── HAMBURGER ── */
.nav-toggle { display:none; flex-direction:column; justify-content:center; align-items:center; gap:5px; width:38px; height:38px; background:none; border:none; cursor:pointer; z-index:10000; flex-shrink:0; }
.nav-toggle span { display:block; width:22px; height:2px; background:var(--text-1); transition:transform .28s var(--ease), opacity .28s var(--ease); transform-origin:center; }
.nav-toggle.open span:nth-child(1) { transform:translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity:0; transform:scaleX(0); }
.nav-toggle.open span:nth-child(3) { transform:translateY(-7px) rotate(-45deg); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-d); font-stretch: 112%; font-size: 12px; font-weight: 800;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 14px 26px; cursor: pointer; border: 0;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t);
  position: relative; white-space: nowrap;
}
.btn-primary {
  background: var(--accent); color: #fff;
  clip-path: polygon(0 0, calc(100% - var(--notch)) 0, 100% var(--notch), 100% 100%, 0 100%);
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); }
.btn-secondary { background: transparent; color: var(--text-1); border: 1px solid var(--border-mid); }
.btn-secondary:hover { border-color: var(--text-1); background: rgba(255,255,255,0.04); }
.btn-ghost { background: transparent; color: var(--text-2); border: 1px solid var(--border); }
.btn-ghost:hover { color: var(--text-1); border-color: var(--border-mid); }

/* Link mit Pfeil */
.arrow-link {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-m); font-size: 11px; font-weight: 600;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-2);
  transition: color var(--t), gap var(--t);
}
.arrow-link::after { content: '→'; color: var(--accent-light); transition: transform var(--t); }
.arrow-link:hover { color: var(--text-1); gap: 14px; }

/* ── SEKTION-GERÜST ── */
.section { position: relative; z-index: 1; border-bottom: 1px solid var(--border); }
.section-inner { max-width: 1240px; margin: 0 auto; padding: clamp(52px, 7vw, 92px) var(--gutter); }

.sec-head { display: flex; align-items: baseline; gap: 18px; margin-bottom: clamp(30px, 5vw, 56px); }
.sec-idx  { font-family: var(--font-m); font-size: 11px; font-weight: 600; color: var(--accent-light); letter-spacing: 0.1em; }
.sec-rule { flex: 0 0 42px; height: 1px; background: var(--border-mid); align-self: center; }
.sec-tag  { font-family: var(--font-m); font-size: 10px; font-weight: 600; letter-spacing: 0.32em; text-transform: uppercase; color: var(--text-2); }
.sec-side { margin-left: auto; font-family: var(--font-m); font-size: 10px; color: var(--text-3); letter-spacing: 0.1em; }

.sec-title {
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 875;
  font-size: clamp(34px, 5.4vw, 62px);
  line-height: 0.95; text-transform: uppercase; letter-spacing: -0.015em;
}
.sec-title em { font-style: normal; color: var(--accent-light); }
.sec-title .ol {
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.45);
}

/* ── PAGE-HERO (Unterseiten) ── */
.page-hero { position: relative; z-index: 1; border-bottom: 1px solid var(--border); overflow: hidden; }
.page-hero-inner { max-width: 1240px; margin: 0 auto; padding: clamp(56px, 8vw, 104px) var(--gutter) clamp(40px, 6vw, 72px); position: relative; }
.page-hero .kicker { margin-bottom: 18px; display: flex; align-items: center; gap: 14px; }
.page-hero .kicker::before { content: ''; width: 34px; height: 1px; background: var(--accent); }
.page-title {
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 900;
  font-size: clamp(46px, 9vw, 110px);
  line-height: 0.9; text-transform: uppercase; letter-spacing: -0.02em;
}
.page-title em { font-style: normal; color: var(--accent-light); }
.page-lead { color: var(--text-2); font-size: 14px; line-height: 1.75; max-width: 58ch; margin-top: 22px; }
.page-meta { display: flex; gap: 26px; margin-top: 30px; flex-wrap: wrap; }
.page-meta span { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-3); }
.page-meta b { color: var(--text-2); font-weight: 600; }
/* Geister-Glyphe rechts */
.page-ghost {
  position: absolute; right: calc(-1 * var(--gutter)); bottom: -0.18em;
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 900;
  font-size: clamp(120px, 24vw, 320px); line-height: 1; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.05);
  pointer-events: none; user-select: none; white-space: nowrap;
}

/* ── TICKER ── */
.ticker { position: relative; z-index: 1; border-bottom: 1px solid var(--border); background: var(--bg-1); overflow: hidden; }
.ticker-track {
  display: flex; width: max-content;
  animation: tickerMove 36s linear infinite;
  padding: 11px 0;
}
.ticker:hover .ticker-track { animation-play-state: paused; }
.ticker-item {
  font-family: var(--font-m); font-size: 10px; font-weight: 600;
  letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-2);
  padding: 0 28px; white-space: nowrap; display: flex; align-items: center; gap: 28px;
}
.ticker-item i { font-style: normal; color: var(--accent-light); }
@keyframes tickerMove { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ── KARTEN (Spieler / Team / Creator) ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 2px; }
.xcard {
  position: relative; background: var(--bg-1); border: 1px solid var(--border);
  padding: 26px 24px 24px; overflow: hidden; min-height: 210px;
  display: flex; flex-direction: column; justify-content: flex-end;
  transition: border-color var(--t), background var(--t), transform var(--t);
  animation: fadeUp 0.55s var(--ease-out) both;
}
.xcard::before { /* Nummerierung */
  content: attr(data-idx);
  position: absolute; top: 18px; left: 22px;
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.14em;
  color: var(--text-3); transition: color var(--t);
}
.xcard::after { /* Akzentlinie unten */
  content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px;
  background: var(--accent); transform: scaleX(0); transform-origin: left;
  transition: transform 0.3s var(--ease);
}
.xcard:hover { border-color: var(--border-mid); background: var(--bg-2); transform: translateY(-3px); }
.xcard:hover::after { transform: scaleX(1); }
.xcard:hover::before { color: var(--accent-light); }
.xcard-ghost {
  position: absolute; top: 6px; right: 10px;
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 900;
  font-size: 96px; line-height: 1; text-transform: uppercase;
  color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.09);
  pointer-events: none; user-select: none;
  transition: -webkit-text-stroke-color var(--t);
}
.xcard:hover .xcard-ghost { -webkit-text-stroke-color: rgba(168,85,247,0.22); }
.xcard-name {
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 850;
  font-size: 21px; text-transform: uppercase; letter-spacing: 0; line-height: 1.05;
  position: relative;
}
.xcard-role {
  font-family: var(--font-m); font-size: 10px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--text-2); margin-top: 8px; position: relative;
}
.xcard-socials { display: flex; gap: 6px; margin-top: 16px; position: relative; }
.social-btn {
  width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border-mid); color: var(--text-2);
  transition: background var(--t), color var(--t), border-color var(--t);
}
.social-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── EMPTY STATE ── */
.empty-state { padding: clamp(40px, 7vw, 80px) 0; max-width: 560px; }
.empty-label { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.empty-dot { width: 6px; height: 6px; background: var(--accent); }
.empty-tag { font-family: var(--font-m); font-size: 10px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-2); }
.empty-rule { width: 56px; height: 1px; background: var(--border-mid); margin-bottom: 26px; }
.empty-title {
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 875;
  font-size: clamp(30px, 5vw, 52px); line-height: 0.95; text-transform: uppercase;
}
.empty-title span { color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.35); }
.empty-desc { color: var(--text-2); font-size: 13px; line-height: 1.75; margin-top: 18px; }

/* ── FOOTER ── */
footer { position: relative; z-index: 1; border-top: 1px solid var(--border); background: var(--bg-1); margin-top: auto; }
.footer-main {
  max-width: 1240px; margin: 0 auto; padding: clamp(44px, 7vw, 76px) var(--gutter) clamp(28px, 4vw, 44px);
  display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 40px;
}
.footer-word {
  font-family: var(--font-d); font-stretch: var(--wide); font-weight: 900;
  font-size: clamp(38px, 6vw, 72px); line-height: 0.9; text-transform: uppercase;
  letter-spacing: -0.02em;
}
.footer-word span { display: block; color: transparent; -webkit-text-stroke: 1px rgba(255,255,255,0.22); }
.footer-claim { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--text-3); margin-top: 16px; }
.footer-col h4 { font-family: var(--font-m); font-size: 10px; font-weight: 600; letter-spacing: 0.3em; text-transform: uppercase; color: var(--text-3); margin-bottom: 18px; }
.footer-col a { display: block; font-family: var(--font-d); font-stretch: 112%; font-size: 13px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-2); padding: 5px 0; transition: color var(--t), padding-left var(--t); }
.footer-col a:hover { color: var(--text-1); padding-left: 6px; }
.footer-bar { display: flex; align-items: center; justify-content: space-between; min-height: 54px; padding: 0 var(--gutter); gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.footer-copy { font-family: var(--font-m); font-size: 10px; letter-spacing: 0.08em; color: var(--text-3); }
.footer-socials { display: flex; gap: 6px; }
.footer-social { width: 32px; height: 32px; background: transparent; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: background var(--t), border-color var(--t), color var(--t), transform var(--t); }
.footer-social:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.08); }

/* ── LIVE (Twitch) ── */
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2px; }
.live-card {
  position: relative; background: var(--bg-1); border: 1px solid var(--border);
  overflow: hidden; display: flex; flex-direction: column;
  transition: border-color var(--t), transform var(--t);
  animation: fadeUp 0.55s var(--ease-out) both;
}
.live-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.live-thumb { display: block; aspect-ratio: 16/9; overflow: hidden; border-bottom: 1px solid var(--border); }
.live-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease-out); }
.live-card:hover .live-thumb img { transform: scale(1.04); }
.live-body { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.live-badge {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-family: var(--font-m); font-size: 9px; font-weight: 700; letter-spacing: 0.28em;
  text-transform: uppercase; color: #fff; background: var(--accent); padding: 4px 9px;
}
.live-dot { width: 5px; height: 5px; border-radius: 50%; background: #fff; animation: livePulse 1.6s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }
.live-name { font-family: var(--font-d); font-stretch: var(--wide); font-weight: 850; font-size: 19px; text-transform: uppercase; }
.live-title { font-size: 12px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.live-meta { display: flex; align-items: center; gap: 10px; font-family: var(--font-m); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-3); }
.live-game { color: var(--accent-light); }
.live-sep { width: 3px; height: 3px; background: var(--border-mid); }
.live-cta { margin-top: 8px; }
.live-cta .btn { padding: 10px 18px; font-size: 10.5px; }

/* ── REVEALS ── */
.anim { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
.anim.in { opacity: 1; transform: none; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── RESPONSIVE: Shell ── */
@media (max-width: 900px) {
  .footer-main { grid-template-columns: 1fr; gap: 32px; }
}
@media (max-width: 900px) {
  header { min-height: 62px; padding: 0 20px; display: flex; justify-content: space-between; align-items: center; z-index: 9999; }
  .nav-toggle { display: flex; }
  .header-right { display: none; }
  .logo-sub { display: none; }
  .nav-sep, .nav-soon { display: none; }
  .nav-links {
    position: fixed; inset: 0; background: rgba(6,6,6,0.97);
    backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
    display: flex !important; flex-direction: column; align-items: flex-start; justify-content: center;
    padding: 80px 36px 40px; gap: 2px; z-index: 9998;
    transform: translateX(100%); transition: transform 0.34s var(--ease);
    pointer-events: none; counter-reset: navi;
  }
  .nav-links.open { transform: none; pointer-events: auto; }
  .nav-link {
    font-size: 34px !important; font-stretch: var(--wide); font-weight: 875;
    padding: 8px 0 !important; width: 100%; text-align: left;
    letter-spacing: 0 !important; counter-increment: navi;
    display: flex; align-items: baseline; gap: 16px;
  }
  .nav-link::before {
    content: counter(navi, decimal-leading-zero);
    font-family: var(--font-m); font-size: 11px; font-weight: 500;
    color: var(--text-3); letter-spacing: 0.1em;
  }
  .nav-link.active::after { display: none; }
  .nav-link.active { color: var(--accent-light); }
  .nav-link.active::before { color: var(--accent-light); }
}
@media (max-width: 680px) {
  .footer-bar { padding: 0 20px; min-height: 50px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
  .ticker-track { animation: none; }
  .anim { opacity: 1; transform: none; }
}
