/*
Theme Name: ENVA Energieberatung
Theme URI: https://enva.energy
Description: Custom Theme fuer ENVA Energieberatung - Spezialisierte B2B Energieberatungs-Boutique aus Berlin
Author: ENVA
Version: 1.0.0
Text Domain: enva
*/

/* ==========================================================================
   DESIGN SYSTEM - CSS VARIABLES (identisch mit Webflow Design Tokens)
   ========================================================================== */

:root {
  /* Navy Palette */
  --navy-50: #F0F4FA;
  --navy-100: #D6DFED;
  --navy-200: #ADBDD6;
  --navy-300: #8499BA;
  --navy-400: #5B759E;
  --navy-500: #3B5998;
  --navy-600: #2D4373;
  --navy-700: #1E2D4F;
  --navy-800: #111D3D;
  --navy-900: #0A1229;
  --navy-950: #050B18;

  /* Gray Palette */
  --white: #FFFFFF;
  --gray-50: #F8F9FA;
  --gray-100: #F1F3F5;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #868E96;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;

  /* Accent */
  --accent: #006BFF;
  --accent-light: #3388FF;
  --accent-dark: #0055CC;

  /* Semantic */
  --success: #10B981;
  --warning: #F59E0B;
  --error: #EF4444;

  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --text-xs: 12px;
  --text-sm: 14px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 20px;
  --text-2xl: 24px;
  --text-3xl: 30px;
  --text-4xl: 36px;
  --text-5xl: 48px;
  --text-6xl: 60px;
  --text-7xl: 72px;

  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* Spacing (4px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Containers */
  --container-sm: 640px;
  --container-md: 768px;
  --container-lg: 1024px;
  --container-xl: 1280px;
  --container-2xl: 1440px;

  /* Section */
  --section-py: 96px;
}

/* Dark Mode */
[data-theme="dark"] {
  --white: #050B18;
  --gray-50: #0A1229;
  --gray-100: #111D3D;
  --gray-200: #1E2D4F;
  --gray-300: #2D4373;
  --gray-400: #5B759E;
  --gray-600: #8499BA;
  --gray-700: #ADBDD6;
  --gray-900: #F0F4FA;
  --accent: #3388FF;
  --accent-light: #5599FF;
  --accent-dark: #006BFF;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --white: #050B18;
    --gray-50: #0A1229;
    --gray-100: #111D3D;
    --gray-200: #1E2D4F;
    --gray-300: #2D4373;
    --gray-400: #5B759E;
    --gray-600: #8499BA;
    --gray-700: #ADBDD6;
    --gray-900: #F0F4FA;
    --accent: #3388FF;
    --accent-light: #5599FF;
    --accent-dark: #006BFF;
  }
}

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

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--gray-900);
  background-color: var(--white);
  transition: background-color 0.3s ease, color 0.3s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-dark);
}

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  font-weight: 500;
  line-height: var(--leading-tight);
  color: var(--gray-900);
  letter-spacing: -0.02em;
}

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

p {
  margin-bottom: var(--space-4);
  color: var(--gray-700);
}

.text-sm { font-size: var(--text-sm); }
.text-lg { font-size: var(--text-lg); }
.text-xl { font-size: var(--text-xl); }

.text-primary { color: var(--gray-900); }
.text-secondary { color: var(--gray-600); }
.text-tertiary { color: var(--gray-500); }
.text-white { color: var(--white); }
.text-accent { color: var(--accent); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */

.container {
  width: 100%;
  max-width: var(--container-xl);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.container-sm { max-width: var(--container-sm); }
.container-md { max-width: var(--container-md); }
.container-lg { max-width: var(--container-lg); }
.container-2xl { max-width: var(--container-2xl); }

.section {
  padding: var(--section-py) 5%;
  position: relative;
}

.section-sm { padding: var(--space-16) 5%; }
.section-bg { background-color: var(--gray-50); }
.section-dark {
  background-color: var(--navy-900);
  color: var(--gray-100);
}
.section-dark h1, .section-dark h2, .section-dark h3,
.section-dark h4, .section-dark h5, .section-dark h6 {
  color: var(--navy-50);
}
.section-dark p { color: var(--navy-200); }

.grid { display: grid; gap: var(--space-6); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-center { align-items: center; justify-content: center; }
.flex-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  font-family: var(--font-primary);
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--accent);
  color: var(--white);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-base);
}
.btn-primary:hover {
  background-color: var(--accent-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsla(217, 100%, 50%, 0.25);
}

.btn-outline {
  background-color: var(--white);
  color: var(--gray-900);
  padding: var(--space-3) var(--space-6);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  border: 1px solid var(--gray-300);
}
.btn-outline:hover {
  background-color: var(--gray-50);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px hsla(0, 0%, 0%, 0.08);
  color: var(--gray-900);
}

.btn-sm {
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
}

.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
}

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
  background-color: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  box-shadow: 0 0 0 1px hsla(0, 0%, 0%, 0.06), 0 1px 2px 0 hsla(0, 0%, 0%, 0.06);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px hsla(0, 0%, 0%, 0.08), 0 0 0 1px hsla(0, 0%, 0%, 0.06);
}

