/* =========================================================
   LEGIT NETWORK — Design System
   Dark editorial (Ägypten / Gold) + Grunge-Akzente (Zombie / Blutrot)
   Markenfarbe Teal als Signatur
   ========================================================= */

/* Schriften werden per <link> im <head> geladen (schneller als @import) */

:root {
  /* Farben – Dark (Standard) */
  --bg:        #0a0a0b;
  --bg-2:      #121214;
  --bg-3:      #1b1b1e;
  --line:      rgba(236, 231, 221, 0.12);
  --ink:       #ece7dd;
  --ink-soft:  #b8b2a6;
  --muted:     #837d71;

  --gold:        #c8a24a;
  --gold-bright: #e7cd86;
  --gold-deep:   #8a6d2c;

  --red:        #b3151b;
  --red-bright: #e0242b;

  --teal:       #46c8b0;

  --paper:      #ece4d3;   /* „Torn paper“ – helle Fläche */
  --paper-ink:  #1a1712;

  /* Maße */
  --wrap: 1180px;
  --pad: clamp(1.25rem, 4vw, 3rem);
  --radius: 2px;

  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-type: 'Special Elite', 'Courier New', monospace;

  color-scheme: dark;
}

:root[data-theme="light"] {
  --bg:        #ece4d3;
  --bg-2:      #e2d9c4;
  --bg-3:      #d6cbb2;
  --line:      rgba(26, 23, 18, 0.18);
  --ink:       #1a1712;
  --ink-soft:  #4a4235;
  --muted:     #6b6250;

  --gold:        #9c7723;
  --gold-bright: #7a5c15;
  --gold-deep:   #c8a24a;

  --teal:      #1c8f7c;

  color-scheme: light;
}

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

/* Weicher Übergang beim Wechsel Dark <-> Light (nur während des Umschaltens aktiv) */
.theme-transition,
.theme-transition *,
.theme-transition *::before,
.theme-transition *::after {
  transition: background-color .45s ease, background-image .45s ease,
              color .45s ease, border-color .45s ease,
              fill .45s ease, stroke .45s ease, box-shadow .45s ease !important;
  transition-delay: 0s !important;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  /* Eigener Scrollbalken – Firefox */
  scrollbar-width: thin;
  scrollbar-color: var(--gold-deep) transparent;
}

/* Eigener Scrollbalken – Chrome, Edge, Safari */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track {
  background: var(--bg-2);
  border-left: 1px solid var(--line);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold), var(--gold-deep));
  border: 3px solid var(--bg-2);
  border-radius: 0;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gold-bright);
}
::-webkit-scrollbar-corner { background: var(--bg-2); }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Korn / Grain-Overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

.wrap { max-width: var(--wrap); margin: 0 auto; padding-inline: var(--pad); }

