/* Dominio IA — Landing Page styles */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/manrope-latin.woff2") format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/newsreader-latin-normal.woff2") format('woff2');
}
@font-face {
  font-family: 'Newsreader';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url("../fonts/newsreader-latin-italic.woff2") format('woff2');
}

:root {
  --bg: oklch(0.98 0.008 75);
  --bg-alt: oklch(0.96 0.008 75);
  --bg-mute: oklch(0.94 0.008 75);
  --border: oklch(0.90 0.008 75);
  --border-strong: oklch(0.88 0.008 75);
  --navy: oklch(0.17 0.035 272);
  --text: oklch(0.19 0.03 272);
  --text-soft: oklch(0.26 0.028 272);
  --text-muted: oklch(0.42 0.024 272);
  --text-faint: oklch(0.56 0.02 272);
  --text-subtle: oklch(0.70 0.016 272);
  --accent: oklch(0.42 0.13 230);
  --accent-hover: oklch(0.48 0.135 230);
  --accent-light: oklch(0.94 0.035 230);
  --gold: oklch(0.71 0.142 230);
  --sage: oklch(0.64 0.057 196);
  --cream: oklch(0.98 0.008 75);

  --container: 1200px;
  --container-wide: 1360px;
}

* { box-sizing: border-box; }
/* Match the footer color so the mobile overscroll "rubber-band" reveals the
   same tone as the bottom of the page instead of a blank white strip. */
