/* ============================================
   Cárnicas El Riego — Stylesheet
   Emerald green + cream palette
   ============================================ */

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

:root {
    --emerald-900: #042f23;
    --emerald-800: #064e3b;
    --emerald-700: #065f46;
    --emerald-600: #047857;
    --emerald-500: #059669;
    --emerald-400: #10b981;
    --cream-50: #fafaf5;
    --cream-100: #f5f5ee;
    --cream-200: #e8e8dc;
    --cream-300: #d4d4c4;
    --neutral-800: #1c1917;
    --neutral-700: #292524;
    --neutral-600: #44403c;
    --neutral-500: #57534e;
    --neutral-400: #78716c;
    --neutral-300: #a8a29e;
    --neutral-200: #d6d3d1;
    --neutral-100: #e7e5e4;
    --white: #ffffff;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.06), 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 8px 16px rgba(0,0,0,0.06);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--neutral-700);
    background-color: var(--cream-50);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--neutral-800);
    line-height: 1.2;
    font-weight: 600;
}

.text-accent {
    color: var(--emerald-700);
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--emerald-600);
    background: linear-gradient(135deg, rgba(4,95,70,0.08), rgba(5,150,105,0.08));
    border: 1px solid rgba(4,95,70,0.15);
    padding: 6px 14px;
    border-radius: 100px;
    margin-bottom: 20px;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--neutral-500);
    max-width: 560px;
    line-height: 1.7;
}

.lead {
    font-size: 1.125rem;
    color: var(--neutral-600);
    line-height: 1.75;
    margin-bottom: 24px;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--emerald-700);
    color: var(--white);
    border-color: var(--emerald-700);
}

.btn-primary:hover {
    background: var(--emerald-800);
    border-color: var(--emerald-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border-color: rgba(255,255,255,0.4);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--emerald-800);
    border-color: var(--white);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(250, 250, 245, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transition: all var(--transition);
}

.site-header.scrolled {
    background: rgba(250, 250, 245, 0.97);
    box-shadow: var(--shadow-sm);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    color: var(--neutral-800);
}

.logo-icon {
    color: var(--emerald-700);
    flex-shrink: 0;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.logo-name {
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.logo-tagline {
    font-family: var(--font-body);
    font-size: 0.6875rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--neutral-500);
}

.logo--light { color: var(--white); }
.logo--light .logo-name { color: var(--white); }
.logo--light .logo-tagline { color: rgba(255,255,255,0.7); }

/* ---------- Nav ---------- */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--neutral-700);
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}

.nav-toggle:hover {
    background: rgba(0,0,0,0.05);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--neutral-600);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--emerald-700);
    background: rgba(4,95,70,0.06);
}

.nav-link--cta {
    background: var(--emerald-700);
    color: var(--white) !important;
    margin-left: 8px;
}

.nav-link--cta:hover {
    background: var(--emerald-800);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(4, 47, 35, 0.88) 0%,
        rgba(6, 78, 59, 0.75) 50%,
        rgba(4, 47, 35, 0.6) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 120px 24px 80px;
    max-width: 720px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.85);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    padding: 8px 18px;
    border-radius: 100px;
    margin-bottom: 32px;
    backdrop-filter: blur(8px);
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    color: var(--white);
    font-weight: 700;
    line-height: 1.08;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin-bottom: 40px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    color: rgba(255,255,255,0.5);
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-8px); }
    60% { transform: translateX(-50%) translateY(-4px); }
}

/* ---------- Features Bar ---------- */
.features-bar {
    background: var(--white);
    border-bottom: 1px solid var(--neutral-100);
    padding: 0;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 32px 28px;
    border-right: 1px solid var(--neutral-100);
    transition: background var(--transition);
}

.feature-item:last-child {
    border-right: none;
}

.feature-item:hover {
    background: var(--cream-50);
}

.feature-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(4,95,70,0.08), rgba(5,150,105,0.08));
    border: 1px solid rgba(4,95,70,0.12);
    border-radius: var(--radius-md);
    color: var(--emerald-700);
}

.feature-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.feature-text strong {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--neutral-800);
}

.feature-text span {
    font-size: 0.8125rem;
    color: var(--neutral-500);
}

/* ---------- About ---------- */
.about {
    padding: 120px 0;
    background: var(--cream-50);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -40px;
    right: -40px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 6px solid var(--cream-50);
}

.about-img-secondary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-experience {
    position: absolute;
    top: -20px;
    left: -20px;
    background: var(--emerald-700);
    color: var(--white);
    padding: 24px 28px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.about-experience .exp-number {
    display: block;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.about-experience .exp-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    opacity: 0.8;
}

.about-content {
    padding: 20px 0;
}

.about-stats {
    display: flex;
    gap: 40px;
    margin: 40px 0;
    padding: 32px 0;
    border-top: 1px solid var(--neutral-100);
    border-bottom: 1px solid var(--neutral-100);
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--emerald-700);
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--neutral-500);
}

/* ---------- Products ---------- */
.products {
    padding: 120px 0;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header .section-subtitle {
    margin: 0 auto;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.product-card {
    background: var(--cream-50);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--neutral-100);
    transition: all var(--transition);
}

.product-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.product-img {
    overflow: hidden;
    aspect-ratio: 5/4;
}

.product-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.product-body {
    padding: 24px;
}

.product-name {
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--neutral-800);
}

.product-desc {
    font-size: 0.9375rem;
    color: var(--neutral-500);
    line-height: 1.65;
}