/* ---------- Typografie ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; letter-spacing: 0.01em; }

.kicker {
  font-family: var(--font-type);
  font-size: 0.78rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--gold);
  display: inline-block;
}

.section-num {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3rem, 9vw, 7rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  display: block;
  margin-bottom: -0.15em;
  user-select: none;
}

.lead { font-size: clamp(1.05rem, 2.2vw, 1.3rem); color: var(--ink-soft); max-width: 46ch; }

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: transparent;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-type);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0.95rem 1.6rem;
  border: 1px solid var(--gold);
  color: var(--gold-bright);
  background: var(--bg-btn);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s, border-color .2s;
}
.btn:hover { background: var(--gold); color: #0a0a0b; transform: translateY(-2px); }
.btn--solid { background: var(--gold); color: #0a0a0b; }
.btn--solid:hover { background: var(--gold-bright); border-color: var(--gold-bright); }
.btn--red { border-color: var(--red-bright); color: #fff; background: var(--red); }
.btn--red:hover { background: var(--red-bright); border-color: var(--red-bright); color: #fff; }
.btn--ghost { border-color: var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.btn--sm { padding: 0.6rem 1rem; font-size: 0.72rem; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem var(--pad);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 0.7rem; }
.brand img { width: 26px; height: auto; }
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.22em;
  font-size: 0.95rem;
}
.nav { display: flex; align-items: center; gap: 1.6rem; }
.nav a {
  font-family: var(--font-type);
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-soft);
  transition: color .2s;
  position: relative;
}
.nav a:hover { color: var(--gold-bright); }
.nav a[data-external]::after { content: " ↗"; color: var(--muted); }

.header-tools { display: flex; align-items: center; gap: 0.75rem; }
.icon-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.icon-btn:hover { border-color: var(--gold); color: var(--gold-bright); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
:root[data-theme="light"] .theme-toggle .sun { display: block; }
:root[data-theme="light"] .theme-toggle .moon { display: none; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  /* Hero liegt immer auf dem dunklen Video – Farben unabhängig vom Theme fixieren */
  --ink: #ece7dd;
  --ink-soft: #b8b2a6;
  --muted: #837d71;
  --gold: #c8a24a;
  --gold-bright: #e7cd86;
  --line: rgba(236, 231, 221, 0.12);
  color: var(--ink);
}
.hero__video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(0.55) contrast(1.1) brightness(0.55);
  z-index: 0;
}
.hero__scrim {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 30%, rgba(70,200,176,0.10), transparent 45%),
    linear-gradient(180deg, rgba(10,10,11,0.55) 0%, rgba(10,10,11,0.35) 40%, rgba(10,10,11,0.95) 100%);
}
.hero .wrap { position: relative; z-index: 2; padding-top: 7rem; padding-bottom: 5rem; width: 100%; }
.hero h1 {
  font-size: clamp(3.5rem, 15vw, 9.5rem);
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0.6rem 0 0.4rem;
  text-shadow: 0 0 60px rgba(0,0,0,0.6);
}
.hero h1 .thin { display:block; font-size: 0.34em; letter-spacing: 0.5em; font-weight: 500; color: var(--gold); }
.hero__sub { max-width: 52ch; color: var(--ink-soft); font-size: 1.1rem; margin-bottom: 2rem; }

.ip-box {
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--gold);
  margin-bottom: 1.6rem;
  max-width: 100%;
}
.ip-box__label {
  font-family: var(--font-type);
  padding: 0.85rem 1.1rem;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ip-box__copy {
  border: 0;
  border-left: 1px solid var(--gold);
  background: var(--gold);
  color: #0a0a0b;
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 0 1.1rem;
  cursor: pointer;
  transition: background .2s;
}
.ip-box__copy:hover { background: var(--gold-bright); }
.ip-box__copy.copied { background: var(--teal); border-color: var(--teal); }

.hero__meta { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; margin-bottom: 2rem; }
.tag {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  padding: 0.4rem 0.75rem;
}
.tag b { color: var(--gold-bright); font-weight: 400; }

.hero__cta { display: flex; flex-wrap: wrap; gap: 0.9rem; }

.scroll-hint {
  position: absolute;
  bottom: 1.5rem; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--font-type);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}

