/* ==========================================================================
   La Llave de Lazurhi — Animaciones y atmósfera
   Capas del hero: niebla a la deriva, llovizna de Arho, libélulas de aire.
   ========================================================================== */

/* ---------- Accesibilidad ---------- */
.screen-reader-text {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}

/* ---------- Barras de desplazamiento con la paleta del sitio ---------- */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(201, 162, 75, 0.45) transparent;
}
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: var(--color-bg-deep); }
::-webkit-scrollbar-thumb {
    border-radius: 99px;
    background: linear-gradient(180deg, var(--color-gold) 0%, var(--color-emerald) 100%);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--color-gold-light) 0%, var(--color-teal) 100%);
}
::-webkit-scrollbar-corner { background: var(--color-bg-deep); }

/* ---------- Separador del menú: fino y con los colores del sitio ---------- */
.nav-lateral {
    border-right: 0 !important;
}
.nav-lateral::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(196, 154, 75, 0.4) 18%,
        rgba(139, 90, 107, 0.35) 50%,
        rgba(196, 154, 75, 0.4) 82%,
        transparent 100%);
    pointer-events: none;
}

/* ---------- Menú: entrada escalonada y luz al pasar ---------- */
.nav-lateral__header,
.nav-lateral__footer,
.nav-lateral__list > li {
    opacity: 0;
    transform: translateX(-14px);
    animation: navIn 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.nav-lateral__header { animation-delay: 0.1s; }
.nav-lateral__list > li:nth-child(1)  { animation-delay: 0.22s; }
.nav-lateral__list > li:nth-child(2)  { animation-delay: 0.27s; }
.nav-lateral__list > li:nth-child(3)  { animation-delay: 0.32s; }
.nav-lateral__list > li:nth-child(4)  { animation-delay: 0.37s; }
.nav-lateral__list > li:nth-child(5)  { animation-delay: 0.42s; }
.nav-lateral__list > li:nth-child(6)  { animation-delay: 0.47s; }
.nav-lateral__list > li:nth-child(7)  { animation-delay: 0.52s; }
.nav-lateral__list > li:nth-child(8)  { animation-delay: 0.57s; }
.nav-lateral__list > li:nth-child(9)  { animation-delay: 0.62s; }
.nav-lateral__list > li:nth-child(10) { animation-delay: 0.67s; }
.nav-lateral__list > li:nth-child(11) { animation-delay: 0.72s; }
.nav-lateral__list > li:nth-child(12) { animation-delay: 0.77s; }
.nav-lateral__footer { animation-delay: 0.85s; }

@keyframes navIn {
    to { opacity: 1; transform: translateX(0); }
}

/* Sigilo del logo: latido lento */
.nav-lateral__sigil {
    animation: sigilPulse 5s ease-in-out infinite;
}
@keyframes sigilPulse {
    0%, 100% { opacity: 0.85; text-shadow: 0 0 8px rgba(201, 162, 75, 0.25); }
    50%      { opacity: 1;    text-shadow: 0 0 22px rgba(201, 162, 75, 0.6); }
}

/* Enlaces del menú: rombo que aparece y barrido de luz */
.nav-lateral__list a {
    position: relative;
    overflow: hidden;
}
.nav-lateral__list a::before {
    content: '\25C6';
    position: absolute;
    left: 0.55rem;
    top: 50%;
    transform: translateY(-50%) scale(0);
    font-size: 0.45rem;
    color: var(--color-teal);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.nav-lateral__list a:hover,
.nav-lateral__list .current-menu-item > a,
.nav-lateral__list .current_page_item > a {
    padding-left: 1.85rem;
}
.nav-lateral__list a:hover::before,
.nav-lateral__list .current-menu-item > a::before,
.nav-lateral__list .current_page_item > a::before {
    transform: translateY(-50%) scale(1);
}

/* ==========================================================================
   HERO — atmósfera de la isla de Arho
   ========================================================================== */

.hero {
    isolation: isolate;
}

.hero__bg,
.hero__mist,
.hero__rain,
.hero__libelulas,
.hero__halo,
.hero__vignette {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.hero__bg  { z-index: 0; }
.hero__mist { z-index: 1; }
.hero__rain { z-index: 2; }
.hero__libelulas { z-index: 3; width: 100%; height: 100%; }
.hero__halo { z-index: 4; }
.hero__vignette { z-index: 5; }
.hero__content { z-index: 6; }
.hero__scroll  { z-index: 6; }

/* Niebla a la deriva: dos capas con ritmos distintos */
.hero__mist {
    opacity: 0.55;
    will-change: transform;
}
.hero__mist--a {
    background:
        radial-gradient(38% 46% at 22% 62%, rgba(139, 90, 107, 0.25) 0%, transparent 68%),
        radial-gradient(30% 38% at 76% 34%, rgba(62, 40, 72, 0.30) 0%, transparent 70%);
    animation: mistA 34s ease-in-out infinite alternate;
}
.hero__mist--b {
    background:
        radial-gradient(44% 40% at 62% 76%, rgba(196, 122, 58, 0.12) 0%, transparent 66%),
        radial-gradient(34% 44% at 14% 22%, rgba(62, 40, 72, 0.20) 0%, transparent 68%);
    animation: mistB 46s ease-in-out infinite alternate;
}

@keyframes mistA {
    from { transform: translate3d(-3%, 1%, 0) scale(1.05); }
    to   { transform: translate3d(4%, -3%, 0) scale(1.16); }
}
@keyframes mistB {
    from { transform: translate3d(3%, -2%, 0) scale(1.12); }
    to   { transform: translate3d(-4%, 3%, 0) scale(1.02); }
}

/* Llovizna casi permanente de Simettalin */
.hero__rain {
    opacity: 0.12;
    background-image: repeating-linear-gradient(
        104deg,
        transparent 0 22px,
        rgba(196, 154, 75, 0.45) 22px 23px,
        transparent 23px 48px,
        rgba(196, 122, 58, 0.25) 48px 49px,
        transparent 49px 96px
    );
    background-size: 320px 320px;
    animation: drizzle 2.6s linear infinite;
}
@keyframes drizzle {
    to { background-position: -78px 320px; }
}

/* Halo tras el título */
.hero__halo {
    background: radial-gradient(46% 42% at 50% 46%,
        rgba(201, 162, 75, 0.16) 0%,
        rgba(201, 162, 75, 0.05) 40%,
        transparent 72%);
    animation: heroHalo 8s ease-in-out infinite;
}
@keyframes heroHalo {
    0%, 100% { opacity: 0.65; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.08); }
}

/* Viñeta: cierra los bordes y da profundidad */
.hero__vignette {
    background: radial-gradient(120% 92% at 50% 50%,
        transparent 40%,
        rgba(7, 9, 13, 0.55) 82%,
        rgba(7, 9, 13, 0.85) 100%);
}

/* ---------- Contenido del hero: entra cuando el sitio está listo ---------- */
.hero__sigil,
.hero__title .ltr,
.hero__subtitle,
.hero__tagline,
.hero__actions,
.hero__scroll {
    opacity: 0;
}

.hero__sigil {
    display: block;
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: 1.2rem;
    transform: rotate(-45deg) scale(0.4);
}

.hero__title-line { display: block; }

.hero__title .ltr {
    display: inline-block;
    transform: translateY(0.55em) rotateX(-60deg);
    filter: blur(6px);
    transform-origin: 50% 100%;
}

/* Disparo de las animaciones del hero */
body.is-ready .hero__sigil {
    animation: heroSigil 1.1s cubic-bezier(0.34, 1.56, 0.64, 1) 0.1s forwards,
               sigilPulse 5s ease-in-out 1.4s infinite;
}
body.is-ready .hero__title .ltr {
    animation: heroLetter 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
    animation-delay: calc(0.3s + var(--i, 0) * 0.048s);
}
body.is-ready .hero__subtitle {
    animation: heroSub 1.2s cubic-bezier(0.22, 1, 0.36, 1) 1.15s forwards;
}
body.is-ready .hero__tagline {
    animation: heroRise 1s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
}
body.is-ready .hero__actions {
    animation: heroRise 1s cubic-bezier(0.22, 1, 0.36, 1) 1.6s forwards;
}
body.is-ready .hero__scroll {
    animation: heroRise 1s ease 2.1s forwards;
}

@keyframes heroSigil {
    to { opacity: 0.9; transform: rotate(0deg) scale(1); }
}
@keyframes heroLetter {
    to { opacity: 1; transform: translateY(0) rotateX(0); filter: blur(0); }
}
@keyframes heroSub {
    from { opacity: 0; letter-spacing: 0.04em; }
    to   { opacity: 1; letter-spacing: 0.15em; }
}
@keyframes heroRise {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Título del hero: color dorado directo */
.hero__title {
    position: relative;
    color: var(--color-gold);
}

.hero__title .ltr {
    color: var(--color-gold);
}


/* ---------- Indicador de scroll ---------- */
.hero__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.hero__scroll-line {
    width: 1px;
    height: 46px;
    background: linear-gradient(180deg, transparent, var(--color-gold));
    position: relative;
    overflow: hidden;
}
.hero__scroll-line::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--color-gold-pale);
    animation: scrollDrop 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}
@keyframes scrollDrop {
    0%   { transform: translateY(-100%); }
    60%  { transform: translateY(100%); }
    100% { transform: translateY(100%); }
}

.hero__scroll-text {
    font-family: var(--font-nav);
    font-size: 0.66rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    transition: color 0.3s;
}
.hero__scroll:hover .hero__scroll-text {
    color: var(--color-gold-light);
}

/* ---------- Botones: efectos diferenciados ---------- */
.btn {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Primario: resplandor dorado que pulsa al hover */
.btn--primary::after,
.btn--hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, rgba(201, 162, 75, 0.35), transparent 70%);
    opacity: 0;
    transform: scale(0.6);
    transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn--primary:hover::after,
.btn--hero:hover::after {
    opacity: 1;
    transform: scale(1.4);
}

/* Secundario: barrido de luz diagonal */
.btn--secondary::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg,
        transparent 20%, rgba(255, 255, 255, 0.22) 50%, transparent 80%);
    transform: translateX(-120%);
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn--secondary:hover::after { transform: translateX(120%); }

