/* ==========================================================================
   Backfischer IT Support – Core Design System & Custom Styles
   Author: Backfischer Web Development Team
   Theme: Modern Dark Tech (Obsidian / Elevated Slate / Backfischer Red)
   ========================================================================== */

/* --- 1. Design Tokens & Root Variables --- */
:root {
  /* Brand Core Colors */
  --bg-dark: #0D0F12;
  --bg-dark-rgb: 13, 15, 18;
  --bg-surface: #161920;
  --bg-surface-elevated: #1D222C;
  --bg-surface-hover: #222733;
  --border-subtle: #242A36;
  --border-hover: #384152;
  --border-active: #F11B1B;
  
  --brand-red: #F11B1B;
  --brand-red-rgb: 241, 27, 27;
  --brand-red-hover: #FF3838;
  --brand-red-dark: #991313;
  --brand-red-glow: rgba(241, 27, 27, 0.45);
  
  --text-main: #F3EFF5;
  --text-muted: #9AA1B2;
  --text-subtle: #687185;

  /* Swarm & Accent Highlights */
  --swarm-cyan: #00F2FE;
  --swarm-cyan-rgb: 0, 242, 254;
  --swarm-teal: #14B8A6;
  --swarm-teal-rgb: 20, 184, 166;
  
  --accent-emerald: #10B981;
  --accent-amber: #F59E0B;

  /* Typography */
  --font-display: 'Righteous', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Titillium Web', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 8px 24px -4px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, 0.8);
  --shadow-red-glow: 0 0 25px rgba(241, 27, 27, 0.4);
  --shadow-cyan-glow: 0 0 25px rgba(0, 242, 254, 0.35);

  /* Transitions */
  --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 0.2s var(--ease-spring);
  --transition-smooth: 0.3s var(--ease-spring);
}

/* --- 2. Global Reset & Base Styles --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg-dark);
  color: var(--text-main);
  overflow-x: hidden;
  position: relative;
}

/* Typography Overrides */
h1, h2, h3, h4, .font-display {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  font-weight: 400;
  color: var(--text-main);
}

p, span, li, button, input, textarea, select {
  font-family: var(--font-body);
}

/* Selection Color */
::selection {
  background-color: var(--brand-red);
  color: #FFFFFF;
}

/* Custom Sleek Dark Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
  background: var(--border-subtle);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--brand-red);
}

/* --- 3. Ambient Background & Canvas Canvas Layer --- */
.ambient-bg-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 1440px;
  height: 800px;
  background: radial-gradient(circle at 50% 15%, rgba(241, 27, 27, 0.12) 0%, rgba(0, 242, 254, 0.05) 45%, transparent 75%);
  pointer-events: none;
  z-index: 0;
}

#swarm-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 1;
}

/* Content Container relative to sit above Canvas */
.content-layer {
  position: relative;
  z-index: 2;
}

/* --- 4. Navigation & Header Styles --- */
.glass-nav {
  background: rgba(13, 15, 18, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
  transition: background-color var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.glass-nav.scrolled {
  background: rgba(13, 15, 18, 0.95);
  border-bottom-color: rgba(241, 27, 27, 0.3);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.7);
}

/* Navigation Links */
.nav-link {
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}

.nav-link:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
  color: var(--brand-red);
}

/* --- 5. Button Design System (Singleton Factory & Zammad Inspired) --- */

/* Primary CTA Button (Singleton Factory Style with Backfischer Red Glow) */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--text-main);
  background: linear-gradient(180deg, #FF3D3D 0%, var(--brand-red) 100%);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(241, 27, 27, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.35);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(180deg, #FF5555 0%, #E60F0F 100%);
  box-shadow: 0 8px 30px rgba(241, 27, 27, 0.6), inset 0 1px 2px rgba(255, 255, 255, 0.5);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 2px 8px rgba(241, 27, 27, 0.4);
}

.btn-primary .btn-arrow {
  transition: transform var(--transition-fast);
}

.btn-primary:hover .btn-arrow {
  transform: translateX(4px);
}

/* Secondary Button (Elevated Dark Slate with Hover Border) */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-main);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  border-color: var(--brand-red);
  background-color: var(--bg-surface-elevated);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5), 0 0 15px rgba(241, 27, 27, 0.2);
}

/* Emergency Hotline Pill Button */
.btn-emergency {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1.15rem;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--text-main);
  background: rgba(241, 27, 27, 0.12);
  border: 1px solid rgba(241, 27, 27, 0.35);
  border-radius: 9999px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.btn-emergency:hover {
  background: rgba(241, 27, 27, 0.25);
  border-color: var(--brand-red);
  box-shadow: 0 0 20px rgba(241, 27, 27, 0.4);
  transform: scale(1.02);
}

/* Pulsing Status Dot */
.status-dot-pulse {
  position: relative;
  display: flex;
  width: 0.65rem;
  height: 0.65rem;
}

.status-dot-pulse::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--brand-red);
  animation: pulse-ring 1.8s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.status-dot-pulse::after {
  content: '';
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: var(--brand-red);
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(0.95); opacity: 0; }
}

/* Language Switcher Pill */
.lang-switch {
  display: inline-flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 9999px;
  padding: 0.2rem;
}