html { scroll-behavior: smooth; background: var(--bg-alt); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
h1, h2, h3, p { margin: 0; }
.serif { font-family: 'Newsreader', Georgia, serif; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; background: var(--navy); color: var(--cream);
  padding: 12px 18px; border-radius: 4px; font-size: 14px; font-weight: 600; z-index: 100;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: oklch(0.98 0.008 75 / 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 16px 48px;
  display: flex; align-items: center; justify-content: space-between;
}
.logo { display: flex; align-items: center; }
.logo img { height: 26px; width: auto; display: block; }
.logo-wordmark {
  font-family: 'Newsreader', Georgia, serif;
  font-size: 20px; font-weight: 600; line-height: 1;
  letter-spacing: -0.005em; color: var(--navy); white-space: nowrap;
  transition: color 0.2s ease;
}
.logo-wordmark em { font-style: italic; font-weight: 500; }
.logo:hover .logo-wordmark { color: var(--accent); }
.main-nav { display: flex; align-items: center; gap: 2px; flex-wrap: nowrap; }
.nav-link {
  color: var(--text-soft); font-size: 13.5px; font-weight: 500;
  padding: 9px 11px; border-radius: 4px; white-space: nowrap;
  transition: color 0.2s ease, background 0.2s ease;
}
.nav-link:hover { color: var(--accent); background: var(--bg-mute); }
.nav-cta {
  background: var(--accent); color: var(--cream);
  padding: 10px 18px; border-radius: 4px; font-size: 13.5px; font-weight: 600;
  margin-left: 8px; white-space: nowrap;
  box-shadow: 0 1px 2px oklch(0.18 0.012 265 / 0.15);
  transition: background 0.2s ease;
}
.nav-cta:hover { background: var(--accent-hover); }

.mobile-menu-btn {
  display: none; align-items: center; justify-content: center;
  width: 40px; height: 40px; background: none; border: 1px solid var(--border);
  border-radius: 3px; cursor: pointer; flex-direction: column; gap: 4px;
}
.mobile-menu-btn span {
  display: block; width: 18px; height: 1.5px; background: var(--text);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease;
}
.mobile-menu-btn.is-open span:nth-child(1) { transform: translateY(5.5px) rotate(45deg); }
.mobile-menu-btn.is-open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.is-open span:nth-child(3) { transform: translateY(-5.5px) rotate(-45deg); }

.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 49;
  background: oklch(0.98 0.008 75 / 0.98);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  padding: 14px 24px 22px;
  display: flex; flex-direction: column; align-items: stretch; gap: 4px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translateY(-10px);
  box-shadow: 0 24px 40px oklch(0.18 0.012 265 / 0.14);
  transition: opacity 0.28s ease, transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; pointer-events: auto; transform: translateY(0); }
.mobile-menu a {
  color: var(--text); font-size: 16px; font-weight: 500; text-align: center;
  padding: 13px 12px; border-radius: 6px; transition: background 0.2s ease, color 0.2s ease;
}
.mobile-menu a:hover { background: var(--bg-mute); color: var(--accent); }
.mobile-menu .nav-cta { margin: 8px 0 0; padding: 14px 22px; font-size: 15px; color: var(--cream); }
.mobile-menu .nav-cta:hover { color: var(--cream); background: var(--accent-hover); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 16px 30px; border-radius: 3px;
  font-size: 15.5px; font-weight: 600; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--cream); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: transparent; color: var(--text); border: 1px solid oklch(0.8 0.01 75); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-gold {
  display: inline-block; background: var(--gold); color: var(--navy);
  padding: 17px 34px; border-radius: 3px; font-size: 16px; font-weight: 700;
  transition: background 0.2s ease;
}
.btn-gold:hover { background: var(--cream); }
.text-link {
  display: inline-block; font-size: 14.5px; font-weight: 700; color: var(--accent);
  border-bottom: 1px solid var(--accent); padding-bottom: 2px; transition: color 0.2s ease, border-color 0.2s ease;
}
.text-link:hover { color: var(--gold); border-color: var(--gold); }

/* ---------- Layout helpers ---------- */
.section { padding: 100px 48px; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.wrap { max-width: var(--container); margin: 0 auto; }
.wrap-wide { max-width: var(--container-wide); margin: 0 auto; }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 16px;
}

/* ---------- Hero ---------- */
.hero { padding: 88px 48px 96px; max-width: var(--container-wide); margin: 0 auto; }
#hero-grid { display: grid; grid-template-columns: 1.05fr 0.9fr; gap: 56px; align-items: center; }
.hero-badge {
  display: inline-block; background: var(--accent-light); color: var(--accent);
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 2px; margin-bottom: 26px;
}
.hero-title { font-size: 46px; line-height: 1.1; font-weight: 500; margin: 0 0 22px; letter-spacing: -0.01em; }
.hero-lede { font-size: 17.5px; line-height: 1.6; color: var(--text-muted); max-width: 520px; margin: 0 0 26px; }
.hero-quote {
  font-style: italic; font-size: 19px; line-height: 1.5; color: var(--accent);
  max-width: 480px; margin: 0 0 34px; border-left: 2px solid var(--gold); padding-left: 20px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 22px; }
.hero-foot { font-size: 13.5px; color: var(--text-faint); letter-spacing: 0.02em; }

.hero-media { position: relative; display: flex; justify-content: center; width: 100%; }
.hero-media-frame {
  position: relative; width: 100%; max-width: 460px; aspect-ratio: 1/1;
  border-radius: 16px; overflow: hidden; box-shadow: 0 30px 60px oklch(0.18 0.012 265 / 0.22);
  background: var(--navy);
  opacity: 0; transform: scale(0.96);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
body.is-loaded .hero-media-frame { opacity: 1; transform: scale(1); transition-delay: 0.2s; }
.hero-video { width: 100%; height: 100%; object-fit: cover; object-position: center center; }
.hero-media-scrim {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, oklch(0.18 0.012 265 / 0) 62%, oklch(0.18 0.012 265 / 0.4) 100%);
  opacity: 1; transition: opacity 0.5s ease;
}
.hero-media-frame.is-playing .hero-media-scrim { opacity: 0; }

/* Liquid-glass play/replay button, bottom-right corner */
.hero-media-play {
  position: absolute; right: 14px; bottom: 14px; z-index: 3;
  width: 50px; height: 50px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; border: none; padding: 0; cursor: pointer;
  background: linear-gradient(155deg, oklch(1 0 0 / 0.38) 0%, oklch(1 0 0 / 0.1) 55%, oklch(1 0 0 / 0.24) 100%);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  outline: 1px solid oklch(1 0 0 / 0.45);
  outline-offset: -1px;
  box-shadow:
    0 8px 20px oklch(0.18 0.012 265 / 0.35),
    inset 0 1px 1px oklch(1 0 0 / 0.65),
    inset 0 -2px 6px oklch(0.18 0.012 265 / 0.18);
  opacity: 1; transition: opacity 0.35s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.hero-media-play:hover {
  transform: scale(1.08);
  box-shadow:
    0 10px 24px oklch(0.18 0.012 265 / 0.4),
    inset 0 1px 1px oklch(1 0 0 / 0.75),
    inset 0 -2px 6px oklch(0.18 0.012 265 / 0.18);
}
.hero-media-play:active { transform: scale(0.92); }
.hero-media-play span {
  width: 0; height: 0; border-top: 9px solid transparent; border-bottom: 9px solid transparent;
  border-left: 14px solid oklch(1 0 0 / 0.95); margin-left: 3px;
  filter: drop-shadow(0 1px 2px oklch(0.18 0.012 265 / 0.45));
}
.hero-media-frame.is-playing .hero-media-play { opacity: 0; transform: scale(0.8); pointer-events: none; }

/* ---------- Hero entrance motion ---------- */
.hero-badge, .hero-title, .hero-lede, .hero-quote, .hero-actions, .hero-foot {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1), transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
body.is-loaded .hero-badge   { opacity: 1; transform: none; transition-delay: 0.05s; }
body.is-loaded .hero-title   { opacity: 1; transform: none; transition-delay: 0.16s; }
body.is-loaded .hero-lede    { opacity: 1; transform: none; transition-delay: 0.30s; }
body.is-loaded .hero-quote   { opacity: 1; transform: none; transition-delay: 0.42s; }
body.is-loaded .hero-actions { opacity: 1; transform: none; transition-delay: 0.52s; }
body.is-loaded .hero-foot    { opacity: 1; transform: none; transition-delay: 0.62s; }

/* ---------- Scroll reveal motion (title/text entrance across the page) ---------- */
[data-reveal] {
  opacity: 0; transform: translateY(26px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(min(var(--reveal-i, 0), 8) * 70ms);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-badge, .hero-title, .hero-lede, .hero-quote, .hero-actions, .hero-foot,
  .hero-media-frame, .hero-video, [data-reveal] {
    transition: none !important; opacity: 1 !important; transform: none !important; filter: none !important;
  }
}

/* ---------- Page loader ---------- */
.page-loader {
  position: fixed; inset: 0; z-index: 300; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 18px; background: var(--navy);
  transition: opacity 0.45s ease;
}
body.is-loaded .page-loader { opacity: 0; pointer-events: none; }
body:not(.is-loaded) { overflow: hidden; }
.brain-loader { width: 96px; height: 96px; overflow: visible; }
.brain-outline, .brain-fissure {
  fill: none; stroke: oklch(0.98 0.008 75 / 0.85); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.brain-loader { animation: brain-breathe 2.6s ease-in-out infinite; }
.brain-links line { stroke: var(--gold); stroke-width: 1; opacity: 0.45; }
.brain-nodes circle { fill: var(--gold); animation: node-pulse 1.8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.page-loader-label {
  font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 15px;
  letter-spacing: 0.04em; color: oklch(0.98 0.008 75 / 0.75);
}
@keyframes brain-breathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.045); }
}
@keyframes node-pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); transform-origin: center; }
  50% { opacity: 1; transform: scale(1.15); transform-origin: center; }
}
@media (prefers-reduced-motion: reduce) {
  .page-loader { transition: none; }
  .brain-loader, .brain-nodes circle { animation: none; }
}

