
body {
    overflow-x: hidden;
}

body.locked {
    overflow: hidden;
    height: 100vh;
}

#site-header { min-height: 0; }

/* ---------- INTRO ---------- */

.intro {
    position: fixed;
    inset: 0;
    z-index: 200;
    background-image:
        radial-gradient(ellipse 120% 80% at 50% 120%, rgba(90, 47, 146, 0.6), transparent 60%),
        radial-gradient(ellipse 70% 60% at 50% 0%, rgba(30, 10, 55, 0.8), rgba(11, 7, 18, 0.93) 70%),
        url('../assets/rama-triangulo.webp');
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat, no-repeat, no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: opacity 1.2s ease;
}

.intro.hide {
    opacity: 0;
    pointer-events: none;
}

.halo {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 70vmax;
    height: 70vmax;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(236, 220, 255, 0.5) 0%, rgba(181, 123, 255, 0.32) 22%, rgba(90, 47, 146, 0.15) 45%, transparent 72%);
    opacity: 0;
    transition: opacity 1.2s ease;
}

.halo.on {
    opacity: 1;
}

.intro-text-wrap {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 0 1.5rem;
}

.intro-title {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 1.2s ease, transform 1s ease;
}

.intro-title.show {
    opacity: 1;
    transform: translateY(0);
}

.intro-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 8vw, 5.5rem);
    line-height: 1.2;
    letter-spacing: 0.04em;
    color: var(--beam-core);
    /*text-shadow:0 0 30px rgba(181,123,255,0.65), 0 0 70px rgba(181,123,255,0.35);*/
    margin: 0;
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}


.skip-btn {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 3;
    background: transparent;
    border: 1px solid var(--violet-mid);
    color: var(--ink-dim);
    padding: 0.5rem 1rem;
    border-radius: 2px;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
}

.skip-btn:hover,
.skip-btn:focus-visible {
    color: var(--ink-pale);
    border-color: var(--beam-glow);
}

@font-face {
  font-family: 'Cinzel Decorative';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/cinzel-decorative-700.woff2') format('woff2');
}

/* ---------- HERO ---------- */

.hero {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    align-items: center;
    gap: 2.5rem;
    position: relative;   /* nuevo: ancla a .hero-bg */
    padding: 9rem clamp(1.5rem, 6vw, 5rem) 5rem;
    isolation: isolate;
}


.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    background-image: url('../assets/fondo-faro.webp');
    background-size: cover;
    background-position: center 30%;
    background-repeat: no-repeat;
    background-color: var(--bg-deep);
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(6, 4, 10, 0.94) 0%, rgba(6, 4, 10, 0.8) 38%, rgba(6, 4, 10, 0.55) 65%, rgba(6, 4, 10, 0.82) 100%),
        linear-gradient(to top, rgba(6, 4, 10, 0.85), transparent 40%);
}

.hero-bg .dunes {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30%;
    background: linear-gradient(to top, #04030a, #150a26 70%, transparent);
    clip-path: polygon(0% 60%, 12% 45%, 28% 55%, 45% 30%, 60% 48%, 78% 35%, 100% 50%, 100% 100%, 0% 100%);
    z-index: 1;
}

.hero-content {
    max-width: 34rem;
    min-width: 0;
}



.hero-tagline {
    font-family: var(--font-body);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.95rem;
    color: var(--beam-glow);
    margin: 1.4rem 0 1rem;
}

.hero-title {
    font-family: var(--font-title);
    font-weight: 900;
    font-size: clamp(2.6rem, 6.4vw, 4.6rem);
    line-height: 1.04;
    letter-spacing: 0.01em;
    margin: 0;
    color: var(--ink-pale);
    text-shadow: 0 4px 30px rgba(0, 0, 0, 0.8);
}

.hero-title em {
    display: block;
    font-style: normal;
    color: #f4eefc;
}

.divider {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 1.3rem 0 1.5rem;
}

.divider .line {
    height: 1px;
    width: 2.6rem;
    background: var(--violet-mid);
}

.divider .diamond {
    width: 7px;
    height: 7px;
    background: var(--beam-glow);
    transform: rotate(45deg);
}

.hero-desc {
    color: var(--ink-dim);
    line-height: 1.7;
    font-size: 1.05rem;
    max-width: 30rem;
    margin: 0 0 2.2rem;
}

#contratapa1 {
    font-size: 1.2rem;
    text-align: justify;
}

/* Foto de los libros como CTA */

.books-photo-cta {
    justify-self: center;   /* centra la foto en su columna */
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    text-decoration: none;
}

.books-photo-cta .frame {
    width: min(18rem, 100%);
    height: auto;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 50%;
    border: 1px solid var(--violet-mid);
    box-shadow: 0 30px 45px rgba(0, 0, 0, 0.55);
    transition: box-shadow 0.35s ease;
    position: relative;
}



.books-photo-cta .frame img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    object-position: center;
    transition: transform 0.35s ease, filter 0.35s ease;
}

.books-photo-cta:hover .frame,
.books-photo-cta:focus-visible .frame {
    box-shadow: 0 0 55px rgba(181, 123, 255, 0.55), 0 20px 45px rgba(0, 0, 0, 0.6);
}

.books-photo-cta:hover .frame img,
.books-photo-cta:focus-visible .frame img {
    transform: scale(1.04);
    filter: brightness(1.08);
}

.books-photo-cta .caption {
    font-family: var(--font-title);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.9rem;
    color: var(--ink-pale);
    transition: color 0.25s ease;
}

.books-photo-cta:hover .caption,
.books-photo-cta:focus-visible .caption {
    color: var(--beam-glow);
}

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
    }
    .books-photo-cta {
        display: none;
    }
}



/* ---------- LIBROS ---------- */
.libros {
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
}

.libros .section-heading {
    font-size: 1.6rem;
}

@media (min-width: 901px) and (max-width: 1100px) {
    .hero-title {
        font-size: clamp(2.2rem, 5vw, 3.6rem);
        overflow-wrap: break-word;
    }
    .books-photo-cta .frame {
        width: min(15rem, 100%);
    }
}

