/* Portada de visitantes. Principios en docs/RAVLI_PRINCIPIOS.md
   Tema: oscuro cálido (igual que el resto del sitio). Un solo acento: el rojo de Ravli, solo en la acción principal.
   Forma: botones en píldora, fotos con radio de 20px. */

.rl {
    --rl-bg: #1a1a1a;
    --rl-surface: #211f1d;
    --rl-text: #f4efe8;
    --rl-muted: rgba(244, 239, 232, 0.62);
    --rl-faint: rgba(244, 239, 232, 0.12);
    --rl-accent: #ff383c;
    --rl-accent-press: #e5292d;
    --rl-radius: 20px;
    --rl-ease: cubic-bezier(0.16, 1, 0.3, 1);

    color: var(--rl-text);
    background: var(--rl-bg);
    font-family: 'Outfit', system-ui, sans-serif;
}

/* Misma anchura de página que el resto de Ravli (ver .rp-wrap): empieza donde el logo, termina donde el avatar */
.rl-wrap {
    width: 100%;
    max-width: var(--rv-page, 1600px);
    margin-inline: auto;
    padding-inline: 20px;
}
@media (min-width: 768px) {
    .rl-wrap { padding-inline: 32px; }
}

.rl-muted { color: var(--rl-muted); }

/* styles.css pinta h1-h6 con un color oscuro global; aquí los títulos heredan el texto claro */
.rl h1,
.rl h2 { color: var(--rl-text); }

/* ---------- Botones y enlaces ---------- */
.rl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 30px;
    border-radius: 999px;
    background: var(--rl-accent);
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    white-space: nowrap;
    transition: transform 0.2s var(--rl-ease), background-color 0.2s var(--rl-ease);
}
.rl-btn:hover { background: var(--rl-accent-press); }
.rl-btn:active { transform: scale(0.98); }
.rl-btn:focus-visible,
.rl-link:focus-visible,
.rl-cook:focus-visible,
.rl-hero-more:focus-visible {
    outline: 2px solid var(--rl-text);
    outline-offset: 4px;
}

.rl-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 16px;
    color: var(--rl-text);
    border-bottom: 1px solid var(--rl-faint);
    padding-bottom: 4px;
    transition: border-color 0.2s var(--rl-ease);
}
.rl-link::after { content: "\2192"; transition: transform 0.2s var(--rl-ease); }
.rl-link:hover { border-color: var(--rl-text); }
.rl-link:hover::after { transform: translateX(3px); }

/* ---------- 1. Hero ---------- */
.rl-hero {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100svh;
    padding: 120px 20px 112px;
    overflow: hidden;
    isolation: isolate;
    text-align: center;
}
/* Marca el borde superior; mientras se ve, el header va transparente */
.rl-hero-pic { display: contents; }
.rl-hero-sentinel {
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 8px;
    pointer-events: none;
}

