/* =========================================================================
   TARJETA VIRTUAL DE GRADUACIÓN - SISTEMA VISUAL DE LUJO
   ========================================================================= */

:root {
    --navy-950: #060C18;
    --navy-900: #0B132B;
    --navy-800: #16213E;
    --gold-200: #F7EAC0;
    --gold-300: #EAD18A;
    --gold-400: #DFBF65;
    --gold-500: #D4AF37;
    --gold-600: #B08D26;
    --gold-700: #8A6D1B;
    --cream-50: #FDFBF7;
    --cream-200: #EFE8D8;
}

/* Bloqueo de scroll mientras el sobre está cerrado */
body.envelope-locked {
    overflow: hidden;
    height: 100vh;
}

body {
    background-color: var(--navy-950);
    background-image:
        radial-gradient(ellipse 80% 50% at 50% 0%, rgba(212, 175, 55, 0.08), transparent 70%),
        radial-gradient(circle at 15% 85%, rgba(28, 37, 65, 0.55), transparent 55%),
        radial-gradient(circle at 85% 30%, rgba(212, 175, 55, 0.05), transparent 50%);
    color: #F8F5EE;
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

/* Textura sutil tipo papel algodón / lino editorial */
.cotton-paper-texture {
    background-image:
        radial-gradient(rgba(247, 234, 192, 0.03) 1px, transparent 0),
        radial-gradient(rgba(212, 175, 55, 0.025) 1px, transparent 0);
    background-size: 26px 26px;
    background-position: 0 0, 13px 13px;
}

/* Tipografía numérica alineada para el contador */
.tabular-nums {
    font-variant-numeric: tabular-nums;
}

/* Gradiente metálico dorado en textos */
.gold-gradient-text {
    background: linear-gradient(135deg, #F7EAC0 0%, #D4AF37 45%, #FFF2C6 65%, #B08D26 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Marco principal de la tarjeta con doble filo dorado */
.luxury-card-frame {
    box-shadow:
        0 25px 70px -15px rgba(0, 0, 0, 0.78),
        0 0 40px rgba(212, 175, 55, 0.12),
        inset 0 1px 0 rgba(247, 234, 192, 0.22);
    border: 1px solid rgba(212, 175, 55, 0.38);
}

.luxury-inner-border {
    border: 1px solid rgba(212, 175, 55, 0.18);
    pointer-events: none;
}

/* =========================================================================
   SOBRE DE PAPELERÍA DE LUJO Y SELLO DE CERA 3D
   ========================================================================= */
.envelope-door-top {
    transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.9s ease;
    transform-origin: top;
}

.envelope-door-bottom {
    transition: transform 1.1s cubic-bezier(0.65, 0, 0.35, 1), opacity 0.9s ease;
    transform-origin: bottom;
}

.envelope-opened .envelope-door-top {
    transform: translateY(-102%) rotateX(40deg);
    opacity: 0;
}

.envelope-opened .envelope-door-bottom {
    transform: translateY(102%) rotateX(-40deg);
    opacity: 0;
}

.envelope-flap-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.45;
}

@keyframes pulseSeal {
    0%, 100% {
        transform: scale(1);
        box-shadow:
            0 12px 30px rgba(0, 0, 0, 0.65),
            0 0 0 0 rgba(212, 175, 55, 0.65),
            inset 0 2px 6px rgba(255, 250, 220, 0.75),
            inset 0 -6px 14px rgba(82, 60, 10, 0.8);
    }
    50% {
        transform: scale(1.05);
        box-shadow:
            0 16px 38px rgba(0, 0, 0, 0.75),
            0 0 0 18px rgba(212, 175, 55, 0),
            inset 0 2px 6px rgba(255, 250, 220, 0.85),
            inset 0 -6px 14px rgba(82, 60, 10, 0.85);
    }
}

@keyframes sealShimmer {
    0% {
        transform: translateX(-140%) rotate(25deg);
    }
    45%, 100% {
        transform: translateX(180%) rotate(25deg);
    }
}

.wax-seal-3d {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 25%, #FFF4CE 0%, #E7C974 28%, #C99F2C 62%, #7D5E14 100%);
    animation: pulseSeal 2.6s infinite ease-in-out;
    transition: transform 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.35s ease;
}

.wax-seal-3d::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 9999px;
    border: 1.5px dashed rgba(94, 70, 12, 0.55);
    box-shadow: inset 0 1px 2px rgba(255, 248, 220, 0.55);
    pointer-events: none;
}

.wax-seal-3d::after {
    content: "";
    position: absolute;
    top: -40%;
    left: -30%;
    width: 45%;
    height: 180%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.45), transparent);
    animation: sealShimmer 4.2s infinite ease-in-out;
    pointer-events: none;
}

.wax-seal-3d:hover {
    transform: scale(1.08) rotate(3deg);
}

/* =========================================================================
   RETRATO MEDALLÓN DE LA GRADUADA
   ========================================================================= */
.portrait-medallion-halo {
    background: conic-gradient(from 140deg, #8A6D1B, #F7EAC0, #D4AF37, #B08D26, #EAD18A, #8A6D1B);
}

.portrait-crop {
    object-fit: cover;
    object-position: 50% 18%;
}

/* =========================================================================
   ITINERARIO Y TARJETAS EDITORIALES
   ========================================================================= */
.event-card {
    background: linear-gradient(180deg, rgba(22, 33, 62, 0.65) 0%, rgba(11, 19, 43, 0.85) 100%);
    border: 1px solid rgba(212, 175, 55, 0.25);
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-3px);
    border-color: rgba(234, 209, 138, 0.55);
    box-shadow: 0 16px 36px -12px rgba(0, 0, 0, 0.65), 0 0 20px rgba(212, 175, 55, 0.1);
}

/* Línea conectora vertical en móvil / horizontal decorativa en desktop */
.timeline-connector {
    position: relative;
}

@media (min-width: 768px) {
    .timeline-connector::before {
        content: "";
        position: absolute;
        top: 3.25rem;
        left: 25%;
        right: 25%;
        height: 1px;
        background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
        pointer-events: none;
        z-index: 0;
    }
}

/* =========================================================================
   ANIMACIONES DE SCROLL Y PARTÍCULAS
   ========================================================================= */
.reveal-up {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1), transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.sparkle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: #EAD18A;
    border-radius: 50%;
    pointer-events: none;
    opacity: 0.35;
    animation: floatUp linear infinite;
    z-index: 1;
}

@keyframes floatUp {
    0% {
        transform: translateY(100vh) scale(0.5);
        opacity: 0;
    }
    20% {
        opacity: 0.55;
    }
    80% {
        opacity: 0.55;
    }
    100% {
        transform: translateY(-10vh) scale(1.2);
        opacity: 0;
    }
}

/* Scrollbar personalizada */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--gold-700);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-500);
}

/* Accesibilidad: respetar preferencia de movimiento reducido */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .sparkle {
        display: none;
    }

    .reveal-up {
        opacity: 1;
        transform: none;
    }
}