/* ---------- Services ---------- */
.services {
    padding: 120px 0;
    background: var(--cream-50);
}

.services-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.services-content {
    padding: 20px 0;
}

.services-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 28px;
    margin-top: 40px;
}

.services-list li {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.services-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--emerald-700);
    border-radius: var(--radius-sm);
    color: var(--white);
}

.services-list li strong {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: 4px;
}

.services-list li span {
    font-size: 0.9375rem;
    color: var(--neutral-500);
    line-height: 1.6;
}

.services-visual {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.services-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ---------- CTA ---------- */
.cta {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(4, 47, 35, 0.92) 0%,
        rgba(6, 78, 59, 0.85) 100%
    );
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 680px;
    margin: 0 auto;
}

.cta-content .section-title {
    color: var(--white);
    margin-bottom: 24px;
}

.cta-text {
    font-size: 1.1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.75;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
}

/* ---------- Contact ---------- */
.contact {
    padding: 120px 0;
    background: var(--white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-desc {
    color: var(--neutral-500);
    margin-bottom: 40px;
    line-height: 1.75;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.contact-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(4,95,70,0.08), rgba(5,150,105,0.08));
    border: 1px solid rgba(4,95,70,0.12);
    border-radius: var(--radius-md);
    color: var(--emerald-700);
}

.contact-item strong {
    display: block;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--neutral-800);
    margin-bottom: 4px;
}

.contact-item span,
.contact-item a {
    font-size: 0.9375rem;
    color: var(--neutral-500);
    line-height: 1.6;
}

.contact-item a:hover {
    color: var(--emerald-700);
}

/* ---------- Form ---------- */
.contact-form-wrapper {
    padding: 20px 0;
}

.contact-form-card {
    background: var(--cream-50);
    border: 1px solid var(--neutral-100);
    border-radius: var(--radius-lg);
    padding: 48px;
}

.form-title {
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.form-subtitle {
    font-size: 0.9375rem;
    color: var(--neutral-500);
    margin-bottom: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--neutral-700);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--neutral-800);
    background: var(--white);
    border: 1.5px solid var(--neutral-200);
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--emerald-500);
    box-shadow: 0 0 0 3px rgba(5,150,105,0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--neutral-400);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 48px 24px;
    gap: 16px;
}

.form-success.show {
    display: flex;
}

.form-success svg {
    color: var(--emerald-500);
}

.form-success p {
    font-size: 1rem;
    color: var(--neutral-600);
    line-height: 1.6;
}

/* ---------- Map ---------- */
.map-section {
    border-top: 1px solid var(--neutral-100);
}

.map-container {
    width: 100%;
    height: 400px;
    filter: saturate(0.7) contrast(1.05);
    transition: filter var(--transition);
}

.map-container:hover {
    filter: saturate(1) contrast(1);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--emerald-900);
    color: rgba(255,255,255,0.7);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 64px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-desc {
    font-size: 0.9375rem;
    line-height: 1.7;
    margin-top: 20px;
    max-width: 300px;
}

.footer-heading {
    font-family: var(--font-body);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 24px;
}

.footer-links,
.footer-schedule,
.footer-contact {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.footer-links li a,
.footer-contact li a {
    font-size: 0.9375rem;
    color: rgba(255,255,255,0.7);
    transition: color var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-links li a:hover,
.footer-contact li a:hover {
    color: var(--white);
}

.footer-schedule li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    font-size: 0.9375rem;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-schedule li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.footer-schedule .day {
    color: rgba(255,255,255,0.6);
}

.footer-schedule .hours {
    color: rgba(255,255,255,0.9);
    font-weight: 500;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 32px 0;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.4);
}

.footer-bottom a {
    color: rgba(255,255,255,0.5);
    transition: color var(--transition);
}

.footer-bottom a:hover {
    color: var(--white);
}

/* ---------- Animations ---------- */
.fade-in {
    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);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .feature-item {
        border-right: none;
        border-bottom: 1px solid var(--neutral-100);
    }

    .feature-item:nth-child(2) { border-right: none; }
    .feature-item:nth-child(3) { border-right: none; }
    .feature-item:nth-child(4) { border-right: none; }

    .about-grid,
    .services-inner,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .about-img-secondary {
        right: 0;
        bottom: -20px;
    }

    .about-experience {
        left: 0;
        top: -10px;
    }

    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--cream-50);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 24px 32px;
        border-bottom: 1px solid var(--neutral-100);
        box-shadow: var(--shadow-md);
        transform: translateY(-120%);
        opacity: 0;
        transition: all var(--transition);
        pointer-events: none;
    }

    .nav-menu.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .nav-link {
        padding: 14px 0;
        border-radius: 0;
        border-bottom: 1px solid var(--neutral-100);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link--cta {
        margin-left: 0;
        margin-top: 8px;
        text-align: center;
        background: var(--emerald-700);
        color: var(--white) !important;
        border-radius: var(--radius-sm);
    }

    .hero-content {
        padding: 140px 24px 100px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .hero-actions .btn {
        justify-content: center;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .feature-item {
        border-right: none;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .about-img-secondary {
        position: relative;
        right: 0;
        bottom: 0;
        margin-top: 16px;
        border: none;
    }

    .about-img-main {
        border-radius: var(--radius-md);
    }

    .about-experience {
        position: relative;
        top: 0;
        left: 0;
        display: inline-block;
        margin-bottom: 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-form-card {
        padding: 32px 24px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .cta-actions {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-title {
        font-size: 2.25rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .about-stats {
        flex-direction: column;
        gap: 24px;
    }
}
