/* ═══════════════════════════════════════════════════════
   PR0SINT — Design System Tokens & Base Styles
   Generiert aus DESIGN.md
   
   Brutalist-Neu: Harte Kanten, Neon-Akzente, Tech-Ästhetik
   ═══════════════════════════════════════════════════════ */

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

/* ── DESIGN TOKENS ── */
:root {
  /* Colors — Primary */
  --brand: #3b82f6;
  --brand-deep: #1d4ed8;
  --brand-light: rgba(59, 130, 246, 0.1);

  /* Colors — Secondary */
  --secondary: #f59e0b;
  --accent-yellow: #ffff00;
  --accent-magenta: #ff00ff;
  --accent-green: #10b981;
  --accent-purple: #8b5cf6;
  --accent-cyan: #22d3ee;

  /* Colors — Neutral */
  --neutral: #f8f9fa;
  --bg: #ffffff;
  --surface: rgba(255, 255, 255, 0.55);
  --surface-2: rgba(255, 255, 255, 0.75);

  /* Colors — Dark Mode */
  --dark-bg: #0a0a0c;
  --dark-text: #e8e8ec;
  --dark-surface: rgba(255, 255, 255, 0.04);

  /* Colors — Text */
  --text: #1a1a1e;
  --text-dim: rgba(0, 0, 0, 0.55);
  --text-micro: rgba(0, 0, 0, 0.32);
  --on-primary: #FFFFFF;
  --on-secondary: #1a1a1e;

  /* Colors — System */
  --border: rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.16);

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body: 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Font Sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.25rem;
  --text-xl: 2rem;
  --text-2xl: 2.8rem;
  --text-3xl: 3.5rem;

  /* Rounded — Brutalist: 0px! */
  --radius-sm: 0px;
  --radius: 0px;
  --radius-lg: 0px;
  --radius-full: 0px;

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 48px;
  --space-section: 60px;

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 0.3s;

  /* Logo Filter (für Dark Mode Invertierung) */
  --logo-filter: none;
  --brand-glow: rgba(59, 130, 246, 0.15);
  --brand-text: var(--brand);
  --brand-tint: rgba(59, 130, 246, 0.2);
}

/* ── DARK MODE (via data-theme auf <html>) ── */
html[data-theme="dark"] {
  --bg: #0a0a0c;
  --text: #e8e8ec;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-micro: rgba(255, 255, 255, 0.32);
  --surface: rgba(255, 255, 255, 0.04);
  --surface-2: rgba(255, 255, 255, 0.08);
  --neutral: #1a1a1e;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);
  --brand: #60a5fa;
  --brand-deep: #3b82f6;
  --brand-light: rgba(96, 165, 250, 0.12);
  --brand-text: #60a5fa;
  --brand-tint: rgba(96, 165, 250, 0.25);
  --secondary: #fbbf24;
  --accent-yellow: #ffff00;
  --accent-magenta: #ff00ff;
  --accent-green: #34d399;
  --accent-purple: #a78bfa;
  --on-primary: #0a0a0c;
  --on-secondary: #0a0a0c;
  --logo-filter: brightness(0) invert(1);
  --brand-glow: rgba(96, 165, 250, 0.2);
}

/* System Dark Mode (wenn kein data-theme gesetzt ist) */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    --bg: #0a0a0c;
    --text: #e8e8ec;
    --text-dim: rgba(255, 255, 255, 0.55);
    --text-micro: rgba(255, 255, 255, 0.32);
    --surface: rgba(255, 255, 255, 0.04);
    --surface-2: rgba(255, 255, 255, 0.08);
    --neutral: #1a1a1e;
    --border: rgba(255, 255, 255, 0.08);
    --border-strong: rgba(255, 255, 255, 0.16);
    --brand: #60a5fa;
    --brand-deep: #3b82f6;
    --brand-light: rgba(96, 165, 250, 0.12);
    --brand-text: #60a5fa;
    --brand-tint: rgba(96, 165, 250, 0.25);
    --secondary: #fbbf24;
    --accent-yellow: #ffff00;
    --accent-magenta: #ff00ff;
    --accent-green: #34d399;
    --accent-purple: #a78bfa;
    --on-primary: #0a0a0c;
    --on-secondary: #0a0a0c;
    --logo-filter: brightness(0) invert(1);
    --brand-glow: rgba(96, 165, 250, 0.2);
  }
}

