/* ==========================================================================
   LastBrowser Web Platform - Main Design System & Tokens
   100% Offline & DSGVO-konform (keine externen Requests / Google Fonts)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter-var.woff2') format('woff2');
}

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300 900;
  font-display: swap;
  src: url('/assets/fonts/outfit-var.woff2') format('woff2');
}

:root {
  --nearBlack: #070A12;
  --midnight: #07111F;
  --surface: #101827;
  --panel: #0E1628;
  --panel-hover: #131E35;
  --stroke: #2A3550;
  --stroke-glow: rgba(0, 229, 255, 0.35);
  --text: #F7FAFF;
  --muted: #AAB4C6;
  --subtle: #64748B;
  --electricBlue: #2563FF;
  --cyan: #00E5FF;
  --magenta: #FF2D8F;
  --purple: #8A3FFC;
  --yellow: #FFC800;
  --green: #7CFF6B;
  --danger: #FF4757;
  --nav-bg: rgba(7, 10, 18, 0.88);
  --card-bg: linear-gradient(180deg, rgba(16, 24, 39, 0.95), rgba(11, 18, 32, 0.9));
  --hero-bg: radial-gradient(circle at 18% 0%, rgba(37, 99, 255, 0.22), transparent 30%),
             radial-gradient(circle at 85% 10%, rgba(255, 45, 143, 0.14), transparent 28%),
             radial-gradient(circle at 50% 60%, rgba(0, 229, 255, 0.06), transparent 40%),
             linear-gradient(180deg, #060913 0%, #070B14 50%, #05070D 100%);
  --grid-pattern: radial-gradient(circle, rgba(0, 229, 255, 0.035) 1px, transparent 1px);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 999px;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  /* Footer-Tokens: eigener Hintergrund/Text, damit der Footer nicht mehr
     pauschal mit einem dunklen Overlay ueberzogen wird (siehe Fix 2026-10-24). */
  --footer-bg: rgba(7, 10, 18, 0.72);
  --footer-fg: #AAB4C6;
  --footer-accent: #00E5FF;
  --footer-link-hover: #00E5FF;
  --footer-contact-fg: #00E5FF;
  --footer-contact-bg: rgba(0, 229, 255, 0.08);
  --footer-contact-border: rgba(0, 229, 255, 0.25);
}

[data-theme="light"] {
  --nearBlack: #F8FAFC;
  --midnight: #F1F5F9;
  --surface: #FFFFFF;
  --panel: #FFFFFF;
  --panel-hover: #F8FAFC;
  --stroke: #CBD5E1;
  --stroke-glow: rgba(37, 99, 255, 0.25);
  --text: #0F172A;
  --muted: #475569;
  --subtle: #94A3B8;
  --electricBlue: #1D4ED8;
  --cyan: #0284C7;
  --magenta: #BE185D;
  --purple: #6D28D9;
  --yellow: #B45309;
  --green: #15803D;
  --danger: #DC2626;
  --nav-bg: rgba(255, 255, 255, 0.92);
  --card-bg: linear-gradient(180deg, #FFFFFF, #F8FAFC);
  --hero-bg: radial-gradient(circle at 18% 0%, rgba(37, 99, 255, 0.08), transparent 35%),
             radial-gradient(circle at 85% 10%, rgba(255, 45, 143, 0.05), transparent 30%),
             linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 50%, #F1F5F9 100%);
  --grid-pattern: radial-gradient(circle, rgba(2, 132, 199, 0.06) 1px, transparent 1px);
  --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1);
  /* Footer im Light-Theme: heller, halbtransparenter Grund statt dunklem
     Overlay. Werte liefern >= 4.5:1 fuer --footer-fg/#0369a1 auf --footer-bg. */
  --footer-bg: rgba(241, 245, 249, 0.82);
  --footer-fg: #475569;
  --footer-accent: #0369a1;
  --footer-link-hover: #0369a1;
  --footer-contact-fg: #0369a1;
  --footer-contact-bg: rgba(2, 132, 199, 0.08);
  --footer-contact-border: rgba(3, 105, 161, 0.3);
}

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

