/* ============================================
   Java — Bakery & Grocery
   Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: #D4A017;
    color: #0A1628;
}

/* --- Skip Link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    background: #D4A017;
    color: #0A1628;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 0.5rem 0.5rem;
    font-weight: 600;
    z-index: 100;
    transition: top 0.2s;
}

.skip-link:focus {
    top: 0;
}

/* --- Geometric Hero Shapes --- */
.geo-shape {
    position: absolute;
    pointer-events: none;
    will-change: transform;
}

.geo-circle-1 {
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.08) 0%, transparent 70%);
    top: -100px;
    right: -150px;
}

.geo-circle-2 {
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 160, 23, 0.06) 0%, transparent 70%);
    bottom: 10%;
    left: -100px;
}

.geo-circle-3 {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(212, 160, 23, 0.05);
    top: 40%;
    right: 35%;
}

.geo-rect-1 {
    width: 120px;
    height: 120px;
    border: 2px solid rgba(212, 160, 23, 0.12);
    border-radius: 24px;
    top: 25%;
    left: 5%;
    transform: rotate(45deg);
}

.geo-dots {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 8%;
    background-image: radial-gradient(circle, rgba(212, 160, 23, 0.3) 1.5px, transparent 1.5px);
    background-size: 16px 16px;
    opacity: 0.6;
}

/* --- Navigation --- */
#site-header {
    background: transparent;
}

#site-header.scrolled {
    background: rgba(5, 13, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    position: relative;
}

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

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

/* --- Mobile Menu --- */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    font-family: 'Playfair Display', Georgia, serif;
}

/* Hamburger animation */
.menu-line {
    display: block;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Stagger children */
.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; }

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal,
    .reveal.revealed {
        opacity: 1;
        transform: none;
        transition: none;
    }

    html {
        scroll-behavior: auto;
    }

    .geo-shape {
        animation: none;
    }
}

/* --- Floating animation for hero shapes --- */
@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(-20px) rotate(45deg); }
}

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

@keyframes float-fast {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-10px) scale(1.05); }
}

.geo-rect-1 {
    animation: float-slow 8s ease-in-out infinite;
}

.geo-circle-1 {
    animation: float-medium 10s ease-in-out infinite;
}

.geo-circle-2 {
    animation: float-fast 7s ease-in-out infinite;
}

.geo-circle-3 {
    animation: float-medium 5s ease-in-out infinite;
}

/* --- Image hover effects --- */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

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

/* --- Form focus states --- */
input:focus,
textarea:focus {
    background-color: #fff;
}

/* --- Responsive adjustments --- */
@media (max-width: 640px) {
    .geo-circle-1 {
        width: 300px;
        height: 300px;
        right: -80px;
    }

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

    .geo-rect-1 {
        width: 60px;
        height: 60px;
    }

    .geo-dots {
        width: 60px;
        height: 60px;
    }
}

/* --- Card hover --- */
.group {
    will-change: transform;
}

/* --- Smooth image loading --- */
img {
    display: block;
    max-width: 100%;
}
