/* ═══════════════════════════════════════════════════
   PROFIX – MOTION.CSS  (Feinschliff Okt. 2026)
   Dezente Übergänge auf dem bestehenden Design – nichts umgebaut.
   Lädt NACH site.css. Datei weglassen = alter Stand.
═══════════════════════════════════════════════════ */

/* ── Fixes ── */
/* KI-Hinweis wieder oben rechts im Hero (wurde von #intro.has-video > * überschrieben) */
#intro.has-video > .ki-badge { position: absolute; top: 14px; right: 16px; z-index: 2; }
/* Schräges Laufband ist breiter als der Bildschirm → kein seitliches Wackeln mehr */
.content { overflow-x: clip; }

/* ── 1) Seitenstart: Rail baut sich nacheinander auf (nur Desktop) ── */
@media (min-width: 1024px) {
  .rail > * { animation: railIn .8s var(--ease-out) backwards; }
  .rail > :nth-child(1) { animation-delay: .05s; }
  .rail > :nth-child(2) { animation-delay: .15s; }
  .rail > :nth-child(3) { animation-delay: .25s; }
  .rail > :nth-child(4) { animation-delay: .38s; }
  .rail > :nth-child(5) { animation-delay: .5s; }
  .rail-nav li { animation: railIn .6s var(--ease-out) backwards; }
  .rail-nav li:nth-child(1) { animation-delay: .32s; }
  .rail-nav li:nth-child(2) { animation-delay: .37s; }
  .rail-nav li:nth-child(3) { animation-delay: .42s; }
  .rail-nav li:nth-child(4) { animation-delay: .47s; }
  .rail-nav li:nth-child(5) { animation-delay: .52s; }
  .rail-nav li:nth-child(6) { animation-delay: .57s; }
}
@keyframes railIn { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }

/* ── 2) Hero-Überschrift: Zeilen gleiten aus einer Kante (main.js teilt die Zeilen) ── */
.intro-title .ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.intro-title .ln > span { display: inline-block; transform: translateY(105%); }
.reveal.visible .intro-title .ln > span { animation: lineUp .9s var(--ease-out) forwards; }
.reveal.visible .intro-title .ln:nth-child(2) > span { animation-delay: .1s; }
.reveal.visible .intro-title .ln:nth-child(3) > span { animation-delay: .2s; }
@keyframes lineUp { to { transform: none; } }
.eyebrow::before { transform-origin: left; }
.reveal.visible .eyebrow::before { animation: barGrow .7s var(--ease-out) .15s backwards; }
@keyframes barGrow { from { transform: scaleX(0); } }

/* ── 3) Kapitel-Köpfe: Nummer steigt auf, Titel wird von links aufgedeckt ── */
.ch-head .ch-no { transition: transform .8s var(--ease-out), opacity .6s ease, -webkit-text-stroke-color .3s; }
.ch-head .ch-title { transition: clip-path .9s var(--ease-out) .12s; }
.ch-head:not(.visible) .ch-no { transform: translateY(35%); opacity: 0; }
.ch-head:not(.visible) .ch-title { clip-path: inset(0 100% 0 0); }
.ch-head.visible .ch-title { clip-path: inset(0 0 0 0); }

/* Sprung über die Navigation: Ziel-Kapitel bestätigt kurz „hier bist du" */
.chapter.is-target .ch-head::after { animation: targetSweep 1.3s var(--ease-out); }
.chapter.is-target .ch-no { -webkit-text-stroke-color: var(--red); animation: noPulse 1.3s var(--ease-out); }
@keyframes targetSweep { 0% { width: 90px; } 45% { width: 100%; } 100% { width: 90px; } }
@keyframes noPulse { 0%, 100% { text-shadow: none; } 35% { text-shadow: 0 0 24px rgba(224,26,26,.55); } }
/* Formular-Panel als Ziel (eigener Kopf) */
#termin.is-target .form-panel { animation: panelPing 1.3s var(--ease-out); }
@keyframes panelPing { 0% { box-shadow: 0 0 0 0 rgba(224,26,26,.55); } 100% { box-shadow: 0 0 0 18px rgba(224,26,26,0); } }