/* ── BASE ── */
html { overflow-x: hidden; scroll-behavior: smooth; }
html, body {
  min-height: 100%; background: var(--bg); color: var(--text);
  font-family: var(--font-body); font-weight: 300; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* ── TYPOGRAPHY ── */
h1 {
  font-family: var(--font-display); font-size: var(--text-3xl);
  font-weight: 700; line-height: 1.1; letter-spacing: -0.02em;
}
h2 {
  font-family: var(--font-heading); font-size: var(--text-xl);
  font-weight: 600; line-height: 1.2;
}
h3 {
  font-family: var(--font-body); font-size: var(--text-lg);
  font-weight: 500; line-height: 1.3;
}
p { font-size: var(--text-base); font-weight: 300; line-height: 1.6; color: var(--text-dim); }
code, pre { font-family: var(--font-mono); }

/* ── LAYOUT ── */
.container { max-width: 1400px; margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--space-section) 0; border-bottom: 1px solid var(--border); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 24px; border-radius: 0;
  font-family: var(--font-body); font-weight: 500; font-size: var(--text-sm);
  text-decoration: none; cursor: pointer; border: 2px solid var(--brand);
  transition: background-color var(--duration) var(--ease), color var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
.btn-primary { background: var(--brand); color: var(--on-primary); border-color: var(--brand); }
@media (hover: hover) {
  .btn-primary:hover { background: var(--brand-deep); }
}
.btn-outline { background: transparent; color: var(--brand); }
@media (hover: hover) {
  .btn-outline:hover { background: var(--brand-light); }
}
.btn:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* ── CARDS ── */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 0; padding: var(--space-lg);
  transition: border-color var(--duration) var(--ease), transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease);
}
@media (hover: hover) {
  .card:hover { border-color: var(--brand); }
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  :root { --text-3xl: 2.4rem; --text-xl: 1.6rem; --space-section: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* ══ Burger Menu — Global ══ */
.burger-toggle {
  display: flex;
  width: 40px;
  height: 40px;
  border-radius: 0;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}

@media (hover: hover) {
  .burger-toggle:hover { border-color: var(--brand); color: var(--brand); }
}

.main-nav { display: none; }

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.menu-backdrop.open { opacity: 1; pointer-events: auto; }
.menu-backdrop.is-open { opacity: 1; pointer-events: auto; }

.burger-menu {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 320px;
  max-width: 85vw;
  background: var(--bg);
  border-left: 1px solid var(--border);
  z-index: 200;
  transform: translateX(100%);
  transition: transform 0.25s ease;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.burger-menu.open { transform: translateX(0); }
.burger-menu.is-open { transform: translateX(0); }

.burger-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: 1px solid var(--border);
}

.burger-menu-title {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-micro);
}

.burger-close {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s ease, color 0.2s ease;
}
@media (hover: hover) {
  .burger-close:hover { border-color: var(--brand); color: var(--brand); }
}

.burger-menu-links {
  display: flex;
  flex-direction: column;
  padding: var(--space-md) 0;
  flex: 1;
}

.burger-link {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  font-family: var(--font-display);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background 0.2s ease;
  border-left: 3px solid transparent;
}

.burger-link i { font-size: 1.1rem; }

.burger-link--blue    { border-left-color: var(--brand); }
.burger-link--magenta  { border-left-color: var(--accent-magenta); }
.burger-link--green   { border-left-color: var(--accent-green); }
.burger-link--gray    { border-left-color: var(--text-micro); }

@media (hover: hover) {
  .burger-link--blue:hover    { background: rgba(59, 130, 246, 0.06); }
  .burger-link--magenta:hover { background: rgba(255, 0, 255, 0.06); }
  .burger-link--green:hover   { background: rgba(16, 185, 129, 0.06); }
  .burger-link--gray:hover    { background: rgba(128, 128, 128, 0.06); }
}

.burger-sub-toggle { justify-content: space-between; }
.burger-sub-toggle span { display: flex; align-items: center; gap: var(--space-md); }
.burger-caret { font-size: 0.85rem; transition: transform 0.2s ease; }
.burger-sub-toggle.open .burger-caret { transform: rotate(180deg); }
.burger-sub-toggle.is-open .burger-caret { transform: rotate(180deg); }

.burger-sub {
  display: none;
  flex-direction: column;
  background: var(--surface);
  border-left: 3px solid var(--accent-magenta);
  margin-left: var(--space-lg);
}
.burger-sub.open { display: flex; }
.burger-sub.is-open { display: flex; }

.burger-sub-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: 10px var(--space-lg);
  font-size: var(--text-sm);
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease;
}
@media (hover: hover) {
  .burger-sub-link:hover { color: var(--brand); background: rgba(59, 130, 246, 0.04); }
}
.burger-sub-link--active { color: var(--brand); font-weight: 600; }
.burger-sub-link--disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.footer-link--disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.burger-sub-label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 12px var(--space-lg) 4px;
  opacity: 0.7;
}


