/**
 * Landing Energieaudit — globale Styles (Ausführung 16)
 * Design-Tokens, Navigation, Sektionen, Custom-Cursor-Hooks
 */

:root {
  --ink: #0b0f12;
  --panel: #121a22;
  --panel-2: #1a2430;
  --sage: #4e6e5d;
  --sage-bright: #6f9a84;
  --brass: #d4a574;
  --brass-soft: rgba(212, 165, 116, 0.35);
  --paper: #f2efe7;
  --text: #eaf0ec;
  --muted: #9db0c0;
  --ring: rgba(234, 240, 236, 0.55);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius: 18px;
  --radius-sm: 12px;
  --font-display: "Unbounded", system-ui, sans-serif;
  --font-body: "IBM Plex Sans", system-ui, sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: radial-gradient(1200px 800px at 10% -10%, rgba(111, 154, 132, 0.12), transparent 55%),
    radial-gradient(900px 600px at 100% 0%, rgba(212, 165, 116, 0.08), transparent 50%), var(--ink);
  color: var(--text);
  line-height: 1.65;
  font-size: 1.05rem;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid var(--sage-bright);
  outline-offset: 3px;
}

/* Custom Cursor: Standardzeiger ausblenden (wird per Klasse vom Script gesetzt) */
body.is-cursor-custom {
  cursor: none;
}

body.is-cursor-custom a,
body.is-cursor-custom button,
body.is-cursor-custom [role="button"],
body.is-cursor-custom input,
body.is-cursor-custom textarea,
body.is-cursor-custom select,
body.is-cursor-custom label {
  cursor: none;
}

/* Cursor-Ebenen: Mix-Blend für Kontrast auf hell/dunkel */
.cursor-root {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: exclusion;
}

.cursor-dot,
.cursor-ring-track {
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
  pointer-events: none;
}

.cursor-dot {
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 999px;
  background: #fff;
}

.cursor-dot-core {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: inherit;
  transition: transform 0.2s var(--ease-out);
  transform-origin: center;
}

.cursor-ring-track {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
}

.cursor-ring-shape {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  transition: transform 0.28s var(--ease-out), border-radius 0.28s var(--ease-out), border-color 0.28s var(--ease-out);
  transform-origin: center;
}

/* Kontext via :has() — Skalierung am inneren Element, Translation bleibt auf dem Track (JS) */
body.is-cursor-custom:has(a:hover) .cursor-ring-shape,
body.is-cursor-custom:has(button:hover) .cursor-ring-shape,
body.is-cursor-custom:has([role="button"]:hover) .cursor-ring-shape,
body.is-cursor-custom:has(input:hover) .cursor-ring-shape,
body.is-cursor-custom:has(textarea:hover) .cursor-ring-shape,
body.is-cursor-custom:has(select:hover) .cursor-ring-shape,
body.is-cursor-custom:has(.cursor-magnetic:hover) .cursor-ring-shape {
  transform: scale(1.35);
  border-color: rgba(255, 255, 255, 1);
}

body.is-cursor-custom:has(a:hover) .cursor-dot-core,
body.is-cursor-custom:has(button:hover) .cursor-dot-core,
body.is-cursor-custom:has([role="button"]:hover) .cursor-dot-core,
body.is-cursor-custom:has(.cursor-magnetic:hover) .cursor-dot-core {
  transform: scale(1.25);
}

body.is-cursor-custom:has(.cursor-media:hover) .cursor-ring-shape {
  transform: scale(1.65);
  border-radius: 28%;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 14px;
  background: var(--paper);
  color: var(--ink);
  border-radius: 10px;
  z-index: 10000;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(to bottom, rgba(11, 15, 18, 0.92), rgba(11, 15, 18, 0.72));
  border-bottom: 1px solid rgba(157, 176, 192, 0.12);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: conic-gradient(from 210deg, var(--sage), var(--brass), var(--sage-bright), var(--sage));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08) inset, 0 12px 40px rgba(0, 0, 0, 0.35);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-kicker {
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: 6px;
}

