/* ============================================
   ENHANCED ANIMATIONS - Om Swami inspired
   Minimalist, meditative, aesthetic
   ============================================ */

/* --- Constellation lines: gentle pulse (synced with star glow) --- */
.stars-constellation .constellation-lines-base {
    animation: linesPulse 5s ease-in-out infinite;
}

@keyframes linesPulse {
    0%, 100% { opacity: 0.75; }
    50% { opacity: 1; }
}

/* --- Ambient background shift --- */
#particles::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse 80% 50% at 50% 0%,
        rgba(212, 175, 55, 0.06) 0%,
        transparent 50%
    );
    animation: ambientShift 15s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes ambientShift {
    0% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 1; transform: scale(1.1); }
}

/* --- Text reveal (staggered lines) --- */
.reveal-line {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
}

.reveal-line span {
    display: inline-block;
    transform: translateY(100%);
    animation: revealUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.main-title .line-1 span { animation-delay: 0.2s; }
.main-title .line-2 span { animation-delay: 0.5s; }
.main-title .line-3 span { animation-delay: 0.8s; }

@keyframes revealUp {
    to { transform: translateY(0); }
}

/* --- Om symbol entrance + float --- */
.om-symbol {
    transform: scale(0.8);
    opacity: 0;
    animation: omEntrance 1.5s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.landing-container:hover .om-symbol {
    transform: scale(1.02);
}

@keyframes omEntrance {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.om-text {
    animation: omGlow 4s ease-in-out infinite;
    transition: filter 0.5s ease, opacity 0.5s ease;
}

.om-symbol:hover .om-text {
    filter: drop-shadow(0 0 28px rgba(212, 175, 55, 0.7));
    opacity: 1;
}

/* --- Enter button: appear after headline letters --- */
.enter-btn {
    opacity: 0;
    animation: btnAppear 0.8s cubic-bezier(0.22, 1, 0.36, 1) 2.2s forwards;
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
                color 0.3s ease,
                border-color 0.3s ease,
                box-shadow 0.4s ease;
}

@keyframes btnAppear {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.enter-btn:hover {
    transform: scale(1.02);
}

.enter-btn:active {
    transform: scale(0.97);
    box-shadow: 
        0 0 30px rgba(212, 175, 55, 0.5),
        0 0 60px rgba(88, 28, 135, 0.3),
        inset 0 0 30px rgba(212, 175, 55, 0.15);
}

/* --- Ripple effect on button + calm idle pulse --- */
.enter-btn .btn-text {
    position: relative;
    z-index: 10;
    animation: ctaPulse 3s ease-in-out infinite;
}

@media (prefers-reduced-motion: reduce) {
    .enter-btn .btn-text {
        animation: none;
    }
}

@keyframes ctaPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
}

/* --- Scroll indicator: fade in + line draw + bounce --- */
.scroll-indicator {
    opacity: 0;
    animation: fadeInUp 1s ease 1.5s forwards;
}

.scroll-arrow-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 0;
    background: linear-gradient(to bottom, transparent, var(--accent-gold));
    animation: scrollLineGrow 2s ease 2s forwards;
}

@keyframes scrollLineGrow {
    to { height: 32px; opacity: 0.8; }
}

.scroll-arrow {
    animation: bounce 2.5s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* --- Parallax layers --- */
.parallax-slow {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* --- Philosophy section: stagger + floating --- */
.philosophy-text h2,
.philosophy-text p,
.philosophy-keywords {
    opacity: 0;
    transform: translateY(24px);
}

.philosophy-section.visible .philosophy-text h2 {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.philosophy-section.visible .philosophy-text p:nth-of-type(1) {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.philosophy-section.visible .philosophy-text p:nth-of-type(2) {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.philosophy-section.visible .philosophy-keywords {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
}

/* --- About section: stagger children (legacy) --- */
.about-text h2,
.about-text p,
.about-image {
    opacity: 0;
    transform: translateY(24px);
}

.about-section.visible .about-text h2 {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.about-section.visible .about-text p:nth-of-type(1) {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
}

.about-section.visible .about-text p:nth-of-type(2) {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.about-section.visible .about-image {
    animation: fadeSlideUp 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.25s forwards;
}

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

/* --- Explore blogs button --- */
.explore-blogs-btn {
    opacity: 0;
    transform: translateY(12px);
}

.about-section.visible .explore-blogs-btn {
    animation: fadeSlideUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.5s forwards;
}

.explore-blogs-btn:hover {
    letter-spacing: 0.08em;
}

.explore-blogs-btn-animate {
    position: relative;
}

.explore-blogs-btn-animate::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.explore-blogs-btn-animate:hover::after {
    width: 100%;
}

/* --- Philosophy: tiny stars appear and fade behind text --- */
.philosophy-star-dot {
    position: absolute;
    width: 3px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    box-shadow: 0 0 6px rgba(212, 175, 55, 0.4);
    pointer-events: none;
    animation: philosophyStarFade 4s ease-in-out forwards;
}

@keyframes philosophyStarFade {
    0% { opacity: 0; transform: scale(0.5); }
    20% { opacity: 0.9; transform: scale(1); }
    80% { opacity: 0.5; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.8); }
}

/* --- Blog cards: subtle hover (Lunar Astro style) --- */
.blog-card .blog-card-image img {
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.03);
}

/* --- Blog list stagger (Lunar Astro) --- */
.blog-list .lunar-post {
    opacity: 0;
    transform: translateY(12px);
    animation: cardReveal 0.5s ease forwards;
}

.blog-list .lunar-post:nth-child(n) { animation-delay: 0.03s; }

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

/* --- Hero (blogs page) --- */
.blogs-hero .hero-content h1 {
    overflow: hidden;
}

.blogs-hero .hero-content h1 span {
    display: inline-block;
    transform: translateY(100%);
    animation: revealUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

.blogs-hero .hero-subtitle {
    opacity: 0;
    animation: fadeInUp 0.8s ease 0.5s forwards;
}

/* --- Nav link underline animation --- */
.nav-links a {
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent-gold);
    transition: width 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

/* --- Filter buttons --- */
.filter-btn {
    transition: transform 0.2s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

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

.filter-btn.active {
    transform: translateY(-1px);
}

/* --- Page load overlay (optional) --- */
.page-load-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-primary);
    z-index: 9999;
    pointer-events: none;
    animation: overlayFadeOut 1s ease 0.5s forwards;
}

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

/* --- Lotus petals: subtle breathe --- */
.lotus-petal {
    transform-origin: 100px 100px;
    animation: lotusBreathe 8s ease-in-out infinite;
}

.lotus-petal.p1 { animation-delay: 0s; }
.lotus-petal.p2 { animation-delay: 1s; }
.lotus-petal.p3 { animation-delay: 2s; }
.lotus-petal.p4 { animation-delay: 3s; }
.lotus-petal.p5 { animation-delay: 4s; }
.lotus-petal.p6 { animation-delay: 5s; }
.lotus-petal.p7 { animation-delay: 6s; }
.lotus-petal.p8 { animation-delay: 7s; }

@keyframes lotusBreathe {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.03); }
}

.about-section .lotus-container:hover .lotus-petal {
    animation-duration: 5s;
}

.about-section .lotus-container:hover .lotus-center {
    animation: lotusPulse 2s ease-in-out infinite;
}

@keyframes lotusPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

/* --- Sacred geometry: counter-rotate inner --- */
.mandala-circle.c3 {
    animation: rotate 40s linear infinite reverse;
}

.mandala-circle.c4 {
    animation: rotate 20s linear infinite;
}

/* --- Subtitle fade + subtle float --- */
.subtitle {
    opacity: 0;
    animation: fadeIn 1s ease 0.9s forwards;
    animation-fill-mode: forwards;
}

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

.content-wrapper-animate .subtitle {
    animation: subtitleReveal 1.2s ease 0.9s forwards;
}

.hero-subheading {
    opacity: 0;
    animation: subtitleReveal 1s ease 1s forwards;
}

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

/* --- Button ripple (JS-triggered) --- */
@keyframes rippleOut {
    to { transform: scale(1); opacity: 0; }
}

/* --- Cursor glow (home only) --- */
.cursor-glow {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 65%);
    pointer-events: none;
    z-index: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
}

.landing-page .cursor-glow {
    opacity: 0;
}

/* --- Footer quote --- */
.landing-footer p {
    opacity: 0;
    animation: fadeIn 1s ease 2s forwards;
}