.lang-switch a {
  padding: 0.3rem 0.65rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  border-radius: 9999px;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.lang-switch a.active {
  color: var(--text-main);
  background: var(--brand-red);
  box-shadow: 0 0 10px rgba(241, 27, 27, 0.5);
}

/* --- 6. Cards, Panels & Containers --- */
.card-tech {
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  padding: 2rem;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.card-tech::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, rgba(241, 27, 27, 0.4) 50%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.card-tech:hover {
  transform: translateY(-4px);
  border-color: rgba(241, 27, 27, 0.35);
  box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(241, 27, 27, 0.15);
}

.card-tech:hover::before {
  opacity: 1;
}

/* Proxmox Migration Feature Highlight Card */
.card-highlight {
  background: linear-gradient(135deg, rgba(229, 112, 0, 0.08) 0%, rgba(22, 25, 32, 0.95) 60%);
  border: 1px solid rgba(229, 112, 0, 0.3);
  box-shadow: 0 8px 30px rgba(229, 112, 0, 0.15);
  transition: all var(--transition-smooth);
}

.card-highlight:hover {
  border-color: rgba(229, 112, 0, 0.6);
  box-shadow: 0 16px 45px rgba(229, 112, 0, 0.25);
}

/* Windows 11 Migration Feature Highlight Card */
.card-highlight-blue {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08) 0%, rgba(22, 25, 32, 0.95) 60%);
  border: 1px solid rgba(59, 130, 246, 0.35);
  box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
  transition: all var(--transition-smooth);
}

.card-highlight-blue:hover {
  border-color: rgba(59, 130, 246, 0.65);
  box-shadow: 0 16px 45px rgba(37, 99, 235, 0.25);
}

/* --- 7. Interactive 3-Step Booking Wizard --- */
.booking-wizard {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  padding: 2.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
  position: relative;
}

.wizard-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  position: relative;
}

.wizard-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  z-index: 2;
  cursor: default;
}

.wizard-step-circle {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.1rem;
  background: var(--bg-surface-elevated);
  border: 2px solid var(--border-subtle);
  color: var(--text-muted);
  transition: all var(--transition-smooth);
}

.wizard-step-item.active .wizard-step-circle {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(241, 27, 27, 0.6);
}

.wizard-step-item.completed .wizard-step-circle {
  background: var(--accent-emerald);
  border-color: var(--accent-emerald);
  color: #FFFFFF;
}

.wizard-step-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.wizard-step-item.active .wizard-step-label {
  color: var(--text-main);
}

/* Radio Selection Tiles */
.wizard-tile {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--bg-surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.wizard-tile:hover {
  border-color: var(--border-hover);
  background: var(--bg-surface-hover);
}

.wizard-tile.selected {
  border-color: var(--brand-red);
  background: rgba(241, 27, 27, 0.08);
  box-shadow: 0 0 15px rgba(241, 27, 27, 0.2);
}

/* Input Fields */
.input-field {
  width: 100%;
  background: #101217;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  padding: 0.85rem 1.1rem;
  font-size: 1rem;
  color: var(--text-main);
  transition: all var(--transition-fast);
  outline: none;
}

.input-field:focus {
  border-color: var(--brand-red);
  box-shadow: 0 0 0 3px rgba(241, 27, 27, 0.25);
}

.input-field::placeholder {
  color: var(--text-subtle);
}

/* --- 8. Cookie Banner Styles --- */
.cookie-banner {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  left: 1.5rem;
  max-width: 520px;
  background: rgba(22, 25, 32, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(241, 27, 27, 0.15);
  z-index: 9999;
  transform: translateY(120%);
  opacity: 0;
  transition: transform 0.4s var(--ease-spring), opacity 0.4s ease;
}

.cookie-banner.visible {
  transform: translateY(0);
  opacity: 1;
}

/* --- 9. Animations & Keyframes --- */
@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(1deg); }
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

/* Mascot Interactive Box Styles ("Über Backfischer") */
.mascot-interactive-box {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s var(--ease-spring);
}

.mascot-interactive-box:hover {
  border-color: rgba(241, 27, 27, 0.45);
  box-shadow: 0 0 50px rgba(241, 27, 27, 0.25), inset 0 0 30px rgba(241, 27, 27, 0.08);
  transform: translateY(-2px);
}

.mascot-bubble-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  border-radius: 1.5rem;
}

.mascot-fish-wrapper {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  will-change: transform, opacity;
  transform-origin: center center;
}

.mascot-fish-img {
  width: 11rem;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 25px rgba(241, 27, 27, 0.45));
  will-change: transform, filter, opacity;
}

/* Reveal on scroll utility classes */
.reveal-init {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease-spring), transform 0.6s var(--ease-spring);
}

.reveal-active {
  opacity: 1;
  transform: translateY(0);
}

/* --- 10. Responsive Tweaks --- */
@media (max-width: 768px) {
  .card-tech {
    padding: 1.5rem;
  }
  .booking-wizard {
    padding: 1.5rem;
  }
  .wizard-step-label {
    display: none;
  }
  .cookie-banner {
    left: 1rem;
    right: 1rem;
    bottom: 1rem;
  }
}
