/* ============================================
   SM tech GmbH – Kanton St. Gallen Solar
   Color: Purple #6d28d9 / Gold #f59e0b
   Fonts: IBM Plex Sans + Crimson Pro
   ============================================ */

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

:root {
  --purple: #6d28d9;
  --purple-dark: #5b21b6;
  --purple-light: #8b5cf6;
  --purple-faint: #ede9fe;
  --gold: #f59e0b;
  --gold-light: #fbbf24;
  --gold-dark: #d97706;
  --white: #ffffff;
  --off-white: #fafafa;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-serif: 'Crimson Pro', Georgia, 'Times New Roman', serif;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.1);
  --shadow-xl: 0 20px 48px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 16px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  color: var(--gray-800);
  background: var(--off-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--purple-dark); }

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.container-narrow {
  max-width: 800px;
}

/* --- Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(250, 250, 250, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: all var(--transition);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.97);
  border-bottom-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.125rem;
  color: var(--gray-900);
  display: flex;
  align-items: center;
  gap: 8px;
}

.navbar-brand:hover { color: var(--purple); }

.brand-icon {
  font-size: 1.5rem;
  color: var(--gold);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: color var(--transition);
  letter-spacing: 0.01em;
}

.nav-links a:hover { color: var(--purple); }

.nav-cta {
  background: var(--purple);
  color: var(--white) !important;
  padding: 10px 22px;
  border-radius: 100px;
  font-weight: 600 !important;
  transition: all var(--transition) !important;
}

.nav-cta:hover {
  background: var(--purple-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.3);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-700);
  border-radius: 2px;
  transition: all var(--transition);
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: url('../images/hero.png') center/cover no-repeat;
  overflow: hidden;
  padding: 120px 0 80px;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(109,40,217,0.75) 0%, rgba(0,0,0,0.6) 100%);
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to top, var(--off-white), transparent);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
}

.hero-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--gold-light);
  margin-bottom: 24px;
  padding: 8px 20px;
  border: 1px solid rgba(251, 191, 36, 0.3);
  border-radius: 100px;
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.hero-title em {
  font-style: normal;
  color: var(--gold-light);
}

.hero-subtitle {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.8;
  max-width: 640px;
  margin: 0 auto 40px;
  opacity: 0.9;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 60px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--gold-light);
  line-height: 1.2;
}

.hero-stat-unit {
  font-size: 1.25rem;
  font-weight: 400;
  opacity: 0.8;
}

.hero-stat-label {
  font-size: 0.8125rem;
  font-weight: 400;
  opacity: 0.7;
  margin-top: 4px;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  font-family: var(--font-sans);
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 100px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--gold);
  color: var(--gray-900);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-dark);
  border-color: var(--gold-dark);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
  color: var(--white);
}

.btn-lg {
  padding: 18px 44px;
  font-size: 1.0625rem;
}

/* --- Sections --- */
.section {
  padding: 100px 0;
}

.section-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--purple);
  margin-bottom: 12px;
  text-align: center;
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.section-intro {
  font-size: 1.0625rem;
  color: var(--gray-500);
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
  line-height: 1.8;
}

.section-cta {
  text-align: center;
  margin-top: 48px;
}

/* --- Facts Cards --- */
.facts {
  background: var(--white);
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.card {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: all var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--purple-faint);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.card-text {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.75;
}

/* --- Förderung --- */
.foerderung {
  background: var(--off-white);
}

.foerderung-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.foerderung-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  position: relative;
  transition: all var(--transition);
}

.foerderung-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--purple-faint);
}

.foerderung-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  background: var(--purple-faint);
  color: var(--purple);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 16px;
}

.foerderung-card h3 {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 16px;
}

.foerderung-highlight {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
}

.foerderung-amount {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--purple);
}

.foerderung-amount small {
  font-size: 0.875rem;
  font-weight: 500;
}

.foerderung-detail {
  font-size: 0.875rem;
  color: var(--gray-500);
}

.foerderung-card p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.75;
  margin-top: 12px;
}

/* --- Table --- */
.table-wrapper {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px;
  overflow-x: auto;
}

.table-title {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 24px;
}

.foerder-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.foerder-table th {
  text-align: left;
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-500);
  padding: 12px 16px;
  border-bottom: 2px solid var(--gray-200);
}

.foerder-table td {
  padding: 16px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
}

.foerder-table tbody tr:hover {
  background: var(--gray-50);
}

.foerder-table .highlight-row {
  background: var(--purple-faint);
}

.foerder-table .highlight-row:hover {
  background: #ddd6fe;
}

.foerder-table .highlight-row td {
  color: var(--purple-dark);
  font-weight: 500;
}

.table-note {
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin-top: 16px;
  font-style: italic;
}

/* --- Article --- */
.artikel {
  background: var(--white);
}

.article-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--gray-900);
  text-align: center;
  margin-bottom: 24px;
  line-height: 1.25;
}

.article-lead {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--gray-600);
  text-align: center;
  line-height: 1.8;
  margin-bottom: 56px;
  font-style: italic;
}

.article-block {
  margin-bottom: 48px;
}

.article-heading {
  font-family: var(--font-serif);
  font-size: 1.625rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--purple-faint);
}

.article-block p {
  font-size: 1rem;
  color: var(--gray-700);
  line-height: 1.85;
  margin-bottom: 16px;
}

.drop-cap {
  float: left;
  font-family: var(--font-serif);
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 0.8;
  color: var(--purple);
  margin-right: 8px;
  margin-top: 6px;
}

.article-quote {
  border-left: 4px solid var(--purple);
  padding: 24px 32px;
  margin: 32px 0;
  background: var(--purple-faint);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--font-serif);
  font-size: 1.125rem;
  font-style: italic;
  color: var(--purple-dark);
  line-height: 1.7;
}

