/* ============================================
   Villa Del Mar — Custom Styles
   ============================================ */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base styles */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(45, 95, 40, 0.08);
}

#navbar.scrolled .font-display,
#navbar.scrolled .text-forest-900 {
    color: #1e3c1a;
}

#navbar.scrolled .text-forest-600 {
    color: #2d5f28;
}

/* ============================================
   Hero Geometric Shapes
   ============================================ */
.geo-shape {
    position: absolute;
    opacity: 0.12;
    pointer-events: none;
}

.shape-circle-1 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: #26a69a;
    top: -100px;
    right: -100px;
    animation: float 8s ease-in-out infinite;
}

.shape-circle-2 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #84bf75;
    bottom: 15%;
    left: 5%;
    animation: float 6s ease-in-out infinite reverse;
}

.shape-circle-3 {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: #f5f0e0;
    top: 30%;
    left: 10%;
    animation: float 10s ease-in-out infinite;
}

.shape-rect-1 {
    width: 160px;
    height: 160px;
    background: #b5d9a8;
    border-radius: 24px;
    top: 20%;
    right: 8%;
    transform: rotate(45deg);
    animation: spin 20s linear infinite;
}

.shape-rect-2 {
    width: 80px;
    height: 80px;
    background: #d9ecd1;
    border-radius: 16px;
    bottom: 25%;
    right: 15%;
    transform: rotate(20deg);
    animation: float 7s ease-in-out infinite reverse;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 80px solid transparent;
    border-right: 80px solid transparent;
    border-bottom: 140px solid #00897b;
    top: 40%;
    right: 25%;
    animation: float 9s ease-in-out infinite;
    opacity: 0.08;
}

.shape-triangle-2 {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 87px solid #84bf75;
    bottom: 30%;
    left: 20%;
    transform: rotate(-30deg);
    animation: float 11s ease-in-out infinite reverse;
    opacity: 0.1;
}

/* Dot grid pattern */
.dot-grid {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

/* Hero badge */
.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}

/* ============================================
   Animations
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes spin {
    from { transform: rotate(45deg); }
    to { transform: rotate(405deg); }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Scroll Reveal
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays */
.amenity-card:nth-child(1) { transition-delay: 0.05s; }
.amenity-card:nth-child(2) { transition-delay: 0.1s; }
.amenity-card:nth-child(3) { transition-delay: 0.15s; }
.amenity-card:nth-child(4) { transition-delay: 0.2s; }
.amenity-card:nth-child(5) { transition-delay: 0.25s; }
.amenity-card:nth-child(6) { transition-delay: 0.3s; }

/* ============================================
   Amenities Cards
   ============================================ */
.amenity-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease, background-color 0.4s ease, border-color 0.4s ease;
}

.amenity-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    display: block;
    padding: 12px 16px;
    color: #1e3c1a;
    font-weight: 500;
    border-radius: 12px;
    transition: background-color 0.2s ease;
}

.mobile-link:hover {
    background-color: #f0f7e9;
}

/* ============================================
   Nav Links
   ============================================ */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2d5f28;
    transition: width 0.3s ease, left 0.3s ease;
    border-radius: 1px;
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

/* ============================================
   Focus Styles
   ============================================ */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2d5f28;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
    
    .amenity-card {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 640px) {
    .shape-circle-1 {
        width: 200px;
        height: 200px;
    }
    
    .shape-circle-2 {
        width: 100px;
        height: 100px;
    }
    
    .shape-circle-3 {
        display: none;
    }
    
    .shape-rect-1 {
        width: 80px;
        height: 80px;
    }
    
    .shape-rect-2 {
        display: none;
    }
    
    .shape-triangle-1 {
        display: none;
    }
    
    .shape-triangle-2 {
        display: none;
    }
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
    #navbar,
    .geo-shape,
    .dot-grid,
    .scroll-indicator {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .bg-forest-800,
    .bg-gradient-to-br {
        background: #fff !important;
        color: #000 !important;
    }
}
