@font-face { font-family: 'DM Sans'; font-weight: 400; font-display: swap; src: url('/assets/fonts/dm-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 500; font-display: swap; src: url('/assets/fonts/dm-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'DM Sans'; font-weight: 700; font-display: swap; src: url('/assets/fonts/dm-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Boli'; font-weight: 700; font-display: swap; src: url('/assets/fonts/caveat-latin-700-normal.woff2') format('woff2'); }

:root {
  --papel: #FAF8F4;
  --paso: #F0ECE4;
  --tinta: #151413;
  --suave: #5F5A54;
  --rojo: #E80848;
  --rojo-oscuro: #C90640;
  --blanco: #FFFFFF;
  --margen: clamp(16px, 2.8vw, 40px);
  --radio: 8px;
  --seccion: clamp(96px, 12vw, 200px);
  --curva: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
html.quiz-abierto { overflow: hidden; }
body { margin: 0; background: var(--papel); color: var(--tinta); font: 400 18px/1.5 'DM Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: clip; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, figure { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; text-underline-offset: 3px; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--rojo); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--rojo); color: var(--blanco); }
figcaption { margin-top: 10px; font-size: 15px; color: var(--suave); }
.oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Escala */
.titulo-2 { font-size: clamp(40px, 5.6vw, 88px); line-height: 1.02; font-weight: 700; letter-spacing: -.04em; }
.titulo-3 { font-size: clamp(26px, 2.6vw, 40px); line-height: 1.12; font-weight: 700; letter-spacing: -.025em; }
.nota-peque { font-size: 15px; color: var(--suave); }

/* El boli: lo único escrito a mano de la página */
.boli { position: relative; display: inline-block; font-family: 'Boli', cursive; font-weight: 700; color: var(--rojo); font-size: 1.22em; line-height: .7; letter-spacing: 0; }
.circulo { position: absolute; left: -.17em; top: -.09em; width: calc(100% + .38em); height: .9em; overflow: visible; pointer-events: none; }
.circulo path { fill: none; stroke: var(--rojo); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 0; }

/* Botones */
.boton { display: inline-flex; align-items: center; justify-content: center; min-height: 60px; padding: 0 32px; border: 0; border-radius: var(--radio); background: var(--rojo); color: var(--blanco); font-size: 19px; font-weight: 700; text-decoration: none; white-space: nowrap; transition: background-color .2s, transform .2s var(--curva); }
.boton:hover { background: var(--rojo-oscuro); transform: translateY(-2px); }
.boton:active { transform: translateY(0) scale(.98); }
.boton-peque { min-height: 44px; padding: 0 20px; font-size: 16px; }
.boton-blanco { background: var(--blanco); color: var(--rojo-oscuro); }
.boton-blanco:hover { background: var(--paso); }
.boton-claro { background: transparent; color: var(--tinta); outline: 2px solid var(--tinta); outline-offset: -2px; }
.boton-claro:hover { background: var(--tinta); color: var(--blanco); }

/* Glass: cabecera y paneles del quiz */
.glass { background: rgba(250, 248, 244, .62); -webkit-backdrop-filter: blur(20px) saturate(1.5); backdrop-filter: blur(20px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .55); box-shadow: 0 18px 50px rgba(21, 20, 19, .08); /* taste-skill-ignore: glass pedido por el cliente */ }

/* Cabecera */
.cabecera { background: rgba(250, 248, 244, .84); position: fixed; z-index: 20; top: 12px; left: var(--margen); right: var(--margen); display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 8px 8px 8px 16px; border-radius: 14px; }
.cabecera-logo img { width: 84px; }
.cabecera-nav { display: flex; gap: 32px; font-size: 16px; font-weight: 500; }
.cabecera-nav a { text-decoration: none; transition: color .2s; }
.cabecera-nav a:hover { color: var(--rojo-oscuro); }

/* Hero */
.hero { position: relative; display: flex; flex-direction: column; height: min(max(100svh, 720px), 74vw); padding: clamp(96px, 12svh, 124px) var(--margen) 0; background: var(--paso); overflow: hidden; }
.hero-titulo { font-size: min(13vw, 25svh); line-height: 1; font-weight: 700; letter-spacing: -.045em; }
.linea { display: block; white-space: nowrap; }
.hero-titulo .boli-b { margin: 0 .1em 0 .13em; }
.hero-pie { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; margin-top: clamp(20px, 3svh, 36px); }
.hero-sub { max-width: 40em; font-size: clamp(18px, 1.55vw, 22px); line-height: 1.4; }
.hero-accion { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; flex: none; }
.hero-paginas { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: clamp(10px, 1.6vw, 24px); margin-top: clamp(24px, 4svh, 44px); will-change: transform; }
.hero-paginas img { width: 100%; }

/* Intro */
.intro { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: var(--seccion) 0 0 var(--margen); }
.intro-titulo { grid-column: 1 / 11; grid-row: 1; position: relative; z-index: 2; }
.intro-grande { grid-column: 7 / 13; grid-row: 1 / 4; margin-top: clamp(50px, 5.4vw, 86px); aspect-ratio: 5 / 6; overflow: hidden; }
.intro-grande img { width: 100%; height: 100%; object-fit: cover; object-position: 48% 50%; }
.intro-texto { grid-column: 1 / 6; grid-row: 2; margin-top: clamp(40px, 5vw, 80px); }
.entrada { font-size: clamp(22px, 2.1vw, 30px); line-height: 1.2; font-weight: 500; letter-spacing: -.015em; }
.sintomas { margin: 28px 0; }
.sintomas li { position: relative; padding: 0 0 16px 32px; }
.sintomas li::before { content: '—'; position: absolute; left: 0; color: var(--rojo); font-weight: 700; }
.intro-peque { grid-column: 1 / 5; grid-row: 3; margin-top: 48px; align-self: end; }

/* Escaparate */
.escaparate { margin-top: var(--seccion); padding: var(--seccion) var(--margen); background: var(--tinta); color: var(--papel); }
.escribe { margin-top: 20px; }
.escribe-input { display: block; width: 100%; padding: .08em 0; border: 0; border-radius: var(--radio); background: transparent; color: var(--papel); font: 700 clamp(40px, 8vw, 132px)/1.1 'DM Sans', sans-serif; letter-spacing: -.04em; caret-color: var(--rojo); transition: background-color .2s; }
.escribe-input:hover { background: rgba(250, 248, 244, .05); }
.escribe-input:focus { outline: none; background: rgba(250, 248, 244, .08); }
.escribe-ejemplos { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.escribe-ejemplos button { min-height: 44px; padding: 0 16px; border: 0; border-radius: var(--radio); background: rgba(250, 248, 244, .12); color: var(--papel); font-size: 16px; transition: background-color .2s, color .2s; }
.escribe-ejemplos button:hover { background: var(--papel); color: var(--tinta); }

.escaparate-rejilla { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 64px); align-items: center; margin-top: clamp(48px, 5vw, 80px); }
.portada { display: flex; flex-direction: column; aspect-ratio: 1 / 1.414; background: var(--papel); color: var(--tinta); container-type: inline-size; }
.portada-cuerpo { flex: 1; padding: 7cqw 8cqw; display: flex; flex-direction: column; }
.portada-logo { width: 22cqw; }
.portada-titulo { margin-top: 12cqw; font-size: 12.5cqw; line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.portada-clinica { margin-top: 3cqw; font-size: 4.4cqw; font-weight: 500; overflow-wrap: anywhere; line-height: 1.2; }
.portada-nota { display: flex; align-items: center; gap: 15cqw; margin-top: auto; margin-bottom: auto; padding-left: 12cqw; font-size: 3.2cqw; line-height: 1.35; color: var(--suave); }
.portada-nota strong { color: var(--tinta); }
.portada-interrogante { font-size: 22cqw; line-height: 1; }
.portada-interrogante .circulo { height: 1em; top: 0; left: -.5em; width: calc(100% + 1em); }
.portada-banda { padding: 5cqw 8cqw; background: var(--rojo); color: var(--blanco); font-size: 3.9cqw; font-weight: 700; }

.mockups { position: relative; padding-bottom: 8%; }
.portatil { width: 92%; }
.portatil-pantalla { padding: 10px 10px 0; border-radius: 14px 14px 0 0; background: #36322F; }
.portatil-pantalla img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-radius: 4px 4px 0 0; }
.portatil-base { height: 16px; margin: 0 -3.5%; border-radius: 0 0 12px 12px; background: #514C48; }
.movil { position: absolute; right: 0; bottom: 0; width: 25%; padding: 7px; border-radius: 26px; background: #36322F; }
.movil-pantalla { overflow: hidden; border-radius: 19px; }
.movil-pantalla img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }

.recibes { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 64px); margin-top: clamp(64px, 7vw, 112px); }
.recibes ul { display: grid; grid-template-columns: 1fr 1fr; gap: 32px clamp(24px, 4vw, 64px); }
.recibes strong { display: block; margin-bottom: 4px; font-size: 22px; }

/* Cómo funciona */
.como { padding: var(--seccion) var(--margen) 0; }
.barra { display: flex; gap: 6px; min-height: max(30svh, 300px); margin-top: clamp(40px, 5vw, 72px); }
.tramo { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 20px; border-radius: var(--radio); font-size: 16px; line-height: 1.35; transform-origin: left center; }
.tramo strong { font-size: clamp(22px, 2.1vw, 30px); line-height: 1.1; letter-spacing: -.02em; }
.tramo-a { flex: 17 1 0; background: var(--tinta); color: var(--papel); }
.tramo-b { flex: 13 1 0; background: var(--suave); color: var(--blanco); }
.tramo-c { flex: 13 1 0; background: var(--rojo); color: var(--blanco); }
.tramo-d { flex: 57 1 0; background: var(--paso); }
.tramo-d span { max-width: 44em; font-size: 18px; }
.como-pie { margin-top: 16px; color: var(--suave); font-size: 16px; }

/* Asignaturas */
.asignaturas { padding: var(--seccion) var(--margen) 0; }
.asignaturas > .titulo-2 { padding-left: 3vw; }
.asignaturas-rejilla { display: grid; grid-template-columns: 5fr 1fr 6fr; margin-top: clamp(48px, 6vw, 96px); }
.asignaturas-pagina { grid-column: 1; align-self: start; position: sticky; top: 96px; }
.asignaturas-pagina img { padding: 10px; background: var(--paso); border-radius: var(--radio); }
.asignaturas-tabla { grid-column: 3; }
table { width: 100%; border-collapse: separate; border-spacing: 0 6px; margin-bottom: 32px; }
tbody tr { background: var(--paso); }
tbody th, tbody td { padding: 18px 16px; vertical-align: baseline; text-align: left; font-weight: 400; }
tbody th { padding-left: 20px; font-size: 22px; font-weight: 700; letter-spacing: -.015em; white-space: nowrap; border-radius: var(--radio) 0 0 var(--radio); }
.cuantas { font-size: 16px; color: var(--suave); text-align: right; white-space: nowrap; padding-right: 20px; border-radius: 0 var(--radio) var(--radio) 0; }
.asignaturas-tabla > p + p { margin-top: 16px; }

/* Nosotros */
.nosotros { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: 24px; padding: var(--seccion) var(--margen) 0; }
.nosotros > .titulo-3 { grid-column: 3 / 13; margin-bottom: 24px; }
.nosotros-texto { grid-column: 3 / 13; font-size: clamp(26px, 2.5vw, 36px); line-height: 1.22; letter-spacing: -.015em; }
.capitular { float: left; width: auto; height: 3.66em; aspect-ratio: 1; object-fit: cover; object-position: 72% 50%; margin: .22em .5em 0 0; border-radius: var(--radio); }
.nosotros-cuerpo { grid-column: 3 / 9; margin-top: 28px; }
.nosotros-foto { grid-column: 1 / 9; margin-top: clamp(48px, 6vw, 96px); }
.nosotros-foto-2 { grid-column: 9 / 13; margin-top: clamp(48px, 6vw, 96px); }
.nosotros-foto img, .nosotros-foto-2 img { width: 100%; aspect-ratio: 8 / 5.2; object-fit: cover; object-position: 50% 55%; }
.nosotros-foto-2 img { aspect-ratio: 4 / 5.2; object-position: 40% 50%; }

/* FAQ */
.faq { padding: var(--seccion) var(--margen); }
.faq-fila { display: grid; grid-template-columns: 6fr 1fr 5fr; margin-top: clamp(48px, 5.4vw, 84px); }
.faq-fila h3 { grid-column: 1; font-size: clamp(26px, 2.6vw, 40px); line-height: 1.1; font-weight: 500; letter-spacing: -.025em; }
.faq-fila p { grid-column: 3; }

/* Cierre y pie */
.cierre { position: relative; display: flex; flex-direction: column; min-height: 100svh; padding: clamp(72px, 9vw, 130px) var(--margen) 0; background: var(--rojo); color: var(--blanco); overflow: hidden; }
.cierre-arriba { display: flex; justify-content: space-between; gap: 40px; }
.cierre .boton { margin-top: 36px; }
.cierre-enlaces { font-size: 18px; font-weight: 500; }
.cierre-enlaces li { margin-bottom: 8px; }
.cierre-legal { position: relative; z-index: 1; max-width: 46em; margin-top: 56px; font-size: 15px; }
.cierre-logo { margin: auto 0 -14vw auto; padding-top: 32px; width: min(70vw, 900px); }

.sin-js { padding: 16px var(--margen); background: var(--tinta); color: var(--papel); }

/* ── Quiz ── */
.quiz { position: fixed; z-index: 40; inset: 0; display: flex; flex-direction: column; background: var(--paso); overflow-y: auto; overscroll-behavior: contain; }
.quiz[hidden] { display: none; }
.quiz-fondo { position: fixed; inset: -40px; background: url('/assets/img/bloom-interior.jpg') center / cover; filter: blur(34px) saturate(1.2); opacity: .55; }
.quiz-cabecera { position: relative; z-index: 1; display: flex; align-items: center; gap: clamp(16px, 3vw, 40px); padding: 14px var(--margen); }
.quiz-cabecera img { width: 72px; flex: none; }
.quiz-progreso { flex: 1; height: 8px; border-radius: 8px; background: rgba(21, 20, 19, .12); overflow: hidden; }
.quiz-progreso span { display: block; height: 100%; width: 0; background: var(--rojo); border-radius: 8px; transition: width .4s var(--curva); }
.quiz-salir { flex: none; min-height: 44px; padding: 0 12px; border: 0; background: none; font-size: 16px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.quiz-cuerpo { position: relative; z-index: 1; flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px var(--margen) 32px; }
.quiz-panel { width: min(100%, 820px); padding: clamp(24px, 4vw, 52px); border-radius: 20px; }
.quiz-panel.ancho { width: min(100%, 1100px); }
.paso-entra { animation: pasoEntra .34s var(--curva) both; }
@keyframes pasoEntra { from { opacity: 0; transform: translateY(14px); } }

.q-contador { margin-bottom: 12px; font-size: 15px; font-weight: 500; color: var(--rojo-oscuro); }
.q-titulo { font-size: clamp(25px, 3vw, 40px); line-height: 1.12; font-weight: 700; letter-spacing: -.025em; outline: none; }
.q-ayuda { margin-top: 10px; font-size: 16px; color: var(--suave); }
.q-opciones { display: grid; gap: 8px; margin-top: 24px; }
.q-opcion { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 10px 16px 10px 12px; border: 0; border-radius: var(--radio); background: rgba(255, 255, 255, .62); text-align: left; font-size: 18px; line-height: 1.25; transition: background-color .15s, transform .15s var(--curva), color .15s; }
.q-opcion:hover { background: var(--blanco); transform: translateX(3px); }
.q-opcion kbd { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 6px; background: var(--paso); color: var(--suave); font: 700 15px 'DM Sans', sans-serif; transition: background-color .15s, color .15s; }
.q-opcion[aria-pressed="true"], .q-opcion[aria-checked="true"] { background: var(--tinta); color: var(--blanco); }
.q-opcion[aria-pressed="true"] kbd, .q-opcion[aria-checked="true"] kbd { background: var(--rojo); color: var(--blanco); }
.q-pie { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 24px; min-height: 44px; }
.q-atras { min-height: 44px; padding: 0 4px; border: 0; background: none; font-size: 16px; font-weight: 500; color: var(--suave); }
.q-atras:hover { color: var(--tinta); }
.q-atajo { font-size: 15px; color: var(--suave); }
.q-bloque .boli { display: block; font-size: clamp(56px, 8vw, 104px); line-height: 1; margin-bottom: 12px; }
.q-bloque .q-titulo { font-size: clamp(36px, 5.4vw, 68px); line-height: 1.02; letter-spacing: -.04em; }
.q-bloque .q-ayuda { font-size: clamp(19px, 1.8vw, 24px); color: var(--tinta); }
.q-bloque .boton { margin-top: 28px; }
.q-botones { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

textarea, .campo input { width: 100%; min-height: 54px; padding: 13px 14px; border: 0; border-radius: var(--radio); background: rgba(255, 255, 255, .72); color: var(--tinta); font: 400 18px/1.35 'DM Sans', sans-serif; transition: background-color .15s, outline-color .15s; outline: 1px solid rgba(21, 20, 19, .14); outline-offset: -1px; }
textarea { min-height: 150px; margin-top: 22px; resize: vertical; }
textarea:focus, .campo input:focus { background: var(--blanco); outline: 2px solid var(--tinta); outline-offset: -2px; }
.contador-libre { margin-top: 6px; font-size: 15px; color: var(--suave); text-align: right; }
.q-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 22px; }
.campo { display: grid; gap: 5px; font-size: 16px; font-weight: 500; }
.campo-entero { grid-column: 1 / -1; }
.momentos { grid-column: 1 / -1; margin: 0; padding: 0; border: 0; }
.momentos legend { padding: 0; margin-bottom: 8px; font-size: 16px; font-weight: 500; }
.momentos div { display: flex; flex-wrap: wrap; gap: 6px; }
.momentos label { position: relative; display: block; cursor: pointer; }
.momentos input { position: absolute; opacity: 0; inset: 0; }
.momentos span { display: flex; align-items: center; min-height: 44px; padding: 0 14px; border-radius: var(--radio); background: rgba(255, 255, 255, .72); font-size: 16px; transition: background-color .15s, color .15s; }
.momentos input:checked + span { background: var(--tinta); color: var(--blanco); }
.momentos input:focus-visible + span { outline: 3px solid var(--rojo); outline-offset: 2px; }
.consentimiento { grid-column: 1 / -1; display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.4; cursor: pointer; }
.consentimiento input { flex: none; width: 22px; height: 22px; margin: 0; accent-color: var(--rojo); }
.trampa { position: absolute; left: -9999px; overflow: hidden; }
.q-error { grid-column: 1 / -1; padding: 12px 14px; border-radius: var(--radio); background: #FDEBEF; color: var(--rojo-oscuro); font-size: 16px; font-weight: 500; }

/* Corrigiendo */
.q-corrigiendo { text-align: center; padding-block: clamp(16px, 4vw, 40px); }
.q-corrigiendo .boli { display: block; font-size: clamp(72px, 11vw, 140px); line-height: 1; animation: tachon 1.5s ease-in-out infinite alternate; }
.q-corrigiendo .q-ayuda { font-size: 19px; color: var(--tinta); min-height: 1.5em; }
@keyframes tachon { from { transform: rotate(-5deg) translateX(-10px); } to { transform: rotate(5deg) translateX(10px); } }

/* Resultado */
.r-titular { font-size: clamp(34px, 5.8vw, 76px); line-height: 1.03; font-weight: 700; letter-spacing: -.04em; outline: none; }
.r-titular .linea { white-space: normal; }
.r-perfil { margin-top: 20px; font-size: clamp(20px, 2vw, 26px); font-weight: 700; letter-spacing: -.015em; line-height: 1.2; }
.r-rejilla { display: grid; grid-template-columns: 7fr 5fr; gap: clamp(20px, 3vw, 40px); margin-top: 24px; }
.r-areas { display: grid; gap: 4px; }
.r-area { display: grid; grid-template-columns: 1fr auto 60px; align-items: center; gap: 12px; min-height: 52px; padding: 6px 14px; border-radius: var(--radio); background: rgba(255, 255, 255, .62); }
.r-area.suspenso { background: #FDEBEF; }
.r-area b { font-size: 17px; }
.r-area small { font-size: 15px; color: var(--suave); }
.r-area .boli { font-size: 32px; line-height: 1; text-align: right; }
.r-area:not(.suspenso) .boli { color: var(--tinta); }
.r-lado { display: flex; flex-direction: column; gap: 14px; }
.r-lado .boton { width: 100%; white-space: normal; text-align: center; }
.r-aviso { font-size: 15px; line-height: 1.4; color: var(--suave); }

/* Movimiento: lo que entra al hacer scroll. Sin JS o con movimiento reducido, todo está en su sitio. */
@media (prefers-reduced-motion: no-preference) {
  .js .entra { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--curva), transform .7s var(--curva); transition-delay: var(--retardo, 0ms); }
  .js .entra.dentro { opacity: 1; transform: none; }
  .js .obturador img { clip-path: inset(0 0 0 100%); transform: scale(1.12); transition: clip-path 1.1s cubic-bezier(.7, 0, .2, 1), transform 1.3s var(--curva); }
  .js .obturador.dentro img { clip-path: inset(0); transform: none; }
  .js .tramo { transform: scaleX(.02); opacity: 0; transition: transform .8s var(--curva), opacity .3s; transition-delay: var(--retardo, 0ms); }
  .js .tramo > * { opacity: 0; transition: opacity .5s calc(var(--retardo, 0ms) + 450ms); }
  .js .barra.dentro .tramo { transform: none; opacity: 1; }
  .js .barra.dentro .tramo > * { opacity: 1; }
  .js .hero-titulo .boli-a, .js .hero-titulo .boli-b { clip-path: inset(-40% 100% -40% -40%); animation: escribir .55s .55s steps(9) forwards; }
  .js .hero-titulo .boli-b { clip-path: inset(-100% 100% -100% -100%); animation-name: escribirAmplio; animation-delay: 1.05s; }
  .js .hero-titulo .boli-b .circulo path { stroke-dashoffset: 1; animation: trazar .9s 1.5s cubic-bezier(.6, 0, .3, 1) forwards; }
  .js .hero-titulo .linea { animation: subir .8s var(--curva) both; }
  .js .hero-titulo .linea + .linea { animation-delay: .12s; }
  .js .hero-pie { animation: subir .8s .3s var(--curva) both; }
  .js .hero-paginas img { animation: asomar 1.1s calc(.5s + var(--i, 0) * 90ms) var(--curva) both; }
  .js .portada-interrogante .circulo path { stroke-dashoffset: 1; transition: stroke-dashoffset .9s .3s cubic-bezier(.6, 0, .3, 1); }
  .js .portada.dentro .portada-interrogante .circulo path { stroke-dashoffset: 0; }
  .portada-clinica.cambio { animation: latido .3s var(--curva); }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .paso-entra, .q-corrigiendo .boli { animation: none; }
}
@keyframes escribir { to { clip-path: inset(-40% -40% -40% -40%); } }
@keyframes escribirAmplio { to { clip-path: inset(-100% -100% -100% -100%); } }
@keyframes trazar { to { stroke-dashoffset: 0; } }
@keyframes subir { from { opacity: 0; transform: translateY(30px); } }
@keyframes asomar { from { opacity: 0; transform: translateY(70px); } }
@keyframes latido { 50% { transform: translateY(-2px); color: var(--rojo); } }

/* ── Tablet ── */
@media (max-width: 1000px) {
  .cabecera-nav { display: none; }
  .hero { height: auto; }
  .hero-paginas { flex: none; height: clamp(220px, 40vw, 340px); overflow: hidden; }
  .hero-pie { flex-direction: column; align-items: flex-start; gap: 20px; }
  .hero-paginas { grid-template-columns: repeat(3, 1fr); }
  .hero-paginas img:nth-child(4) { display: none; }
  .escaparate-rejilla { grid-template-columns: 1fr; }
  .portada { width: min(100%, 420px); }
  .recibes { grid-template-columns: 1fr; }
  .barra { flex-direction: column; min-height: 0; }
  .tramo { transform-origin: top center; }
  .tramo-a, .tramo-b, .tramo-c, .tramo-d { flex: none; min-height: 112px; }
  .tramo-a { min-height: 150px; }
  .asignaturas-rejilla { grid-template-columns: 1fr; gap: 32px; }
  .asignaturas-pagina { position: static; grid-row: 2; max-width: 420px; grid-column: 1; }
  .asignaturas-tabla { grid-column: 1; }
  .r-rejilla { grid-template-columns: 1fr; }
  .cierre { min-height: 0; }
  .cierre-logo { margin-top: 48px; }
}

/* ── Móvil ── */
@media (max-width: 640px) {
  body { font-size: 17px; }
  .cabecera { top: 8px; }
  .cabecera-logo img { width: 68px; }
  .hero { padding-top: 92px; }
  .hero-titulo { font-size: 12.4vw; }
  .hero-accion, .hero-accion .boton { width: 100%; }
  .hero-paginas { grid-template-columns: repeat(2, 1fr); margin-top: 28px; }
  .hero-paginas img:nth-child(3) { display: none; }
  .intro { padding-right: 0; }
  .intro-titulo { grid-column: 1 / -1; padding-right: var(--margen); font-size: 10vw; }
  .intro-grande { grid-column: 4 / -1; grid-row: 2; margin-top: 24px; aspect-ratio: 1 / 1.1; }
  .intro-texto { grid-column: 1 / -1; grid-row: 3; padding-right: var(--margen); margin-top: 32px; }
  .intro-peque { grid-column: 1 / 9; grid-row: 4; }
  .escribe-input { font-size: 11vw; }
  .mockups { padding-bottom: 14%; }
  .movil { width: 32%; border-radius: 20px; padding: 5px; }
  .movil-pantalla { border-radius: 15px; }
  .portatil-pantalla { padding: 5px 5px 0; border-radius: 9px 9px 0 0; }
  .portatil-base { height: 9px; }
  .recibes ul { grid-template-columns: 1fr; gap: 22px; }
  .como .titulo-2, .asignaturas > .titulo-2 { font-size: 9vw; padding-left: 0; }
  tbody th, tbody td { display: block; padding: 0 16px; white-space: normal; }
  tbody tr { display: block; position: relative; padding: 14px 0; border-radius: var(--radio); }
  .cuantas { position: absolute; top: 18px; right: 0; padding: 0 16px; }
  tbody td:not(.cuantas) { margin-top: 2px; font-size: 16px; }
  .nosotros > .titulo-3, .nosotros-texto, .nosotros-cuerpo { grid-column: 1 / -1; }
  .nosotros-texto { font-size: 22px; line-height: 1.25; }
  .capitular { height: 110px; margin-top: .2em; }
  .nosotros-foto, .nosotros-foto-2 { grid-column: 1 / -1; }
  .nosotros-foto-2 { margin-top: 24px; }
  .nosotros-foto img, .nosotros-foto-2 img { aspect-ratio: 4 / 3; }
  .faq-fila { display: block; margin-top: 48px; }
  .faq-fila h3 { font-size: 24px; margin-bottom: 12px; }
  .cierre-arriba { flex-direction: column; }
  .cierre .boton { width: 100%; }
  .cierre-enlaces { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 16px; }
  .cierre .titulo-2 { font-size: 11vw; }
  .cierre-logo { width: 96vw; margin: auto -4vw -22vw auto; max-width: none; }
  .q-opcion { min-height: 54px; font-size: 17px; }
  .q-opcion kbd { display: none; }
  .q-opcion { padding-left: 16px; }
  .q-atajo { display: none; }
  .q-form { grid-template-columns: 1fr; }
  .quiz-panel { padding: 22px 18px; border-radius: 16px; }
  .quiz-cuerpo { align-items: flex-start; }
  .r-area { grid-template-columns: 1fr 52px; }
  .r-area small { display: none; }
}
