/* SmartEnergy CSS System - Basierend auf Design Tokens */

/* ========================================
   CSS CUSTOM PROPERTIES (DESIGN TOKENS)
   ======================================== */

:root {
  /* FARBEN - Primary (Neonblau) */
  --color-primary-100: rgba(58, 167, 255, 0.1);
  --color-primary-200: rgba(58, 167, 255, 0.2);
  --color-primary-400: #5CB8FF;
  --color-primary-500: #3AA7FF;
  --color-primary-600: #2891E6;

  /* FARBEN - Secondary (Grün) */
  --color-secondary-100: rgba(59, 110, 77, 0.1);
  --color-secondary-400: #4A8A60;
  --color-secondary-500: #3B6E4D;

  /* FARBEN - Neutral (Grau-Skala) */
  --color-neutral-100: #D4D9E0;
  --color-neutral-300: #A7B0BD;
  --color-neutral-400: #6B7785;
  --color-neutral-600: #3A4556;
  --color-neutral-700: #252E3D;
  --color-neutral-800: #1A2230;
  --color-neutral-900: #0B1220;

  /* FARBEN - Background */
  --color-bg-page: var(--color-neutral-900);
  --color-bg-surface: var(--color-neutral-800);
  --color-bg-elevated: var(--color-neutral-700);

  /* FARBEN - Semantic */
  --color-success: #3B6E4D;
  --color-warning: #E6A829;
  --color-error: #E63946;
  --color-info: var(--color-primary-500);

  /* TYPOGRAPHIE - Font Families */
  --font-primary: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  --font-mono: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;

  /* TYPOGRAPHIE - Font Sizes */
  --font-size-xs: 0.833rem;
  --font-size-sm: 1rem;
  --font-size-base: 1.2rem;
  --font-size-lg: 1.5rem;
  --font-size-xl: 2.25rem;
  --font-size-2xl: 3.1rem;
  --font-size-3xl: 4.2rem;

  /* TYPOGRAPHIE - Font Weights */
  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* TYPOGRAPHIE - Line Heights */
  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.6;

  /* SPACING (4pt-basiert) */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;
  --space-32: 8rem;

  /* BORDER RADIUS */
  --radius-sm: 4px;
  --radius-base: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* SHADOWS */
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.12);
  --shadow-card: 0 12px 28px rgba(0,0,0,0.24);
  --shadow-card-hover: 0 14px 32px rgba(0,0,0,0.32), 0 0 0 1px rgba(58,167,255,0.1);
  --shadow-modal: 0 24px 48px rgba(0,0,0,0.4);

  /* ANIMATION */
  --duration-fast: 160ms;
  --duration-base: 200ms;
  --duration-slow: 220ms;
  --easing-default: ease-out;
  --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);

  /* GRID */
  --grid-columns: 12;
  --container-max-width: 1200px;
  --grid-gap: 24px;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-normal);
  color: var(--color-neutral-300);
  background-color: var(--color-bg-page);
  overflow-x: hidden;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
  color: var(--color-neutral-100);
  margin-bottom: var(--space-4);
}

h1 { font-size: var(--font-size-3xl); }
h2 { font-size: var(--font-size-2xl); }
h3 { font-size: var(--font-size-xl); }
h4 { font-size: var(--font-size-lg); }
h5 { font-size: var(--font-size-base); }
h6 { font-size: var(--font-size-sm); }

p {
  margin-bottom: var(--space-4);
  color: var(--color-neutral-400);
}

a {
  color: var(--color-primary-500);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing-default);
}

a:hover {
  color: var(--color-primary-400);
}

/* ========================================
   GRID SYSTEM
   ======================================== */

.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-8);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--grid-gap);
}

.col-1 { grid-column: span 1; }
.col-2 { grid-column: span 2; }
.col-3 { grid-column: span 3; }
.col-4 { grid-column: span 4; }
.col-5 { grid-column: span 5; }
.col-6 { grid-column: span 6; }
.col-7 { grid-column: span 7; }
.col-8 { grid-column: span 8; }
.col-9 { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* ========================================
   COMPONENTS
   ======================================== */

/* NAVIGATION */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: rgba(26, 34, 48, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(58,167,255,0.1);
  z-index: 1000;
  transition: box-shadow var(--duration-base) var(--easing-default);
}

.nav.scrolled {
  box-shadow: var(--shadow-card);
}

.nav-container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--space-4);
}

.nav-logo {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-neutral-100);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-8);
}

.nav-link {
  color: var(--color-neutral-400);
  font-weight: var(--font-weight-medium);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-base);
  transition: all var(--duration-fast) var(--easing-default);
  position: relative;
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-primary-500);
}

.nav-link.active::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  background: var(--color-primary-500);
  border-radius: 1px;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-neutral-300);
  cursor: pointer;
}

