/* ==========================================================================
   Betreuungsbüro Schumann — style.css
   Statische Website, keine Build-Schritte, Systemschrift, mobile-first.
   ========================================================================== */

:root {
  --ink: #16141f;
  --ink-soft: #4b4757;
  --paper: #f7f6f3;
  --card: #ffffff;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #e7efff;
  --coral: #ff5a5f;
  --mint: #17c3a2;
  --amber: #ffb020;
  --line: #e8e6e0;
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --shadow-soft: 0 8px 30px rgba(22, 20, 31, 0.08);
  --shadow-lift: 0 16px 44px rgba(22, 20, 31, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --header-h: 68px;
}

/* --------------------------------------------------------------------------
   Basis
   -------------------------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  /* Sanfte Scrollstops (nur Startseite: nur dort tragen Sektionen snap-align).
     proximity statt mandatory: Sektionen höher als der Viewport (Chat, Kontakt
     auf Mobile) bleiben frei scrollbar, eingerastet wird nur nahe am Anfang. */
  scroll-snap-type: y proximity;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}

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

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
  font-weight: 800;
}

h1 { font-size: clamp(2.4rem, 7vw, 4.2rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 3vw, 1.4rem); }

p { margin: 0 0 1em; }

a { color: var(--accent); }

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: min(1120px, 100% - 2.5rem);
  margin-inline: auto;
}

.section {
  padding: clamp(3.5rem, 8vw, 6.5rem) 0;
}

/* Scrollstops auf der Startseite: Hero + die drei Sektionen rasten beim
   Scrollen sanft am oberen Rand ein (unterhalb des Sticky-Headers, siehe
   scroll-padding-top am html-Element). Selektoren existieren nur auf index. */
.hero,
#aktionen,
.steps-section,
#kontakt {
  scroll-snap-align: start;
}

.section-kicker {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.section-intro {
  max-width: 34em;
  color: var(--ink-soft);
  font-size: 1.06rem;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: #fff;
  padding: 0.7rem 1.2rem;
  z-index: 200;
  border-radius: 0 0 12px 0;
}

.skip-link:focus {
  left: 0;
}

/* --------------------------------------------------------------------------
   Loader (nur Startseite) — Logo pulsiert, bis das Hero-Video bereit ist,
   dann schiebt sich der Vorhang nach oben weg. Ohne JS wird der Loader
   gar nicht erst angezeigt (html.js fehlt), die Seite bleibt nutzbar.
   -------------------------------------------------------------------------- */

.loader {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: radial-gradient(130% 130% at 50% 42%, #16161b 0%, #0a0a0d 60%, #030304 100%);
  transition: opacity 0.65s cubic-bezier(0.7, 0, 0.3, 1), transform 0.65s cubic-bezier(0.7, 0, 0.3, 1);
}

html.js .loader { display: flex; }

/* Sonar-Ringe: wandern hinter dem Logo nach außen und verklingen —
   scharfe Linien statt Verlaufsfläche, kein Banding auf dunklem Grund. */
.loader::before,
.loader::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(70vw, 340px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.5);
  animation: loader-ring 2.6s cubic-bezier(0.2, 0.55, 0.35, 1) infinite;
}

.loader::after {
  animation-delay: 1.3s;
}

.loader img {
  position: relative;
  width: min(62vw, 300px);
  height: auto;
  animation: loader-pulse 2s ease-in-out infinite;
  transition: opacity 0.45s ease, transform 0.55s cubic-bezier(0.7, 0, 0.3, 1), filter 0.55s ease;
  will-change: transform, opacity;
}

@keyframes loader-pulse {
  0%, 100% { opacity: 0.45; transform: scale(0.965); }
  50%      { opacity: 1;    transform: scale(1.015); }
}

@keyframes loader-ring {
  0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.5); }
  20%  { opacity: 0.55; }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.55); }
}

/* Abgang: Kamera stößt durch das Dunkel — alles zoomt nach vorn,
   das Logo verwischt und die Ebene reißt auf. */
.loader.is-done {
  opacity: 0;
  transform: scale(1.6);
  pointer-events: none;
}

.loader.is-done::before,
.loader.is-done::after {
  animation: none;
  opacity: 0;
}

.loader.is-done img {
  animation: none;
  opacity: 0;
  transform: scale(1.45);
  filter: blur(14px);
}