/* --- Vorteile --- */
.vorteile {
  background: var(--off-white);
}

.vorteile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.vorteil-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  transition: all var(--transition);
}

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

.vorteil-number {
  font-family: var(--font-serif);
  font-size: 3rem;
  font-weight: 700;
  color: var(--purple-faint);
  line-height: 1;
  margin-bottom: 16px;
}

.vorteil-card h3 {
  font-family: var(--font-serif);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}

.vorteil-card p {
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.75;
}

/* --- Kosten --- */
.kosten {
  background: var(--white);
}

.kosten-card {
  background: var(--off-white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 720px;
  margin: 0 auto;
}

.kosten-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.kosten-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-200);
}

.kosten-item:last-child {
  border-bottom: none;
}

.kosten-label {
  font-size: 0.9375rem;
  color: var(--gray-600);
}

.kosten-value {
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
}

.kosten-minus .kosten-value {
  color: #059669;
}

.kosten-total {
  background: var(--purple-faint);
  padding: 16px;
  border-radius: var(--radius);
  margin-top: 8px;
  border-bottom: none !important;
}

.kosten-total .kosten-label {
  font-weight: 700;
  color: var(--gray-900);
}

.kosten-total .kosten-value {
  font-size: 1.25rem;
  color: var(--purple);
}

.kosten-divider {
  height: 1px;
  background: var(--gray-200);
  margin: 32px 0;
}

.kosten-savings {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  text-align: center;
}

.kosten-savings-value {
  display: block;
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 4px;
}

.kosten-savings-label {
  font-size: 0.8125rem;
  color: var(--gray-500);
}

.kosten-note {
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin-top: 24px;
  font-style: italic;
  line-height: 1.6;
}

/* --- FAQ --- */
.faq {
  background: var(--off-white);
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.faq-item {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}

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

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 20px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  color: var(--gray-800);
  transition: color var(--transition);
  gap: 16px;
}

.faq-question:hover {
  color: var(--purple);
}

.faq-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  color: var(--gray-400);
  transition: transform var(--transition);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
  color: var(--purple);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-answer p {
  padding: 0 24px 20px;
  font-size: 0.9375rem;
  color: var(--gray-600);
  line-height: 1.8;
}

/* --- CTA Section --- */
.cta-section {
  background: var(--white);
  padding: 80px 0;
}

.cta-card {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-dark) 100%);
  border-radius: var(--radius-lg);
  padding: 72px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, rgba(245, 158, 11, 0.15) 0%, transparent 60%);
}

.cta-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  position: relative;
  line-height: 1.25;
}

.cta-text {
  font-size: 1.0625rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 560px;
  margin: 0 auto 32px;
  position: relative;
  line-height: 1.7;
}

.cta-card .btn {
  position: relative;
}

.cta-sub {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 16px;
  position: relative;
}

/* --- Footer --- */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand {
  font-family: var(--font-sans);
  font-size: 1.125rem;
  color: var(--white);
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.footer h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-300);
  margin-bottom: 16px;
}

.footer-text {
  font-size: 0.875rem;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--gray-400);
}

.footer-links a:hover {
  color: var(--gold-light);
}

.footer-bottom {
  border-top: 1px solid var(--gray-800);
  padding-top: 24px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.8125rem;
  margin-bottom: 8px;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--gray-500);
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.6;
}

/* --- Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* --- Responsive: 1024px --- */
@media (max-width: 1024px) {
  .cards-grid,
  .vorteile-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cards-grid .card:last-child {
    grid-column: span 2;
    max-width: 100%;
  }

  .vorteile-grid .vorteil-card:last-child {
    grid-column: span 2;
    max-width: 100%;
  }

  .foerderung-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
  }

  .hero-stats {
    gap: 32px;
  }
}

/* --- Responsive: 768px --- */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 24px;
    gap: 16px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    transition: transform var(--transition);
    z-index: 999;
  }

  .nav-links.open {
    transform: translateY(0);
  }

  .nav-links a {
    font-size: 1rem;
    color: var(--gray-700);
  }

  .nav-cta {
    text-align: center;
    display: block;
  }

  .hero {
    min-height: auto;
    padding: 120px 0 80px;
  }

  .hero-title {
    font-size: 2.25rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-stats {
    gap: 24px;
  }

  .hero-stat-value {
    font-size: 1.5rem;
  }

  .section {
    padding: 64px 0;
  }

  .cards-grid,
  .vorteile-grid {
    grid-template-columns: 1fr;
  }

  .cards-grid .card:last-child,
  .vorteile-grid .vorteil-card:last-child {
    grid-column: auto;
  }

  .foerderung-grid {
    grid-template-columns: 1fr;
  }

  .table-wrapper {
    padding: 24px 16px;
  }

  .foerder-table {
    font-size: 0.8125rem;
  }

  .foerder-table th,
  .foerder-table td {
    padding: 10px 8px;
  }

  .kosten-card {
    padding: 32px 24px;
  }

  .kosten-savings {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cta-card {
    padding: 48px 24px;
  }

  .article-quote {
    padding: 20px 24px;
    margin: 24px 0;
  }

  .drop-cap {
    font-size: 2.75rem;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }

  .hero-actions .btn {
    width: 100%;
    max-width: 320px;
  }
}

/* --- Nav toggle active state --- */
.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}
.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* === Mobile Logo Size === */
@media (max-width: 768px) {
  .logo img, .nav-logo img, .navbar-brand img, .nav-brand img, .navbar__logo img {
    height: 36px !important;
  }
}

/* === Mobile Hero Text === */
@media (max-width: 768px) {
  .hero h1, .hero-content h1, .hero__content h1 { font-size: 2rem; }
}