/* ===== Custom Styles for La Esperanza Jewelry ===== */

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

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

body {
    margin: 0;
}

/* Selection */
::selection {
    background-color: rgba(4, 120, 87, 0.2);
    color: #064e3b;
}

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

.geo-circle-1 {
    width: 500px;
    height: 500px;
    background: #047857;
    border-radius: 50%;
    top: -100px;
    left: -150px;
    animation: float-slow 20s ease-in-out infinite;
}

.geo-circle-2 {
    width: 300px;
    height: 300px;
    background: #059669;
    border-radius: 50%;
    bottom: 50px;
    right: 10%;
    animation: float-slow 15s ease-in-out infinite reverse;
}

.geo-triangle {
    width: 0;
    height: 0;
    border-left: 120px solid transparent;
    border-right: 120px solid transparent;
    border-bottom: 208px solid #047857;
    top: 25%;
    right: 5%;
    transform: rotate(15deg);
    animation: spin-slow 30s linear infinite;
    opacity: 0.06;
}

.geo-square {
    width: 150px;
    height: 150px;
    background: #10b981;
    top: 60%;
    left: 8%;
    transform: rotate(45deg);
    animation: float-slow 18s ease-in-out infinite;
    opacity: 0.07;
}

.geo-diamond {
    width: 80px;
    height: 80px;
    background: #34d399;
    top: 40%;
    left: 15%;
    transform: rotate(45deg);
    animation: pulse-slow 8s ease-in-out infinite;
    opacity: 0.1;
}

.geo-arc {
    width: 200px;
    height: 200px;
    border: 4px solid #047857;
    border-radius: 50%;
    border-bottom-color: transparent;
    border-left-color: transparent;
    bottom: 20%;
    right: 15%;
    transform: rotate(-45deg);
    animation: spin-slow 25s linear infinite;
    opacity: 0.08;
}

/* ===== Animations ===== */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-20px) rotate(2deg); }
    66% { transform: translateY(10px) rotate(-1deg); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse-slow {
    0%, 100% { transform: rotate(45deg) scale(1); opacity: 0.1; }
    50% { transform: rotate(45deg) scale(1.15); opacity: 0.18; }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation-name: fade-in-up;
    animation-duration: 0.8s;
    animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    animation-iteration-count: 1;
}

/* ===== Scroll Reveal ===== */
.scroll-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);
}

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

/* Stagger children */
.scroll-reveal:nth-child(1) { transition-delay: 0s; }
.scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
.scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
.scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
.scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
.scroll-reveal:nth-child(6) { transition-delay: 0.5s; }

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

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

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

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

.mobile-link {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-link:nth-child(5) { transition-delay: 0.3s; }

/* ===== Menu Button Animation ===== */
.menu-line {
    display: block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Custom Select ===== */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23047857' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ===== Focus Styles ===== */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* ===== Smooth Scroll Offset ===== */
section[id] {
    scroll-margin-top: 80px;
}

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

/* ===== Print ===== */
@media print {
    #navbar, #mobile-menu {
        display: none;
    }
    
    body {
        background: white;
    }
}
