/* LB Living – Motion v4: wie v3, aber auf flüssige 60/120 fps (iPhone Safari) optimiert.
   v4: Animiert werden ausschließlich transform und opacity (kein clip-path, filter, box-shadow,
   backdrop-filter; Hover-Unterstreichungen nur auf Desktop). Vorhänge = deckende Ebenen, die per transform weggleiten.
   Alles Ausblenden geschieht nur unter html.js-motion (gesetzt von assets/js/motion.js).
   Ohne JS und bei "Bewegung reduzieren" sind alle Inhalte sofort und vollständig sichtbar.
   (v3-Kommentar: früher auch clip-path – in v4 entfernt.) */

:root {
  --ease-calm: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-reveal: 1s;
}

/* ——— Goldene Linie unter Abschnittsüberschriften (ohne JS: vollständig sichtbar) ——— */
.section-head h2,
.tip-band h2 { position: relative; }

.section-head h2::after,
.tip-band h2::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -0.6rem;
  width: 56px;
  height: 1px;
  margin-left: -28px;
  background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent);
  opacity: 0.9;
  transform-origin: center;
}

/* Wort-Masken (nur vorhanden, wenn JS die Überschrift aufgeteilt hat) */
.lb-w {
  display: inline-block;
  vertical-align: top;
  overflow: hidden;
  padding: 0.05em 0.08em 0.22em;
  margin: -0.05em -0.08em -0.22em;
}
.lb-w > span { display: inline-block; }
.lb-shine-wrap.lb-hero-logo-wrap { width: min(200px, 52vw); margin: 0 auto 1.75rem; }
.lb-shine-wrap .hero-logo { width: 100%; margin: 0; }

