/* =====================================================================
   VORLAGE · Lionel Webdesign
   ---------------------------------------------------------------------
   1. MARKE ANPASSEN  ← pro Kunde nur diesen Block ändern
   2. Grundlagen
   3. Kopfzeile und Menü
   4. Einstieg
   5. Abschnitte (Leistungen, Ablauf, Referenzen, Über uns, Stimmen, Fragen)
   6. Kontakt und Fusszeile
   7. Unterseiten
   8. Seitenübergänge und Bewegung
   9. Tablet und Handy
   ===================================================================== */


/* =====================================================================
   1. MARKE ANPASSEN
   ===================================================================== */
:root {
  /* Farben */
  --grund: #eef0ec;          /* Seitenhintergrund, kühles Kalkweiss */
  --flaeche: #e2e5df;        /* zweite Hintergrundfarbe für Abschnitte */
  --text: #2b2119;           /* Schrift, Nussbaum-Braun */
  --text-weich: #6b6259;     /* Nebentexte */
  --dunkel: #2b2119;         /* dunkle Abschnitte (Kontakt, Fusszeile) */
  --auf-dunkel: #f1ece4;     /* Schrift auf dunklem Grund */
  --akzent: #d9a441;         /* Knöpfe und Hervorhebungen, Ocker */
  --akzent-dunkel: #b9862a;
  --linie: rgba(43, 33, 25, 0.16);

  /* Schriften: Titel und Fliesstext (Dateien im Ordner fonts/) */
  --schrift-titel: "Anybody", "Arial Narrow", sans-serif;
  --schrift-text: "Schibsted Grotesk", system-ui, sans-serif;

  /* Breite der Titelschrift: 50 = schmal, 150 = breit */
  --titel-breite: 112;
  --titel-breite-start: 50;  /* Startbreite der Einstiegs-Animation */

  /* Formen */
  --radius-bild: 3px;
  --radius-feld: 6px;
}

@font-face {
  font-family: "Anybody";
  src: url("fonts/anybody.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 50% 150%;
  font-display: block;
}

@font-face {
  font-family: "Schibsted Grotesk";
  src: url("fonts/schibsted-grotesk.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}


/* =====================================================================
   2. GRUNDLAGEN
   ===================================================================== */
:root {
  --kurve: cubic-bezier(0.2, 0.75, 0.1, 1);
  --kopf-hoehe: 84px;
  --rand: clamp(20px, 5vw, 64px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Lenis (sanftes Scrollen) übernimmt das Scrollen selbst */
html.lenis,
html.lenis body {
  height: auto;
}

html.lenis {
  scroll-behavior: auto;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

[id] {
  scroll-margin-top: var(--kopf-hoehe);
}

body {
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift-text);
  font-size: clamp(1.0625rem, 0.3vw + 1rem, 1.1875rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--akzent);
  outline-offset: 3px;
}

::selection {
  background: var(--akzent);
  color: var(--dunkel);
}

.rahmen {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--rand);
}

.sprung {
  position: absolute;
  top: -80px;
  left: 16px;
  z-index: 100;
  padding: 12px 18px;
  background: var(--akzent);
  color: var(--dunkel);
  font-weight: 700;
  text-decoration: none;
}

.sprung:focus {
  top: 16px;
}

h1,
h2,
h3 {
  font-family: var(--schrift-titel);
  font-variation-settings: "wdth" var(--titel-breite);
  font-weight: 750;
  line-height: 1;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.titel {
  font-size: clamp(2.3rem, 4.6vw, 4.25rem);
  line-height: 0.98;
}

.titel-text {
  max-width: 30em;
  color: var(--text-weich);
}

.gross {
  font-size: clamp(1.2rem, 1.2vw + 0.8rem, 1.5rem);
  line-height: 1.45;
}

.textlink {
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  text-decoration-color: var(--akzent);
}

.textlink:hover {
  text-decoration-color: currentColor;
}

/* Knöpfe */
.knopf {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  overflow: hidden;
  border: 2px solid var(--akzent);
  border-radius: 999px;
  background: var(--akzent);
  color: var(--dunkel);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  transition: color 0.35s var(--kurve), border-color 0.35s var(--kurve);
}

/* Füllung steigt beim Darüberfahren von unten auf */
.knopf::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dunkel);
  transform: translateY(101%);
  transition: transform 0.45s var(--kurve);
}

.knopf:hover {
  color: var(--auf-dunkel);
  border-color: var(--dunkel);
}

.knopf:hover::before {
  transform: none;
}

.knopf-linie {
  background: transparent;
  border-color: currentColor;
  color: var(--text);
}

.knopf-klein {
  min-height: 42px;
  padding: 0 18px;
}

.knopf-reihe {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}


/* =====================================================================
   3. KOPFZEILE UND MENÜ
   ===================================================================== */
.kopf {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--grund) 90%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: transform 0.5s var(--kurve), background 0.4s, box-shadow 0.4s;
}

.kopf-reihe {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--kopf-hoehe);
}

.kopf.ist-hinterlegt {
  box-shadow: 0 1px 0 var(--linie);
}

.kopf.ist-versteckt {
  transform: translateY(-100%);
}

.marke {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--schrift-titel);
  font-variation-settings: "wdth" 100;
  font-weight: 750;
  font-size: 1.15rem;
  text-decoration: none;
  white-space: nowrap;
}

