/* ============================================================
   Capa visual elegante: naranja con más presencia y animaciones
   suaves. Solo transform/opacity; respeta movimiento reducido.
   ============================================================ */

:root {
    --naranja: #e96a1b;
    --naranja-medio: #d65a10;
    --naranja-fuerte: #b2480c;
    --naranja-profundo: #9a3d09;
}

/* Barra de progreso de lectura */
.progreso-lectura {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 80;
    height: 3px;
    width: 0;
    pointer-events: none;
    background: linear-gradient(90deg, var(--naranja), #f4a269);
    transition: width 0.15s linear;
}

/* Resplandor cálido detrás de los encabezados */
.hero-glow {
    position: relative;
    isolation: isolate;
}

.hero-glow::before {
    content: "";
    position: absolute;
    inset: -8% -6% auto -6%;
    height: 75%;
    z-index: -1;
    pointer-events: none;
    background: radial-gradient(ellipse at 50% 0%, rgba(233, 106, 27, 0.18), transparent 65%);
    animation: respirar 9s ease-in-out infinite;
}

@keyframes respirar {
    0%, 100% {
        transform: scale(1);
        opacity: 0.75;
    }
    50% {
        transform: scale(1.07);
        opacity: 1;
    }
}

/* Aparición al hacer scroll */
.animaciones .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.animaciones .reveal.visible {
    opacity: 1;
    transform: none;
}

/* Botón naranja con más cuerpo (contraste AA con texto blanco) */
.btn-naranja {
    background: linear-gradient(135deg, #c4520b, var(--naranja-profundo)) !important;
    border-color: transparent !important;
    box-shadow: 0 12px 26px -12px rgba(233, 106, 27, 0.65) !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-naranja:hover {
    transform: translateY(-2px);
    filter: brightness(1.06);
    box-shadow: 0 18px 32px -14px rgba(233, 106, 27, 0.8) !important;
}

.btn-naranja:active {
    transform: translateY(0);
    filter: brightness(0.98);
}

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

/* Subrayado animado del menú */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    right: 100%;
    bottom: -4px;
    height: 2px;
    background: var(--naranja);
    transition: right 0.25s ease;
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
    right: 0;
}

/* Cabecera que se tiñe al bajar */
.header-scrolled {
    border-bottom-color: var(--naranja) !important;
    box-shadow: 0 12px 30px -20px rgba(233, 106, 27, 0.6);
}

/* Accesibilidad: sin movimiento si se solicita */
@media (prefers-reduced-motion: reduce) {
    .progreso-lectura,
    .hero-glow::before,
    .animaciones .reveal,
    .btn-naranja,
    .nav-link::after {
        animation: none !important;
        transition: none !important;
    }

    .animaciones .reveal {
        opacity: 1;
        transform: none;
    }
}

body.reduced-lighting-active .hero-glow::before {
    animation: none;
}

body.reduced-lighting-active .animaciones .reveal {
    opacity: 1;
    transform: none;
    transition: none;
}
