/* ========================================
   Las Americas Meat Market — Custom Styles
   ======================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #b84120;
    color: #fdf0eb;
}

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

#navbar.scrolled {
    background: rgba(44, 40, 37, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu button */
#menuBtn:hover #menuIcon span:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

#menuBtn:hover #menuIcon span:nth-child(2) {
    opacity: 0;
}

#menuBtn:hover #menuIcon span:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

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

#mobileMenu.open #menuIcon span:first-child {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobileMenu.open #menuIcon span:nth-child(2) {
    opacity: 0;
}

#mobileMenu.open #menuIcon span:last-child {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

.mobile-link {
    position: relative;
}

/* ========================================
   Hero Section
   ======================================== */
.hero-eyebrow {
    opacity: 0;
    animation: slideInLeft 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-title {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.5s;
}

.hero-subtitle {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.7s;
}

.hero-ctas {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.9s;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll indicator */
.scroll-line {
    width: 1px;
    height: 48px;
    background: rgba(221, 190, 120, 0.2);
    position: relative;
    overflow: hidden;
}

.scroll-line-fill {
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ddbe78;
    animation: scrollLine 2s ease-in-out infinite;
}

@keyframes scrollLine {
    0% { top: -100%; }
    50% { top: 100%; }
    50.01% { top: -100%; }
    100% { top: 100%; }
}

/* ========================================
   Section Eyebrow
   ======================================== */
.section-eyebrow {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.section-eyebrow.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

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

/* Stagger children */
.reveal-on-scroll.stagger > * {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.stagger.revealed > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.reveal-on-scroll.stagger.revealed > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.reveal-on-scroll.stagger.revealed > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.reveal-on-scroll.stagger.revealed > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.reveal-on-scroll.stagger.revealed > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.reveal-on-scroll.stagger.revealed > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ========================================
   Product Cards
   ======================================== */
.product-card {
    position: relative;
}

.product-card img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-card:hover img {
    transform: scale(1.08);
}

/* ========================================
   Craft Value Cards
   ======================================== */
.craft-value {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.craft-value.revealed {
    opacity: 1;
    transform: translateY(0);
}

.craft-value:hover .w-16 {
    border-color: rgba(212, 84, 48, 0.6);
    background: rgba(212, 84, 48, 0.1);
}

/* ========================================
   Buttons & Links
   ======================================== */
a {
    transition: color 0.3s ease;
}

button,
[type='submit'] {
    cursor: pointer;
}

/* ========================================
   Form Styles
   ======================================== */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: none;
}

input::placeholder,
textarea::placeholder {
    color: #a39890;
}

/* ========================================
   Smooth section transitions
   ======================================== */
section {
    position: relative;
}

/* ========================================
   Responsive adjustments
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-title {
        font-size: 2.75rem;
    }
    
    #navbar {
        background: rgba(44, 40, 37, 0.95);
        backdrop-filter: blur(20px);
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .hero-title {
        font-size: 4.5rem;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 5.5rem;
    }
}

/* ========================================
   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;
    }
}

/* ========================================
   Print styles
   ======================================== */
@media print {
    #navbar,
    .scroll-line,
    #contactForm {
        display: none;
    }
    
    body {
        background: white;
        color: #2C2825;
    }
}
