/* ========== RESET & VARIABLES ========== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --cafe-oscuro: #442a13;
    --cafe-claro: #8e7b63;
    --fondo-principal: #faf7f4;
    --fondo-alterno: #f5efe9;
    --texto: #333333;
    --texto-claro: #666666;
    --blanco: #ffffff;
    --footer-bg: #2a1a0a;
    --sombra: 0 2px 20px rgba(68, 42, 19, 0.08);
    --sombra-hover: 0 8px 30px rgba(68, 42, 19, 0.15);
    --transicion: 0.3s ease;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', Arial, sans-serif;
    color: var(--texto);
    background: var(--fondo-principal);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }

.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========== HEADER ========== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.97);
    transition: box-shadow var(--transicion);
}

.header.scrolled {
    box-shadow: var(--sombra);
}

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

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.header-brand span {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--cafe-oscuro);
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--texto);
    letter-spacing: 0.3px;
    position: relative;
    transition: color var(--transicion);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--cafe-oscuro);
    transition: width var(--transicion);
}

.nav-links a:hover {
    color: var(--cafe-oscuro);
}

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

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: var(--cafe-oscuro);
    transition: var(--transicion);
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
}
.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile nav */
.nav-mobile {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    background: var(--blanco);
    box-shadow: var(--sombra);
    padding: 24px 0;
}

.nav-mobile.open {
    display: block;
}

.nav-mobile ul {
    list-style: none;
    text-align: center;
}

.nav-mobile li {
    padding: 12px 0;
}

.nav-mobile a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--texto);
    transition: color var(--transicion);
}

.nav-mobile a:hover {
    color: var(--cafe-oscuro);
}

/* ========== HERO ========== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--cafe-oscuro);
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('hero-cafe.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.35;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(68, 42, 19, 0.6) 0%,
        rgba(42, 26, 10, 0.85) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 780px;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: var(--blanco);
    line-height: 1.2;
    margin-bottom: 20px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.3s;
}

.hero-content p {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.7;
    margin-bottom: 36px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.5s;
}

.btn-primary {
    display: inline-block;
    background: var(--blanco);
    color: var(--cafe-oscuro);
    padding: 16px 40px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all var(--transicion);
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 0.8s ease forwards 0.7s;
}

.btn-primary:hover {
    background: var(--fondo-alterno);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

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

/* ========== SECCIÓN GENÉRICA ========== */
.section {
    padding: 100px 0;
}

.section-title {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--cafe-oscuro);
    text-align: center;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--cafe-claro);
    text-align: center;
    margin-bottom: 56px;
    font-weight: 400;
}

/* ========== SERVICIOS ========== */
.servicios {
    background: var(--blanco);
}

.servicios .section-title {
    margin-bottom: 56px;
}

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

.servicio-card {
    background: var(--fondo-principal);
    border-radius: 12px;
    padding: 40px 32px;
    text-align: center;
    transition: all var(--transicion);
    border: 1px solid transparent;
}

.servicio-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-hover);
    border-color: rgba(142, 123, 99, 0.2);
}

.servicio-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cafe-oscuro);
    border-radius: 12px;
}

.servicio-icon svg {
    width: 28px;
    height: 28px;
    fill: none;
    stroke: var(--blanco);
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.servicio-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cafe-oscuro);
    margin-bottom: 12px;
}

.servicio-card p {
    font-size: 0.95rem;
    color: var(--texto-claro);
    line-height: 1.7;
}

/* ========== MÉTODO 3 CAFÉS ========== */
.metodo {
    background: var(--fondo-alterno);
}

.pasos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0;
    position: relative;
}

.paso {
    text-align: center;
    padding: 0 32px;
    position: relative;
}

/* Línea conectora entre pasos */
.paso:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    right: -1px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, var(--cafe-claro) 50%, transparent 100%);
    opacity: 0.4;
    z-index: 0;
    pointer-events: none;
}

.paso-numero {
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cafe-oscuro);
    border-radius: 50%;
    position: relative;
    z-index: 1;
}

.paso-numero svg {
    width: 36px;
    height: 36px;
}

