/* ============================================================
   SOPHILIA — Animations & Micro-interactions
   ============================================================ */

/* --- Scroll-triggered fade-up --- */
.anim-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.anim-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }
.anim-delay-5 { transition-delay: 0.5s; }

/* --- Page load entrance for hero --- */
@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero .anim-fade-up {
    animation: heroEntrance 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero .anim-delay-1 { animation-delay: 0.15s; }
.hero .anim-delay-2 { animation-delay: 0.3s; }
.hero .anim-delay-3 { animation-delay: 0.45s; }
.hero .anim-delay-4 { animation-delay: 0.6s; }

/* override for hero — already animated via keyframes */
.hero .anim-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Timeline connector animation --- */
.timeline__line {
    transform-origin: top;
    transform: scaleY(0);
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline__line.visible {
    transform: scaleY(1);
}

/* --- Notion chips staggered entrance --- */
.notions__grid .notion__chip {
    opacity: 0;
    transform: translateY(15px) scale(0.95);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.notions__grid.visible .notion__chip {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.notions__grid.visible .notion__chip:nth-child(1)  { transition-delay: 0.02s; }
.notions__grid.visible .notion__chip:nth-child(2)  { transition-delay: 0.06s; }
.notions__grid.visible .notion__chip:nth-child(3)  { transition-delay: 0.10s; }
.notions__grid.visible .notion__chip:nth-child(4)  { transition-delay: 0.14s; }
.notions__grid.visible .notion__chip:nth-child(5)  { transition-delay: 0.18s; }
.notions__grid.visible .notion__chip:nth-child(6)  { transition-delay: 0.22s; }
.notions__grid.visible .notion__chip:nth-child(7)  { transition-delay: 0.26s; }
.notions__grid.visible .notion__chip:nth-child(8)  { transition-delay: 0.30s; }
.notions__grid.visible .notion__chip:nth-child(9)  { transition-delay: 0.34s; }
.notions__grid.visible .notion__chip:nth-child(10) { transition-delay: 0.38s; }
.notions__grid.visible .notion__chip:nth-child(11) { transition-delay: 0.42s; }
.notions__grid.visible .notion__chip:nth-child(12) { transition-delay: 0.46s; }
.notions__grid.visible .notion__chip:nth-child(13) { transition-delay: 0.50s; }
.notions__grid.visible .notion__chip:nth-child(14) { transition-delay: 0.54s; }
.notions__grid.visible .notion__chip:nth-child(15) { transition-delay: 0.58s; }
.notions__grid.visible .notion__chip:nth-child(16) { transition-delay: 0.62s; }

/* --- Pricing card scale on hover --- */
.pricing__card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Smooth button press --- */
.btn:active {
    transform: scale(0.97);
    transition-duration: 0.1s;
}

/* --- FAQ answer smooth toggle --- */
.faq__answer {
    transition: max-height 0.5s cubic-bezier(0.16, 1, 0.3, 1),
                padding 0.3s ease;
}

/* --- Gold shimmer on featured pricing badge --- */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.pricing__badge {
    background: linear-gradient(
        110deg,
        var(--gold) 0%,
        var(--gold-light) 30%,
        var(--gold) 50%,
        var(--gold-light) 70%,
        var(--gold) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 3s ease-in-out infinite;
}

/* --- Floating subtle parallax for hero grain --- */
@keyframes grainDrift {
    0%, 100% { transform: translate(0, 0); }
    25% { transform: translate(-2px, 1px); }
    50% { transform: translate(1px, -1px); }
    75% { transform: translate(-1px, -2px); }
}

.hero__grain {
    animation: grainDrift 8s ease-in-out infinite;
}

/* --- Underline draw for nav links --- */
.nav__link::after {
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- Focus visible for accessibility --- */
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 3px;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .anim-fade-up {
        opacity: 1;
        transform: none;
    }
    .timeline__line {
        transform: scaleY(1);
    }
    .notions__grid .notion__chip {
        opacity: 1;
        transform: none;
    }
}
