/* ============================================================
   HAMLET ON THE GANGES — animations.css
   Ultra-Premium Cinematic Reveal System — Companion Styles
   Drop-in: zero changes to style.css needed.
   ============================================================ */

/* ── WORD / CHAR SPLIT CONTAINERS ────────────────────────────
   These are injected by animations.js for title reveals.
   The outer .h-word-wrap clips overflow so words slide up
   from below the line elegantly.
   ──────────────────────────────────────────────────────────── */
.h-word-wrap {
    display: inline-block;
    overflow: hidden;
    vertical-align: bottom;
    line-height: inherit;
    /* Tiny gap between words */
    margin-right: 0.22em;
}

.h-word {
    display: inline-block;
    will-change: transform, opacity;
    transform-origin: bottom center;
}

.h-char {
    display: inline-block;
    will-change: transform, opacity;
    transform-origin: bottom center;
}

/* ── SCROLL PROGRESS BAR ─────────────────────────────────────
   A thin gold line at the very top of the viewport that fills
   as the user scrolls down the page.
   ──────────────────────────────────────────────────────────── */
.h-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 2.5px;
    background: linear-gradient(90deg, #C6A76B 0%, #e0c98a 50%, #9e7f47 100%);
    transform: scaleX(0);
    transform-origin: left;
    z-index: 9999;
    pointer-events: none;
    box-shadow: 0 0 10px rgba(198, 167, 107, 0.7), 0 0 4px rgba(198, 167, 107, 0.4);
}

/* ── CUSTOM GOLD CURSOR ──────────────────────────────────────
   Two-layer cursor: a sharp dot + a lagging soft ring.
   Replaces the default cursor for a premium feel.
   ──────────────────────────────────────────────────────────── */
/* @media (pointer: fine) {

    body {
        cursor: none !important;
    }

    a,
    button,
    [role="button"],
    label,
    input,
    textarea,
    select,
    .villa-v3-card,
    .gallery-v2-item,
    .connect-v2-img-wrap {
        cursor: none !important;
    }
} */

/* .h-cursor-dot {
    position: fixed;
    top: -6px;
    left: -6px;
    width: 10px;
    height: 10px;
    background: #C6A76B;
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    will-change: transform;
    mix-blend-mode: difference;
    transition: opacity 0.2s;
}

.h-cursor-ring {
    position: fixed;
    top: -20px;
    left: -20px;
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(198, 167, 107, 0.7);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    will-change: transform;
    backdrop-filter: none;
    transition: opacity 0.3s;
} */

/* Hide custom cursor on touch devices */
/* @media (pointer: coarse) {

    .h-cursor-dot,
    .h-cursor-ring {
        display: none !important;
    }

    body {
        cursor: auto !important;
    }
} */

/* ── IMAGE REVEAL: Clip-path base states ─────────────────────
   GSAP animates from these states — the base just ensures
   elements are visible before JS loads (progressive enhancement).
   ──────────────────────────────────────────────────────────── */
.villa-v2-frame,
.offer-v2-img-wrap,
.cuisine-img-wrap {
    will-change: clip-path, opacity, transform;
}

/* ── PAGE HERO ENHANCEMENT ───────────────────────────────────
   Adds a subtle animated gradient shimmer over the hero image
   and a bottom fog to help text readability.
   ──────────────────────────────────────────────────────────── */
.page-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.15) 0%,
            transparent 40%,
            rgba(0, 0, 0, 0.5) 100%);
    pointer-events: none;
    z-index: 2;
}

/* ── SECTION TITLE OVERFLOW MANAGEMENT ──────────────────────
   When words are split, we don't want the clipping to
   cause layout shift. This ensures natural flow.
   ──────────────────────────────────────────────────────────── */
.section-title,
.banner-title,
.villa-v2-title,
.moments-v3-title,
.luxury-form-title {
    overflow: visible !important;
    /* Words wrap naturally */
    -webkit-font-smoothing: antialiased;
}

/* ── CUISINE GRID: Hover brightness lift ────────────────────
   Small CSS polish to complement the GSAP hover effects.
   ──────────────────────────────────────────────────────────── */
.cuisine-grid-img {
    position: relative;
}

.cuisine-grid-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(198, 167, 107, 0);
    transition: background 0.5s ease;
    border-radius: inherit;
    pointer-events: none;
    z-index: 1;
}

.cuisine-grid-img:hover::after {
    background: rgba(198, 167, 107, 0.08);
}

/* ── VILLA V3 CARD DEPTH SHADOW ──────────────────────────────
   Enhances the hover state with a stronger depth shadow
   that complements the GSAP translateY animation.
   ──────────────────────────────────────────────────────────── */