.marke-zeichen {
  width: 30px;
  height: 30px;
  color: var(--akzent-dunkel);
}

.kopf-nav {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 34px);
  font-size: 0.98rem;
  font-weight: 600;
}

.kopf-nav a:not(.knopf) {
  position: relative;
  text-decoration: none;
}

/* Strich unter Menüpunkten */
.kopf-nav a:not(.knopf)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4px;
  height: 2px;
  background: var(--akzent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--kurve);
}

.kopf-nav a:not(.knopf):hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.menu-knopf {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 10px 0 10px 10px;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.menu-striche {
  position: relative;
  width: 24px;
  height: 12px;
}

.menu-striche i {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.4s var(--kurve), top 0.4s var(--kurve);
}

.menu-striche i:first-child { top: 0; }
.menu-striche i:last-child { top: 10px; }

.menu-offen .menu-striche i:first-child { top: 5px; transform: rotate(45deg); }
.menu-offen .menu-striche i:last-child { top: 5px; transform: rotate(-45deg); }


/* =====================================================================
   4. EINSTIEG
   ===================================================================== */
.held {
  padding-top: calc(var(--kopf-hoehe) + clamp(24px, 6vh, 72px));
  overflow: hidden;
}

.held-titel {
  margin-left: -0.04em;
  font-size: clamp(3.4rem, 8.6vw, 11rem);
  font-weight: 800;
  line-height: 0.86;
  letter-spacing: -0.03em;
}

.held-titel .zeile {
  display: block;
  overflow: hidden;
  padding-bottom: 0.05em;
  white-space: nowrap;
}

/* Zweite Zeile nach rechts versetzt, wie zwei aufeinanderliegende Bretter */
.held-titel .zeile:nth-child(2) {
  padding-left: 0.9em;
}

.held-titel .zeile > span {
  display: inline-block;
}

.held-unten {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px 48px;
  margin: clamp(28px, 4vw, 52px) 0 clamp(32px, 5vw, 64px);
}

.held-text {
  max-width: 31em;
  font-size: clamp(1.1rem, 0.6vw + 0.95rem, 1.3rem);
  line-height: 1.5;
}

.held-bild {
  position: relative;
  height: clamp(320px, 62vh, 760px);
  overflow: hidden;
}

.held-bild img {
  position: absolute;
  left: 0;
  top: -10%;
  width: 100%;
  height: 120%;
  object-fit: cover;
}


/* =====================================================================
   5. ABSCHNITTE
   ===================================================================== */
.abschnitt {
  padding: clamp(88px, 12vw, 176px) 0;
}

.abschnitt-flaeche {
  background: var(--flaeche);
}

.kopfzeile-abschnitt {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 48px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

/* ----- Leistungen: grosse Zeilen ----- */
.leistungen {
  list-style: none;
  border-top: 1px solid var(--linie);
}

.leistung {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 12px 48px;
  align-items: baseline;
  padding: clamp(22px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--linie);
}

.leistung h3 {
  font-size: clamp(1.9rem, 4.2vw, 3.6rem);
  font-weight: 650;
  transition: font-variation-settings 0.6s var(--kurve), color 0.4s, transform 0.6s var(--kurve);
}

.leistung p {
  max-width: 34em;
  color: var(--text-weich);
}

.leistung-bild {
  display: none;
}

/* Auf Computern: Titel wird beim Darüberfahren breiter */
@media (hover: hover) and (pointer: fine) {
  .leistung:hover h3 {
    font-variation-settings: "wdth" 96;
    color: var(--akzent-dunkel);
    transform: translateX(0.35em);
  }
}

/* Vorschaubild, das der Maus folgt */
.vorschau {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 40;
  width: clamp(200px, 17vw, 280px);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-bild);
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  box-shadow: 0 30px 60px -30px rgba(43, 33, 25, 0.6);
}

.vorschau img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ----- Ablauf ----- */
.ablauf-raster {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: 48px clamp(48px, 8vw, 128px);
  align-items: start;
}

.ablauf-kopf {
  position: sticky;
  top: calc(var(--kopf-hoehe) + 32px);
}

.ablauf-kopf .titel {
  margin-bottom: 20px;
}

.ablauf {
  position: relative;
  list-style: none;
}

/* Linie links, füllt sich beim Scrollen */
.ablauf::before,
.ablauf-fortschritt {
  content: "";
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 23px;
  width: 2px;
  background: var(--linie);
}

.ablauf-fortschritt {
  background: var(--akzent);
  transform-origin: top;
  transform: scaleY(0);
}

.schritt {
  position: relative;
  padding: 0 0 clamp(48px, 6vw, 88px) 84px;
}

.schritt:last-child {
  padding-bottom: 0;
}

.schritt-nr {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid var(--linie);
  border-radius: 50%;
  background: var(--flaeche);
  font-family: var(--schrift-titel);
  font-variation-settings: "wdth" 100;
  font-weight: 750;
  transition: background 0.5s var(--kurve), border-color 0.5s, color 0.5s;
}

.schritt.ist-aktiv .schritt-nr {
  border-color: var(--akzent);
  background: var(--akzent);
  color: var(--dunkel);
}

.schritt h3 {
  margin: 8px 0 12px;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
}

.schritt p {
  max-width: 30em;
  color: var(--text-weich);
}

/* ----- Referenzen ----- */
.referenzen {
  padding: clamp(88px, 12vw, 176px) 0;
  background: var(--dunkel);
  color: var(--auf-dunkel);
  overflow: hidden;
}

.referenzen-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(36px, 5vw, 64px);
}