/* ---------- Torn paper Divider ---------- */
.torn {
  position: relative;
  height: 60px;
  margin-top: -1px;
  line-height: 0;
  background: var(--torn-bg, var(--bg));
}
.torn svg { display: block; width: 100%; height: 100%; }
.torn svg path { fill: var(--torn-fill, var(--paper)); }
.torn--to-paper { --torn-bg: var(--bg); --torn-fill: var(--paper); }
.torn--to-dark  { --torn-bg: var(--paper); --torn-fill: var(--bg); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 10vw, 8rem) 0; position: relative; }
.section--paper { background: var(--paper); color: var(--paper-ink); }
.section--paper .kicker { color: var(--gold-deep); }
.section--paper .section-num { -webkit-text-stroke-color: rgba(26,23,18,0.18); }
.section--paper .lead { color: #4a4235; }

.section-head { margin-bottom: 3rem; max-width: 60ch; }
.section-head h2 { font-size: clamp(2rem, 5vw, 3.2rem); margin: 0.4rem 0 1rem; }

/* Feature-Karten */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.card { background: var(--bg); padding: 2.2rem 1.8rem; display: flex; flex-direction: column; gap: 0.9rem; }
.section--paper .card { background: var(--paper); }
.card__idx { font-family: var(--font-type); color: var(--red-bright); letter-spacing: 0.2em; font-size: 0.8rem; }
.card h3 { font-size: 1.35rem; }
.card p { color: var(--ink-soft); font-size: 0.95rem; }
.section--paper .card p { color: #4a4235; }
.card .btn { margin-top: auto; align-self: flex-start; }

/* Vision / Über uns */
.split { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.split__media { position: relative; }
.split__media::before {
  content: "";
  position: absolute; inset: 10% 12% 0 12%;
  background: radial-gradient(ellipse at center, rgba(70,200,176,0.18), transparent 70%);
  z-index: -1;
}

/* Skin-Rotator – wechselt alle 7 s mit Überblendung */
.skin-rotator {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 1024 / 1536;
}
.skin-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: translateY(22px) scale(0.94);
  transition: opacity 1s cubic-bezier(.4,0,.2,1), transform 1s cubic-bezier(.4,0,.2,1), filter 1s ease;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55)) blur(6px);
}
.skin-frame.is-active {
  opacity: 1;
  transform: none;
  filter: drop-shadow(0 30px 60px rgba(0,0,0,0.55)) blur(0);
}
.prose p { margin-bottom: 1.1rem; color: var(--ink-soft); }
.section--paper .prose p { color: #3a342a; }
.prose p:first-of-type { font-size: 1.15rem; color: var(--ink); }
.section--paper .prose p:first-of-type { color: var(--paper-ink); }

/* Regeln-Teaser */
.rule-teaser { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px 2rem; margin-bottom: 2.5rem; }
.rule-teaser li { list-style: none; padding: 0.9rem 0; border-bottom: 1px solid var(--line); display: flex; gap: 0.9rem; align-items: baseline; }
.rule-teaser li span { font-family: var(--font-type); color: var(--red-bright); font-size: 0.8rem; }

/* Discord / Beitreten */
.join {
  border: 1px solid var(--gold);
  padding: clamp(2.5rem, 7vw, 4.5rem);
  text-align: center;
  background:
    radial-gradient(circle at 50% 0%, rgba(200,162,74,0.10), transparent 60%),
    var(--bg-2);
}
.join h2 { font-size: clamp(2rem, 6vw, 3.4rem); margin-bottom: 1rem; }
.join p { color: var(--ink-soft); max-width: 46ch; margin: 0 auto 2rem; }
.join__cta { display: flex; gap: 0.9rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--bg-2);
  padding: 3.5rem var(--pad) 2.5rem;
}
.site-footer .wrap { padding-inline: 0; }
.footer-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: flex-start; }
.footer-brand { display: flex; align-items: center; gap: 0.7rem; }
.footer-brand img { width: 30px; }
.footer-brand span { font-family: var(--font-display); font-weight: 700; letter-spacing: 0.2em; }
.footer-links { display: flex; gap: 1.6rem; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--font-type);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-soft);
}
.footer-links a:hover { color: var(--gold-bright); }
.footer-social { display: flex; gap: 0.75rem; }
.footer-bottom {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

/* ---------- Subpage-Header ---------- */
.page-hero {
  padding: 9rem var(--pad) 3.5rem;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(circle at 15% 0%, rgba(200,162,74,0.08), transparent 55%),
    var(--bg);
}
.page-hero .wrap { padding-inline: 0; }
.page-hero h1 { font-size: clamp(2.5rem, 8vw, 5rem); font-weight: 900; margin: 0.6rem 0 0.8rem; }
.page-hero p { color: var(--ink-soft); max-width: 54ch; }
.back-link {
  font-family: var(--font-type);
  font-size: 0.75rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}
.back-link:hover { color: var(--gold-bright); }

/* ---------- Regeln-Seite ---------- */
.rules-list { counter-reset: rule; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.rules-list li {
  list-style: none;
  counter-increment: rule;
  background: var(--bg);
  padding: 1.5rem 1.8rem 1.5rem 4.5rem;
  position: relative;
}
.rules-list li::before {
  content: counter(rule, decimal-leading-zero);
  position: absolute;
  left: 1.6rem; top: 1.5rem;
  font-family: var(--font-display);
  font-weight: 900;
  color: var(--red-bright);
  font-size: 0.95rem;
}
.rules-list h3 { font-size: 1.1rem; margin-bottom: 0.3rem; font-family: var(--font-body); font-weight: 700; }
.rules-list p { color: var(--ink-soft); font-size: 0.95rem; }

.notice {
  border: 1px solid var(--red);
  border-left-width: 4px;
  padding: 1.5rem 1.8rem;
  margin-top: 2rem;
  background: color-mix(in srgb, var(--red) 8%, var(--bg));
}
.notice h3 { font-family: var(--font-body); font-size: 1rem; margin-bottom: 0.4rem; color: var(--red-bright); }
.notice p { color: var(--ink-soft); font-size: 0.93rem; }

/* Mods */
.mods-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin: 2rem 0 1.5rem;
}
.chip {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all .18s;
}
.chip:hover { border-color: var(--gold); color: var(--gold-bright); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red-bright); color: #fff; }
.chip .count { opacity: 0.65; margin-left: 0.4rem; }

.mods-toggle { margin-left: auto; }

.mods-panel { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.mods-panel[hidden] { display: none; }
.mod {
  background: var(--bg);
}
.mod__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  text-align: left;
  cursor: pointer;
}
.mod__head:hover { background: var(--bg-3); }
.mod__cat {
  font-family: var(--font-type);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border: 1px solid var(--line);
  padding: 0.2rem 0.5rem;
  white-space: nowrap;
}
.mod__name { flex: 1; font-weight: 600; }
.mod__plus { color: var(--red-bright); font-family: var(--font-display); font-weight: 900; transition: transform .2s; }
.mod__head[aria-expanded="true"] .mod__plus { transform: rotate(45deg); }
.mod__body { padding: 0 1.4rem 1.2rem; color: var(--ink-soft); font-size: 0.92rem; max-width: 70ch; }
.mod__body[hidden] { display: none; }
.mod.is-hidden { display: none; }

.cat-block { margin-top: 3rem; }
.cat-block h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 0.6rem;
}
.cat-block h3 .n { color: var(--red-bright); font-size: 0.9rem; font-family: var(--font-type); }
.cat-block > p { color: var(--ink-soft); font-size: 0.93rem; margin-bottom: 1.2rem; max-width: 68ch; }

