/* =============================================================
   satzundbild – Basis-Stylesheet (mobile-first)
   ============================================================= */

/* -------------------------------------------------------------
   Schriften – lokal gehostet (DSGVO), Lizenzen im fonts-Ordner.

   Archivo: Fließtext + Navigation. Variable Font mit Gewichts-
   (100–900) und Breitenachse (62–125 %); die große Navigation nutzt
   die breite ("Expanded") Achse. Lizenz: OFL-Archivo.txt

   Titillium Web: nur der Firmenname im Seitenkopf (neben dem Logo).
   Ein Schnitt (Bold). Lizenz: OFL-Titillium-Web.txt
   ------------------------------------------------------------- */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin.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;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
  src: url("../fonts/archivo-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/titillium-web-700-latin.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;
}
@font-face {
  font-family: "Titillium Web";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/titillium-web-700-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* -------------------------------------------------------------
   Design-Tokens – hier zentral ändern, wirkt sitewide.
   Platzhalter-Werte, werden später final gesetzt.
   ------------------------------------------------------------- */
:root {
  /* Farben */
  --color-bg:         #e9e9e9;  /* Seitenhintergrund, hellgrau */
  --color-text:       #1a1a1a;  /* Fließtext / Standard */
  --color-link:       #1a1a1a;  /* Links im Ruhezustand */
  --color-link-hover: #ff5a00;  /* Hover / Fokus – Leucht-Orange */
  --color-pulse:      #ff9d5c;  /* Leerlauf-Puls – sanfteres Orange */
  --color-muted:      #5f5f5f;  /* Nebentexte, Footer-Version, Firmenname – ≥4.5:1 auf --color-bg */
  --color-rule:       #c4c4c4;  /* Haarlinien / Trenner */

  /* Maße & Typo */
  --space: clamp(1.5rem, 4.5vw, 2.5rem);
  /* Höhe des kompakten Seitenkopfs (Unterseiten) – exakt aus seinen eigenen
     Maßen: 1px Rahmen + Innenabstand oben (--space) + Inhaltshöhe (Logo 1.6em)
     + Innenabstand unten (--space * 0.5). Setzt voraus, dass .masthead__inner
     ein Flex-Container ist (sonst kämen ~5px Zeilenkasten-Spiel dazu) und der
     Firmenname kleiner als 1.6em bleibt. Fürs sticky-Menü darunter; skaliert
     per CSS mit --space mit, kein JS nötig. */
  --masthead-h: calc(1px + var(--space) * 1.5 + 1.6em);
  --font-sans: "Archivo", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;
  --font-brand: "Titillium Web", var(--font-sans);  /* nur Firmenname im Kopf */
  --stretch-wide: 110%;  /* "Expanded" für große Headlines / Navigation */
}

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

html {
  -webkit-text-size-adjust: 100%;
  /* Platz für die Scrollleiste immer reservieren -> kein Links-/Rechts-
     Versprung zwischen scrollbaren und nicht scrollbaren Seiten. */
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.3;
  -webkit-font-smoothing: antialiased;
}

/* --- Zugänglichkeit ---------------------------------------- */

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 0.5em 1em;
  background: var(--color-text);
  color: var(--color-bg);
}
.skip-link:focus { left: 0; z-index: 10; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

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

/* Skip-Link-Ziel: Fokus landet im Hauptinhalt, ohne den ganzen
   <main> zu umranden. */
main:focus {
  outline: none;
}

/* --- Firmen-Signet (auf allen Seiten) ---------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: var(--space) var(--space) calc(var(--space) * 0.5);
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-rule);
  /* weicher Schatten: klare Kante, wenn Inhalt darunter durchscrollt */
  box-shadow: 0 6px 12px -8px rgb(0 0 0 / 0.15);
}

/* Marke auf derselben linken Kante wie der Seiteninhalt; die Linie
   selbst läuft aber randlos durch (wie die Fußzeilen-Linie).
   Flex, damit die Kopfhöhe exakt der Inhaltshöhe entspricht (kein
   Zeilenkasten-Spiel) – siehe --masthead-h. */
