/* ==========================================================================
   Questia MC – base.css
   Design-Tokens, Reset, Typografie und globale Hilfsklassen
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design-Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Farben – Questia-Blau als Primärfarbe, Magenta als Akzent */
  --c-questia: #26d8fe;
  --c-questia-rgb: 38 216 254;
  --c-accent: #ff2bd6;
  --c-accent-rgb: 255 43 214;
  --c-success: #39ff14;
  --c-success-rgb: 57 255 20;
  --c-danger: #ff3b5c;
  --c-danger-rgb: 255 59 92;
  --c-warning: #ffd60a;
  --c-warning-rgb: 255 214 10;
  /* Neon-Linien: Cyan → Magenta → Cyan, nahtlos wiederholbar (Animation: line-flow) */
  --line-gradient: linear-gradient(90deg, var(--c-questia), var(--c-accent), var(--c-questia));
  --line-gradient-vertical: linear-gradient(var(--c-questia), var(--c-accent), var(--c-questia));
  --c-season: #a34dff;
  --c-season-rgb: 163 77 255;

  --c-bg: #07070d;
  --c-bg-rgb: 7 7 13;
  --c-surface: #0b0d17;
  --c-surface-raised: #10132a;
  --c-text: #e8f9ff;
  --c-text-muted: #8d9cb5;
  --c-border: rgb(var(--c-questia-rgb) / 0.16);
  --c-border-strong: rgb(var(--c-questia-rgb) / 0.55);

  /* Neon-Glow */
  --glow-text:
    0 0 4px rgb(var(--c-questia-rgb) / 0.9),
    0 0 14px rgb(var(--c-questia-rgb) / 0.6),
    0 0 36px rgb(var(--c-questia-rgb) / 0.4);
  --glow-text-accent:
    0 0 4px rgb(var(--c-accent-rgb) / 0.9),
    0 0 14px rgb(var(--c-accent-rgb) / 0.6),
    0 0 36px rgb(var(--c-accent-rgb) / 0.4);
  --glow-text-soft: 0 0 10px rgb(var(--c-questia-rgb) / 0.6);
  --glow-box:
    0 0 8px rgb(var(--c-questia-rgb) / 0.35),
    0 0 24px rgb(var(--c-questia-rgb) / 0.15);
  --glow-box-strong:
    0 0 12px rgb(var(--c-questia-rgb) / 0.6),
    0 0 40px rgb(var(--c-questia-rgb) / 0.3),
    inset 0 0 14px rgb(var(--c-questia-rgb) / 0.12);

  /* Typografie */
  --font-display: "Orbitron", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --fs-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.25rem);
  --fs-h3: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  --fs-h2: clamp(1.75rem, 1.3rem + 2vw, 2.75rem);
  --fs-hero: clamp(2.6rem, 0.8rem + 8.5vw, 7rem);

  /* Abstände */
  --space-2xs: 0.25rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --space-2xl: 4rem;
  --space-section: clamp(4.5rem, 3rem + 7vw, 8rem);

  /* Layout */
  --container: 72rem;
  --container-narrow: 48rem;
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --header-h: 4.25rem;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;

  /* Bewegung */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 180ms;
  --t-base: 320ms;
  --t-slow: 650ms;
}

/* --------------------------------------------------------------------------
   2. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  color-scheme: dark;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  interpolate-size: allow-keywords; /* ermöglicht animiertes Öffnen von <details> */
}

body {
  min-height: 100dvh;
  overflow-x: clip;
  background-color: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Dezente, fixierte Hintergrund-Lichter */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55rem 40rem at 90% -10%, rgb(var(--c-accent-rgb) / 0.07), transparent 60%),
    radial-gradient(50rem 40rem at -10% 40%, rgb(var(--c-questia-rgb) / 0.06), transparent 60%);
}

img,
svg {
  display: block;
  max-width: 100%;
}

input,
button {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
  padding: 0;
}

/* --------------------------------------------------------------------------
   3. Typografie
   -------------------------------------------------------------------------- */
h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.04em;
  text-wrap: balance;
}

h3 {
  font-size: var(--fs-h3);
}

p {
  text-wrap: pretty;
}

strong {
  color: var(--c-text);
  font-weight: 600;
}

code {
  font-family: var(--font-mono);
}

::selection {
  background: rgb(var(--c-questia-rgb) / 0.35);
  color: #fff;
}

/* --------------------------------------------------------------------------
   4. Fokus & Barrierefreiheit
   -------------------------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--c-questia);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: var(--space-sm);
  left: var(--space-sm);
  z-index: 1000;
  padding: var(--space-xs) var(--space-md);
  background: var(--c-questia);
  color: var(--c-bg);
  font-weight: 600;
  border-radius: var(--radius-sm);
  translate: 0 -200%;
  transition: translate var(--t-fast) var(--ease-out);
}

.skip-link:focus-visible {
  translate: 0 0;
}
