/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    --color-black: #1a1a1a;
    --color-red: #9e1b1b;
    --color-red-dark: #7a1212;
    --color-paper: #ebdcd0;
    --color-paper-light: #f5eedf;
    
    --font-sans: 'Oswald', sans-serif;
    --font-serif: 'Playfair Display', serif;
    
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-paper);
    color: var(--color-black);
    font-family: var(--font-serif);
    overflow-x: hidden;
    line-height: 1.5;
}

/* =========================================
   TEXTURA DE FONDO
   ========================================= */
.texture-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('assets/textura_fondo.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7;
    mix-blend-mode: multiply;
    pointer-events: none; /* Allows clicking through the texture */
    z-index: 100; /* Ensure texture applies over elements but under pointer */
}

/* =========================================
   CONTENEDOR PRINCIPAL
   ========================================= */
.poster-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 4rem 2rem;
    position: relative;
    z-index: 1; /* Below texture overlay */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4rem;
}

/* =========================================
   ETIQUETA PREVENTA
   ========================================= */
.tag-preventa {
    position: absolute;
    top: 2rem;
    left: 2rem;
    background-color: var(--color-red);
    color: var(--color-paper-light);
    font-family: var(--font-sans);
    font-weight: 700;
    font-size: 1.5rem;
    padding: 0.5rem 1.5rem;
    letter-spacing: 2px;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
    transform: rotate(-3deg);
}

/* =========================================
   SECCIÓN PRINCIPAL (HERO)
   ========================================= */
.hero-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    width: 100%;
    align-items: center;
    margin-top: 4rem;
}

.book-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    filter: drop-shadow(15px 15px 15px rgba(0, 0, 0, 0.4));
    transition: transform var(--transition-speed) ease;
}

.title-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.monumental-title {
    font-family: var(--font-sans);
    font-size: 8rem;
    font-weight: 700;
    line-height: 0.9;
    letter-spacing: -2px;
    color: var(--color-black);
    text-shadow: 1px 1px 0px rgba(255,255,255,0.3);
}

.subtitle-bold {
    font-family: var(--font-sans);
    font-size: 2.5rem;
    font-weight: 500;
    letter-spacing: 1px;
    margin-top: 0.5rem;
}

.date-range {
    font-family: var(--font-sans);
    font-size: 3rem;
    font-weight: 700;
    color: var(--color-red);
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: -0.5rem;
}

.separator {
    color: var(--color-black);
}

/* =========================================
   SUBTÍTULO Y DESCRIPCIÓN
   ========================================= */
.description-section {
    width: 100%;
    text-align: center;
    position: relative;
}

.formal-description {
    font-size: 1.8rem;
    font-style: italic;
    font-weight: 400;
    color: var(--color-black);
}

.subtle-divider {
    width: 80%;
    margin: 2rem auto;
    border: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-black), transparent);
    opacity: 0.4;
}

/* =========================================
   SINOPSIS
   ========================================= */
.synopsis-section {
    width: 100%;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: justify;
    font-size: 1.25rem;
    line-height: 1.8;
    color: var(--color-black);
}

.synopsis-section p {
    margin-bottom: 1.5rem;
}

.synopsis-section p:last-child {
    margin-bottom: 0;
}

.synopsis-section strong {
    font-weight: 700;
    color: var(--color-red-dark);
}

/* =========================================
   CALL TO ACTION (PINCELADA)
   ========================================= */
.cta-section {
    width: 100%;
    display: flex;
    justify-content: center;
}

.brush-stroke-bg {
    background-color: var(--color-red);
    padding: 1.5rem 3rem;
    /* Simulate a brush stroke / organic shape with irregular border radius */
    border-radius: 2px 255px 3px 225px / 255px 5px 225px 3px;
    transform: rotate(-1deg);
    box-shadow: 3px 4px 6px rgba(0,0,0,0.2);
    position: relative;
}

.brush-stroke-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('assets/textura_fondo.jpg');
    background-size: cover;
    opacity: 0.3;
    mix-blend-mode: color-burn;
    border-radius: inherit;
    pointer-events: none;
}

.cta-text {
    font-family: var(--font-sans);
    color: var(--color-paper-light);
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 1px;
    position: relative;
    z-index: 2;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* =========================================
   TEXTO FINAL
   ========================================= */
.final-text-section {
    text-align: center;
    width: 100%;
    max-width: 600px;
}

.small-description {
    font-size: 1.3rem;
    font-weight: 400;
    color: #333;
}

/* =========================================
   TARJETA PREVENTA Y BOTÓN
   ========================================= */
.presale-section {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
}

.presale-card {
    border: 3px solid var(--color-black);
    padding: 2.5rem 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    background-color: rgba(245, 238, 223, 0.4);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.1);
    position: relative;
}

/* Corner ornaments for the vintage look */
.presale-card::before, .presale-card::after {
    content: '';
    position: absolute;
    width: 15px; height: 15px;
    border: 2px solid var(--color-black);
}
.presale-card::before {
    top: -5px; left: -5px;
    border-right: none; border-bottom: none;
}
.presale-card::after {
    bottom: -5px; right: -5px;
    border-left: none; border-top: none;
}

.price-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    font-family: var(--font-sans);
}

.label-preventa {
    font-size: 1.8rem;
    font-weight: 500;
}

.price-tag {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-red);
}

.action-btn {
    display: inline-block;
    background-color: var(--color-black);
    color: var(--color-paper-light);
    text-decoration: none;
    padding: 1rem 2.5rem;
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
    border: 2px solid var(--color-black);
    transition: all var(--transition-speed) ease;
    cursor: pointer;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
}

.action-btn:hover {
    background-color: var(--color-red);
    border-color: var(--color-red);
    color: var(--color-paper-light);
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.25);
}

/* =========================================
   ANIMACIONES Y ESTADOS INICIALES
   ========================================= */
[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: 0.6s;
    transition-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-aos="fade-up"] { transform: translateY(30px); }
[data-aos="fade-down"] { transform: translateY(-30px); }
[data-aos="fade-right"] { transform: translateX(-40px); }
[data-aos="fade-left"] { transform: translateX(40px); }
[data-aos="zoom-in"] { transform: scale(0.95); }

.aos-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* =========================================
   MEDIA QUERIES (RESPONSIVE)
   ========================================= */
@media (max-width: 768px) {
    .hero-section {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 3rem;
    }

    .book-image {
        max-width: 300px;
    }

    .title-container {
        align-items: center;
    }

    .monumental-title {
        font-size: 6rem;
    }

    .date-range {
        justify-content: center;
    }

    .tag-preventa {
        position: relative;
        top: 0; left: 0;
        margin-bottom: 1rem;
        display: inline-block;
    }

    .cta-text {
        font-size: 1.5rem;
        text-align: center;
    }

    .presale-card {
        padding: 2rem;
    }

    .price-info {
        flex-direction: column;
        gap: 0.5rem;
    }
}
