/* ==========================================================================
   Tus Fotos a Libro — Scrollytelling Engine v4 (Entorno de Desarrollo)
   Estricto cumplimiento de Paleta Canónica y Rendimiento GPU 60-120 FPS
   ========================================================================== */

/* 1. Paleta Canónica (Valores Exactos de styles.css) */
:root {
  --v4-bg: #F8F5F0;
  --v4-bg-alt: #F2ECE1;
  --v4-card-bg: #FFFFFF;
  --v4-text-main: #1A1816;
  --v4-text-muted: #5C554E;
  --v4-text-light: #8C827A;
  --v4-border: #E5DEC9;
  --v4-border-dark: #C9BEA7;
  --v4-terracotta: #A34828;
  --v4-terracotta-dark: #7A331A;
  --v4-terracotta-light: #FBF0EB;
  --v4-gold: #C59A45;
  --v4-gold-light: #FDF8ED;

  /* Sombras Estáticas de Papel (Zero filter: drop-shadow animado) */
  --v4-shadow-photo: 0 12px 28px rgba(26, 24, 22, 0.16);
  --v4-shadow-phone: 0 24px 50px rgba(26, 24, 22, 0.22);
  --v4-shadow-book: 0 30px 60px rgba(26, 24, 22, 0.28);

  --v4-font-serif: 'Playfair Display', Georgia, serif;
  --v4-font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
}

/* 2. Contenedor Track de 260vh (Nativo, Zero Scroll-Hijacking) */
.scrolly-hero-track {
  position: relative;
  width: 100%;
  height: 240vh;
  background-color: var(--v4-bg);
  /* Textura de grano editorial sutil mediante gradiente matemático (0 KB) */
  background-image: 
    radial-gradient(rgba(26, 24, 22, 0.03) 1px, transparent 1px),
    radial-gradient(rgba(197, 154, 69, 0.02) 1px, transparent 1px);
  background-size: 24px 24px, 48px 48px;
  background-position: 0 0, 12px 12px;
}

@media (max-width: 768px) {
  .scrolly-hero-track {
    height: 175vh;
  }
}

/* 3. Escenario Fijo Sticky (100svh con fallback 100vh para móviles) */
.scrolly-hero-sticky {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1rem 0.75rem;
  perspective: 1200px;
  will-change: transform;
  box-sizing: border-box;
}

@media (max-width: 768px) {
  .scrolly-hero-sticky {
    padding: 0.65rem 0.9rem 0.75rem;
    gap: 6px;
  }
  .scrolly-title {
    font-size: clamp(1.48rem, 6vw, 1.9rem);
    margin-bottom: 0.25rem;
  }
  .scrolly-lead {
    font-size: 0.82rem;
    line-height: 1.35;
    max-width: 340px;
  }
  .scrolly-badge {
    font-size: 0.64rem;
    padding: 3px 10px;
    margin-bottom: 0.3rem;
  }
}

/* 4. Cabecera y Títulos del Hero (LCP Inmediato, Visibles en Acto 1) */
.scrolly-hero-header {
  position: relative;
  z-index: 20;
  text-align: center;
  max-width: 780px;
  margin: 0 auto;
  pointer-events: none;
  transition: opacity 0.3s ease;
  flex-shrink: 0;
}

.scrolly-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background-color: var(--v4-terracotta-light);
  border: 1px solid rgba(163, 72, 40, 0.2);
  color: var(--v4-terracotta);
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}

.scrolly-badge-dot {
  width: 6px;
  height: 6px;
  background-color: var(--v4-terracotta);
  border-radius: 50%;
  animation: v4Pulse 2s infinite ease-in-out;
}

@keyframes v4Pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.2); }
}

.scrolly-title {
  font-family: var(--v4-font-serif);
  font-size: clamp(1.8rem, 3.2vw + 0.8vh, 2.75rem);
  line-height: 1.12;
  color: var(--v4-text-main);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.scrolly-title em {
  font-style: italic;
  color: var(--v4-terracotta);
  font-weight: 600;
}

.scrolly-lead {
  font-family: var(--v4-font-sans);
  font-size: clamp(0.85rem, 1.1vw + 0.4vh, 1.02rem);
  color: var(--v4-text-muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.4;
}

/* Indicador de Desplazamiento */
.scrolly-scroll-indicator {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--v4-text-light);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  z-index: 20;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.scrolly-scroll-indicator svg {
  animation: v4Bounce 1.8s infinite ease-in-out;
}

@keyframes v4Bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(5px); }
}

