/* ==========================================================================
   AVANTA KUMBHALGARH - ADVANCED CSS ARCHITECTURE (2026)
   ========================================================================== */

@layer reset, variables, typography, layout, components, animations;

@layer variables {
    :root {
        /* Joyful & Luxury Palette */
        --c-forest: #1A3626;
        --c-forest-light: color-mix(in srgb, var(--c-forest) 80%, white);
        --c-sand: #F7F4EF;
        --c-sand-dark: #E6DFD4;
        --c-gold: #D4AF37;
        --c-terracotta: #C86A4B;
        --c-white: #FFFFFF;
        --c-black: #0A0A0A;

        /* Typography */
        --f-serif: 'Cormorant Garamond', serif;
        --f-sans: 'Montserrat', sans-serif;

        /* Fluid Typography Clamps (Viewport responsive) */
        --fs-massive: clamp(4rem, 10vw, 10rem);
        --fs-h1: clamp(3rem, 6vw, 6rem);
        --fs-h2: clamp(2.5rem, 4vw, 4rem);
        --fs-h3: clamp(1.5rem, 2vw, 2.5rem);
        --fs-body: clamp(1rem, 1.2vw, 1.125rem);

        /* Spacing */
        --space-sm: 1rem;
        --space-md: 2rem;
        --space-lg: 4rem;
        --space-xl: 8rem;

        /* Easing */
        --ease-out-expo: cubic-bezier(0.19, 1, 0.22, 1);
        --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
        
        /* Layout */
        --container-width: 1400px;
        --header-height: 80px;
    }
}

@layer reset {
    *, *::before, *::after {
        box-sizing: border-box;
        margin: 0;
        padding: 0;
    }
    html {
        scrollbar-width: none; /* Hide for Lenis */
    }
    body {
        background-color: var(--c-sand);
        color: var(--c-forest);
        font-family: var(--f-sans);
        font-size: var(--fs-body);
        line-height: 1.6;
        overflow-x: hidden;
        -webkit-font-smoothing: antialiased;
    }
    img, picture, video, canvas, svg {
        display: block;
        max-width: 100%;
        height: auto;
    }
    a {
        text-decoration: none;
        color: inherit;
    }
    ul, ol {
        list-style: none;
    }
    button {
        border: none;
        background: none;
        cursor: pointer;
        font-family: inherit;
    }
}

@layer typography {
    h1, h2, h3, h4, h5, h6 {
        font-family: var(--f-serif);
        font-weight: 400;
        line-height: 1.1;
        text-wrap: balance;
    }
    .heading-massive { font-size: var(--fs-massive); text-transform: uppercase; letter-spacing: -0.02em; }
    .heading-large { font-size: var(--fs-h2); }
    .subheading {
        font-family: var(--f-sans);
        font-size: 0.875rem;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        color: var(--c-terracotta);
        display: block;
        margin-block-end: 1rem;
    }
    .body-text { margin-block-start: 1.5rem; color: var(--c-forest-light); max-width: 60ch; }
    .text-center { text-align: center; }
}

@layer layout {
    .container {
        width: min(100% - 4rem, var(--container-width));
        margin-inline: auto;
    }
    .container-fluid {
        width: 100%;
        padding-inline: 2rem;
    }
    .section {
        padding-block: var(--space-xl);
    }
    .bg-light { background-color: var(--c-white); }
}