html {
  scroll-behavior: smooth;
  text-size-adjust: 100%;
}

body {
  background: var(--hero-bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.65;
  background-image: var(--grid-pattern);
  background-size: 24px 24px;
  z-index: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 20px;
  background: var(--electricBlue);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  z-index: 9999;
  font-weight: 700;
  text-decoration: none;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 20px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.container-narrow {
  width: min(840px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover {
  text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
}

.grad {
  background: linear-gradient(90deg, var(--cyan), var(--electricBlue), var(--magenta));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.grad-subtle {
  background: linear-gradient(135deg, #FFFFFF 30%, var(--muted) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-muted { color: var(--muted); }
.text-cyan { color: var(--cyan); }
.text-green { color: var(--green); }
.text-yellow { color: var(--yellow); }
.text-magenta { color: var(--magenta); }
.text-center { text-align: center; }

/* Grid Helpers */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-4 {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   A11y Mini-Patches (P1-3 bis P2-4) — nur Overrides, kein Redesign
   ========================================================================== */

/* P1-5: sichtbares :focus-visible global (beide Themes, Fallback #00a5c8) */
:focus-visible {
  outline: 3px solid var(--accent, #00a5c8);
  outline-offset: 2px;
}

/* P1-4: Overflow 390px auf vs-*/spaces fixen */
.vs-grid {
  min-width: 0;
}
.vs-column {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.vs-feature-item {
  min-width: 0;
  overflow-wrap: anywhere;
}
pre {
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: anywhere;
}
code {
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}
@media (max-width: 768px) {
  .vs-column pre {
    white-space: pre-wrap;
  }
}

/* P1-3: /features/ Matrix mobil lesbar + TH-Kontrast >= 4.5 (hell + dunkel) */
.comparison-table-wrapper,
.matrix-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.comparison-table,
.matrix-table {
  width: 100%;
  min-width: 640px;
}
.comparison-table th,
.matrix-table th {
  background: #0b1322;
  color: #f7faff;
}
.comparison-table th.highlight-col,
.matrix-table th.highlight-col {
  background: rgba(37, 99, 255, 0.18);
  color: #00e5ff;
  border-bottom: 2px solid var(--cyan, #00e5ff);
}
[data-theme="light"] .comparison-table th,
[data-theme="light"] .matrix-table th {
  background: #ffffff;
  color: #0f172a;
}
[data-theme="light"] .comparison-table th.highlight-col,
[data-theme="light"] .matrix-table th.highlight-col {
  background: #e0f2fe;
  color: #0369a1;
  border-bottom-color: #0369a1;
}

/* P2-1/P2-3 (light): Docs-Sidebar H4 + a.active, A.roadmap-issue #0369a1 */
[data-theme="light"] .docs-sidebar h4,
[data-theme="light"] .docs-sidebar a.active {
  color: #0369a1;
}
[data-theme="light"] a.roadmap-issue {
  color: #0369a1;
}

/* P2-2: .copy-btn Kontrast >= 4.5 auf dunklem Code-Block (beide Themes).
   button.-Prefix: docs.css (spaeter geladen) gewinnt sonst bei gleicher Spezifitaet. */
button.copy-btn {
  color: #cbd5e1;
  border-color: #334155;
}

/* P2-4: Tap-Targets >= 44px nur mobil (<=768px), Desktop-Optik unverändert */
@media (max-width: 768px) {
  .theme-toggle,
  .mobile-toggle {
    min-width: 44px;
    min-height: 44px;
  }
  .lang-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }
  footer a {
    display: inline-block;
    min-height: 44px;
    line-height: 44px;
  }
  .copy-btn {
    min-height: 44px;
    padding: 10px 12px;
  }
  .sc-btn,
  .filter-btn {
    min-height: 44px;
  }
}