/* ── 4) Rail-Navigation: aktiver Punkt bekommt einen kleinen Marker ── */
.rail-nav a .no { position: relative; }
.rail-nav a .no::before {
  content: ''; position: absolute; left: -12px; top: 50%;
  width: 5px; height: 5px; border-radius: 50%; background: var(--red);
  transform: translateY(-50%) scale(0); transition: transform .35s var(--ease-out);
  box-shadow: 0 0 10px var(--red-glow);
}
.rail-nav a.active .no::before { transform: translateY(-50%) scale(1); }

/* ── 5) Knöpfe: spürbares Drücken ── */
.btn-rail, .form-submit, .grev-link, .ig-follow, .mtop-tel, .mtop-burger, .p-tel, .back-top, .faq-q {
  -webkit-tap-highlight-color: transparent;
}
.btn-rail:active, .form-submit:active:not(:disabled), .grev-link:active, .ig-follow:active,
.mtop-tel:active, .mtop-burger:active, .back-top:active {
  transform: translateY(0) scale(.96) !important;
  transition-duration: .08s;
}

/* ── 6) FAQ: weiches Auf-/Zuklappen in echter Höhe (statt fester 250 px) ── */
.faq-a { display: grid; grid-template-rows: 0fr; max-height: none !important; padding: 0 1.5rem !important;
  transition: grid-template-rows .45s var(--ease-out), padding .45s var(--ease-out); }
.faq-a > div { overflow: hidden; }
.faq-item.open .faq-a { grid-template-rows: 1fr; padding: 0 1.5rem 1.2rem !important; }
.faq-a > div { opacity: 0; transform: translateY(-4px); transition: opacity .3s ease, transform .4s var(--ease-out); }
.faq-item.open .faq-a > div { opacity: 1; transform: none; transition-delay: .08s; }
.faq-q { transition: color .2s, background .25s; }
.faq-q:hover { background: rgba(255,255,255,.025); }

/* ── 7) Handy-Leiste: blendet beim Runterscrollen aus, beim Hochscrollen ein ── */
@media (max-width: 1023px) {
  .mtop { transition: transform .35s var(--ease-out), box-shadow .3s ease, background .3s; }
  .mtop.is-scrolled { box-shadow: 0 8px 24px rgba(0,0,0,.45); }
  .mtop.is-hidden { transform: translateY(-100%); }
  body.menu-open .mtop { transform: none; }
  .mtop.is-hidden ~ .page-progress, body:has(.mtop.is-hidden) .page-progress { top: 0; }
  .page-progress { transition: top .35s var(--ease-out); }
}

/* ── 8) Karte: weiches Einblenden nach dem Laden ── */
.map-wrap iframe { opacity: 0; transition: opacity .6s ease; }
.map-wrap.is-loaded iframe { opacity: 1; }
.map-wrap.is-loading::before {
  content: 'Karte wird geladen …';
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: var(--gray); font-size: .85rem; letter-spacing: 1px;
}

/* ── 9) Bewertungen ohne Google-Anbindung: ehrlicher Block statt Platzhaltern ── */
.bewertungen-grid:empty, .bewertungen-grid:empty + .scroll-hint { display: none; }
.bewertungen-grid:empty ~ .ig-inline { margin-top: .4rem; }
.grev-intro { display: flex; flex-direction: column; gap: .3rem; }
.grev-intro b { font-family: var(--font-condensed); font-weight: 800; font-size: 1.25rem; text-transform: uppercase; letter-spacing: 1px; color: #fff; }
.grev-intro span { font-size: .85rem; color: var(--gray); }
.grev-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.grev-link.alt { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.25); }
.grev-link.alt:hover { border-color: #fbbc05; color: #fbbc05; }

/* ── 10) Kleinigkeiten ── */
:focus-visible { transition: outline-offset .15s ease; }
.svc-row .r-no { transition: color .3s ease, transform .35s var(--ease-out); }
.svc-row:hover .r-no { color: var(--red); transform: scale(1.08); }
.site-foot a { position: relative; }
.site-foot a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: var(--red);
  transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease-out); }
.site-foot a:hover::after { transform: scaleX(1); }

/* Link „Mehr dazu“ im Karten-Hinweis */
.map-consent p a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }
.map-consent p a:hover { color: var(--red); }

/* Handy: nie seitlich scrollen (Laufband/Schrägstreifen ragen minimal über den Rand) */
html { overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