/* ---------- Enfoque / pilares ---------- */
/* Section intros are centered site-wide (the hero is the only exception). */
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.section-title { font-size: 30px; line-height: 1.22; font-weight: 500; margin: 0 0 18px; }
.section-lede { font-size: 16.5px; line-height: 1.65; color: var(--text-muted); }

#pillars-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.pillar { padding: 0 32px; border-right: 1px solid var(--border-strong); }
.pillar:first-child { padding-left: 0; }
.pillar:last-child { padding-right: 0; border-right: none; }
.pillar-num { font-family: 'Newsreader', serif; font-size: 44px; margin-bottom: 16px; }
.pillar h3 { font-size: 19px; font-weight: 700; margin: 0 0 10px; }
.pillar p { font-size: 15.5px; line-height: 1.65; color: var(--text-muted); }
.pillar p.pillar-num { color: var(--gold); }

/* ---------- Ebooks ---------- */
/* Category blocks within the collection — headings are left-aligned so it
   reads clearly as a section label, not centered body copy. */
.ebook-cat { margin-top: 64px; }
.ebook-cat:first-of-type { margin-top: 40px; }
.ebook-cat-head { text-align: left; max-width: 720px; margin: 0 0 26px; }
.ebook-cat-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 8px;
}
.ebook-cat-title { font-family: 'Newsreader', serif; font-size: 25px; font-weight: 500; margin: 0 0 8px; line-height: 1.2; }
.ebook-cat-desc { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); max-width: 640px; }

