/* ==========================================================
   Arogya Panchakarma — Motion & liveliness enhancement layer
   Purely additive: layers on top of style.css, doesn't override
   existing design tokens. Everything here respects
   prefers-reduced-motion.
   ========================================================== */

/* ---------- Page load fade-in ---------- */
body { opacity: 0; }
body.js-ready { opacity: 1; transition: opacity 0.55s var(--ease); }
body.js-leaving { opacity: 0; transition: opacity 0.28s ease; }
@media (prefers-reduced-motion: reduce) {
    body, body.js-ready, body.js-leaving { opacity: 1 !important; transition: none !important; }
}
/* Safety net: if JS never runs (blocked/failed), don't leave the page blank */
body { animation: force-visible 0s 0.8s forwards; }
@keyframes force-visible { to { opacity: 1; } }

/* ---------- Scroll progress bar ---------- */
.scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--gold) 0%, var(--copper) 100%);
    z-index: 999;
    box-shadow: 0 0 8px rgba(200,155,60,0.5);
}

/* ---------- Inner-page banners: same ambient language as the homepage hero,
   scaled down for a short single-line banner instead of a full hero ---------- */
.page-banner {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.page-banner::before {
    content: '';
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(600px 260px at 78% 20%, rgba(228, 199, 126, 0.14), transparent 65%);
}
.page-banner .container { position: relative; z-index: 2; }
.page-banner .eyebrow { display: inline-block; animation: fade-up 0.6s var(--ease) both; }
.page-banner h1 { animation: fade-up 0.7s var(--ease) 0.08s both; }
@media (prefers-reduced-motion: reduce) {
    .page-banner .eyebrow, .page-banner h1 { animation: none; }
}

/* ---------- Hero: drifting ambient light particles ---------- */
.hero { isolation: isolate; }
.hero-particles {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background-image:
        radial-gradient(2px 2px at 10% 22%, rgba(228,199,126,0.55), transparent 60%),
        radial-gradient(2px 2px at 82% 28%, rgba(228,199,126,0.45), transparent 60%),
        radial-gradient(1.5px 1.5px at 42% 68%, rgba(228,199,126,0.4), transparent 60%),
        radial-gradient(2px 2px at 66% 82%, rgba(228,199,126,0.35), transparent 60%),
        radial-gradient(1.5px 1.5px at 24% 52%, rgba(228,199,126,0.45), transparent 60%),
        radial-gradient(2px 2px at 92% 62%, rgba(228,199,126,0.35), transparent 60%),
        radial-gradient(1.5px 1.5px at 55% 15%, rgba(228,199,126,0.3), transparent 60%);
    animation: drift-particles 20s ease-in-out infinite;
}
@keyframes drift-particles {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-12px, -18px); }
}
@media (prefers-reduced-motion: reduce) { .hero-particles { animation: none; } }

/* Cursor-follow spotlight glow (JS updates --mx / --my on mousemove) */
.hero-spotlight {
    position: absolute; inset: 0; z-index: 1; pointer-events: none;
    background: radial-gradient(280px circle at var(--mx, 50%) var(--my, 30%), rgba(228,199,126,0.16), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}
.hero:hover .hero-spotlight { opacity: 1; }
@media (hover: none) { .hero-spotlight { display: none; } }

/* ---------- Hero visual: gentle parallax float ---------- */
.hero-visual { animation: float-visual 6s ease-in-out infinite; }
@keyframes float-visual {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}
@media (prefers-reduced-motion: reduce) { .hero-visual { animation: none; } }

/* ---------- Buttons: shine sweep + ripple ---------- */
.btn { position: relative; overflow: hidden; }
.btn::before {
    content: '';
    position: absolute; top: 0; left: -60%;
    width: 40%; height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,0.35), transparent);
    transform: skewX(-20deg);
    transition: left 0.65s var(--ease);
    pointer-events: none;
}
.btn:hover::before { left: 130%; }
.btn .ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    background: rgba(255,255,255,0.55);
    animation: ripple-anim 0.6s ease-out;
    pointer-events: none;
}
@keyframes ripple-anim { to { transform: scale(3); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    .btn::before { display: none; }
    .btn .ripple { animation: none; display: none; }
}

/* ---------- Cards: subtle 3D tilt on hover (JS-driven transform) ---------- */
.card, .service-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.15s ease-out, box-shadow 0.25s var(--ease), background 0.25s ease;
}

