/* ================================================================
   PREMIUM VISUAL ENHANCEMENTS
   Sandalwood Estate - Modern & Sophisticated Design
   ================================================================ */

/* ========================================
   CSS VARIABLES & SMOOTH SCROLL
   ======================================== */
:root {
    --animation-speed: 0.6s;
    --easing: cubic-bezier(0.34, 1.56, 0.64, 1);
    --easing-smooth: cubic-bezier(0.4, 0, 0.2, 1);
    --primary-brown: #3E2723;
    --accent-gold: #D4AF37;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

html {
    scroll-behavior: smooth;
}

/* ========================================
   LOADING SCREEN
   ======================================== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3E2723 0%, #5D4037 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loading-screen.fade-out {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    width: 120px;
    height: 120px;
    margin-bottom: 30px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.loader-text {
    color: #fff;
    font-size: 1.4rem;
    margin-top: 20px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    opacity: 0.8;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

/* ========================================
   ENHANCED HEADER / NAVBAR
   ======================================== */
.header {
    transition: all 0.4s var(--easing-smooth);
    backdrop-filter: blur(0px);
}

.header.scrolled {
    padding: 1.5rem 2rem;
    background: rgba(62, 39, 35, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.header.scrolled .logo img {
    transform: scale(0.85);
    transition: transform 0.4s var(--easing-smooth);
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s var(--easing-smooth),
        transform 0.8s var(--easing-smooth);
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 {
    transition-delay: 0.2s;
}

.reveal-delay-2 {
    transition-delay: 0.4s;
}

.reveal-delay-3 {
    transition-delay: 0.6s;
}

/* ========================================
   GLASSMORPHISM EFFECTS
   ======================================== */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.pillar-card,
.brewing-intro,
.brewing-methods {
    position: relative;
    overflow: hidden;
}

.pillar-card::before,
.sustainability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
            rgba(255, 255, 255, 0.1) 0%,
            transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.pillar-card:hover::before,
.sustainability-card:hover::before {
    opacity: 1;
}

/* ========================================
   SCROLL INDICATOR
   ======================================== */
.scroll-indicator {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    text-align: center;
    cursor: pointer;
    transition: opacity 0.4s ease;
}

.scroll-indicator-icon {
    width: 30px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 25px;
    position: relative;
    margin: 0 auto 10px;
}

.scroll-indicator-icon::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: scroll-down 2s infinite;
}

.scroll-indicator-text {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.2rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

@keyframes scroll-down {
    0% {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
    }

    100% {
        transform: translateX(-50%) translateY(20px);
        opacity: 0;
    }
}

/* ========================================
   FLOATING WHATSAPP BUTTON
   ======================================== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s var(--easing);
    opacity: 0;
    transform: scale(0);
}

.whatsapp-float.visible {
    opacity: 1;
    transform: scale(1);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float i {
    color: #fff;
    font-size: 2.8rem;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: #25D366;
    animation: pulse-ring 2s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* ========================================
   ENHANCED VIDEO PLAYER
   ======================================== */
.intro-video {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    margin: 5rem 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transition: transform 0.4s var(--easing), box-shadow 0.4s ease;
}

.intro-video:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4);
}

.intro-video video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
    backdrop-filter: blur(5px);
}

.video-overlay.playing {
    opacity: 0;
    pointer-events: none;
}

.video-overlay i {
    font-size: 6rem;
    color: #fff;
    background: rgba(255, 255, 255, 0.2);
    width: 100px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 3px solid #fff;
    transition: all 0.3s var(--easing);
}

.video-overlay:hover i {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.3);
}

/* ========================================
   FLOATING DECORATIVE ELEMENTS
   ======================================== */
.coffee-bean-pattern {
    position: absolute;
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(5deg);
    }
}

/* ========================================
   ENHANCED TESTIMONIALS
   ======================================== */
.testimonials-section .box {
    position: relative;
    overflow: hidden;
}

.testimonials-section .box::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(to bottom,
            rgba(255, 255, 255, 0.05),
            rgba(255, 255, 255, 0));
    transform: rotateZ(0deg);
    transition: transform 0.6s ease;
}

.testimonials-section .box:hover::after {
    transform: rotateZ(180deg);
}

/* ========================================
   MAGNETIC BUTTONS
   ======================================== */
.magnetic-btn {
    transition: transform 0.2s ease-out;
    cursor: pointer;
}

/* ========================================
   GRADIENT OVERLAYS
   ======================================== */
.gradient-overlay {
    position: relative;
    overflow: hidden;
}

.gradient-overlay::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            rgba(212, 175, 55, 0.1) 0%,
            transparent 50%,
            rgba(62, 39, 35, 0.1) 100%);
    pointer-events: none;
    animation: gradient-shift 8s ease infinite;
}

@keyframes gradient-shift {

    0%,
    100% {
        opacity: 0.3;
    }

    50% {
        opacity: 0.6;
    }
}

/* ========================================
   ENHANCED HOVER STATES
   ======================================== */
.pillar-card,
.sustainability-card,
.method-item {
    transition: all 0.4s var(--easing);
}

.method-item::before {
    content: '→';
    margin-right: 10px;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s var(--easing);
    display: inline-block;
}

.method-item:hover::before {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   ANIMATED STATISTICS COUNTERS
   ======================================== */
.stat .num {
    font-weight: 700;
    display: inline-block;
    transition: transform 0.3s var(--easing);
}

.stat:hover .num {
    transform: scale(1.1);
    color: var(--accent-gold);
}

/* ========================================
   IMAGE LAZY LOADING EFFECT
   ======================================== */
img {
    transition: opacity 0.4s ease, filter 0.4s ease;
}

/* ========================================
   ENHANCED BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    transition: all 0.3s var(--easing);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* ========================================
   TEXT REVEAL ANIMATION
   ======================================== */
.animate-text .char {
    display: inline-block;
    opacity: 0;
    transform: translateY(20px);
    animation: revealChar 0.6s var(--easing) forwards;
}

@keyframes revealChar {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float i {
        font-size: 2.2rem;
    }

    .scroll-indicator {
        bottom: 30px;
    }

    .video-overlay i {
        font-size: 4rem;
        width: 70px;
        height: 70px;
    }

    .header.scrolled {
        padding: 1rem 1.5rem;
    }
}

/* ========================================
   PRINT STYLES (hide animations)
   ======================================== */
@media print {

    .loading-screen,
    .whatsapp-float,
    .scroll-indicator,
    .video-overlay,
    .back-to-top {
        display: none !important;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 3px solid var(--accent-gold);
    outline-offset: 3px;
}