/* ============================================
   Crossroads Bakery — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

::selection {
    background-color: #1B4332;
    color: #F5F0EB;
}

/* ---------- Navbar ---------- */
#navbar {
    background: transparent;
    transition: background 0.3s ease, box-shadow 0.3s ease, backdrop-filter 0.3s ease;
}

#navbar.scrolled {
    background: rgba(245, 240, 235, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(27, 67, 50, 0.08);
}

#navbar.scrolled .logo-text {
    color: #1B4332;
}

/* ---------- Mobile Menu ---------- */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #1B4332;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

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

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

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

.shape-square-1 {
    width: 120px;
    height: 120px;
    background: #D4A574;
    top: 30%;
    left: 45%;
    border-radius: 24px;
    transform: rotate(45deg);
    animation: float-slow 10s ease-in-out infinite;
}

.shape-triangle-1 {
    width: 0;
    height: 0;
    border-left: 60px solid transparent;
    border-right: 60px solid transparent;
    border-bottom: 104px solid #F5F0EB;
    top: 15%;
    left: 10%;
    opacity: 0.08;
    animation: float-slow 7s ease-in-out infinite;
}

.shape-ring-1 {
    width: 280px;
    height: 280px;
    border: 3px solid #D4A574;
    border-radius: 50%;
    bottom: 5%;
    right: 15%;
    opacity: 0.15;
    animation: float-slow 9s ease-in-out infinite reverse;
}

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

/* ---------- Floating Cards ---------- */
.floating-card {
    z-index: 20;
}

.card-float-1 {
    animation: float-card-1 4s ease-in-out infinite;
}

.card-float-2 {
    animation: float-card-2 5s ease-in-out infinite;
}

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

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

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

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

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

.menu-card:hover {
    transform: translateY(-6px);
}

/* ---------- Gallery Items ---------- */
.gallery-item {
    cursor: pointer;
    position: relative;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(27, 67, 50, 0);
    transition: background 0.3s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(27, 67, 50, 0.1);
}

/* ---------- Scroll Animations ---------- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---------- Form Styles ---------- */
#contact-form input,
#contact-form textarea {
    background: #FDFCFA;
}

#contact-form input:focus,
#contact-form textarea:focus {
    background: #fff;
    box-shadow: 0 0 0 4px rgba(27, 67, 50, 0.08);
}

/* ---------- Button Focus ---------- */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #1B4332;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .geo-shape {
        display: none;
    }

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

    .floating-card {
        display: none;
    }

    .floating-card.card-float-1,
    .floating-card.card-float-2 {
        display: block;
        position: relative;
        animation: none;
        margin-top: 1rem;
    }
}

@media (min-width: 769px) {
    .floating-card {
        display: block;
    }
}

/* ---------- 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 {
        opacity: 1;
        transform: none;
    }
}
