/* =====================================================================================
   Avilés DDC Fuengirola · Implantes dentales (/implantes-dentales-fuengirola/)
   «De lo que se ve a lo que no se ve»: la página baja como un implante, de la sonrisa al hueso.
   Base blanca con dos escenas negras; cada escena tiene su propia mecánica de scroll.
   ===================================================================================== */

/* ---------- 1 · La sonrisa: una ranura que se abre ---------- */
.ih { position: relative; height: 300vh; }
.ih-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--blanco); }
/* La foto y la copia en negativo del texto comparten el recorte (--t --r --b --l, en px, los pone implantes.js) */
.ih-photo, .ih-ink.is-neg { clip-path: inset(var(--t, 50%) var(--r, 50%) var(--b, 50%) var(--l, 50%)); }
.ih-photo { position: absolute; inset: 0; z-index: 2; margin: 0; background: #2A2B2B; pointer-events: none; will-change: clip-path; }
/* abierta, una sombra arriba para que el menú (en blanco) se lea sobre la piel */
.ih-photo::after { content: ""; position: absolute; inset: 0 0 auto; height: 180px; background: linear-gradient(180deg, rgba(11, 12, 12, .55), rgba(11, 12, 12, 0)); opacity: var(--sh, 0); }
.ih-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 50%; filter: grayscale(1) contrast(1.04); transform: scale(var(--ps, 1)); transform-origin: 70% 41%; }
.ih-ink { position: absolute; inset: 0; z-index: 1; display: grid; grid-template-rows: minmax(0, 1fr) auto; padding: calc(var(--hdr) + 3vh) var(--gut) max(6vh, 80px); }   /* abajo, sitio para el botón de las cookies */
.ih-ink.is-neg { z-index: 3; color: var(--blanco); pointer-events: none; will-change: clip-path; }
.ih-title { align-self: center; font-size: clamp(3.4rem, 1rem + 8.2vw, 11.6rem); }
.ih-title > span { display: block; }
.ih-foot { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px 48px; }
.ih-sub { max-width: 24em; font-size: clamp(1.25rem, 1rem + .6vw, 1.625rem); line-height: 1.35; letter-spacing: -.015em; color: var(--gris-6); }
.ih-act { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.is-neg .ih-sub { color: #E4E8E7; }
.is-neg .ih-title em, .is-neg .dato { color: var(--verde-claro); }   /* sobre la foto, el verde claro */
.is-neg .dot { color: var(--verde-claro); }
.is-neg .pill { background: var(--blanco); color: var(--negro); }
.ih-hint { position: absolute; z-index: 4; right: var(--gut); top: 50%; display: flex; align-items: center; gap: 12px; font-size: .75rem; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--gris-5); opacity: calc(1 - var(--hq, 0) * 6); transform: translateY(-50%); pointer-events: none; }
.ih-hint i { width: 28px; height: 1px; background: currentColor; transform-origin: left; }
@media (prefers-reduced-motion: no-preference) { .ih-hint i { animation: hint 2.4s var(--ease) infinite; } .hint-out .ih-hint i { animation-play-state: paused; } }
/* crece desde la izquierda y se recoge hacia la derecha. Solo con transform (el origen fijo a la izquierda y el
   desplazamiento hace de «origen a la derecha»): animar transform-origin recalculaba estilos en cada fotograma */
@keyframes hint { 0% { transform: translateX(0) scaleX(0); } 45%, 55% { transform: translateX(0) scaleX(1); } 100% { transform: translateX(100%) scaleX(0); } }

/* ---------- Same Day®: la misma foto, un año después ----------
   Texto a la izquierda y, a la derecha, la foto impresa (margen blanco, un poco girada, con sombra) con la fecha en su
   margen. La fecha rueda hacia arriba al bajar (Día 1 → Semana 1 → Mes 3 → Año 1); la foto no cambia. */
.isd { position: relative; height: 280vh; }
.isd-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: clamp(48px, 7vw, 140px); padding: calc(var(--hdr) + 3vh) var(--gut) 5vh; background: var(--blanco); }
.isd-copy { display: grid; justify-items: start; gap: 24px; max-width: 34rem; }
.isd-title { font-size: clamp(3rem, 1rem + 4.6vw, 6.6rem); }
.isd-text { font-size: 1.1875rem; line-height: 1.6; color: var(--gris-6); }
.isd-print { justify-self: end; margin: 0; padding: 14px 14px 0; background: var(--blanco); box-shadow: 0 30px 70px rgba(11, 12, 12, .16), 0 2px 6px rgba(11, 12, 12, .08), 0 0 0 1px rgba(11, 12, 12, .05); transform: rotate(-1.6deg); }
.isd-print img { display: block; height: min(64svh, 640px); width: auto; aspect-ratio: 850 / 1063; object-fit: cover; }
.isd-print figcaption { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 64px; padding: 0 4px; }
/* la fecha: una ventana de una línea; la anterior sube y la siguiente entra desde abajo */
/* (las cuatro en la misma celda de una rejilla: la ventana mide lo que la más larga) */
.isd-stamp { display: grid; height: 1.2em; overflow: hidden; font-size: 1.75rem; line-height: 1.2; font-weight: 500; letter-spacing: -.02em; color: var(--verde-texto); font-variant-numeric: tabular-nums; }
.isd-stamp b { grid-area: 1 / 1; font-weight: inherit; white-space: nowrap; transform: translateY(110%); opacity: 0; transition: transform .55s var(--ease), opacity .55s var(--ease); }
.isd-stamp b.is-past { transform: translateY(-110%); }
.isd-stamp b.is-on { transform: none; opacity: 1; }
.isd-same { font-size: .9375rem; color: var(--gris-5); opacity: 0; transition: opacity .6s var(--ease); }
.isd.is-end .isd-same { opacity: 1; }