/* Ghost/outline: borde que se ilumina + fondo sutil */
.btn--ghost::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(201, 162, 75, 0.08), rgba(70, 179, 166, 0.06));
    opacity: 0;
    transition: opacity 0.4s ease;
}
.btn--ghost:hover::after { opacity: 1; }

/* CTA del nav: destello rápido al pasar */
.nav-lateral__cta::after {
    content: '';
    position: absolute;
    top: 0; left: -80%;
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: skewX(-15deg);
    transition: left 0.5s ease;
}
.nav-lateral__cta:hover::after { left: 130%; }

/* ==========================================================================
   REVELADOS EN SCROLL
   Uso: data-animate="up|down|left|right|scale|blur|mask" + data-delay="ms"
   ========================================================================== */

[data-animate] {
    opacity: 0;
    transition:
        opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
        filter 0.9s ease,
        clip-path 1s cubic-bezier(0.76, 0, 0.24, 1);
    transition-delay: var(--d, 0ms);
    will-change: opacity, transform;
}

[data-animate="up"]    { transform: translateY(38px); }
[data-animate="down"]  { transform: translateY(-38px); }
[data-animate="left"]  { transform: translateX(-44px); }
[data-animate="right"] { transform: translateX(44px); }
[data-animate="scale"] { transform: scale(0.86); }
[data-animate="blur"]  { transform: translateY(22px); filter: blur(10px); }
[data-animate="mask"]  { clip-path: inset(0 0 100% 0); }