/* One single card design used by every category */
#ebook-grid, .ebook-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.ebook-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}
.ebook-card:hover { transform: translateY(-4px); box-shadow: 0 22px 44px oklch(0.18 0.012 265 / 0.12); }
.ebook-cover {
  position: relative; aspect-ratio: 4 / 5; display: flex; flex-direction: column;
  justify-content: space-between; padding: 24px; overflow: hidden;
}
/* Cover variant A: real book-cover photo (fills the slot edge to edge) */
.ebook-cover-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Cover variant B: typeset gradient cover */
.ebook-cover-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; z-index: 1; opacity: 0.85; }
.ebook-cover-rule { width: 30px; height: 2px; margin-bottom: 12px; }
.ebook-cover-title { font-family: 'Newsreader', serif; font-size: 22px; font-weight: 600; line-height: 1.25; z-index: 1; }
.ebook-body { padding: 20px 22px 22px; display: flex; flex-direction: column; flex: 1; }
.ebook-title { font-size: 16px; font-weight: 700; margin: 0 0 8px; line-height: 1.3; }
.ebook-desc { font-size: 13.5px; line-height: 1.58; color: var(--text-muted); margin: 0 0 18px; flex: 1; }
.ebook-link { align-self: flex-start; }

/* Ancla de las categorías (links del footer): compensa el header fijo. */
.ebook-cat { scroll-margin-top: 96px; }

/* ---------- Tarjeta DESTACADA (diseño único para TODOS los ebooks) ----------
   Cada libro ocupa todo el ancho: portada a la izquierda e información a la
   derecha, pintada con la paleta del propio ebook. coleccion.js le agrega la
   clase .is-featured a cada tarjeta y carga sus colores desde ebooks.js. */