/* ---------- 2 · La corona: recorrido horizontal por el laboratorio ---------- */
.il { position: relative; height: 420vh; }
.il-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--blanco); }
.il-track { position: absolute; top: 0; bottom: 0; left: 0; width: max-content; display: flex; align-items: center; gap: clamp(64px, 7vw, 140px); padding: var(--hdr) 34vw 6vh var(--gut); transform: translate3d(var(--tx, 0px), 0, 0); will-change: transform; }
.il-intro { flex: 0 0 auto; width: min(36vw, 640px); display: grid; gap: 28px; }
.il-title { font-size: clamp(3.2rem, 1rem + 6vw, 9rem); }
.il-link { justify-self: start; }
.il-text { max-width: 26em; font-size: 1.25rem; line-height: 1.55; color: var(--gris-6); }
.il-shot { flex: 0 0 auto; display: grid; gap: 22px; }
.il-frame { position: relative; height: min(var(--fh, 66vh), calc(100svh - var(--hdr) - 220px));   /* con su pie, nunca bajo la cabecera */ aspect-ratio: 3 / 4; overflow: hidden; background: #2A2B2B; border-radius: 4px; }
.il-frame img { width: 100%; height: 100%; object-fit: cover; transform: scale(var(--z, 1.12)); }
.il-shot-1 { --fh: 60vh; align-self: flex-start; margin-top: 2vh; }
.il-shot-2 { --fh: 70vh; align-self: flex-end; }
.il-shot-3 { --fh: 64vh; }
.il-shot figcaption { display: grid; grid-template-columns: 2.4em minmax(0, 1fr); gap: 0 14px; max-width: 24em; font-size: 1.0625rem; color: var(--gris-5); line-height: 1.45; }
.il-shot figcaption b { font-weight: 500; font-size: .875rem; color: var(--verde-texto); padding-top: .2em; font-variant-numeric: tabular-nums; }
.il-shot figcaption strong { display: block; margin-bottom: 2px; font-weight: 500; font-size: 1.375rem; letter-spacing: -.02em; color: var(--negro); }
.il-end { flex: 0 0 auto; font-size: clamp(3.2rem, 1rem + 6vw, 9rem); color: var(--negro); }
.il-end .dot { color: var(--verde); }
.il-progress { position: absolute; left: var(--gut); right: var(--gut); bottom: 5vh; height: 1px; background: var(--gris-2); }
.il-progress i { position: absolute; inset: 0; background: var(--verde); transform-origin: left; transform: scaleX(var(--lp, 0)); }

/* ---------- 3 · Dientes fijos el mismo día: calendario de puntos ---------- */
.id { position: relative; height: 320vh; background: var(--negro); color: var(--blanco); }
.id-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto; column-gap: 6vw; padding: calc(var(--hdr) + 4vh) var(--gut) max(5vh, 84px); }   /* abajo, sitio para el botón de las cookies */
.id-head { grid-column: 1 / 3; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 6vw; row-gap: 16px; align-items: end; }
.id-head .label { grid-column: 1 / -1; color: var(--verde-claro); }
.id-title { font-size: clamp(3rem, 1rem + 5.4vw, 8.4rem); }
.id-title em { color: var(--verde-claro); }
.id-text { max-width: 28em; font-size: 1.25rem; line-height: 1.55; color: #D2D7D6; padding-bottom: .6em; }
.id-cal { grid-column: 1 / 3; align-self: center; display: grid; gap: clamp(18px, 3.4vh, 36px); }
.id-when { position: relative; height: 1.4em; font-size: 1.125rem; font-weight: 500; letter-spacing: -.01em; }
.id-when span { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .7s var(--ease); }
.id-when span.is-on { opacity: 1; transform: none; }
.id-row { display: grid; grid-template-columns: 15rem minmax(0, 1fr); align-items: center; gap: 24px; }
.id-row > p { font-size: 1.0625rem; color: var(--gris-3); }
.id-row[data-row="inm"] > p { color: var(--verde-claro); font-weight: 500; }
.id-dots { position: relative; display: grid; grid-template-columns: repeat(60, minmax(0, 1fr)); row-gap: clamp(8px, 1.4vh, 14px); }
.id-dots i { justify-self: center; width: clamp(6px, .55vw, 10px); aspect-ratio: 1; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--gris-8); transition: background .35s, box-shadow .35s, transform .35s var(--ease); }
.id-dots i.is-past { box-shadow: inset 0 0 0 1.5px var(--gris-6); }
.id-dots i.is-fix { background: var(--verde-claro); box-shadow: none; }
.id-dots i.is-def { background: var(--blanco); box-shadow: none; transform: scale(1.25); }
.id-dots i.is-now { transform: scale(1.6); }
.id-key { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-left: calc(15rem + 24px); font-size: .9375rem; color: var(--gris-3); }
.id-key li { display: flex; align-items: center; gap: 10px; }
.id-key li::before { content: ""; width: 9px; height: 9px; border-radius: 50%; }
.id-key .k-fix::before { background: var(--verde-claro); }
.id-key .k-none::before { box-shadow: inset 0 0 0 1.5px var(--gris-6); }
.id-key .k-def::before { background: var(--blanco); }
.id-foot { grid-column: 1 / 3; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px 40px; padding-top: 20px; border-top: 1px solid var(--gris-8); font-size: .9375rem; color: var(--gris-3); }
.id-foot .arrow-link { color: var(--blanco); font-size: 1.0625rem; }