.referenzen-zaehler {
  flex-shrink: 0;
  white-space: nowrap;
  font-family: var(--schrift-titel);
  font-variation-settings: "wdth" 100;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--auf-dunkel) 70%, transparent);
}

.referenzen-zaehler span:first-child {
  color: var(--akzent);
}

/* Ohne JavaScript und auf dem Handy: seitlich wischen */
.ref-spur {
  display: flex;
  gap: clamp(16px, 2vw, 28px);
  padding: 0 var(--rand) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding: 0 var(--rand);
  list-style: none;
  scrollbar-width: none;
}

.ref-spur::-webkit-scrollbar {
  display: none;
}

.ref {
  flex: 0 0 min(85vw, 640px);
  scroll-snap-align: start;
}

.ref-bild {
  aspect-ratio: 7 / 5;
  overflow: hidden;
  border-radius: var(--radius-bild);
}

.ref-bild img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 1.2s var(--kurve);
}

.ref figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  padding-top: 16px;
}

.ref figcaption strong {
  font-family: var(--schrift-titel);
  font-variation-settings: "wdth" 100;
  font-size: 1.25rem;
  font-weight: 650;
}

.ref figcaption span {
  color: color-mix(in srgb, var(--auf-dunkel) 70%, transparent);
}

/* Mit JavaScript auf grossen Bildschirmen: Spur wird beim Scrollen seitlich bewegt */
.ref-gepinnt .ref-spur {
  overflow: visible;
  scroll-snap-type: none;
  width: max-content;
}

