/* Medi Beauty – Bewegung & Feinschliff (nach Emil Kowalskis Design-Engineering-Prinzipien)
   Ruhig und hochwertig: nur transform, opacity, clip-path und leichte Unschärfe.
   Alles, was sich bewegt, läuft nur bei "prefers-reduced-motion: no-preference". */

:root {
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-in-out: cubic-bezier(.77, 0, .175, 1);
  --ease-soft: cubic-bezier(.22, .61, .36, 1);
}

/* ---------- Drücken fühlt sich an (Feedback) ---------- */
.btn, .nav-link, .tx-go, .spec-link, .social-btn, .burger, .lux-go, .new-tile-go, .gs-card {
  -webkit-tap-highlight-color: transparent;
}
.btn { transition: background .2s, color .2s, border-color .2s, box-shadow .25s, transform .16s var(--ease-out); }
.btn:active, .nav-link:active, .spec-link:active, .social-btn:active, .burger:active { transform: scale(.97); }
.nav-link, .spec-link, .social-btn, .burger { transition: background .2s, color .2s, border-color .2s, transform .16s var(--ease-out); }
@media (hover: none) { .btn:hover { transform: none; } }
@media (hover: hover) and (pointer: fine) {
  .btn--primary:hover { box-shadow: 0 12px 26px -14px rgba(60,45,36,.7); }
}

/* ---------- Kopfzeile: wird beim Scrollen zu "Glas" ---------- */
.site-header { transition: background .35s var(--ease-soft), box-shadow .35s var(--ease-soft), border-color .35s; }
.site-header.is-scrolled { background: rgba(246,237,226,.78); box-shadow: 0 14px 34px -26px rgba(60,45,36,.55); border-bottom-color: transparent; }

/* ---------- Mega-Menü: klappt sanft von oben auf ---------- */
.mega {
  transform-origin: 50% 0;
  transform: translate(-50%, -4px) scale(.97);
  transition: opacity .14s var(--ease-out), transform .14s var(--ease-out), visibility .14s;
}
.nav-item:hover > .mega, .nav-item:focus-within > .mega, .nav-item.open > .mega {
  transform: translate(-50%, 0) scale(1);
  transition-duration: .22s;
}

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

  /* ---------- Startseite: Auftritt beim Laden ---------- */
  @keyframes fx-rise { from { opacity: 0; transform: translateY(16px); filter: blur(8px); } }
  @keyframes fx-fade { from { opacity: 0; } }
  @keyframes fx-settle { from { opacity: 0; transform: scale(1.09); } }
  @keyframes fx-unveil {
    from { clip-path: inset(7% 7% 7% 7% round 32px); }
    to { clip-path: inset(0 0 0 0 round var(--fx-r, 24px)); }
  }
  @keyframes fx-zoom { from { transform: scale(1.18); } }

  .home-hero-bgimg { overflow: hidden; }
  .home-hero-bgimg img { animation: fx-settle 2.2s var(--ease-out) both; }
  .home-hero h1 strong { display: inline-block; }
  .home-hero h1 strong,
  .home-hero h1 .h1-light,
  .home-hero .lead,
  .home-hero .btn-row,
  .home-hero-meta,
  .home-hero .home-promises { animation: fx-rise 1s var(--ease-out) both; }
  .home-hero h1 strong { animation-delay: .08s; }
  .home-hero h1 .h1-light { animation-delay: .2s; }
  .home-hero .lead { animation-delay: .32s; }
  .home-hero .btn-row { animation-delay: .42s; }
  .home-hero-meta { animation-delay: .5s; }
  .home-hero .home-promises { animation-delay: .6s; }

  /* Sterne leuchten einmal kurz auf */
  @keyframes fx-shine { from { background-position: 100% 0; } to { background-position: 0% 0; } }
  .home-hero .rating .stars {
    background: linear-gradient(100deg, currentColor 0 42%, #fff7e0 50%, currentColor 58% 100%) 100% 0 / 250% 100% no-repeat;
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
    animation: fx-shine 1.4s var(--ease-in-out) .9s both;
  }

  /* ---------- Unterseiten: Auftritt beim Laden ---------- */
  .page-hero .breadcrumb { animation: fx-fade .6s var(--ease-out) both; }
  .page-hero .area-tag,
  .page-hero .kicker,
  .page-hero h1,
  .page-hero .lead,
  .page-hero .price-pill,
  .page-hero .btn-row { animation: fx-rise .95s var(--ease-out) both; }
  .page-hero .area-tag, .page-hero .kicker { animation-delay: .04s; }
  .page-hero h1 { animation-delay: .1s; }
  .page-hero .lead { animation-delay: .22s; }
  .page-hero .price-pill { animation-delay: .3s; }
  .page-hero .btn-row { animation-delay: .36s; }
  .page-hero .ph--photo { animation: fx-unveil 1.3s var(--ease-in-out) .12s both; }
  .page-hero .ph--photo img { animation: fx-zoom 1.8s var(--ease-out) .12s both; }

  /* ---------- Einblenden beim Scrollen (ersetzt die alte Variante) ---------- */
  .js .reveal {
    opacity: 0; transform: translateY(26px); filter: blur(6px);
    transition: opacity .9s var(--ease-out), transform 1s var(--ease-out), filter .9s var(--ease-out);
    transition-delay: var(--fx-d, 0ms);
  }
  .js .reveal.is-visible { opacity: 1; transform: none; filter: none; }

  /* ---------- Fotos: werden beim Scrollen "aufgezogen" ---------- */
  .js .fx-img {
    clip-path: inset(9% 7% 9% 7% round 32px);
    transition: clip-path 1.25s var(--ease-in-out), opacity .9s var(--ease-out);
    transition-delay: var(--fx-d, 0ms);
  }
  .js .fx-img img { transform: scale(1.16); transition: transform 1.7s var(--ease-out); transition-delay: var(--fx-d, 0ms); }
  .js .fx-img.fx-in { clip-path: inset(0 0 0 0 round var(--fx-r, 24px)); }
  .js .fx-img.fx-in img { transform: scale(1); }
  /* Fotokacheln mit .reveal: nur aufziehen, nicht zusätzlich verschieben/verwischen */
  .js .reveal.fx-img { transform: none; filter: none; }

  /* ---------- Seitenwechsel: weiches Überblenden (Chrome, Edge, Safari 18+) ---------- */
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: .22s var(--ease-out) both fx-vt-out; }
  ::view-transition-new(root) { animation: .38s var(--ease-out) both fx-vt-in; }
  @keyframes fx-vt-out { to { opacity: 0; } }
  @keyframes fx-vt-in { from { opacity: 0; transform: translateY(10px); } }
  .site-header { view-transition-name: site-header; }
  ::view-transition-group(site-header) { animation-duration: 0s; }
}

