/* Nexvia Custom Styles & Accessibility (BFSG / WCAG 2.1 AA Compliant) */

:root {
  --color-brand-green: #22c55e;
  --color-brand-emerald: #10b981;
  --color-brand-cyan: #06b6d4;
  --color-brand-blue: #0284c7;
  --color-bg-dark: #050811;
  --color-card-bg: rgba(13, 20, 36, 0.78);
  --color-card-border: rgba(255, 255, 255, 0.12);
  --color-glow-green: rgba(34, 197, 94, 0.25);
  --color-glow-cyan: rgba(6, 182, 212, 0.25);
}

/* 100% DSGVO-konforme System-Schriftarten (Kein Google-Fonts-Serverkontakt) */
html {
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  -webkit-text-size-adjust: 100%;
  touch-action: pan-y;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  background-color: var(--color-bg-dark);
  color: #f8fafc;
  overflow-x: hidden;
  max-width: 100vw;
  width: 100%;
  position: relative;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  line-height: 1.6;
}

h1, h2, h3, h4, .font-heading {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: -0.02em;
}

/* BFSG / Barrierefreiheit: Skip Link für Tastatur- & Screen-Reader-Navigation */
.skip-link {
  position: absolute;
  top: -9999px;
  left: 1rem;
  z-index: 9999;
  background: #10b981;
  color: #050811;
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  border-radius: 0.5rem;
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  transition: top 0.2s ease-in-out;
}

.skip-link:focus {
  top: 1rem;
  outline: 3px solid #ffffff;
}

/* Tastatur-Fokus-Indikator für alle interaktiven Elemente (BFSG-Kriterium) */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid #06b6d4 !important;
  outline-offset: 3px !important;
}