.ref-gepinnt .ref {
  flex-basis: clamp(420px, 46vw, 780px);
}

.referenzen.ref-gepinnt {
  padding: 0;
}

.ref-gepinnt .referenzen-innen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100vh;
  padding: calc(var(--kopf-hoehe) + 24px) 0 48px;
}

/* ----- Über uns ----- */
.ueber-raster {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px clamp(48px, 8vw, 128px);
  align-items: center;
}

.ueber-bild {
  overflow: hidden;
  border-radius: var(--radius-bild);
}

.ueber-bild img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.ueber-text .titel {
  margin-bottom: 28px;
}

.ueber-text p + p {
  margin-top: 18px;
  max-width: 34em;
  color: var(--text-weich);
}

.fakten {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 40px;
  border-top: 1px solid var(--linie);
}

.fakten div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--linie);
}

.fakten div:nth-child(odd) {
  margin-right: 24px;
}

.fakten dt {
  color: var(--text-weich);
}

.fakten dd {
  font-weight: 700;
  text-align: right;
}

/* ----- Stimmen ----- */
.stimmen {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 48px clamp(40px, 6vw, 96px);
  margin-top: clamp(36px, 5vw, 64px);
}

.stimme p {
  font-family: var(--schrift-titel);
  font-variation-settings: "wdth" 80;
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: pretty;
}

.stimme p::before { content: "«"; }
.stimme p::after { content: "»"; }

.stimme footer {
  margin-top: 18px;
  color: var(--text-weich);
}

/* ----- Fragen ----- */
.fragen-raster {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 32px clamp(48px, 8vw, 128px);
  align-items: start;
}

.fragen {
  border-top: 1px solid var(--linie);
}

.fragen details {
  border-bottom: 1px solid var(--linie);
}

.fragen summary {
  position: relative;
  padding: 24px 56px 24px 0;
  font-size: clamp(1.1rem, 1vw + 0.8rem, 1.35rem);
  font-weight: 650;
  list-style: none;
  cursor: pointer;
}

.fragen summary::-webkit-details-marker {
  display: none;
}

.fragen summary::before,
.fragen summary::after {
  content: "";
  position: absolute;
  right: 6px;
  top: 50%;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.4s var(--kurve);
}

.fragen summary::after {
  transform: rotate(90deg);
}

.fragen details[open] summary::after {
  transform: rotate(0);
}

.fragen details p {
  max-width: 36em;
  padding: 0 0 26px;
  color: var(--text-weich);
}

/* Weiches Aufklappen in neueren Browsern */
@supports (interpolate-size: allow-keywords) {
  :root { interpolate-size: allow-keywords; }

  .fragen details::details-content {
    height: 0;
    overflow: clip;
    transition: height 0.45s var(--kurve), content-visibility 0.45s allow-discrete;
  }

  .fragen details[open]::details-content {
    height: auto;
  }
}


/* =====================================================================
   6. KONTAKT UND FUSSZEILE
   ===================================================================== */
.kontakt {
  padding: clamp(88px, 12vw, 176px) 0;
  background: var(--dunkel);
  color: var(--auf-dunkel);
}

.kontakt-raster {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: 56px clamp(48px, 8vw, 128px);
  align-items: end;
}

.kontakt-titel {
  max-width: 12em;
  margin-bottom: clamp(32px, 4vw, 56px);
  font-size: clamp(2.4rem, 5.6vw, 5.2rem);
  line-height: 0.95;
}

.formular {
  display: grid;
  gap: 18px;
  max-width: 680px;
}

.feld-paar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.feld label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.92rem;
  font-weight: 600;
}

.optional {
  font-weight: 400;
  opacity: 0.7;
}

.feld input,
.feld select,
.feld textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid color-mix(in srgb, var(--auf-dunkel) 28%, transparent);
  border-radius: var(--radius-feld);
  background: color-mix(in srgb, var(--auf-dunkel) 6%, transparent);
  color: var(--auf-dunkel);
  font: inherit;
  transition: border-color 0.3s, background 0.3s;
}

