/* ================================================
   EPIDERMIST — Animations
   ================================================ */

/* ── Scroll Fade-Up ── */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

[data-animate].ep-animated {
    opacity: 1;
    transform: translateY(0);
}

/* ── Staggered Children ── */
[data-animate-stagger] > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate-stagger].ep-animated > * {
    opacity: 1;
    transform: translateY(0);
}

[data-animate-stagger].ep-animated > *:nth-child(1) { transition-delay: 0.1s; }
[data-animate-stagger].ep-animated > *:nth-child(2) { transition-delay: 0.2s; }
[data-animate-stagger].ep-animated > *:nth-child(3) { transition-delay: 0.3s; }
[data-animate-stagger].ep-animated > *:nth-child(4) { transition-delay: 0.4s; }
[data-animate-stagger].ep-animated > *:nth-child(5) { transition-delay: 0.5s; }
[data-animate-stagger].ep-animated > *:nth-child(6) { transition-delay: 0.6s; }
[data-animate-stagger].ep-animated > *:nth-child(7) { transition-delay: 0.7s; }
[data-animate-stagger].ep-animated > *:nth-child(8) { transition-delay: 0.8s; }

/* ── Image Reveal ── */
[data-animate-image] {
    overflow: hidden;
}

[data-animate-image] img,
[data-animate-image] > div {
    transform: scale(1.08);
    transition: transform 1.2s ease;
}

[data-animate-image].ep-animated img,
[data-animate-image].ep-animated > div {
    transform: scale(1);
}

/* ── Button Hover Effects ── */
.ep-btn-primary {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.ep-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.ep-btn-primary:active {
    transform: translateY(0);
    box-shadow: none;
}

.ep-btn-secondary {
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.ep-btn-secondary:hover {
    transform: translateY(-2px);
}

.ep-btn-secondary:active {
    transform: translateY(0);
}

/* ── Product Card Hover ── */
.ep-product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ep-product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ep-shadow-hover);
}

.ep-product-card__image img {
    transition: transform 0.6s ease;
}

.ep-product-card:hover .ep-product-card__image > img:first-child {
    transform: scale(1.05);
}

/* ── Approach Card Hover ── */
.ep-approach-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ep-approach-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ep-shadow-card);
}

/* ── Concern Card Hover ── */
.ep-concern-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ep-concern-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ep-shadow-hover);
}

/* ── Nav Link Underline Slide ── */
.ep-nav__list .menu-item a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1.5px;
    background-color: var(--ep-accent);
    transition: width 0.3s ease;
}

.ep-nav__list .menu-item a:hover::after {
    width: 100%;
}

/* ── Focus Styles (Accessibility) ── */
:focus-visible {
    outline: 2px solid var(--ep-accent);
    outline-offset: 3px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible) {
    outline: none;
}

/* ── Page Load Fade ── */
body {
    animation: epFadeIn 0.5s ease forwards;
}

@keyframes epFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

    [data-animate],
    [data-animate-stagger] > *,
    [data-animate-image] img,
    [data-animate-image] > div {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .ep-product-card,
    .ep-approach-card,
    .ep-concern-card,
    .ep-btn-primary,
    .ep-btn-secondary {
        transform: none !important;
    }

    body {
        animation: none;
    }
}