.ebook-cards.is-featured-list { grid-template-columns: minmax(0, 1fr); }
.ebook-card.is-featured {
  --card-fondo: #10172A;
  --card-texto: #F4F6FF;
  --card-primario: #EEC15A;
  display: grid; grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  background: var(--card-fondo); color: var(--card-texto);
  border: none; border-radius: 16px;
  box-shadow: 0 24px 50px oklch(0.18 0.012 265 / 0.16);
}
.ebook-card.is-featured:hover { transform: translateY(-3px); box-shadow: 0 32px 64px oklch(0.18 0.012 265 / 0.22); }
.ebook-card.is-featured .ebook-cover { aspect-ratio: 4 / 5; }
.ebook-card.is-featured .ebook-body {
  justify-content: center; padding: 48px 56px; position: relative; overflow: hidden;
  background: radial-gradient(120% 90% at 100% 0%,
    color-mix(in oklab, var(--card-primario) 16%, transparent) 0%, transparent 60%);
}
.ebook-card.is-featured .ebook-featured-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--card-primario); margin: 0 0 16px;
}
.ebook-card.is-featured .ebook-title {
  font-family: 'Newsreader', Georgia, serif; font-weight: 500;
  font-size: clamp(28px, 3.2vw, 40px); line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 16px;
}
.ebook-card.is-featured .ebook-desc {
  flex: 0 0 auto; font-size: 17px; line-height: 1.6; max-width: 520px; margin: 0 0 24px;
  color: color-mix(in oklab, var(--card-texto) 74%, var(--card-fondo));
}
.ebook-featured-seals {
  display: flex; flex-wrap: wrap; gap: 8px 18px; list-style: none; padding: 0; margin: 0 0 32px;
}
.ebook-featured-seals li {
  display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px;
  color: color-mix(in oklab, var(--card-texto) 82%, var(--card-fondo));
}
.ebook-featured-seals li::before { content: "✓"; font-weight: 800; color: var(--card-primario); }
.ebook-card.is-featured .ebook-link {
  border: none; padding: 15px 28px; border-radius: 10px;
  background: var(--card-primario); color: var(--card-fondo);
  font-size: 15.5px; font-weight: 800;
  box-shadow: 0 12px 28px color-mix(in oklab, var(--card-primario) 35%, transparent);
  transition: transform 0.2s ease, filter 0.2s ease;
}
.ebook-card.is-featured .ebook-link:hover { color: var(--card-fondo); transform: translateY(-2px); filter: brightness(1.06); }

/* ---------- CARRUSEL (categorías con más de un libro, en TODAS las pantallas) ----------
   Una tarjeta destacada por "diapositiva". Se desliza con el dedo o el trackpad,
   con las flechas (computadora/tablet) o tocando los puntitos. */
.ebook-cards.is-carousel {
  display: flex; gap: 24px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 24px;
  /* El margen negativo + padding deja lugar para la sombra sin recortarla. */
  margin: -8px -24px -40px; padding: 8px 24px 40px;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.ebook-cards.is-carousel::-webkit-scrollbar { display: none; }
.ebook-cards.is-carousel > .ebook-card { flex: 0 0 100%; scroll-snap-align: start; }
.ebook-cards.is-carousel > .ebook-card:hover { transform: none; }
/* Sombra más contenida: entra completa en el padding del carrusel y no se
   ve recortada en un borde rectangular. */
.ebook-cards.is-carousel > .ebook-card,
.ebook-cards.is-carousel > .ebook-card:hover { box-shadow: 0 16px 24px -10px oklch(0.18 0.012 265 / 0.28); }

.carousel-nav { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; }
.carousel-nav[hidden] { display: none !important; }
.carousel-dots { display: flex; justify-content: center; gap: 8px; }
.carousel-dot {
  width: 8px; height: 8px; padding: 0; border: none; border-radius: 999px; cursor: pointer;
  background: var(--border-strong); transition: width 0.3s ease, background 0.3s ease;
}
.carousel-dot.is-active { width: 24px; background: var(--accent); }
.carousel-arrow {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--text); border: 1px solid var(--border-strong);
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
}
.carousel-arrow:hover:not(:disabled) { background: var(--accent); color: var(--cream); border-color: var(--accent); }
.carousel-arrow:disabled { opacity: 0.35; cursor: default; }

@media (max-width: 980px) {
  /* Tablet: sigue horizontal, con portada más angosta. */
  .ebook-card.is-featured { grid-template-columns: minmax(0, 300px) minmax(0, 1fr); }
  .ebook-card.is-featured .ebook-body { padding: 36px 36px; }
}