@media (min-width: 1024px) {
  .nav-desktop {
    display: flex;
  }
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.nav-caret {
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.65;
}

.nav-panel {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  min-width: 260px;
  padding: 10px;
  border-radius: var(--radius);
  background: rgba(18, 26, 34, 0.96);
  border: 1px solid rgba(157, 176, 192, 0.14);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s var(--ease-out), transform 0.2s var(--ease-out), visibility 0.2s;
}

.nav-item:hover .nav-panel,
.nav-item:focus-within .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-panel a {
  display: block;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav-panel a:hover {
  background: rgba(255, 255, 255, 0.06);
}

.nav-panel .muted {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 4px 12px 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.btn-primary {
  background: linear-gradient(120deg, var(--sage-bright), var(--sage));
  color: #04120c;
  box-shadow: 0 16px 50px rgba(79, 140, 112, 0.35);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 22px 60px rgba(79, 140, 112, 0.45);
}

.btn-ghost {
  border-color: rgba(157, 176, 192, 0.35);
  color: var(--text);
  background: rgba(255, 255, 255, 0.02);
}

.btn-ghost:hover {
  border-color: rgba(234, 240, 236, 0.45);
  background: rgba(255, 255, 255, 0.05);
}

.mobile-toggle {
  display: inline-flex;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(157, 176, 192, 0.25);
  background: rgba(255, 255, 255, 0.03);
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex-direction: column;
}

@media (min-width: 1024px) {
  .mobile-toggle {
    display: none;
  }
}

.mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--text);
}

.mobile-drawer {
  display: none;
  position: fixed;
  inset: 72px 16px auto 16px;
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(18, 26, 34, 0.98);
  border: 1px solid rgba(157, 176, 192, 0.16);
  box-shadow: var(--shadow);
  z-index: 60;
}

.mobile-drawer.is-open {
  display: block;
}

.mobile-drawer a {
  display: block;
  padding: 12px;
  color: var(--text);
  text-decoration: none;
  border-radius: 10px;
}

.mobile-drawer a:hover {
  background: rgba(255, 255, 255, 0.05);
}

.mobile-sub {
  padding-left: 12px;
  border-left: 1px solid rgba(157, 176, 192, 0.2);
  margin: 8px 0 8px 8px;
}

.section {
  padding: 88px 24px;
}

.section-tight {
  padding: 64px 24px;
}

.wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.hero {
  padding: 48px 24px 96px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: 56px;
  }
}

.hero-clip {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  min-height: 360px;
  border: 1px solid rgba(157, 176, 192, 0.16);
  box-shadow: var(--shadow);
}

.hero-clip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.05) contrast(1.05);
}

.hero-clip::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(11, 15, 18, 0.75), rgba(11, 15, 18, 0.1) 45%, rgba(78, 110, 93, 0.25));
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(212, 165, 116, 0.35);
  background: rgba(212, 165, 116, 0.08);
  color: var(--brass);
  font-size: 0.85rem;
}

.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-size: clamp(2.2rem, 4vw, 3.6rem);
  margin: 18px 0 16px;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: 52ch;
}

.kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
  margin-top: 28px;
}

.kpi {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(157, 176, 192, 0.12);
}

.kpi strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--paper);
}

.grid-2 {
  display: grid;
  gap: 28px;
}

@media (min-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
    gap: 36px;
  }
}

.card {
  padding: 28px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(26, 36, 48, 0.9), rgba(18, 26, 34, 0.92));
  border: 1px solid rgba(157, 176, 192, 0.12);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.35);
}

.card h3 {
  margin-top: 0;
  font-family: var(--font-display);
}

.muted {
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(157, 176, 192, 0.25);
  color: var(--muted);
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
}

.step {
  position: relative;
  padding: 22px 22px 22px 72px;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(157, 176, 192, 0.12);
}

.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 18px;
  top: 22px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.85rem;
  color: #04120c;
  background: linear-gradient(135deg, var(--brass), #e8c49a);
}