/* MOBILE NAVIGATION */
@media (max-width: 1023px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--color-bg-elevated);
    flex-direction: column;
    padding: var(--space-4);
    box-shadow: var(--shadow-modal);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-medium);
  border-radius: var(--radius-base);
  border: none;
  cursor: pointer;
  transition: all var(--duration-fast) var(--easing-default);
  text-decoration: none;
  min-height: 44px;
}

.btn-primary {
  background: var(--color-primary-500);
  color: var(--color-bg-page);
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  background: var(--color-primary-400);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.btn-primary:active {
  background: var(--color-primary-600);
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--color-neutral-300);
  border: 1px solid var(--color-neutral-600);
}

.btn-secondary:hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
}

.btn:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* CARDS */
.card {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-base) var(--easing-default);
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--color-primary-500), transparent);
  opacity: 0.5;
}

/* DATA CARD */
.data-card {
  background: var(--color-bg-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-card);
  transition: all var(--duration-base) var(--easing-default);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.data-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}

.data-card-number {
  font-size: var(--font-size-2xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary-500);
  line-height: var(--line-height-tight);
}

.data-card-label {
  font-size: var(--font-size-sm);
  color: var(--color-neutral-400);
  margin-top: var(--space-2);
}

/* HERO SECTION */
.hero {
  min-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background: var(--color-bg-page);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 50%, var(--color-primary-500) 1px, transparent 1px),
    radial-gradient(circle at 80% 50%, var(--color-primary-500) 1px, transparent 1px),
    radial-gradient(circle at 40% 20%, var(--color-primary-500) 1px, transparent 1px),
    radial-gradient(circle at 60% 80%, var(--color-primary-500) 1px, transparent 1px);
  background-size: 100px 100px, 80px 80px, 60px 60px, 120px 120px;
  opacity: 0.15;
  animation: mesh-pulse 4s ease-in-out infinite;
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: var(--font-size-3xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-neutral-100);
  margin-bottom: var(--space-4);
}

.hero-subtitle {
  font-size: var(--font-size-base);
  color: var(--color-neutral-400);
  margin-bottom: var(--space-8);
}

@keyframes mesh-pulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.25; }
}

/* ENERGY POINTS */
.energy-point {
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--color-primary-500);
  border-radius: 50%;
  animation: energy-pulse 2s infinite ease-in-out;
}

.energy-point:nth-child(1) { top: 20%; left: 20%; animation-delay: 0s; }
.energy-point:nth-child(2) { top: 40%; left: 60%; animation-delay: 0.5s; }
.energy-point:nth-child(3) { top: 60%; left: 80%; animation-delay: 1s; }
.energy-point:nth-child(4) { top: 30%; left: 30%; animation-delay: 1.5s; }
.energy-point:nth-child(5) { top: 70%; left: 40%; animation-delay: 2s; }

@keyframes energy-pulse {
  0%, 100% { 
    transform: scale(1);
    opacity: 0.8;
  }
  50% { 
    transform: scale(1.5);
    opacity: 0.4;
  }
}

/* SECTIONS */
.section {
  padding: var(--space-24) 0;
}

.section-title {
  text-align: center;
  margin-bottom: var(--space-12);
}

/* GRIDS */
.grid-1 { grid-template-columns: repeat(1, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* UTILITIES */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary-500); }
.text-success { color: var(--color-success); }
.text-warning { color: var(--color-warning); }
.text-error { color: var(--color-error); }

.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.mb-12 { margin-bottom: var(--space-12); }
.mb-16 { margin-bottom: var(--space-16); }

.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mt-12 { margin-top: var(--space-12); }
.mt-16 { margin-top: var(--space-16); }

.hidden { display: none; }

/* RESPONSIVE */
@media (max-width: 1023px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: var(--font-size-2xl); }
  .hero-subtitle { font-size: var(--font-size-sm); }
}

@media (max-width: 639px) {
  .grid-2,
  .grid-3,
  .grid-4 { 
    grid-template-columns: repeat(1, 1fr); 
  }
  
  .container {
    padding: 0 var(--space-4);
  }
  
  .hero {
    padding: var(--space-16) 0;
  }
  
  .hero-title {
    font-size: var(--font-size-xl);
  }
  
  .card {
    padding: var(--space-6);
  }
}

/* ANIMATIONS */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--duration-slow) var(--easing-smooth);
}

.animate-on-scroll.animated {
  opacity: 1;
  transform: translateY(0);
}

/* LINK PULSE ANIMATION */
@keyframes link-pulse {
  0%, 100% { 
    transform: scale(1); 
    opacity: 1; 
  }
  50% { 
    transform: scale(1.02); 
    opacity: 0.9; 
  }
}

.link-pulse {
  animation: link-pulse 1.5s infinite ease-in-out;
}

/* REDUCED MOTION */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  .animate-on-scroll {
    transform: none !important;
  }
}

/* FOCUS STYLES */
*:focus {
  outline: 2px solid var(--color-primary-500);
  outline-offset: 2px;
}

/* TOUCH TARGETS */
button,
.btn,
.nav-toggle {
  min-width: 44px;
  min-height: 44px;
}
