/* ==========================================================
   global.css — Sichtelement | Design
   Zentrale CSS-Datei: Variablen, Reset, Utilities, Animationen
   ========================================================== */

/* ── Design Tokens ──────────────────────────────────────── */
:root {
  /* Farben */
  --bg:         #0a0a0a;
  --bg-raised:  #111111;
  --bg-hover:   #161616;
  --border:     #222222;
  --border-hi:  #333333;
  --text:       #f0ede8;
  --text-muted: #797979;
  --text-dim:   #5a5a5a;
  --accent:     #c8f060;
  --accent-dim: #8aaa30;

  /* Typografie */
  --font-display: "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-body:    "Exo 2", "Segoe UI", system-ui, sans-serif;
  --font-label:   "Rajdhani", "Courier New", monospace;

  /* Layout */
  --max-w:       1160px;
  --gutter:      clamp(1.5rem, 5vw, 4rem);
  --section-gap: clamp(6rem, 12vw, 11rem);
}

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

/* ── Base ───────────────────────────────────────────────── */
html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  overflow-x: hidden;
}

/* ── Selektion ──────────────────────────────────────────── */
::selection {
  background: var(--accent);
  color: #0a0a0a;
}

/* ── Scrollbar ──────────────────────────────────────────── */
::-webkit-scrollbar         { width: 4px; }
::-webkit-scrollbar-track   { background: var(--bg); }
::-webkit-scrollbar-thumb   { background: var(--border-hi); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ── Links & Medien ─────────────────────────────────────── */
a   { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }

/* ── Layout-Utility ─────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ── Typografie-Utilities ───────────────────────────────── */
.label {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ── Scroll-Reveal ──────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Staggered children: each child needs --i set inline */
.stagger > * {
  transition-delay: calc(var(--i, 0) * 80ms);
}

/* ── Fokus (Barrierefreiheit) ────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ── Reduced Motion ─────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