.card-dark {
  background-color: var(--navy-800);
  border: 1px solid var(--navy-700);
  color: var(--navy-100);
}
.card-dark:hover {
  border-color: var(--accent);
}

/* ==========================================================================
   NAVIGATION (Sticky + Glassmorphism)
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: hsla(0, 0%, 100%, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gray-200);
  padding: var(--space-4) 3%;
  transition: padding 0.3s ease, background-color 0.3s ease;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--container-2xl);
  margin: 0 auto;
}

.nav-logo {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--gray-900);
  text-decoration: none;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  list-style: none;
}

.nav-menu a {
  display: block;
  padding: var(--space-1) var(--space-3);
  color: var(--gray-700);
  font-size: var(--text-sm);
  font-weight: 500;
  border-radius: var(--radius-md);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.nav-menu a:hover,
.nav-menu .current-menu-item a {
  background-color: var(--gray-50);
  color: var(--gray-900);
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Mobile Nav */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-2);
}

@media (max-width: 991px) {
  .nav-toggle { display: block; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: var(--space-4);
    border-bottom: 1px solid var(--gray-200);
  }
  .nav-menu.is-open { display: flex; }
  .nav-cta { display: none; }
}

/* ==========================================================================
   HERO
   ========================================================================== */

.hero {
  padding: var(--space-24) 5% var(--space-16);
  text-align: center;
}

.hero h1 {
  font-size: var(--text-5xl);
  margin-bottom: var(--space-6);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero .accent { color: var(--accent); }

.hero p {
  font-size: var(--text-lg);
  max-width: 700px;
  margin: 0 auto var(--space-8);
  color: var(--gray-600);
}

.hero-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-stats {
  display: flex;
  gap: var(--space-12);
  justify-content: center;
  margin-top: var(--space-12);
}

.hero-stat {
  text-align: center;
}

.hero-stat .number {
  font-size: var(--text-3xl);
  font-weight: 700;
  color: var(--gray-900);
}

.hero-stat .label {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

/* ==========================================================================
   FEATURE GRID
   ========================================================================== */

.features {
  padding: var(--section-py) 5%;
}

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

.features .section-header h2 {
  margin-bottom: var(--space-4);
}

.features .section-header p {
  max-width: 600px;
  margin: 0 auto;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6);
  max-width: var(--container-xl);
  margin: 0 auto;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.feature-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  background-color: var(--gray-50);
  color: var(--accent);
}

.feature-item h3 {
  font-size: var(--text-lg);
  font-weight: 600;
}

.feature-item p {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

/* ==========================================================================
   FAQ (CMS-gesteuert)
   ========================================================================== */

.faq-section {
  padding: var(--section-py) 5%;
  background-color: var(--gray-50);
}

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

.faq-list {
  max-width: var(--container-lg);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--gray-200);
  overflow: hidden;
  transition: border-color 0.3s ease;
}

.faq-item:hover { border-color: var(--accent); }

.faq-question {
  padding: var(--space-5) var(--space-6);
  font-size: var(--text-lg);
  font-weight: 500;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--gray-900);
  background: none;
  border: none;
  width: 100%;
  text-align: left;
  font-family: var(--font-primary);
}

.faq-question::after {
  content: '+';
  font-size: var(--text-xl);
  color: var(--gray-400);
  transition: transform 0.3s ease;
}

.faq-item.is-open .faq-question::after {
  content: '−';
  color: var(--accent);
}

.faq-answer {
  padding: 0 var(--space-6) var(--space-5);
  display: none;
  color: var(--gray-700);
  line-height: var(--leading-relaxed);
}

.faq-item.is-open .faq-answer {
  display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.site-footer {
  background-color: var(--navy-900);
  color: var(--navy-200);
  padding: var(--section-py) 5% var(--space-8);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--space-10);
  max-width: var(--container-2xl);
  margin: 0 auto var(--space-12);
}

