/* ========================================
   La Taza Café - Landing Page Scroll-Story
   Diseño inmersivo 2026 | PHP includes
   Paleta cálida: café, crema, dorado
   ======================================== */

/* Variables CSS en :root (tokens de diseño) */
:root {
    /* Paleta de colores - Café artesanal */
    --ink: #2b1d0e;
    --coffee: #6f3e2e;
    --coffee-dark: #3d2418;
    --coffee-light: #8b5e3c;
    --latte: #c7a574;
    --cream: #f7f0e6;
    --chalk: #fffdf8;
    --gold: #c5a265;
    --gold-light: #d4b87a;
    --mist: rgba(107, 62, 46, 0.12);
    --mist-dark: rgba(107, 62, 46, 0.25);

    /* Variables de espaciado */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Sombras */
    --shadow-sm: 0 1px 2px rgba(43, 29, 14, 0.08);
    --shadow-md: 0 4px 12px rgba(43, 29, 14, 0.1);
    --shadow-lg: 0 14px 42px rgba(43, 29, 14, 0.14);
    --shadow-xl: 0 24px 64px rgba(43, 29, 14, 0.18);
    --shadow-glow: 0 0 40px rgba(197, 162, 101, 0.3);

    /* Bordes redondos */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --radius-full: 999px;

    /* Tipografía */
    --font-heading: Georgia, "Times New Roman", serif;
    --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

    /* Transiciones */
    --transition-fast: 140ms ease;
    --transition-normal: 200ms ease;
    --transition-slow: 350ms cubic-bezier(0.16, 1, 0.3, 1);
    --transition-enter: 400ms cubic-bezier(0.16, 1, 0.3, 1);

    /* Z-index scale */
    --z-base: 1;
    --z-header: 100;
    --z-skip: 200;
}

/* Reset básico */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    color: var(--ink);
    background: var(--chalk);
    font-family: var(--font-body);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

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

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 0.45em;
}

h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); }
h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.6rem); }

p {
    margin-bottom: 1em;
    max-width: 68ch;
}

a {
    color: var(--coffee);
    text-underline-offset: 3px;
    transition: color var(--transition-fast);
}

a:hover { color: var(--coffee-dark); }

/* ========================================
   Skip Link (Accesibilidad)
   ======================================== */
.skip-link {
    position: absolute;
    top: -50px;
    left: 16px;
    z-index: var(--z-skip);
    padding: 12px 18px;
    color: var(--chalk);
    background: var(--coffee-dark);
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    transition: top var(--transition-normal);
}

.skip-link:focus {
    top: 12px;
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

/* ========================================
   Contenedores
   ======================================== */
.container {
    width: min(92%, 1180px);
    margin-inline: auto;
    padding-block: clamp(80px, 12vw, 140px);
}

.grid-2 {
    display: grid;
    gap: clamp(32px, 6vw, 72px);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
    align-items: center;
}

.grid-3 {
    display: grid;
    gap: clamp(20px, 3vw, 30px);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}

/* ========================================
   EYEBROW - Etiqueta de sección (Tendencia 2026)
   ======================================== */
.eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    color: var(--coffee);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    position: relative;
    padding-left: 28px;
}

.eyebrow::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 2px;
    background: var(--gold);
    transition: width var(--transition-normal);
}

.eyebrow:hover::before {
    width: 28px;
}

/* ========================================
   BOTONES - 6 estados completos
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 28px;
    border: 0;
    border-radius: var(--radius-full);
    background: var(--coffee);
    color: var(--chalk);
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: background var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-normal);
}

.btn:hover {
    background: var(--coffee-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--chalk);
}

.btn:active {
    transform: scale(0.98);
}

.btn:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}

.btn.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: var(--chalk);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   SECCIÓN 1: HERO - Parallax + Fade-in
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    transform: scale(1.05);
    will-change: transform;
}

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

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        160deg,
        rgba(43, 29, 14, 0.82) 0%,
        rgba(43, 29, 14, 0.55) 45%,
        rgba(43, 29, 14, 0.72) 100%
    );
}

.hero-inner {
    position: relative;
    z-index: 2;
    max-width: 740px;
    color: var(--chalk);
    /* Animación inicial - se activa con JS */
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-enter), transform var(--transition-enter);
}

.hero-inner.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero h1 {
    color: var(--chalk);
    text-shadow: 0 4px 32px rgba(0, 0, 0, 0.42);
    margin-bottom: 24px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 600ms ease, transform 600ms ease;
    transition-delay: 200ms;
}

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

.hero .eyebrow {
    color: var(--latte);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease, transform 500ms ease;
    transition-delay: 100ms;
}

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

.hero p {
    color: rgba(247, 240, 230, 0.92);
    font-size: clamp(1.05rem, 2vw, 1.3rem);
    margin-bottom: 32px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease, transform 500ms ease;
    transition-delay: 350ms;
}

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

.hero .btn {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 500ms ease, transform 500ms ease, background var(--transition-fast), transform var(--transition-fast);
    transition-delay: 500ms;
}

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

