/* Seite für Lehrgangsanbieter (/partner). Farben und Schriften aus basis.css,
   Häkchen, Hero-Bild und Handys mit Bildschirmen aus anbieter-bausteine.css.
   Abschnitte im Wechsel Weiß und Papierton, der Rechner auf Tannengrün.
   Mitlaufendes Handy bei "So funktioniert es", Person groß, Überschriften, die
   bei Texten und Fragen mitlaufen, Formular zum Schluss.
   Mobile-First, größere Bildschirme ausschließlich über min-width. */

/* Handschrift für die Notiz unter dem Formular (eigener Server, Lizenz: fonts/OFL-caveat.txt) */
@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/caveat-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Fließtext 17 px am Handy, 18 px ab 60em. Kleintext bleibt über 15 px (0.85rem). */
.anbieter { --breite: 1120px; font-size: 17px; line-height: 1.6; }
.anbieter main { background: var(--grund); }

/* ── Abschnitte ──────────────────────────────────────────────────────── */
.ps-abschnitt { padding: 3.25rem 0; }
/* Sprünge auf der Seite gleiten. "Kostenlos testen" landet am Formular, nicht am
   oberen Rand des Abschnitts: der Innenabstand des Abschnitts wird abgezogen. */
html { scroll-behavior: smooth; }
#testen { scroll-margin-top: calc(var(--kopf-hoehe) + 1.5rem - 3.25rem); }
.ps-abschnitt h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.ps-papier, .ps-creme { background: var(--papier-ton); }

/* Was Sachkundepass übernimmt: zwei Spalten, am Handy untereinander */
.ps-einleitung { max-width: 40rem; margin: 0 0 1.75rem; color: var(--text-leise); font-size: 1.1rem; }
.ps-zweispaltig { display: grid; gap: 2rem; }
.ps-zweispaltig h3 { margin-bottom: 0.9rem; font-size: 1.25rem; }
.ps-nachsatz { max-width: 44rem; margin: 1.75rem 0 0; color: var(--text-leise); }
.ps-nachsatz + .ps-nachsatz { margin-top: 0.75rem; }

/* Überschrift links, Inhalt rechts (Texte, Fragen, Formular) */
.ps-raster { display: grid; gap: 1rem 2rem; }
.ps-kopfspalte p { margin: 0 0 0.5rem; color: var(--text-leise); }

/* ── Hero ────────────────────────────────────────────────────────────── */
.ps-hero { padding: 2.5rem 0 3rem; background: var(--grund); overflow: hidden; }
.ps-hero-raster { display: grid; gap: 2.5rem; }
/* Am Handy so groß, dass jedes Wort ohne Trennung in die Zeile passt */
.ps-hero h1 { font-size: clamp(2rem, 7vw, 2.6rem); line-height: 1.08; margin-bottom: 1rem; }
.ps-unterzeile { max-width: 34rem; font-size: 1.1rem; color: var(--text-leise); margin-bottom: 1.5rem; }
.ps-aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; }

/* ── Handy im mitlaufenden Bereich ───────────────────────────────────── */
/* Rahmen und Bildschirme kommen aus anbieter-bausteine.css */
.ps-handy-klein { display: none; }
.ps-begleiter { display: none; }

/* ── So funktioniert es ──────────────────────────────────────────────── */
/* Am Handy steht nur im Hero ein Handy, die Schritte sind Text mit Trennlinien */
#so-gehts h2 { margin-bottom: 1.25rem; }
.ps-stationen { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--linie); }
.ps-station { padding: 1.35rem 0; border-top: 1px solid var(--linie); }
.ps-station-text h3 { margin-bottom: 0.4rem; font-size: 1.2rem; }
.ps-station-text p { margin: 0; color: var(--text-leise); }

