/* ============================================
   Groundation Coffee Shop — Custom Styles
   ============================================ */

/* Base & Reset */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #fefdf8;
    color: #3d2e1e;
}

/* ============================================
   Geometric Background Shapes
   ============================================ */
.geo-shapes {
    z-index: 0;
}

.geo-circle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.geo-circle--1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(27, 94, 32, 0.06) 0%, transparent 70%);
    top: 10%;
    right: -100px;
}

.geo-circle--2 {
    width: 250px;
    height: 250px;
    background: radial-gradient(circle, rgba(174, 213, 129, 0.1) 0%, transparent 70%);
    bottom: 20%;
    left: -50px;
}

.geo-square {
    position: absolute;
    pointer-events: none;
}

.geo-square--1 {
    width: 80px;
    height: 80px;
    background: rgba(27, 94, 32, 0.05);
    border-radius: 16px;
    top: 30%;
    left: 5%;
    transform: rotate(15deg);
}

.geo-triangle {
    position: absolute;
    pointer-events: none;
}

.geo-triangle--1 {
    width: 0;
    height: 0;
    border-left: 40px solid transparent;
    border-right: 40px solid transparent;
    border-bottom: 70px solid rgba(174, 213, 129, 0.08);
    top: 50%;
    right: 8%;
    transform: rotate(-20deg);
}

.geo-dots {
    position: absolute;
    pointer-events: none;
    background-image: radial-gradient(circle, rgba(27, 94, 32, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    width: 120px;
    height: 120px;
    bottom: 30%;
    right: 15%;
}

.geo-line {
    position: absolute;
    pointer-events: none;
}

.geo-line--1 {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(27, 94, 32, 0.1), transparent);
    top: 45%;
    left: 0;
    transform: rotate(-5deg);
}

/* ============================================
   Floating Card Animations
   ============================================ */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card--top {
    animation-delay: 0s;
}

.card--mid {
    animation-delay: -2s;
}

.card--bottom {
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(27, 94, 32, 0.08);
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #1b5e20;
    transition: all 0.2s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

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

/* ============================================
   Menu Cards
   ============================================ */
.menu-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* ============================================
   Community Cards
   ============================================ */
.community-card {
    transition: transform 0.3s ease, background 0.3s ease;
}

.community-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Scroll Reveal Animations
   (progressive enhancement — content is visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    /* Default state: visible (no JS fallback) */
    .reveal-hidden {
        opacity: 1;
        transform: translateY(0);
    }

    /* JS adds this class to enable animation */
    .reveal-hidden.animate-in {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

    .reveal-hidden.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

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

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .floating-card {
        display: none;
    }

    .geo-circle--1 {
        width: 200px;
        height: 200px;
    }

    .geo-square--1 {
        width: 40px;
        height: 40px;
    }
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background: rgba(27, 94, 32, 0.2);
    color: #1b5e20;
}

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

/* ============================================
   Smooth image loading
   ============================================ */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 1;
}