/* Scroll indicator - Tendencia 2026 */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(247, 240, 230, 0.6);
    font-size: 0.75rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    animation: bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

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

/* ========================================
   SECCIÓN 2: CARTA / MENÚ - Cards con hover depth
   ======================================== */
.section-intro {
    max-width: 650px;
    margin-bottom: clamp(36px, 6vw, 64px);
}

.section-intro p {
    color: #5f4938;
}

.card {
    background: var(--cream);
    border: 1px solid var(--mist);
    border-radius: var(--radius-lg);
    padding: clamp(24px, 4vw, 32px);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--coffee), var(--gold));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-slow);
}

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

.card:hover::before {
    transform: scaleX(1);
}

.card:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

.card h3 {
    margin-top: 0;
}

.price {
    color: var(--coffee);
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
}

/* ========================================
   SECCIÓN 3: PROCESO - Grid con efecto reveal
   ======================================== */
.process {
    background: var(--cream);
    border-block: 1px solid var(--mist);
    position: relative;
}

.process-grid {
    display: grid;
    gap: 24px;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
}

.process-item {
    padding: var(--space-lg);
    background: var(--chalk);
    border-radius: var(--radius-lg);
    border: 1px solid var(--mist);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-enter), transform var(--transition-enter), box-shadow var(--transition-normal);
}

.process-item.visible {
    opacity: 1;
    transform: translateY(0);
}

.process-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.process-number {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-bottom: 22px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--coffee), var(--coffee-light));
    color: var(--chalk);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.1rem;
}

/* ========================================
   SECCIÓN 4: HISTORIA - Layout asimétrico (Tendencia 2026)
   ======================================== */
.story {
    position: relative;
    overflow: hidden;
}

.historia-background {
    position: absolute;
    top: 0;
    right: -5%;
    width: 50%;
    height: 100%;
    z-index: 0;
    opacity: 0.15;
    pointer-events: none;
}

.historia-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story > div {
    position: relative;
    z-index: 1;
}

.story h2 {
    margin-bottom: 24px;
}

.story p {
    color: #5f4938;
}

/* ========================================
   SECCIÓN 5: VISÍTANOS - CTA Climax
   ======================================== */
.visit {
    background: linear-gradient(165deg, var(--coffee-dark) 0%, var(--coffee) 60%, var(--coffee-light) 100%);
    color: var(--cream);
    position: relative;
}

.visit::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.visit h2, .visit h3 {
    color: var(--chalk);
}

.visit p {
    color: rgba(247, 240, 230, 0.85);
}

.visit .btn {
    background: var(--latte);
    color: var(--coffee-dark);
    position: relative;
    z-index: 1;
}

.visit .btn:hover {
    background: var(--chalk);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

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

.visit-details {
    display: grid;
    gap: 28px;
}

.visit-details h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--ink);
    color: var(--cream);
    padding-block: 64px 28px;
}

.site-footer a {
    color: var(--latte);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--gold-light);
}

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

.footer-grid h4 {
    margin-top: 0;
    color: var(--chalk);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 16px;
}

.footer-grid ul {
    margin: 0;
    padding: 0;
    list-style: none;
    line-height: 2;
}

.copyright {
    border-top: 1px solid rgba(247, 240, 230, 0.18);
    padding-top: 24px;
    color: rgba(247, 240, 230, 0.68);
    font-size: 0.88rem;
}

/* ========================================
   ANIMACIONES SCROLL-REVEAL (JS)
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity var(--transition-enter), transform var(--transition-enter);
}

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

.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }

/* ========================================
   SECTION DIVIDER - Tendencia 2026 (linea decorativa)
   ======================================== */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    padding: 40px 0;
}

.section-divider::before,
.section-divider::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.section-divider span {
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* ========================================
   RESPONSIVE - Mobile First
   ======================================== */
@media (max-width: 640px) {
    .site-header .container {
        align-items: flex-start;
        flex-direction: column;
        padding-block: 18px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 18px 24px;
    }

    .hero {
        min-height: 90vh;
        min-height: 90dvh;
        padding-top: 104px;
    }

    .hero-inner {
        padding-bottom: 24px;
    }

    .historia-background {
        opacity: 0.08;
    }

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

@media (min-width: 760px) {
    .visit-grid {
        grid-template-columns: 1fr 1fr;
    }

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

/* ========================================
   PREFERS-REDUCED-MOTION (Accesibilidad)
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        transition-delay: 0ms !important;
    }

    .hero-inner,
    .hero h1,
    .hero .eyebrow,
    .hero p,
    .hero .btn,
    .reveal,
    .process-item {
        opacity: 1 !important;
        transform: none !important;
    }

    .scroll-indicator {
        animation: none;
    }

    .hero-background {
        transform: none !important;
    }
}

/* ========================================
   FOCUS-VISIBLE GLOBAL
   ======================================== */
:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 4px;
}

a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
    outline: none;
}

/* ========================================
   SCROLLBAR PERSONALIZADO (Tendencia 2026)
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--cream);
}

::-webkit-scrollbar-thumb {
    background: var(--coffee);
    border-radius: 5px;
    border: 2px solid var(--cream);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--coffee-dark);
}