.footer-brand h3 {
  color: var(--white);
  font-size: var(--text-xl);
  margin-bottom: var(--space-4);
}

.footer-brand p {
  color: var(--navy-300);
  font-size: var(--text-sm);
}

.footer-col h4 {
  color: var(--white);
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-4);
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.footer-col a {
  color: var(--navy-400);
  font-size: var(--text-sm);
  transition: color 0.2s ease;
}

.footer-col a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid var(--navy-700);
  padding-top: var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--container-2xl);
  margin: 0 auto;
}

.footer-legal {
  display: flex;
  gap: var(--space-6);
}

.footer-legal a {
  color: var(--navy-400);
  font-size: var(--text-sm);
}
.footer-legal a:hover { color: var(--white); }

/* ==========================================================================
   CTA SECTION
   ========================================================================== */

.cta-section {
  padding: var(--section-py) 5%;
  text-align: center;
}

.cta-card {
  max-width: var(--container-lg);
  margin: 0 auto;
  background-color: var(--accent);
  border-radius: var(--radius-2xl);
  padding: var(--space-16) var(--space-10);
  color: var(--white);
}

.cta-card h2 {
  color: var(--white);
  margin-bottom: var(--space-4);
}

.cta-card p {
  color: hsla(0, 0%, 100%, 0.85);
  max-width: 500px;
  margin: 0 auto var(--space-8);
}

.cta-card .btn-primary {
  background-color: var(--white);
  color: var(--accent);
}
.cta-card .btn-primary:hover {
  background-color: var(--gray-100);
  transform: translateY(-2px);
}

/* ==========================================================================
   TIMELINE / PROCESS
   ========================================================================== */

.timeline {
  max-width: var(--container-lg);
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 24px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  display: flex;
  gap: var(--space-6);
  padding-bottom: var(--space-8);
  position: relative;
}

.timeline-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--accent);
  flex-shrink: 0;
  margin-top: 6px;
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 4px var(--white);
}

.timeline-content h3 {
  font-size: var(--text-lg);
  margin-bottom: var(--space-2);
}

.timeline-content p {
  font-size: var(--text-sm);
  color: var(--gray-600);
}

.timeline-step {
  font-size: var(--text-xs);
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

/* ==========================================================================
   BADGE / OVERLINE
   ========================================================================== */

.badge {
  display: inline-flex;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 500;
  background-color: var(--gray-50);
  color: var(--gray-900);
  border: 1px solid var(--gray-200);
}

.badge-accent {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

.overline {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

/* ==========================================================================
   FORMS
   ========================================================================== */

.form-group {
  margin-bottom: var(--space-4);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--gray-900);
  margin-bottom: var(--space-2);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: var(--space-3);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px hsla(217, 100%, 50%, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

/* ==========================================================================
   GLOSSAR A-Z
   ========================================================================== */

.glossar-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
  justify-content: center;
}

.glossar-nav a {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--gray-700);
  border: 1px solid var(--gray-200);
  transition: all 0.2s ease;
}

.glossar-nav a:hover,
.glossar-nav a.is-active {
  background-color: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}

/* ==========================================================================
   BACK TO TOP
   ========================================================================== */

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--white);
  border: none;
  font-size: 20px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 999;
  box-shadow: 0 4px 12px hsla(217, 100%, 50%, 0.3);
}

.back-to-top.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   SCROLL ANIMATIONS
   ========================================================================== */

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

.stagger-1 { transition-delay: 0.1s; }
.stagger-2 { transition-delay: 0.2s; }
.stagger-3 { transition-delay: 0.3s; }
.stagger-4 { transition-delay: 0.4s; }
.stagger-5 { transition-delay: 0.5s; }
.stagger-6 { transition-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 991px) {
  h1 { font-size: var(--text-4xl); }
  h2 { font-size: var(--text-3xl); }
  .section { padding: 72px 5%; }
  .hero h1 { font-size: var(--text-4xl); }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats { flex-wrap: wrap; gap: var(--space-6); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
  h1 { font-size: var(--text-3xl); }
  .section { padding: 56px 5%; }
  .hero h1 { font-size: var(--text-3xl); }
  .hero p { font-size: var(--text-base); }
  .feature-grid { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-4); text-align: center; }
  .hero-stats { flex-direction: column; gap: var(--space-4); }
}

@media (max-width: 478px) {
  h1 { font-size: var(--text-2xl); }
  .hero { padding: var(--space-12) 5% var(--space-8); }
  .hero-buttons { flex-direction: column; }
  .cta-card { padding: var(--space-8) var(--space-6); }
}