/* Objekt-Übersicht: Platz für die nachgeladenen Karten reservieren (verhindert Springen des Footers) */
main[data-objekte-root] > .section [data-objekte-list] { min-height: 60vh; }

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

  @keyframes lb-rise {
    from { opacity: 0; transform: translate3d(0, 26px, 0); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes lb-fade { from { opacity: 0; } to { opacity: 1; } }
  @keyframes lb-draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  @keyframes lb-word {
    from { transform: translate3d(0, 115%, 0) rotate(2deg); }
    to   { transform: none; }
  }
  @keyframes lb-logo-in {
    from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.94); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes lb-shine {
    from { transform: translate3d(-120%, 0, 0) skewX(-18deg); }
    to   { transform: translate3d(260%, 0, 0) skewX(-18deg); }
  }
  @keyframes lb-nav-in {
    from { opacity: 0; transform: translate3d(0, -10px, 0); }
    to   { opacity: 1; transform: none; }
  }

  /* ——— Seitenvorhang beim ersten Besuch (max. ~1 s, überspringbar) ——— */
  /* Sofort-Abdeckung bis das Vorhang-Element existiert; löst sich notfalls von selbst. */
  @keyframes lb-veil-safety { 0%, 85% { opacity: 1; } 100% { opacity: 0; visibility: hidden; } }
  html.lb-veil-on:not(.lb-veil-ready) body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: #111;
    animation: lb-veil-safety 2.6s linear both;
    pointer-events: none;
  }
  .lb-veil {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    background: #111;
    cursor: pointer;
    transition: transform 1s var(--ease-io);
    animation: lb-veil-safety 3.2s linear both;
    will-change: transform;
    contain: strict;
  }
  .lb-veil::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.6;
  }
  .lb-veil-logo {
    position: relative;
    width: min(170px, 46vw);
    animation: lb-logo-in 0.75s var(--ease-out) both;
  }
  .lb-veil-logo img { width: 100%; height: auto; }
  .lb-veil-line {
    width: 120px;
    height: 1px;
    background: var(--gold);
    transform-origin: left center;
    animation: lb-draw 0.7s var(--ease-io) 0.15s both;
  }
  .lb-veil.is-leaving { transform: translate3d(0, -101%, 0); pointer-events: none; }
  .lb-veil.is-leaving .lb-veil-logo { transform: translate3d(0, -30px, 0); opacity: 0; transition: transform 0.8s var(--ease-io), opacity 0.45s var(--ease-soft); }

  /* ——— Glanz-Streifen (Logo im Hero und im Vorhang) ——— */
  .lb-shine-wrap { position: relative; display: block; }
  .lb-shine {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    -webkit-mask: var(--lb-logo) center / contain no-repeat;
    mask: var(--lb-logo) center / contain no-repeat;
  }
  .lb-shine::before {
    content: "";
    position: absolute;
    top: -10%; bottom: -10%;
    left: 0;
    width: 38%;
    background: linear-gradient(90deg, rgba(255, 244, 214, 0) 0%, rgba(255, 244, 214, 0.95) 50%, rgba(255, 244, 214, 0) 100%);
    transform: translate3d(-120%, 0, 0) skewX(-18deg);
  }
  .lb-veil .lb-shine::before { animation: lb-shine 1s var(--ease-io) 0.25s both; }
  .lb-intro .hero .lb-shine::before { animation: lb-shine 1.6s var(--ease-io) 1.05s both; }

  /* ——— Hero: filmischer Einstieg ——— */
  .js-motion .hero { overflow: hidden; }
  .js-motion .hero-inner { position: relative; z-index: 1; will-change: transform, opacity; }

  .js-motion .hero-logo,
  .js-motion .hero .lb-shine-wrap,
  .js-motion .hero-sub,
  .js-motion .hero .btn-row,
  .js-motion .hero-rule,
  .js-motion .hero .lb-w > span,
  .js-motion .hero::after,
  .js-motion .lb-hero-fx,
  .js-motion .lb-scroll,
  .js-motion .page-hero .eyebrow,
  .js-motion .page-hero h1,
  .js-motion .page-hero-lead,
  .js-motion .legal-page > .container > .eyebrow,
  .js-motion .legal-page > .container > h1,
  .js-motion .legal-page > .container > .meta {
    animation-fill-mode: both;
    animation-play-state: paused;
  }
  .js-motion.lb-intro :is(.hero-logo, .hero .lb-shine-wrap, .hero-sub, .hero .btn-row, .hero-rule, .hero .lb-w > span,
    .lb-hero-fx, .lb-scroll, .page-hero .eyebrow, .page-hero h1, .page-hero-lead,
    .legal-page > .container > .eyebrow, .legal-page > .container > h1, .legal-page > .container > .meta),
  .js-motion.lb-intro .hero::after { animation-play-state: running; }

  .js-motion .hero .lb-shine-wrap { animation-name: lb-logo-in; animation-duration: 1.3s; animation-timing-function: var(--ease-out); animation-delay: 0.05s; }
  .js-motion .hero .lb-shine-wrap .hero-logo { animation: none; }
  .js-motion .hero-logo { animation-name: lb-logo-in; animation-duration: 1.3s; animation-timing-function: var(--ease-out); animation-delay: 0.05s; }
  .js-motion .hero-rule { transform-origin: center; animation-name: lb-draw; animation-duration: 1.1s; animation-timing-function: var(--ease-io); animation-delay: 0.55s; }
  .js-motion .hero .lb-w > span {
    animation-name: lb-word;
    animation-duration: 1.25s;
    animation-timing-function: var(--ease-out);
    animation-delay: calc(0.7s + var(--i, 0) * 75ms);
  }
  .js-motion .hero-claim:not(.lb-split) { animation: lb-rise 1s var(--ease-out) 0.7s both; }
  .js-motion .hero-sub { animation-name: lb-rise; animation-duration: 1.1s; animation-timing-function: var(--ease-out); animation-delay: 1.35s; }
  .js-motion .hero .btn-row { animation-name: lb-rise; animation-duration: 1.1s; animation-timing-function: var(--ease-out); animation-delay: 1.55s; }
  .js-motion .hero::after { transform-origin: center; animation-name: lb-draw; animation-duration: 1.6s; animation-timing-function: var(--ease-io); animation-delay: 1.2s; }
  .js-motion .lb-hero-fx { animation-name: lb-fade; animation-duration: 2.4s; animation-timing-function: var(--ease-soft); animation-delay: 0.2s; }
  .js-motion .lb-scroll { animation-name: lb-fade; animation-duration: 1.2s; animation-timing-function: var(--ease-soft); animation-delay: 2.1s; }

  /* Unterseiten-Kopf */
  .js-motion .page-hero .eyebrow,
  .js-motion .legal-page > .container > .eyebrow { animation-name: lb-rise; animation-duration: 1s; animation-timing-function: var(--ease-out); animation-delay: 0.1s; }
  .js-motion .page-hero h1.lb-split,
  .js-motion .legal-page > .container > h1.lb-split { animation: none; }
  .js-motion .page-hero h1:not(.lb-split),
  .js-motion .legal-page > .container > h1:not(.lb-split) { animation-name: lb-rise; animation-duration: 1s; animation-timing-function: var(--ease-out); animation-delay: 0.2s; }
  .js-motion :is(.page-hero, .legal-page) h1 .lb-w > span {
    animation: lb-word 1.15s var(--ease-out) calc(0.22s + var(--i, 0) * 70ms) both paused;
  }
  .js-motion.lb-intro :is(.page-hero, .legal-page) h1 .lb-w > span { animation-play-state: running; }
  .js-motion .page-hero-lead,
  .js-motion .legal-page > .container > .meta { animation-name: lb-rise; animation-duration: 1s; animation-timing-function: var(--ease-out); animation-delay: 0.6s; }

  .js-motion .page-hero { position: relative; overflow: hidden; }
  .js-motion .page-hero > .container { position: relative; z-index: 1; }

  /* Navigation beim Laden gestaffelt */
  .js-motion .site-header .nav-logo,
  .js-motion .site-header .nav-links > li,
  .js-motion .site-header .nav-toggle { animation: lb-nav-in 0.9s var(--ease-out) both paused; }
  .js-motion.lb-intro .site-header .nav-logo,
  .js-motion.lb-intro .site-header .nav-links > li,
  .js-motion.lb-intro .site-header .nav-toggle { animation-play-state: running; }
  .js-motion .site-header .nav-links > li:nth-child(1) { animation-delay: 0.25s; }
  .js-motion .site-header .nav-links > li:nth-child(2) { animation-delay: 0.32s; }
  .js-motion .site-header .nav-links > li:nth-child(3) { animation-delay: 0.39s; }
  .js-motion .site-header .nav-links > li:nth-child(4) { animation-delay: 0.46s; }
  .js-motion .site-header .nav-links > li:nth-child(5) { animation-delay: 0.53s; }
  .js-motion .site-header .nav-toggle { animation-delay: 0.3s; }

  /* ——— Hero-Hintergrund: langsam treibendes Goldlicht + feine Partikel ——— */
  .lb-hero-fx {
    position: absolute;
    inset: -10% 0 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
  }
  .lb-hero-fx-inner { position: absolute; inset: 0; will-change: transform; }
  .lb-glow {
    position: absolute;
    border-radius: 50%;
    will-change: transform;
  }
  .lb-glow.g1 {
    width: 70vmax; height: 70vmax;
    left: 50%; top: 38%;
    margin: -35vmax 0 0 -35vmax;
    background: radial-gradient(closest-side, rgba(201, 169, 97, 0.13) 0%, rgba(201, 169, 97, 0.075) 30%, rgba(201, 169, 97, 0.03) 58%, rgba(201, 169, 97, 0.008) 80%, rgba(201, 169, 97, 0) 100%);
    animation: lb-drift-a 24s ease-in-out infinite alternate;
  }
  .lb-glow.g2 {
    width: 46vmax; height: 46vmax;
    left: 12%; top: 85%;
    margin: -23vmax 0 0 -23vmax;
    background: radial-gradient(closest-side, rgba(201, 169, 97, 0.08) 0%, rgba(201, 169, 97, 0.03) 50%, rgba(201, 169, 97, 0) 100%);
    animation: lb-drift-b 30s ease-in-out infinite alternate;
  }
  .lb-glow.g3 {
    width: 40vmax; height: 40vmax;
    left: 92%; top: 10%;
    margin: -20vmax 0 0 -20vmax;
    background: radial-gradient(closest-side, rgba(255, 236, 190, 0.05) 0%, rgba(255, 236, 190, 0.02) 50%, rgba(255, 236, 190, 0) 100%);
    animation: lb-drift-b 26s ease-in-out -8s infinite alternate-reverse;
  }
  @keyframes lb-drift-a {
    from { transform: translate3d(-6%, -3%, 0) scale(1); }
    to   { transform: translate3d(5%, 4%, 0) scale(1.14); }
  }
  @keyframes lb-drift-b {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to   { transform: translate3d(12%, -10%, 0) scale(1.2); }
  }
  .lb-p {
    position: absolute;
    left: var(--x, 50%);
    bottom: -4%;
    width: var(--s, 2px);
    height: var(--s, 2px);
    border-radius: 50%;
    background: #e3cb8f;
    box-shadow: 0 0 6px rgba(227, 203, 143, 0.7);
    opacity: 0;
    animation: lb-float var(--d, 14s) linear var(--delay, 0s) infinite;
    will-change: transform, opacity;
  }
  @keyframes lb-float {
    0%   { opacity: 0; transform: translate3d(0, 0, 0); }
    15%  { opacity: var(--o, 0.55); }
    80%  { opacity: calc(var(--o, 0.55) * 0.6); }
    100% { opacity: 0; transform: translate3d(var(--dx, 20px), -95vh, 0); }
  }
  /* Feine, langsam laufende Lichtkante oben im Hero */
  .lb-hero-fx::after {
    content: "";
    position: absolute;
    top: 10%; left: 0;
    width: 30%; height: 1px;
    background: linear-gradient(90deg, transparent, rgba(201, 169, 97, 0.35), transparent);
    animation: lb-glide 14s var(--ease-io) 3s infinite;
    transform: translate3d(-100%, 0, 0);
  }
  @keyframes lb-glide {
    0%   { transform: translate3d(-100%, 0, 0); opacity: 0; }
    10%  { opacity: 1; }
    45%  { transform: translate3d(340%, 0, 0); opacity: 0; }
    100% { transform: translate3d(340%, 0, 0); opacity: 0; }
  }

  /* ——— Scroll-Hinweis ——— */
  .lb-scroll {
    position: absolute;
    right: max(1.5rem, calc((100% - 1080px) / 2));
    top: min(calc(100vh - 7.5rem), calc(100% - 6.5rem));
    top: min(calc(100svh - 7.5rem), calc(100% - 6.5rem));
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    width: 5rem;
    color: rgba(247, 245, 240, 0.5);
    font-size: 0.6rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    text-indent: 0.32em;
    line-height: 1;
  }
  .lb-scroll > * { transition: opacity 0.5s var(--ease-soft); }
  .lb-scroll.is-gone { pointer-events: none; }
  .lb-scroll.is-gone > * { opacity: 0; }
  .lb-scroll:hover { color: var(--gold); }
  .lb-scroll-line {
    position: relative;
    width: 1px;
    height: 40px;
    overflow: hidden;
    background: rgba(201, 169, 97, 0.22);
  }
  .lb-scroll-line::after {
    content: "";
    position: absolute;
    left: 0; top: 0;
    width: 1px; height: 100%;
    background: linear-gradient(180deg, transparent, var(--gold));
    animation: lb-scroll-drop 2.2s var(--ease-io) infinite;
  }
  @keyframes lb-scroll-drop {
    0%   { transform: translate3d(0, -100%, 0); }
    60%  { transform: translate3d(0, 100%, 0); }
    100% { transform: translate3d(0, 100%, 0); }
  }
  @media (max-width: 900px) { .lb-scroll { display: none; } }

  /* ——— Header: oben transparent, beim Scrollen massiv mit Goldlinie ———
     v4: kein backdrop-filter, kein Farb-/Schatten-Übergang. Der Hintergrund liegt fertig gerendert
     in ::before und wird nur per opacity überblendet. */
  .js-motion .site-header {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom-color: transparent;
    transition: none;
  }
  .js-motion .site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(17, 17, 17, 0.97);
    border-bottom: 1px solid rgba(201, 169, 97, 0.3);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    opacity: 1;
    transition: opacity 0.6s var(--ease-soft);
    pointer-events: none;
  }
  .js-motion .site-header.is-top::before { opacity: 0; }
  .js-motion .site-header:not(.is-compact):not(.is-top)::before { box-shadow: none; }
  .site-header .nav-logo img { transform-origin: left center; transition: transform 0.7s var(--ease-out), opacity 0.3s var(--ease-soft); }
  .site-header.is-compact .nav-logo img { transform: scale(0.88); }
  .lb-progress {
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, rgba(201, 169, 97, 0.4), var(--gold));
    transform: scaleX(0);
    transform-origin: left center;
    pointer-events: none;
    will-change: transform;
  }

  /* v4: will-change nur während der Einblendung (Klasse lb-wc wird danach wieder entfernt) */
  .js-motion .lb-wc,
  .js-motion .lb-wc .lb-w > span,
  .js-motion .lb-wc .objekt-card-media img,
  .js-motion .lb-wc.portrait img,
  .js-motion .lb-wc.objekt-gallery-item img { will-change: transform, opacity; }

  /* ——— Einblenden beim Scrollen ——— */
  .js-motion :is(.service, .tip-band, .contact-block, .objekte-more, .objekte-filter, .objekt-card,
    .objekte-empty, .objekt-detail > *, .legal-box, .footer-grid > *) {
    transition:
      opacity var(--dur-reveal) var(--ease-out),
      transform var(--dur-reveal) var(--ease-out);
  }
  .js-motion :is(.service, .tip-band, .contact-block, .objekte-more, .objekte-filter,
    .objekte-empty, .objekt-detail > *, .legal-box):not(.is-visible) {
    opacity: 0;
    transform: translate3d(0, 44px, 0);
  }
  .js-motion .tip-band:not(.is-visible) { transform: translate3d(0, 48px, 0) scale(0.97); }
  .js-motion .footer-grid > *:not(.is-visible) { opacity: 0; transform: translate3d(0, 20px, 0); }

  /* Abschnittsköpfe: Elemente nacheinander (Eyebrow-Wischen, Worte, Text) */
  .js-motion .section-head > *,
  .js-motion .about-copy > * {
    transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  }
  .js-motion .section-head:not(.is-visible) > :not(h2):not(.eyebrow),
  .js-motion .about-copy:not(.is-visible) > :not(h2):not(.eyebrow):not(.divider) {
    opacity: 0;
    transform: translate3d(0, 24px, 0);
  }
  .js-motion :is(.section-head, .about-copy, .tip-band):not(.is-visible) .eyebrow {
    opacity: 0;
    transform: translate3d(-16px, 0, 0);
  }
  .js-motion :is(.section-head, .about-copy, .tip-band) .eyebrow { transition: opacity 0.9s var(--ease-out), transform 1s var(--ease-out); }
  .js-motion .section-head > :nth-child(3), .js-motion .about-copy > :nth-child(3) { transition-delay: 0.32s; }
  .js-motion .about-copy > :nth-child(4) { transition-delay: 0.4s; }
  .js-motion .about-copy > :nth-child(5) { transition-delay: 0.48s; }
  .js-motion .about-copy > :nth-child(6) { transition-delay: 0.56s; }
  .js-motion .about-copy > :nth-child(7) { transition-delay: 0.64s; }
  .js-motion .tip-band > p:not(.eyebrow) { transition: opacity 1s var(--ease-out) 0.35s, transform 1s var(--ease-out) 0.35s; }
  .js-motion .tip-band:not(.is-visible) > p:not(.eyebrow) { opacity: 0; transform: translate3d(0, 18px, 0); }

  /* Überschriften: Wort für Wort aus der Maske */
  .js-motion :is(.section-head, .about-copy, .tip-band) h2 .lb-w > span {
    transition: transform 1s var(--ease-out);
    transition-delay: calc(0.1s + min(var(--i, 0), 8) * 70ms);
  }
  .js-motion :is(.section-head, .about-copy, .tip-band):not(.is-visible) h2 .lb-w > span {
    transform: translate3d(0, 115%, 0) rotate(2deg);
  }

  /* Goldlinien zeichnen sich ein */
  .js-motion .section-head h2::after,
  .js-motion .tip-band h2::after,
  .js-motion .about-copy .divider {
    transform: scaleX(0);
    transition: transform 1.2s var(--ease-io) 0.45s;
  }
  .js-motion .about-copy .divider { transform-origin: left center; opacity: 1; clip-path: none; }
  .js-motion .section-head.is-visible h2::after,
  .js-motion .tip-band.is-visible h2::after,
  .js-motion .about-copy.is-visible .divider { transform: scaleX(1); }

  /* Leistungen: Goldlinie läuft über jede Spalte, Nummer steigt auf */
  .js-motion .service { position: relative; }
  .js-motion .service::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -1px;
    height: 1px;
    background: var(--gold);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 1.3s var(--ease-io) 0.3s;
  }
  .js-motion .service.is-visible::before { transform: scaleX(1); }
  .js-motion .service .service-num { transition: opacity 0.9s var(--ease-out) 0.3s, transform 1s var(--ease-out) 0.3s; }
  .js-motion .service:not(.is-visible) .service-num { opacity: 0; transform: translate3d(0, 0.6em, 0); }

  /* Tippgeber: Glanz läuft einmal über die goldene Oberkante */
  .js-motion .tip-band { position: relative; overflow: hidden; }
  .js-motion .tip-band::before {
    content: "";
    position: absolute;
    top: -2px; left: 0;
    width: 35%; height: 2px;
    background: linear-gradient(90deg, transparent, #fff3d6, transparent);
    transform: translate3d(-110%, 0, 0);
    pointer-events: none;
  }
  .js-motion .tip-band.is-visible::before { animation: lb-band-sweep 1.8s var(--ease-io) 0.7s both; }
  @keyframes lb-band-sweep { from { transform: translate3d(-110%, 0, 0); } to { transform: translate3d(400%, 0, 0); } }

  /* Porträt: Vorhang öffnet sich, Bild setzt sich (Zoom), Goldrahmen gleitet nach */
  .js-motion .portrait { transform: translate3d(0, var(--py, 0px), 0); }
  .lb-fine .portrait { will-change: transform; }
  /* Vorhang: deckende Fläche in Seitenfarbe, gleitet per scaleX nach rechts weg */
  .js-motion .portrait::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    background: var(--cream);
    transform-origin: right center;
    transition: transform 1.1s var(--ease-io);
    pointer-events: none;
  }
  .js-motion .portrait.is-visible::before { transform: scaleX(0); }
  .js-motion .portrait.is-settled::before { visibility: hidden; }
  .js-motion .portrait img { transition: transform 1.6s var(--ease-out); }
  .js-motion .portrait:not(.is-visible) img { transform: scale(1.12); }
  .js-motion .portrait::after { transition: transform 1.1s var(--ease-out) 0.6s, opacity 1.1s var(--ease-out) 0.6s; }
  .js-motion .portrait:not(.is-visible)::after { transform: translate3d(-1.1rem, -1.1rem, 0); opacity: 0; }

  /* ——— Objektkarten: gestaffelter Auftritt + Bild-Vorhang ——— */
  .js-motion .objekt-card {
    --rx: 0deg; --ry: 0deg; --lift: 0px;
    transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry)) translate3d(0, var(--lift), 0) scale(var(--press, 1));
  }
  .js-motion .objekt-card:not(.is-visible) {
    opacity: 0;
    transform: perspective(1000px) rotateX(0deg) rotateY(0deg) translate3d(0, 64px, 0) scale(0.96);
  }
  /* Bild-Vorhang: Fläche in Platzhalterfarbe schrumpft nach oben (scaleY), Bild setzt sich */
  .js-motion .objekt-card .objekt-card-media::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--cream-deep);
    transform-origin: center top;
    transition: transform 1.1s var(--ease-io) 0.15s;
    pointer-events: none;
  }
  .js-motion .objekt-card.is-visible .objekt-card-media::after { transform: scaleY(0); }
  .js-motion .objekt-card.is-settled .objekt-card-media::after { visibility: hidden; }
  .js-motion .objekt-card .objekt-card-media img { transition: transform 1.6s var(--ease-out) 0.15s; }
  .js-motion .objekt-card:not(.is-visible) .objekt-card-media img { transform: scale(1.14); }
  .js-motion .objekt-card .objekt-card-body > * { transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out), color 0.45s var(--ease-soft); }
  .js-motion .objekt-card.is-settled .objekt-card-body > * { transition-delay: 0s !important; }
  .js-motion .objekt-card .objekt-card-body > :nth-child(1) { transition-delay: 0.36s; }
  .js-motion .objekt-card .objekt-card-body > :nth-child(2) { transition-delay: 0.44s; }
  .js-motion .objekt-card .objekt-card-body > :nth-child(3) { transition-delay: 0.52s; }
  .js-motion .objekt-card .objekt-card-body > :nth-child(n+4) { transition-delay: 0.6s; }
  .js-motion .objekt-card:not(.is-visible) .objekt-card-body > * { opacity: 0; transform: translate3d(0, 14px, 0); }
  .js-motion .objekt-card.is-settled .objekt-card-media img { transition: transform 1s var(--ease-out); }
  .js-motion .objekt-card.is-settled { transition: opacity 0.6s var(--ease-out), transform 0.8s var(--ease-out); }

  /* Galerie im Exposé: Vorhang beim Hineinscrollen */
  /* (Maske liegt auf dem Bild, nicht auf dem beobachteten Element – sonst meldet der IntersectionObserver nie Sichtbarkeit) */
  .js-motion .objekt-gallery-item { position: relative; }
  .js-motion .objekt-gallery-item::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: var(--cream-deep);
    transform-origin: center bottom;
    transition: transform 1.1s var(--ease-io);
    pointer-events: none;
  }
  .js-motion .objekt-gallery-item.is-visible::after { transform: scaleY(0); }
  .js-motion .objekt-gallery-item.is-settled::after { visibility: hidden; }
  .js-motion .objekt-gallery-item img { transition: transform 1.6s var(--ease-out); }
  .js-motion .objekt-gallery-item:not(.is-visible) img { transform: scale(1.1); }
  .js-motion .objekt-gallery-item > figcaption { transition: opacity 0.9s var(--ease-out) 0.6s; }
  .js-motion .objekt-gallery-item:not(.is-visible) > figcaption { opacity: 0; }

  /* ——— Buttons: Goldfüllung wischt hinein, feiner Glanz ——— */
  .btn, .nav-cta {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    transition:
      background-color 0.5s var(--ease-soft),
      color 0.5s var(--ease-soft),
      border-color 0.5s var(--ease-soft),
      transform 0.6s var(--ease-out);
  }
  .btn::before, .nav-cta::before {
    content: "";
    position: absolute;
    inset: -1px;
    z-index: -1;
    transform: scaleX(0);
    transform-origin: right center;
    transition: transform 0.65s var(--ease-io);
  }
  .btn-primary::before { background: var(--ink); }
  .btn-ghost::before, .nav-cta::before { background: var(--gold); }
  .btn::after {
    content: "";
    position: absolute;
    top: 0; bottom: 0; left: 0;
    width: 40%;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 248, 230, 0), rgba(255, 248, 230, 0.55), rgba(255, 248, 230, 0));
    transform: translate3d(-130%, 0, 0) skewX(-20deg);
    pointer-events: none;
  }

  @media (hover: hover) {
    .btn:hover::before, .btn:focus-visible::before,
    .nav-cta:hover::before, .nav-cta:focus-visible::before {
      transform: scaleX(1);
      transform-origin: left center;
    }
    .btn-primary:hover, .btn-primary:focus-visible {
      background: var(--gold);
      color: var(--gold);
    }
    .btn-ghost:hover, .btn-ghost:focus-visible,
    .hero .btn-ghost:hover, .hero .btn-ghost:focus-visible {
      color: var(--ink);
      border-color: var(--gold);
      background: transparent;
    }
    .nav-cta:hover { background: transparent; color: var(--ink) !important; }
    .btn-ghost:hover::after { animation: lb-btn-shine 0.9s var(--ease-io) 0.25s both; }
    @keyframes lb-btn-shine {
      from { transform: translate3d(-130%, 0, 0) skewX(-20deg); }
      to   { transform: translate3d(330%, 0, 0) skewX(-20deg); }
    }
    .social-link:hover { transform: translate3d(0, -2px, 0); }
  }
  .social-link { transition: color 0.45s var(--ease-soft), border-color 0.45s var(--ease-soft), transform 0.5s var(--ease-out); }

  /* Magnetischer Effekt (nur feine Zeiger, per JS gesetzt) */
  .lb-fine .btn, .lb-fine .nav-cta { transform: translate3d(var(--mx, 0px), var(--my, 0px), 0); }
  .lb-fine .btn:hover { transform: translate3d(var(--mx, 0px), calc(var(--my, 0px) - 2px), 0); }
  .btn:active { transform: translate3d(0, 0, 0) scale(0.98); transition-duration: 0.15s; }

  .objekte-filter-btn { transition: background-color 0.45s var(--ease-soft), color 0.45s var(--ease-soft), border-color 0.45s var(--ease-soft), transform 0.5s var(--ease-out); }
  @media (hover: hover) { .objekte-filter-btn:hover { transform: translate3d(0, -2px, 0); } }

  /* ——— Objektkarten-Hover: Anheben, Neigen, Bild-Zoom, Goldrahmen zeichnet sich ——— */
  .objekt-card { position: relative; }
  .objekt-card-link { position: relative; display: inline-block; align-self: flex-start; transition: color 0.45s var(--ease-soft), transform 0.6s var(--ease-out); }
  .objekt-card-link::after {
    content: "→";
    display: inline-block;
    margin-left: 0.6em;
    transition: transform 0.6s var(--ease-out);
  }
  @media (hover: hover) {
    a.objekt-card::before,
    a.objekt-card::after {
      content: "";
      position: absolute;
      inset: 0;
      z-index: 3;
      pointer-events: none;
      transition: transform 0.75s var(--ease-io);
    }
    a.objekt-card::before { border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: scaleX(0); }
    a.objekt-card::after { border-left: 1px solid var(--gold); border-right: 1px solid var(--gold); transform: scaleY(0); transition-delay: 0.12s; }
    a.objekt-card:hover::before { transform: scaleX(1); }
    a.objekt-card:hover::after { transform: scaleY(1); }

    .js-motion a.objekt-card.is-visible:hover { --lift: -8px; }
    a.objekt-card:hover { border-color: rgba(201, 169, 97, 0.5); }
    .js-motion a.objekt-card.is-visible:hover .objekt-card-media img,
    a.objekt-card:hover .objekt-card-media img { transform: scale(1.07); }
    a.objekt-card:hover .objekt-card-link { color: var(--ink); }
    a.objekt-card:hover .objekt-card-link::after { transform: translate3d(6px, 0, 0); }

    .objekt-gallery-item img { transition: transform 1s var(--ease-out); }
    .js-motion .objekt-gallery-item.is-visible:hover img,
    .objekt-gallery-item:hover img { transform: scale(1.04); }
  }
  a.objekt-card:focus-visible {
    border-color: rgba(201, 169, 97, 0.7);
    box-shadow: 0 0 0 1px rgba(201, 169, 97, 0.45), 0 0 26px rgba(201, 169, 97, 0.18);
  }

  .footer-col a, .footer-bottom a, .legal-box a:not(.btn), .objekt-detail-copy a, .objekt-detail-aside a:not(.btn) { padding-bottom: 1px; }
  /* ——— Goldene Unterstreichung für Textlinks (nur Geräte mit Hover) ——— */
  @media (hover: hover) {
  .footer-col a, .footer-bottom a, .legal-box a:not(.btn), .objekt-detail-copy a, .objekt-detail-aside a:not(.btn) {
    background-image: linear-gradient(var(--gold), var(--gold));
    background-repeat: no-repeat;
    background-position: 100% 100%;
    background-size: 0% 1px;
    padding-bottom: 1px;
    transition: color 0.45s var(--ease-soft), background-size 0.6s var(--ease-io);
  }
  .footer-col a:hover, .footer-bottom a:hover, .legal-box a:not(.btn):hover, .objekt-detail-copy a:hover,
  .objekt-detail-aside a:not(.btn):hover, .footer-col a:focus-visible, .legal-box a:not(.btn):focus-visible {
    background-size: 100% 1px;
    background-position: 0 100%;
  }
  .contact-mail {
    background-image: linear-gradient(var(--gold), var(--gold));
    background-repeat: no-repeat;
    background-position: 100% 100%;
    background-size: 0% 1px;
    transition: color 0.45s var(--ease-soft), background-size 0.7s var(--ease-io), border-color 0.45s var(--ease-soft);
  }
  .contact-mail:hover { background-size: 100% 1px; background-position: 0 100%; }
  }

  /* Navigation (Desktop): Linie wächst von der Mitte */
  @media (min-width: 901px) {
    .nav-links a:not(.nav-cta) { position: relative; transition: color 0.45s var(--ease-soft); }
    .nav-links a:not(.nav-cta)::after {
      content: "";
      position: absolute;
      left: 0; right: 0; bottom: -6px;
      height: 1px;
      background: var(--gold);
      transform: scaleX(0);
      transform-origin: center;
      transition: transform 0.6s var(--ease-out);
    }
    .nav-links a:not(.nav-cta):hover::after,
    .nav-links a:not(.nav-cta):focus-visible::after,
    .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
  }

  /* Mobiles Menü: Vorhang von oben, Einträge gestaffelt */
  @media (max-width: 900px) {
    .nav-links.is-open { animation: lb-menu 0.5s var(--ease-out) both; }
    @keyframes lb-menu {
      from { opacity: 0; transform: translate3d(0, -14px, 0); }
      to   { opacity: 1; transform: none; }
    }
    .nav-links.is-open > li { animation: lb-menu-item 0.7s var(--ease-out) both; }
    .js-motion.lb-intro .site-header .nav-links.is-open > li { animation: lb-menu-item 0.7s var(--ease-out) both; }
    .nav-links.is-open > li:nth-child(1) { animation-delay: 0.12s !important; }
    .nav-links.is-open > li:nth-child(2) { animation-delay: 0.18s !important; }
    .nav-links.is-open > li:nth-child(3) { animation-delay: 0.24s !important; }
    .nav-links.is-open > li:nth-child(4) { animation-delay: 0.30s !important; }
    .nav-links.is-open > li:nth-child(5) { animation-delay: 0.36s !important; }
    @keyframes lb-menu-item {
      from { opacity: 0; transform: translate3d(-18px, 0, 0); }
      to   { opacity: 1; transform: none; }
    }
    .nav-toggle span { transition: transform 0.45s var(--ease-io), opacity 0.3s var(--ease-soft); }
  }
}