/* Zahlen zählen hoch: ruhige Ziffern, damit nichts springt */
.fx-count { font-variant-numeric: tabular-nums; }

/* Weniger Bewegung gewünscht: alles sofort sichtbar */
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .fx-img { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
}

/* ---------- Laufband mit Behandlungen (Startseite) ---------- */
.fx-marquee { overflow: hidden; background: var(--hellbeige); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(14px, 2.2vh, 22px) 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.fx-marquee-track { display: flex; width: max-content; }
.fx-marquee-row { display: flex; align-items: center; flex-shrink: 0; }
.fx-marquee span { font-size: clamp(1.15rem, 2vw, 1.75rem); font-weight: 200; letter-spacing: -.01em; color: var(--braun); white-space: nowrap; padding: 0 clamp(18px, 2.4vw, 34px); }
.fx-marquee span:nth-of-type(even) { font-weight: 600; color: var(--beige-ink); }
.fx-marquee i { width: 7px; height: 7px; background: var(--rot); transform: rotate(45deg); flex-shrink: 0; opacity: .8; }
@media (prefers-reduced-motion: no-preference) {
  @keyframes fx-marquee { to { transform: translateX(-50%); } }
  .fx-marquee-track { animation: fx-marquee 48s linear infinite; }
  .fx-marquee:hover .fx-marquee-track { animation-play-state: paused; }
}

/* ---------- Überschriften: Wörter gleiten aus einer Maske nach oben ---------- */
.fx-w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.fx-w > span { display: inline-block; transform: translateY(108%); transition: transform 1s var(--ease-out); transition-delay: calc(var(--wi, 0) * 45ms + 80ms); }
.is-visible .fx-w > span { transform: none; }
.js .reveal.fx-split { transform: none; filter: none; }

/* ---------- Gutschein-Pop-up ---------- */
.gsp { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 20px; }
.gsp[hidden] { display: none; }
.gsp-backdrop { position: absolute; inset: 0; background: rgba(36,26,20,.46); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); opacity: 0; transition: opacity .32s var(--ease-out); }
.gsp-panel { position: relative; width: min(880px, 100%); display: grid; grid-template-columns: 1.08fr 1fr; background: var(--hellbeige, #F6EDE2); border-radius: 28px; overflow: hidden; box-shadow: 0 40px 90px -30px rgba(30,20,14,.65); opacity: 0; transform: translateY(14px) scale(.96); transition: opacity .38s var(--ease-out), transform .45s var(--ease-out); color: var(--braun, #3C2D24); }
.gsp.is-open .gsp-backdrop { opacity: 1; }
.gsp.is-open .gsp-panel { opacity: 1; transform: none; }
.gsp.is-closing .gsp-backdrop, .gsp.is-closing .gsp-panel { transition-duration: .2s; }
.gsp-close { position: absolute; top: 14px; right: 14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255,255,255,.75); color: var(--braun, #3C2D24); font-size: 22px; line-height: 1; cursor: pointer; display: grid; place-items: center; transition: transform .16s var(--ease-out), background .2s; }
.gsp-close:hover { background: #fff; } .gsp-close:active { transform: scale(.92); }

.gsp-stage { position: relative; min-height: 380px; overflow: hidden; display: grid; place-items: center; background: #3C2D24; transition: background-color 1s var(--ease-soft); isolation: isolate; }
.gsp-stage::before { content: ""; position: absolute; inset: -30%; z-index: -1; background: radial-gradient(closest-side, var(--gsp-glow, #8B2A22) 0%, transparent 70%); opacity: .75; transition: background 1s var(--ease-soft); }
.gsp-stage::after { content: ""; position: absolute; inset: 14px; border: 1px solid rgba(246,237,226,.22); border-radius: 18px; pointer-events: none; }
.gsp-deck { position: relative; width: 74%; aspect-ratio: 2 / 1; }
.gsp-card { position: absolute; inset: 0; border-radius: 10px; overflow: hidden; box-shadow: 0 18px 40px -16px rgba(0,0,0,.6), 0 2px 6px rgba(0,0,0,.2); transform-origin: 50% 120%;
  transition: transform .9s var(--ease-out), opacity .6s var(--ease-out), filter .6s; will-change: transform; }
.gsp-card img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gsp-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255,255,255,.55) 50%, transparent 65%); transform: translateX(-120%); }
.gsp-card[data-pos="0"]::after { animation: gsp-shine 1.2s var(--ease-in-out) .55s both; }
@keyframes gsp-shine { to { transform: translateX(120%); } }
.gsp-card[data-pos="0"] { transform: translateY(-4%) rotate(-2deg) scale(1); z-index: 5; }
.gsp-card[data-pos="1"] { transform: translate(-13%, 3%) rotate(-11deg) scale(.9); z-index: 4; filter: brightness(.92); }
.gsp-card[data-pos="2"] { transform: translate(13%, 4%) rotate(9deg) scale(.88); z-index: 3; filter: brightness(.88); }
.gsp-card[data-pos="3"] { transform: translate(-22%, 9%) rotate(-19deg) scale(.8); z-index: 2; filter: brightness(.8); }
.gsp-card[data-pos="4"] { transform: translate(22%, 10%) rotate(17deg) scale(.78); z-index: 1; filter: brightness(.76); }
.gsp-card.is-out { transform: translate(62%, -34%) rotate(24deg) scale(.95) !important; z-index: 6 !important; transition-duration: .5s; }
.gsp-card.is-in { transform: translateY(-140%) rotate(-14deg) scale(.9) !important; opacity: 0; transition: none; }
.gsp-name { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: .74rem; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: rgba(246,237,226,.85); }
.gsp-name span { display: inline-block; transition: opacity .3s, transform .4s var(--ease-out), filter .3s; }
.gsp-name span.is-swap { opacity: 0; transform: translateY(6px); filter: blur(3px); }

.gsp-copy { padding: clamp(28px, 4vw, 44px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.gsp-copy .gsp-kicker { align-self: flex-start; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: #fff; color: var(--rot, #471410); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }
.gsp-copy .gsp-kicker::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #C9483B; animation: haPulse 2s infinite; }
.gsp-copy h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 300; line-height: 1.08; letter-spacing: -.02em; }
.gsp-copy h2 strong { font-weight: 700; display: block; }
.gsp-copy p { margin: 0; color: var(--text-muted, #6b5b50); font-size: .98rem; line-height: 1.55; }
.gsp-points { list-style: none; margin: 2px 0 6px; padding: 0; display: grid; gap: 7px; font-size: .92rem; }
.gsp-points li { display: flex; gap: 10px; align-items: center; }
.gsp-points li::before { content: ""; width: 6px; height: 6px; background: var(--rot, #471410); transform: rotate(45deg); flex-shrink: 0; }
.gsp-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.gsp-later { background: none; border: 0; padding: 10px 6px; font: inherit; font-size: .9rem; color: var(--text-muted, #6b5b50); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.gsp-dots { display: flex; gap: 6px; margin-top: 4px; }
.gsp-dots b { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line, rgba(60,45,36,.15)); transition: transform .3s var(--ease-out); }
.gsp-dots b.is-on { transform: scale(1.25); }

@media (max-width: 760px) {
  .gsp { place-items: end center; padding: 0; }
  .gsp-panel { grid-template-columns: 1fr; border-radius: 24px 24px 0 0; max-height: 88svh; overflow-y: auto; transform: translateY(100%); transition: opacity .2s, transform .5s cubic-bezier(.32,.72,0,1); opacity: 1; }
  .gsp.is-closing .gsp-panel { transform: translateY(100%); }
  .gsp-stage { min-height: 0; height: 210px; }
  .gsp-deck { width: 62%; }
  .gsp-name { bottom: 14px; }
  .gsp-copy { padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); gap: 10px; }
  .gsp-copy h2 { font-size: 1.6rem; }
  .gsp-points { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .gsp-card, .gsp-panel, .gsp-backdrop { transition: none !important; }
  .gsp-card::after { display: none; }
}
.gsp-panel:focus, .gsp-panel:focus-visible { outline: none; }
.gsp-copy h2 { hyphens: manual; -webkit-hyphens: manual; }
.lux-go { white-space: nowrap; }
@media (min-width: 761px) { .gsp-deck { width: 62%; } .gsp-copy h2 { font-size: clamp(1.6rem, 2.6vw, 2.1rem); } }