.loader.is-hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .loader::before,
  .loader::after,
  .loader img { animation: none; }

  .loader.is-done {
    transform: none;
    opacity: 0;
  }

  .loader.is-done img {
    transform: none;
    filter: none;
  }
}

/* --------------------------------------------------------------------------
   Header & Navigation
   -------------------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 243, 0.86);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(22, 20, 31, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  padding: 0.4rem 0;
}

.brand img {
  height: 30px;
  width: auto;
}

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 48px;
  height: 48px;
  padding: 12px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: none;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px rgba(22, 20, 31, 0.18);
}

.site-nav.is-open { display: block; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0.8rem 1.25rem 1.2rem;
  display: grid;
  gap: 0.4rem;
}

.site-nav a {
  display: block;
  padding: 0.85rem 1rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  border-radius: var(--radius-sm);
}

.site-nav a:hover,
.site-nav a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.site-nav a[aria-current="page"] {
  background: var(--ink);
  color: #fff;
}

@media (min-width: 800px) {
  .nav-toggle { display: none; }

  .site-nav {
    position: static;
    display: block;
    background: none;
    border: 0;
    box-shadow: none;
  }

  .site-nav ul {
    display: flex;
    padding: 0;
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.55rem 0.95rem;
    font-size: 0.98rem;
    border-radius: 999px;
  }
}

/* --------------------------------------------------------------------------
   Hero (Startseite)
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(100svh - var(--header-h));
  min-height: calc(100vh - var(--header-h));
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: linear-gradient(135deg, #141b2e 0%, #1b2a50 45%, #2563eb 130%);
  color: #fff;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(15, 13, 24, 0.88) 0%, rgba(15, 13, 24, 0.45) 45%, rgba(15, 13, 24, 0.25) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: clamp(4rem, 10vh, 7rem) 0 clamp(2.5rem, 7vh, 5rem);
}

/* Dezenter Replay-Button unten rechts im Hero: nur Icon, kein Hintergrund.
   Erscheint per JS, sobald das Video abspielbereit ist. */
.video-replay {
  position: absolute;
  right: clamp(0.7rem, 2vw, 1.6rem);
  bottom: clamp(0.7rem, 2vw, 1.6rem);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.45);
  cursor: pointer;
  filter: drop-shadow(0 1px 6px rgba(0, 0, 0, 0.5));
  transition: color 0.2s ease, transform 0.35s ease;
}

.video-replay:hover,
.video-replay:focus-visible {
  color: rgba(255, 255, 255, 0.95);
  transform: rotate(-70deg);
}

.video-replay:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .video-replay { transition: color 0.2s ease; }
  .video-replay:hover,
  .video-replay:focus-visible { transform: none; }
}