.masthead__inner {
  display: flex;
  width: 42rem;
  max-width: 100%;
  margin-inline: auto;
}

.masthead__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  text-decoration: none;
  /* morpht zwischen großer (Startseite) und kompakter Fassung */
  view-transition-name: site-brand;
}

.masthead__logo {
  width: auto;
  height: 1.6em;
  display: block;
}

.masthead__name {
  font-family: var(--font-brand);
  font-size: 0.85rem;   /* bleibt unter 1.6em -> Logo bestimmt die Kopfhöhe */
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
  transition: color 0.15s ease;
}

/* Startseite: Marke größer – beim Seitenwechsel transitioniert sie kleiner. */
.page--home .masthead {
  padding-top: calc(var(--space) * 1.3);
  padding-bottom: calc(var(--space) * 0.7);
}
.page--home .masthead__logo {
  height: clamp(1.9rem, 6vw, 2.4rem);
}
.page--home .masthead__name {
  font-size: clamp(0.95rem, 2.8vw, 1.2rem);
  letter-spacing: 0.12em;
}

.masthead__brand:hover .masthead__name,
.masthead__brand:focus-visible .masthead__name {
  color: var(--color-link-hover);
}

/* --- Layout ------------------------------------------------- */

.content {
  flex: 1;
  padding: var(--space);
}

/* Gemeinsame Inhaltsspalte für Start- und Unterseiten:
   feste Breite, Text linksbündig, Spalte selbst mittig ausgerichtet. */
.home__inner,
.content__inner {
  width: 42rem;
  max-width: 100%;
}

/* Startseite: Menüblock füllt den ersten Screen (mittig), darunter folgt
   – erst beim Scrollen sichtbar – der Firmentext. */
.home {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: var(--space);
}
.home__inner {
  flex: 1 0 auto;
  /* füllt den ersten Screen, damit der Firmentext erst beim Scrollen kommt
     (Abzug ≈ Kopf + Fuß + doppelter Außenabstand) */
  min-height: calc(100vh - 14rem);
  min-height: calc(100lvh - 14rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.home__tagline {
  margin: 1.6em 0 0;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--color-muted);
  max-width: 24em;
}
.home__since {
  display: block;
  margin-top: 0.35em;
}

/* Firmentext unter der Falz – ruhig, kleiner Fließtext. */
.home__about {
  width: 42rem;
  max-width: 100%;
  /* zusätzlicher, viewport-abhängiger Abstand -> bleibt auf allen
     Bildschirmhöhen zuverlässig unter der Falz */
  margin-top: max(calc(var(--space) * 2), 12vh);
  padding-bottom: calc(var(--space) * 2);
  font-weight: 400;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--color-muted);
}
.home__about-title {
  margin: 0 0 0.9em;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text);
}
.home__about p {
  margin: 0 0 1em;
}
.home__about p:last-child {
  margin-bottom: 0;
}
.home__about a {
  color: inherit;
}

/* --- Menü -------------------------------------------------- */

.menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu__link {
  position: relative;
  display: inline-block;
  color: var(--color-link);
  text-decoration: none;
  letter-spacing: -0.01em;
  --wipe-dur: 0.32s;
}

/* Hover-Wische: dieselbe Beschriftung in der Hoverfarbe (.menu__fill,
   aria-hidden) liegt als Overlay über dem Link. Eine weich auslaufende
   Verlaufsmaske wandert von links nach rechts (Stopp-Position --wipe-pos,
   per @property animierbar). Beim Eingang blendet sie die Hoverfarbe ein,
   beim Ausgang – mit getauschtem Verlauf, gleiche Bewegung – wieder aus. */
@property --wipe-pos {
  syntax: "<percentage>";
  inherits: false;
  initial-value: -45%;
}

