/* ========================================
   Handmade From the Heart — Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(15, 76, 117, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-scrolled .nav-logo-text {
    color: #ffffff !important;
}

.nav-scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Hero animations */
.hero-bg {
    animation: heroZoom 20s ease-in-out infinite alternate;
}

@keyframes heroZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.hero-title {
    animation: heroTitleIn 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes heroTitleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    animation: heroSubtitleIn 1s ease-out 0.3s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes heroSubtitleIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-ctas {
    animation: heroCtasIn 1s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes heroCtasIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    animation: heroBadgeIn 1s ease-out 0.2s forwards;
    opacity: 0;
    transform: translateY(-10px);
}

@keyframes heroBadgeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(8px); }
}

/* Scroll reveal animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(40px);
    }

    .reveal-left {
        opacity: 0;
        transform: translateX(-40px);
    }

    .reveal-right {
        opacity: 0;
        transform: translateX(40px);
    }

    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Mobile menu */
#mobile-menu {
    animation: mobileMenuIn 0.3s ease-out forwards;
}

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

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

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

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

/* Product card hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f0fdf4;
}

::-webkit-scrollbar-thumb {
    background: #0F4C75;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0d4265;
}

/* Selection */
::selection {
    background: #bbf7d0;
    color: #064e3b;
}

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

/* Image lazy loading fade */
img[loading="lazy"] {
    transition: opacity 0.5s ease;
}

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

/* Smooth image transitions */
img {
    transition: filter 0.3s ease;
}

img:hover {
    filter: brightness(1.02);
}

/* Decorative floating shapes */
.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.1;
    animation: float 6s ease-in-out infinite;
}

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

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #0F4C75);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Pulse animation for CTA */
@keyframes pulse-soft {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(16, 185, 129, 0); }
}

.pulse-cta {
    animation: pulse-soft 2s infinite;
}

/* Contact form styles */
.contact-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-input:focus {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* Success message */
.success-message {
    animation: successIn 0.5s ease-out forwards;
}

@keyframes successIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