.quote {
  font-style: italic;
  color: var(--paper);
}

.site-footer {
  padding: 48px 24px 32px;
  border-top: 1px solid rgba(157, 176, 192, 0.12);
  background: rgba(0, 0, 0, 0.25);
}

.footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 2fr 1fr 1fr;
  }
}

.footer-grid a {
  color: var(--muted);
  text-decoration: none;
}

.footer-grid a:hover {
  color: var(--text);
}

.alert {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 165, 116, 0.35);
  background: rgba(212, 165, 116, 0.1);
  color: var(--paper);
}

form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

form label {
  font-size: 0.9rem;
  color: var(--muted);
}

form input,
form textarea,
form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(157, 176, 192, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
}

form input:focus,
form textarea:focus,
form select:focus {
  outline: 2px solid rgba(111, 154, 132, 0.45);
  outline-offset: 2px;
}

.prose h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin-top: 2.2rem;
}

.prose h3 {
  font-size: 1.2rem;
  margin-top: 1.4rem;
}

.prose a {
  color: var(--brass);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* --- Conversion & Wizard --- */
body.has-sticky-cta {
  padding-bottom: 88px;
}

@media (min-width: 1024px) {
  body.has-sticky-cta {
    padding-bottom: 72px;
  }
}

.hero-visual {
  min-height: 320px;
  border-radius: 28px;
  border: 1px solid rgba(157, 176, 192, 0.16);
  background: radial-gradient(ellipse at 30% 20%, rgba(111, 154, 132, 0.35), transparent 55%),
    radial-gradient(ellipse at 80% 60%, rgba(212, 165, 116, 0.22), transparent 50%),
    linear-gradient(145deg, rgba(26, 36, 48, 0.95), rgba(11, 15, 18, 0.98));
  box-shadow: var(--shadow);
}

.countdown-strip {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 165, 116, 0.45);
  background: rgba(212, 165, 116, 0.12);
  font-weight: 600;
  color: var(--paper);
  margin: 16px 0;
  font-size: 0.95rem;
  line-height: 1.45;
}

.countdown-inline {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(212, 165, 116, 0.45);
  background: rgba(212, 165, 116, 0.12);
  font-weight: 600;
  color: var(--paper);
  margin-bottom: 18px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.nav-panel--wide {
  min-width: min(560px, 92vw);
}

.nav-panel-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 1100px) {
  .nav-panel-grid {
    grid-template-columns: 1fr;
  }
}

.sticky-funding-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 8000;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(11, 15, 18, 0.97), rgba(11, 15, 18, 0.88));
  border-top: 1px solid rgba(157, 176, 192, 0.2);
  backdrop-filter: blur(10px);
}

.sticky-funding-inner {
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.sticky-funding-btn {
  flex: 1 1 220px;
}

.sticky-funding-secondary {
  flex: 1 1 200px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.62);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s var(--ease-out), visibility 0.25s;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: min(92vh, 900px);
  overflow: auto;
  padding: 28px 24px 24px;
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--panel);
  border: 1px solid rgba(157, 176, 192, 0.18);
  box-shadow: var(--shadow);
}

@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
  }

  .modal-sheet {
    border-radius: var(--radius);
  }
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(157, 176, 192, 0.25);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}

.modal-title {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  margin-right: 36px;
}

.modal-lead {
  margin-top: 8px;
}

.wizard-q {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-top: 0;
}

.wizard-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.wizard-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(157, 176, 192, 0.22);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-family: inherit;
}

.exit-overlay {
  position: fixed;
  inset: 0;
  z-index: 8500;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.exit-sheet {
  max-width: 440px;
  padding: 28px;
  text-align: center;
}

.exit-title {
  font-size: 1.5rem;
}

.exit-dismiss {
  margin-top: 10px;
  width: 100%;
}

.snippet-answer {
  padding: 12px 14px;
  border-left: 3px solid var(--sage-bright);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 12px 0;
  font-weight: 500;
}
