/* ============================================
   POLYHOMES — ANIMATIONS

   Scroll-reveal utilities plus a few small entrance effects.
   Every selector below targets markup that actually exists; the previous
   version animated ~9 classes (.hero-title, .trust-badges, .filter-btn,
   .scroll-indicator, .tour-float-card …) that appeared in no PHP file.
   ============================================ */

/* ---------------- Scroll reveal ---------------- */

.fade-in {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-left.visible { opacity: 1; transform: translateX(0); }

.fade-in-right {
    opacity: 0;
    transform: translateX(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in-right.visible { opacity: 1; transform: translateX(0); }

/* Stagger delays */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ---------------- Hero entrance ---------------- */

@keyframes slideUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}

.ph-hero-content h1     { animation: slideUp 0.8s ease 0.1s both; }
.ph-hero-content p      { animation: slideUp 0.8s ease 0.25s both; }
.ph-hero .ph-store-row  { animation: slideUp 0.8s ease 0.4s both; }

/* ---------------- Navbar ---------------- */

@keyframes navSlide {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
}
.navbar { animation: navSlide 0.5s ease both; }

/* ---------------- Hero photo drift ---------------- */

.ph-hero-bg img {
    animation: subtleZoom 14s ease-in-out infinite alternate;
}
@keyframes subtleZoom {
    from { transform: scale(1); }
    to   { transform: scale(1.05); }
}

/* ---------------- Interior page accents ---------------- */

.feature-card:hover .feature-icon {
    animation: iconPulse 0.4s ease;
}
@keyframes iconPulse {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.ph-chip.active {
    animation: filterPop 0.25s ease;
}
@keyframes filterPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(0.95); }
    100% { transform: scale(1); }
}

/* Wizard steps ease in as you page through the onboarding form. */
.ph-host-step.is-active {
    animation: stepIn 0.3s ease both;
}
@keyframes stepIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------------- Reduced motion ----------------
   Respect the OS setting: reveal everything immediately and stop the
   looping hero zoom rather than animating regardless. */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }

    .fade-in,
    .fade-in-left,
    .fade-in-right {
        opacity: 1;
        transform: none;
    }
}