/* Gradient Text */
.text-gradient {
  background: linear-gradient(135deg, #22c55e 0%, #06b6d4 50%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.text-gradient-cyan {
  background: linear-gradient(135deg, #38bdf8 0%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Ambient Glows & Hardware Layer Promotion */
.ambient-glow-green {
  position: absolute;
  width: 550px;
  height: 550px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 197, 94, 0.12) 0%, rgba(34, 197, 94, 0) 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.ambient-glow-cyan {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(6, 182, 212, 0.12) 0%, rgba(6, 182, 212, 0) 70%);
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

.tech-grid-bg {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  transform: translateZ(0);
  -webkit-transform: translateZ(0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  will-change: transform;
}

/* Glassmorphism Cards */
.glass-panel {
  background: var(--color-card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--color-card-border);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-panel:hover {
  border-color: rgba(6, 182, 212, 0.35);
  box-shadow: 0 25px 50px -12px rgba(6, 182, 212, 0.15);
}

.glass-badge {
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Button Glows */
.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  color: #030712;
  font-weight: 700;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.4), 0 0 40px rgba(6, 182, 212, 0.25);
  transform: translateY(-1px);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #f8fafc;
  transition: all 0.25s ease;
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #06b6d4;
  color: #38bdf8;
}

/* Custom Range Slider */
input[type="range"] {
  -webkit-appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 9999px;
  background: #1e293b;
  outline: none;
}

input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #22c55e, #06b6d4);
  cursor: pointer;
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.6);
  border: 2px solid #050811;
  transition: transform 0.15s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.15);
}

input[type="range"]:focus-visible::-webkit-slider-thumb {
  box-shadow: 0 0 0 3px #06b6d4, 0 0 14px rgba(34, 197, 94, 0.6);
}

/* Portfolio Showcase Slider Animations */
.portfolio-slide {
  display: none;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.4s ease-in-out, transform 0.4s ease-in-out;
}

.portfolio-slide.active {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

.browser-mockup {
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7), 0 0 30px rgba(6, 182, 212, 0.1);
}

/* Slim Contact Form & Blue-Cyan Gradient Button */
.btn-gradient-blue-cyan {
  background: linear-gradient(90deg, #1d68f2 0%, #00b4d8 55%, #00d2ff 100%);
  color: #ffffff;
  font-weight: 700;
  transition: all 0.25s ease;
  box-shadow: 0 10px 25px -5px rgba(29, 104, 242, 0.4), 0 0 20px rgba(0, 210, 255, 0.2);
}

.btn-gradient-blue-cyan:hover {
  background: linear-gradient(90deg, #2563eb 0%, #00c0e8 55%, #38bdf8 100%);
  box-shadow: 0 12px 30px -4px rgba(29, 104, 242, 0.5), 0 0 28px rgba(0, 210, 255, 0.35);
  transform: translateY(-1px);
}

.btn-gradient-blue-cyan:active {
  transform: scale(0.99);
}

.service-pill-slim {
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
  transition: all 0.2s ease;
  user-select: none;
}

.service-pill-slim:hover {
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
  background: rgba(255, 255, 255, 0.06);
}

.service-pill-slim.is-selected {
  background: rgba(6, 182, 212, 0.16) !important;
  border-color: #00d2ff !important;
  color: #38bdf8 !important;
  box-shadow: 0 0 16px rgba(0, 210, 255, 0.25);
}

/* 5 Webdesign Style Archetypes */
.btn-style-corporate {
  background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
  color: #ffffff;
  font-weight: 600;
  border: 1px solid rgba(147, 197, 253, 0.3);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}
.btn-style-corporate:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #3b82f6 100%);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.5);
  transform: translateY(-1px);
}

.btn-style-clean {
  background: #ffffff;
  color: #090d16;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: all 0.2s ease;
}
.btn-style-clean:hover {
  background: #f1f5f9;
  box-shadow: 0 6px 18px rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.btn-style-darktech {
  background: linear-gradient(135deg, #00f0ff 0%, #00b4d8 100%);
  color: #040814;
  font-weight: 700;
  border: 1px solid rgba(0, 240, 255, 0.6);
  box-shadow: 0 0 20px rgba(0, 240, 255, 0.4);
  transition: all 0.2s ease;
}
.btn-style-darktech:hover {
  background: linear-gradient(135deg, #38bdf8 0%, #00f0ff 100%);
  box-shadow: 0 0 30px rgba(0, 240, 255, 0.65);
  transform: translateY(-1px);
}

.btn-style-bold {
  background: linear-gradient(135deg, #8b5cf6 0%, #f97316 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow: 0 6px 20px rgba(139, 92, 246, 0.45);
  transition: all 0.2s ease;
}
.btn-style-bold:hover {
  background: linear-gradient(135deg, #a855f7 0%, #fb923c 100%);
  box-shadow: 0 8px 25px rgba(249, 115, 22, 0.55);
  transform: translateY(-1px);
}

.btn-style-luxury {
  background: linear-gradient(135deg, #d4af37 0%, #e5c07b 50%, #c59b27 100%);
  color: #12100e;
  font-weight: 700;
  border: 1px solid rgba(255, 215, 0, 0.4);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
  transition: all 0.2s ease;
}
.btn-style-luxury:hover {
  background: linear-gradient(135deg, #e5c07b 0%, #f3d799 50%, #d4af37 100%);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.55);
  transform: translateY(-1px);
}

.btn-style-craft {
  background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(251, 146, 60, 0.4);
  box-shadow: 0 4px 16px rgba(234, 88, 12, 0.4);
  transition: all 0.2s ease;
}
.btn-style-craft:hover {
  background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
  box-shadow: 0 6px 22px rgba(234, 88, 12, 0.6);
  transform: translateY(-1px);
}

.btn-style-architecture {
  background: linear-gradient(135deg, #65a30d 0%, #84cc16 100%);
  color: #050d03;
  font-weight: 700;
  border: 1px solid rgba(132, 204, 22, 0.5);
  box-shadow: 0 4px 16px rgba(132, 204, 22, 0.35);
  transition: all 0.2s ease;
}
.btn-style-architecture:hover {
  background: linear-gradient(135deg, #84cc16 0%, #a3e635 100%);
  box-shadow: 0 6px 22px rgba(132, 204, 22, 0.55);
  transform: translateY(-1px);
}

.btn-style-beauty {
  background: linear-gradient(135deg, #be185d 0%, #e11d48 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(244, 114, 182, 0.4);
  box-shadow: 0 4px 16px rgba(190, 24, 93, 0.4);
  transition: all 0.2s ease;
}
.btn-style-beauty:hover {
  background: linear-gradient(135deg, #db2777 0%, #f43f5e 100%);
  box-shadow: 0 6px 22px rgba(190, 24, 93, 0.6);
  transform: translateY(-1px);
}

.btn-style-gastro {
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  color: #ffffff;
  font-weight: 700;
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 4px 16px rgba(217, 119, 6, 0.4);
  transition: all 0.2s ease;
}
.btn-style-gastro:hover {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  box-shadow: 0 6px 22px rgba(217, 119, 6, 0.6);
  transform: translateY(-1px);
}

/* ==========================================================================
   KI-Produktberater „Alex“ Widget & Modal Styles
   ========================================================================== */

#alex-trigger-btn {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 16px rgba(0, 240, 255, 0.2);
}

#alex-trigger-btn:hover {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 24px rgba(0, 240, 255, 0.35);
  transform: translateY(-2px);
}

#alex-chat-modal {
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85), 0 0 30px rgba(0, 240, 255, 0.15);
}

/* Custom Scrollbar im Chat */
#alex-messages::-webkit-scrollbar,
#alex-inline-messages::-webkit-scrollbar {
  width: 5px;
}
#alex-messages::-webkit-scrollbar-track,
#alex-inline-messages::-webkit-scrollbar-track {
  background: transparent;
}
#alex-messages::-webkit-scrollbar-thumb,
#alex-inline-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 9999px;
}
#alex-messages::-webkit-scrollbar-thumb:hover,
#alex-inline-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 240, 255, 0.35);
}

/* Responsive Mobile Full-Width Bottom Sheet */
@media (max-width: 639px) {
  #alex-chat-modal {
    left: 1rem;
    right: 1rem;
    bottom: 5rem;
    width: auto;
    max-width: none;
    height: 75vh;
    max-height: 520px;
  }
}

/* ==========================================================================
   Mobile Performance & 60-120fps Smooth Scrolling Optimization
   ========================================================================== */
@media (max-width: 768px) {
  /* Reduce blur overhead on mobile GPUs for stutter-free 60-120fps scrolling */
  .ambient-glow-green,
  .ambient-glow-cyan {
    filter: blur(35px);
    width: 300px;
    height: 300px;
    opacity: 0.55;
  }

  /* Optimize glassmorphism on mobile: lighter blur + hardware composite layer */
  .glass-panel {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(13, 20, 36, 0.92);
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  /* Header stays rock-solid without multi-layer blur recalculations during scroll */
  header[role="banner"] {
    background-color: rgba(5, 8, 17, 0.96) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }

  /* Optimize shadows and transitions on touch devices */
  .browser-mockup {
    box-shadow: 0 15px 30px -10px rgba(0, 0, 0, 0.6);
  }

  .glass-panel:hover {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  }

  /* Prevent iOS Safari auto-zoom when tapping into form inputs / textareas */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="number"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

