/* ============================================================
   AUTARK INNOVATIONS — THEME BASE (Single Source of Truth)
   2026-04-30
   Premium-Dark mit aufgehelltem Background. Keine Light-Theme-Defaults.
   Spezifität via "html .x" damit Konflikte überschrieben werden.
   ============================================================ */

/* ROOT-Tokens (Premium Dark — Brand-Unified mit App, siehe brand-tokens.css) */
:root {
  --bg-primary: #0A1218;        /* Body — Mid zwischen App #050D1C + Website #142035 */
  --bg-surface: #111820;        /* Cards/Surfaces */
  --bg-elevated: #161D28;       /* Modals, Hover-States */
  --bg-deeper: #070D14;         /* Footer, Deep-Sections */

  --border-subtle: rgba(96, 165, 250, 0.12);
  --border-hover: rgba(96, 165, 250, 0.32);
  --border-focus: #3B82F6;

  --text-primary: #F5F7FA;
  --text-secondary: #B8C5D6;
  --text-muted: #94A3B8;

  --brand-blue: #1E40AF;
  --brand-blue-light: #3B82F6;
  --brand-blue-glow: rgba(59, 130, 246, 0.18);
  --brand-blue-glow-strong: rgba(30, 64, 175, 0.42);

  --sun-gold: #F59E0B;
  --sun-gold-glow: rgba(245, 158, 11, 0.20);

  --success: #10B981;
  --danger: #EF4444;
  --warning: #F59E0B;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;
}

/* === BODY + HTML === */
html, body {
  background: #0A1218 !important;
  color: var(--text-primary) !important;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
}