/* 5. Escenario Central 3D (Preserve-3D) */
.scrolly-stage-3d {
  position: relative;
  width: 100%;
  max-width: 960px;
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  transform-style: preserve-3d;
  margin: 0.2rem auto;
}

/* 6. Acto 1: Mockup del Smartphone */
.phone-mockup-wrap {
  position: absolute;
  width: auto;
  height: min(390px, 44vh);
  max-width: 215px;
  aspect-ratio: 9 / 18.5;
  background: #1A1816;
  border-radius: 36px;
  padding: 8px;
  box-shadow: var(--v4-shadow-phone);
  border: 3px solid #332F2B;
  display: flex;
  flex-direction: column;
  transform-origin: center center;
  will-change: transform, opacity;
  z-index: 10;
  transition: opacity 0.2s ease-out;
}

@media (max-width: 768px) {
  .scrolly-scroll-indicator {
    display: none;
  }
  .scrolly-stage-3d {
    min-height: 195px;
    max-height: 255px;
    margin: 2px auto;
  }
  .phone-mockup-wrap {
    height: min(225px, 92%);
    max-width: 118px;
    border-radius: 22px;
    padding: 5px;
    border-width: 2px;
  }
  .phone-screen {
    border-radius: 17px;
  }
  .phone-notch {
    width: 44px;
    height: 10px;
    border-radius: 0 0 8px 8px;
  }
  .phone-app-header {
    padding: 4px 6px;
    font-size: 0.48rem;
  }
  .phone-gallery-grid {
    gap: 3px;
    padding: 4px;
  }
  .phone-grid-item {
    border-radius: 4px;
  }
}

.phone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background: #FAF8F5;
  border-radius: 30px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.phone-notch {
  width: 70px;
  height: 18px;
  background: #1A1816;
  border-radius: 0 0 12px 12px;
  margin: 0 auto;
}

.phone-app-header {
  padding: 6px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--v4-text-main);
  border-bottom: 1px solid var(--v4-border);
}

.phone-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding: 6px;
  flex: 1;
  overflow: hidden;
}

.phone-grid-item {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 6px;
  overflow: hidden;
  background: #EAE3D2;
}

.phone-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 7. Acto 2: Fotos Impresas Flotantes (Efecto Papel Fotográfico) */
.floating-photo-card {
  position: absolute;
  background: var(--v4-card-bg);
  padding: 7px 7px 18px 7px;
  border-radius: 4px;
  box-shadow: var(--v4-shadow-photo);
  border: 1px solid rgba(229, 222, 201, 0.6);
  width: clamp(105px, 9vw, 130px);
  transform-origin: center center;
  will-change: transform, opacity;
  pointer-events: none;
  z-index: 12;
  backface-visibility: hidden;
}

@media (max-width: 768px) {
  .floating-photo-card {
    width: 74px;
    padding: 4px 4px 11px 4px;
  }
}

.floating-photo-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
  border-radius: 2px;
}

.floating-photo-caption {
  font-family: var(--v4-font-serif);
  font-style: italic;
  font-size: 0.68rem;
  color: var(--v4-text-main);
  text-align: center;
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px) {
  .floating-photo-caption {
    font-size: 0.5rem;
    margin-top: 3px;
  }
}

/* 8. Acto 3: Fotolibro Físico Cartoné Terracota (Producto Real) */
.physical-book-wrap {
  position: absolute;
  width: auto;
  height: min(245px, 32vh);
  aspect-ratio: 1;
  transform-origin: center center;
  will-change: transform, opacity;
  z-index: 15;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 768px) {
  .physical-book-wrap {
    height: min(175px, 84%);
  }
  .book-cover-front {
    padding: 1.1rem 0.9rem !important;
  }
  .book-cover-title {
    font-size: 1rem !important;
  }
  .book-stamp-motif {
    width: 32px !important;
    height: 32px !important;
    font-size: 0.85rem !important;
  }
}

.book-3d-model {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotateY(-18deg) rotateX(10deg);
  box-shadow: var(--v4-shadow-book);
  border-radius: 3px 8px 8px 3px;
}