@layer components {
    /* Custom Cursor */
    .custom-cursor {
        position: fixed;
        top: 0; left: 0;
        width: 20px; height: 20px;
        background: var(--c-gold);
        border-radius: 50%;
        pointer-events: none;
        z-index: 9999;
        mix-blend-mode: difference;
        transform: translate(-50%, -50%);
        transition: width 0.3s var(--ease-out-expo), height 0.3s var(--ease-out-expo);
    }
    body:hover .custom-cursor.active {
        width: 60px; height: 60px;
        background: var(--c-terracotta);
    }

    /* Preloader */
    .preloader {
        position: fixed;
        inset: 0;
        background-color: var(--c-forest);
        color: var(--c-sand);
        z-index: 10000;
        display: grid;
        place-items: center;
        font-family: var(--f-serif);
        font-size: var(--fs-h2);
    }

    /* Buttons */
    .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 1rem 2.5rem;
        border-radius: 50px;
        font-weight: 500;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        font-size: 0.875rem;
        transition: all 0.4s var(--ease-out-expo);
        position: relative;
        overflow: hidden;
    }
    .btn--outline {
        border: 1px solid var(--c-white);
        color: var(--c-white);
    }
    .btn--outline:hover {
        background-color: var(--c-white);
        color: var(--c-forest);
    }
    .btn--solid {
        background-color: var(--c-forest);
        color: var(--c-sand);
    }
    .btn--solid:hover {
        background-color: var(--c-gold);
        color: var(--c-forest);
    }
    .btn--large { padding: 1.5rem 3.5rem; font-size: 1rem; }

    /* Sticky Contact */
    .sticky-contact {
        position: fixed;
        bottom: 2rem;
        right: 2rem;
        display: flex;
        flex-direction: column;
        gap: 1rem;
        z-index: 900;
    }
    .sticky-icon {
        width: 60px; height: 60px;
        border-radius: 50%;
        display: grid;
        place-items: center;
        color: white;
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        transition: transform 0.3s var(--ease-out-expo);
    }
    .sticky-icon:hover { transform: translateY(-5px) scale(1.05); }
    .whatsapp { background-color: #25D366; }
    .call { background-color: var(--c-gold); color: var(--c-forest); }

    /* Floating Header - Centered with Dark Frosted Glass */
    .site-header {
        position: fixed;
        top: 2rem;
        left: 50%;
        transform: translateX(-50%);
        width: min(100% - 4rem, 1200px);
        z-index: 1000;
        color: var(--c-white);
    }
    
    .header-inner {
        display: flex;
        justify-content: space-between;
        align-items: center;
        /* Dark frosted glass background applied here to keep the pill shape readable */
        background: rgba(10, 10, 10, 0.85);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 0.6rem 2rem;
        border-radius: 100px;
        border: 1px solid rgba(255,255,255,0.1);
    }

    .main-nav ul { display: flex; gap: 2.5rem; }
    .main-nav a { font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.05em; position: relative; color: #fff; }
    .main-nav a::after {
        content: ''; position: absolute; bottom: -4px; left: 0;
        width: 0%; height: 1px; background: var(--c-gold);
        transition: width 0.3s ease;
    }
    .main-nav a:hover::after { width: 100%; }

    /* Header & Footer Logo Images */
    .nav-logo-img {
        height: 60px; 
        width: auto;
        border-radius: 50%;
        display: block;
    }

    .livinhub-logo-img {
        height: 35px; 
        width: auto;
        display: block;
    }

    /* Hero Slider */
    .hero-slider {
        position: relative;
        height: 100svh;
        width: 100%;
        overflow: hidden;
        background: var(--c-black);
    }
    .slide {
        position: absolute;
        inset: 0;
        opacity: 0;
        visibility: hidden;
    }
    .slide.active { opacity: 1; visibility: visible; }
    .slide-img { width: 100%; height: 100%; position: relative; }
    .slide-img::after {
        content: ''; position: absolute; inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.1) 100%);
    }
    .slide-img img { width: 100%; height: 100%; object-fit: cover; }
    .slide-content {
        position: absolute;
        bottom: 15%;
        left: 5%;
        color: var(--c-white);
        z-index: 10;
    }
    .slider-controls {
        position: absolute;
        bottom: 5%;
        right: 5%;
        display: flex;
        align-items: center;
        gap: 2rem;
        color: var(--c-white);
        z-index: 10;
    }
    .slider-controls button { color: var(--c-white); text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.875rem; }

    /* Intro Grid */
    .intro-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-lg);
        align-items: center;
    }
    .intro-image-wrap { height: 80svh; border-radius: 20px; overflow: hidden; }
    .intro-image-wrap .img-inner { height: 120%; }
    .intro-image-wrap img { width: 100%; height: 100%; object-fit: cover; }

    /* Opposing Scroll Section */
    .opposing-scroll-section {
        background: var(--c-forest);
        color: var(--c-sand);
        overflow: hidden;
        padding-block: var(--space-xl) calc(var(--space-xl) * 2);
    }
    .opposing-track {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: var(--space-lg);
        position: relative;
    }
    .opp-image {
        width: 40vw;
        height: 60vh;
        position: relative;
        overflow: hidden;
        border-radius: 12px;
    }
    .opp-image img { width: 100%; height: 100%; object-fit: cover; }
    .opp-label {
        position: absolute;
        bottom: 2rem;
        left: 2rem;
        font-size: var(--fs-h3);
        z-index: 2;
    }
    .opp-image::after {
        content: ''; position: absolute; inset: 0;
        background: linear-gradient(transparent, rgba(0,0,0,0.6));
    }

    /* Villas Section */
    .villas-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
        gap: 2rem;
        margin-top: var(--space-lg);
    }
    .villa-card {
        display: block;
        border-radius: 16px;
        overflow: hidden;
        position: relative;
    }
    .villa-card .img-inner { height: 500px; }
    .villa-card img { width: 100%; height: 100%; object-fit: cover; }
    .villa-info {
        position: absolute;
        bottom: 0; left: 0; width: 100%;
        padding: 2rem;
        background: linear-gradient(transparent, rgba(26, 54, 38, 0.9));
        color: var(--c-white);
    }

    /* Amenities */
    .amenities-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 3rem;
        border-top: 1px solid var(--c-sand-dark);
        padding-top: var(--space-lg);
    }
    .amenity-item { text-align: center; }
    .am-icon {
        font-family: var(--f-serif); font-size: 3rem;
        color: var(--c-terracotta); margin-bottom: 1rem;
    }

    /* Pools Section */
    .pools-header { margin-bottom: 4rem; max-width: 700px; }
    .pools-showcase {
        display: grid;
        grid-template-columns: 1.5fr 1fr;
        gap: 2rem;
        align-items: stretch;
    }
    .pool-main, .pool-secondary {
        position: relative;
        border-radius: 12px;
        height: 60vh;
        min-height: 400px;
    }
    .pool-secondary { height: 100%; }
    .pools-showcase img { width: 100%; height: 100%; object-fit: cover; }
    .pool-label {
        position: absolute;
        bottom: 2rem;
        left: 2rem;
        color: #fff;
        font-size: clamp(1.2rem, 2vw, 1.8rem);
        font-family: var(--f-serif);
        z-index: 2;
    }
    .pool-main::after, .pool-secondary::after {
        content: ''; position: absolute; inset: 0;
        background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 40%);
        pointer-events: none;
    }

    /* Gallery Section (Asymmetrical Grid) */
    .gallery-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: 300px;
        gap: 1.5rem;
    }
    .gallery-item { position: relative; border-radius: 12px; display: block; }
    .gallery-item img { width: 100%; height: 100%; object-fit: cover; }
    .item-wide { grid-column: span 2; }
    .item-tall { grid-row: span 2; }

    /* Massive CTA */
    .cta-parallax { position: relative; height: 100svh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
    .cta-img-wrap { position: absolute; inset: 0; z-index: 1; }
    .cta-img-wrap img { width: 100%; height: 120%; object-fit: cover; }
    .cta-content { position: relative; z-index: 2; text-align: center; color: var(--c-white); }
    .cta-content h2 { margin-bottom: 2rem; }

    /* Footer */
    .site-footer {
        background: var(--c-black);
        color: var(--c-white);
        padding-top: var(--space-xl);
        padding-bottom: 2rem;
    }
    .footer-container { width: min(100% - 4rem, var(--container-width)); margin-inline: auto; }
    
    /* Centered Footer Links */
    .footer-top {
        display: flex;
        justify-content: center; 
        flex-wrap: wrap;
        gap: 4rem;
        margin-bottom: 4rem;
    }
    .footer-brand h2 { font-size: clamp(3rem, 8vw, 8rem); line-height: 0.9; margin-bottom: 1rem; color: var(--c-gold); }
    
    .footer-links {
        display: flex;
        justify-content: center; 
        gap: 5rem;
        flex-wrap: wrap;
        flex-grow: 1;
    }
    
    .link-col h4 { font-family: var(--f-sans); font-size: 1rem; text-transform: uppercase; color: var(--c-sand-dark); margin-bottom: 1.5rem; }
    .link-col ul { display: flex; flex-direction: column; gap: 1rem; }
    .link-col a { transition: color 0.3s ease; }
    .link-col a:hover { color: var(--c-gold); }
    
    /* Livinhub Widget Centering Fix */
    .footer-hospitality-widget {
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        padding-left: 3rem;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }
    .widget-subtitle { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; opacity: 0.7; margin-bottom: 0.5rem; }
    .livinhub-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 0.8rem; }
    .livinhub-brand h3 { font-family: var(--f-sans); font-size: 1.1rem; margin: 0; color: var(--c-white); }
    
    .hospitality-link {
        display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; 
        text-transform: uppercase; letter-spacing: 0.05em; color: var(--c-gold); transition: opacity 0.3s ease;
    }
    .hospitality-link:hover { opacity: 0.8; }
    .hospitality-link .arrow { transition: transform 0.3s ease; }
    .hospitality-link:hover .arrow { transform: translateX(5px); }

    .footer-bottom {
        display: flex; justify-content: space-between; align-items: center;
        padding-top: 2rem; border-top: 1px solid rgba(255,255,255,0.1);
        font-size: 0.875rem; color: var(--c-sand-dark);
    }
    .legal { display: flex; gap: 2rem; }

    /* Utility: Image Hover Zoom (Joyful Effect) */
    .img-hover-zoom { overflow: hidden; }
    .img-hover-zoom img {
        transition: transform 1.2s var(--ease-out-expo);
        will-change: transform;
    }
    .img-hover-zoom:hover img {
        transform: scale(1.08);
    }

    /* Responsive adjustments */
    @media (max-width: 992px) {
        .pools-showcase { grid-template-columns: 1fr; }
        .pool-main, .pool-secondary { height: 40vh; min-height: 300px; }
        .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 250px; }
        .item-wide { grid-column: span 2; }
        .item-tall { grid-row: span 1; }
        
        .footer-hospitality-widget {
            border-left: none;
            padding-left: 0;
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-top: 2rem;
            width: 100%;
            align-items: center;
            text-align: center;
        }
    }
    
    @media (max-width: 768px) {
        .intro-grid { grid-template-columns: 1fr; }
        .opposing-track { flex-direction: column; gap: 2rem; }
        .opp-image { width: 100%; height: 40vh; }
        .footer-top { flex-direction: column; }
        .site-header { width: calc(100% - 2rem); top: 1rem; }
        .main-nav { display: none; }
        .header-inner { padding: 0.5rem 1rem; }
    }
}