@media (max-width: 640px) {
  /* Celular: tarjeta COMPACTA que entra entera en la pantalla.
     Solo lo esencial: portada, categoría, título, descripción breve y botón. */
  .ebook-card.is-featured { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; max-width: 440px; margin: 0 auto; }
  .ebook-card.is-featured .ebook-cover { aspect-ratio: 5 / 6; }
  .ebook-card.is-featured .ebook-cover-img { object-position: center 45%; }
  .ebook-card.is-featured .ebook-body { padding: 20px 20px 22px; text-align: left; justify-content: flex-start; }
  .ebook-card.is-featured .ebook-featured-eyebrow { font-size: 10.5px; margin-bottom: 8px; }
  .ebook-card.is-featured .ebook-title { font-size: 23px; margin-bottom: 8px; }
  /* Descripción cortada a 2 líneas: la versión completa está en el modal. */
  .ebook-card.is-featured .ebook-desc {
    font-size: 14.5px; line-height: 1.5; margin-bottom: 16px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .ebook-featured-seals { display: none; }
  .ebook-card.is-featured .ebook-link { align-self: stretch; text-align: center; padding: 13px 20px; margin-top: auto; }

  /* En el carrusel, la siguiente tarjeta asoma para invitar a deslizar. */
  .ebook-cards.is-carousel { gap: 14px; }
  .ebook-cards.is-carousel > .ebook-card { flex-basis: 86%; max-width: none; margin: 0; }
  /* En celular se desliza con el dedo: las flechas sobran. */
  .carousel-arrow { display: none; }
}

/* ---------- Cómo funciona ---------- */
#steps-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.step { text-align: left; position: relative; padding-top: 20px; }
.step-num {
  font-family: 'Newsreader', serif; font-size: 32px; margin-bottom: 14px;
  border-top: 2px solid var(--gold); padding-top: 14px; display: inline-block;
}
.step p { font-size: 15.5px; line-height: 1.6; color: var(--text-soft); font-weight: 500; }
.step p.step-num { color: var(--gold); }

/* ---------- Diferenciación ---------- */
#diff-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
.diff-card { padding: 36px; border-radius: 6px; }
.diff-card-off { background: var(--bg-alt); border: 1px solid var(--border); }
.diff-card-on { background: var(--accent); color: var(--cream); }
.diff-label { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 20px; }
.diff-card-off .diff-label { color: var(--text-faint); }
.diff-card-on .diff-label { color: var(--gold); }
.diff-list { display: flex; flex-direction: column; gap: 14px; list-style: none; margin: 0; padding: 0; }
.diff-list li { display: flex; gap: 12px; font-size: 15px; }
.diff-card-off .diff-list li { color: var(--text-muted); }
.diff-card-off .diff-list li span { color: oklch(0.7 0.01 75); }
.diff-card-on .diff-list li span { color: var(--gold); }

/* ---------- Frase editorial ---------- */
.pull-quote-section { padding: 120px 48px; background: var(--navy); text-align: center; }
.pull-quote {
  font-style: italic; font-size: clamp(21px, 2.6vw, 28px); line-height: 1.45;
  color: var(--cream); max-width: 760px; margin: 0 auto;
}
.pull-quote-cite {
  margin: 28px auto 0; font-size: 15px; letter-spacing: 0.04em;
  color: oklch(0.98 0.008 75 / 0.6);
}
.pull-quote-cite .serif { font-style: italic; }

/* ---------- Quiénes somos / CEO ---------- */
/* Founder shown as a row: photo left, text right (premium). */
.ceo-card {
  max-width: 940px; margin: 4px auto 0;
  display: grid; grid-template-columns: 300px 1fr; gap: 52px; align-items: center;
  text-align: left;
}
.ceo-photo-frame {
  width: 100%; aspect-ratio: 4 / 5; border-radius: 14px; overflow: hidden;
  background: var(--bg-mute);
  box-shadow: 0 26px 55px oklch(0.18 0.012 265 / 0.24);
}
.ceo-photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.ceo-name { font-size: 30px; font-weight: 500; letter-spacing: -0.01em; margin: 0 0 12px; line-height: 1.12; }
.ceo-role { font-size: 15.5px; line-height: 1.55; color: var(--text-soft); margin: 0 0 20px; }
.ceo-role strong { color: var(--accent); font-weight: 700; }
.ceo-text { font-size: 16.5px; line-height: 1.72; color: var(--text-muted); max-width: 560px; }
.ceo-text strong { color: var(--text); font-weight: 700; }

/* ---------- Confianza ---------- */
#confianza-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; text-align: center; list-style: none; margin: 0; padding: 0; }
#confianza-grid li { padding: 24px 0; border-top: 1px solid var(--border); font-size: 15.5px; font-weight: 700; }

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--border-strong); }
.faq-question {
  width: 100%; text-align: left; background: none; border: none; padding: 22px 4px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  cursor: pointer; font-family: 'Manrope', sans-serif;
}
.faq-question-text { font-size: 16.5px; font-weight: 600; color: var(--text); }
.faq-icon { font-size: 20px; color: var(--accent); flex-shrink: 0; }
.faq-answer {
  font-size: 15px; line-height: 1.65; color: var(--text-muted); margin: 0 0 22px; padding: 0 4px;
}
.faq-answer[hidden] { display: none; }