.menu__fill {
  position: absolute;
  inset: 0 auto 0 0;
  padding: inherit;   /* Innenabstand des Links übernehmen -> Text deckt sich */
  color: var(--color-link-hover);
  white-space: nowrap;
  pointer-events: none;
  visibility: hidden;   /* nur während der Wische sichtbar (JS-Klassen) */
  --wipe-soft: 30%;   /* halbe Breite des weichen Rands (bis ~35% ok, sonst
                         auch die -45%/145% in @keyframes menu-wipe anpassen) */
  --wipe-pos: -45%;    /* Ruhe: Maske komplett transparent */
  -webkit-mask-image: linear-gradient(90deg,
    #000  calc(var(--wipe-pos) - var(--wipe-soft)),
    #0000 calc(var(--wipe-pos) + var(--wipe-soft)));
          mask-image: linear-gradient(90deg,
    #000  calc(var(--wipe-pos) - var(--wipe-soft)),
    #0000 calc(var(--wipe-pos) + var(--wipe-soft)));
}
.menu__link.is-wiping .menu__fill,
.menu__link.is-unwiping .menu__fill {
  visibility: visible;
  animation: menu-wipe var(--wipe-dur) cubic-bezier(0.3, 0, 0, 1) forwards;
}
.menu__link.is-unwiping .menu__fill {
  -webkit-mask-image: linear-gradient(90deg,
    #0000 calc(var(--wipe-pos) - var(--wipe-soft)),
    #000  calc(var(--wipe-pos) + var(--wipe-soft)));
          mask-image: linear-gradient(90deg,
    #0000 calc(var(--wipe-pos) - var(--wipe-soft)),
    #000  calc(var(--wipe-pos) + var(--wipe-soft)));
}
.menu__link.is-active .menu__fill { text-decoration: underline; }

@keyframes menu-wipe {
  from { --wipe-pos: -45%; }
  to   { --wipe-pos: 145%; }
}

/* Startseite: groß, enger Zeilendurchschuss (Zeilen berühren sich fast).
   Bei längeren Wörtern ggf. font-size / line-height hier nachjustieren. */
.menu--hero .menu__link {
  display: block;
  /* etwas flacher skaliert, damit "Production-Partner" mobil einzeilig bleibt */
  font-size: clamp(1.9rem, 9.5vw, 4rem);
  line-height: 0.82;
  /* breite Achse erst ab Desktop – mobil würde "Production-Partner" umbrechen */
}

/* Der enge Durchschuss (0.82) macht die Zeilenbox kleiner als die
   Glyphen. Die Verlaufsmaske des Overlays schneidet sonst an der Box
   ab -> Ober-/Unterlängen des Hoverworts blieben dunkel. Box übers
   Padding vergrößern, Text per negativem Versatz an Ort halten. */
.menu--hero .menu__fill {
  box-sizing: content-box;
  inset-block: -0.35em auto;
  padding-block: 0.35em 0.45em;
}
/* Hoverwort über die (durch den engen Satz) überlappenden Nachbarn heben. */
.menu--hero .menu__link:hover { z-index: 1; }

/* Unterseiten: kompakte Zeile über dem Inhalt – wandert beim Scrollen
   direkt unter dem Seitenkopf mit. */
.menu--compact {
  position: sticky;
  top: var(--masthead-h);
  z-index: 9;   /* unter dem Kopf (z-index 10) */
  background: var(--color-bg);
  padding-block: 0.6rem;
  box-shadow: 0 6px 12px -8px rgb(0 0 0 / 0.15);
}
.menu--compact .menu__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1em;
}
.menu--compact .menu__link {
  font-size: 0.95rem;
  font-weight: 700;
  padding-block: 0.35em;   /* Klickfläche ≥ 24px (WCAG 2.5.8) */
}

/* Tastatur-Fokus: der Rahmen (:focus-visible) ist der Indikator –
   keine Farbänderung (die wäre kontrastschwach). */
.menu__link:hover {
  animation: none; /* Hover schlägt den Leerlauf-Puls */
}

.menu__link.is-active { text-decoration: underline; }

/* --- Leerlauf-Puls --------------------------------------------
   Per JS wird .is-idle auf das Menü gesetzt (Haupt- wie Kompaktmenü) –
   direkt nach dem Laden und danach im festen 11-s-Takt. Die Menüpunkte
   glimmen dann einmal versetzt in sanftem Orange auf. */

@media (prefers-reduced-motion: no-preference) {
  /* Versatz je Punkt über eine Variable – so pulst kein Punkt fälschlich
     bei 0s mit, wenn ein Menüeintrag dazukommt. Bei mehr Einträgen die
     Liste unten verlängern. */
  .menu.is-idle .menu__link {
    animation: menu-pulse 1.9s ease-in-out both;
    animation-delay: calc(var(--pulse-index, 40) * 0.22s); /* ohne Index: außer Sichtweite */
  }
  .menu.is-idle .menu__item:nth-child(1) { --pulse-index: 0; }
  .menu.is-idle .menu__item:nth-child(2) { --pulse-index: 1; }
  .menu.is-idle .menu__item:nth-child(3) { --pulse-index: 2; }
  .menu.is-idle .menu__item:nth-child(4) { --pulse-index: 3; }
  .menu.is-idle .menu__item:nth-child(5) { --pulse-index: 4; }
  .menu.is-idle .menu__item:nth-child(6) { --pulse-index: 5; }
  .menu.is-idle .menu__item:nth-child(7) { --pulse-index: 6; }
  .menu.is-idle .menu__item:nth-child(8) { --pulse-index: 7; }
}

@keyframes menu-pulse {
  0%, 100% { color: var(--color-link); }
  45%      { color: var(--color-pulse); }
}

/* --- Fließtext -------------------------------------------- */

.prose {
  max-width: 42rem;
  margin-top: calc(var(--space) * 1.5);
  font-weight: 400;
  line-height: 1.5;
}

.prose h1 {
  font-size: clamp(1.9rem, 6vw, 2.8rem);
  font-stretch: var(--stretch-wide);
  line-height: 1.05;
  margin: 0 0 0.35em;
}

.prose h2 {
  font-size: 1.15rem;
  margin: 2em 0 0.35em;
}

.prose p {
  margin: 0 0 1em;
}

/* Leitsatz direkt unter der Überschrift */
.prose__lead {
  font-size: clamp(1.3rem, 3.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 0.9em;
}

/* Einleitungssatz nach dem Leitsatz einen Tick größer */
.prose__lead + p:not(.prose__meta) {
  font-size: 1.05rem;
}

/* Kleiner Meta-Hinweis (z. B. „Stand: …“) über dem Fließtext */
.prose p.prose__meta {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin: 0 0 2.5em;
}

/* Links im Fließtext (Rechtstexte, FAQ, Kontakt, Startseiten-Text): kein
   Standard-Blau/Lila. Textfarbe bleibt, dünne gestrichelte Unterstreichung
   in Grau als leiser Hinweis (nicht nur Farbe -> WCAG 1.4.1), Hover/Fokus
   orange. Explizite Farbe deckt auch :visited ab. */
:is(.prose, .home__about) a:not(.contact-phone) {
  color: inherit;
  text-decoration: underline dashed;
  text-decoration-color: var(--color-muted);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  overflow-wrap: anywhere;   /* lange URLs in Rechtstexten */
}
:is(.prose, .home__about) a:not(.contact-phone):hover,
:is(.prose, .home__about) a:not(.contact-phone):focus-visible {
  color: var(--color-link-hover);
  text-decoration-color: currentColor;
}

/* Telefonnummer (Kontakt + Startseiten-Text): Headline-Größe, schwarz statt
   Link-Blau, trotzdem antippbares tel:-Link. Spezifität über .prose /
   .home__about, damit deren Link-Regeln nicht gewinnen. */
:is(.prose, .home__about) a.contact-phone {
  display: block;
  width: fit-content;
  color: var(--color-text);
  font-size: clamp(1.9rem, 6vw, 2.8rem);   /* wie die Seiten-Überschrift */
  font-weight: 700;
  font-stretch: var(--stretch-wide);
  line-height: 1.1;
  text-decoration: none;
  margin-block: 0.25em 0.1em;
  padding-block: 0.1em;
}
:is(.prose, .home__about) a.contact-phone:hover,
:is(.prose, .home__about) a.contact-phone:focus-visible {
  color: var(--color-link-hover);
}

/* Personen: gleichwertig, als ein fließender Namensblock – keine
   Rangfolge, bricht mobil wie Text um. */
.people {
  margin-top: calc(var(--space) * 1.25);
  font-weight: 700;
  line-height: 1.7;
}
.people__name:not(:last-child)::after {
  content: "\00a0·\00a0\00a0";
  font-weight: 400;
  color: var(--color-rule);
}

/* Team mit Fotos: gleich große Hochkant-Porträts, Name darunter – keine
   Rangfolge. Graustufen pro Person schaltbar; bei Mouse-over kurz in Farbe. */
.team {
  list-style: none;
  margin: calc(var(--space) * 1.5) 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr));
  gap: var(--space);
  max-width: 32rem;
}
.team__photo {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  background: var(--color-rule);
}
.team__photo--bw {
  filter: grayscale(1);
  transition: filter 0.4s ease;
}
.team__member:hover .team__photo--bw,
.team__member:focus-within .team__photo--bw {
  filter: grayscale(0);
}
.team__name {
  display: block;
  margin-top: 0.6em;
  font-weight: 700;
  line-height: 1.3;
}
@media (prefers-reduced-motion: reduce) {
  .team__photo--bw { transition: none; }
}
@media (forced-colors: active) {
  .team__photo--bw { filter: none; }
}

/* --- Fragen & Antworten (Akkordeon) --------------------- */

.faq {
  margin: calc(var(--space) * 1.5) 0 0;
  border-top: 1px solid var(--color-rule);
}

/* „Alle aufklappen“ – erst per JS sichtbar (ohne JS nutzlos). */
.faq__toggle {
  display: block;
  margin: 0 0 0.5em;
  padding: 0.35em 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 0.9rem;
  color: var(--color-muted);
  cursor: pointer;
}
.faq__toggle:hover {
  color: var(--color-link-hover);
}

.faq__item {
  border-bottom: 1px solid var(--color-rule);
  /* freier Raum unter dem sticky-Kopf + Menü beim Anker-Sprung
     (7rem deckt auch das mobil zweizeilige Menü ab) */
  scroll-margin-top: calc(var(--masthead-h) + 7rem);
}

.faq__q {
  display: flex;
  gap: 0.75em;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.85em 0;
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.35;
  cursor: pointer;
  list-style: none;
  -webkit-tap-highlight-color: transparent;
}
.faq__q::-webkit-details-marker { display: none; }

/* Safari zeichnet sonst bei Maus-/Touch-Fokus einen dunklen Rahmen ums
   <summary>. Tastaturfokus behält seinen sichtbaren Rahmen (global). */
.faq__q:focus:not(:focus-visible) { outline: none; }
.faq__q:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: -3px;
  border-radius: 2px;
}

/* Plus/Minus als Aufklapp-Signal. */
.faq__q::after {
  content: "+";
  flex: none;
  font-weight: 400;
  color: var(--color-muted);
}
.faq__item[open] > .faq__q::after {
  content: "\2212"; /* echtes Minuszeichen */
}
.faq__q:hover {
  color: var(--color-link-hover);
}
.faq__q:hover::after {
  color: var(--color-link-hover);
}

.faq__a {
  padding: 0 0 1.1em;
}
.faq__a > :first-child { margin-top: 0; }
.faq__a > :last-child { margin-bottom: 0; }

/* --- Footer ---------------------------------------------- */

.site-footer {
  position: sticky;
  bottom: 0;
  padding: calc(var(--space) * 0.6) var(--space);
  background: var(--color-bg);
  border-top: 1px solid var(--color-rule);
  box-shadow: 0 -6px 12px -8px rgb(0 0 0 / 0.15);
  font-size: 0.75rem;
  font-weight: 400;
}

/* Fußzeilen-Text auf derselben linken Kante wie der Inhalt. */
.site-footer__inner {
  width: 42rem;
  max-width: 100%;
  margin-inline: auto;
}

.site-footer__meta {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 1.1em;
}

.site-footer__meta a {
  display: inline-block;
  padding-block: 0.35em;   /* etwas größere Klickfläche */
  color: var(--color-link);
  text-decoration: none;
}
.site-footer__meta a:hover {
  color: var(--color-link-hover);
  text-decoration: underline;   /* nicht nur über Farbe (WCAG 1.4.1) */
}

.site-footer__version {
  color: var(--color-muted);
}

/* --- Desktop -------------------------------------------- */

@media (min-width: 48rem) {
  /* Inhaltsspalte mittig -> gleiche linke Kante wie die Startseite */
  .content {
    padding-top: calc(var(--space) * 1.5);
    display: flex;
    justify-content: center;
  }
  /* große Navigation in der breiten Achse (mobil zu breit für eine Zeile) */
  .menu--hero .menu__link {
    font-stretch: var(--stretch-wide);
  }
}

/* --- Seitenübergänge (View Transitions) ------------------------
   Beim Klick auf ein Wort der Startseite wandert es an seinen Platz
   in der Zielüberschrift (Weg + Schriftgröße). Die Klasse `.vt-<slug>`
   liegt auf dem hero-Menüwort und der Ziel-<h1> (menu.php / Templates).
   Progressive Enhancement: Browser ohne Support navigieren normal.

   Die .vt-* unten decken die aktuellen Top-Level-Seiten ab. Kommt eine
   Seite dazu oder ändert sich ein Slug, hier die Zeile ergänzen – sonst
   gibt es für die Seite nur die normale Überblendung. */

@view-transition { navigation: auto; }

/* Kopfleiste und Fuß bleiben beim Wechsel ruhig stehen. */
.masthead    { view-transition-name: site-masthead; }
.site-footer { view-transition-name: site-footer; }

/* Eindeutiger Name je Top-Level-Seite + gemeinsame Klasse fürs Styling. */
.vt-prepress           { view-transition-name: vt-prepress; }
.vt-production-partner  { view-transition-name: vt-production-partner; }
.vt-online             { view-transition-name: vt-online; }
.vt-team               { view-transition-name: vt-team; }
.vt-faq                { view-transition-name: vt-faq; }
.vt-kontakt            { view-transition-name: vt-kontakt; }
.vt-prepress,
.vt-production-partner,
.vt-online,
.vt-team,
.vt-faq,
.vt-kontakt {
  view-transition-class: word;
}

/* Seiten-Überblendung: kurz. */
::view-transition-group(*) {
  animation-duration: 0.3s;
  animation-timing-function: ease;
}

/* Wanderndes Wort: weiche Kurve, Schnappschüsse skalieren mit der
   animierten Box (sonst springt die Größe am Ende um). */
::view-transition-group(.word) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
::view-transition-old(.word),
::view-transition-new(.word) {
  height: 100%;
  width: 100%;
}

/* Marke: groß (Startseite) <-> kompakt (Unterseiten) weich skalieren. */
::view-transition-group(site-brand) {
  animation-duration: 0.5s;
  animation-timing-function: cubic-bezier(0.2, 0, 0, 1);
}
::view-transition-old(site-brand),
::view-transition-new(site-brand) {
  height: 100%;
  width: 100%;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) {
    animation-duration: 0.01ms !important;
  }
  .menu__link { --wipe-dur: 0.01ms; }
}

/* --- Windows-Kontrastmodus / forced-colors ------------------
   Maske und Puls würden dort Text verschlucken bzw. sind bedeutungslos;
   das System steuert Link- und Fokusfarben selbst. */
@media (forced-colors: active) {
  .menu__fill { display: none; }
  .menu.is-idle .menu__link { animation: none; }
  :focus-visible { outline-color: Highlight; }
}