/* Slot para Fotografía Real del Libro Físico (Acto 3) */
.hero-shot-real {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 25px 45px rgba(26, 24, 22, 0.28));
  transform: rotateY(-14deg) rotateX(6deg);
  transition: transform 0.4s ease, filter 0.4s ease;
  will-change: transform;
  display: block;
}

/* Tapa Dura Cartoné Terracota Clásico #A34828 */
.book-cover-front {
  position: absolute;
  inset: 0;
  background-color: var(--v4-terracotta);
  border-radius: 3px 8px 8px 3px;
  border-left: 6px solid var(--v4-terracotta-dark);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1), var(--v4-shadow-book);
  padding: 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  text-align: center;
}

.book-stamp-motif {
  width: 44px;
  height: 44px;
  border: 1px solid var(--v4-gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--v4-gold);
  font-size: 1.1rem;
}

.book-cover-title {
  font-family: var(--v4-font-serif);
  color: var(--v4-gold);
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
}

.book-cover-subtitle {
  font-family: var(--v4-font-sans);
  color: rgba(248, 245, 240, 0.85);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.book-spine-side {
  position: absolute;
  top: 4px;
  bottom: 4px;
  right: -16px;
  width: 16px;
  background: repeating-linear-gradient(
    to bottom,
    #FFFFFF,
    #FFFFFF 2px,
    #F0ECE4 3px,
    #F0ECE4 4px
  );
  border-radius: 0 2px 2px 0;
  transform-origin: left center;
  transform: rotateY(90deg);
  box-shadow: inset 2px 0 5px rgba(0,0,0,0.15);
}

/* 9. Botonera Final / CTA Visible Inmediata */
.scrolly-cta-dock {
  position: relative;
  z-index: 25;
  text-align: center;
  margin-bottom: 0.4rem;
  flex-shrink: 0;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  transition: transform 0.3s ease;
}

.btn-scrolly-main {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background-color: var(--v4-terracotta);
  color: #FFFFFF;
  font-family: var(--v4-font-sans);
  font-size: 1rem;
  font-weight: 700;
  padding: 13px 26px;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(163, 72, 40, 0.35);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

@media (max-width: 768px) {
  .scrolly-cta-dock {
    width: 100%;
    margin-bottom: 0.2rem;
  }
  .btn-scrolly-main {
    padding: 11px 20px;
    font-size: 0.92rem;
    width: 100%;
    max-width: 310px;
    justify-content: center;
  }
  .btn-scrolly-demo, .btn-scrolly-privacy {
    font-size: 0.72rem !important;
    padding: 6px 11px !important;
  }
  .scrolly-cta-guarantee {
    font-size: 0.68rem !important;
    gap: 8px !important;
    flex-wrap: wrap;
    margin-top: 6px !important;
  }
}

.btn-scrolly-main:hover {
  background-color: var(--v4-terracotta-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(163, 72, 40, 0.45);
}

.scrolly-cta-guarantee {
  font-size: 0.78rem;
  color: var(--v4-text-muted);
  margin-top: 0.45rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.scrolly-cta-guarantee span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

/* ==========================================================================
   10. Accesibilidad: prefers-reduced-motion (Condición C1)
   Composición estática final fija, cero cálculo de animación.
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  .scrolly-hero-track {
    height: auto !important;
    padding-bottom: 4rem;
  }
  .scrolly-hero-sticky {
    position: relative !important;
    height: auto !important;
    min-height: 80vh;
  }
  .phone-mockup-wrap {
    display: none !important;
  }
  .floating-photo-card {
    display: none !important;
  }
  .physical-book-wrap {
    position: relative !important;
    opacity: 1 !important;
    transform: none !important;
    margin: 2rem auto;
  }
  .scrolly-scroll-indicator {
    display: none !important;
  }
  .scrolly-cta-dock {
    opacity: 1 !important;
    transform: none !important;
    pointer-events: auto !important;
  }
}

/* 11. Transiciones suaves entre secciones (Smooth Section Reveal en Cascada) */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 85px;
}

.section-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.section-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cascada de aparición en cabeceras de sección */
.section-reveal .section-header {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.05s;
}

.section-reveal.is-visible .section-header {
  opacity: 1;
  transform: translateY(0);
}

/* Cascada escalonada en tarjetas temáticas, anatomía, comparativa y precios */
.section-reveal .thematic-card,
.section-reveal .anatomy-card,
.section-reveal .comparison-card,
.section-reveal .pricing-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease, border-color 0.3s ease;
}

.section-reveal.is-visible .thematic-card:nth-child(1),
.section-reveal.is-visible .anatomy-card:nth-child(1),
.section-reveal.is-visible .comparison-card:nth-child(1),
.section-reveal.is-visible .pricing-card:nth-child(1) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.08s;
}

.section-reveal.is-visible .thematic-card:nth-child(2),
.section-reveal.is-visible .anatomy-card:nth-child(2),
.section-reveal.is-visible .comparison-card:nth-child(2),
.section-reveal.is-visible .pricing-card:nth-child(2) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.16s;
}