[data-animate].is-visible {
    opacity: 1;
    transform: none;
    filter: none;
    clip-path: inset(0 0 0 0);
}

/* ==========================================================================
   SECCIÓN UMBRAL (tras el hero)
   ========================================================================== */

.umbral {
    position: relative;
    padding: 7rem 2rem 6rem;
    background:
        radial-gradient(60% 50% at 50% 0%, rgba(42, 125, 106, 0.10) 0%, transparent 70%),
        var(--color-bg);
}

.umbral__inner {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.umbral__eyebrow {
    font-family: var(--font-nav);
    font-size: 0.72rem;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--color-teal);
    margin-bottom: 1.6rem;
}

.umbral__quote {
    font-family: var(--font-body);
    font-size: clamp(1.15rem, 2.4vw, 1.6rem);
    font-style: italic;
    line-height: 1.65;
    color: var(--color-ivory-dim);
    max-width: 34ch;
    margin: 0 auto;
    border: 0;
    padding: 0;
    background: none;
}

.divider {
    font-size: 0.8rem;
}

/* ---------- Portales (tarjetas de acceso) ---------- */
.umbral__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.4rem;
    margin-top: 1rem;
    text-align: left;
}

.portal {
    position: relative;
    display: block;
    padding: 2rem 1.6rem 1.8rem;
    background: linear-gradient(160deg, var(--color-surface) 0%, var(--color-bg-deep) 100%);
    border: 1px solid rgba(201, 162, 75, 0.12);
    border-radius: var(--radius-lg);
    overflow: hidden;
    text-decoration: none;
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s,
        box-shadow 0.5s;
}