.feld select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.feld select option {
  color: var(--text);
}

.feld input:focus,
.feld select:focus,
.feld textarea:focus {
  outline: none;
  border-color: var(--akzent);
  background-color: color-mix(in srgb, var(--auf-dunkel) 10%, transparent);
}

.feld textarea {
  resize: vertical;
}

.formular .knopf {
  justify-self: start;
  margin-top: 6px;
}

.kontakt .knopf::before {
  background: var(--auf-dunkel);
}

.kontakt .knopf:hover {
  color: var(--dunkel);
  border-color: var(--auf-dunkel);
}

.formular-hinweis {
  font-size: 0.9rem;
  opacity: 0.7;
}

.formular-fehler {
  color: var(--akzent);
  font-weight: 700;
}

.formular-fehler:empty {
  display: none;
}

.kontakt-angaben {
  display: grid;
  gap: 18px;
  padding-top: 24px;
  border-top: 1px solid color-mix(in srgb, var(--auf-dunkel) 22%, transparent);
}

.kontakt-angaben address {
  font-style: normal;
  font-family: var(--schrift-titel);
  font-variation-settings: "wdth" 100;
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.3;
}

.kontakt-angaben a:not(.textlink) {
  text-decoration: none;
}

.kontakt-angaben a:not(.textlink):hover {
  color: var(--akzent);
}

.zeiten {
  opacity: 0.75;
}

.fuss {
  padding: 28px 0 32px;
  border-top: 1px solid color-mix(in srgb, var(--auf-dunkel) 14%, transparent);
  background: var(--dunkel);
  color: color-mix(in srgb, var(--auf-dunkel) 70%, transparent);
  font-size: 0.92rem;
}

.fuss-reihe {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px 32px;
}

.fuss nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
}

.fuss a {
  text-decoration: none;
}

.fuss a:hover {
  color: var(--akzent);
}


/* =====================================================================
   7. UNTERSEITEN (Impressum, Datenschutz, 404)
   ===================================================================== */
.unterseite {
  min-height: 70vh;
  padding: calc(var(--kopf-hoehe) + clamp(48px, 9vw, 120px)) 0 clamp(72px, 10vw, 140px);
}

.unterseite h1 {
  margin-bottom: clamp(32px, 5vw, 56px);
  font-size: clamp(2.8rem, 8vw, 7rem);
  line-height: 0.92;
}

.unterseite h2 {
  margin: 44px 0 12px;
  font-size: 1.5rem;
}

.unterseite .rahmen > * {
  max-width: 720px;
}

.unterseite .rahmen > h1 {
  max-width: none;
}

.unterseite p,
.unterseite address {
  margin-bottom: 14px;
  font-style: normal;
}

.unterseite .weich {
  color: var(--text-weich);
}

.unterseite .knopf {
  margin-top: 16px;
}


/* =====================================================================
   8. SEITENÜBERGÄNGE UND BEWEGUNG
   Alles hier läuft nur, wenn niemand «weniger Bewegung» eingestellt hat.
   ===================================================================== */

/* Übergang zwischen Seiten (Chrome, Edge, Safari 18+; sonst normaler Seitenwechsel) */
@view-transition {
  navigation: auto;
}