.section-reveal.is-visible .thematic-card:nth-child(3),
.section-reveal.is-visible .anatomy-card:nth-child(3),
.section-reveal.is-visible .pricing-card:nth-child(3) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.24s;
}

.section-reveal.is-visible .thematic-card:nth-child(4),
.section-reveal.is-visible .anatomy-card:nth-child(4),
.section-reveal.is-visible .pricing-card:nth-child(4),
.section-reveal.is-visible .pricing-card {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.32s;
}

.section-reveal.is-visible .thematic-card:nth-child(5) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.40s;
}

.section-reveal.is-visible .thematic-card:nth-child(6) {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.48s;
}

/* ==========================================================================
   12. Micro-interacciones Táctiles y Visuales en Colecciones Temáticas
   Adaptables a todos los dispositivos (Desktop Mouse + Mobile Touch)
   ========================================================================== */
.thematic-card {
  position: relative;
  background: #FFFFFF;
  border-radius: var(--radius-md, 14px);
  border: 1px solid var(--v4-border);
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(26, 24, 22, 0.05);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease, border-color 0.3s ease;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* Elevación táctil y profundidad editorial al pasar el mouse */
.thematic-card:hover {
  transform: translateY(-8px) scale(1.015);
  border-color: var(--v4-terracotta);
  box-shadow: 0 20px 42px rgba(163, 72, 40, 0.14), 0 6px 16px rgba(26, 24, 22, 0.06);
}

/* Feedback táctil responsivo para dispositivos móviles */
.thematic-card:active {
  transform: scale(0.98);
  transition-duration: 0.12s;
}

.thematic-img-box {
  position: relative;
  height: 220px;
  overflow: hidden;
  background-color: var(--v4-bg-alt);
}

.thematic-img-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1), filter 0.5s ease;
  will-change: transform;
}

.thematic-card:hover .thematic-img-box img {
  transform: scale(1.08);
  filter: saturate(1.08) brightness(1.02);
}

/* Efecto de brillo de papel satinado de imprenta (Sheen Sweep) */
.thematic-img-box::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 80%;
  height: 100%;
  background: linear-gradient(115deg, transparent 0%, rgba(255, 255, 255, 0.35) 45%, rgba(255, 255, 255, 0.08) 65%, transparent 100%);
  transform: skewX(-20deg);
  transition: left 0.75s ease;
  pointer-events: none;
}

.thematic-card:hover .thematic-img-box::after {
  left: 150%;
}

.thematic-tag {
  transition: background-color 0.3s ease, transform 0.3s ease;
}

.thematic-card:hover .thematic-tag {
  background-color: rgba(26, 24, 22, 0.95);
  transform: translateY(-2px);
}

.thematic-cta {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s ease;
}

.thematic-card:hover .thematic-cta {
  color: var(--v4-terracotta-dark);
  transform: translateX(5px);
}

/* ==========================================================================
   13. Botón Flotante de WhatsApp (Protección Antihundimiento Global)
   Garantiza visibilidad sobre barras de tareas, móviles y navegadores notebook
   ========================================================================== */
.btn-floating-whatsapp {
  position: fixed !important;
  bottom: clamp(32px, 4.5vh, 48px) !important;
  bottom: max(clamp(32px, 4.5vh, 48px), env(safe-area-inset-bottom, 32px)) !important;
  right: clamp(20px, 3vw, 36px) !important;
  right: max(clamp(20px, 3vw, 36px), env(safe-area-inset-right, 20px)) !important;
  z-index: 999999 !important;
}

@media (max-width: 640px) {
  .btn-floating-whatsapp {
    bottom: clamp(24px, 4vh, 32px) !important;
    bottom: max(clamp(24px, 4vh, 32px), env(safe-area-inset-bottom, 24px)) !important;
    right: 18px !important;
  }
}

