/* =====================================================================
   Moderner Feinschliff + Bewegung
   Alle Animationen nur bei "prefers-reduced-motion: no-preference".
   ===================================================================== */
:root {
  --radius-lg: 14px;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
}

/* Größere Radien für Fotos & Flächen */
.photo, .photo-ph, .map-ph, .inquiry, .planner { border-radius: var(--radius-lg); }
.bautafel { border-radius: 10px; }

/* ---------- Hero: Text links, Foto + Bautafel rechts ---------- */
:root { --signal: #f5b800; --signal-soft: #fff4cc; }

.hero { padding: 28px 0 0; overflow-x: clip; }
.hero-grid { display: grid; gap: 40px; align-items: center; }
.hero-title {
  font-size: clamp(2.6rem, 11.5vw, 5.4rem);
  line-height: .98; letter-spacing: -0.02em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .08em; margin-bottom: -.08em; }
.hero-title .line > span { display: inline-block; }
.hero-place { margin: 18px 0 0; }
.hero-sub { margin-top: 14px; font-weight: 500; color: var(--text-soft); }
.hero-actions { margin-top: 28px; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 10px;
  margin: 0 0 22px; padding: 7px 14px 7px 12px;
  background: var(--signal-soft); border: 1px solid var(--signal);
  border-radius: 999px;
  font-weight: 650; font-size: .95rem;
}
.hero-badge .dot { width: 9px; height: 9px; border-radius: 50%; background: #1e8a4c; box-shadow: 0 0 0 0 rgba(30,138,76,.5); }

.hero-visual { position: relative; }
.photo-hero { aspect-ratio: 4 / 3; margin: 0; }
.photo-ph-dark {
  background:
    linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(160deg, #24384a, var(--slate) 70%);
  color: #9fb3c2; border: 0; gap: 16px;
}
.photo-ph-dark .house { width: min(58%, 300px); height: auto; color: #b9cad6; }

/* Bautafel: gelber Kopf wie ein echtes Bauschild */
.bautafel {
  position: relative; z-index: 2;
  margin: -64px 14px 0;
  border-radius: 10px;
  box-shadow:
    inset 0 0 0 6px var(--slate), inset 0 0 0 8px rgba(255,255,255,.85),
    0 30px 60px -24px rgba(28, 42, 53, .55);
}
.bautafel-head {
  background: var(--signal); color: var(--slate);
  border-bottom: 0; border-radius: 4px;
  padding: 10px 14px 12px; margin-bottom: 6px;
}
.bautafel-kicker { color: rgba(28,42,53,.75); }
.bautafel-head::after { display: none !important; }

@media (min-width: 900px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: 64px; }
  .hero-title { font-size: clamp(3.6rem, 6.1vw, 5.6rem); }
  .photo-hero { aspect-ratio: 4 / 5; }
  .photo-hero .photo-ph-dark { justify-content: flex-start; padding-top: 16%; }
  .bautafel {
    position: absolute; right: -28px; bottom: -64px;
    width: min(370px, 78%); margin: 0;
  }
}

/* ---------- Highlights ---------- */
.highlights { background: var(--slate); color: var(--white); padding: 48px 0; margin-top: 72px; }
@media (min-width: 900px) { .highlights { margin-top: 120px; padding: 64px 0; } }
.hl-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 32px 20px; }
@media (min-width: 900px) { .hl-list { grid-template-columns: repeat(4, 1fr); } }
.hl-list li { display: flex; flex-direction: column; gap: 10px; padding-left: 18px; border-left: 2px solid rgba(255,255,255,.18); }
.hl-num {
  font-size: clamp(3.4rem, 9vw, 5.8rem); line-height: .9;
  font-weight: 800; font-stretch: 125%;
  color: var(--signal); font-variant-numeric: tabular-nums;
}
.hl-text { color: #c3ced6; font-size: .98rem; line-height: 1.4; }
.hl-text strong { display: block; color: var(--white); font-size: 1.08rem; font-weight: 650; }

/* Scroll-Fortschritt im Header */
.scroll-progress {
  position: absolute; left: 0; right: 0; bottom: -1px; height: 3px;
  background: var(--blue);
  transform-origin: 0 50%;
  transform: scaleX(var(--progress, 0));
  pointer-events: none;
}
.site-header { transition: box-shadow .3s; }
.site-header.is-scrolled { box-shadow: 0 8px 24px -16px rgba(28, 42, 53, .35); }

/* Buttons: Füllung fährt beim Hover ein */
.btn { position: relative; isolation: isolate; overflow: hidden; }
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  transform: translateX(-101%);
  transition: transform .45s var(--ease-out);
}
.btn-primary::before { background: var(--slate); }
.btn-primary:hover { background: var(--blue); }
.btn-light::before { background: var(--mist); }
.btn-light:hover { background: var(--white); }
.btn-quiet::before { background: var(--mist); }
.btn:hover::before { transform: translateX(0); }
.btn:active { transform: scale(.98); }

/* Laufband Zielgruppe */
.ticker {
  overflow: hidden;
  background: var(--signal);
  color: var(--slate);
}
.ticker-track { display: flex; width: max-content; padding: 18px 0; }
.ticker-track span {
  display: inline-flex; align-items: center; gap: 28px;
  padding-right: 28px;
  font-stretch: var(--wide); font-weight: 650;
  font-size: clamp(1.05rem, 2.2vw, 1.35rem);
  white-space: nowrap;
}
.ticker-track span::after {
  content: ""; width: 9px; height: 9px; background: var(--slate); border-radius: 2px; transform: rotate(45deg);
}
#ausstattung { padding-top: 72px; }

/* Belegungsanzeige im Planer */
.occupancy {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
  margin-top: 24px;
}
.occ-room {
  display: flex; flex-direction: column; gap: 12px; align-items: flex-start;
  padding: 12px; border-radius: 10px;
  background: var(--mist);
  transition: background-color .3s;
}
@media (max-width: 479px) {
  .occupancy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.occ-room.is-b { background: #dce7ef; }
.occ-label { font-size: .8rem; color: var(--text-soft); line-height: 1.2; }
.occ-slots { position: relative; display: flex; gap: 6px; height: 34px; align-items: flex-end; }
.occ-p {
  position: relative; width: 18px; height: 22px;
  background: var(--slate); border-radius: 9px 9px 3px 3px;
  transform-origin: 50% 100%;
  transition: transform .45s var(--ease-spring), opacity .3s;
}
.occ-p::before {
  content: ""; position: absolute; left: 50%; top: -12px; width: 11px; height: 11px;
  transform: translateX(-50%); border-radius: 50%; background: inherit;
}
.occ-desk {
  position: absolute; left: 22px; bottom: -2px;
  width: 26px; height: 26px; color: var(--blue);
  transform: scale(0) rotate(-20deg); opacity: 0;
  transition: transform .45s var(--ease-spring), opacity .3s;
}
.occ-room.is-b .occ-swap { transform: scale(0); opacity: 0; }
.occ-room.is-b .occ-desk { transform: none; opacity: 1; transition-delay: .12s; }
.planner-sum { display: inline-block; }
.planner-sum.is-bump { animation: bump .45s var(--ease-spring); }

/* Galerie: Bild zoomt leicht */
.g-item .photo img { transition: transform .8s var(--ease-out); }
.g-item:hover .photo img { transform: scale(1.05); }
.g-item:hover .photo { opacity: 1; }
.g-item .photo-ph .icon { transition: transform .5s var(--ease-spring); }
.g-item:hover .photo-ph .icon { transform: scale(1.15); }

/* Karte: Pin mit Puls */
.pin { position: relative; display: inline-flex; color: var(--blue); }
.pin .icon { width: 2.6em; height: 2.6em; position: relative; z-index: 1; }
.pin::after {
  content: ""; position: absolute; left: 50%; bottom: -2px; width: 22px; height: 8px;
  margin-left: -11px; border-radius: 50%; background: rgba(10, 90, 140, .35);
}

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

  /* Seitenstart: Überschrift fährt zeilenweise hoch */
  .js .hero-title .line > span { transform: translateY(110%); animation: rise 1s var(--ease-out) forwards; }
  .js .hero-title .line:nth-child(2) > span { animation-delay: .08s; }
  .js .hero-title .line:nth-child(3) > span { animation-delay: .16s; }
  .js .hero-place, .js .hero-sub, .js .hero-text, .js .hero-actions {
    opacity: 0; animation: fadeUp .9s var(--ease-out) forwards;
  }
  .js .hero-place { animation-delay: .35s; }
  .js .hero-sub { animation-delay: .45s; }
  .js .hero-text { animation-delay: .55s; }
  .js .hero-actions { animation-delay: .65s; }

  /* Bautafel wird montiert und dann beschriftet */
  .js .bautafel { opacity: 0; animation: mount 1s var(--ease-out) .25s forwards; transform-origin: 50% 0; }
  .js .bautafel-title { clip-path: inset(0 100% 0 0); animation: letter .7s var(--ease-out) .75s forwards; }
  .js .bautafel-head { border-bottom-color: transparent; position: relative; }
  .js .bautafel-head::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
    background: rgba(255,255,255,.85); transform: scaleX(0); transform-origin: 0 50%;
    animation: draw .7s var(--ease-out) .8s forwards;
  }
  .js .bautafel-rows dt { opacity: 0; animation: fade .4s ease calc(.95s + var(--i) * .12s) forwards; }
  .js .bautafel-rows dd { clip-path: inset(0 100% 0 0); animation: letter .6s var(--ease-out) calc(1s + var(--i) * .12s) forwards; }
  .js .bolt { transform: scale(0); animation: pop .4s var(--ease-spring) forwards; }
  .js .bolt-tl { animation-delay: .9s; }
  .js .bolt-tr { animation-delay: 1s; }
  .js .bolt-bl { animation-delay: 1.1s; }
  .js .bolt-br { animation-delay: 1.2s; }

  /* Laufband */
  .ticker-track { animation: marquee 38s linear infinite; }
  .ticker:hover .ticker-track { animation-play-state: paused; }

  /* Beim Scrollen einblenden */
  .js [data-reveal] {
    opacity: 0; transform: translateY(32px);
    transition: opacity .9s var(--ease-out), transform .9s var(--ease-out);
    transition-delay: calc(var(--d, 0) * 70ms);
  }
  .js [data-reveal="mask"] {
    opacity: 1; transform: none;
    clip-path: inset(0 0 100% 0); translate: 0 .5em;
    transition: clip-path 1.1s var(--ease-out), translate 1.1s var(--ease-out);
  }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js [data-reveal="mask"].is-in { clip-path: inset(0 0 -20% 0); translate: 0 0; }

  /* Linien zeichnen sich */
  .js .feature-list li, .js .check-list li, .js .benefits > div, .js .drive > div { border-bottom-color: transparent; position: relative; }
  .js .feature-list li::after, .js .check-list li::after, .js .benefits > div::after, .js .drive > div::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--line);
    transform: scaleX(0); transform-origin: 0 50%;
    transition: transform 1.1s var(--ease-out) calc(var(--d, 0) * 70ms + .15s);
  }
  .js .feature-list li.is-in::after, .js .check-list li.is-in::after,
  .js .benefits > div.is-in::after, .js .drive > div.is-in::after { transform: scaleX(1); }
  .js .feature-list li .icon {
    transform: scale(.4) rotate(-25deg); opacity: 0;
    transition: transform .6s var(--ease-spring) calc(var(--d, 0) * 70ms + .2s), opacity .3s calc(var(--d, 0) * 70ms + .2s);
  }
  .js .feature-list li.is-in .icon { transform: none; opacity: 1; }

  /* Hero-Foto öffnet sich beim Scrollen (moderne Browser) */
  .js .photo-hero { clip-path: inset(100% 0 0 0 round 14px); animation: unveil 1.2s var(--ease-out) .15s forwards; }
  .js .photo-hero img, .js .photo-hero .photo-ph { transform: scale(1.15); animation: settleIn 1.6s var(--ease-out) .15s forwards; }
  .js .hero-badge { opacity: 0; animation: fadeUp .7s var(--ease-out) .05s forwards; }
  .hero-badge .dot { animation: pulseGreen 2s ease-out 1s 4; }
  .js .hl-list li { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); transition-delay: calc(var(--d, 0) * 110ms); }
  .js .hl-list li.is-in { opacity: 1; transform: none; }

  /* Karte */
  .js .map.is-in .pin .icon { animation: drop .8s var(--ease-spring) .3s both; }
  .js .map.is-in .pin::after { animation: pulse 2.4s ease-out 1.1s infinite; }

  /* Lightbox */
  .lightbox[open] { animation: fade .3s ease; }
  .lightbox[open] .lb-figure { animation: zoomIn .45s var(--ease-out); }

  /* Formular-Rückmeldung */
  .form-status:not(:empty) { animation: fadeUp .5s var(--ease-out); }
}

