/* SolarPilot — gemeinsames Designsystem fuer Marketing-Seite und Ertragsrechner.
   Farben und Muster stammen aus der Management-Praesentation. Kontrastregeln stehen
   in KONTRASTE.md; Orange ist nie Farbe von kleinem Text. */

@font-face {
  font-family: 'InterVar';
  /* Beschnitten auf die Zeichen, die diese Seite braucht: 352 KB -> 51 KB.
     Gemessen am 16.09.2026 war die volle Datei die groesste Einzelressource
     und hat den Handy-Wert der Ladezeit getragen. */
  src: url('../fonts/inter-latein.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --orange: #FE6102;
  --orange-tief: #C44A00;      /* 4,9:1 auf Weiss — fuer kleinen Text und Links */
  --text: #19191B;
  --sekundaer: #5B5E64;        /* dunkler als #76797F, erreicht AA auf allen Flaechen */
  --sekundaer-hell: #A8AAAF;   /* nur auf dunklen Karten */
  --band: #FFF3E8;
  --beige: #E8E2DC;
  --rot: #B3241B;              /* dunkler als #D93025, AA auch auf dem hellen Band */
  --gelb-tief: #8A6100;        /* #E8A200 ist als Textfarbe unbrauchbar */
  --gelb: #E8A200;             /* nur Flaeche, nie Text */
  --weiss: #FFFFFF;
  --karte: #19191B;
  --rand: #DAD5CF;
  --max: 1160px;
  --spalt: clamp(1.2rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'InterVar', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--weiss);
  font-size: 17px;
  line-height: 1.65;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.08; letter-spacing: -0.025em; margin: 0 0 .6em; font-weight: 800; }
h1 { font-size: clamp(2.4rem, 6.5vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); }
h3 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); font-weight: 700; }
p { margin: 0 0 1.1em; }
a { color: var(--orange-tief); text-underline-offset: .18em; }
a:hover { color: var(--text); }

:focus-visible {
  outline: 3px solid var(--text);
  outline-offset: 3px;
  border-radius: 3px;
}

.huelle { max-width: var(--max); margin: 0 auto; padding: 0 var(--spalt); }
.sektion { padding: clamp(3.5rem, 9vw, 7rem) 0; }
.sektion--band { background: var(--band); }
.sektion--beige { background: var(--beige); }
.sektion--dunkel { background: var(--karte); color: var(--weiss); }
.sektion--dunkel h2, .sektion--dunkel h3 { color: var(--weiss); }

/* Gesperrtes oranges Kleinlabel ueber jeder Sektion — Muster der Folien.
   Grossgenug und fett, damit 3,03:1 als grosse Schrift zulaessig bleibt:
   18.66px + bold erfuellt die WCAG-Definition von "large text". */
.eyebrow {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--orange-tief);
  margin: 0 0 1rem;
}
.sektion--dunkel .eyebrow { color: var(--gelb); }

.fuehrung { font-size: clamp(1.1rem, 2vw, 1.4rem); color: var(--sekundaer); max-width: 62ch; }
.sektion--dunkel .fuehrung { color: var(--sekundaer-hell); }

.raster { display: grid; gap: clamp(1rem, 2.4vw, 1.8rem); }
.raster--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.raster--3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.raster--4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

/* Dunkle Karte mit oranger Grosszahl — das Kennwert-Muster der Praesentation. */
.karte {
  background: var(--karte);
  color: var(--weiss);
  border-radius: 18px;
  padding: clamp(1.5rem, 3vw, 2.2rem);
}
.karte h3 { color: var(--weiss); }
.karte p { color: var(--sekundaer-hell); margin-bottom: 0; }
.karte--hell {
  background: var(--weiss);
  color: var(--text);
  border: 1px solid var(--rand);
}
.karte--hell p { color: var(--sekundaer); }
.karte--hell h3 { color: var(--text); }  /* sonst erbt sie das Weiss der dunklen Karte */
.grosszahl {
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1;
  color: var(--orange);
  letter-spacing: -0.03em;
  display: block;
}
.karte--hell .grosszahl { color: var(--orange-tief); }
.grosszahl-zusatz { color: var(--sekundaer-hell); font-size: .95rem; display: block; margin-top: .5rem; }
.karte--hell .grosszahl-zusatz { color: var(--sekundaer); }