/* ═══════════ Motion v3: Handy / Touch (iPhone & Android) ═══════════ */

/* v4: kein backdrop-filter im Header (teuer beim Scrollen auf iOS) – fast deckender Hintergrund */
.site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(22, 22, 22, 0.97); }

/* Startbereich passt auf dem Handy komplett in den sichtbaren Bereich (iOS-Safari mit Leisten: ~390×660) */
@media (max-width: 560px) {
  .hero {
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: calc(var(--nav-h) + 0.75rem) 0 4.25rem;
    box-sizing: border-box;
  }
  .hero-logo,
  .lb-shine-wrap.lb-hero-logo-wrap { width: min(200px, 46vw, 18vh); width: min(200px, 46vw, 18svh); margin-bottom: 1.15rem; }
  .lb-shine-wrap.lb-hero-logo-wrap .hero-logo { width: 100%; margin: 0; }
  .hero-rule { margin-bottom: 1.15rem; }
  .hero-claim { margin-bottom: 1rem; }
  .hero-sub { font-size: 0.98rem; }
  .hero .btn-row { margin-top: 1.5rem; gap: 0.7rem; }
}
/* Kleine sichtbare Höhe (iPhone mit Safari-Leisten): Hinweis weglassen, Platz für die Buttons */
@media (max-width: 560px) and (max-height: 760px) {
  .hero { padding-bottom: 2.25rem; }
  .hero .btn-row { margin-top: 1.25rem; }
  .hero .btn { padding-top: 0.85rem; padding-bottom: 0.85rem; }
}