.paso-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--cafe-claro);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.paso p {
    font-size: 0.93rem;
    color: var(--texto-claro);
    line-height: 1.7;
}

/* ========== NOSOTROS ========== */
.nosotros {
    background: var(--blanco);
}

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

.nosotros-text h2 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 700;
    color: var(--cafe-oscuro);
    margin-bottom: 24px;
}

.nosotros-text p {
    font-size: 1rem;
    color: var(--texto-claro);
    line-height: 1.8;
    margin-bottom: 36px;
}

.nosotros-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.stat {
    text-align: center;
    padding: 20px 12px;
    background: var(--fondo-alterno);
    border-radius: 10px;
}

.stat-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 28px;
    height: 28px;
    stroke: var(--cafe-oscuro);
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.stat span {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--cafe-oscuro);
    line-height: 1.4;
    display: block;
}

.nosotros-img {
    display: flex;
    align-items: center;
    justify-content: center;
}

.nosotros-img img {
    max-width: 360px;
    width: 100%;
    filter: drop-shadow(0 8px 30px rgba(68, 42, 19, 0.2));
}

/* ========== CONTACTO ========== */
.contacto {
    background: var(--cafe-oscuro);
    color: var(--blanco);
}

.contacto .section-title {
    color: var(--blanco);
}

.contacto .section-subtitle {
    color: rgba(255, 255, 255, 0.7);
}

.contacto-form {
    max-width: 560px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 0.95rem;
    color: var(--texto);
    background: var(--blanco);
    border: 2px solid transparent;
    border-radius: 8px;
    transition: border-color var(--transicion);
    outline: none;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--cafe-claro);
}

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

.form-optional {
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 4px;
}

.btn-enviar {
    display: block;
    width: 100%;
    padding: 16px;
    font-family: 'Inter', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cafe-oscuro);
    background: var(--blanco);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transicion);
    letter-spacing: 0.5px;
    margin-top: 8px;
}

.btn-enviar:hover {
    background: var(--fondo-alterno);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.form-alt {
    text-align: center;
    margin-top: 32px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

.form-alt a {
    color: var(--blanco);
    font-weight: 500;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transition: border-color var(--transicion);
}

.form-alt a:hover {
    border-color: var(--blanco);
}

/* Form status messages */
.form-status {
    text-align: center;
    padding: 16px;
    border-radius: 8px;
    margin-top: 16px;
    font-size: 0.95rem;
    display: none;
}

.form-status.success {
    display: block;
    background: rgba(255, 255, 255, 0.15);
    color: var(--blanco);
}

.form-status.error {
    display: block;
    background: rgba(220, 53, 69, 0.2);
    color: #ffb3b3;
}

/* ========== FOOTER ========== */
.footer {
    background: var(--footer-bg);
    color: rgba(255, 255, 255, 0.7);
    padding: 56px 0 0;
}

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

.footer-brand {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-brand img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.footer-brand-text strong {
    display: block;
    color: var(--blanco);
    font-size: 0.95rem;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.footer-brand-text span {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.footer-nav {
    text-align: center;
}

.footer-nav ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-nav a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transicion);
}

.footer-nav a:hover {
    color: var(--blanco);
}

.footer-contact {
    text-align: right;
}

.footer-contact a {
    display: block;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 8px;
    transition: color var(--transicion);
}

.footer-contact a:hover {
    color: var(--blanco);
}

.footer-bar {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 20px 0;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.4);
}

/* ========== SCROLL REVEAL ========== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
    .servicios-grid,
    .pasos-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .paso:not(:last-child)::after {
        display: none;
    }

    .nosotros-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .nosotros-img {
        order: -1;
    }

    .nosotros-img img {
        max-width: 260px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 28px;
    }

    .footer-brand {
        justify-content: center;
    }

    .footer-contact {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .hamburger {
        display: flex;
    }

    .hero-content {
        padding: 100px 20px 60px;
    }

    .section {
        padding: 72px 0;
    }

    .nosotros-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
        padding: 14px 16px;
    }

    .stat-icon {
        margin: 0;
        flex-shrink: 0;
    }
}