/* ==========================================================================
       WEBSITERO SIGNATURE
       ========================================================================== */
    .websitero-signature {
        text-align: center;
        font-size: 0.75rem;
        letter-spacing: 0.08em;
        margin: 0 1rem;
    }
    
    .websitero-signature a {
        color: var(--c-sand-dark);
        opacity: 0.6;
        transition: all 0.4s var(--ease-out-expo);
        text-decoration: none;
        display: inline-flex;
        align-items: center;
        gap: 6px;
    }
    
    .websitero-signature a:hover {
        opacity: 1;
        color: var(--c-white);
    }
    
    .websitero-signature .highlight {
        color: var(--c-gold);
        font-family: var(--f-sans);
        font-weight: 600;
        letter-spacing: 0.15em;
        text-transform: uppercase;
        position: relative;
    }

    /* Little underline animation for the brand name on hover */
    .websitero-signature .highlight::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0%;
        height: 1px;
        background-color: var(--c-gold);
        transition: width 0.4s ease;
    }
    
    .websitero-signature a:hover .highlight::after {
        width: 100%;
    }

    .websitero-signature .divider {
        opacity: 0.4;
        font-weight: 300;
    }
    
    /* Ensure it stacks nicely on mobile */
    @media (max-width: 768px) {
        .websitero-signature {
            margin: 1.5rem 0;
            order: 3; /* Pushes the signature to the very bottom on phones */
        }
    }