/* Header sobre la foto: sin fondo ni borde mientras estás arriba del todo */
html.rl-top #main-header {
    background-color: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
}
.rl-hero-img {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 110%;
    object-fit: cover;
    /* la cocinera está a la derecha de la foto: en escritorio se ve entera,
       en móvil el recorte se centra en su cara y en el plato */
    object-position: 60% 0%;
    z-index: -2;
}
@media (max-width: 767px) {
    /* en móvil el recorte se centra en la cara y el plato de la cocinera */
    .rl-hero-img { object-position: 84% 0%; }
}
.rl-hero-shade {
    position: absolute;
    inset: 0;
    z-index: -1;
    /* centro: legibilidad del texto / arriba: legibilidad del header / abajo: la foto se funde con la página */
    background:
        radial-gradient(ellipse 70% 55% at 50% 52%, rgba(20, 16, 12, 0.66), rgba(20, 16, 12, 0.28) 72%),
        linear-gradient(180deg, rgba(14, 12, 10, 0.62) 0%, rgba(14, 12, 10, 0) 22%),
        linear-gradient(180deg, rgba(26, 26, 26, 0) 58%, rgba(26, 26, 26, 0.7) 82%, #1a1a1a 100%);
}
.rl-hero-copy {
    display: grid;
    justify-items: center;
    gap: 20px;
    max-width: 640px;
}
.rl-hero-title {
    margin: 0;
    font-size: clamp(42px, 8vw, 84px);
    font-weight: 600;
    line-height: 1.02;
    letter-spacing: -0.035em;
    text-wrap: balance;
}
.rl-hero-sub {
    margin: 0 0 12px;
    font-size: clamp(17px, 2.2vw, 21px);
    line-height: 1.5;
    font-weight: 400;
    color: rgba(244, 239, 232, 0.82);
}
.rl-hero-more {
    position: absolute;
    left: 50%;
    bottom: 28px;
    transform: translateX(-50%);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: rgba(244, 239, 232, 0.7);
    transition: color 0.2s var(--rl-ease);
}
.rl-hero-more::after { content: "\2193"; font-size: 16px; }
.rl-hero-more:hover { color: var(--rl-text); }
/* En móvil la barra inferior de navegación ocupa ese espacio */
@media (max-width: 767px) { .rl-hero-more { display: none; } }

@media (prefers-reduced-motion: no-preference) {
    .rl-hero-img { animation: rl-settle 1.6s var(--rl-ease) both; }
    .rl-hero-copy > * { animation: rl-rise 0.9s var(--rl-ease) both; }
    .rl-hero-copy > :nth-child(2) { animation-delay: 0.12s; }
    .rl-hero-copy > :nth-child(3) { animation-delay: 0.24s; }
}
@keyframes rl-settle { from { scale: 1.06; } to { scale: 1; } }
@keyframes rl-rise { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }

/* ---------- Movimiento ligado al scroll ----------
   Parallax discreto con scroll-driven animations de CSS (sin listeners de scroll).
   Navegadores sin soporte simplemente ven la página quieta. */
@media (prefers-reduced-motion: no-preference) {

    @supports (animation-timeline: scroll()) {
        /* La foto del hero baja más lento que la página */
        .rl-hero-img {
            animation: rl-settle 1.6s var(--rl-ease) both, rl-hero-drift linear both;
            animation-timeline: auto, scroll(root);
            animation-range: normal, 0 100vh;
        }
        /* El texto del hero se despide suavemente al bajar */
        .rl-hero-copy {
            animation: rl-hero-leave linear both;
            animation-timeline: scroll(root);
            animation-range: 0 70vh;
        }
        /* Las fotos de los cocineros se desplazan un poco dentro de su marco */
        .rl-cook-photo img {
            scale: 1.12;
            animation: rl-photo-drift linear both;
            animation-timeline: view();
        }
    }
}
@keyframes rl-hero-drift { from { translate: 0 0; } to { translate: 0 7%; } }
@keyframes rl-hero-leave { from { opacity: 1; translate: 0 0; } to { opacity: 0; translate: 0 -48px; } }
@keyframes rl-photo-drift { from { translate: 0 -4%; } to { translate: 0 4%; } }

/* Aparición al entrar en pantalla. Solo se activa si el script corre (html.rl-motion),
   así sin JavaScript todo se ve desde el principio. */
html.rl-motion [data-rl-reveal] {
    opacity: 0;
    translate: 0 28px;
    transition: opacity 0.9s var(--rl-ease), translate 0.9s var(--rl-ease);
    transition-delay: calc(var(--rl-i, 0) * 90ms);
}
html.rl-motion [data-rl-reveal].is-in { opacity: 1; translate: 0 0; }

/* ---------- Títulos compartidos ---------- */
.rl-h2 {
    margin: 0;
    font-size: clamp(30px, 4.4vw, 48px);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.03em;
    text-wrap: balance;
}
.rl-lead {
    margin: 14px 0 0;
    max-width: 52ch;
    font-size: 17px;
    line-height: 1.6;
    color: var(--rl-muted);
}

/* ---------- 2. La promesa ---------- */
.rl-promise { padding-block: 112px 96px; }
.rl-promise-grid {
    display: grid;
    gap: 48px;
}
@media (min-width: 900px) {
    .rl-promise-grid { grid-template-columns: 5fr 6fr; gap: 80px; align-items: start; }
}
.rl-moments {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
}
.rl-moments li {
    display: grid;
    gap: 6px;
    padding-block: 26px;
    border-top: 1px solid var(--rl-faint);
}
.rl-moments li:first-child { border-top: 0; padding-top: 0; }
.rl-moment-title {
    font-size: clamp(22px, 2.6vw, 28px);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.rl-moment-text { font-size: 17px; line-height: 1.55; color: var(--rl-muted); }

/* ---------- 3. Cocineros ---------- */
.rl-cooks { padding-block: 96px; background: var(--rl-surface); }
.rl-cook-row {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(240px, 72%);
    gap: 16px;
    margin-block: 40px 36px;
    padding-inline: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 20px;
    scrollbar-width: none;
}
.rl-cook-row::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
    .rl-cook-row { grid-auto-columns: minmax(240px, 38%); padding-inline: 32px; scroll-padding-inline: 32px; gap: 24px; }
}
@media (min-width: 1200px) {
    .rl-cook-row {
        grid-auto-flow: row;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        max-width: var(--rv-page, 1600px);
        margin-inline: auto;
        overflow: visible;
    }
}
.rl-cook {
    display: grid;
    align-content: start; /* con menos texto, el nombre no baja: todas las tarjetas alineadas arriba */
    gap: 14px;
    scroll-snap-align: start;
    color: inherit;
}
.rl-cook-photo {
    aspect-ratio: 4 / 5;
    max-width: 100%;
    border-radius: var(--rl-radius);
    overflow: hidden;
    background: #2a2724;
}
.rl-cook-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--rl-ease);
}
.rl-cook:hover .rl-cook-photo img { transform: scale(1.04); }
.rl-cook-body { display: grid; gap: 4px; min-width: 0; }
.rl-cook-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.rl-cook-name { font-size: 18px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rl-cook-rating { display: inline-flex; align-items: center; gap: 4px; font-size: 15px; font-weight: 500; flex-shrink: 0; font-variant-numeric: tabular-nums; }
.rl-cook-rating svg { width: 14px; height: 14px; }
.rl-cook-meta { font-size: 15px; color: var(--rl-muted); }
.rl-cook-price { font-size: 15px; font-weight: 500; margin-top: 4px; font-variant-numeric: tabular-nums; }
.rl-empty { margin: 32px 0; font-size: 17px; color: var(--rl-muted); max-width: 52ch; }

/* ---------- 4. Cómo funciona ---------- */
.rl-how { padding-block: 112px 96px; }
.rl-steps {
    list-style: none;
    margin: 48px 0 0;
    padding: 0;
    display: grid;
    gap: 36px;
}
@media (min-width: 900px) {
    .rl-steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; }
}
.rl-steps li { display: grid; gap: 10px; padding-top: 22px; border-top: 1px solid var(--rl-faint); }
.rl-step-verb { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.rl-step-text { font-size: 17px; line-height: 1.6; color: var(--rl-muted); max-width: 34ch; }

/* ---------- 5. Para quien cocina ---------- */
.rl-cta-cook { padding-block: 0 120px; }
.rl-cta-cook-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 20px 40px;
    padding-top: 48px;
    border-top: 1px solid var(--rl-faint);
}
.rl-cta-cook-text {
    margin: 0;
    font-size: clamp(22px, 2.8vw, 30px);
    font-weight: 600;
    letter-spacing: -0.02em;
}