/* ---------- News ---------- */
.news-masthead {
  text-align: center;
  border-block: 3px double var(--ink);
  padding: 1.4rem 0;
  margin-bottom: 3rem;
}
.news-masthead h2 { font-size: clamp(1.8rem, 5vw, 2.8rem); letter-spacing: 0.05em; }
.news-masthead p { font-family: var(--font-type); font-size: 0.8rem; letter-spacing: 0.1em; color: var(--muted); margin-top: 0.4rem; }
.article { border-bottom: 1px solid var(--line); padding: 2.5rem 0; }
.article:first-of-type { border-top: 1px solid var(--line); }
.article time { font-family: var(--font-type); font-size: 0.76rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold); }
.article h3 { font-size: clamp(1.5rem, 4vw, 2.2rem); margin: 0.6rem 0 0.8rem; }
.article p { color: var(--ink-soft); max-width: 62ch; }

.article__clip {
  margin: 1.4rem 0 1.8rem;
  max-width: 380px;
}
.article__clip img {
  width: 100%;
  height: auto;
  aspect-ratio: 1024 / 1536;
  object-fit: contain;
  border: 1px solid var(--line);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.45);
  background: #ece4d3;
}
.article__clip figcaption {
  font-family: var(--font-type);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 0.6rem;
  padding-left: 0.1rem;
}

/* ---------- Impressum ---------- */
.legal { max-width: 62ch; }
.legal h2 { font-family: var(--font-display); font-size: 1.4rem; margin: 2.2rem 0 0.7rem; }
.legal p { color: var(--ink-soft); margin-bottom: 0.4rem; }
.legal a { color: var(--gold-bright); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Utilities / Reveal ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .cards { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .split__media { order: -1; }
  .skin-rotator { max-width: 240px; }
  .rule-teaser { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .nav, .nav-only-desktop { display: none; }
  .nav-toggle { display: grid; }
  .site-header.open .nav {
    display: flex;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.5rem var(--pad);
    background: var(--bg);
    border-bottom: 1px solid var(--line);
  }
  .mods-toggle { margin-left: 0; width: 100%; }
  .mod__head { flex-wrap: wrap; }
}