/* Modal de Checkout por encima del botón flotante y ocultamiento del botón al abrir */
.checkout-modal-overlay {
  z-index: 1000000 !important;
}

.checkout-modal-overlay.active ~ .btn-floating-whatsapp,
body.modal-open .btn-floating-whatsapp {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
  transform: scale(0.8) translateY(12px) !important;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease !important;
}

@media (prefers-reduced-motion: reduce) {
  .section-reveal,
  .section-reveal .section-header,
  .section-reveal .thematic-card,
  .section-reveal .anatomy-card,
  .section-reveal .comparison-card,
  .section-reveal .pricing-card {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .thematic-card:hover {
    transform: none !important;
  }
  .thematic-img-box::after {
    display: none !important;
  }
}

/* ====================================================================
   Video Demo Lightbox Modal & Trigger Buttons (Opción A UX/UI)
   ==================================================================== */
.video-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background-color: rgba(10, 8, 7, 0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: fadeInVideoModal 0.25s ease-out forwards;
}

@keyframes fadeInVideoModal {
  from { opacity: 0; }
  to { opacity: 1; }
}

.video-modal-card {
  position: relative;
  width: 100%;
  max-width: 860px;
  background: #181513;
  border: 1px solid rgba(229, 192, 123, 0.25);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: scaleInVideoCard 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes scaleInVideoCard {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.video-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #FAF8F5;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.video-modal-close:hover {
  background: var(--v4-terracotta, #A34828);
  border-color: var(--v4-terracotta, #A34828);
  transform: rotate(90deg);
}

.video-modal-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.video-modal-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #C59A45;
  background: rgba(197, 154, 69, 0.15);
  border: 1px solid rgba(197, 154, 69, 0.3);
  padding: 3px 10px;
  border-radius: 9999px;
}

.video-modal-title {
  font-family: var(--v4-font-serif, 'Playfair Display', Georgia, serif);
  font-size: 1.25rem;
  color: #FAF8F5;
  margin: 0;
}

.video-player-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.video-player-wrapper video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.video-modal-desc {
  font-size: 0.85rem;
  color: #C4BFB6;
  margin: 0;
  max-width: 480px;
  line-height: 1.4;
}

.btn-modal-cta {
  background: var(--v4-terracotta, #A34828);
  color: #FFFFFF;
  border: none;
  font-weight: 700;
  font-size: 0.92rem;
  padding: 10px 22px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-modal-cta:hover {
  background: var(--v4-terracotta-dark, #7A331A);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(163, 72, 40, 0.4);
}

.btn-scrolly-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: #FFFFFF !important;
  color: #1A1816 !important;
  border: 1.5px solid #C59A45 !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08) !important;
  font-family: var(--v4-font-sans, system-ui);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 22px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-scrolly-demo svg {
  color: var(--v4-terracotta, #A34828);
}

.btn-scrolly-demo:hover {
  background: #FAF8F5 !important;
  border-color: var(--v4-terracotta, #A34828) !important;
  color: var(--v4-terracotta, #A34828) !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(163, 72, 40, 0.2) !important;
}

.btn-scrolly-privacy {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #FFFFFF !important;
  color: #1A1816 !important;
  border: 1.5px solid #2D6A4F !important;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08) !important;
  font-family: var(--v4-font-sans, system-ui);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: 9999px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.btn-scrolly-privacy svg {
  color: #2D6A4F;
}

.btn-scrolly-privacy:hover {
  background: #F0FDF4 !important;
  border-color: #1B4332 !important;
  color: #1B4332 !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 106, 79, 0.2) !important;
}

/* Tabs Switcher en el Modal de Video */
.video-modal-tabs {
  display: flex;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 4px;
  border-radius: 10px;
  margin-top: 4px;
}

.video-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  color: #C4BFB6;
  font-family: var(--v4-font-sans, system-ui);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.video-tab-btn:hover {
  color: #FFFFFF;
  background: rgba(255, 255, 255, 0.08);
}

.video-tab-btn.active {
  background: var(--v4-terracotta, #A34828);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(163, 72, 40, 0.4);
}

.btn-video-demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FAF8F5;
  color: var(--v4-terracotta, #A34828);
  border: 1px solid rgba(163, 72, 40, 0.25);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 20px;
  border-radius: 9999px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
  transition: all 0.2s ease;
}

.btn-video-demo-pill:hover {
  background: #FFFFFF;
  border-color: var(--v4-terracotta, #A34828);
  box-shadow: 0 6px 20px rgba(163, 72, 40, 0.18);
  transform: translateY(-2px);
}

/* ====================================================================
   Sección de Tratamiento de Privacidad y Bóveda Segura
   ==================================================================== */
.privacy-treatment-section {
  padding: 70px 20px;
  background: #FAF8F5;
}

.privacy-treatment-card {
  max-width: 920px;
  margin: 0 auto;
  background: #FFFFFF;
  border: 1px solid rgba(197, 154, 69, 0.35);
  border-radius: 20px;
  padding: 44px 36px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.privacy-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #2D6A4F;
  background: #E8F5E9;
  border: 1px solid rgba(45, 106, 79, 0.25);
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 16px;
}

.privacy-card-title {
  font-family: var(--v4-font-serif, 'Playfair Display', Georgia, serif);
  font-size: 2rem;
  color: #1A1816;
  margin-bottom: 14px;
  line-height: 1.25;
}

.privacy-card-lead {
  font-size: 1.05rem;
  color: #55514D;
  line-height: 1.6;
  max-width: 740px;
  margin: 0 auto 32px auto;
}

.privacy-pillars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 34px;
  text-align: left;
}

.privacy-pillar {
  background: #FAF8F5;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 22px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.privacy-pillar:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.06);
  border-color: rgba(163, 72, 40, 0.3);
}

.pillar-num {
  font-family: var(--v4-font-serif, Georgia, serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--v4-terracotta, #A34828);
  margin-bottom: 6px;
}

.privacy-pillar h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #1A1816;
  margin-bottom: 8px;
}

.privacy-pillar p {
  font-size: 0.86rem;
  color: #66625D;
  line-height: 1.5;
  margin: 0;
}

.privacy-card-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

/* ====================================================================
   Lector Digital de Cortesía Embebido (StPageFlip Avatar Brasil 2026)
   Fondo cálido lino/arena editorial en armonía con toda la página
   ==================================================================== */
.courtesy-showcase-wrap {
  background: radial-gradient(circle at 50% 42%, #F7F3EA 0%, #EDE5D7 75%, #E4D9C6 100%);
  border-radius: 22px;
  padding: 28px 16px 24px;
  margin: 22px auto 0;
  max-width: 960px;
  box-shadow: 0 20px 48px rgba(45, 34, 24, 0.08);
  border: 1px solid #DCD0BC;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.courtesy-top-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FFFDF9;
  border: 1px solid rgba(197, 154, 69, 0.45);
  color: #7A331A;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 9999px;
  margin-bottom: 18px;
  box-shadow: 0 2px 8px rgba(45, 34, 24, 0.05);
}

.courtesy-book-stage {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 360px;
  padding: 8px 0 12px;
  perspective: 2000px;
}

.courtesy-flip-book {
  box-shadow: 0 20px 44px rgba(45, 34, 24, 0.22), 0 4px 14px rgba(45, 34, 24, 0.1);
}

/* IMPORTANTE: Nunca poner display: flex en .c-page ni .c-page.--* para no pisar
   .stf__item { display: none; } del motor StPageFlip */
.courtesy-flip-book .c-page {
  background-color: #FAF8F5;
  overflow: hidden;
  border: 1px solid #E5D5C5;
  color: #1A1816;
  box-sizing: border-box;
}

.c-page-inner {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-sizing: border-box;
}

.courtesy-flip-book .c-page.--cover {
  background: radial-gradient(circle at 40% 40%, #B84D3E 0%, #852C20 100%);
  color: #FAF8F5;
  border-left: 8px solid #581A12;
  box-shadow: inset 8px 0 20px rgba(0,0,0,0.45);
}

.courtesy-flip-book .c-page.--cover .c-page-inner {
  align-items: center;
  padding: 26px 20px;
  text-align: center;
}

.c-cover-badge {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 800;
  color: #E5C07B;
  border-bottom: 1px solid rgba(229, 192, 123, 0.4);
  padding-bottom: 5px;
}

.c-cover-frame {
  width: 80%;
  aspect-ratio: 1;
  border-radius: 8px;
  border: 4px solid #FAF8F5;
  box-shadow: 0 10px 26px rgba(0,0,0,0.4);
  overflow: hidden;
  margin: auto 0;
}

.c-cover-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-cover-title {
  font-family: var(--v4-font-serif, Georgia, serif);
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 4px;
  color: #FFFFFF;
}

.c-cover-sub {
  font-size: 0.74rem;
  color: #E5C07B;
  font-style: italic;
}

.courtesy-flip-book .c-page.--dedication {
  background: #FAF8F5;
}

.courtesy-flip-book .c-page.--dedication .c-page-inner {
  padding: 28px 22px;
}

.c-dedication-seal {
  text-align: center;
  color: #C59A45;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 800;
}

.c-dedication-quote {
  font-family: var(--v4-font-serif, Georgia, serif);
  font-style: italic;
  font-size: 0.96rem;
  line-height: 1.6;
  color: #2D2520;
  text-align: center;
  margin: auto 0;
}

.c-dedication-sig {
  border-top: 1px solid rgba(197, 154, 69, 0.4);
  padding-top: 10px;
  text-align: center;
}

.c-sig-hand {
  font-family: 'Caveat', 'Playfair Display', cursive, serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: #1E3A8A;
  transform: rotate(-2deg);
  display: inline-block;
}

.courtesy-flip-book .c-page.--spread {
  background: #FAF8F5;
}

.courtesy-flip-book .c-page.--spread .c-page-inner {
  padding: 18px 16px 14px;
}

.c-spread-photo {
  flex: 1;
  min-height: 0;
  border-radius: 5px;
  overflow: hidden;
  border: 3px solid #FFFFFF;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  background: #FFFFFF;
}

.c-spread-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-spread-grid2 {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.c-spread-grid2 .c-grid-item {
  border-radius: 5px;
  overflow: hidden;
  border: 3px solid #FFFFFF;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  height: 100%;
}

.c-spread-grid2 .c-grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.c-spread-caption {
  padding-top: 10px;
  text-align: center;
  flex-shrink: 0;
}

.c-spread-caption p {
  font-family: var(--v4-font-serif, Georgia, serif);
  font-style: italic;
  font-size: 0.78rem;
  color: #3A342E;
  line-height: 1.35;
  margin: 0 0 4px 0;
}

.c-page-num {
  font-size: 0.64rem;
  font-weight: 700;
  color: #9A9086;
  letter-spacing: 0.1em;
}

.courtesy-flip-book .c-page.--back-cover {
  background: radial-gradient(circle at 40% 40%, #852C20 0%, #581A12 100%);
  color: #FAF8F5;
  border-right: 8px solid #3D100B;
}

.courtesy-flip-book .c-page.--back-cover .c-page-inner {
  justify-content: center;
  align-items: center;
  padding: 24px;
  text-align: center;
}

.courtesy-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(255, 253, 249, 0.94);
  border: 1px solid #D9CEBA;
  box-shadow: 0 8px 22px rgba(45, 34, 24, 0.09);
  backdrop-filter: blur(10px);
  padding: 7px 14px;
  border-radius: 9999px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.courtesy-ctrl-btn {
  background: #F1EAE0;
  border: 1px solid #DFD4C2;
  color: #1A1816;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.courtesy-ctrl-btn:hover:not(:disabled) {
  background: #A34828;
  border-color: #A34828;
  color: #FFFFFF;
  transform: scale(1.06);
}

.courtesy-ctrl-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.courtesy-page-ind {
  font-size: 0.78rem;
  color: #4A433C;
  font-weight: 600;
  min-width: 96px;
  text-align: center;
}

.courtesy-page-ind strong {
  color: #A34828;
}

.courtesy-fullscreen-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #A34828;
  color: #FFFFFF;
  padding: 6px 14px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease;
}

.courtesy-fullscreen-link:hover {
  background: #7A331A;
}

.courtesy-flip-book .c-page:not(.stf__item) {
  display: none;
}

@media (max-width: 640px) {
  .courtesy-showcase-wrap {
    padding: 20px 10px 18px;
    border-radius: 16px;
  }
  .courtesy-book-stage {
    min-height: 330px;
  }
  .courtesy-flip-book .c-page.--spread .c-page-inner {
    padding: 12px 10px 10px;
  }
  .c-spread-caption p {
    font-size: 0.72rem;
  }
}