/* ---------- 4 · Colocado al milímetro: el implante encaja en su plan ---------- */
.ip { position: relative; height: 300vh; }
.ip-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; column-gap: clamp(40px, 5vw, 110px); padding: var(--hdr) var(--gut) 0; background: var(--blanco); }
.ip-copy { display: grid; gap: 26px; align-self: center; }
.ip-title { font-size: clamp(3rem, 1rem + 5vw, 7.6rem); }
.ip-text { max-width: 26em; font-size: 1.1875rem; color: var(--gris-6); }
/* (el plan 3D con el implante y la lista de pasos son piezas comunes: interior.css; aquí, solo su sitio y su tamaño) */
.ip-stage { height: min(66vh, 760px); align-self: center; margin-bottom: 6vh; }
.ip-steps { align-self: center; }

/* ---------- 5 · El hueso: la piel se desvanece ---------- */
.ib { position: relative; height: 320vh; background: var(--negro); color: var(--blanco); }
.ib-pin { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; background: var(--negro); }
/* La caja reproduce el encuadre de la foto (cover, punto 70 % 50 %): la radiografía va encajada dentro, en su sitio */
.ib-box { position: absolute; left: var(--bx, 0px); top: var(--by, 0px); width: var(--bw, 100%); height: var(--bh, 100%); transform: scale(var(--bs, 1)); transform-origin: 66% 42%; }
.ib-face { position: absolute; inset: 0; width: 100%; height: 100%; filter: grayscale(1) contrast(1.04); opacity: var(--fo, 1); }
/* Encaje medido: el punto (1325, 530) de la radiografía cae en (1322, 495) de la foto, a escala 0,82 */
.ib-xray { position: absolute; left: 11.775%; top: 5.41%; width: 82%; height: 82%;
  /* bordes fundidos: el negro de la radiografía no es exactamente el de la página, y arriba el hueso acaba en un corte recto */
  -webkit-mask: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%), linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: linear-gradient(180deg, transparent 0, #000 16%, #000 84%, transparent 100%), linear-gradient(90deg, transparent 0, #000 9%, #000 91%, transparent 100%);
  mask-composite: intersect; }