@media (prefers-reduced-motion: no-preference) {

  ::view-transition-old(root) {
    animation: 0.55s var(--kurve) both seite-raus;
  }

  ::view-transition-new(root) {
    animation: 0.8s var(--kurve) 0.05s both seite-rein;
  }

  @keyframes seite-raus {
    to { opacity: 0.35; transform: translateY(-4%) scale(0.98); }
  }

  @keyframes seite-rein {
    from { clip-path: inset(100% 0 0 0); }
    to   { clip-path: inset(0 0 0 0); }
  }

  /* Einstieg: Titel wird «gehobelt», also von schmal zu breit gezogen */
  .held-titel {
    animation: hobeln 1.9s var(--kurve) 0.1s both;
  }

  .held-titel .zeile > span {
    animation: hochfahren 1.2s var(--kurve) both;
  }

  .held-titel .zeile:nth-child(2) > span {
    animation-delay: 0.12s;
  }

  .held-unten {
    animation: einblenden 1s var(--kurve) 0.75s both;
  }

  /* Bild wird von links nach rechts freigelegt wie ein Hobelstoss */
  .held-bild {
    animation: freilegen 1.5s cubic-bezier(0.7, 0, 0.2, 1) 0.45s both;
  }

  .held-bild img {
    animation: zurueckzoomen 2.2s var(--kurve) 0.45s both;
  }

  .unterseite h1 {
    animation: hobeln 1.4s var(--kurve) both;
  }

  @keyframes hobeln {
    from { font-variation-settings: "wdth" var(--titel-breite-start); }
    to   { font-variation-settings: "wdth" var(--titel-breite); }
  }

  @keyframes hochfahren {
    from { transform: translateY(105%); }
    to   { transform: none; }
  }

  @keyframes einblenden {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }

  @keyframes freilegen {
    from { clip-path: inset(0 100% 0 0); }
    to   { clip-path: inset(0 0 0 0); }
  }

  @keyframes zurueckzoomen {
    from { transform: scale(1.18); }
    to   { transform: none; }
  }

  .ref:hover .ref-bild img {
    transform: scale(1.04);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}


/* =====================================================================
   9. TABLET UND HANDY
   ===================================================================== */
@media (max-width: 960px) {
  :root {
    --kopf-hoehe: 72px;
  }

  .ablauf-raster,
  .ueber-raster,
  .fragen-raster,
  .kontakt-raster {
    grid-template-columns: minmax(0, 1fr);
  }

  .ablauf-kopf {
    position: static;
  }

  .leistung {
    grid-template-columns: minmax(0, 1fr);
  }

  .stimmen {
    grid-template-columns: minmax(0, 1fr);
  }

  .ueber-bild img {
    aspect-ratio: 4 / 3;
  }

  /* Menü wird zum Vollbild-Menü */
  .menu-knopf {
    display: inline-flex;
    position: relative;
    z-index: 2;
  }

  .kopf-nav {
    position: fixed;
    inset: 0;
    z-index: 1;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    padding: var(--kopf-hoehe) var(--rand) 48px;
    background: var(--dunkel);
    color: var(--auf-dunkel);
    font-family: var(--schrift-titel);
    font-variation-settings: "wdth" 100;
    font-size: clamp(2.2rem, 9vw, 3.4rem);
    font-weight: 750;
    clip-path: inset(0 0 100% 0);
    visibility: hidden;
    transition: clip-path 0.7s var(--kurve), visibility 0s linear 0.7s;
  }

  .kopf-nav .knopf {
    margin-top: 24px;
    font-family: var(--schrift-text);
    font-size: 1.05rem;
  }

  .kopf-nav a:not(.knopf)::after {
    display: none;
  }

  .menu-offen .kopf-nav {
    clip-path: inset(0 0 0 0);
    visibility: visible;
    transition: clip-path 0.7s var(--kurve), visibility 0s;
  }

  .menu-offen .menu-knopf,
  .menu-offen .marke {
    position: relative;
    z-index: 2;
    color: var(--auf-dunkel);
  }

  .menu-offen.kopf {
    background: none;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (max-width: 640px) {
  .held-titel {
    font-size: clamp(2.6rem, 15vw, 4.5rem);
  }

  .held-titel .zeile {
    white-space: normal;
  }

  .held-titel .zeile:nth-child(2) {
    padding-left: 0;
  }

  .held-bild {
    height: 52vh;
  }

  .knopf-reihe .knopf {
    flex: 1 1 100%;
  }

  .feld-paar,
  .fakten {
    grid-template-columns: minmax(0, 1fr);
  }

  .fakten div:nth-child(odd) {
    margin-right: 0;
  }

  .schritt {
    padding-left: 68px;
  }

  .marke span {
    font-size: 1rem;
  }

  /* Auf dem Handy: Bild direkt in der Leistungs-Zeile */
  .leistung-bild {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    margin-top: 8px;
    border-radius: var(--radius-bild);
  }
}

@media print {
  .kopf,
  .vorschau {
    display: none;
  }
}