@media (prefers-reduced-motion: no-preference) and (hover: none) {
  @keyframes lb-word-m {
    0%   { transform: translate3d(0, 120%, 0) rotate(5deg); opacity: 0; }
    35%  { opacity: 1; }
    100% { transform: none; opacity: 1; }
  }
  @keyframes lb-rise-m {
    from { opacity: 0; transform: translate3d(0, 42px, 0) scale(0.96); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes lb-logo-m {
    0%   { opacity: 0; transform: translate3d(0, 22px, 0) scale(0.86); }
    100% { opacity: 1; transform: none; }
  }
  @keyframes lb-glow-in { from { opacity: 0; transform: scale(0.6); } to { opacity: 1; transform: none; } }

  /* Kräftigerer, aber ruhiger Einstieg */
  .js-motion .hero .lb-shine-wrap,
  .js-motion .hero-logo { animation-name: lb-logo-m; animation-duration: 1.4s; }
  .js-motion .hero .lb-shine-wrap .hero-logo { animation: none; }
  .js-motion .hero .lb-w > span { animation-name: lb-word-m; animation-duration: 1.05s; animation-delay: calc(0.6s + min(var(--i, 0), 8) * 80ms); }
  .js-motion .hero-sub { animation-name: lb-rise-m; animation-delay: 1.2s; }
  .js-motion .hero .btn-row { animation-name: lb-rise-m; animation-delay: 1.4s; }
  .js-motion .hero .btn-row > .btn:nth-child(2) { animation: lb-rise-m 1.1s var(--ease-out) 1.55s both paused; }
  .js-motion.lb-intro .hero .btn-row > .btn:nth-child(2) { animation-play-state: running; }
  .js-motion .lb-hero-fx { animation-duration: 1.8s; animation-delay: 0s; }

  /* Goldlicht auf dem kleinen Bildschirm etwas präsenter */
  .lb-glow.g1 {
    width: 120vmin; height: 120vmin; margin: -60vmin 0 0 -60vmin; top: 34%;
    background: radial-gradient(closest-side, rgba(201, 169, 97, 0.2) 0%, rgba(201, 169, 97, 0.1) 32%, rgba(201, 169, 97, 0.035) 60%, rgba(201, 169, 97, 0) 100%);
  }
  /* v4: auf dem Handy nur ein vorgerendertes Goldlicht, das nur verschoben (nicht skaliert) wird */
  .lb-glow.g2, .lb-glow.g3 { display: none; }
  .lb-glow.g1 { animation: lb-drift-m 22s ease-in-out infinite alternate; }
  @keyframes lb-drift-m {
    from { transform: translate3d(-5%, -3%, 0); }
    to   { transform: translate3d(5%, 4%, 0); }
  }
  .lb-p { box-shadow: 0 0 6px rgba(227, 203, 143, 0.8); }

  /* Scroll-Hinweis auch auf dem Handy: unten mittig */
  .lb-scroll {
    display: flex;
    right: auto; left: 50%; margin-left: -2.5rem;
    top: auto; bottom: 0.9rem;
  }
  @media (max-width: 560px) and (max-height: 760px) { .lb-scroll { display: none; } }

  /* Header: Fortschrittslinie deutlicher, Logo schrumpft weich */
  .lb-progress { height: 2px; bottom: -2px; }

  /* Abschnitte: Worte steigen kräftiger, Leistungen gleiten seitlich */
  .js-motion :is(.section-head, .about-copy, .tip-band):not(.is-visible) h2 .lb-w > span { transform: translate3d(0, 120%, 0) rotate(4deg); }
  .js-motion .service:not(.is-visible) { transform: translate3d(-28px, 36px, 0); }

  /* Objektkarten: deutlicher Auftritt mit Bild-Vorhang */
  .js-motion .objekt-card:not(.is-visible) { transform: perspective(1000px) rotateX(6deg) rotateY(0deg) translate3d(0, 70px, 0) scale(0.94); }

  /* Karte in der Bildschirmmitte = "Hover" auf dem Handy: Goldrahmen zeichnet sich, Bild zoomt */
  a.objekt-card::before,
  a.objekt-card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    transition: transform 0.9s var(--ease-io);
  }
  a.objekt-card::before { border-top: 1px solid var(--gold); border-bottom: 1px solid var(--gold); transform: scaleX(0); }
  a.objekt-card::after { border-left: 1px solid var(--gold); border-right: 1px solid var(--gold); transform: scaleY(0); transition-delay: 0.12s; }
  a.objekt-card.is-visible.is-focus::before { transform: scaleX(1); }
  a.objekt-card.is-visible.is-focus::after { transform: scaleY(1); }
  .js-motion a.objekt-card.is-visible.is-focus { --lift: -6px; }
  .js-motion a.objekt-card.is-settled.is-focus .objekt-card-media img { transform: scale(1.06); transition: transform 2.4s var(--ease-out); }
  a.objekt-card.is-focus .objekt-card-link { color: var(--ink); }
  a.objekt-card.is-focus .objekt-card-link::after { transform: translate3d(6px, 0, 0); }
  .js-motion .objekt-gallery-item.is-visible.is-focus img { transform: scale(1.04); transition: transform 2.4s var(--ease-out); }

  /* Tipp-Feedback statt Hover */
  .lb-touch .btn:active, .lb-touch .nav-cta:active, .lb-touch .objekte-filter-btn:active, .lb-touch .social-link:active {
    transform: scale(0.97);
    transition-duration: 0.12s;
  }
  .lb-touch .btn-ghost:active::before, .lb-touch .nav-cta:active::before { transform: scaleX(1); transform-origin: left center; transition-duration: 0.35s; }
  .lb-touch .btn-ghost:active::after { animation: lb-btn-shine-t 0.7s var(--ease-io) both; }
  @keyframes lb-btn-shine-t { from { transform: translate3d(-130%, 0, 0) skewX(-20deg); } to { transform: translate3d(330%, 0, 0) skewX(-20deg); } }
  .lb-touch a.objekt-card.is-visible:active { --press: 0.985; transition-duration: 0.15s; }
  .lb-has-ripple { overflow: hidden; isolation: isolate; }
  /* Inline-Elemente: overflow würde die Grundlinie verschieben -> statische (nicht animierte) Clip-Fläche */
  .lb-has-ripple:is(.contact-mail, .social-link) { overflow: visible; clip-path: inset(0 round 2px); }
  .lb-has-ripple:not(.objekt-card) { position: relative; }
  .lb-ripple {
    position: absolute;
    z-index: 2;
    border-radius: 50%;
    pointer-events: none;
    background: radial-gradient(closest-side, rgba(227, 203, 143, 0.42), rgba(227, 203, 143, 0.16) 60%, rgba(227, 203, 143, 0) 100%);
    transform: scale(0);
    animation: lb-ripple 0.75s var(--ease-out) forwards;
  }
  @keyframes lb-ripple { 0% { transform: scale(0); opacity: 1; } 100% { transform: scale(1); opacity: 0; } }
}

/* ═══════════ Motion v4: scrollgekoppelte Effekte ohne JavaScript ═══════════
   Safari 26+/Chrome 115+: animation-timeline läuft synchron zum Scrollen (kein JS pro Frame,
   kein Nachziehen hinter dem iOS-Scroll-Thread). Ältere Browser: statisch (kein Ruckeln). */
@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes lb-progress-tl { from { transform: scaleX(0); } to { transform: scaleX(1); } }
    .js-motion .lb-progress {
      animation-name: lb-progress-tl;
      animation-duration: 1ms;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
    }
  }
  @media (prefers-reduced-motion: no-preference) and (hover: none) {
    @keyframes lb-hero-out {
      from { transform: translate3d(0, 0, 0); opacity: 1; }
      to   { transform: translate3d(0, 28vh, 0); opacity: 0.15; }
    }
    @keyframes lb-fx-out {
      from { transform: translate3d(0, 0, 0); }
      to   { transform: translate3d(0, 45vh, 0); }
    }
    @keyframes lb-portrait-par {
      from { transform: translate3d(0, 22px, 0); }
      to   { transform: translate3d(0, -22px, 0); }
    }
    .js-motion .hero-inner,
    .js-motion .hero .lb-hero-fx-inner {
      animation-name: lb-hero-out;
      animation-duration: 1ms;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: scroll(root block);
      animation-range: 0 100vh;
    }
    .js-motion .hero .lb-hero-fx-inner { animation-name: lb-fx-out; }
    .js-motion .about-grid > .portrait {
      animation-name: lb-portrait-par;
      animation-duration: 1ms;
      animation-timing-function: linear;
      animation-fill-mode: both;
      animation-timeline: view(block);
    }
  }
}

/* Bewegung reduzieren: alles ruhig, alles sofort sichtbar */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .lb-veil, .lb-hero-fx, .lb-scroll { display: none !important; }
}
