/**
 * Fokus16247 – Premium Landing (Energieaudit / Beratung)
 * Design: „Graphit & Nebellicht“ – kühle Tiefen, warme Akzent-Ember, editorial Präzision
 */

:root {
  --ink: #0b1220;
  --panel: #111b2a;
  --panel-2: #1a2738;
  --mist: #e9eef4;
  --mist-2: #d7dfe9;
  --line: #c5d0dc;
  --ember: #b85f37;
  --ember-soft: rgba(184, 95, 55, 0.14);
  --sage: #5f7168;
  --sage-soft: rgba(95, 113, 104, 0.18);
  --signal: #c9473a;
  --cursor-lerp: 0.18;
  --ring-scale: 1;
  --dot-scale: 1;
  --ring-opacity: 0.92;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Schibsted Grotesk", system-ui, sans-serif;
  font-weight: 400;
  color: var(--ink);
  background: var(--mist);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.font-display {
  font-family: "Syne", system-ui, sans-serif;
}

/* ---------- Custom Cursor (Desktop, feinmotorisch) ---------- */

html.is-custom-cursor {
  cursor: none;
}

html.is-custom-cursor a,
html.is-custom-cursor button,
html.is-custom-cursor [role="button"],
html.is-custom-cursor input,
html.is-custom-cursor textarea,
html.is-custom-cursor select,
html.is-custom-cursor summary {
  cursor: none;
}

#cursor-portal {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
}

@media (max-width: 1023px) {
  #cursor-portal {
    display: none;
  }
}

.cursor-layer {
  position: fixed;
  top: 0;
  left: 0;
  will-change: transform;
  border-radius: 9999px;
  pointer-events: none;
  z-index: 9999;
}

.cursor-dot {
  width: 7px;
  height: 7px;
  margin: -3.5px 0 0 -3.5px;
  background: #f4f7fb;
  transform: translate3d(-100px, -100px, 0) scale(var(--dot-scale));
  mix-blend-mode: exclusion;
}

.cursor-ring {
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border: 1.25px solid rgba(244, 247, 251, var(--ring-opacity));
  transform: translate3d(-100px, -100px, 0) scale(var(--ring-scale));
  transition: border-color 0.35s ease, opacity 0.35s ease;
  mix-blend-mode: exclusion;
}

/* Kontext via :has() – skaliert Ring/Dot wenn interaktive Elemente gehovered werden */
html.is-custom-cursor body:has(a:hover),
html.is-custom-cursor body:has(button:hover),
html.is-custom-cursor body:has([role="button"]:hover),
html.is-custom-cursor body:has(summary:hover),
html.is-custom-cursor body:has(input:hover),
html.is-custom-cursor body:has(textarea:hover),
html.is-custom-cursor body:has(select:hover),
html.is-custom-cursor body:has(.cursor-magnetic:hover),
html.is-custom-cursor body:has(article:hover),
html.is-custom-cursor body:has(img:hover) {
  --ring-scale: 1.55;
  --dot-scale: 1.25;
  --ring-opacity: 1;
}

html.is-custom-cursor body:has(.card-spotlight:hover) {
  --ring-scale: 1.35;
}

/* ---------- Navigation (mehrstufig) ---------- */

.nav-shell {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--mist) 86%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 55%, transparent);
}

.nav-link {
  position: relative;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
  text-decoration: none;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-link:hover {
  color: var(--ink);
  background: rgba(17, 27, 42, 0.06);
}

.nav-group {
  position: relative;
}

.nav-group-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  border: 0;
  background: transparent;
  font: inherit;
  font-weight: 500;
  color: color-mix(in srgb, var(--ink) 88%, transparent);
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
}

.nav-group-trigger:hover,
.nav-group:focus-within .nav-group-trigger {
  color: var(--ink);
  background: rgba(17, 27, 42, 0.06);
}

.nav-dropdown {
  position: absolute;
  left: 0;
  top: calc(100% + 0.35rem);
  min-width: 15rem;
  padding: 0.45rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  box-shadow: 0 18px 50px rgba(11, 18, 32, 0.12);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}

.nav-group:hover .nav-dropdown,
.nav-group:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.nav-dropdown a {
  display: block;
  padding: 0.55rem 0.65rem;
  border-radius: 0.5rem;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
}

.nav-dropdown a:hover {
  background: rgba(184, 95, 55, 0.08);
}

/* Mobile drawer */
@media (max-width: 1023px) {
  .nav-desktop {
    display: none;
  }
}

@media (min-width: 1024px) {
  .nav-mobile-toggle,
  .nav-drawer {
    display: none;
  }
}

.nav-drawer-panel {
  position: fixed;
  inset: 0;
  background: rgba(11, 18, 32, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s;
  z-index: 60;
}

.nav-drawer-panel.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-drawer-sheet {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: min(22rem, 92vw);
  background: var(--mist);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  transition: transform 0.28s ease;
  padding: 1.25rem;
  overflow-y: auto;
}

.nav-drawer-panel.is-open .nav-drawer-sheet {
  transform: translateX(0);
}

/* ---------- Komponenten ---------- */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border-radius: 999px;
  border: 0;
  background: linear-gradient(135deg, var(--ember), #9a4d2b);
  color: #fff;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  box-shadow: 0 14px 30px rgba(184, 95, 55, 0.28);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(184, 95, 55, 0.35);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.8rem 1.1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.35);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.65);
  border-color: color-mix(in srgb, var(--ink) 28%, transparent);
}

.card-spotlight {
  border-radius: 1.1rem;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  background: linear-gradient(
      145deg,
      rgba(255, 255, 255, 0.9),
      rgba(233, 238, 244, 0.75)
    ),
    radial-gradient(
      600px 240px at var(--mx, 50%) var(--my, 0%),
      rgba(184, 95, 55, 0.12),
      transparent 55%
    );
  box-shadow: 0 18px 50px rgba(11, 18, 32, 0.08);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.card-spotlight:hover {
  transform: translateY(-3px);
  box-shadow: 0 26px 70px rgba(11, 18, 32, 0.12);
}

.section-dark {
  background: radial-gradient(
      1200px 600px at 10% -10%,
      rgba(184, 95, 55, 0.12),
      transparent 55%
    ),
    linear-gradient(180deg, var(--panel), var(--panel-2));
  color: #e9eef4;
}

.section-dark .card-spotlight {
  background: linear-gradient(
      155deg,
      rgba(255, 255, 255, 0.06),
      rgba(255, 255, 255, 0.02)
    );
  border-color: rgba(255, 255, 255, 0.12);
  color: #e9eef4;
}

.prose-muted {
  color: color-mix(in srgb, currentColor 72%, transparent);
}

/* Value ladder */
.vl-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.vl-badge {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.85rem;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  background: rgba(184, 95, 55, 0.18);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

/* Utility */
.text-balance {
  text-wrap: balance;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  padding: 0.65rem 1rem;
  background: #fff;
  color: var(--ink);
  z-index: 100;
  border-radius: 0.5rem;
  border: 1px solid var(--line);
}