@keyframes rise { to { transform: translateY(0); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes mount { from { opacity: 0; transform: translateY(40px) rotate(-2deg) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes letter { to { clip-path: inset(0 0 0 0); } }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes pop { to { transform: scale(1); } }
@keyframes bump { 40% { transform: scale(1.05); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes openUp { from { clip-path: inset(6% 5% 0 5% round 28px); } to { clip-path: inset(0 0 0 0 round 14px); } }
@keyframes settle { from { transform: scale(1.14); } to { transform: scale(1); } }
@keyframes drop { 0% { transform: translateY(-60px); opacity: 0; } 60% { opacity: 1; } 100% { transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(10,90,140,.35); } 100% { box-shadow: 0 0 0 26px rgba(10,90,140,0); } }
@keyframes unveil { to { clip-path: inset(0 0 0 0 round 14px); } }
@keyframes settleIn { to { transform: scale(1); } }
@keyframes pulseGreen { 0% { box-shadow: 0 0 0 0 rgba(30,138,76,.5); } 100% { box-shadow: 0 0 0 10px rgba(30,138,76,0); } }
@keyframes zoomIn { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }

@media (max-width: 480px) { .bautafel { padding: 22px 18px 18px; } .bautafel-rows > div { grid-template-columns: 5.4em 1fr; } }