/* === HEADER / NAV (highest priority) === */
html .nav,
html nav.nav,
html header.header-main {
  background: rgba(10, 18, 24, 0.92) !important;
  backdrop-filter: blur(16px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(16px) saturate(140%) !important;
  border-bottom: 1px solid rgba(96, 165, 250, 0.15) !important;
  color: var(--text-primary) !important;
}

/* Logo-Link */
html .nav-logo-link,
html .nav-logo {
  color: var(--text-primary) !important;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
html .nav-logo-link img,
html .nav-logo img {
  width: 40px;
  height: 40px;
  display: block;
}
@media (max-width: 640px) {
  html .nav-logo-link img,
  html .nav-logo img { width: 32px; height: 32px; }
}

/* Nav-Links */
html .nav-links a,
html .nav-link {
  color: var(--text-primary) !important;
  text-decoration: none;
  font-weight: 600;
}
html .nav-links a:hover,
html .nav-link:hover {
  color: var(--brand-blue-light) !important;
}

/* === BURGER BUTTON (CRITICAL — IMMER SICHTBAR) === */
html #navBurger,
html .nav-burger,
html button[aria-label*="enü" i] {
  color: #FFFFFF !important;
  background: rgba(96, 165, 250, 0.18) !important;
  border: 1px solid rgba(96, 165, 250, 0.35) !important;
  border-radius: 10px !important;
  width: 44px !important;
  height: 44px !important;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
@media (max-width: 768px) {
  html #navBurger,
  html .nav-burger {
    display: flex !important;
  }
}
html #navBurger:hover,
html .nav-burger:hover {
  background: rgba(96, 165, 250, 0.20) !important;
  border-color: rgba(96, 165, 250, 0.55) !important;
}
html #navBurger svg,
html .nav-burger svg {
  width: 22px;
  height: 22px;
  stroke: #FFFFFF !important;
}

/* === NAV OVERLAY (Mobile-Menü) === */
html #navOverlay {
  background: rgba(15, 27, 45, 0.96) !important;
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
}

/* === FOOTER === */
html footer,
html .footer,
html .footer-premium {
  background: var(--bg-deeper) !important;
  color: var(--text-secondary) !important;
  border-top: 1px solid rgba(96, 165, 250, 0.12);
}
html .footer a,
html footer a {
  color: var(--text-primary) !important;
}
html .footer a:hover,
html footer a:hover {
  color: var(--brand-blue-light) !important;
}

/* === GLASS CARDS === */
html .glass-card,
html .pt-card,
html .cw-tile,
html .wow-tile,
html .kk-card,
html .bento-card,
html .glass-premium {
  background: rgba(255, 255, 255, 0.08) !important;
  backdrop-filter: blur(20px) saturate(140%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(140%) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: var(--text-primary);
}

/* === BUTTONS === */
html .btn-primary,
html .btn-glow,
html .lisa-btn--primary {
  background: linear-gradient(135deg, #2DD4FF 0%, #1AA6CC 100%) !important;
  color: #FFFFFF !important;
  border: 0 !important;
  font-weight: 800;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  box-shadow: 0 8px 24px var(--brand-blue-glow);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.3s;
}
html .btn-primary:hover,
html .btn-glow:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px var(--brand-blue-glow-strong);
}

/* Secondary CTA — Outline-Style, KEIN Glow (1Komma5°-Pattern) */
html .btn-secondary {
  background: transparent !important;
  color: var(--brand-blue-light) !important;
  border: 1.5px solid var(--brand-blue-light) !important;
  box-shadow: none !important;
  font-weight: 700;
  padding: 0.85rem 1.6rem;
  border-radius: 12px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
html .btn-secondary:hover {
  background: rgba(96, 165, 250, 0.08) !important;
  box-shadow: none !important;
}

/* Tertiary Link — nur underline, kein Background, kein Glow */
html .link-tertiary {
  background: transparent !important;
  color: var(--brand-blue-light) !important;
  border: 0 !important;
  box-shadow: none !important;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  padding: 0.25rem 0;
  font-weight: 600;
  display: inline;
  transition: color 0.2s ease, text-decoration-thickness 0.2s ease;
}
html .link-tertiary:hover {
  color: #FFFFFF !important;
  text-decoration-thickness: 2px;
  background: transparent !important;
  box-shadow: none !important;
}

/* === MOBILE STICKY CTA === */
@media (max-width: 768px) {
  html .mobile-sticky-cta {
    background: rgba(10, 18, 24, 0.96) !important;
    border-top: 1px solid rgba(96, 165, 250, 0.25) !important;
    backdrop-filter: blur(14px);
  }
  html .mobile-sticky-cta-primary {
    background: linear-gradient(135deg, #2DD4FF 0%, #1AA6CC 100%) !important;
    color: #FFFFFF !important;
  }
}

/* === COOKIE CONSENT === */
html #cookieConsentOverlay,
html .cookie-banner {
  background: rgba(10, 18, 24, 0.97) !important;
  color: var(--text-primary);
}

/* === SECTION SPACING (Sonnen-style Whitespace) === */
/* Desktop: 80px vertical (5rem) — Mobile: 32px vertical (2rem) */
section {
  padding: var(--s-11, 5rem) var(--s-4, 1rem);
}
@media (max-width: 768px) {
  section { padding: var(--s-7, 2rem) var(--s-4, 1rem); }
}

/* === SELECTION === */
::selection { background: var(--brand-blue-glow); color: var(--text-primary); }
::-moz-selection { background: var(--brand-blue-glow); color: var(--text-primary); }

/* === FOCUS-VISIBLE === */
:focus-visible {
  outline: 2px solid var(--brand-blue-light);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === SKIP LINK === */
.skip-link {
  background: var(--brand-blue) !important;
  color: #FFFFFF !important;
}

/* === TEXT/PARAGRAPH === */
html p, html li {
  color: var(--text-secondary);
  line-height: 1.65;
}

/* === HEADINGS === */
html h1, html h2, html h3, html h4 {
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

/* === LINKS === */
html a {
  color: var(--brand-blue-light);
}
html a:hover {
  color: var(--text-primary);
}

/* =========================================================
   AGENT F — Trust-Signals + Zero-Friction-CTA (v20260430c)
   Phase 3.4 + 3.5
   ========================================================= */

/* F1: Hero Trust-Stats Pills (zwischen H1 und Sub) */
.hero-trust-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0 1.5rem;
}
.hero-trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 50px;
  background: rgba(59, 130, 246, 0.10);
  border: 1px solid rgba(59, 130, 246, 0.30);
  color: #B8C5D6;
  font-size: 0.82rem;
  font-weight: 600;
  line-height: 1.2;
}
.hero-trust-pill svg {
  color: #3B82F6;
  flex-shrink: 0;
}

/* F2: Zero-Friction-CTA-Eyebrow (über Primary-CTA) */
.cta-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.82rem;
  color: #94A3B8;
  font-weight: 600;
  margin-bottom: 0.5rem;
}
.cta-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: ctaEyebrowPulse 2s infinite;
  flex-shrink: 0;
}
@keyframes ctaEyebrowPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  50%      { box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}
@media (prefers-reduced-motion: reduce) {
  .cta-eyebrow-dot { animation: none; }
}

/* F4: Footer Trust-Strip (zwischen Grid und Bottom-Bar) */
.footer-trust-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.5rem 1rem;
  font-size: 0.82rem;
  color: #94A3B8;
  border-top: 1px solid rgba(96, 165, 250, 0.10);
  border-bottom: 1px solid rgba(96, 165, 250, 0.10);
  margin: 1.5rem 0;
}
.footer-trust-logo {
  font-weight: 700;
  color: #B8C5D6;
  letter-spacing: 0.02em;
}
.footer-trust-divider {
  color: rgba(96, 165, 250, 0.4);
  font-weight: 700;
}
@media (max-width: 540px) {
  .footer-trust-strip { gap: 0.4rem; font-size: 0.78rem; }
}

/* =========================================================
   AGENT E — Whitespace-Boost (Phase 3.7) v20260430c
   Sonnen/Enpal-Niveau Atemraum für alle Cards
   ========================================================= */
html .glass-card,
html .pt-card,
html .cw-tile,
html .wow-tile,
html .kk-card,
html .bento-card,
html .glass-premium,
html .stack-item,
html .feature-card,
html .lisa-hero-card {
  padding: 2rem !important;
}
@media (max-width: 640px) {
  html .glass-card,
  html .pt-card,
  html .cw-tile,
  html .wow-tile,
  html .kk-card,
  html .bento-card,
  html .glass-premium,
  html .stack-item,
  html .feature-card,
  html .lisa-hero-card {
    padding: 1.5rem !important;
  }
}
/* Section-Header mehr Atemraum */
html .section-header { margin-bottom: 3rem; }
@media (max-width: 768px) {
  html .section-header { margin-bottom: 2rem; }
}

/* === BURGER OLD-STYLE FALLBACK (Blog-Pages mit nav-toggle statt nav-burger) === */
html #navToggle,
html .nav-toggle {
  color: #FFFFFF !important;
  background: rgba(96, 165, 250, 0.18) !important;
  border: 1px solid rgba(96, 165, 250, 0.35) !important;
  border-radius: 10px !important;
  width: 44px !important;
  height: 44px !important;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0 !important;
}
@media (max-width: 768px) {
  html #navToggle,
  html .nav-toggle {
    display: flex !important;
  }
}
html #navToggle span,
html .nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: #FFFFFF !important;
  margin: 2px 0;
  transition: transform 0.2s;
}
html #navToggle:hover,
html .nav-toggle:hover {
  background: rgba(96, 165, 250, 0.20) !important;
  border-color: rgba(96, 165, 250, 0.55) !important;
}

/* === GLOBAL OVERFLOW SAFEGUARD (Phase 4 Fix) === */
html, body {
  overflow-x: clip !important;  /* clip statt hidden = kein neuer scroll-context, fixt Mobile-Overflow ohne Touch-Scroll-Bug */
  max-width: 100vw !important;
}

/* === TESTIMONIALS STRIP (Phase D — Enpal-Pattern) === */
.testimonials-strip {
  padding: var(--s-9, 48px) var(--s-4, 16px);
  background: rgba(255,255,255,0.02);
}
.testimonials-track {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5, 20px);
  max-width: 1200px;
  margin: 0 auto;
}
.testimonial-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-lg, 20px);
  padding: var(--s-6, 24px);
}
.testimonial-card .stars {
  color: #FFC107;
  font-size: 1.1rem;
  letter-spacing: 2px;
  margin-bottom: var(--s-3, 12px);
}
.testimonial-card blockquote {
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 var(--s-4, 16px);
  color: var(--text-primary, #F0F6FF);
  font-style: italic;
}
.testimonial-card cite {
  font-style: normal;
  font-size: 0.875rem;
  color: var(--text-secondary, #A8B8C8);
}
@media (max-width: 768px) {
  .testimonials-track { grid-template-columns: 1fr; }
}

/* === LOGO-MOBILE-FIX v2: AUTARK darf NIE vertikal stacken (Phase B v2) === */
html .nav-logo-link,
html .nav-logo {
  flex-shrink: 0 !important;
  min-width: max-content !important;
}
html .nav-logo-text {
  display: inline-block !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  flex-shrink: 0 !important;
  min-width: max-content !important;
  line-height: 1.05 !important;
  writing-mode: horizontal-tb !important;
}
html .nav-logo-sub {
  display: block !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
}
@media (max-width: 480px) {
  html .nav-logo-text { font-size: 0.82rem !important; letter-spacing: 1px !important; }
  html .nav-logo-sub { font-size: 0.55rem !important; letter-spacing: 1.5px !important; }
}
@media (max-width: 380px) {
  html .nav-logo-text { font-size: 0.72rem !important; }
  html .nav-logo-sub { display: none !important; }
  html .nav-logo-link img,
  html .nav-logo img { width: 28px !important; height: 28px !important; }
}
@media (max-width: 340px) {
  html .nav-logo-text { display: none !important; }
}


/* === NAV-RIGHT/BURGER schrumpfbar damit Logo immer Platz hat === */
html .nav-right {
  flex-shrink: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}
html #navBurger,
html .nav-burger,
html #navToggle,
html .nav-toggle {
  flex-shrink: 0 !important;
  min-width: 40px !important;
}
@media (max-width: 480px) {
  html .nav-right .nav-rating-text,
  html .nav-right #navRating > span:not(:first-child) { display: none !important; }
}

/* ============================================================
   A11Y: Color-Contrast WCAG AA Fixes — 2026-04-30
   Lighthouse meldete Kontrast-Issues auf 16/16 Seiten.
   Royal-Blau #1E40AF auf dunklem Glas ist <4.5:1.
   Fix: helleres Brand-Blau #60A5FA, helleres Gold.
   ============================================================ */
html .section-label,
html h3.section-label {
  color: #FFB800 !important;       /* Brighter gold: 8.7:1 on #0A1218 */
  font-weight: 800 !important;
}
html .savings-card div[style*="color: rgb(239, 68, 68)"],
html .savings-card div[style*="color:#ef4444"] {
  color: #FCA5A5 !important;       /* Lighter red: 7.6:1 on dark BG */
}
html .feature-card h3[style*="color:var(--white)"],
html .feature-card h3[style*="color: var(--white)"] {
  color: #FFFFFF !important;
}
html .feature-card p[style*="color:var(--gray-light)"],
html .feature-card p[style*="color: var(--gray-light)"] {
  color: #DCE3EF !important;       /* Lighter gray for AA compliance */
}
html .footer-brand h3 {
  color: #FFFFFF !important;       /* Footer brand title pure white */
}
html .cw-reveal-eyebrow {
  color: #FFB800 !important;       /* App-Reveal eyebrow legible */
  font-weight: 800 !important;
}
/* Inline-Styles mit color:#1E40AF auf dunklem BG -> heller machen */
html [style*="color:#1E40AF"]:not([style*="background"]),
html [style*="color: #1E40AF"]:not([style*="background"]) {
  color: #60A5FA !important;       /* AA on dark, brand-consistent */
}

/* ============================================================
   CUSTOMER-JOURNEY-FIX 2026-04-30: nav-cta MUSS Mobile sichtbar sein
   Vorher: starling.css versteckt .nav-cta auf <=768 und <=480 mit display:none
   Folge: 65-jaehrige Oma sieht KEIN "Kostenloses Angebot" CTA -> Conversion-Killer
   ============================================================ */
@media (max-width: 768px) {
  html .nav-cta,
  html nav .nav-cta,
  html .nav-right .nav-cta {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.78rem !important;
    padding: 8px 12px !important;
    white-space: nowrap !important;
    min-height: 38px !important;
    text-decoration: none !important;
  }
}
@media (max-width: 480px) {
  html .nav-cta,
  html nav .nav-cta,
  html .nav-right .nav-cta {
    display: inline-flex !important;
    font-size: 0.72rem !important;
    padding: 7px 10px !important;
    min-height: 36px !important;
  }
}

/* Senior-Toggle global sicherstellen sichtbar im nav-right */
html .nav-right .cw-senior-toggle {
  display: inline-flex !important;
  align-items: center !important;
}
@media (max-width: 480px) {
  html .nav-right .cw-senior-toggle {
    padding: 4px 8px !important;
    font-size: 0.78rem !important;
    min-height: 36px !important;
  }
}