/* ---------- CTA final ---------- */
.cta-final { padding: 110px 48px; background: var(--navy); text-align: center; }
.cta-final h2 { color: var(--cream); font-size: 30px; font-weight: 500; margin: 0 0 18px; max-width: 640px; margin-left: auto; margin-right: auto; }
.cta-final p { font-size: 16.5px; color: oklch(0.7 0.01 75); max-width: 560px; margin: 0 auto 36px; line-height: 1.6; }
.cta-covers { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.cta-cover { width: 90px; aspect-ratio: 4/3; border-radius: 4px; opacity: 0.9; }

/* ---------- Footer ---------- */
.site-footer { padding: 72px 48px 40px; background: var(--bg-alt); border-top: 1px solid var(--border); }
#footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 56px; }
.footer-brand { font-family: 'Newsreader', serif; font-size: 20px; font-weight: 600; margin-bottom: 14px; }
.footer-desc { font-size: 14px; line-height: 1.6; color: var(--text-muted); max-width: 280px; }
.footer-heading { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-faint); margin-bottom: 16px; }
.footer-links { display: flex; flex-direction: column; gap: 10px; list-style: none; margin: 0; padding: 0; }
.footer-links a { font-size: 14.5px; color: var(--text-soft); transition: color 0.2s ease; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.footer-copy { font-size: 13px; color: var(--text-faint); }
.footer-social { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.footer-social a { font-size: 13px; color: var(--text-muted); transition: color 0.2s ease; }
.footer-social a:hover { color: var(--accent); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 60;
  width: 48px; height: 48px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(155deg, oklch(0.17 0.035 272 / 0.92) 0%, oklch(0.26 0.045 272 / 0.85) 100%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  outline: 1px solid oklch(1 0 0 / 0.14);
  outline-offset: -1px;
  box-shadow: 0 10px 26px oklch(0.18 0.012 265 / 0.3), inset 0 1px 1px oklch(1 0 0 / 0.16);
  color: var(--cream);
  opacity: 0; transform: translateY(14px) scale(0.9); pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}
.back-to-top.is-visible { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
.back-to-top:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 30px oklch(0.18 0.012 265 / 0.35), inset 0 1px 1px oklch(1 0 0 / 0.22);
}
.back-to-top:active { transform: translateY(-1px) scale(0.94); }
@media (max-width: 560px) {
  .back-to-top { right: 16px; bottom: 16px; width: 44px; height: 44px; }
}

/* ---------- Responsive ---------- */
/* Switch to the hamburger before the 5 nav links get cramped. */
@media (max-width: 1040px) {
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
}
@media (max-width: 980px) {
  .site-header { padding: 14px 24px; }
  .logo img { height: 24px; }
  .main-nav { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { padding: 28px 24px 64px; }
  #hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-media { order: -1; }
  .hero-media-frame { max-width: 100%; }
  .hero-title { font-size: 40px; }
  .section { padding: 72px 24px; }
  .pull-quote-section, .cta-final { padding: 80px 24px; }
  .site-footer { padding: 56px 24px 32px; }
  #diff-grid { grid-template-columns: 1fr; }
  .ebook-cat-head { text-align: center; margin-left: auto; margin-right: auto; }
  .ceo-card { grid-template-columns: 1fr; gap: 28px; max-width: 440px; text-align: center; }
  .ceo-photo-frame { max-width: 260px; margin: 0 auto; }
  .ceo-text { margin-left: auto; margin-right: auto; }
  #pillars-row { grid-template-columns: 1fr; gap: 32px; }
  .pillar { padding: 0 !important; border-right: none !important; }
  #steps-row { grid-template-columns: 1fr 1fr; }
  #resources-row { grid-template-columns: 1fr; }
  #footer-grid { grid-template-columns: 1fr 1fr; }

  /* Hero buttons: side by side, compact, on every phone size */
  .hero-actions { flex-wrap: nowrap; gap: 10px; }
  .hero-actions .btn { flex: 1 1 0; padding: 12px 10px; font-size: 13.5px; text-align: center; line-height: 1.3; }

  /* Center section intro copy (title/lede) everywhere except the hero */
  .section-head { text-align: center; margin-left: auto; margin-right: auto; }
  #diff-title { text-align: center; margin-left: auto; margin-right: auto; }
  #profesiones-title, #profesiones-title + p { text-align: center; margin-left: auto; margin-right: auto; }
}
@media (max-width: 560px) {
  .hero-title { font-size: 32px; }
  #steps-row { grid-template-columns: 1fr; }
  #footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ebook-card, .nav-link, .nav-cta, .btn, .btn-gold, .text-link, .footer-links a, .footer-social a {
    transition: none;
  }
}

/* ---------- Modal de textos legales (Términos, Privacidad, Aviso legal) ---------- */
.legal-overlay {
  position: fixed; inset: 0; z-index: 280;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: oklch(0.17 0.035 272 / 0.45);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s ease;
}
.legal-overlay.is-open { opacity: 1; visibility: visible; }
body.legal-open { overflow: hidden; }
.legal-box {
  position: relative; width: 100%; max-width: 640px; max-height: calc(100dvh - 40px);
  overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain;
  background: var(--bg); color: var(--text); border-radius: 16px;
  padding: 44px 44px 36px;
  box-shadow: 0 40px 90px oklch(0.12 0.02 265 / 0.35);
  transform: translateY(18px) scale(0.98); transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.legal-overlay.is-open .legal-box { transform: none; }
.legal-close {
  position: absolute; top: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
  font-size: 16px; cursor: pointer; transition: background 0.2s ease, transform 0.2s ease;
}
.legal-close:hover { background: var(--bg-mute); transform: rotate(90deg); }
.legal-eyebrow {
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 10px;
}
.legal-title { font-family: 'Newsreader', Georgia, serif; font-size: 32px; font-weight: 500; line-height: 1.15; margin: 0 0 22px; padding-right: 40px; }
.legal-content h3 { font-size: 15.5px; font-weight: 700; margin: 24px 0 6px; }
.legal-content p { font-size: 15px; line-height: 1.7; color: var(--text-muted); }
.legal-content p + p { margin-top: 10px; }
.legal-content strong { color: var(--text); }
.legal-updated { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--text-faint); }
@media (max-width: 560px) {
  .legal-overlay { padding: 12px; }
  .legal-box { padding: 36px 22px 28px; max-height: calc(100dvh - 24px); }
  .legal-title { font-size: 26px; }
}
@media (prefers-reduced-motion: reduce) { .legal-overlay, .legal-box { transition: none; } }
