/* ── Scroll reveal ── */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-on-scroll.delay-1 { transition-delay: 0.1s; }
.animate-on-scroll.delay-2 { transition-delay: 0.2s; }
.animate-on-scroll.delay-3 { transition-delay: 0.3s; }

/* ── Hero container doors (index) ── */
.hero {
    overflow: hidden;
}

.hero-doors {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    pointer-events: none;
    animation: doorsDone 0.5s ease 1.55s forwards;
}

@keyframes doorsDone {
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.hero-door {
    flex: 1;
    background: linear-gradient(135deg, #4a5d4a 0%, #628f5c 50%, #3d5239 100%);
    border: 3px solid rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.4);
}

.hero-door-left {
    border-right: 2px solid #2d3d2b;
    transform-origin: left center;
    animation: doorOpenLeft 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.4s forwards;
}

.hero-door-right {
    border-left: 2px solid #2d3d2b;
    transform-origin: right center;
    animation: doorOpenRight 1.1s cubic-bezier(0.65, 0, 0.35, 1) 0.4s forwards;
}

.hero-door-left::after,
.hero-door-right::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 12px;
    height: 48px;
    background: rgba(0, 0, 0, 0.35);
    border-radius: 2px;
    transform: translateY(-50%);
}

.hero-door-left::after { right: 18%; }
.hero-door-right::after { left: 18%; }

@keyframes doorOpenLeft {
    to { transform: perspective(800px) rotateY(-92deg); opacity: 0.3; }
}

@keyframes doorOpenRight {
    to { transform: perspective(800px) rotateY(92deg); opacity: 0.3; }
}

.hero-content {
    z-index: 3;
    opacity: 0;
    animation: heroContentIn 0.8s ease 1.2s forwards;
}

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

/* Quote page header fade */
.header-overlay.hero-content {
    animation: heroContentIn 0.8s ease 0.3s forwards;
}

/* ── Modular stack (About) ── */
.modular-stack {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 0.75rem;
    margin: 0 auto 1.75rem;
    max-width: 420px;
    height: 100px;
}

.modular-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100px;
    padding: 0.75rem 0.5rem;
    background: linear-gradient(180deg, #eef6ed 0%, #dce8da 100%);
    border: 2px solid #628f5c;
    border-radius: 6px;
    color: #4a6d45;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    box-shadow: 0 4px 12px rgba(98, 143, 92, 0.2);
    opacity: 0;
    transform: translateY(40px);
}

.modular-block i {
    font-size: 1.35rem;
}

.modular-stack.visible .modular-block-1 {
    animation: moduleStack 0.55s ease forwards;
}

.modular-stack.visible .modular-block-2 {
    animation: moduleStack 0.55s ease 0.15s forwards;
}

.modular-stack.visible .modular-block-3 {
    animation: moduleStack 0.55s ease 0.3s forwards;
}

.modular-block-2 {
    height: 72px;
    align-self: center;
}

.modular-block-3 {
    height: 88px;
}

@keyframes moduleStack {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Logistics route banner ── */
.logistics-banner {
    position: relative;
    max-width: 640px;
    margin: 0 auto;
    padding: 1.25rem 1rem 2rem;
    overflow: hidden;
}

.logistics-svg {
    width: 100%;
    height: 48px;
    display: block;
}

.route-path {
    fill: none;
    stroke: #628f5c;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 560;
    stroke-dashoffset: 560;
}

.logistics-banner.visible .route-path {
    animation: drawRoute 1.8s ease forwards;
}

@keyframes drawRoute {
    to { stroke-dashoffset: 0; }
}

.logistics-truck {
    position: absolute;
    left: 0;
    top: 50%;
    transform: translate(12px, -50%);
    color: #628f5c;
    font-size: 1.5rem;
    opacity: 0;
}

.logistics-banner.visible .logistics-truck {
    animation: truckDrive 6s linear 0.5s infinite, truckFadeIn 0.4s ease 0.5s forwards;
}

@keyframes truckFadeIn {
    to { opacity: 1; }
}

@keyframes truckDrive {
    0%   { left: 0; }
    100% { left: calc(100% - 2.5rem); }
}

/* ── Gallery lift (desktop) ── */
@media (hover: hover) {
    .gallery-container img:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    }
}

/* ── WhatsApp one-time pulse ── */
.whatsapp-float.pulse-once {
    animation: whatsappPulse 1.2s ease 1;
}

@keyframes whatsappPulse {
    0%, 100% { box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); }
    50%      { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0.35), 0 4px 12px rgba(0, 0, 0, 0.3); }
}

/* ── Quote form step reveal ── */
.quote-form .form-block.animate-on-scroll {
    transform: translateY(24px);
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
    .animate-on-scroll {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .hero-door,
    .hero-content,
    .header-overlay.hero-content {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-doors {
        display: none;
        animation: none !important;
    }

    .modular-block {
        opacity: 1;
        transform: none;
    }

    .modular-stack.visible .modular-block {
        animation: none !important;
    }

    .route-path {
        stroke-dashoffset: 0;
    }

    .logistics-truck {
        opacity: 1;
        left: 50%;
        transform: translate(-50%, -50%);
        animation: none !important;
    }

    .whatsapp-float.pulse-once {
        animation: none !important;
    }

    .gallery-container img:hover {
        transform: none;
    }
}