/* ── Rechner auf dunkler Fläche ──────────────────────────────────────── */
.ps-dunkel { --fokus: var(--messing-hell); background: var(--tanne-dunkel); color: var(--text-hell); }
.rechner-einleitung { max-width: 40rem; margin: 0; color: var(--text-hell-leise); }
.rechner { display: grid; gap: 2.5rem; margin-top: 1.5rem; }
.regler { margin-bottom: 1.1rem; }
.regler label { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-weight: 600; }
.regler output {
  flex: none;
  min-width: 3.5rem;
  text-align: right;
  font-family: var(--schrift-titel);
  font-size: 1.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
/* Regler: groß genug für den Daumen (Griff 2.25rem, ganze Breite), Spur gedämpft, Griff Messing */
.regler input[type="range"] {
  display: block;
  width: 100%;
  height: 2.75rem;
  margin: 0.2rem 0 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
.regler input[type="range"]::-webkit-slider-runnable-track { height: 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.regler input[type="range"]::-moz-range-track { height: 0.5rem; border-radius: 999px; background: rgba(255, 255, 255, 0.22); }
.regler input[type="range"]::-moz-range-progress { height: 0.5rem; border-radius: 999px; background: var(--messing); }
.regler input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 2.25rem;
  height: 2.25rem;
  margin-top: -0.875rem;
  border: 3px solid var(--tanne-dunkel);
  border-radius: 50%;
  background: var(--messing);
}
.regler input[type="range"]::-moz-range-thumb {
  width: 2.25rem;
  height: 2.25rem;
  border: 3px solid var(--tanne-dunkel);
  border-radius: 50%;
  background: var(--messing);
}
.regler input[type="range"]:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; border-radius: var(--radius); }

/* Ergebnis: Messing nur für die Zahlen */
.rechner-summe p { margin: 0; }
.rechner-ergebnis { font-weight: 600; color: var(--text-hell-leise); }
.rechner-ergebnis strong {
  display: block;
  margin: 0.1em 0;
  font-family: var(--schrift-titel);
  font-size: 3.4rem;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--messing);
}
.rechner-ergebnis strong.negativ { color: var(--text-hell); }
.rechner-posten { margin-top: 0.5rem; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--text-hell-leise); }
.rechner-summe .rechner-hinweis { margin-top: 0.75rem; font-size: 0.85rem; color: var(--text-hell-leise); }
.rechner-summe .rechner-preis { margin: 1.5rem 0 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.rechner-preis strong { font-family: var(--schrift-titel); font-size: 1.3rem; color: var(--messing); }
/* Heller Knopf auf dunklem Grund */
.ps-knopf-hell { border-color: var(--papier); background: var(--papier); color: var(--tanne-dunkel); }
.ps-knopf-hell:hover { border-color: var(--grund); background: var(--grund); color: var(--tanne); }

/* ── Wer dahinter steht: Foto steht auf der Abschnittskante ──────────── */
.ps-abschnitt.ps-wer { padding-bottom: 0; }
.ps-wer-raster { display: grid; gap: 2rem; }
.ps-wer-text p { margin: 0 0 1rem; }
.ps-wer-gross { font-size: 1.1rem; }
.ps-foto { width: auto; height: 260px; margin: 0 auto; }

/* ── Texte zum Anbieten: wie echte Textvorlagen ──────────────────────── */
.ps-text { margin-bottom: 2rem; }
.ps-text:last-child { margin-bottom: 0; }
.ps-text h3 { margin-bottom: 0.5rem; }
.ps-vorlage { display: flow-root; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--papier-ton); }
.ps-vorlage p { margin: 0; }
.ps-kopieren { float: right; margin: 0 0 0.5rem 1rem; }

/* ── Fragen: Akkordeon mit Trennlinien ───────────────────────────────── */
.ps-fragen { border-bottom: 1px solid var(--linie); }
.ps-fragen .faq-eintrag { border-top: 1px solid var(--linie); }
.ps-fragen summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0.6rem 0;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}
.ps-fragen summary::-webkit-details-marker { display: none; }
.ps-fragen summary::after { content: '+'; flex: none; font-size: 1.4rem; line-height: 1; color: var(--marke); }
.ps-fragen details[open] summary::after { content: '\2212'; }
.ps-fragen summary:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
.ps-fragen .faq-antwort p { margin: 0 0 1rem; color: var(--text-leise); }