/* Kernaussage auf hellorangem Band. */
.aussage {
  background: var(--band);
  border-left: 6px solid var(--orange);
  padding: clamp(1.2rem, 3vw, 2rem);
  border-radius: 0 14px 14px 0;
  font-size: clamp(1.15rem, 2.2vw, 1.5rem);
  font-weight: 600;
}

.knopf {
  display: inline-block;
  background: var(--orange);
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
  padding: .95rem 1.8rem;
  border-radius: 999px;
  text-decoration: none;
  border: 2px solid var(--orange);
}
.knopf:hover { background: #E05700; border-color: #E05700; color: #fff; }
.knopf--zweit { background: transparent; color: var(--text); border-color: var(--text); }
.knopf--zweit:hover { background: var(--text); color: #fff; }

/* Blattmotiv als sehr grosses, schwaches Hintergrundelement. */
.blattmotiv { position: relative; overflow: hidden; }
.blattmotiv::before {
  content: '';
  position: absolute;
  right: -12%;
  top: -18%;
  width: min(78vw, 900px);
  aspect-ratio: 645 / 410;
  background: url('../img/leaf-motiv.webp') no-repeat center / contain;
  opacity: .13;
  pointer-events: none;
  z-index: 0;
}
.blattmotiv > * { position: relative; z-index: 1; }

.marke { display: flex; align-items: center; gap: .6rem; text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; color: var(--text); }
.marke img { height: 30px; width: auto; }
.marke span.pilot { color: var(--orange); }
.claim { letter-spacing: .28em; text-transform: uppercase; font-size: .78rem; font-weight: 600; color: var(--sekundaer); }

.kopf { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--rand); }
.kopf .huelle { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.kopf nav { display: flex; align-items: center; gap: clamp(.8rem, 2vw, 1.6rem); }
.kopf nav a { color: var(--text); text-decoration: none; font-weight: 600; font-size: .98rem; }
.kopf nav a:hover { text-decoration: underline; }
.kopf .knopf { padding: .55rem 1.15rem; font-size: .98rem; }

.fuss { background: var(--karte); color: var(--sekundaer-hell); padding: 3.5rem 0 2.5rem; font-size: .95rem; }
.fuss a { color: #fff; }
.fuss h3 { color: #fff; font-size: 1.05rem; }

.hinweis {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--band); color: var(--text);
  border: 1px solid #F0C9A6;
  border-radius: 999px; padding: .4rem 1rem;
  font-size: .9rem; font-weight: 600;
}
.quelle { font-size: .82rem; color: var(--sekundaer); }
.sektion--dunkel .quelle { color: var(--sekundaer-hell); }

.nur-lesbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  .auftauchen { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
  .auftauchen.sichtbar { opacity: 1; transform: none; }
}

/* Auf Telefonbreite bricht die Kopfzeile sonst quer aus (gemessen 16.09.2026:
   scrollWidth 486 px bei 390 px Fenster, Verursacher war die Navigation). */
@media (max-width: 560px) {
  .kopf .huelle { flex-wrap: wrap; row-gap: .4rem; padding-top: .5rem; padding-bottom: .5rem; }
  .kopf nav { width: 100%; justify-content: space-between; gap: .5rem; }
  .kopf nav a { font-size: .9rem; }
  .kopf .knopf { padding: .45rem .9rem; font-size: .9rem; }
  .marke { font-size: 1.15rem; }
}
@media (max-width: 640px) {
  /* Ankerlinks weichen, der Knopf bleibt — sonst bricht er zweizeilig um. */
  .kopf nav a:not(.knopf) { display: none; }
  .kopf nav { width: auto; justify-content: flex-end; }
  .kopf .knopf { white-space: nowrap; }
}

/* Hilfsklassen statt Stilangaben direkt im HTML.
   Grund, gemessen am 16.09.2026 an der ausgelieferten Seite: der Caddy-Block erlaubt
   `style-src 'self'` — jede Stilangabe im HTML wird verworfen. Der Hinweisblock im
   Ergebnis blieb dadurch hellorange, waehrend der Text weiss war: unlesbar. Ein Stil,
   der nur lokal wirkt, ist schlimmer als keiner, weil er im Test richtig aussieht. */
.abstand-oben-s  { margin-top: 1.2rem; }
.abstand-oben-m  { margin-top: 2rem; }
.abstand-oben-l  { margin-top: 2.5rem; }
.abstand-unten-m { margin-bottom: 2.5rem; }
.eng-unten       { padding-bottom: 2rem; }
.eng-oben        { padding-top: 2.5rem; }
.weit            { padding-top: clamp(4rem, 10vw, 7rem); padding-bottom: clamp(4rem, 10vw, 7rem); }

/* Hinweisband auf dunklem Grund. */
.aussage--dunkel {
  background: #232326;
  border-left-color: var(--gelb);
  color: #fff;
}

/* Quellenangaben innerhalb einer dunklen Karte: #5B5E64 erreicht dort nur 2,7:1. */
.karte .quelle, .sektion--dunkel .karte .quelle { color: var(--sekundaer-hell); }

/* Weiss auf #FE6102 sind 3,03:1 — zu wenig fuer Knopftext in normaler Groesse.
   Dunkleres Orange bringt 4,85:1 und bleibt dieselbe Markenfarbe. */
.knopf { background: var(--orange-tief); border-color: var(--orange-tief); }
.knopf:hover { background: #A33D00; border-color: #A33D00; }

/* ===========================================================================
   Gestalterische Aufwertung, 16.09.2026.
   Grundsatz: alles mit Bordmitteln des Browsers, keine Fremdbibliothek.
   Gemessen im ausgelieferten Chrome 152: scrollgebundene Animation, Seiten-
   uebergang, ausgewogener Zeilenumbruch und Farbmischung werden unterstuetzt.
   Jede Bewegung ist abschaltbar ueber die Systemeinstellung.
   =========================================================================== */

h1, h2 { text-wrap: balance; }
.fuehrung, .karte p { text-wrap: pretty; }

/* --- Hero mit Tagesbogen --- */
.hero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(3rem, 7vw, 5.5rem);
  padding-bottom: clamp(5rem, 11vw, 8rem);
  background:
    radial-gradient(120% 80% at 78% 8%, #FFF3E8 0%, rgba(255,243,232,0) 62%),
    linear-gradient(180deg, #FFFFFF 0%, #FFFBF7 100%);
}
.hero-inhalt { position: relative; z-index: 2; max-width: 980px; }
.hero h1 { max-width: 20ch; }
.betont {
  font-style: normal;
  background: linear-gradient(180deg, transparent 62%, #FFD9B8 62%);
  padding: 0 .06em;
}
.hero-knoepfe { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.hero-fussnote { color: var(--sekundaer); font-size: .92rem; margin-top: 1rem; }

.hero-himmel {
  position: absolute;
  inset: auto 0 -1px 0;
  height: min(58vh, 420px);
  z-index: 1;
  pointer-events: none;
  opacity: .9;
}
.hero-bogen { width: 100%; height: 100%; display: block; }
.hero-flaeche { opacity: .85; }

/* Die Linie zeichnet sich einmal, die Sonne wandert dem Bogen entlang. */
.hero-linie {
  stroke-dasharray: 900;
  stroke-dashoffset: 900;
  animation: linie-zeichnen 2.4s cubic-bezier(.4,0,.2,1) .2s forwards;
}
@keyframes linie-zeichnen { to { stroke-dashoffset: 0; } }

.hero-sonne {
  offset-path: path("M30 320 C 130 320, 150 60, 300 60 C 450 60, 470 320, 570 320");
  offset-distance: 0%;
  animation: sonne-wandern 15s cubic-bezier(.45,0,.55,1) infinite;
}
@keyframes sonne-wandern {
  0%   { offset-distance: 0%;   opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { offset-distance: 100%; opacity: 0; }
}

.hero-weiter {
  position: absolute;
  left: 50%;
  bottom: 1.4rem;
  transform: translateX(-50%);
  z-index: 3;
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
}
.hero-weiter-strich {
  width: 2px; height: 22px;
  background: var(--orange-tief);
  border-radius: 2px;
  animation: strich-tippen 2.2s ease-in-out infinite;
}
@keyframes strich-tippen {
  0%, 100% { transform: translateY(-4px); opacity: .35; }
  50%      { transform: translateY(4px);  opacity: 1; }
}

/* --- Scrollgebundenes Auftauchen: laeuft ohne JavaScript, ruckelfrei --- */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .auftauchen {
      opacity: 1;
      transform: none;
      animation: einblenden linear both;
      animation-timeline: view();
      animation-range: entry 8% cover 26%;
    }
    .hero .auftauchen { animation: hero-einblenden .7s ease-out both; animation-timeline: auto; }
    .hero .auftauchen:nth-of-type(2) { animation-delay: .07s; }
    .hero .auftauchen:nth-of-type(3) { animation-delay: .14s; }
    .hero .auftauchen:nth-of-type(4) { animation-delay: .21s; }
    .hero .auftauchen:nth-of-type(5) { animation-delay: .28s; }
    .hero .auftauchen:nth-of-type(6) { animation-delay: .35s; }
  }
}
@keyframes einblenden {
  from { opacity: 0; transform: translateY(26px); }
  to   { opacity: 1; transform: none; }
}
@keyframes hero-einblenden {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* --- Karten reagieren auf den Zeiger, ohne zu haepfen --- */
.karte, .karte--hell {
  transition: transform .35s cubic-bezier(.2,.7,.3,1), box-shadow .35s ease, border-color .35s ease;
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .karte:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(25,25,27,.22); }
  .karte--hell:hover { border-color: var(--orange); box-shadow: 0 16px 34px rgba(254,97,2,.14); }
}

/* --- Kennzahlen: die Ziffern wechseln in fester Breite, damit nichts springt --- */
.grosszahl { font-variant-numeric: tabular-nums; }

/* --- Weicher Seitenuebergang zum Rechner (nativ, kein Skript) --- */
@view-transition { navigation: auto; }

@media (prefers-reduced-motion: reduce) {
  .hero-linie, .hero-sonne, .hero-weiter-strich { animation: none; }
  .hero-linie { stroke-dashoffset: 0; }
  .hero-sonne { offset-distance: 52%; }
}

/* Nachjustiert nach Sichtprüfung am 16.09.2026: der Tagesbogen lag vorher
   ueber dem Fliesstext und der zweite Knopf hatte dieselbe Farbe wie der
   erste, weil die neue .knopf-Regel spaeter stand als .knopf--zweit. */
.hero-himmel {
  inset: auto -6% -1px auto;
  width: min(54%, 620px);
  height: min(42vh, 330px);
  opacity: .55;
}
@media (max-width: 860px) {
  .hero-himmel { width: 92%; inset: auto -10% -1px auto; height: min(30vh, 220px); opacity: .45; }
}
.knopf--zweit {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}
.knopf--zweit:hover { background: var(--text); color: #fff; border-color: var(--text); }

/* Die Versprechen-Karten waren unsichtbar: .karte traegt #19191B, und auf einer
   dunklen Sektion ist das exakt die Hintergrundfarbe (gemessen 16.09.2026 an der
   Sichtprüfung — drei Karten ohne jede Kante). Auf dunklem Grund bekommen sie
   deshalb eine eigene, leicht hellere Flaeche mit Kontur und eine Ordnungszahl. */
.sektion--dunkel {
  background:
    radial-gradient(90% 60% at 12% 0%, #26262A 0%, rgba(38,38,42,0) 58%),
    radial-gradient(70% 50% at 95% 100%, #2A1D14 0%, rgba(42,29,20,0) 60%),
    var(--karte);
}
.sektion--dunkel .raster { counter-reset: versprechen; }
.sektion--dunkel .karte {
  background: #212125;
  border: 1px solid #313136;
  position: relative;
  padding-top: clamp(2.6rem, 5vw, 3.4rem);
  overflow: hidden;
}
.sektion--dunkel .karte::before {
  counter-increment: versprechen;
  content: counter(versprechen, decimal-leading-zero);
  position: absolute;
  top: clamp(1rem, 2.4vw, 1.5rem);
  left: clamp(1.5rem, 3vw, 2.2rem);
  font-size: .95rem;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--gelb);
}
/* Schmaler Lichtstreifen an der Oberkante — Akzent, kein Zierrat. */
.sektion--dunkel .karte::after {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--orange) 0%, var(--gelb) 100%);
  transform: scaleX(.22);
  transform-origin: left;
  transition: transform .45s cubic-bezier(.2,.7,.3,1);
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .sektion--dunkel .karte:hover::after { transform: scaleX(1); }
}
.sektion--dunkel .karte h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); }
.sektion--dunkel .karte p { color: #C6C8CC; }

/* --- Demo-Sektion mit Vorschau --- */
.demo-raster {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: center;
}
@media (max-width: 860px) { .demo-raster { grid-template-columns: 1fr; } }

.schritte { list-style: none; padding: 0; margin: 1.8rem 0 0; display: grid; gap: .75rem; }
.schritte li { display: flex; align-items: center; gap: .8rem; font-weight: 600; }
.schritt-zahl {
  flex: none;
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--orange-tief);
  color: #fff;
  font-size: .9rem;
  font-weight: 800;
}

.vorschau {
  margin: 0;
  background: var(--weiss);
  border: 1px solid var(--rand);
  border-radius: 20px;
  padding: clamp(1.2rem, 3vw, 1.8rem);
  box-shadow: 0 20px 50px rgba(25,25,27,.10);
}
.vorschau-kopf { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .4rem; align-items: baseline; margin-bottom: 1.2rem; }
.vorschau-titel { color: var(--sekundaer); font-size: .9rem; font-weight: 600; }
.vorschau-wert { font-weight: 800; font-size: clamp(1.1rem, 2.2vw, 1.35rem); color: var(--orange-tief); }

.vorschau-balken {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  align-items: end;
  gap: clamp(3px, .8vw, 7px);
  height: 150px;
  margin-bottom: 1rem;
}
.vorschau-balken .bl {
  display: block;
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, var(--orange) 0%, #FF8A3D 100%);
  transform-origin: bottom;
}

.vorschau-balken .bl-1 { height: 32.7%; }
.vorschau-balken .bl-2 { height: 47.4%; }
.vorschau-balken .bl-3 { height: 73.5%; }
.vorschau-balken .bl-4 { height: 90.6%; }
.vorschau-balken .bl-5 { height: 93.8%; }
.vorschau-balken .bl-6 { height: 96.8%; }
.vorschau-balken .bl-7 { height: 100.0%; }
.vorschau-balken .bl-8 { height: 92.0%; }
.vorschau-balken .bl-9 { height: 78.4%; }
.vorschau-balken .bl-10 { height: 57.0%; }
.vorschau-balken .bl-11 { height: 33.0%; }
.vorschau-balken .bl-12 { height: 28.4%; }

@media (prefers-reduced-motion: no-preference) {
  /* Die Balken wachsen, waehrend die Sektion ins Bild scrollt — an den Scrollstand
     gebunden, nicht an eine Uhr. Ohne Unterstuetzung stehen sie einfach fertig da. */
  @supports (animation-timeline: view()) {
    .vorschau-balken .bl {
      animation: balken-wachsen linear both;
      animation-timeline: view();
      animation-range: entry 12% cover 34%;
    }
    .vorschau-balken .bl-1 { animation-delay: 0s; animation-range: entry 13% cover 31%; }
    .vorschau-balken .bl-2 { animation-delay: 0s; animation-range: entry 14% cover 32%; }
    .vorschau-balken .bl-3 { animation-delay: 0s; animation-range: entry 15% cover 34%; }
    .vorschau-balken .bl-4 { animation-delay: 0s; animation-range: entry 16% cover 35%; }
    .vorschau-balken .bl-5 { animation-delay: 0s; animation-range: entry 17% cover 36%; }
    .vorschau-balken .bl-6 { animation-delay: 0s; animation-range: entry 18% cover 37%; }
    .vorschau-balken .bl-7 { animation-delay: 0s; animation-range: entry 19% cover 38%; }
    .vorschau-balken .bl-8 { animation-delay: 0s; animation-range: entry 20% cover 40%; }
    .vorschau-balken .bl-9 { animation-delay: 0s; animation-range: entry 21% cover 41%; }
    .vorschau-balken .bl-10 { animation-delay: 0s; animation-range: entry 22% cover 42%; }
    .vorschau-balken .bl-11 { animation-delay: 0s; animation-range: entry 23% cover 43%; }
    .vorschau-balken .bl-12 { animation-delay: 0s; animation-range: entry 24% cover 44%; }
  }
}
@keyframes balken-wachsen { from { transform: scaleY(.04); opacity: .4; } to { transform: scaleY(1); opacity: 1; } }


/* Im Kopf faerbt `.kopf nav a` jeden Link dunkel — auch den Knopf, der dadurch
   dunkel auf Orange stand (3,61:1, gemessen 16.09.2026). Der Knopf behaelt Weiss. */
.kopf nav a.knopf { color: #fff; }
.kopf nav a.knopf:hover { color: #fff; }

/* Quellenangaben in der Fusszeile stehen auf dunklem Grund: #5B5E64 waere dort 2,7:1. */
.fuss .quelle, .fuss .quelle a { color: #C6C8CC; }
