@charset "UTF-8";
/* =========================================================================
   MEDIOCRES EN LA ACADEMIA — Hoja de estilo principal
   Estética limpia: una sola tipografía, mucho aire, esquinas redondeadas,
   imágenes en color natural y sin recortes forzados.
   Ningún estado de hover mueve la maquetación.
   ========================================================================= */

/* ---------------------------------------------------------------- 1. RESET */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
:target, [id] { scroll-margin-top: calc(var(--hdr-h) + 1.5rem); }
body { min-height: 100vh; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul, ol { list-style: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }

/* --------------------------------------------------------------- 2. TOKENS */
:root {
  --c-magenta:    #E32E65;   /* color tomado de la portada del libro */
  --c-magenta-hi: #FF5C8A;
  --c-magenta-lo: #C01E50;
  --c-btn:        #D62457;   /* botones sólidos: 4.94:1 con blanco en ambos temas */

  --f: "Inter Tight", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;

  /* Escala tipográfica contenida */
  --t-xs:   0.78rem;
  --t-sm:   0.875rem;
  --t-base: 1rem;
  --t-md:   clamp(1.06rem, 1.02rem + 0.20vw, 1.18rem);
  --t-lg:   clamp(1.22rem, 1.14rem + 0.40vw, 1.45rem);
  --t-xl:   clamp(1.45rem, 1.30rem + 0.75vw, 1.95rem);
  --t-2xl:  clamp(1.85rem, 1.55rem + 1.45vw, 2.85rem);
  --t-3xl:  clamp(2.30rem, 1.80rem + 2.40vw, 3.85rem);
  --t-4xl:  clamp(2.70rem, 1.95rem + 3.60vw, 5.20rem);

  /* Espacio */
  --sp-1: 0.5rem;  --sp-2: 1rem;   --sp-3: 1.75rem;
  --sp-4: 2.75rem; --sp-5: 4.5rem;
  --sp-6: clamp(4.5rem, 8vw, 8.5rem);
  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --measure: 66ch;
  --maxw: 1180px;
  --maxw-wide: 1400px;

  /* Radios */
  --r-xs: 8px;  --r-sm: 12px;  --r: 18px;  --r-lg: 26px;  --r-xl: 34px;

  --ease: cubic-bezier(0.32, 0.72, 0, 1);
  --hdr-h: 4.25rem;
}

/* Tema oscuro (por defecto) */
:root, [data-theme="dark"] {
  --bg:        #000000;
  --bg-alt:    #0F0F11;
  --bg-block:  #171719;
  --bg-card:   #1C1C1E;
  --fg:        #F5F5F7;
  --fg-muted:  #A1A1A6;
  --fg-faint:  #8E8E93;
  --accent:    var(--c-magenta-hi);
  --line:      #313136;
  --line-strong: #4A4A50;
  --on-accent: #FFFFFF;
  --hdr-bg:    rgba(0, 0, 0, 0.72);
  --shadow:    0 12px 40px -14px rgba(0, 0, 0, 0.9);
  color-scheme: dark;
}

/* Tema claro */
[data-theme="light"] {
  --bg:        #FFFFFF;
  --bg-alt:    #F2F2F5;
  --bg-block:  #FFFFFF;
  --bg-card:   #FFFFFF;
  --fg:        #1D1D1F;
  --fg-muted:  #6E6E73;
  --fg-faint:  #6E6E73;
  --accent:    var(--c-magenta-lo);
  --line:      #DCDCE1;
  --line-strong: #C7C7CC;
  --on-accent: #FFFFFF;
  --hdr-bg:    rgba(255, 255, 255, 0.78);
  --shadow:    0 12px 36px -16px rgba(0, 0, 0, 0.22);
  color-scheme: light;
}

/* --------------------------------------------------------- 3. TIPOGRAFÍA */
body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f);
  font-size: var(--t-md);
  line-height: 1.55;
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: background-color .45s var(--ease), color .45s var(--ease);
  overflow-x: clip;
}

h1, h2, h3, h4 { font-weight: 600; line-height: 1.08; letter-spacing: -0.028em; text-wrap: balance; }

.display { font-size: var(--t-4xl); font-weight: 650; line-height: 1.04; letter-spacing: -0.042em; }
.h1 { font-size: var(--t-3xl); letter-spacing: -0.035em; font-weight: 640; }
.h2 { font-size: var(--t-2xl); letter-spacing: -0.030em; font-weight: 620; }
.h3 { font-size: var(--t-xl);  letter-spacing: -0.022em; line-height: 1.18; }
.h4 { font-size: var(--t-lg);  letter-spacing: -0.016em; line-height: 1.25; }

.lede {
  font-size: var(--t-lg); line-height: 1.42; font-weight: 400;
  color: var(--fg-muted); max-width: 40ch; letter-spacing: -0.016em;
}

.prose { max-width: var(--measure); }
.prose p { color: var(--fg-muted); }
.prose p + p { margin-top: 1.1em; }
.prose strong { color: var(--fg); font-weight: 600; }
.prose a, .link {
  color: var(--accent); text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  transition: border-color .25s var(--ease);
}
.prose a:hover, .link:hover { border-bottom-color: var(--accent); }

/* Etiqueta de sección: discreta, en el color de acento */
.label {
  font-size: var(--t-sm); font-weight: 600; letter-spacing: 0.005em;
  color: var(--accent); display: flex; align-items: center; gap: 0.6rem;
}
.label__n {
  display: inline-grid; place-items: center;
  min-width: 1.75rem; height: 1.75rem; padding-inline: 0.35rem;
  border-radius: 7px; background: var(--c-btn); color: #FFFFFF;
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.02em; font-variant-numeric: tabular-nums;
}
.kicker { font-size: var(--t-sm); font-weight: 500; color: var(--fg-faint); }
.meta {
  font-size: var(--t-sm); color: var(--fg-faint); letter-spacing: 0;
}

/* ------------------------------------------------------------- 4. LAYOUT */
.shell { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
.shell--wide { max-width: var(--maxw-wide); }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-4) var(--sp-3); }
.c1-5 { grid-column: 1 / 6; }   .c1-6 { grid-column: 1 / 7; }
.c1-7 { grid-column: 1 / 8; }   .c1-8 { grid-column: 1 / 9; }
.c2-8 { grid-column: 2 / 9; }
.c4-13 { grid-column: 4 / 13; } .c5-13 { grid-column: 5 / 13; }
.c6-13 { grid-column: 6 / 13; } .c7-13 { grid-column: 7 / 13; }
.c8-13 { grid-column: 8 / 13; } .c9-13 { grid-column: 9 / 13; }
.c1-13 { grid-column: 1 / 13; }