.ib-xray img { position: absolute; inset: 0; width: 100%; height: 100%; }
.ib-bone { opacity: var(--xo, 0); }
.ib-impl { opacity: var(--io, 0); filter: drop-shadow(0 0 calc(var(--io, 0) * 18px) rgba(48, 199, 181, .35)); }
.ib-pin::after { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(11, 12, 12, .55) 0, rgba(11, 12, 12, 0) 180px), linear-gradient(90deg, rgba(11, 12, 12, .72) 0%, rgba(11, 12, 12, .3) 34%, rgba(11, 12, 12, 0) 52%); pointer-events: none; }
.ib-copy { position: absolute; z-index: 2; left: var(--gut); top: 0; bottom: 0; width: min(44vw, 760px); display: grid; align-content: center; gap: 28px; padding-top: var(--hdr); opacity: var(--co, 1); transform: translateY(calc((1 - var(--co, 1)) * 24px)); }
.ib-title { font-size: clamp(3rem, 1rem + 5vw, 7.8rem); }
.ib-title em { color: var(--verde-claro); }
.ib-text { max-width: 28em; font-size: 1.1875rem; color: #D2D7D6; }
.ib-act { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.ib-act .arrow-link { color: var(--blanco); }

/* ---------- 6 · Quién te opera: editorial ---------- */
.iq { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 140px); align-items: center; padding: clamp(110px, 16vh, 180px) var(--gut); }
.iq-photo { position: relative; margin: 0; aspect-ratio: 4 / 5; transform: translate3d(0, var(--qy, 0px), 0); }
.iq-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.iq-body { display: grid; gap: 28px; justify-items: start; }
.iq-title { font-size: clamp(3.2rem, 1rem + 6vw, 9rem); }
.iq-intro { max-width: 30em; font-size: 1.375rem; line-height: 1.5; color: var(--gris-6); }
.iq-cv { width: 100%; max-width: 46em; display: grid; }
.iq-cv > div { position: relative; display: grid; grid-template-columns: 12em minmax(0, 1fr); gap: 24px; padding: 18px 0; }
.iq-cv > div::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; background: var(--gris-2); transform-origin: left; transform: scaleX(var(--l, 1)); }
.iq-cv > div:last-child { border-bottom: 1px solid var(--gris-2); }
.iq-cv dt { font-weight: 500; color: var(--verde-texto); }
.iq-cv dd { color: var(--gris-6); }


