/* ============================================
   Goldilocks Jewelry & Coins — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

#navbar.scrolled {
    background: rgba(255, 248, 240, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(58, 7, 18, 0.08);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu:not(.open) {
    transform: translateX(100%);
}

.menu-line {
    display: block;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-eyebrow {
    opacity: 1;
    transform: translateX(0);
    transition: all 0.6s ease;
}

.hero-sub {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease 0.15s;
}

.hero-cta {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease 0.3s;
}

.hero-badges {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease 0.45s;
}

.hero-image-main {
    opacity: 1;
    transform: scale(1);
    transition: all 0.8s ease 0.2s;
}

.hero-float-card {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease 0.5s;
}

.hero-scroll {
    opacity: 1;
    transition: opacity 0.6s ease 0.8s;
}

/* Scroll animation indicator */
@keyframes scrollDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(400%); }
}

.animate-scroll-down {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* ============================================
   SERVICES
   ============================================ */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #841332, #FFB3C1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   GALLERY
   ============================================ */
.gallery-item {
    position: relative;
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   These only apply to sections BELOW the fold
   and are progressive enhancement — content
   is visible without JS via the default state.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

    /* Staggered delays for grid items */
    .service-card:nth-child(1) { transition-delay: 0s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.2s; }
    .service-card:nth-child(4) { transition-delay: 0.3s; }
    .service-card:nth-child(5) { transition-delay: 0.4s; }
    .service-card:nth-child(6) { transition-delay: 0.5s; }

    .gallery-item:nth-child(1) { transition-delay: 0s; }
    .gallery-item:nth-child(2) { transition-delay: 0.1s; }
    .gallery-item:nth-child(3) { transition-delay: 0.2s; }
    .gallery-item:nth-child(4) { transition-delay: 0.3s; }
    .gallery-item:nth-child(5) { transition-delay: 0.4s; }
    .gallery-item:nth-child(6) { transition-delay: 0.5s; }
}

/* ============================================
   GEOMETRIC DECORATIONS
   ============================================ */
@keyframes float1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    50% { transform: translate(12px, -18px) rotate(3deg); }
}

@keyframes float2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-10px, 14px) scale(1.05); }
}

@keyframes float3 {
    0%, 100% { transform: rotate(45deg) translate(0, 0); }
    50% { transform: rotate(48deg) translate(8px, -12px); }
}

@keyframes pulse-dot {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.3); }
}

.hero-geo-1 {
    animation: float1 8s ease-in-out infinite;
}

.hero-geo-2 {
    animation: float2 10s ease-in-out infinite;
}

.hero-geo-3 {
    animation: float3 12s ease-in-out infinite;
}

.hero-geo-4 {
    animation: pulse-dot 4s ease-in-out infinite;
}

.hero-geo-5 {
    animation: pulse-dot 3s ease-in-out infinite 1s;
}

.about-geo-1 {
    animation: float2 9s ease-in-out infinite;
}

.about-geo-2 {
    animation: float1 11s ease-in-out infinite;
}

.about-geo-3, .about-geo-4, .about-geo-5 {
    animation: pulse-dot 3s ease-in-out infinite;
}

.about-geo-4 { animation-delay: 1s; }
.about-geo-5 { animation-delay: 2s; }

.cta-geo-1 {
    animation: float1 7s ease-in-out infinite;
}

.cta-geo-2 {
    animation: float2 9s ease-in-out infinite;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .font-display, h1 {
        font-size: 3rem !important;
    }

    h2 {
        font-size: 2.5rem !important;
    }

    .hero-float-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin-top: 1rem;
        max-width: 100%;
    }

    .about-float {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 1rem;
    }
}

@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem !important;
    }

    h2 {
        font-size: 2rem !important;
    }
}