section { position: relative; }
.band { padding-block: var(--sp-6); }
.band--tight { padding-block: var(--sp-5); }
.band--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

/* Separador limpio entre secciones */
.band + .band:not(.band--alt)::before,
.band--alt + .band:not(.band--alt)::before { content: none; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

.head { max-width: 46ch; }
.head .label + h1, .head .label + h2 { margin-top: 0.75rem; }
.head p.lede { margin-top: 1.1rem; }

/* ------------------------------------------------------------- 5. HEADER */
/* Barra translúcida siempre visible. No se esconde nunca al hacer scroll. */
.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 110;
  height: var(--hdr-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-2);
  padding-inline: var(--gutter);
  background: var(--hdr-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.hdr--solid { border-bottom-color: var(--line); }

.brand {
  font-size: 1rem; font-weight: 600; letter-spacing: -0.022em;
  text-decoration: none; white-space: nowrap;
  display: flex; align-items: baseline; gap: 0.4rem;
  transition: opacity .25s var(--ease);
}
.brand:hover { opacity: 0.65; }
.brand em { font-style: normal; color: var(--accent); }
.brand .brand__tag { font-size: 0.72rem; color: var(--fg-faint); font-weight: 400; letter-spacing: 0; align-self: center; }

.hdr__tools { display: flex; align-items: center; gap: 0.35rem; }

.iconbtn {
  width: 2.25rem; height: 2.25rem; flex: none;
  display: grid; place-items: center; border-radius: 50%;
  color: var(--fg);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.iconbtn:hover { background: var(--bg-alt); color: var(--accent); }
[data-theme="light"] .iconbtn:hover { background: #ECECEF; }
.iconbtn svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.iconbtn--theme .sun { display: none; }
[data-theme="light"] .iconbtn--theme .sun { display: block; }
[data-theme="light"] .iconbtn--theme .moon { display: none; }

/* Carrito: ancho fijo, no empuja nada al pasar por encima */
.cart {
  display: inline-flex; align-items: center; gap: 0.45rem;
  height: 2.25rem; padding-inline: 0.9rem;
  border-radius: 999px;
  background: var(--c-btn); color: #FFFFFF;
  text-decoration: none; font-size: var(--t-sm); font-weight: 500; letter-spacing: -0.01em;
  white-space: nowrap;
  transition: opacity .25s var(--ease);
}
.cart:hover { opacity: 0.82; }
.cart svg { width: 1rem; height: 1rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.burger { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border-radius: 50%; transition: background-color .25s var(--ease); }
.burger:hover { background: var(--bg-alt); }
[data-theme="light"] .burger:hover { background: #ECECEF; }
.burger i { display: block; width: 17px; height: 1.5px; background: currentColor; border-radius: 2px; transition: transform .4s var(--ease), opacity .2s var(--ease); }
.burger i + i { margin-top: 5px; }
body.nav-open .burger i:nth-child(1) { transform: translateY(3.25px) rotate(45deg); }
body.nav-open .burger i:nth-child(2) { opacity: 0; }
body.nav-open .burger i:nth-child(3) { transform: translateY(-3.25px) rotate(-45deg); }

/* ------------------------------------------------ 6. MENÚ DESPLEGABLE */
/* Panel limpio bajo la barra, no una pantalla de titulares gigantes. */
.nav {
  position: fixed; inset: var(--hdr-h) 0 auto 0; z-index: 100;
  background: var(--hdr-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
  max-height: calc(100vh - var(--hdr-h));
  overflow-y: auto;
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s linear .35s;
}
body.nav-open .nav { opacity: 1; visibility: visible; transform: translateY(0); transition: opacity .3s var(--ease), transform .35s var(--ease), visibility 0s; }

.nav__body { max-width: var(--maxw); margin-inline: auto; padding: var(--sp-3) var(--gutter) var(--sp-4); display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-3); }
.nav__list { grid-column: 1 / 7; }
.nav__aside { grid-column: 8 / 13; align-self: start; display: grid; gap: var(--sp-2); }

.nav__link {
  display: flex; align-items: baseline; gap: 0.9rem;
  padding: 0.55rem 0.7rem;
  margin-inline: -0.7rem;
  border-radius: var(--r-xs);
  text-decoration: none;
  font-size: var(--t-xl); font-weight: 600; letter-spacing: -0.028em;
  opacity: 0; transform: translateY(6px);
  transition: background-color .2s var(--ease), color .2s var(--ease), opacity .35s var(--ease), transform .35s var(--ease);
}
body.nav-open .nav__link { opacity: 1; transform: translateY(0); }
.nav__link:hover { background: var(--bg-alt); }
[data-theme="light"] .nav__link:hover { background: #ECECEF; }
.nav__link i { font-style: normal; font-size: var(--t-xs); color: var(--fg-faint); font-weight: 500; flex: none; width: 1.4rem; }
.nav__link[aria-current="page"] { color: var(--accent); }
.nav__link[aria-current="page"] i { color: var(--accent); }

.nav__meta { font-size: var(--t-sm); color: var(--fg-muted); line-height: 1.6; }
.nav__meta strong { color: var(--fg); font-weight: 600; }
.nav__meta a { text-decoration: none; color: var(--accent); }
.nav__meta a:hover { text-decoration: underline; }

/* ---------------------------------------------------------- 7. BOTONES */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.5rem; border-radius: 999px;
  font-size: var(--t-base); font-weight: 500; letter-spacing: -0.012em;
  text-decoration: none; white-space: nowrap;
  transition: opacity .25s var(--ease), background-color .25s var(--ease);
}
.btn--solid { background: var(--c-btn); color: #FFFFFF; }
.btn--solid:hover { opacity: 0.84; }
.btn--soft { background: var(--bg-alt); color: var(--fg); }
[data-theme="light"] .btn--soft { background: #F0F0F3; }
.btn--soft:hover { opacity: 0.75; }

/* Enlace de texto con flecha: la flecha se desplaza, el texto no */
.arrow {
  display: inline-flex; align-items: center; gap: 0.35rem;
  color: var(--accent); text-decoration: none;
  font-size: var(--t-base); font-weight: 500; letter-spacing: -0.012em;
}
.arrow svg { width: 0.9rem; height: 0.9rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.arrow:hover svg { transform: translateX(3px); }
.arrow + .arrow { margin-left: var(--sp-3); }

/* --------------------------------------------------------------- 8. HERO */
.hero { padding-top: calc(var(--hdr-h) + clamp(2.5rem, 7vh, 5rem)); padding-bottom: var(--sp-5); }
.hero__scene { grid-column: 1 / 13; margin-top: var(--sp-4); }
.scene {
  width: 100%;
  aspect-ratio: 900 / 520;
  max-height: min(52vh, 420px);
  display: block;
  border-radius: var(--r-lg);
  background: var(--bg-alt);
}
.scene__cap { margin-top: 0.8rem; font-size: var(--t-sm); color: var(--fg-faint); text-align: center; }
.hero__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-4) var(--sp-3); align-items: center; }
.hero__text { grid-column: 1 / 8; }
.hero__media { grid-column: 9 / 13; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--sp-3); }
.hero__scroll { margin-top: var(--sp-5); display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--t-sm); color: var(--fg-faint); }
.hero__scroll svg { width: 0.85rem; height: 0.85rem; fill: none; stroke: currentColor; stroke-width: 2; animation: nudge 2.2s var(--ease) infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(3px); } }

/* --------------------------------------------- 9. IMÁGENES Y TARJETAS */
/* Regla de oro: ningún filtro de color, ninguna deformación.
   Las proporciones se respetan siempre con object-fit: contain. */
.frame {
  background: var(--bg-alt);
  border-radius: var(--r);
  overflow: hidden;
  display: grid; place-items: center;
  padding: clamp(0.75rem, 2vw, 1.5rem);
}
.frame img { width: 100%; height: 100%; object-fit: contain; border-radius: var(--r-xs); }
.frame--square { aspect-ratio: 1; }
.frame--book { aspect-ratio: 3 / 4; }
.frame--photo { aspect-ratio: 4 / 5; padding: 0; }
.frame--photo img { object-fit: cover; border-radius: 0; }
.frame--plate { background: #FFFFFF; }   /* la ilustración se reproduce tal cual, sin invertir */

/* La portada del libro, en su proporción real y sin recortes */
.cover { display: grid; gap: 0.9rem; justify-items: start; }
.cover img { width: 100%; max-width: 260px; border-radius: var(--r-sm); box-shadow: var(--shadow); }
.cover figcaption { font-size: var(--t-sm); color: var(--fg-faint); }

.card {
  background: var(--bg-block);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(1.5rem, 3vw, 2.4rem);
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
[data-theme="light"] .card { box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.card--flat { background: var(--bg-alt); border-color: transparent; }

/* Cita de reseña */
.quote__text { font-size: var(--t-lg); line-height: 1.45; letter-spacing: -0.02em; color: var(--fg); text-wrap: pretty; }
.quote__by { display: flex; align-items: center; gap: 0.8rem; margin-top: var(--sp-3); }
.quote__by img { width: 2.5rem; height: 2.5rem; border-radius: 50%; object-fit: cover; flex: none; }
.quote__by b { display: block; font-weight: 600; font-size: var(--t-base); }
.quote__by small { display: block; color: var(--fg-faint); font-size: var(--t-sm); }

/* Fragmentos del libro */
.frag { display: grid; gap: 0.7rem; }
.frag + .frag { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--line); }
.frag__n { font-size: var(--t-sm); font-weight: 600; color: var(--accent); }
.frag__body { font-size: var(--t-lg); line-height: 1.5; letter-spacing: -0.018em; color: var(--fg); max-width: 70ch; text-wrap: pretty; }

/* Filas de descarga y de agenda — el hover solo cambia el fondo */
.rows { display: grid; gap: 0.5rem; }
.row {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--sp-2);
  padding: 1.15rem 1.3rem;
  border-radius: var(--r);
  background: var(--bg-alt);
  text-decoration: none;
  transition: background-color .25s var(--ease);
}
.row:hover { background: var(--bg-card); }
[data-theme="light"] .row:hover { background: #ECECEF; }
[data-theme="dark"] .row { background: #131315; }
[data-theme="dark"] .row:hover { background: #1C1C1E; }
.row__t { display: block; font-size: var(--t-md); font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.row__m { display: block; font-size: var(--t-sm); color: var(--fg-faint); margin-top: 0.2rem; }
.row__go { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; flex: none; color: var(--accent); }
.row__go svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.row:hover .row__go svg { transform: translateX(2px); }

/* ------------------------------------------------------- 10. EVENTOS */
.events { display: grid; gap: var(--sp-3); }
.event { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-3); align-items: start; }
.event__media { grid-column: 1 / 5; }
.event__body { grid-column: 6 / 13; }
.event__when { display: inline-flex; align-items: center; gap: 0.5rem; font-size: var(--t-sm); color: var(--fg-faint); margin-top: 0.5rem; }
.event__tag { display: inline-block; font-size: var(--t-xs); font-weight: 600; color: var(--accent); background: var(--bg-alt); padding: 0.3rem 0.7rem; border-radius: 999px; }
[data-theme="dark"] .event__tag { background: #1C1C1E; }
.embed { margin-top: var(--sp-3); border-radius: var(--r); overflow: hidden; background: var(--bg-alt); }
.embed iframe { border: 0; width: 100%; height: 200px; display: block; }

/* ------------------------------------------ 11. BIBLIOTECA (OTRAS LECTURAS) */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.chip {
  font-size: var(--t-sm); font-weight: 500; letter-spacing: -0.01em;
  padding: 0.5rem 1rem; border-radius: 999px;
  background: var(--bg-alt); color: var(--fg-muted);
  transition: background-color .2s var(--ease), color .2s var(--ease);
  white-space: nowrap;
}
[data-theme="light"] .chip { background: #F0F0F3; }
.chip:hover { color: var(--fg); }
.chip[aria-pressed="true"] { background: var(--fg); color: var(--bg); }

.search { position: relative; flex: 1 1 15rem; min-width: 12rem; }
.search input {
  width: 100%; background: var(--bg-alt); border: 1px solid transparent; border-radius: 999px;
  padding: 0.5rem 1rem 0.5rem 2.3rem; font-size: var(--t-sm); color: var(--fg);
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
[data-theme="light"] .search input { background: #F0F0F3; }
.search input::placeholder { color: var(--fg-faint); }
.search input:focus { outline: 0; border-color: var(--accent); }
.search svg { position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%); width: 0.95rem; height: 0.95rem; fill: none; stroke: var(--fg-faint); stroke-width: 2; }

/* Rejilla uniforme: todas las portadas ocupan la misma caja, sin recortar ni estirar */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); gap: var(--sp-4) var(--sp-3); align-items: start; }
/* Subgrid: las cinco filas de cada ficha se alinean entre columnas */
.shelf { grid-auto-rows: auto; }
.bk { display: grid; gap: 0.7rem; align-content: start; text-decoration: none;
      grid-row: span 5; grid-template-rows: subgrid; }
.bk__foot { align-self: start; }
@supports not (grid-template-rows: subgrid) {
  .bk { grid-row: auto; grid-template-rows: none; }
  .bk__t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
  .bk__a { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}
.bk .frame { transition: background-color .25s var(--ease); }
[data-theme="light"] .bk:hover .frame { background: #ECECEF; }
[data-theme="dark"] .bk:hover .frame { background: #1C1C1E; }
.bk__tag { font-size: var(--t-xs); font-weight: 600; color: var(--fg-faint); }
.bk__t { font-size: var(--t-base); font-weight: 600; line-height: 1.3; letter-spacing: -0.018em; text-wrap: pretty; }
.bk__t a { text-decoration: none; transition: color .2s var(--ease); }
.bk:hover .bk__t a { color: var(--accent); }
.bk__a { font-size: var(--t-sm); color: var(--fg-muted); }
.bk__more { font-size: var(--t-sm); color: var(--fg-faint); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.bk.is-hidden { display: none; }
details.bk__det summary { font-size: var(--t-sm); font-weight: 500; color: var(--accent); cursor: pointer; list-style: none; padding-block: 0.3rem; }
details.bk__det summary::-webkit-details-marker { display: none; }
details.bk__det p { font-size: var(--t-sm); color: var(--fg-muted); line-height: 1.55; margin-top: 0.4rem; }

/* Referencias bibliográficas */
.refs { display: grid; gap: 0.4rem; }
.ref { border-radius: var(--r); transition: background-color .25s var(--ease), border-color .25s var(--ease); }
.ref__link {
  display: grid; gap: 0.7rem;
  padding: 1.25rem 1.4rem;
  text-decoration: none; color: inherit;
  border-radius: var(--r);
}
.ref cite { font-style: normal; font-size: var(--t-base); line-height: 1.5; display: block; }
.ref em { font-style: italic; }
/* Pie de la ficha: dominio a la izquierda, flecha pegada a la derecha */
.ref__go {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding-top: 0.7rem;
  border-top: 1px solid var(--line);
  font-size: var(--t-sm); font-weight: 500; color: var(--accent);
}
.ref__go span { overflow-wrap: anywhere; min-width: 0; }
.ref__go svg { width: 0.95rem; height: 0.95rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.ref:hover .ref__go svg { transform: translate(2px, -2px); }
.ref:hover { border-color: var(--line-strong); }
[data-theme="dark"] .ref:hover { background: #202024; }
[data-theme="light"] .ref:hover { background: #F7F7FA; }

/* -------------------------------------------------------------- 12. ENSAYO */
.essay { max-width: 68ch; }
.essay h2 { font-size: var(--t-xl); margin-top: var(--sp-5); margin-bottom: var(--sp-2); }
.essay h2:first-child { margin-top: 0; }
.essay h3 { font-size: var(--t-lg); margin-top: var(--sp-4); margin-bottom: 0.7rem; }
.essay p { margin-bottom: 1.05em; color: var(--fg-muted); }
.essay > p:first-of-type { font-size: var(--t-lg); line-height: 1.45; color: var(--fg); letter-spacing: -0.016em; }
.essay ul { display: grid; gap: 0.6rem; margin-block: var(--sp-3); }
.essay li { padding: 1.2rem 1.4rem; border-radius: var(--r); background: var(--bg-alt); color: var(--fg-muted); font-size: var(--t-base); line-height: 1.55; }
[data-theme="dark"] .essay li { background: #131315; }
.essay li b { color: var(--fg); font-weight: 600; display: block; margin-bottom: 0.3rem; font-size: var(--t-md); letter-spacing: -0.018em; }
.essay li i, .essay i { font-style: italic; }

/* Índice como barra pegajosa bajo la cabecera, no como columna vacía al lado */
.toc {
  position: sticky; top: var(--hdr-h); z-index: 60;
  display: flex; flex-wrap: wrap; gap: 0.4rem;
  padding: 0.7rem 0;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  margin-bottom: var(--sp-4);
}
.toc a {
  padding: 0.45rem 0.9rem; border-radius: 999px;
  color: var(--fg-muted); text-decoration: none; font-size: var(--t-sm); font-weight: 500;
  background: var(--bg-alt); border: 1px solid var(--line);
  transition: background-color .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.toc a:hover { color: var(--fg); border-color: var(--line-strong); }
.toc a.is-active { color: #FFFFFF; background: var(--c-btn); border-color: var(--c-btn); }
/* Columna de lectura centrada */
.reading { max-width: 74ch; margin-inline: auto; }

/* ------------------------------------------------------------ 13. CONTACTO */
.form { display: grid; gap: var(--sp-3); }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: var(--t-sm); font-weight: 500; color: var(--fg-muted); }
.field input, .field textarea, .field select {
  background: var(--bg-alt); border: 1px solid transparent; border-radius: var(--r-sm);
  padding: 0.75rem 0.95rem; font-size: var(--t-base); color: var(--fg);
  resize: vertical; width: 100%;
  transition: border-color .2s var(--ease);
}
[data-theme="light"] .field input, [data-theme="light"] .field textarea, [data-theme="light"] .field select { background: #F0F0F3; }
.field input:focus, .field textarea:focus, .field select:focus { outline: 0; border-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: var(--fg-faint); }
.field textarea { min-height: 9rem; line-height: 1.5; }

.dl-list { display: grid; gap: 0.4rem; }
.crow { display: grid; gap: 0.3rem; padding: 1rem 1.3rem; border-radius: var(--r); background: var(--bg-alt); }
.crow dd, .crow dd a { overflow-wrap: anywhere; word-break: break-word; hyphens: auto; }
.dl-list--inline .crow { grid-template-columns: 8rem minmax(0, 1fr); gap: var(--sp-2); align-items: baseline; }
[data-theme="dark"] .crow { background: #131315; }
.crow dt { font-size: var(--t-sm); color: var(--fg-faint); }
.crow dd { font-size: var(--t-base); font-weight: 500; letter-spacing: -0.014em; }
.crow dd a { color: var(--accent); text-decoration: none; }
.crow dd a:hover { text-decoration: underline; }

.note { font-size: var(--t-sm); color: var(--fg-faint); line-height: 1.5; max-width: 52ch; }

/* -------------------------------------------------------------- 14. FOOTER */
.ftr { border-top: 1px solid var(--line); padding-block: var(--sp-5) var(--sp-3); }
.ftr__grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-4) var(--sp-3); }
.ftr__lead { grid-column: 1 / 6; }
.ftr__cols { grid-column: 7 / 13; display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-3); }
.ftr__col h3 { font-size: var(--t-sm); font-weight: 600; color: var(--fg-faint); margin-bottom: 0.7rem; letter-spacing: 0; }
.ftr__col a { display: block; padding-block: 0.3rem; text-decoration: none; color: var(--fg-muted); font-size: var(--t-sm); transition: color .2s var(--ease); }
.ftr__col a:hover { color: var(--accent); }
.ftr__base { display: flex; flex-wrap: wrap; gap: 0.5rem var(--sp-3); justify-content: space-between; align-items: center; margin-top: var(--sp-5); padding-top: var(--sp-2); border-top: 1px solid var(--line); font-size: var(--t-xs); color: var(--fg-faint); }
.ftr__base a { text-decoration: none; }
.ftr__base a:hover { color: var(--accent); }


/* --------------------------------------------- 16. ESTADOS DE ANIMACIÓN */
.js [data-anim] { transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js [data-anim="up"]   { opacity: 0; transform: translateY(22px); }
.js [data-anim="fade"] { opacity: 0; }
.js [data-anim].in     { opacity: 1; transform: none; }
.js [data-stagger] > .st { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-stagger].in > .st { opacity: 1; transform: none; }

.progress { position: fixed; top: 0; left: 0; height: 2px; width: 100%; background: var(--accent); z-index: 120;
            transform: scaleX(0); transform-origin: 0 50%; will-change: transform; }

body.is-locked { position: fixed; left: 0; right: 0; width: 100%; overflow: hidden; }

.skip { position: absolute; left: -9999px; top: 0; z-index: 300; background: var(--accent); color: var(--on-accent); padding: 0.7rem 1.1rem; border-radius: 0 0 var(--r-xs) 0; }
.skip:focus { left: 0; top: 0; }
.vh { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ------------------------------------------------------- 17. RESPONSIVE */
@media (max-width: 1000px) {
  .c1-5, .c1-6, .c1-7, .c1-8, .c2-8 { grid-column: 1 / 8; }
  .c4-13, .c5-13, .c6-13, .c7-13, .c8-13, .c9-13 { grid-column: 8 / 13; }
  .hero__text { grid-column: 1 / 8; }
  .hero__media { grid-column: 9 / 13; }
  .nav__list { grid-column: 1 / 8; }
  .nav__aside { grid-column: 8 / 13; }
  .ftr__lead { grid-column: 1 / 13; }
  .ftr__cols { grid-column: 1 / 13; }
  .event__media { grid-column: 1 / 5; }
  .event__body { grid-column: 5 / 13; }
}

@media (max-width: 720px) {
  :root { --hdr-h: 3.75rem; }
  .grid { gap: var(--sp-3) var(--sp-2); }
  .c1-5, .c1-6, .c1-7, .c1-8, .c2-8,
  .c4-13, .c5-13, .c6-13, .c7-13, .c8-13, .c9-13 { grid-column: 1 / 13; }
  .hero__text, .hero__media { grid-column: 1 / 13; }
  .hero__media { max-width: 200px; }
  .nav__list, .nav__aside { grid-column: 1 / 13; }
  .event__media { grid-column: 1 / 6; }
  .event__body { grid-column: 1 / 13; }
  .ftr__cols { grid-template-columns: 1fr 1fr; }
  .crow { grid-template-columns: 1fr; gap: 0.2rem; }
  .toc { display: none; }
  .cart span { display: none; }
  .cart { padding-inline: 0.7rem; }
  .shelf { grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr)); }
}

/* --------------------------------- 18. MOVIMIENTO REDUCIDO / IMPRESIÓN */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .js [data-anim], .js [data-stagger] > * { opacity: 1 !important; transform: none !important; }
}

@media print {
  .hdr, .nav, .progress { display: none !important; }
  body { background: #fff; color: #000; }
  a::after { content: " (" attr(href) ")"; font-size: 0.8em; color: #555; }
}


/* ------------------------------- 19. MARCA CON REFERENCIA AL LIBRO */
.brand__cover {
  width: 1.55rem; height: auto; flex: none;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  align-self: center;
}
.brand__txt { display: block; }
.brand__tag { font-size: 0.72rem; color: var(--fg-faint); font-weight: 400; letter-spacing: 0; }

/* --------------------- 20. SOBRE EL LIBRO: LECTURA LIGADA AL SCROLL */
.sticky-col { position: sticky; top: calc(var(--hdr-h) + 2.5rem); align-self: start; }

/* Barra de avance de la sección: crece con el scroll */
.track { position: relative; width: 2px; height: 6.5rem; background: var(--line); border-radius: 2px; margin-top: var(--sp-3); }
.track::after {
  content: ""; position: absolute; inset: 0 0 auto 0;
  height: 100%; background: var(--accent); border-radius: 2px;
  transform: scaleY(var(--p, 0)); transform-origin: 0 0;
}

/* Cada párrafo se ilumina conforme entra: --p lo calcula el JS */
.read p {
  color: var(--fg-muted);
  opacity: calc(0.3 + 0.7 * var(--p, 1));
  transform: translateY(calc((1 - var(--p, 1)) * 14px));
  transition: opacity .12s linear, transform .12s linear;
}
.read p + p { margin-top: 1.1em; }
.read strong { color: var(--fg); font-weight: 600; }

/* Cifras de apoyo */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-2); margin-top: var(--sp-4); }
.fact {
  padding: 1.1rem 1.2rem; border-radius: var(--r); background: var(--bg-alt);
  text-decoration: none; color: inherit; display: block;
  transition: background-color .25s var(--ease);
}
[data-theme="dark"] .fact { background: #131315; }
[data-theme="dark"] .fact:hover { background: #1C1C1E; }
[data-theme="light"] .fact:hover { background: #ECECEF; }
.fact:hover b { color: var(--accent); }
.fact b { transition: color .25s var(--ease); }
.fact b { display: block; font-size: var(--t-xl); font-weight: 620; letter-spacing: -0.03em; line-height: 1; }
.fact span { display: block; margin-top: 0.35rem; font-size: var(--t-sm); color: var(--fg-faint); }

/* ------------------------------ 21. AJUSTES POR DISPOSITIVO */
/* Pantallas muy anchas */
@media (min-width: 1600px) { :root { --maxw: 1280px; } }

/* Tablet en horizontal */
@media (max-width: 1000px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .sticky-col { position: static; }
  .track { display: none; }
}

/* Tablet en vertical y móvil grande */
@media (max-width: 720px) {
  .brand__tag { display: none; }
  .hero__scene { margin-top: var(--sp-3); }
  .scene { max-height: 38vh; border-radius: var(--r); }
  .facts { grid-template-columns: 1fr; }
  .filters { gap: 0.4rem; }
  .search { flex: 1 1 100%; order: 3; }
}

/* Móvil pequeño (iPhone SE y similares) */
@media (max-width: 400px) {
  :root { --gutter: 1rem; }
  .brand { font-size: 0.9rem; }
  .brand__cover { width: 1.3rem; }
  .shelf { grid-template-columns: repeat(2, 1fr); gap: var(--sp-3) 0.9rem; }
  .btn { padding: 0.75rem 1.2rem; font-size: var(--t-sm); }
  .hero__actions { gap: 0.5rem; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* Pantalla apaisada muy baja (móvil girado) */
@media (max-height: 480px) and (orientation: landscape) {
  .scene { max-height: 46vh; }
  .nav__body { padding-block: var(--sp-2); }
  .nav__link { font-size: var(--t-lg); padding-block: 0.4rem; }
}

/* Muescas y bordes redondeados del dispositivo */
@supports (padding: max(0px)) {
  .shell, .hdr { padding-left: max(var(--gutter), env(safe-area-inset-left));
                 padding-right: max(var(--gutter), env(safe-area-inset-right)); }
}

/* Pulsación en táctil: sin resaltados azules del sistema */
@media (hover: none) {
  a, button { -webkit-tap-highlight-color: transparent; }
  .row:active, .chip:active, .btn:active { opacity: .7; }
}


/* ================== 22. BLOQUES MARCADOS Y AJUSTES DEL HERO ============== */

/* Todos los contenedores llevan borde: se distinguen sin depender del fondo */
.row, .ref, .fact, .crow, .essay li, .frame, .embed {
  background: var(--bg-block);
  border: 1px solid var(--line);
}
[data-theme="dark"] .row, [data-theme="dark"] .ref, [data-theme="dark"] .fact,
[data-theme="dark"] .crow, [data-theme="dark"] .essay li { background: var(--bg-block); }
[data-theme="light"] .row:hover, [data-theme="light"] .fact:hover { background: #F7F7FA; }
[data-theme="dark"]  .row:hover, [data-theme="dark"]  .fact:hover { background: #202024; }
.row:hover, .fact:hover { border-color: var(--line-strong); }
.frame { border-radius: var(--r); }

/* Separación explícita entre bloques de contenido */
.rows { gap: 0.6rem; }
.refs { gap: 0.6rem; }

/* Cabecera de sección con línea de cierre */
.head { padding-bottom: 0; }
.band .head + * { margin-top: var(--sp-3); }

/* --------------------------- Marca --------------------------- */
.brand__mark { width: 1.7rem; height: 1.7rem; flex: none; align-self: center; color: var(--fg); }
.brand:hover .brand__mark { color: var(--accent); }
.brand__mark { transition: color .25s var(--ease); }

/* --------------------------- Título --------------------------- */
.display { display: grid; gap: 0.05em; }
.display__a { display: block; font-size: 1em; font-weight: 660; letter-spacing: -0.045em; }
.display__b { display: block; font-size: 0.62em; font-weight: 500; letter-spacing: -0.03em; color: var(--fg-muted); }
.display__b em { font-style: italic; font-weight: 400; color: var(--fg-faint); }

/* ------------------- Escena, a la derecha del título ------------------- */
.hero__grid { align-items: center; }
.hero__text  { grid-column: 1 / 7; }
.hero__scene { grid-column: 7 / 13; margin-top: 0; }
.scene {
  width: 100%;
  aspect-ratio: 1;
  max-height: min(64vh, 520px);
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: var(--bg-alt);
}
.scene__cap { margin-top: 0.7rem; font-size: var(--t-sm); color: var(--fg-faint); text-align: center; }

@media (max-width: 1000px) {
  .hero__text  { grid-column: 1 / 7; }
  .hero__scene { grid-column: 7 / 13; }
}
@media (max-width: 720px) {
  .hero__text  { grid-column: 1 / 13; }
  .hero__scene { grid-column: 1 / 13; margin-top: var(--sp-3); }
  .scene { max-width: 340px; max-height: 62vh; }
  .brand__mark { width: 1.5rem; height: 1.5rem; }
}


/* ============= 23. FICHA DEL LIBRO, EVENTOS Y ESCENA DEL HERO ============ */

/* La portada deja de flotar suelta: va dentro de una ficha con sus datos */
.bookcard {
  display: grid; gap: var(--sp-3);
  padding: clamp(1.4rem, 3vw, 2.2rem);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  background: var(--bg-alt);
}
.bookcard__cover { display: grid; place-items: center; padding: clamp(1rem, 3vw, 2rem);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); }
.bookcard__cover img { width: 100%; max-width: 220px; border-radius: var(--r-xs);
  box-shadow: 0 14px 34px -14px rgba(0,0,0,.55); }
.bookcard__meta { display: grid; gap: 0.55rem; }
.bookcard__meta div { display: grid; grid-template-columns: 6.5rem minmax(0,1fr); gap: 0.75rem;
  align-items: baseline; padding-bottom: 0.55rem; border-bottom: 1px solid var(--line); }
.bookcard__meta div:last-child { border-bottom: 0; padding-bottom: 0; }
.bookcard__meta dt { font-size: var(--t-sm); color: var(--fg-faint); }
.bookcard__meta dd { font-size: var(--t-base); font-weight: 500; }
.bookcard .btn { width: 100%; }

/* Bloque de cierre con una figura al lado, para que no quede un texto huérfano */
.closing { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--sp-4) var(--sp-3);
  align-items: center; }
.closing__text { grid-column: 1 / 7; }
.closing__media { grid-column: 8 / 13; }

/* La escena, con más presencia y su leyenda */
.hero__scene { display: grid; gap: 0.9rem; }
.scene__legend { display: flex; flex-wrap: wrap; gap: 0.5rem 1.1rem; justify-content: center;
  font-size: var(--t-sm); color: var(--fg-faint); }
.scene__legend b { color: var(--fg); font-weight: 600; }
.scene__legend i { font-style: normal; color: var(--accent); font-weight: 600; }

@media (max-width: 1000px) {
  .closing__text { grid-column: 1 / 8; }
  .closing__media { grid-column: 8 / 13; }
}
@media (max-width: 720px) {
  .closing__text, .closing__media { grid-column: 1 / 13; }
  .closing__media { max-width: 260px; }
  .toc { gap: 0.3rem; padding: 0.55rem 0; overflow-x: auto; flex-wrap: nowrap;
         scrollbar-width: none; }
  .toc::-webkit-scrollbar { display: none; }
  .bookcard__meta div { grid-template-columns: 1fr; gap: 0.15rem; }
}

/* ================== 24. CARRUSEL DE RESEÑAS ============================= */
.carousel { position: relative; }
.carousel__track {
  display: flex; gap: var(--sp-3);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 0;
  padding-bottom: 0.5rem;
  scrollbar-width: none; -ms-overflow-style: none;
  cursor: grab;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel.is-dragging .carousel__track { cursor: grabbing; scroll-snap-type: none; scroll-behavior: auto; }

.rev {
  flex: 0 0 min(100%, 30rem);
  scroll-snap-align: start;
  display: grid; grid-template-rows: 1fr auto auto; gap: var(--sp-3);
  user-select: none;
}
.rev__text { font-size: var(--t-lg); line-height: 1.45; letter-spacing: -0.02em; color: var(--fg); text-wrap: pretty; }
.rev__cite { font-size: var(--t-base); line-height: 1.55; color: var(--fg-muted); }
.rev__cite em { font-style: italic; }
.rev__by { display: flex; align-items: center; gap: 0.85rem; }
.rev__avatar { width: 2.75rem; height: 2.75rem; flex: none; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: var(--bg-alt); border: 1px solid var(--line); }
.rev__avatar img { width: 100%; height: 100%; object-fit: cover; }
.rev__ini { font-size: var(--t-sm); font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.rev__by b { display: block; font-weight: 600; font-size: var(--t-base); }
.rev__by small { display: block; color: var(--fg-faint); font-size: var(--t-sm); }

.carousel__ui { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2); margin-top: var(--sp-3); }
.carousel__dots { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.carousel__dots button {
  width: 2rem; height: 4px; border-radius: 2px; padding: 0;
  background: var(--line-strong); transition: background-color .3s var(--ease), width .3s var(--ease);
}
.carousel__dots button[aria-selected="true"] { background: var(--c-btn); width: 3rem; }
.carousel__nav { display: flex; gap: 0.4rem; }
.carousel__btn {
  width: 2.5rem; height: 2.5rem; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong); color: var(--fg);
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), opacity .25s;
}
.carousel__btn:hover { background: var(--c-btn); border-color: var(--c-btn); color: #fff; }
.carousel__btn[disabled] { opacity: .35; pointer-events: none; }
.carousel__btn svg { width: 1.05rem; height: 1.05rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ================== 25. TÍTULO, EVENTOS Y VÍDEO ========================= */

/* «Mediocres» siempre en el magenta del libro, en los dos temas */
.display__a { color: var(--c-btn); }
[data-theme="dark"] .display__a { color: var(--c-magenta-hi); }

/* Icono grande cuando un evento no tiene imagen propia */
.event__icon {
  display: grid; place-items: center;
  aspect-ratio: 1; border-radius: var(--r);
  background: var(--bg-alt); border: 1px solid var(--line);
  color: var(--accent);
}
.event__icon svg { width: 42%; height: 42%; }
.event__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.event__place {
  font-size: var(--t-xs); font-weight: 600; color: var(--fg-faint);
  border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem;
}
.event__sub { margin-top: 0.5rem; font-size: var(--t-base); color: var(--fg-muted); max-width: 52ch; }
.embed--video iframe { height: auto; aspect-ratio: 16 / 9; }

/* ================== 26. APARICIONES AL SCROLLEAR (ENSAYO) =============== */
.js .essay > h2, .js .essay > h3, .js .essay > p, .js .essay > ul > li {
  opacity: 0; transform: translateY(16px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.js .essay > h2.in, .js .essay > h3.in, .js .essay > p.in, .js .essay > ul > li.in {
  opacity: 1; transform: none;
}
/* Marca lateral que avanza con la lectura */
.essay > h2 { position: relative; }
.essay > h2::before {
  content: ""; position: absolute; left: -1.4rem; top: 0.15em; bottom: 0.15em;
  width: 3px; border-radius: 2px; background: var(--c-btn);
  transform: scaleY(0); transform-origin: top; transition: transform .6s var(--ease) .1s;
}
.js .essay > h2.in::before { transform: scaleY(1); }

@media (max-width: 720px) {
  .essay > h2::before { left: -0.8rem; }
  .rev { flex-basis: min(100%, 22rem); }
  .carousel__ui { flex-direction: column-reverse; align-items: stretch; gap: 0.9rem; }
  .carousel__nav { justify-content: center; }
  .carousel__dots { justify-content: center; }
}

/* ================== 27. FORMULARIO: TRAMPA Y AVISOS ===================== */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.note--ok    { color: var(--fg); border-left: 3px solid #2FA36B; padding-left: 0.9rem; }
.note--error { color: var(--fg); border-left: 3px solid var(--c-btn); padding-left: 0.9rem; }
.note--aviso { color: var(--fg-muted); border-left: 3px solid var(--line-strong); padding-left: 0.9rem; }

/* ================== 28. LATIGAZO, CARTELES Y RETOQUES ================== */

/* Botón que activa el latigazo en la escena */
.scene__foot { display: grid; gap: 0.9rem; justify-items: center; margin-top: 0.9rem; }
.whip {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 1.2rem; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--bg-alt);
  font-size: var(--t-sm); font-weight: 600; letter-spacing: -0.01em; color: var(--fg);
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.whip svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.whip:hover { border-color: var(--c-btn); color: var(--c-btn); }
[data-theme="dark"] .whip:hover { color: var(--c-magenta-hi); border-color: var(--c-magenta-hi); }
.whip.is-hit { background: var(--c-btn); border-color: var(--c-btn); color: #fff; }
.whip.is-hit svg { animation: chasquido .45s var(--ease); }
@keyframes chasquido { 0% { transform: rotate(0) } 35% { transform: rotate(-22deg) scale(1.15) } 100% { transform: none } }

/* Los carteles de evento se ven enteros, con su proporción */
.frame--cartel { aspect-ratio: auto; padding: clamp(0.6rem, 1.6vw, 1.1rem); align-self: start; }
.frame--cartel img { width: 100%; height: auto; object-fit: contain; }
.event__ciclo { margin-top: 0.35rem; font-size: var(--t-sm); color: var(--fg-faint); }

/* La foto de quien firma la reseña, un poco mayor: se reconoce mejor */
.rev__avatar { width: 3.1rem; height: 3.1rem; }

@media (max-width: 720px) {
  .scene__foot { margin-top: 0.7rem; }
  .whip { width: 100%; justify-content: center; }
}

/* Cartel muy apaisado: ocupa el ancho completo de la ficha del evento */
.event__banner { grid-column: 1 / 13; padding: 0; border: 0; background: none; }
.event__banner img { border-radius: var(--r); border: 1px solid var(--line); }
.event__body--full { grid-column: 1 / 13; }

/* ================== 29. VÍDEO ENLAZADO Y ENVÍO DEL FORMULARIO =========== */

/* El canal no permite incrustar: en vez de un reproductor roto, un acceso claro */
.videolink {
  display: flex; align-items: center; gap: 1rem;
  margin-top: var(--sp-3); padding: 1.1rem 1.3rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-block); text-decoration: none;
  transition: background-color .25s var(--ease), border-color .25s var(--ease);
}
.videolink:hover { border-color: var(--c-btn); }
[data-theme="dark"] .videolink:hover { background: #202024; }
[data-theme="light"] .videolink:hover { background: #F7F7FA; }
.videolink__play {
  display: grid; place-items: center; flex: none;
  width: 3rem; height: 2.2rem; border-radius: 8px;
  background: #FF0033; color: #fff;
}
.videolink__play svg { width: 1.6rem; height: 1.6rem; }
.videolink__txt { flex: 1 1 auto; min-width: 0; }
.videolink__txt b { display: block; font-weight: 600; font-size: var(--t-base); letter-spacing: -0.015em; }
.videolink__txt small { display: block; color: var(--fg-faint); font-size: var(--t-sm); margin-top: 0.15rem; }
.videolink__go { flex: none; color: var(--accent); }
.videolink__go svg { width: 1rem; height: 1rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .3s var(--ease); }
.videolink:hover .videolink__go svg { transform: translate(2px, -2px); }

/* Panel con las distintas formas de enviar el mensaje */
.salida {
  display: grid; gap: 0.9rem;
  padding: clamp(1.1rem, 2.6vw, 1.6rem);
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-alt);
}
.salida__ok { font-weight: 600; font-size: var(--t-base); }
.salida__vias { display: flex; flex-wrap: wrap; gap: 0.55rem; }
.salida__vias .btn { padding: 0.65rem 1.1rem; font-size: var(--t-sm); }
.salida__texto {
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 0.8rem; line-height: 1.55; white-space: pre-wrap; word-break: break-word;
  max-height: 15rem; overflow: auto;
  padding: 0.9rem 1rem; border-radius: var(--r-sm);
  background: var(--bg); border: 1px solid var(--line); color: var(--fg-muted);
}

@media (max-width: 720px) {
  .salida__vias .btn { flex: 1 1 100%; justify-content: center; }
  .videolink { flex-wrap: wrap; }
}

/* ================== 30. FORMULARIO: ANONIMATO Y AVISOS ================== */

/* Casilla de envío anónimo */
.check {
  display: flex; align-items: flex-start; gap: 0.85rem;
  padding: 1rem 1.2rem; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--bg-alt);
  cursor: pointer;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.check:hover { border-color: var(--line-strong); }
.check:has(input:checked) { border-color: var(--c-btn); }
[data-theme="dark"] .check:has(input:checked) { background: #1A1013; }
[data-theme="light"] .check:has(input:checked) { background: #FDF2F5; }
.check input {
  appearance: none; -webkit-appearance: none;
  width: 1.35rem; height: 1.35rem; flex: none; margin-top: 0.15rem;
  border: 2px solid var(--line-strong); border-radius: 6px;
  background: var(--bg); cursor: pointer;
  transition: background-color .2s var(--ease), border-color .2s var(--ease);
}
.check input:checked {
  background: var(--c-btn) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.4l3 3 6-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/78% no-repeat;
  border-color: var(--c-btn);
}
.check input:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.check b { display: block; font-weight: 600; font-size: var(--t-base); letter-spacing: -0.012em; }
.check small { display: block; margin-top: 0.25rem; font-size: var(--t-sm); color: var(--fg-muted); line-height: 1.5; }

/* Marca de campo opcional */
.opt { color: var(--fg-faint); font-weight: 400; }

/* Trampa antirrobots: invisible pero accesible para el navegador */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Avisos del formulario */
.note--ok    { color: var(--fg); border-left: 3px solid #2FA36B; padding-left: 0.9rem; }
.note--error { color: var(--fg); border-left: 3px solid var(--c-btn); padding-left: 0.9rem; }
.note--aviso { color: var(--fg-muted); border-left: 3px solid var(--line-strong); padding-left: 0.9rem; }

/* ================== 31. CRÉDITO DE LA AGENCIA ========================== */
.credito {
  display: flex; align-items: center; gap: 0.9rem;
  margin-top: var(--sp-4);
  padding: 1rem 1.3rem;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--bg-alt); text-decoration: none;
  width: fit-content; max-width: 100%;
  transition: border-color .25s var(--ease), background-color .25s var(--ease);
}
.credito:hover { border-color: var(--line-strong); }
[data-theme="dark"]  .credito:hover { background: #171719; }
[data-theme="light"] .credito:hover { background: #F7F7FA; }

.credito__iso { width: 2.4rem; height: 2.4rem; flex: none; object-fit: contain; }
.credito__txt { display: grid; gap: .05rem; min-width: 0 }
.credito__txt small { font-size: var(--t-xs); color: var(--fg-faint); letter-spacing: .01em }
.credito__txt b { font-size: var(--t-base); font-weight: 650; letter-spacing: -.02em; line-height: 1.15 }
.credito__txt em { font-style: normal; font-size: var(--t-xs); color: var(--fg-faint);
                   letter-spacing: .06em; text-transform: uppercase }
.credito__go { flex: none; color: var(--accent); display: grid; place-items: center }
.credito__go svg { width: .95rem; height: .95rem; fill: none; stroke: currentColor;
                   stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
                   transition: transform .3s var(--ease) }
.credito:hover .credito__go svg { transform: translate(2px, -2px) }

@media (max-width: 720px) {
  .credito { width: 100%; }
}