.hero h1 {
  max-width: 11em;
  text-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.hero h1 .accent-word {
  background: linear-gradient(90deg, #7fb1ff, #ff8a8e);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  max-width: 32em;
  font-size: clamp(1.05rem, 2.4vw, 1.3rem);
  color: rgba(255, 255, 255, 0.88);
  margin-bottom: 1.8rem;
}

.hero-cta-label {
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.8rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.8rem 1.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
  background: var(--accent-dark);
  box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.btn-light {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.btn-light:hover {
  background: rgba(255, 255, 255, 0.26);
}

.btn-dark {
  background: var(--ink);
  color: #fff;
}

.btn-dark:hover {
  background: #000;
}

.btn .btn-arrow { transition: transform 0.18s ease; }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* --------------------------------------------------------------------------
   Action-Cards („Was brauchst du gerade?“)
   -------------------------------------------------------------------------- */

.card-grid {
  display: grid;
  gap: 1.2rem;
  margin-top: 2.2rem;
}

@media (min-width: 640px) {
  .card-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .card-grid { grid-template-columns: repeat(3, 1fr); }
}

.action-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: clamp(1.5rem, 3.5vw, 2.2rem);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

.action-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lift);
  border-color: transparent;
}

.action-card .card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(160deg, #2a2735 0%, #16141f 70%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 10px 22px -12px rgba(22, 20, 31, 0.55);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.action-card:hover .card-icon { transform: scale(1.05); }

.action-card[data-color="violet"] .card-icon { color: #7cb0ff; }
.action-card[data-color="coral"]  .card-icon { color: #ff9195; }
.action-card[data-color="mint"]   .card-icon { color: #43e8c6; }
.action-card[data-color="amber"]  .card-icon { color: #ffc86b; }

.action-card[data-color="violet"]:hover .card-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px -8px rgba(37, 99, 235, 0.55);
}
.action-card[data-color="coral"]:hover .card-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px -8px rgba(244, 63, 70, 0.5);
}
.action-card[data-color="mint"]:hover .card-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px -8px rgba(14, 168, 138, 0.5);
}
.action-card[data-color="amber"]:hover .card-icon {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.14), 0 12px 26px -8px rgba(242, 154, 2, 0.5);
}

.action-card h3 { margin-bottom: 0.1rem; }

.action-card p {
  margin: 0;
  color: var(--ink-soft);
}

.action-card .card-go {
  margin-top: auto;
  padding-top: 0.6rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.action-card:hover .card-go { text-decoration: underline; }

/* --------------------------------------------------------------------------
   „So läuft's“ — Steps
   -------------------------------------------------------------------------- */

.steps-section {
  background: var(--ink);
  color: #fff;
  border-radius: clamp(0px, 4vw, 40px);
  margin: 0 clamp(0rem, 2vw, 1.5rem);
}

.steps-section .section-kicker {
  background: rgba(255, 255, 255, 0.12);
  color: #b9d2ff;
}

.steps-section .section-intro { color: rgba(255, 255, 255, 0.72); }

.chat {
  list-style: none;
  margin: 2.2rem auto 0;
  padding: 0;
  max-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.chat-bubble {
  max-width: 82%;
  padding: 0.7rem 1rem;
  border-radius: 20px;
  font-size: 0.95rem;
  line-height: 1.45;
}

.chat-bubble--in {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.92);
  border-bottom-left-radius: 6px;
}

.chat-bubble--out {
  align-self: flex-end;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.35);
}

/* Neue „Nachricht" vom Betreuten = neuer Gesprächsabschnitt */
.chat-bubble--out + .chat-bubble--in { margin-top: 0.85rem; }

.chat-note {
  margin: 1.4rem 0 0;
  text-align: center;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.55);
}

/* --------------------------------------------------------------------------
   Kontakt
   -------------------------------------------------------------------------- */

.contact-grid {
  display: grid;
  gap: 1.4rem;
  margin-top: 2.2rem;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 1.05fr 1fr;
    align-items: stretch;
  }
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.6rem, 4vw, 2.4rem);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.contact-card address {
  font-style: normal;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.5;
}

.contact-card address small {
  display: block;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.contact-lines {
  display: grid;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.contact-lines li {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
}

.contact-lines .label {
  flex: 0 0 6.5em;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.contact-lines a {
  font-weight: 700;
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
}

.contact-lines a:hover { color: var(--accent); }

.hours {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

.hours-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
  margin-bottom: 0.25rem;
}

.hours-time {
  font-size: 1.15rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
}

.hours-note {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.contact-termin {
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
}

.contact-termin-q {
  margin: 0 0 0.7rem;
  font-weight: 700;
}

.map-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  background: var(--card);
  min-height: 380px;
}

.map-card iframe {
  flex: 1;
  width: 100%;
  min-height: 300px;
  border: 0;
  /* Karte ist reine Ansicht: kein Zoomen, kein Verschieben, keine Klicks */
  pointer-events: none;
  display: block;
  filter: saturate(0.55) contrast(1.05);
}

.map-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem 1rem;
  min-height: 52px;
  padding: 0.6rem 1.2rem;
  background: var(--ink);
  color: #fff;
}

.map-address {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.3;
}

.map-links {
  display: flex;
  align-items: center;
  gap: 1.1rem;
}

.map-links a {
  color: #b9d2ff;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
}

.map-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

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

.site-footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.75);
  margin-top: clamp(3rem, 7vw, 5rem);
  padding: 2.6rem 0 2.2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.site-footer img { height: 26px; width: auto; }

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-links a {
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.4rem 0;
  display: inline-block;
}

.footer-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.footer-note {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.45);
  margin: 0;
}

@media (min-width: 720px) {
  .footer-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }

  .footer-inner > a { justify-self: start; }
  .footer-links { justify-self: center; }
  .footer-note { justify-self: end; text-align: right; }
}

