/**
 * Editorial Glam — Template CSS
 * Efectos: shimmer editorial, countdown tick, reveal scroll, grain overlay, scroll-to-top
 */

/* ═══════════════════════════════════════════════
   VARIABLES Y BASE
═══════════════════════════════════════════════ */
:root {
    --editorial-ink: #1a1a2e;
    --editorial-slate: #3d3d5c;
    --editorial-gray: #6b6b80;
    --editorial-silver: #9a9ab0;
    --editorial-paper: #f8f8fc;
    --editorial-outline: rgba(40, 45, 61, 0.16);

    --editorial-glow: 0 0 20px rgba(61, 61, 92, 0.08);
    --editorial-glow-strong: 0 0 30px rgba(61, 61, 92, 0.15);

    --editorial-float-dur: 7s;
}

body.invitation-shell--editorial-glam {
    background:
        radial-gradient(ellipse 60% 40% at 50% 0%, rgba(61, 61, 92, 0.04), transparent),
        linear-gradient(180deg, #f4f4f8 0%, #fafafc 50%, #f0f0f5 100%);
}

body.invitation-shell--editorial-glam .xv-template--editorial {
    --editorial-outline: rgba(40, 45, 61, 0.16);
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    position: relative;
    overflow-x: clip;
}

body.invitation-shell--editorial-glam .xv-editorial-board {
    box-shadow: 0 32px 90px rgba(15, 18, 31, 0.22);
}

body.invitation-shell--editorial-glam .xv-editorial-copy,
body.invitation-shell--editorial-glam .xv-editorial-rail,
body.invitation-shell--editorial-glam .xv-surface--paper {
    border-color: rgba(22, 27, 41, 0.08);
}

body.invitation-shell--editorial-glam .xv-editorial-strip .xv-strip-card {
    box-shadow: 0 16px 40px rgba(20, 22, 33, 0.08);
}

body.invitation-shell--editorial-glam .xv-editorial-music {
    padding: 2rem 1.5rem;
}

body.invitation-shell--editorial-glam .xv-editorial-music-embed iframe {
    display: block;
    width: 100%;
}

/* ═══════════════════════════════════════════════
   GRAIN OVERLAY (textura editorial de revista)
═══════════════════════════════════════════════ */
.xv-template--editorial::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.018;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
    background-size: 300px 300px;
}

/* Asegura que el contenido esté por encima del grain */
.xv-template--editorial > * {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════
   SHIMMER SUTIL EN TÍTULO (editorial sobrio)
═══════════════════════════════════════════════ */
.xv-template--editorial .xv-title--editorial span {
    display: inline-block;
    background: linear-gradient(
        120deg,
        var(--editorial-ink) 0%,
        var(--editorial-slate) 30%,
        var(--editorial-gray) 50%,
        var(--editorial-slate) 70%,
        var(--editorial-ink) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: editorial-shimmer 8s linear infinite;
    filter: drop-shadow(0 1px 4px rgba(26, 26, 46, 0.12));
}

@keyframes editorial-shimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* ═══════════════════════════════════════════════
   COUNTDOWN + TICK ANIMATION
═══════════════════════════════════════════════ */
body.invitation-shell--editorial-glam .xv-strip-card--countdown strong {
    display: block;
    margin: 0.5rem 0 0.35rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
    transition: transform 0.26s ease, text-shadow 0.26s ease;
}

/* Animación tick al cambiar número */
body.invitation-shell--editorial-glam .xv-strip-card--countdown strong.is-tick {
    animation: editorial-countdown-tick 0.26s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes editorial-countdown-tick {
    0% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-5px) scale(1.04); text-shadow: 0 0 10px rgba(61, 61, 92, 0.15); }
    100% { transform: translateY(0) scale(1); }
}

/* Hover sutil en cards de countdown */
body.invitation-shell--editorial-glam .xv-strip-card--countdown {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

body.invitation-shell--editorial-glam .xv-strip-card--countdown:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 48px rgba(20, 22, 33, 0.12);
}

/* ═══════════════════════════════════════════════
   REVEAL ON SCROLL
═══════════════════════════════════════════════ */
.xv-template--editorial [data-reveal] {
    opacity: 0;
    transform: translate3d(0, 28px, 0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.xv-template--editorial [data-reveal].is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* ═══════════════════════════════════════════════
   SCROLL TO TOP BUTTON
═══════════════════════════════════════════════ */
.editorial-scroll-top {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    z-index: 100;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid var(--editorial-outline);
    background: rgba(248, 248, 252, 0.92);
    backdrop-filter: blur(12px);
    color: var(--editorial-ink);
    font-size: 0.95rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px) scale(0.95);
    transition:
        opacity 0.25s ease,
        visibility 0.25s ease,
        transform 0.25s ease,
        box-shadow 0.25s ease,
        border-color 0.25s ease;
    box-shadow: 0 6px 20px rgba(15, 18, 31, 0.1);
}

.editorial-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.editorial-scroll-top:hover {
    border-color: var(--editorial-slate);
    background: #fff;
    box-shadow: 0 10px 28px rgba(15, 18, 31, 0.15);
    transform: translateY(-3px) scale(1.02);
}

.editorial-scroll-top:active {
    transform: translateY(0) scale(0.97);
}

/* ═══════════════════════════════════════════════
   FAQ ACCORDION (para cards expandibles)
═══════════════════════════════════════════════ */
.xv-strip-card.is-active .xv-strip-answer {
    max-height: 500px;
    opacity: 1;
}

.xv-strip-card .xv-strip-answer {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
}

/* ═══════════════════════════════════════════════
   RESTO DEL ESTILO ORIGINAL
═══════════════════════════════════════════════ */
body.invitation-shell--editorial-glam .xv-strip-card--countdown strong {
    display: block;
    margin: 0.5rem 0 0.35rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1;
}
