/* Custom styles for Madras Central Cafe */

:root {
    --banana-green: #2D5A27;
    --spice-gold: #D4AF37;
    --leaf-color: rgba(45, 90, 39, 0.05);
}

* {
    cursor: none !important; /* Hide default cursor for custom one */
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    background-color: #fff;
}

/* Custom Cursor */
#cursor {
    width: 20px;
    height: 20px;
    background-color: var(--spice-gold);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.1s ease;
}

#cursor-follower {
    width: 40px;
    height: 40px;
    border: 2px solid var(--banana-green);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: transform 0.2s ease, width 0.3s, height 0.3s;
}

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

.loader-logo {
    width: 120px;
    height: auto;
    animation: loader-pulse 2s infinite ease-in-out;
}

@keyframes loader-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.1); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Scroll Progress Bar */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 5px;
    background: linear-gradient(to right, var(--banana-green), var(--spice-gold));
    z-index: 10001;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f9f9f9;
}

::-webkit-scrollbar-thumb {
    background: var(--banana-green);
    border-radius: 10px;
}

/* Lenis Smooth Scroll */
html.lenis {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}

/* SVG Patterns */
.bg-pattern-dots {
    background-image: radial-gradient(rgba(45, 90, 39, 0.2) 0.5px, transparent 0.5px);
    background-size: 20px 20px;
}

.bg-pattern-leaves {
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0c16.568 0 30 13.432 30 30S46.568 60 30 60 0 46.568 0 30 13.432 0 30 0zm0 10C18.954 10 10 18.954 10 30s8.954 20 20 20 20-8.954 20-20S41.046 10 30 10z' fill='%232D5A27' fill-opacity='0.03' fill-rule='evenodd'/%3E%3C/svg%3E");
}

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--banana-green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

@keyframes btt-pulse {
    0% { box-shadow: 0 0 0 0 rgba(45, 90, 39, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(45, 90, 39, 0); }
    100% { box-shadow: 0 0 0 0 rgba(45, 90, 39, 0); }
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    animation: btt-pulse 2s infinite;
}

#back-to-top:hover {
    background: var(--spice-gold);
    transform: scale(1.1);
}

/* Image Parallax */
.parallax-container {
    overflow: hidden;
    position: relative;
}

.parallax-img {
    height: 120%;
    width: 100%;
    object-fit: cover;
    position: absolute;
    top: -10%;
}

/* Text Split Animation Class */
.split-line {
    overflow: hidden;
}

/* Refined Preloader */
#preloader {
    background: #fff;
}

.loader-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.loader-bar {
    width: 150px;
    height: 2px;
    background: #f1f1f1;
    position: relative;
    overflow: hidden;
}

.loader-bar::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 50%;
    background: var(--banana-green);
    animation: loader-progress 1.5s infinite ease-in-out;
}

@keyframes loader-progress {
    0% { left: -50%; }
    100% { left: 100%; }
}

/* Noise Texture Overlay */
.noise {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://grainy-gradients.vercel.app/noise.svg');
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--spice-gold);
}

/* Glassmorphism */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

