/* t274 – mobile toast placement + tap targets */
/* t278 – scroll reveal helpers, CTA pulse, sticky dual CTA, card zoom, Ken Burns, progress */

.fmh-compare-toast__close {
  top: 0.15rem;
  right: 0.15rem;
  z-index: 5;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  border-radius: 10px;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 700px) {
  .fmh-compare-toast {
    left: max(0.55rem, env(safe-area-inset-left, 0px));
    right: calc(var(--fmh-rail-w, 3.25rem) + 0.55rem); /* t348: clear mobile rail */
    bottom: var(--fmh-toast-clearance, calc(0.85rem + env(safe-area-inset-bottom, 0px)));
    width: auto;
    max-width: none;
    padding: 0.75rem 0.8rem 0.8rem;
    border-radius: 12px;
    z-index: 160;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 35, 55, 0.2);
  }

  .fmh-compare-toast p {
    margin: 0 0 0.65rem;
    padding-right: 2.4rem;
    font-size: 0.88rem;
    line-height: 1.35;
  }

  .fmh-compare-toast .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}

/* —— #8 Scroll progress (fixed under header; no flow/layout/nav shift) —— */
.fmh-scroll-progress {
  position: fixed;
  top: var(--header-h, 100px);
  left: 0;
  right: 0;
  height: 3px;
  z-index: 155; /* above header/content (100), below sticky-cta (160); no layout shift */
  pointer-events: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
}
.fmh-scroll-progress__bar {
  display: block;
  height: 100%;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #e77600, #f0a04a);
  will-change: transform;
}

/* —— #3 CTA pulse (2–3 cycles then rest; box-shadow only → no layout shift) —— */
@keyframes fmh-cta-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 118, 0, 0.45); }
  55% { box-shadow: 0 0 0 12px rgba(231, 118, 0, 0); }
}
.fmh-cta-pulse {
  animation: fmh-cta-pulse 1.35s ease-out 3;
}

/* —— #4 Sticky dual actions: primary + Anrufen —— */
.sticky-cta__actions {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  justify-content: center;
  gap: 0.45rem;
  width: 100%;
  max-width: 420px;
}
.sticky-cta__actions .btn {
  min-width: 0 !important;
  margin: 0;
}
.sticky-cta__primary {
  flex: 1 1 auto;
  text-align: center;
}
.sticky-cta__call {
  flex: 0 0 auto;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding-left: 0.85rem !important;
  padding-right: 0.95rem !important;
  border-radius: 999px;
  border: 1.5px solid var(--color-navy, #002337);
  background: #fff;
  color: var(--color-navy, #002337);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.sticky-cta__call:hover,
.sticky-cta__call:focus-visible {
  background: #f7faf8;
  border-color: var(--color-primary, #e77600);
  color: var(--color-navy, #002337);
}
.sticky-cta__call-icon,
.sticky-cta .fmh-beratung-popup__icon,
.sticky-cta svg {
  width: 18px !important;
  height: 18px !important;
  max-width: 18px !important;
  max-height: 18px !important;
  flex: 0 0 18px !important;
  display: block !important;
}
@media (max-width: 700px) {
  .sticky-cta.is-visible .sticky-cta__actions .btn {
    padding: 0.55rem 0.9rem;
    font-size: 0.86rem;
    min-height: 44px;
  }
}

/* —— #5 House-card hover zoom (fine pointer only; img inside overflow:hidden) —— */
@media (hover: hover) and (pointer: fine) {
  .house-band__media img {
    transition: transform 0.55s ease;
    transform: scale(1);
  }
  .house-band__link:not(.house-band__link--static):hover .house-band__media img,
  .house-band__link:not(.house-band__link--static):focus-within .house-band__media img {
    transform: scale(1.06);
  }
}

/* —— #6 Slow Ken-Burns on homepage hero backdrop layers —— */
.hero.hero--premium::after {
  transform-origin: 72% 28%;
  animation: fmh-kenburns 28s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes fmh-kenburns {
  from { transform: scale(1) translate(0, 0); }
  to { transform: scale(1.1) translate(-2.5%, 1.5%); }
}

/* —— #1 Reveal: light stagger for consecutive cards (reuse existing .reveal) —— */
html.fmh-reveal-pending .reveal:nth-child(2):not(.is-visible) { transition-delay: 0.05s; }
html.fmh-reveal-pending .reveal:nth-child(3):not(.is-visible) { transition-delay: 0.1s; }
html.fmh-reveal-pending .reveal:nth-child(4):not(.is-visible) { transition-delay: 0.15s; }

@media (prefers-reduced-motion: reduce) {
  .fmh-compare-toast {
    transition: opacity 0.2s ease;
  }
  .fmh-cta-pulse {
    animation: none !important;
  }
  .hero.hero--premium::after {
    animation: none !important;
    transform: none !important;
  }
  .fmh-scroll-progress__bar {
    transition: none !important;
  }
  .house-band__media img {
    transition: none !important;
    transform: none !important;
  }
  html.fmh-reveal-pending .reveal:not(.is-visible) {
    transition-delay: 0s !important;
  }
}

/* t280: gentle, permanent pulse (owner: "ganz leicht, dauerhaft") */
@keyframes fmh-cta-pulse-soft {
  0%, 100% { box-shadow: 0 0 0 0 rgba(231, 118, 0, 0.28); }
  60% { box-shadow: 0 0 0 7px rgba(231, 118, 0, 0); }
}
.fmh-cta-pulse { animation: fmh-cta-pulse-soft 2.8s ease-out infinite !important; }
.btn--ghost.fmh-cta-pulse { animation-name: fmh-cta-pulse-soft !important; }
@media (prefers-reduced-motion: reduce) { .fmh-cta-pulse { animation: none !important; } }

/* t281: pulse removed entirely */
.fmh-cta-pulse { animation: none !important; box-shadow: none; }

/* t303: CTA colours live in styles.css (--fmh-cta-* / .fmh-cta-offer / .fmh-cta-consult).
   motion.css must not reintroduce soft brown-on-orange or divergent hover. */
.fmh-cta-pulse { animation: none !important; }
.hero-card--compact a.hero-choice.hero-choice--primary .hero-choice__icon {
  background: rgba(255,255,255,0.2) !important;
  color: #fff !important;
}