/* ---------- Sin movimiento: todo en su estado final ---------- */
@media (prefers-reduced-motion: reduce) {
  .ih, .isd, .il, .id, .ip, .ib { height: auto; }
  .ih-pin, .isd-pin, .il-pin, .id-pin, .ip-pin, .ib-pin { position: relative; }
  .isd-stamp b { transition: none; }
  .il-pin { height: auto; }
  .il-track { position: static; width: auto; flex-wrap: wrap; align-items: flex-start; padding: calc(var(--hdr) + 4vh) var(--gut) 10vh; transform: none; }
  .il-shot-1, .il-shot-2, .il-shot-3 { align-self: flex-start; margin: 0; }
  .il-progress, .il-end { display: none; }
}

/* ---------- Pantallas verticales: la sonrisa en vertical (la misma foto ampliada hasta el jersey) ----------
   La elige el <picture> con esta misma condición e implantes.js mide sobre ella (focus y smile). La sonrisa queda
   arriba y el texto, abajo, sobre el jersey oscuro. */
.ih-photo picture, .ib-box picture { display: contents; }
@media (max-aspect-ratio: 4/5) {
  .ih-photo img { object-position: 55% 30%; transform-origin: 55% 25%; }
  /* abierta, oscuro abajo para el texto (el cuello queda entre la sonrisa y el jersey) */
  .ih-photo::before { content: ""; position: absolute; inset: auto 0 0; z-index: 1; height: 62%; background: linear-gradient(0deg, rgba(11, 12, 12, .78) 0%, rgba(11, 12, 12, .5) 55%, rgba(11, 12, 12, 0) 100%); opacity: var(--sh, 0); }
  .ih-title { align-self: end; margin-bottom: 5svh; }
  .ib-box { transform-origin: 55% 25%; }
  /* la radiografía en su sitio sobre la foto vertical (el lienzo de la horizontal pasado a la vertical con el registro) */
  .ib-xray { left: -37.389%; top: 6.866%; width: 138.442%; height: 43.106%; transform: rotate(-1.15deg); transform-origin: 0 0; }
}

/* ---------- Móvil y tableta vertical: las mismas escenas, en columna ----------
   Donde el texto y la escena no caben juntos en la pantalla (calendario y plan 3D), la escena es más alta que la
   pantalla y se fija por abajo (pinScene en base.js): el texto sube y la escena se queda entera a la vista. */
