/* === CONFIGURACIÓN GENERAL Y VARIABLES === */
:root {
    --primary-font: 'Nunito', sans-serif;
    --bg-color: #fffef7; /* Un blanco cálido como la portada */
    --text-dark: #3a3a3a;
    --text-muted: #757575;
    --accent-orange: #ff9800;
    --accent-orange-hover: #fb8c00;
    --accent-purple: #9c27b0;
    --border-color: #f0e9d6;
    --light-yellow-bg: #fff9e6;
    --footer-bg: #424242;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
}

/* === RESET MODERNO Y ESTILOS BASE === */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--primary-font);
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.7;
    margin: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* === CONTENEDORES PRINCIPALES === */
.main-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 20px; /* Ajusta el padding si es necesario */
}

/* === TIPOGRAFÍA === */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.3;
    text-align: center;
}
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; margin-bottom: 40px; }
h4 { font-size: 1.25rem; margin: 0 0 10px 0; color: var(--accent-purple); }

/* === ANIMACIONES (CON RESPETO A PREFERENCIAS DEL USUARIO) === */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animated-section {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}
/* Asignación de delays */
.intro-text { animation-delay: 0.2s; }
.benefits-section { animation-delay: 0.3s; }
.offer-section { animation-delay: 0.4s; }
.confirmation-form { animation-delay: 0.5s; }

/* Mejora de accesibilidad: Desactiva animaciones */
@media (prefers-reduced-motion: reduce) {
    .animated-section, .hero-title, .hero-subtitle {
        animation: none;
        opacity: 1;
    }
}


/* === SECCIÓN 1: ENCABEZADO === */
.top-nav {
    /* Las reglas que ya tenías */
    display: flex;
    justify-content: space-between;
    align-items: center;

    /* --- AJUSTES AÑADIDOS --- */
    /* Forzamos a la barra a tener el mismo ancho y centrado del contenido */
    max-width: 720px;
    margin: 0 auto;

    /* Ajustamos el padding para alinear con el contenido de abajo */
    padding: 15px 20px; 
}
.logo {
    font-weight: 800;
    font-size: 1.2rem;
}
.nav-button {
    background-color: var(--accent-orange);
    color: white;
    padding: 8px 18px;
    border-radius: var(--border-radius-sm);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    transition: background-color 0.2s ease, transform 0.2s ease;
}
.nav-button:hover, .nav-button:focus-visible {
    background-color: var(--accent-orange-hover);
    transform: translateY(-2px);
    outline: none;
}

.hero-section {
    padding: 30px 20px 50px 20px;
    text-align: center;
}
.badge {
    display: inline-block;
    background-color: var(--accent-purple);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 20px;
}
.hero-title {
    /* Tipografía fluida para escalado suave */
    font-size: clamp(2.5rem, 6vw + 1rem, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    color: var(--text-dark);
    animation: fadeInUp 1s ease-out;
}
.hero-subtitle {
    font-size: 1.25rem;
    font-weight: 400;
    margin: 15px auto 0;
    color: var(--text-muted);
    max-width: 600px;
    animation: fadeInUp 1s ease-out 0.2s;
}

section {
    margin-bottom: 80px;
}

.intro-text { text-align: center; }
.intro-text p { font-size: 1.125rem; color: var(--text-muted); max-width: 600px; margin: 0 auto; }


/* === IMAGEN DEL PRODUCTO === */
.book-display {
    text-align: center;
    display: flex; /* Agregamos flexbox para mayor control */
    justify-content: center; /* Centra horizontalmente */
    align-items: center; /* Centra verticalmente, si es necesario */
    width: 100%; /* Asegura que ocupe todo el ancho del contenedor */
    margin: 0 auto; /* Elimina cualquier margen no deseado y centra el contenedor */
}

.book-display img {
    width: 100%;
    max-width: 400px;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    margin: 0 auto; /* <-- AÑADE ESTA LÍNEA */
}

/* === SECCIÓN DE BENEFICIOS (CON MICRO-INTERACCIÓN) === */
.benefits-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}
.benefit-box {
    background-color: var(--light-yellow-bg);
    border: 1px solid var(--border-color);
    padding: 25px;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
/* Efecto hover sutil para mayor interactividad */
.benefit-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.07);
}
.benefit-box p {
    font-size: 1rem;
    color: var(--text-muted);
    margin: 0;
}


/* === SECCIÓN DE OFERTA === */
.offer-section { text-align: center; }
.price-container { margin: 20px 0; display: flex; justify-content: center; align-items: center; gap: 15px; flex-wrap: wrap; }
.current-price { font-size: 3rem; font-weight: 800; color: var(--text-dark); }
.offer-tag { background-color: var(--accent-purple); color: white; padding: 5px 12px; border-radius: 6px; font-size: 0.875rem; font-weight: 700; }
.main-cta-button {
    display: inline-block;
    background-color: var(--accent-orange);
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    text-decoration: none;
    padding: 20px 40px;
    border-radius: var(--border-radius-md);
    margin-top: 20px;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 5px 15px rgba(255, 152, 0, 0.4);
    cursor: pointer;
}
.main-cta-button:hover, .main-cta-button:focus-visible {
    background-color: var(--accent-orange-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 152, 0, 0.5);
    outline: none;
}
.secure-payment {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 15px;
}


/* === FORMULARIO DE CONFIRMACIÓN (CON FEEDBACK MEJORADO) === */
.confirmation-form { background-color: var(--light-yellow-bg); padding: 40px; border-radius: var(--border-radius-md); text-align: center; border: 1px solid var(--border-color); }
.confirmation-form .step { color: var(--text-muted); font-weight: 700; }
.confirmation-form hr { border: none; height: 1px; background-color: var(--border-color); margin: 0 auto 30px auto; width: 100px; }
.confirmation-form label { display: block; text-align: left; font-weight: 700; margin: 20px 0 8px 0; }
.confirmation-form input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
/* Feedback visual para el usuario al rellenar el formulario */
.confirmation-form input:focus {
    outline: none;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
}
.form-submit-button {
    display: block;
    width: 100%;
    background-color: var(--accent-purple);
    color: white;
    border: none;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 18px;
    border-radius: var(--border-radius-sm);
    margin-top: 30px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.form-submit-button:hover, .form-submit-button:focus-visible {
    background-color: #89209b; /* Un púrpura ligeramente más oscuro */
    transform: translateY(-2px);
    outline: none;
}


/* === FOOTER === */
.footer { background-color: var(--footer-bg); color: rgba(255,255,255,0.7); text-align: center; padding: 40px 20px; margin-top: 60px;}


/* === DISEÑO RESPONSIVO (MÓVILES) === */
@media (max-width: 768px) {
    .hero-subtitle { font-size: 1.1rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.5rem; }
    .main-cta-button { font-size: 1.2rem; padding: 18px 35px; }
    .benefits-grid { grid-template-columns: 1fr; }
    .confirmation-form { padding: 30px 20px; }
}