.glass-nav {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(135deg, var(--banana-green), var(--spice-gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hover Lift Effect */
.hover-lift {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Rotating Graphics */
.rotate-slow {
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Floating Animation Enhanced */
@keyframes float-gentle {
    0%, 100% { transform: translateY(0) rotate(0); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.float-gentle {
    animation: float-gentle 6s ease-in-out infinite;
}

/* Hero Overlay Animation */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.4) 100%);
    pointer-events: none;
}

/* Reveal Text Animation */
.reveal-text {
    position: relative;
    overflow: hidden;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--spice-gold);
    transform: translateX(-100%);
}

.reveal-text.aos-animate::after {
    animation: reveal-block 1s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes reveal-block {
    0% { transform: translateX(-100%); }
    50% { transform: translateX(0); }
    100% { transform: translateX(100%); }
}

/* Stats Counter Decoration */
.stats-card {
    border-bottom: 4px solid var(--spice-gold);
}

/* Footer Social Icon Animation */
.social-icon {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: var(--spice-gold);
    transform: rotate(360deg);
}

/* Pulse Glow for Cards */
.glow-on-hover:hover {
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
}

/* SVG Dividers */
.divider {
    position: absolute;
    width: 100%;
    left: 0;
    line-height: 0;
    z-index: 1;
}

.divider-top { top: -1px; }
.divider-bottom { bottom: -1px; }

.divider svg {
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
}

.divider .shape-fill {
    fill: #f9fafb; /* gray-50 */
}

/* Hero Text Animation */
.text-pop-up {
    animation: text-pop-up 0.8s cubic-bezier(0.250, 0.460, 0.450, 0.940) both;
}

@keyframes text-pop-up {
    0% { transform: translateY(100px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

/* Particles Container */
#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Magnetic Button */
.magnetic-btn {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* 3D Tilt */
.tilt-card {
    transform-style: preserve-3d;
    transform: perspective(1000px);
}

/* Floating leaf animation */
.floating-leaf {
    position: absolute;
    color: var(--leaf-color);
    z-index: -1;
    animation: float 15s infinite linear;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, 50px) rotate(120deg); }
    66% { transform: translate(-20px, 100px) rotate(240deg); }
    100% { transform: translate(0, 0) rotate(360deg); }
}

.leaf-1 { top: 10%; left: 5%; font-size: 5rem; animation-delay: 0s; }
.leaf-2 { top: 40%; right: 5%; font-size: 8rem; animation-delay: -2s; }
.leaf-3 { bottom: 20%; left: 10%; font-size: 6rem; animation-delay: -5s; }
.leaf-4 { top: 70%; right: 15%; font-size: 4rem; animation-delay: -8s; }

/* Button Shimmer Effect */
.btn-shimmer {
    position: relative;
    overflow: hidden;
}

.btn-shimmer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transform: rotate(45deg);
    transition: 0.5s;
}

.btn-shimmer:hover::before {
    left: 100%;
    top: 100%;
}

/* Animated Gradient Background */
.bg-animate-gradient {
    background: linear-gradient(-45deg, #2D5A27, #3a7532, #D4AF37, #b8952d);
    background-size: 400% 400%;
    animation: gradient 15s ease infinite;
}

@keyframes gradient {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Text Reveal Animation */
.text-reveal-container {
    overflow: hidden;
}

.text-reveal-content {
    display: inline-block;
    transform: translateY(100%);
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1);
}

.aos-animate .text-reveal-content {
    transform: translateY(0);
}

/* Scroll Blur Effect for Hero */
.hero-scroll-blur {
    transition: filter 0.3s ease;
}

/* Floating Image */
.float-img {
    animation: float-img 4s ease-in-out infinite;
}

@keyframes float-img {
    0% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
    100% { transform: translateY(0px) rotate(0deg); }
}

/* Enhanced Magnetic Button */
.magnetic-wrap {
    display: inline-block;
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Image Tilt Effect */
.img-tilt {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.img-tilt:hover {
    transform: scale(1.05) rotateX(5deg) rotateY(5deg);
}

/* Custom transitions */
.transition-slow {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Card hover effect */
.menu-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Button Pulse Animation */
@keyframes pulse-gold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.4); }
    70% { box-shadow: 0 0 0 20px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.btn-pulse {
    animation: pulse-gold 2s infinite;
}

/* Sticky header enhancement */
header.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    background-color: rgba(255, 255, 255, 0.95);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

header.scrolled .logo-img {
    height: 3.5rem;
}

header.scrolled .logo-text {
    font-size: 1.5rem; /* text-2xl equivalent */
}

@media (min-width: 768px) {
    header.scrolled .logo-img {
        height: 4.5rem;
    }
    header.scrolled .logo-text {
        font-size: 1.875rem; /* text-3xl equivalent */
    }
}

/* Enhanced Navbar Links */
.nav-link {
    position: relative;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-link::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--banana-green);
    border-radius: 9999px;
    transform: scale(0.7);
    opacity: 0;
    z-index: -1;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::before {
    transform: scale(1);
    opacity: 1;
}

.nav-link:hover {
    color: white !important;
    letter-spacing: 0.25em;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 5px;
    height: 5px;
    background: var(--spice-gold);
    border-radius: 50%;
    transform: translateX(-50%) scale(0);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-link:hover::after {
    transform: translateX(-50%) scale(1);
}

/* Image Reveal Animation */
.img-reveal {
    position: relative;
    overflow: hidden;
}

.img-reveal::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--banana-green);
    transform: translateX(-101%);
    transition: transform 0.6s cubic-bezier(0.77, 0, 0.175, 1);
}

.img-reveal.aos-animate::after {
    transform: translateX(101%);
}