/* --------------------------------------------------------------------------
   Unterseiten
   -------------------------------------------------------------------------- */

.page-hero {
  padding: clamp(2.8rem, 7vw, 5rem) 0 clamp(1.6rem, 4vw, 2.6rem);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 1.6rem;
  padding: 0.4rem 0;
}

.back-link:hover { color: var(--accent); }

/* Icon-Kachel im Seitenkopf der Formular-Seiten — gleicher Look wie die
   Action-Cards auf der Startseite (dunkle Ink-Kachel, farbige Icon-Linie) */
.page-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 20px;
  background: linear-gradient(160deg, #2a2735 0%, #16141f 70%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 12px 24px -12px rgba(22, 20, 31, 0.5);
  margin-bottom: 1.2rem;
}

.page-icon[data-color="violet"] { color: #7cb0ff; }
.page-icon[data-color="coral"]  { color: #ff9195; }
.page-icon[data-color="mint"]   { color: #43e8c6; }

.page-hero h1 { max-width: 12em; }

.page-hero .lede {
  max-width: 30em;
  font-size: clamp(1.05rem, 2.4vw, 1.25rem);
  color: var(--ink-soft);
}

.embed-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  padding: clamp(0.6rem, 2vw, 1.4rem);
  margin-bottom: clamp(2rem, 5vw, 3.5rem);
}

/* Lade-Zustand: Spinner + Hinweistext, bis das iframe fertig ist */
.embed-card iframe {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Nach der ersten Höhen-Synchronisation: Größenänderungen weich animieren
   (z. B. wenn Bedingungs-Logik im Formular Felder aufklappt). */
.embed-card iframe.is-synced {
  transition: opacity 0.5s ease, height 0.55s cubic-bezier(0.33, 1, 0.4, 1), min-height 0.55s cubic-bezier(0.33, 1, 0.4, 1);
}

.embed-card.is-loading iframe {
  opacity: 0;
}

.embed-card.is-loading::before {
  content: "";
  position: absolute;
  top: clamp(120px, 22vh, 220px);
  left: 50%;
  width: 46px;
  height: 46px;
  margin-left: -23px;
  border-radius: 50%;
  border: 3.5px solid var(--accent-soft);
  border-top-color: var(--accent);
  animation: embed-spin 0.8s linear infinite;
  pointer-events: none;
}

.embed-card.is-loading::after {
  content: attr(data-loading-text);
  position: absolute;
  top: calc(clamp(120px, 22vh, 220px) + 66px);
  left: 0;
  right: 0;
  text-align: center;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
  pointer-events: none;
}

@keyframes embed-spin {
  to { transform: rotate(360deg); }
}

.embed-card iframe {
  display: block;
  width: 100%;
  border: 0;
  border-radius: var(--radius-md);
  min-height: 900px; /* Fallback, z. B. Bookings auf termin.html (kein Höhen-Sync) */
}

/* Starthöhen = erste Höhenmeldung des jeweiligen Jotforms (Desktop gemessen).
   So startet die Karte gleich in der richtigen Größe, statt groß aufzureißen
   und nach der ersten Höhen-Synchronisation zusammenzuspringen. */
.embed-card iframe.embed-start-unterlagen { min-height: 564px; }
.embed-card iframe.embed-start-nachricht  { min-height: 677px; }
.embed-card iframe.embed-start-rueckruf   { min-height: 290px; }
.embed-card iframe.embed-start-wba        { min-height: 600px; }

/* Lade-Overlay der Formular-Seiten: Icon-Kachel mit Sonar-Ringen über einer
   sanft pulsierenden Formular-Silhouette, bis das Jotform bereit ist.
   Karten MIT Overlay blenden den einfachen Spinner (::before/::after) aus. */
.embed-card.is-loading:has(.embed-loader)::before,
.embed-card.is-loading:has(.embed-loader)::after { display: none; }

.embed-loader {
  position: absolute;
  inset: clamp(0.6rem, 2vw, 1.4rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: clamp(1.2rem, 4vh, 2.6rem);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s;
  pointer-events: none;
}

.embed-card.is-loading .embed-loader {
  opacity: 1;
  visibility: visible;
}

.embed-loader .page-icon {
  position: relative;
  margin-bottom: 0;
}

.embed-loader .sonar {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid currentColor;
  opacity: 0;
  animation: embed-sonar 2.2s ease-out infinite;
}

.embed-loader .sonar-2 { animation-delay: 1.1s; }

@keyframes embed-sonar {
  0%   { transform: scale(1);   opacity: 0.5; }
  100% { transform: scale(1.9); opacity: 0; }
}

.embed-loader-text {
  margin: 1.1rem 0 1.7rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.embed-loader-skeleton {
  width: min(640px, 100%);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem 1.2rem;
}

.embed-loader-skeleton .sk {
  border-radius: 9px;
  background: #edeaf2;
  animation: embed-sk-pulse 1.6s ease-in-out infinite;
}

.embed-loader-skeleton .sk-label { height: 13px; width: 55%; }
.embed-loader-skeleton .sk-field { height: 46px; }
.embed-loader-skeleton .sk-area  { height: 110px; }
.embed-loader-skeleton .sk-span  { grid-column: 1 / -1; }

@keyframes embed-sk-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.45; }
}

@media (prefers-reduced-motion: reduce) {
  .embed-loader .sonar { animation: none; }
  .embed-loader-skeleton .sk { animation: none; }
}

.embed-hint {
  text-align: center;
  font-size: 0.92rem;
  color: var(--ink-soft);
  margin: 0.9rem 0 0.4rem;
}

/* --------------------------------------------------------------------------
   Rechtstexte (Impressum / Datenschutz)
   -------------------------------------------------------------------------- */

.legal-content {
  max-width: 46em;
  padding-bottom: clamp(2rem, 5vw, 4rem);
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 2.2em;
}

.legal-content h3 {
  font-size: 1.05rem;
  margin-top: 1.6em;
}

.placeholder-note {
  background: #fff7e6;
  border: 1px solid #f2d9a0;
  border-radius: var(--radius-md);
  padding: 1rem 1.3rem;
  font-size: 0.95rem;
  color: #7a5b13;
}

/* --------------------------------------------------------------------------
   Filmische Seitenwechsel
   Moderne Browser: Cross-Document View Transitions (weiches Ausblenden mit
   leichtem Rauszoomen, neue Seite gleitet herein). Ältere Browser: gleicher
   Effekt über die JS-Klassen html.no-vt / body.page-exit.
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }

  ::view-transition-old(root) {
    animation: page-out 0.3s cubic-bezier(0.7, 0, 0.3, 1) both;
  }

  ::view-transition-new(root) {
    animation: page-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  html.js.no-vt body {
    animation: page-in 0.55s cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  html.js.no-vt body.page-exit {
    animation: page-out 0.28s cubic-bezier(0.7, 0, 0.3, 1) both;
  }
}

@keyframes page-out {
  to {
    opacity: 0;
    transform: scale(0.985);
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* --------------------------------------------------------------------------
   Scroll-Reveals — nur mit JS und ohne reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
  html.js .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  html.js .reveal.is-visible {
    opacity: 1;
    transform: none;
  }

  html.js .reveal-delay-1 { transition-delay: 0.08s; }
  html.js .reveal-delay-2 { transition-delay: 0.16s; }
  html.js .reveal-delay-3 { transition-delay: 0.24s; }

  /* Chat-Bubbles ploppen wie eingehende Nachrichten nacheinander rein */
  html.js .chat .reveal {
    transform: translateY(14px) scale(0.92);
    transition-duration: 0.45s;
  }
  html.js .chat .reveal.is-visible { transform: none; }
  html.js .chat li:nth-child(2) { transition-delay: 0.35s; }
  html.js .chat li:nth-child(3) { transition-delay: 0.7s; }
  html.js .chat li:nth-child(4) { transition-delay: 1.05s; }
  html.js .chat li:nth-child(5) { transition-delay: 1.4s; }
  html.js .chat li:nth-child(6) { transition-delay: 1.75s; }

  html.js .chat .reveal.is-visible:hover {
    transform: scale(1.02);
    transition-delay: 0s;
    transition-duration: 0.25s;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
    scroll-snap-type: none; /* kein automatisches Nachrutschen */
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* --------------------------------------------------------------------------
   Feinschliff für kleine Screens & Querformat
   -------------------------------------------------------------------------- */

@media (max-width: 380px) {
  body { font-size: 16px; }
  .hero-actions .btn { flex: 1 1 100%; }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero { min-height: 560px; }
}