@media (max-width: 900px) and (max-aspect-ratio: 1/1) {
  .ih-title { font-size: clamp(2.7rem, 1rem + 8vw, 5.2rem); }
  .ih-ink { padding-bottom: 92px; }   /* el botón redondo de las cookies queda abajo a la izquierda: en las escenas fijas, 84–100 px libres abajo */
  .ih-foot { flex-direction: column; align-items: flex-start; gap: 20px; }
  .ih-sub { font-size: 1.125rem; }
  .ih-hint { display: none; }

  /* Same Day®: el texto arriba y la foto debajo, centrada, del alto que quede */
  .isd-pin { height: auto; min-height: 100svh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); align-items: start; row-gap: 22px; padding-top: calc(var(--hdr) + 12px); padding-bottom: 92px; }
  .isd-copy { gap: 14px; }
  .isd-title { font-size: clamp(2.4rem, 1rem + 7vw, 3.6rem); }
  .isd-text { font-size: 1.0625rem; line-height: 1.5; }
  .isd-print { justify-self: center; align-self: center; padding: 10px 10px 0; }
  .isd-print img { height: min(38svh, 420px); }
  .isd-print figcaption { height: 48px; }
  .isd-stamp { font-size: 1.375rem; }

  /* La corona: una foto por pantalla, con su pie del mismo ancho; al final, «Hecha para ti.» centrado */
  .il-track { gap: 10vw; padding-right: var(--gut); }
  .il-intro { width: calc(100vw - 2 * var(--gut)); gap: 20px; }
  .il-title { font-size: clamp(2.7rem, 1rem + 8vw, 5.2rem); }
  .il-text { font-size: 1.125rem; }
  .il-shot, .il-shot-1, .il-shot-2, .il-shot-3 { align-self: center; margin: 0; gap: 16px; }
  .il-frame { height: auto; width: min(76vw, (100svh - var(--hdr) - 230px) * .75); }
  .il-shot figcaption { inline-size: 0; min-inline-size: 100%; font-size: 1rem; }   /* (no ensancha la foto) */
  .il-shot figcaption strong { font-size: 1.25rem; }
  .il-end { width: calc(100vw - 2 * var(--gut)); text-align: center; font-size: clamp(2.7rem, 1rem + 8vw, 5.2rem); }

  /* Dientes fijos el mismo día: el mismo calendario, cada fila en varias líneas de puntos */
  .id-pin { height: auto; min-height: 100svh; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; row-gap: 28px; padding-bottom: 100px; }
  .id-head { grid-column: 1; grid-template-columns: minmax(0, 1fr); }
  .id-title { font-size: clamp(2.7rem, 1rem + 8vw, 5.2rem); }
  .id-text { font-size: 1.125rem; padding-bottom: 0; }
  .id-cal { grid-column: 1; gap: 22px; }
  .id-row { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .id-dots { grid-template-columns: repeat(30, minmax(0, 1fr)); row-gap: 10px; }
  .id-dots i { width: 6px; }
  .id-key { gap: 8px 24px; margin-left: 0; }
  .id-foot { grid-column: 1; }

  /* Colocado al milímetro: texto, el plan con el implante y los tres pasos, en columna */
  .ip-pin { height: auto; min-height: 100svh; grid-template-columns: minmax(0, 1fr); row-gap: 28px; padding: calc(var(--hdr) + 2vh) var(--gut) 92px; }
  .ip-copy { gap: 16px; }
  .ip-title { font-size: clamp(2.7rem, 1rem + 8vw, 5.2rem); }
  .ip-text { font-size: 1.125rem; }
  /* fijada, la escena baja hasta 56 px bajo la cabecera si abajo sobra sitio (pinScene): el hueco con el texto lo deja
     fuera de la vista; el implante entra por arriba de ese aire, no por encima del texto */
  .ip-stage { justify-self: center; height: max(26svh, 100svh - var(--hdr) - 470px);   /* con los pasos debajo y aire bajo la cabecera */ margin: 40px 0 70px; clip-path: inset(-56px -50vw -200px -50vw); }
  .ip-steps li { padding: 12px 0; gap: 10px; }
  .ip-steps strong { font-size: 1.125rem; }
  .ip-steps span { font-size: .9375rem; line-height: 1.4; }

  /* El hueso: el texto abajo, sobre la radiografía oscurecida */
  .ib-copy { width: auto; right: var(--gut); align-content: end; padding-bottom: 92px; }
  .ib-title { font-size: clamp(2.7rem, 1rem + 8vw, 5.2rem); }
  .ib-text { font-size: 1.0625rem; }
  .ib-pin::after { background: linear-gradient(0deg, rgba(11, 12, 12, .92) 0%, rgba(11, 12, 12, .6) 45%, rgba(11, 12, 12, 0) 70%); }

  .iq { grid-template-columns: minmax(0, 1fr); }
  .iq-cv > div { grid-template-columns: minmax(0, 1fr); gap: 4px; }
}
/* móviles bajos (iPhone SE de primera generación y parecidos): el texto que va sobre la foto, más compacto */
@media (max-width: 900px) and (max-aspect-ratio: 1/1) and (max-height: 640px) {
  .ih-title, .ib-title { font-size: 2.4rem; }
  .ih-sub { font-size: 1rem; }
  .ih-ink { padding-bottom: 84px; }
  .ib-copy { gap: 16px; padding-bottom: 84px; }
  .ib-text { font-size: .9375rem; line-height: 1.45; }
}
/* móviles verticales muy bajos (≤ 640 px de alto): el calendario y su nota, juntos entre la cabecera y el botón de las
   cookies (si no, la nota quedaba a medias bajo el botón) */