/* Resplandor que sube al pasar el ratón */
.portal::before {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -60%;
    width: 140%;
    height: 100%;
    transform: translateX(-50%);
    background: radial-gradient(50% 60% at 50% 100%,
        rgba(70, 179, 166, 0.22) 0%, transparent 72%);
    opacity: 0;
    transition: opacity 0.5s ease, bottom 0.6s ease;
}

.portal:hover {
    transform: translateY(-7px);
    border-color: rgba(201, 162, 75, 0.42);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
}
.portal:hover::before {
    opacity: 1;
    bottom: -35%;
}

.portal__glyph {
    position: relative;
    display: block;
    font-size: 1.6rem;
    line-height: 1;
    color: var(--color-gold);
    margin-bottom: 0.9rem;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.portal:hover .portal__glyph {
    transform: translateY(-3px) scale(1.12);
}

.portal__title {
    position: relative;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--color-ivory);
    margin-bottom: 0.45rem;
    transition: color 0.35s;
}
.portal:hover .portal__title {
    color: var(--color-gold-light);
}

.portal__text {
    position: relative;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted);
    margin: 0;
}

/* ---------- Tarjetas de volumen y de post: elevación con brillo ---------- */
.volume-card,
.post-card,
.contacto-red a {
    transition:
        transform 0.5s cubic-bezier(0.22, 1, 0.36, 1),
        border-color 0.4s,
        box-shadow 0.5s;
}
.volume-card:hover,
.post-card:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(201, 162, 75, 0.18) inset;
}

/* ---------- Sin movimiento si el usuario lo pide ---------- */
@media (prefers-reduced-motion: reduce) {
    .hero__mist,
    .hero__rain,
    .hero__halo,
    .hero__scroll-line::after,
    .nav-lateral__sigil {
        animation: none !important;
    }
    .hero__sigil,
    .hero__title .ltr,
    .hero__subtitle,
    .hero__tagline,
    .hero__actions,
    .hero__scroll,
    [data-animate] {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
        clip-path: none !important;
        animation: none !important;
    }
    .nav-lateral__header,
    .nav-lateral__footer,
    .nav-lateral__list > li {
        opacity: 1;
        transform: none;
        animation: none;
    }
    .hero__libelulas { display: none; }
}

/* ==========================================================================
   Llamada principal del hero
   ========================================================================== */

.btn--hero {
    padding: 1.15rem 3.2rem;
    font-size: 1.05rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 700;
    border-radius: 2px;
    box-shadow: 0 8px 30px rgba(201, 162, 75, 0.22);
}
.btn--hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 44px rgba(201, 162, 75, 0.42);
}

.hero__actions {
    margin-top: 2.6rem;
}

/* Aire suficiente para que la llamada no toque el indicador de scroll */
.hero {
    padding-bottom: 9rem;
}

@media (max-width: 600px) {
    .btn--hero {
        padding: 1rem 2.2rem;
        font-size: 0.92rem;
    }
    .hero { padding-bottom: 8rem; }
}