/* ── Formular ────────────────────────────────────────────────────────── */
.ps-abschnitt .ps-abschluss { font-size: 2rem; }
.ps-formular { box-shadow: var(--schatten); border-color: transparent; }
.ps-zustimmung { align-items: flex-start; margin: 0.25rem 0 1.1rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.ps-zustimmung input { margin-top: 0.15rem; }
.ps-kopfspalte .ps-mail { margin: 1rem 0 0; }
/* Notiz in Handschrift unter dem Formular, nur am Handy. Die Buchstaben
   erscheinen nacheinander (partner-seite.js), ohne Skript steht sie einfach da. */
.ps-notiz { margin: 0.75rem 0 0; padding: 0 0.25rem; font-family: 'Caveat', cursive; font-size: 1.55rem; font-weight: 500; line-height: 1.25; color: var(--tanne); overflow-wrap: anywhere; transform: rotate(-1.5deg); }
.ps-notiz a { color: inherit; }
.ps-zeichen { opacity: 0; }
.ps-zeichen.da { opacity: 1; }

/* ── Leiste am Handy (unter 768 px) ──────────────────────────────────── */
.ps-leiste {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  padding: 0.5rem var(--rand) calc(0.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--grund);
  border-top: 1px solid var(--linie);
  box-shadow: 0 -4px 16px rgba(22, 33, 27, 0.08);
}

/* Ab 768 px ist das Formular nie weit weg */
@media (min-width: 48em) {
  .ps-leiste { display: none !important; }
}

/* Ab 960 px: jede Komposition in ihrer vollen Form */
@media (min-width: 60em) {
  .anbieter { font-size: 18px; }
  .ps-abschnitt { padding: 7rem 0; }
  /* Nur am Handy: Notiz unter dem Formular */
  .ps-notiz { display: none; }
  #so-gehts h2 { margin-bottom: 2rem; }
  .ps-stationen { gap: 3rem; border-bottom: 0; }
  .ps-zweispaltig { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4rem; }
  .ps-wer-gross { font-size: 1.25rem; }
  #testen { scroll-margin-top: calc(var(--kopf-hoehe) + 1.5rem - 7rem); }
  .ps-abschnitt h2 { font-size: 2.1rem; }

  .ps-raster { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 2rem; }
  .ps-kopfspalte { grid-column: 1 / span 4; }
  .ps-inhalt { grid-column: 5 / span 8; }
  /* Mitlaufende Überschrift bei Texten und Fragen */
  .ps-mitlaufend { position: sticky; top: calc(var(--kopf-hoehe) + 2rem); align-self: start; }

  .ps-hero { padding: 5rem 0; }
  .ps-hero-raster { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: center; gap: 2rem; }
  .ps-hero-text { grid-column: 1 / span 6; }
  .ps-hero-bild { grid-column: 7 / span 6; }
  .ps-hero h1 { font-size: clamp(2.2rem, 3.6vw, 3.2rem); }
  .ps-unterzeile { font-size: 1.2rem; }

  /* Mitlaufendes Handy: links im Viewport stehend, rechts die Schritte */
  /* Handy höchstens 300 px breit, auf niedrigen Bildschirmen schmaler, damit es
     unter den Kopf passt. Oberkante so, dass seine Mitte auf der Viewport-Mitte liegt. */
  .ps-geschichte {
    --handy-breite: min(300px, calc((100vh - var(--kopf-hoehe) - 3rem) * 9 / 19));
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: 2rem;
  }
  .ps-begleiter {
    position: sticky;
    top: max(calc(var(--kopf-hoehe) + 1rem), calc(50vh - var(--handy-breite) * 19 / 18));
    display: flex;
    justify-content: center;
    align-self: start;
  }
  .ps-handy-begleiter { width: var(--handy-breite); }
  .ps-handy-begleiter .ps-schirm { position: absolute; inset: 0; opacity: 0; transition: opacity 0.25s ease; }
  .ps-handy-begleiter .ps-schirm.aktiv { opacity: 1; }
  /* 72vh: etwas mehr als das Handy hoch ist, damit es auch beim letzten Schritt mittig bleibt */
  .ps-station { display: flex; align-items: center; min-height: 72vh; padding: 0; border-top: 0; transition: opacity 0.25s ease; }
  .ps-geschichte.laeuft .ps-station:not(.aktiv) { opacity: 0.4; }
  .ps-handy-klein { display: none; }
  .ps-station-text h3 { margin-bottom: 0.3rem; font-size: 1.5rem; }

  .rechner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; gap: 4rem; }
  .rechner-ergebnis strong { font-size: 5.5rem; }

  .ps-wer-raster { grid-template-columns: repeat(12, minmax(0, 1fr)); align-items: end; }
  .ps-foto { grid-column: 1 / span 5; grid-row: 1; height: 380px; margin: 0; justify-self: center; }
  .ps-wer-text { grid-column: 6 / span 7; grid-row: 1; align-self: center; padding-bottom: 3rem; }

  .ps-abschnitt .ps-abschluss { font-size: 2.8rem; }
}