@media (max-width: 900px) and (max-aspect-ratio: 1/1) and (max-height: 640px) {
  .id-cal { gap: 10px; }
  .id-row { row-gap: 6px; }
  .id-dots { row-gap: 6px; }
  .id-key { gap: 4px 16px; font-size: .8125rem; }
  .id-foot { gap: 6px 24px; padding-top: 10px; font-size: .8125rem; line-height: 1.4; }
  .id-foot .arrow-link { font-size: .9375rem; }
  /* el plan 3D y sus tres pasos, juntos */
  .ip-pin { row-gap: 14px; }
  .ip-stage { margin-bottom: 72px; }   /* con sitio para la etiqueta «Plan 3D» de debajo (dos líneas) */
  .ip-steps li { padding: 6px 0; }
  .ip-steps strong { font-size: 1rem; }
  .ip-steps span { font-size: .75rem; line-height: 1.35; }
}

/* ---------- Móvil en horizontal y pantallas apaisadas bajas: la composición de escritorio, a la altura que hay ----------
   Abajo quedan 64 px libres para el botón redondo de las cookies (abajo a la izquierda). */
@media (min-aspect-ratio: 1/1) and (max-height: 560px) {
  .ih-ink { padding: calc(var(--hdr) + 1svh) var(--gut) 64px; }
  .ih-title { font-size: 12svh; }
  .ih-sub { max-width: 20em; font-size: 1rem; }
  .ih-foot { gap: 12px 32px; }
  .ih-hint { display: none; }
  .isd-pin { padding-top: calc(var(--hdr) + 2svh); padding-bottom: 64px; }
  .isd-copy { gap: 10px; }
  .isd-title { font-size: 10svh; }
  .isd-text { font-size: .875rem; line-height: 1.5; }
  .isd-print { padding: 10px 10px 0; }
  .isd-print img { height: calc(100svh - var(--hdr) - 130px); }
  .isd-print figcaption { height: 40px; }
  .isd-stamp { font-size: 1.125rem; }
  .il-track { padding-bottom: 64px; }
  .il-intro { width: min(44vw, 640px); gap: 10px; }
  .il-title { font-size: 11svh; }
  .il-end { font-size: 13svh; }
  .il-text { font-size: .875rem; }
  .il-shot, .il-shot-1, .il-shot-2, .il-shot-3 { align-self: center; margin: 0; gap: 10px; }
  .il-frame { height: calc(100svh - var(--hdr) - 150px); }
  .il-shot figcaption { font-size: .875rem; }
  .il-shot figcaption strong { font-size: 1.0625rem; }
  .il-progress { bottom: 24px; }
  /* el calendario no cabe con el titular: la escena es más alta que la pantalla y se fija con el calendario arriba */
  .id-pin { height: auto; min-height: 100svh; row-gap: 24px; padding: calc(var(--hdr) + 2svh) var(--gut) 64px; }
  .id-title { font-size: 13svh; }
  .id-text { font-size: 1rem; }
  .id-cal { gap: 14px; }
  .id-dots { row-gap: 8px; }
  .ip-pin { padding-bottom: 64px; }
  .ip-title { font-size: 10svh; }
  .ip-copy { gap: 12px; }
  .ip-text { font-size: .875rem; }
  .ip-stage { height: calc(100svh - var(--hdr) - 110px); margin-bottom: 40px; }
  .ip-tag { top: calc(100% + 8px); font-size: .8125rem; }
  .ip-tag b { font-size: 1rem; }
  .ip-steps li { padding: 10px 0; }
  .ip-steps strong { font-size: 1.0625rem; }
  .ip-steps span { font-size: .8125rem; line-height: 1.4; }
  .ib-copy { width: min(62vw, 760px); gap: 8px; padding: var(--hdr) 0 62px; }
  .ib-title { font-size: 7.5svh; }
  .ib-text { font-size: .8125rem; line-height: 1.4; }
}
