/* =========================================
   LA REVISTA — A La Torre GT
   Paleta de estilos.css: #1a1b26 · #ff4500 · #ffcc00 · #f5f6f9
   ========================================= */

.rv-main { overflow-x: clip; }

/* ---------- animaciones base ---------- */
@keyframes rv-sube   { from { transform: translateY(110%); } to { transform: none; } }
@keyframes rv-entra  { from { opacity: 0; transform: translateY(46px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes rv-flota  { from { translate: 0 0; } to { translate: 0 -10px; } }
@keyframes rv-gira   { to { transform: rotate(360deg); } }
@keyframes rv-deriva { to { transform: translate(60px, 40px) scale(1.12); } }

/* revelar al hacer scroll (solo si hay JS) */
.js .rv-reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); transition-delay: var(--d, 0s); }
.js .rv-reveal.visible { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.rv-hero {
    position: relative;
    isolation: isolate;
    margin: 40px auto 70px;
    text-align: center;
}
.rv-hero::before,
.rv-hero::after { content: ''; position: absolute; z-index: -1; border-radius: 50%; filter: blur(40px); pointer-events: none; }
.rv-hero::before {
    width: 480px; height: 480px; left: -140px; top: 60px;
    background: radial-gradient(circle, rgba(255, 69, 0, 0.15), transparent 68%);
    animation: rv-deriva 16s ease-in-out infinite alternate;
}
.rv-hero::after {
    width: 420px; height: 420px; right: -120px; top: 260px;
    background: radial-gradient(circle, rgba(255, 204, 0, 0.22), transparent 68%);
    animation: rv-deriva 19s ease-in-out infinite alternate-reverse;
}

.rv-cabecera {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: start;
    gap: 20px;
    margin-bottom: 38px;
}

/* sello circular con texto que gira */
.rv-sello {
    justify-self: start;
    position: relative;
    width: 112px; height: 112px;
    display: grid;
    place-items: center;
    color: #1a1b26;
    text-decoration: none;
}
.rv-sello-anillo { position: absolute; inset: 0; width: 100%; height: 100%; animation: rv-gira 18s linear infinite; }
.rv-sello-anillo text { font-size: 9.4px; font-weight: 600; fill: currentColor; }
.rv-sello-play {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #1a1b26;
    color: #fff;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease, color 0.3s ease;
}
.rv-sello-play svg { width: 16px; height: 16px; margin-left: 2px; }
.rv-sello:hover .rv-sello-play { transform: scale(1.15); background: linear-gradient(135deg, #ff4500, #ffcc00); color: #1a1b26; }
.rv-sello:hover .rv-sello-anillo { animation-duration: 5s; }
.rv-sello:focus-visible { outline: 3px solid #ff4500; outline-offset: 4px; border-radius: 50%; }

/* título */
.rv-titulo {
    font-size: clamp(2.3rem, 5.4vw, 4.5rem);
    font-weight: 800;
    line-height: 1.04;
    letter-spacing: -0.03em;
    color: #1a1b26;
}
.rv-linea { display: block; overflow: hidden; padding-bottom: 0.1em; }
.rv-linea > span { display: inline-block; transform: translateY(110%); animation: rv-sube 1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; animation-delay: var(--d, 0s); }
.rv-grad { background: linear-gradient(90deg, #ff4500, #ffcc00); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* equipo (avatares) */
.rv-equipo { justify-self: end; display: flex; align-items: center; padding-top: 10px; animation: rv-entra 0.9s 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.rv-avatar {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 3px solid #fff;
    margin-left: -11px;
    font-size: 0.78rem; font-weight: 700;
    color: #fff;
    box-shadow: 0 4px 10px rgba(26, 27, 38, 0.12);
}
.rv-avatar:first-child { margin-left: 0; }
.rv-avatar:nth-child(1) { background: #ff4500; }
.rv-avatar:nth-child(2) { background: #3fae6a; }
.rv-avatar:nth-child(3) { background: #4aa3e0; }
.rv-mas {
    width: 40px; height: 40px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: #1a1b26; color: #fff;
    margin-left: 6px;
    text-decoration: none;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.3s ease;
}
.rv-mas svg { width: 16px; height: 16px; }
.rv-mas:hover { transform: rotate(90deg) scale(1.1); background: #ff4500; }
.rv-mas:focus-visible { outline: 3px solid #ff4500; outline-offset: 3px; }

/* ---------- COLLAGE ---------- */
.rv-collage {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 14px;
    height: clamp(380px, 42vw, 500px);
    align-items: end;
}
.rv-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: var(--h, 100%);
    transition: translate 0.5s ease-out;
    animation: rv-entra 1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
    animation-delay: calc(0.45s + var(--i, 0) * 0.12s);
}

.rv-card {
    --c: #ff7a3d;
    position: relative;
    flex: var(--f, 1) 1 0;
    min-height: 0;
    overflow: hidden;
    border-radius: 26px;
    background: var(--c);
    cursor: pointer;
    outline: none;
    text-align: left;
    animation: rv-flota 6s ease-in-out infinite alternate;
    animation-delay: var(--fd, 0s);
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.5s ease;
}
.rv-card:hover,
.rv-card:focus-visible { transform: scale(1.025); box-shadow: 0 22px 44px rgba(26, 27, 38, 0.22); animation-play-state: paused; }
.rv-card:focus-visible { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #ff4500; }

.rv-naranja { --c: #ff7a3d; }
.rv-lava    { --c: #ff4a2b; }
.rv-amarillo{ --c: #ffcc00; }
.rv-selva   { --c: #3fae6a; }
.rv-lago    { --c: #4aa3e0; }
.rv-teal    { --c: #1f9c8f; }

.rv-foto {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.04);
    transition: opacity 0.8s ease, transform 0.9s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rv-foto.cargada { opacity: 1; transform: scale(1); }
.rv-card:hover .rv-foto.cargada { transform: scale(1.08); }

/* ícono de montaña mientras no hay foto */
.rv-card.sin-foto::before {
    content: '';
    position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M0 60 30 18l15 20 17-28 38 50z' fill='white'/%3E%3C/svg%3E") center 58% / 42% no-repeat;
    opacity: 0.35;
}

.rv-leyenda {
    position: absolute; left: 12px; right: 12px; bottom: 12px;
    padding: 11px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #1a1b26;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.rv-leyenda strong { display: block; font-size: 0.82rem; font-weight: 700; line-height: 1.25; }
.rv-leyenda span { display: block; font-size: 0.74rem; color: #666; margin-top: 2px; }
.rv-chica .rv-leyenda span { display: none; }
.rv-card:hover .rv-leyenda,
.rv-card:focus-visible .rv-leyenda { opacity: 1; transform: none; }

/* botón central */
.rv-col-cta { align-items: stretch; gap: 16px; }
.rv-col-cta .rv-card { flex: 1 1 0; }
.rv-cta {
    flex: 0 0 auto;
    align-self: center;
    display: inline-flex; align-items: center; gap: 10px;
    padding: 14px 24px;
    border-radius: 50px;
    background: #1a1b26;
    color: #fff;
    font-size: 0.88rem; font-weight: 600;
    text-decoration: none;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.rv-cta svg { width: 14px; height: 14px; transition: transform 0.3s ease; }
.rv-cta:hover { background: linear-gradient(90deg, #ff4500, #ffcc00); color: #1a1b26; transform: translateY(-3px); box-shadow: 0 12px 26px rgba(255, 69, 0, 0.3); }
.rv-cta:hover svg { transform: translate(3px, -3px); }
.rv-cta:focus-visible { outline: 3px solid #ff4500; outline-offset: 3px; }

/* ---------- PIE DEL HERO: cita + destacado ---------- */
.rv-pie {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 70px;
    align-items: center;
    margin-top: 60px;
    text-align: left;
}
.rv-cita-marca { font-family: Georgia, serif; font-size: 5rem; font-weight: 700; line-height: 0.7; color: #1a1b26; }
.rv-cita p { max-width: 430px; font-size: 0.98rem; line-height: 1.65; color: #444; margin: 6px 0 14px; }
.rv-firma {
    display: inline-block;
    font-family: 'Caveat', cursive;
    font-size: 1.9rem;
    color: #1a1b26;
    padding: 0 8px;
    background: linear-gradient(transparent 60%, #ffcc00 60%, #ffcc00 88%, transparent 88%);
}

.rv-destacado { display: block; text-decoration: none; color: #1a1b26; }
.rv-destacado-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.rv-num { display: flex; align-items: baseline; gap: 12px; }
.rv-num b { font-size: 3.2rem; font-weight: 300; line-height: 1; }
.rv-num span { font-size: 0.82rem; color: #777; font-weight: 500; }
.rv-flecha {
    width: 50px; height: 50px;
    display: grid; place-items: center;
    border-radius: 50%;
    border: 1.5px solid #1a1b26;
    transition: background 0.3s ease, color 0.3s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rv-flecha svg { width: 20px; height: 20px; transition: transform 0.3s ease; }
.rv-destacado:hover .rv-flecha { background: #1a1b26; color: #fff; transform: scale(1.08); }
.rv-destacado:hover .rv-flecha svg { transform: translateX(3px); }
.rv-destacado h3 { font-size: 1.4rem; font-weight: 700; line-height: 1.3; max-width: 380px; }
.rv-destacado:focus-visible { outline: 3px solid #ff4500; outline-offset: 6px; border-radius: 12px; }

/* ---------- ESPACIO PARA LOS POSTS ---------- */
.rv-momentos { margin: 0 auto 90px; scroll-margin-top: 90px; }
.rv-momentos-cabecera { margin-bottom: 30px; }
.rv-momentos-cabecera h2 { font-size: 1.8rem; font-weight: 700; color: #1a1b26; margin-bottom: 5px; }
.rv-momentos-cabecera p { color: #666; font-size: 0.9rem; max-width: 460px; line-height: 1.5; }

.rv-posts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 24px; }

.rv-post { background: #fff; border: 1px solid #eee; border-radius: 22px; overflow: hidden; transition: transform 0.35s ease, box-shadow 0.35s ease; }
.rv-post:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(26, 27, 38, 0.1); }
.rv-post-foto { position: relative; aspect-ratio: 4 / 3; background: #ff7a3d; overflow: hidden; }
.rv-post-foto.sin-foto::before {
    content: ''; position: absolute; inset: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 60'%3E%3Cpath d='M0 60 30 18l15 20 17-28 38 50z' fill='white'/%3E%3C/svg%3E") center 58% / 36% no-repeat;
    opacity: 0.35;
}
.rv-post-cuerpo { padding: 20px 22px 24px; }
.rv-post-meta { display: flex; gap: 10px; align-items: center; font-size: 0.76rem; color: #888; margin-bottom: 8px; }
.rv-post-meta b { color: #ff4500; font-weight: 600; }
.rv-post h3 { font-size: 1.1rem; font-weight: 700; color: #1a1b26; line-height: 1.35; margin-bottom: 8px; }
.rv-post p { font-size: 0.88rem; color: #666; line-height: 1.55; margin-bottom: 14px; }
.rv-post a { font-size: 0.85rem; font-weight: 600; color: #1a1b26; text-decoration: none; }
.rv-post a:hover { color: #ff4500; }

.rv-vacio { grid-column: 1 / -1; padding: 64px 24px; text-align: center; border: 2px dashed #e1e4ec; border-radius: 26px; background: #f9fafc; }
.rv-vacio svg { width: 92px; margin-bottom: 14px; animation: rv-flota 3s ease-in-out infinite alternate; }
.rv-vacio h3 { font-size: 1.25rem; font-weight: 700; color: #1a1b26; margin-bottom: 6px; }
.rv-vacio p { color: #777; font-size: 0.9rem; max-width: 380px; margin: 0 auto; line-height: 1.55; }

/* ---------- celulares y tablets ---------- */
@media (max-width: 900px) {
    .rv-pie { grid-template-columns: 1fr; gap: 40px; }
}
@media (max-width: 768px) {
    .rv-cabecera { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
    .rv-titulo { order: -1; }
    .rv-sello { justify-self: center; width: 96px; height: 96px; }
    .rv-equipo { justify-self: center; }

    /* el collage se desliza con el dedo */
    .rv-collage {
        display: flex;
        height: auto;
        gap: 12px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        padding: 6px 20px 24px;
        margin: 0 -20px;
        scrollbar-width: none;
    }
    .rv-collage::-webkit-scrollbar { display: none; }
    .rv-col { flex: 0 0 64%; height: 380px; scroll-snap-align: center; }
    .rv-leyenda { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
    .rv-hero::before, .rv-hero::after, .rv-sello-anillo, .rv-card, .rv-vacio svg { animation: none; }
    .rv-col, .rv-equipo { animation: none; }
    .rv-linea > span { animation: none; transform: none; }
    .js .rv-reveal { opacity: 1; transform: none; transition: none; }
}