/* ---------- Section heading: animated gradient underline on view ---------- */
.section-head h2, .section-head.left h2 {
    position: relative;
    display: inline-block;
}
.section-head h2::after {
    content: '';
    position: absolute;
    left: 50%; bottom: -10px;
    height: 3px; width: 0;
    background: linear-gradient(90deg, var(--gold), var(--copper));
    transform: translateX(-50%);
    transition: width 0.7s var(--ease) 0.1s;
    border-radius: 2px;
}
.section-head.left h2::after { left: 0; transform: none; }
.section-head.in-view h2::after { width: 64px; }
@media (prefers-reduced-motion: reduce) {
    .section-head h2::after { transition: none; width: 64px; }
}

/* ---------- Badge / eyebrow: soft pulse ---------- */
.badge {
    position: relative;
    animation: badge-pulse 2.6s ease-in-out infinite;
}
@keyframes badge-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200,155,60,0.35); }
    50% { box-shadow: 0 0 0 7px rgba(200,155,60,0); }
}

/* ---------- Sticky call/whatsapp bar: pulsing ring ---------- */
.floating-bar a { position: relative; overflow: visible; }
.floating-bar a::after {
    content: '';
    position: absolute; inset: 0;
    border-radius: inherit;
    animation: ring-pulse 2.4s ease-out infinite;
    pointer-events: none;
}
.floating-bar a.whatsapp::after { animation-delay: 1.2s; }
@keyframes ring-pulse {
    0% { box-shadow: 0 0 0 0 rgba(255,255,255,0.45); }
    100% { box-shadow: 0 0 0 14px rgba(255,255,255,0); }
}

/* ---------- Enquiry floating trigger: gentle bob ---------- */
.enquiry-trigger-btn { animation: enquiry-bob 3s ease-in-out infinite; }
.enquiry-trigger-btn:hover { animation-play-state: paused; }
@keyframes enquiry-bob {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* ---------- Image reveal wipe (auto-applied by JS to images inside .reveal) ---------- */
.reveal picture, .reveal .gallery-item, .reveal .team-photo-wrap { overflow: hidden; }
.reveal img {
    transition: transform 1s var(--ease), filter 1s var(--ease);
}
.reveal:not(.is-visible) img { transform: scale(1.08); filter: saturate(0.85); }

/* ---------- FAQ: color pulse while open ---------- */
.faq-item.open .faq-question { color: var(--copper); transition: color 0.25s ease; }

/* ---------- Back-to-top: bouncy entrance ---------- */
.back-to-top.visible { animation: bounce-in 0.45s var(--ease); }
@keyframes bounce-in {
    0% { transform: translateY(20px) scale(0.8); opacity: 0; }
    60% { transform: translateY(-4px) scale(1.05); opacity: 1; }
    100% { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- Nav brand: tiny entrance ---------- */
.brand-logo, .brand svg { animation: fade-up 0.7s var(--ease) both; }

/* ---------- Generic stagger-aware reveal helper (JS assigns --reveal-delay for
   elements that don't already declare it, e.g. auto-detected .section-head) ---------- */
.section-head.reveal-auto {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.section-head.reveal-auto.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
    .hero-visual,
    .badge,
    .floating-bar a::after,
    .enquiry-trigger-btn,
    .back-to-top.visible,
    .brand-logo, .brand svg,
    .section-head.reveal-auto { animation: none !important; }
    .section-head.reveal-auto { opacity: 1 !important; transform: none !important; }
    .reveal:not(.is-visible) img { transform: none; filter: none; }
}