.villa-v3-card {
    transition: box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        background 0.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.1s linear !important;
    /* transform managed by GSAP; ease by CSS for smoothness */
}



/* ── FEATURE PILLS: Pop-in from below ────────────────────────
   Initial state for progressive enhancement — pills visible
   if JS fails, but GSAP overrides to animate them in.
   ──────────────────────────────────────────────────────────── */
.feature-banner .feature-pill {
    will-change: transform, opacity;
}

/* ── TESTIMONIAL CARDS: Bottom border glow on hover ─────────
   Complements the GSAP scale hover animation.
   ──────────────────────────────────────────────────────────── */
.testimonial-v2-card {
    position: relative;
    overflow: hidden;
}

.testimonial-v2-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #C6A76B, transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.testimonial-v2-card:hover::after {
    transform: scaleX(1);
}

/* ── FOOTER LINKS: Gold underline draw ───────────────────────
   CSS-only micro-interaction for footer nav items.
   ──────────────────────────────────────────────────────────── */
.footer-links a {
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C6A76B;
    transition: width 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.footer-links a:hover::after {
    width: 100%;
}

/* ── SCROLL INDICATOR: Enhanced breathing pulse ─────────────
   Replaces / enhances existing scroll indicator animation.
   ──────────────────────────────────────────────────────────── */
.scroll-indicator {
    animation: scrollBreathe 3.5s ease-in-out infinite;
}

@keyframes scrollBreathe {

    0%,
    100% {
        opacity: 0.6;
        transform: translateX(-50%) translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateX(-50%) translateY(-6px);
    }
}

/* ── CONTACT INPUT: Gold focus ring ─────────────────────────
   Enhances the existing focus state with a softer glow.
   ──────────────────────────────────────────────────────────── */
.contact-input:focus {
    box-shadow:
        0 0 0 3px rgba(198, 167, 107, 0.18),
        0 0 20px rgba(198, 167, 107, 0.1) !important;
    transform: translateY(-1px);
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

/* ── VILLA TAG V2: Entrance pulse ────────────────────────────
   A one-time CSS pulse after the tag appears (set by GSAP).
   ──────────────────────────────────────────────────────────── */
.villa-tag-v2 {
    animation: tagPulse 2.5s ease-out 1.5s 1 forwards;
}

@keyframes tagPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(198, 167, 107, 0.6);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(198, 167, 107, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(198, 167, 107, 0);
    }
}

/* ── NAV ACTIVE INDICATOR: Gold dot ─────────────────────────
   A small dot under the active nav link as extra emphasis.
   ──────────────────────────────────────────────────────────── */
.navbar-nav .nav-link.active::before {
    content: '●';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.3rem;
    color: #C6A76B;
    opacity: 0.8;
    animation: dotFade 1.5s ease-in-out infinite alternate;
}

@keyframes dotFade {
    from {
        opacity: 0.4;
    }

    to {
        opacity: 1;
    }
}

/* ── GLIGHTBOX GOLD THEME OVERRIDE ──────────────────────────
   Tints the gallery lightbox close button to match brand.
   ──────────────────────────────────────────────────────────── */
.glightbox-clean .gnext,
.glightbox-clean .gprev {
    background: rgba(198, 167, 107, 0.2) !important;
    border: 1px solid rgba(198, 167, 107, 0.4) !important;
}

.glightbox-clean .gnext:hover,
.glightbox-clean .gprev:hover {
    background: rgba(198, 167, 107, 0.5) !important;
}

/* ── WILL-CHANGE CLEANUP ─────────────────────────────────────
   After animations complete, reset will-change to auto
   to free GPU layers. GSAP handles this automatically
   but we also set it for CSS-animated elements.
   ──────────────────────────────────────────────────────────── */
.h-word,
.h-char,
.h-scroll-progress,
.h-cursor-dot,
.h-cursor-ring {
    will-change: transform, opacity;
}

/* ── REDUCED MOTION: Accessibility ──────────────────────────
   Respects users who prefer reduced motion. GSAP animations
   will still run but CSS animations are disabled.
   ──────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {

    .h-cursor-dot,
    .h-cursor-ring,
    .h-scroll-progress,
    .scroll-indicator,
    .glass-connect-card::before,
    .villa-tag-v2,
    .testimonial-v2-card::after,
    .navbar-nav .nav-link.active::before {
        animation: none !important;
        transition: none !important;
    }

    .scroll-indicator {
        opacity: 1;
        transform: translateX(-50%);
    }
}