/* ══ Calendar Popup — Global ══ */
.calendar-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.calendar-popup.is-open { display: flex; }

.calendar-popup-content {
  position: relative;
  width: 90vw;
  max-width: 900px;
  height: 80vh;
  background: #ffffff;
  border: 1px solid var(--border);
  overflow: hidden;
}
.calendar-popup-content iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.calendar-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 36px;
  height: 36px;
  border: 1px solid #e5e5e5;
  background: #ffffff;
  color: #666;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
@media (hover: hover) {
  .calendar-popup-close:hover { border-color: var(--brand); color: var(--brand); }
}

/* === Footer — Global (4-spaltig, farbcodiert) === */
.footer { margin-top: 4rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2rem; margin-bottom: 2.5rem; }
@media (max-width: 768px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
.footer-section-title { font-family: var(--font-display); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.footer-section-title::before { content: ""; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.footer-section.section-leistungen .footer-section-title { color: var(--brand); }
.footer-section.section-leistungen .footer-section-title::before { background: var(--brand); }
.footer-section.section-code .footer-section-title { color: var(--accent-green); }
.footer-section.section-code .footer-section-title::before { background: var(--accent-green); }
.footer-section.section-kontakt .footer-section-title { color: var(--accent-magenta); }
.footer-section.section-kontakt .footer-section-title::before { background: var(--accent-magenta); }
.footer-section.section-rechtliches .footer-section-title { color: var(--secondary); }
.footer-section.section-rechtliches .footer-section-title::before { background: var(--secondary); }
.footer-link { display: block; color: var(--text-dim); text-decoration: none; font-size: 0.82rem; padding: 0.25rem 0; transition: color 0.2s ease; }
@media (hover: hover) { .footer-link:hover { color: var(--brand); } }
.footer-link--disabled { opacity: 0.45; cursor: default; pointer-events: none; }
.footer-rechtliches-boxes { display: flex; gap: 0.75rem; margin-bottom: 1rem; flex-wrap: wrap; }
.footer-rechtliches-box { display: flex; align-items: center; gap: 0.4rem; padding: 0.35rem 0.6rem; background: var(--surface); border: 1px solid var(--border); font-size: 0.72rem; font-family: var(--font-mono); color: var(--text-dim); }
.footer-rechtliches-box a { color: var(--brand); text-decoration: none; }
@media (hover: hover) { .footer-rechtliches-box a:hover { text-decoration: underline; } }
.footer-copy { text-align: center; font-size: 0.72rem; color: var(--text-dim); padding-top: 1.5rem; border-top: 1px solid var(--border); }


/* === Header — Global === */
header { display: flex; align-items: center; justify-content: space-between; padding: var(--space-lg) 0; border-bottom: 1px solid var(--border); }
.header-right { display: flex; align-items: center; gap: var(--space-sm); }
.logo-link { display: flex; align-items: center; }
.logo-link img { height: 28px; width: auto; filter: var(--logo-filter); }
