/* Aerium Medical Center · Aire en calma
   Tokens, base, componentes compartidos y portada. */

@font-face {
  font-family: "Jost";
  src: url("../assets/fonts/jost-latin-wght.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #F6F8F8;
  --surface: #FFFFFF;
  --ink: #14355F;
  --night: #0C2242;
  --teal: #5CA1AA;
  --teal-text: #2B737C;
  --teal-light: #97C9CB;
  --mist: #E3F0F0;
  --wood: #9A6E48;
  --wood-dark: #3A2414;
  --warm: #FFD9A0;
  --secondary: #4E5F70;
  --divider: #D6E2E4;
  --whatsapp: #146A43;

  --font-display: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --ease-air: cubic-bezier(.22, .61, .24, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  --gutter: clamp(20px, 4.4vw, 64px);
  --maxw: 1320px;
  --header-h: 76px;
  --lane: 96px;          /* carril de la línea en la lista de especialidades */
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--teal-light); color: var(--night); }

:focus-visible {
  outline: 2px solid var(--teal-text);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--maxw) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Tipografía ---------- */

.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--teal-text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.eyebrow::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
}
.eyebrow:has(.eyebrow-dot)::before { display: none; }
.eyebrow-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 4px rgba(92, 161, 170, .18);
}
.eyebrow-light { color: var(--teal-light); }

.display {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(42px, 6vw, 96px);
  line-height: 1;
  letter-spacing: -.025em;
  text-wrap: balance;
}
.display em {
  font-style: normal;
  font-weight: 500;
  color: var(--teal-text);
}

.title {
  font-family: var(--font-display);
  font-weight: 380;
  font-size: clamp(34px, 4.2vw, 64px);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.title span { color: var(--teal-text); }

.lede {
  font-size: clamp(18px, 1.35vw, 20px);
  color: var(--secondary);
  max-width: 34em;
  text-wrap: pretty;
}

/* ---------- Botones ---------- */

.btn {
  --h: 56px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: var(--h);
  padding: 0 28px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .3s var(--ease-air), color .3s var(--ease-air), border-color .3s var(--ease-air), transform .3s var(--ease-air);
}
.btn-sm { --h: 48px; padding: 0 22px; font-size: 16px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--teal-text); }
.btn-ghost {
  color: var(--ink);
  border: 1px solid var(--divider);
  background: transparent;
}
.btn-ghost:hover { border-color: var(--ink); }
.btn:active { transform: translateY(1px); }

.arrow {
  position: relative;
  display: inline-block;
  width: 22px; height: 1.5px;
  background: currentColor;
  transition: width .35s var(--ease-air);
}
.arrow::after {
  content: "";
  position: absolute; right: 0; top: 50%;
  width: 8px; height: 8px;
  border-top: 1.5px solid currentColor;
  border-right: 1.5px solid currentColor;
  transform: translate(0, -50%) rotate(45deg);
}

/* ---------- Encabezado ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  background: rgba(246, 248, 248, 0);
  /* sin transición de fondo: el color sigue al scroll cuadro a cuadro */
  transition: box-shadow .35s var(--ease-air);
}
section[id] { scroll-margin-top: var(--header-h); }
.site-header.is-scrolled {
  /* --hb lo escribe site.js con la misma tabla de paradas del atardecer de .cierre::before */
  background: var(--hb, rgba(246, 248, 248, .97));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--divider);
}
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 40px;
}
.brand img { height: 34px; width: auto; transition: filter .35s var(--ease-air); }
/* de noche el encabezado también se apaga: mismo azul del cierre */
html:not(.menu-open) .site-header.is-night {
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .06);
  color: #DCE4EC;
}
html:not(.menu-open) .site-header.is-night .brand img { filter: brightness(0) invert(1); opacity: .94; }
html:not(.menu-open) .site-header.is-night .nav a { color: #DCE4EC; }
html:not(.menu-open) .site-header.is-night .menu-toggle { color: #fff; }
/* el texto cambia en el mismo cuadro que el fondo: sin retraso respecto del scroll */
.nav a, .menu-toggle { transition: background-size .35s var(--ease-air); }
.brand img { transition: none; }
html:not(.menu-open) .site-header.is-night .header-cta { background: #2F7880; color: #fff; }
html:not(.menu-open) .site-header.is-night .header-cta:hover { background: var(--teal); }
.nav { display: flex; gap: 32px; margin-left: auto; }
.nav a {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 450;
  text-decoration: none;
  padding: 12px 0;
  background: linear-gradient(var(--teal), var(--teal)) 0 calc(100% - 6px) / 0 1.5px no-repeat;
  transition: background-size .35s var(--ease-air);
}
.nav a:hover, .nav a[aria-current="page"] { background-size: 100% 1.5px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.menu-toggle { display: none; }

/* ---------- Línea que respira ---------- */

.story {
  position: relative;
  isolation: isolate;
}
.breath {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  /* por encima del atardecer y la pared del cierre; el texto queda encima (z 3) */
  z-index: 2;
  pointer-events: none;
  overflow: visible;
}
.breath path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
/* colores por gradiente: se aclaran al entrar en el cierre nocturno */
.breath-glow { stroke: url(#bl-glow); stroke-width: 9; }
.breath-main { stroke: url(#bl-main); stroke-width: 2.4; }
.breath-deep { stroke: url(#bl-deep); stroke-width: 1.5; }
/* la ida bajo cada fila: un hilo, no un trazo */
.breath-thread { stroke: url(#bl-main); stroke-width: 1; opacity: .55; }
/* el halo solo acompaña a la cabeza */
.breath-tail { fill: url(#bt-tail); stroke: none; filter: blur(1.6px); }
.breath-head {
  fill: var(--teal);
  stroke: rgba(92, 161, 170, .28);
  stroke-width: 8;
  opacity: 0;
  transition: opacity .3s linear;
}
.breath.is-drawing .breath-head { opacity: 1; }

.story .wrap { position: relative; z-index: 3; }

/* ---------- 01 · Bienvenida ---------- */

.hero {
  min-height: calc(90svh - var(--header-h));
  display: flex;
  align-items: center;
  padding-block: clamp(32px, 6vh, 72px) clamp(48px, 9vh, 112px);
}
.hero-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
}
.hero-copy { grid-column: 1 / span 7; }
.hero-copy .display { margin-top: 28px; }
.hero-copy .lede { margin-top: 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }

.hero-figure {
  grid-column: 9 / span 4;
  justify-self: end;
  margin: 0;
  width: min(100%, 360px);
}
.arch {
  position: relative;
  border-radius: 999px 999px var(--radius) var(--radius);
  overflow: hidden;
  aspect-ratio: 538 / 714;
  background: var(--wood-dark);
  box-shadow: 0 40px 80px -40px rgba(12, 34, 66, .45);
}
.arch img,
.arch-spark {
  width: 100%; height: 100%;
  transform: translate3d(0, var(--shift, 0px), 0) scale(1.08);
}
.arch img { object-fit: cover; }
.arch-spark {
  position: absolute; inset: 0;
  overflow: visible;
  pointer-events: none;
}
.arch-spark path {
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
}
html:not(.js) .arch-spark path { stroke-dashoffset: 0; }
.spark-glow { stroke: #BFE3E4; stroke-width: 14; opacity: .38; }
.spark-main { stroke: #8FCBCF; stroke-width: 3.6; }
.spark-deep { stroke: #14355F; stroke-width: 2.2; opacity: .9; }
.spark-halo { opacity: 0; mix-blend-mode: screen; }
.spark-ember { opacity: 0; }
.spark-ember.is-breathing { animation: ember-breath 4s ease-in-out infinite; }
@keyframes ember-breath {
  0%, 100% { opacity: .55; }
  50% { opacity: .95; }
}
html:not(.js) .spark-ember { opacity: .6; }

/* ---------- 02 · Especialidades ---------- */

.esp { position: relative; padding-block: clamp(56px, 8vh, 96px) clamp(64px, 8vh, 96px); }
.esp-head {
  padding-left: var(--lane);
  max-width: 820px;
}
.esp-head .title { margin-top: 20px; }

.esp-list {
  margin-top: clamp(64px, 10vh, 112px);
  border-top: 1px solid var(--divider);
}
.esp-row {
  position: relative;
  display: grid;
  /* el motivo se acerca al texto: la línea dedica su recorrido al signo */
  grid-template-columns: var(--lane) minmax(0, 520px) minmax(0, 1fr);
  align-items: center;
  min-height: clamp(204px, 27vh, 264px);
  border-bottom: 1px solid var(--divider);
  counter-increment: esp;
}
.esp-list { counter-reset: esp; }
/* la última fila no cierra con regla: el aire baja directo al atardecer */
.esp-row:last-child { border-bottom-color: transparent; }
.esp-link { position: relative; }
.esp-node {
  justify-self: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--teal-light);
  transition: background-color .4s var(--ease-air), border-color .4s var(--ease-air), box-shadow .5s var(--ease-air);
}
.esp-row.is-reached .esp-node {
  background: var(--teal);
  border-color: var(--teal);
}
.esp-row.is-active .esp-node { box-shadow: 0 0 0 7px rgba(92, 161, 170, .2); }

.esp-link {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "index index"
    "name  name"
    "desc  more";
  column-gap: 32px;
  row-gap: 8px;
  padding-block: 30px;
  text-decoration: none;
  align-items: end;
}
.esp-index {
  grid-area: index;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .24em;
  color: var(--teal-text);
}
.esp-name {
  grid-area: name;
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.02;
  letter-spacing: -.025em;
  color: var(--ink);
  transition: opacity .5s var(--ease-air), transform .6s var(--ease-air);
  hyphens: manual;
}
.esp-desc {
  grid-area: desc;
  color: var(--secondary);
  font-size: 18px;
}
.esp-more {
  grid-area: more;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--teal-text);
  white-space: nowrap;
}
.esp-link:hover .arrow, .esp-link:focus-visible .arrow { width: 34px; }

.esp-row.is-active .esp-name,
.esp-row:hover .esp-name,
.esp-link:focus-visible .esp-name { opacity: 1; }

.esp-art {
  /* anclada al borde derecho de la retícula: la fila ocupa todo el ancho */
  justify-self: end;
  width: clamp(300px, 24vw, 350px);
  max-width: 100%;
  opacity: .18;
  transform: translate3d(16px, 0, 0);
  transition: opacity .6s var(--ease-air), transform .8s var(--ease-out);
  pointer-events: none;
}
/* las ilustraciones son estáticas: aparecen grandes cuando la línea alcanza la fila y se quedan */
.esp-row.is-reached .esp-art { opacity: .55; transform: none; }
.esp-row.is-active .esp-art { opacity: 1; transform: none; }

/* la ilustración la dibuja la línea al llegar a la fila:
   nodo → ramal por el divisor → trazos del motivo, con las tres hebras */
.esp-art-live {
  justify-self: start;
  margin-left: clamp(40px, 5vw, 88px);
  width: clamp(230px, 19.5vw, 290px);
  max-width: none;
  aspect-ratio: 480 / 360;
  height: auto; overflow: visible;
  opacity: 1; transform: none;
  transition: opacity .6s var(--ease-air);
  position: relative; z-index: 1;
}
/* lo ya dibujado se queda: la lista guarda el rastro de la respiración */
.esp-row.is-reached:not(.is-active) .esp-art-live { opacity: .9; }
/* el motivo aparece por opacidad (sin trazos discontinuos a medio dibujar) */
.esp-art-live .art-stroke {
  fill: none;
  stroke-linecap: round;
  stroke-opacity: 0;
  transition: stroke-opacity .45s var(--ease-air) 0s;
}
.art-deep { stroke: var(--ink); stroke-width: 1.5px; }
.art-main { stroke: var(--teal); stroke-width: 2.4px; }
.art-glow { stroke: #97C9CB; stroke-width: 9px; opacity: .6; }
.art-faint { opacity: .7; }
/* trazo ancho que compite con el trazo firma (Infectología): queda como eco */
.esp-art-live .art-dim { stroke-width: 4px; opacity: .3; }
/* el trazo firma queda con el peso de la línea: núcleo navy y halo teal */
.esp-art-live .art-traced.art-stroke {
  stroke: var(--ink); stroke-width: 2.2px; opacity: 1;
  filter: drop-shadow(0 0 2.5px rgba(92, 161, 170, .75));
}
/* el resto del motivo aparece en el último tramo del trazado */
.esp-row.is-drawn .esp-art-live .art-stroke {
  stroke-opacity: 1;
  transition: stroke-opacity .9s var(--ease-air) calc(var(--d, 0s) * .4);
}
.esp-row { transition: border-color .5s var(--ease-air); }
.esp-row.is-reached { border-bottom-color: transparent; }
.esp-row.is-active .esp-name { opacity: 1; }

/* el trazo principal del motivo lo recorre la línea misma (breath-line.js);
   mientras dura el desvío, el trazo propio cede su lugar */
.esp-row.is-tracing .esp-art-live .art-traced.art-stroke { stroke-opacity: 0; transition: none; }
.esp-row.is-drawn:not(.is-tracing) .esp-art-live .art-traced.art-stroke {
  stroke-opacity: 1;
  transition: stroke-opacity .5s var(--ease-air);
}

/* gesto propio de cada motivo durante la pausa de la línea (--hu: 0 → 1, lo fija breath-line.js) */
.esp-art-live .art-stroke { transform-box: fill-box; transform-origin: center; }
/* alergología: las otras burbujas suben, escalonadas; el anillo de la burbuja trazada respira en su sitio */
.esp-art-live[data-esp="alergologia"] circle[cx="300"] { transform: translateY(calc(clamp(0, var(--hu, 1) * 1.5, 1) * -18px)); }
.esp-art-live[data-esp="alergologia"] circle[cx="370"] { transform: translateY(calc(clamp(0, var(--hu, 1) * 1.5 - .5, 1) * -16px)); }
.esp-art-live[data-esp="alergologia"] circle[r="34"] { transform: scale(calc(1 + .14 * var(--hu, 1))); }
/* infectología: la segunda pared de la barrera se levanta junto a la primera */
.esp-art-live[data-esp="infectologia"] path[d^="M84 330"] { stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--hu, 1)); }
.esp-art-live[data-esp="infectologia"] circle[r="70"] { transform: scale(calc(.9 + .1 * var(--hu, 1))); }
.esp-art-live[data-esp="inmunologia"] path[d^="M240 112"],
.esp-art-live[data-esp="infectologia"] path[d^="M250 232"] {
  stroke-dasharray: 1; stroke-dashoffset: calc(1 - var(--hu, 1));
}
.esp-art-live[data-esp="inmunologia"] circle[r="24"] { transform: scale(calc(.72 + .28 * var(--hu, 1))); }
.esp-art-live[data-esp="otorrinolaringologia"] path[d^="M370 96"] {
  opacity: clamp(0, calc(var(--hu, 1) * 2), 1);
  transform: translateX(calc((1 - var(--hu, 1)) * -12px));
}
.esp-art-live[data-esp="otorrinolaringologia"] path[d^="M410 74"] {
  opacity: clamp(0, calc(var(--hu, 1) * 2 - 1), 1);
  transform: translateX(calc((1 - var(--hu, 1)) * -18px));
}
.esp-art-live[data-esp="medicina-interna"] circle[cx="290"] { transform: translateX(calc((1 - var(--hu, 1)) * 30px)); }
.esp-art-live[data-esp="medicina-interna"] circle[cy="225"] { transform: translateY(calc((1 - var(--hu, 1)) * 30px)); }

/* ---------- Carril compartido: todo el texto queda a la derecha de la línea ---------- */

.lane-head { padding-left: var(--lane); max-width: 900px; }
.lane-head .title { margin-top: 20px; }
.text-link {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px;
  font-family: var(--font-display);
  font-size: 16px; font-weight: 500; letter-spacing: .04em;
  color: var(--teal-text);
  text-decoration: none;
}
.text-link:hover .arrow, .text-link:focus-visible .arrow { width: 34px; }

/* ---------- 03 · ¿Te suena? ---------- */

.suena { padding-block: clamp(96px, 14vh, 168px) clamp(56px, 8vh, 96px); }
.suena-list {
  list-style: none;
  margin: clamp(48px, 8vh, 88px) 0 0;
  padding: 0 0 0 var(--lane);
}
.suena-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: baseline;
  column-gap: 48px;
  padding-block: 28px;
  border-top: 1px solid var(--divider);
  text-decoration: none;
  color: var(--ink);
}
.suena-list li:last-child .suena-item { border-bottom: 1px solid var(--divider); }
.suena-quote {
  position: relative;
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(26px, 2.7vw, 40px);
  line-height: 1.12;
  letter-spacing: -.015em;
  text-wrap: balance;
  transition: color .35s var(--ease-air), translate .5s var(--ease-out);
}
/* comillas colgadas: el texto queda alineado al carril, la comilla vive en el margen */
.suena-quote::before { content: "«"; position: absolute; right: 100%; padding-right: .12em; color: var(--teal-light); }
.suena-quote::after { content: "»"; color: var(--teal-light); }
.suena-to {
  justify-self: end;
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase;
  color: var(--teal-text);
  white-space: nowrap;
}
.suena-item:hover .suena-quote, .suena-item:focus-visible .suena-quote { color: var(--teal-text); translate: 8px 0; }
.suena-item:hover .arrow, .suena-item:focus-visible .arrow { width: 34px; }
.suena-note {
  margin-top: 24px;
  padding-left: var(--lane);
  font-size: 15px;
  color: var(--secondary);
}

/* ---------- 04 · La sede ---------- */

.sede { padding-block: clamp(88px, 13vh, 152px); }
.sede-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: center;
}
.sede-copy { grid-column: 8 / span 5; grid-row: 1; }
.sede-copy .title { margin-top: 20px; }
.sede-copy .lede { margin-top: 24px; }
.sede-copy .text-link { margin-top: 28px; }
/* la pared de listones de la recepción, de día; el carril pasa por su izquierda sin tocarla */
.sede-wall {
  grid-column: 1 / span 6; grid-row: 1;
  margin-left: var(--lane);
  position: relative;
  height: clamp(440px, 64vh, 620px);
  border-radius: var(--radius);
  overflow: hidden;
  background: #6A4A30 url("../assets/img/pared-nogal-v6/0001.webp") 0 0 / 768px 486px repeat;
  box-shadow: 0 40px 80px -44px rgba(12, 34, 66, .45);
  isolation: isolate;
}
/* luz de ventana: un haz diagonal cálido; --sun (0..1, site.js) lo corre por la pared al bajar */
.sede-wall::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(180deg, rgba(246, 248, 248, .16), rgba(246, 248, 248, 0) 40%, rgba(20, 12, 6, .28) 100%);
}
.sede-wall-sun {
  position: absolute; top: -10%; bottom: -10%; left: -60%; width: 120%;
  z-index: 2;
  background: linear-gradient(104deg,
    transparent 22%, rgba(255, 226, 180, .22) 34%, rgba(255, 238, 208, .5) 44%,
    rgba(255, 232, 196, .42) 50%, rgba(255, 226, 180, .16) 60%, transparent 72%);
  mix-blend-mode: soft-light;
  transform: translate3d(calc(var(--sun, .5) * 100%), 0, 0);
  will-change: transform;
}
/* el letrero de bronce de la recepción, de día: sin luz propia, solo el sol que pasa */
.sede-sign {
  position: absolute; left: 50%; top: 46%;
  z-index: 1;
  width: 56%; height: auto;
  translate: -50% -50%;
  /* de día el bronce recoge la luz de la ventana: más claro que la madera, separado por su sombra */
  filter: brightness(1.75) saturate(1.1) drop-shadow(0 -1px 0 rgba(255, 236, 205, .6)) drop-shadow(2px 3px 1.5px rgba(20, 12, 6, .55)) drop-shadow(10px 14px 10px rgba(20, 12, 6, .5));
  pointer-events: none;
}
.sede-wall-sun::after {
  /* el mismo haz, más fino, en screen: los cantos de los listones lo recogen */
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(104deg, transparent 40%, rgba(255, 236, 205, .2) 46%, transparent 52%);
  mix-blend-mode: screen;
}

/* ---------- 05 · Pasos ---------- */

.pasos { padding-block: clamp(72px, 11vh, 128px) clamp(48px, 7vh, 88px); }
.steps { list-style: none; margin: clamp(40px, 7vh, 72px) 0 0; padding: 0; }
.step {
  display: grid;
  grid-template-columns: var(--lane) 72px minmax(0, 5fr) minmax(0, 6fr);
  align-items: center;
  min-height: 132px;
}
.step-node {
  justify-self: center;
  width: 15px; height: 15px;
  border-radius: 50%;
  background: var(--bg);
  border: 1.5px solid var(--teal-light);
  transition: background-color .4s var(--ease-air), border-color .4s var(--ease-air), box-shadow .5s var(--ease-air);
}
.step.is-reached .step-node { background: var(--teal); border-color: var(--teal); }
.step.is-active .step-node { box-shadow: 0 0 0 7px rgba(92, 161, 170, .2); }
.step-index {
  font-family: var(--font-display);
  font-size: 13px; font-weight: 500; letter-spacing: .24em;
  color: var(--teal-text);
}
.step-title {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(28px, 2.9vw, 44px);
  line-height: 1.05;
  letter-spacing: -.02em;
  color: var(--ink);
  text-wrap: balance;
}
.step-text { padding-left: 40px; font-size: 18px; color: var(--secondary); max-width: 28em; }
/* el paso que la línea aún no toca espera en segundo plano */
html.js .step:not(.is-reached) .step-title { color: #7C8DA0; }
.step-title { transition: color .5s var(--ease-air); }

/* ---------- 06 · Preguntas ---------- */

/* el borde inferior deja aire limpio: ahí empieza el atardecer, sin texto encima */
.faq { padding-block: clamp(72px, 11vh, 128px) clamp(220px, 30vh, 300px); }
.faq-list {
  margin: clamp(40px, 7vh, 72px) 0 0 var(--lane);
  max-width: 880px;
  border-top: 1px solid var(--divider);
}
.faq-item { border-bottom: 1px solid var(--divider); }
.faq-item summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  min-height: 80px;
  padding-block: 18px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(20px, 1.8vw, 26px);
  font-weight: 400;
  letter-spacing: -.005em;
  color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover > span:first-child { color: var(--teal-text); }
.faq-item summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 4px; border-radius: 2px; }
.faq-sign { position: relative; flex: none; width: 18px; height: 18px; }
.faq-sign::before, .faq-sign::after {
  content: ""; position: absolute; left: 0; right: 0; top: 50%;
  height: 1.5px; margin-top: -.75px;
  background: var(--teal-text);
  transition: transform .35s var(--ease-air);
}
.faq-sign::after { transform: rotate(90deg); }
.faq-item[open] .faq-sign::after { transform: rotate(0deg); }
.faq-item p { padding: 0 64px 28px 0; font-size: 18px; color: var(--secondary); max-width: 40em; }
/* apertura suave donde el navegador lo permite; en el resto abre al instante */
:root { interpolate-size: allow-keywords; }
.faq-item::details-content {
  block-size: 0; overflow: clip;
  transition: block-size .45s var(--ease-air), content-visibility .45s allow-discrete;
}
.faq-item[open]::details-content { block-size: auto; }

@media (max-width: 1100px) {
  .suena-item { grid-template-columns: minmax(0, 1fr) 220px; column-gap: 32px; }
  .sede-copy { grid-column: 7 / span 6; }
  .step { grid-template-columns: var(--lane) 56px minmax(0, 1fr) minmax(0, 1fr); }
  .step-text { padding-left: 24px; }
}
@media (max-width: 767px) {
  .lane-head { padding-left: 28px; }
  .suena { padding-block: 88px 48px; }
  .suena-list { padding-left: 28px; margin-top: 40px; }
  .suena-item { grid-template-columns: 1fr; row-gap: 12px; padding-block: 22px; }
  .suena-quote { font-size: clamp(22px, 6.4vw, 26px); }
  .suena-to { justify-self: start; min-height: 32px; }
  .suena-note { padding-left: 28px; }

  .sede { padding-block: 72px; }
  .sede-grid { display: block; }
  .sede-copy { padding-left: 28px; }
  .sede-wall { margin: 40px 0 0 28px; height: 300px; }

  .pasos { padding-block: 72px 40px; }
  .steps { margin-top: 32px; }
  .step {
    grid-template-columns: var(--lane) minmax(0, 1fr);
    align-items: start;
    min-height: 0;
    padding-block: 22px;
  }
  .step-node { justify-self: start; margin-left: 2px; margin-top: 4px; width: 13px; height: 13px; }
  .step-index, .step-title, .step-text { grid-column: 2; }
  .step-index { margin-top: 1px; }
  .step-title { margin-top: 10px; font-size: clamp(26px, 7.4vw, 30px); }
  .step-text { padding-left: 0; margin-top: 8px; font-size: 17px; }

  .faq { padding-block: 72px 168px; }
  .faq-list { margin-left: 28px; margin-top: 32px; }
  .faq-item summary { min-height: 68px; font-size: 19px; }
  .faq-item p { padding-right: 0; font-size: 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .sede-wall-sun { transform: translate3d(50%, 0, 0); }
  .suena-quote { transition: none; }
}

/* ---------- 07 · Cierre ---------- */

.cierre {
  background: var(--night);
  color: #fff;
  padding-block: clamp(96px, 12vh, 140px) clamp(80px, 12vh, 140px);
  position: relative;
  /* solo recorta a los lados: el atardecer sube por encima de la costura */
  overflow-x: clip;
  /* --dusk-top: cuánto sube el atardecer sobre especialidades; --lit-top: donde nace el downlight */
  --dusk-top: 300px;
  --lit-top: 120px;
}
/* La página respira de día y se enciende de noche: al llegar a la agenda,
   la pared de listones y el letrero retroiluminado de la recepción. */
.cierre { --lx: 78%; --ly: 47%; }
/* atardecer: un solo degradado que cruza la costura (no hay borde entre día y noche) */
.cierre::before {
  content: ""; position: absolute; left: 0; right: 0;
  top: calc(var(--dusk-top) * -1); height: calc(var(--dusk-top) + var(--lit-top) + 20px);
  z-index: 1;
  background: linear-gradient(to bottom,
    rgba(227, 233, 236, 0) 0%, #E3E9EC 24%, #C9D3DB 34%, #A3B3C4 44%,
    #7A8FA8 54%, #536A8A 64%, #33496D 74%, #1B3255 84%, #0C2242 93%, rgba(12, 34, 66, 0) 100%);
  pointer-events: none;
}
.night-wood, .night-light {
  position: absolute; inset: 0;
  pointer-events: none;
  opacity: 0;
  /* al apagar (subiendo) todo baja junto y rápido */
  transition: opacity .4s var(--ease-air);
}
.night-wood {
  /* la misma pared de la recepción, a escala real y graduada a noche (.studio/production/night-wall.html, v6).
     El ámbar tiñe la madera en soft-light: las ranuras quedan oscuras. */
  background:
    linear-gradient(to bottom, rgba(12, 34, 66, 0) 58%, rgba(12, 34, 66, .7) 100%),
    radial-gradient(ellipse 9% 58% at var(--lx) var(--lit-top), rgba(255, 196, 128, .75) 0%, rgba(255, 176, 104, .25) 45%, rgba(255, 170, 100, 0) 78%),
    url("../assets/img/pared-nogal-v6/0001.webp") 0 0 / 1024px 648px repeat;
  background-blend-mode: normal, soft-light, normal;
  /* downlight: arranque nítido bajo el techo y caída en dos o tres listones por lado */
  --wash: radial-gradient(ellipse 8% 56% at var(--lx) var(--lit-top), #000 0%, rgba(0, 0, 0, .8) 24%, rgba(0, 0, 0, .28) 55%, transparent 82%);
  --spill: radial-gradient(ellipse 19% 30% at var(--lx) var(--ly), rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
  /* el resto de la pared queda en penumbra: se intuye, sin competir con el titular */
  /* fuera del cono la madera se pierde en la oscuridad */
  --dim: linear-gradient(to right, rgba(0, 0, 0, .03) 0%, rgba(0, 0, 0, .05) 40%, rgba(0, 0, 0, .12) 66%, rgba(0, 0, 0, .1) 88%, rgba(0, 0, 0, .02) 100%);
  -webkit-mask-image: var(--wash), var(--spill), var(--dim);
  mask-image: var(--wash), var(--spill), var(--dim);
  /* antes de encender la pared ya está: se intuye sin ámbar */
  opacity: .18;
}
.night-light {
  /* solo el halo que se escapa por detrás de las letras */
  background: radial-gradient(18% 26% at var(--lx) var(--ly), rgba(255, 186, 112, .45), rgba(255, 160, 90, .1) 58%, transparent 82%);
  mix-blend-mode: screen;
}
/* el ámbar de la pared aparece con la luz: antes, madera fría sin tinte */
.night-wood { filter: saturate(.3) brightness(.8); transition: opacity .4s var(--ease-air), filter .4s var(--ease-air); }
/* encendido en tres tiempos: la pared, luego las letras, luego la fecha */
.cierre.is-on .night-wood { opacity: 1; filter: none; transition: opacity .5s var(--ease-out), filter .5s var(--ease-out); }
.cierre.is-on .night-light { opacity: 1; transition: opacity .5s var(--ease-out); }
.cierre-inner { position: relative; z-index: 3; padding-left: calc(var(--gutter) + var(--lane)); }

.cierre-sign {
  position: absolute;
  right: var(--gutter);
  top: 50%;
  translate: 0 -50%;
  width: clamp(340px, 32vw, 480px);
  margin: 0;
  display: grid;
  justify-items: center;
  gap: 28px;
}
/* letras sobre la pared; la luz nace detrás de ellas (halo-lit), no en la cara */
.cierre-sign-face { position: relative; display: block; width: 100%; }
.cierre-sign-face img { display: block; width: 100%; height: auto; }
/* el halo: la silueta del logo, ámbar, apoyada en la madera detrás de cada letra */
.cierre-sign-glow {
  position: absolute; inset: 0;
  opacity: 0;
  transition: opacity .4s var(--ease-air);
}
/* silueta exacta (sin escalar): el ámbar asoma parejo alrededor de cada trazo, también en «MEDICAL CENTER» */
.cierre-sign-halo {
  position: absolute; inset: 0;
  filter: brightness(0) drop-shadow(0 0 .75px #FFDCA6) drop-shadow(0 0 1.5px #FFC782) drop-shadow(0 0 5px rgba(255, 168, 92, .9)) drop-shadow(0 0 12px rgba(255, 146, 70, .45));
}
.cierre-sign-halo-wide { filter: brightness(0) drop-shadow(0 0 34px rgba(255, 150, 72, .5)); opacity: .4; transition: opacity 1.1s var(--ease-air); }
/* cuando la línea llena «Agenda aquí», el letrero termina de encenderse: reservar y prender la luz son un solo gesto */
.cierre.is-arrived .cierre-sign-halo-wide { opacity: .85; }
.cierre.is-on.is-arrived .cierre-sign-face { animation: sign-arrive 1.4s var(--ease-air) both; }
@keyframes sign-arrive { 0% { filter: brightness(1); } 35% { filter: brightness(1.22); } 100% { filter: brightness(1.06); } }
/* letras de bronce oscuro, sólidas: la luz sale de detrás, no de la cara */
.cierre-sign-logo {
  position: relative;
  opacity: .85;
  /* bronce en dos tonos (logo-bronce-v2): apagado, la cara queda en sombra */
  filter: brightness(.55) drop-shadow(0 -1px 0 rgba(255, 214, 160, 0)) drop-shadow(0 1px 0 rgba(0, 0, 0, 0));
  transition: opacity .4s var(--ease-air), filter .5s var(--ease-air) .5s;
}
.cierre.is-on .cierre-sign-logo { opacity: 1; filter: var(--sign-glow); }
.cierre.is-on .cierre-sign-glow { opacity: 1; animation: halo-on .9s linear .5s both; }
/* el canto superior de cada letra recoge el downlight */
/* letra con retorno: canto superior que recoge el downlight y sombra inferior */
.cierre { --sign-glow: brightness(1) drop-shadow(0 -1px 0 rgba(255, 214, 160, .7)) drop-shadow(0 1px 0 rgba(0, 0, 0, .55)); }
/* un letrero que enciende: un pulso, una duda, un segundo pulso y queda */
@keyframes halo-on {
  0%       { opacity: 0; }
  12%      { opacity: .85; }
  22%, 36% { opacity: .15; }
  48%      { opacity: .8; }
  56%      { opacity: .5; }
  72%, 100%{ opacity: 1; }
}
/* la fecha en una placa de latón cepillado, grabada, separada de la pared por dos tornillos */
.cierre-sign figcaption {
  position: relative;
  display: grid; justify-items: center; gap: 4px;
  padding: 10px 32px 12px;
  border-radius: 1px;
  /* latón: base cálida, reflejo especular angosto y brillante, cepillado horizontal */
  background:
    linear-gradient(100deg, transparent 44%, rgba(255, 246, 222, .35) 48%, transparent 52%),
    repeating-linear-gradient(0deg, rgba(255, 246, 225, .05) 0 1px, rgba(50, 32, 12, .05) 1px 3px),
    linear-gradient(180deg, #B8975A, #9C7D45 52%, #8C6E3A);
  background-blend-mode: screen, normal, normal;
  box-shadow: inset 0 1px 0 rgba(255, 238, 205, .5), inset 0 -1px 0 rgba(40, 26, 10, .45), 0 8px 18px -6px rgba(0, 0, 0, .65);
  opacity: 0; transition: opacity .3s var(--ease-air);
}
.cierre-sign figcaption::before, .cierre-sign figcaption::after {
  content: ""; position: absolute; top: 50%; translate: 0 -50%;
  width: 5px; height: 5px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #D9C08F, #4A3820 70%);
  box-shadow: 0 1px 0 rgba(255, 238, 205, .25);
}
.cierre-sign figcaption::before { left: 12px; }
.cierre-sign figcaption::after { right: 12px; }
/* texto grabado: sin guion de rótulo */
.cierre-sign .eyebrow::before { display: none; }
.cierre-sign .eyebrow { color: #3A2914; text-shadow: 0 1px 0 rgba(255, 238, 205, .45); }
.cierre.is-on .cierre-sign figcaption { opacity: 1; transition: opacity .6s var(--ease-air) .6s; }
.cierre-sign-date {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: .04em;
  color: #2B1E0F;
  text-shadow: 0 1px 0 rgba(255, 238, 205, .45);
}
/* tableta: la misma composición de escritorio (titular a la izquierda, letrero bajo su luz a la derecha) */
@media (min-width: 768px) and (max-width: 1099px) {
  .cierre { --sw: clamp(220px, 30vw, 320px); --lx: calc(100% - var(--gutter) - var(--sw) / 2); --ly: 47%; }
  .cierre-sign { width: var(--sw); gap: 20px; }
  .cierre-inner > :not(.cierre-sign) { max-width: calc(100% - var(--sw) - 40px); }
  .cierre-title { font-size: clamp(40px, 5vw, 52px); }
  .cierre-sign-date { font-size: 18px; }
  .night-wood {
    background-image:
      linear-gradient(to bottom, rgba(12, 34, 66, 0) 58%, rgba(12, 34, 66, .7) 100%),
      radial-gradient(ellipse 150px 62% at var(--lx) var(--lit-top), rgba(255, 196, 128, .75) 0%, rgba(255, 176, 104, .25) 45%, rgba(255, 170, 100, 0) 78%),
      url("../assets/img/pared-nogal-v6/0001.webp");
    background-size: auto, auto, 768px 486px;
    --wash: radial-gradient(ellipse 170px 62% at var(--lx) var(--lit-top), #000 0%, rgba(0, 0, 0, .8) 24%, rgba(0, 0, 0, .28) 55%, transparent 82%);
    --spill: radial-gradient(ellipse 230px 34% at var(--lx) var(--ly), rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
  }
  .night-light { background: radial-gradient(220px 170px at var(--lx) var(--ly), rgba(255, 186, 112, .45), rgba(255, 160, 90, .1) 58%, transparent 82%); }
}
@media (max-width: 767px) {
  .cierre-sign { position: relative; right: auto; top: auto; translate: none; width: 248px; margin: 64px 0 0; justify-items: start; gap: 18px; }
  .cierre-sign figcaption { justify-items: start; }
  .cierre-sign-date { font-size: 18px; }
  /* en pantallas estrechas el letrero abre el cierre: letrero → titular → botón */
  .cierre-inner { display: flex; flex-direction: column; }
  .cierre-sign { order: -1; margin: 0 0 64px; }
  .cierre { --lx: calc(var(--gutter) + var(--lane) + 124px); padding-top: 170px; --ly: 256px; --dusk-top: 120px; --lit-top: 160px; }
  .night-wood {
    background-size: auto, auto, 768px 486px;
    background-image:
      linear-gradient(to bottom, rgba(12, 34, 66, 0) 58%, rgba(12, 34, 66, .7) 100%),
      radial-gradient(ellipse 170px 460px at var(--lx) var(--lit-top), rgba(255, 196, 128, .7) 0%, rgba(255, 176, 104, .25) 45%, rgba(255, 170, 100, 0) 78%),
      url("../assets/img/pared-nogal-v6/0001.webp");
    --wash: radial-gradient(ellipse 190px 460px at var(--lx) var(--lit-top), #000 0%, rgba(0, 0, 0, .78) 22%, rgba(0, 0, 0, .3) 52%, transparent 80%);
    --spill: radial-gradient(ellipse 210px 170px at var(--lx) var(--ly), rgba(0, 0, 0, .85) 0%, rgba(0, 0, 0, .35) 55%, transparent 100%);
  }
  .night-light {
    background: radial-gradient(200px 150px at var(--lx) var(--ly), rgba(255, 186, 112, .45), rgba(255, 160, 90, .1) 58%, transparent 82%);
  }
}
html:not(.js) .night-wood { opacity: 1; }
html:not(.js) .night-wood { filter: none; }
html:not(.js) .cierre-sign-logo { filter: var(--sign-glow); }
html:not(.js) .cierre-sign-glow { opacity: 1; }
html:not(.js) .cierre-sign-halo-wide { opacity: .85; }
@media (max-width: 640px) {
  /* el letrero crece para que «MEDICAL CENTER» se lea; la luz sigue centrada en él */
  .cierre-sign { width: min(300px, 78vw); }
  .cierre { --lx: calc(var(--gutter) + var(--lane) + min(150px, 39vw)); --ly: 258px; }
  .cierre-sign figcaption { justify-self: center; }
  .cierre-sign-halo { filter: brightness(0) drop-shadow(0 0 .75px #FFDCA6) drop-shadow(0 0 1.5px #FFC782) drop-shadow(0 0 3px rgba(255, 168, 92, .9)) drop-shadow(0 0 8px rgba(255, 146, 70, .45)); }
  .cierre-sign figcaption { padding: 8px 26px 10px; }
  .cierre-sign-date { font-size: 17px; }
}
html:not(.js) .night-light, html:not(.js) .cierre-sign-logo, html:not(.js) .cierre-sign figcaption { opacity: 1; }
.cierre-title {
  margin-top: 28px;
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(44px, 4.6vw, 66px);
  line-height: 1.02;
  letter-spacing: -.025em;
  color: rgba(255, 255, 255, .9);
  max-width: 12ch;
  text-wrap: balance;
}
.cierre-actions {
  margin-top: clamp(48px, 8vh, 88px);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 48px;
}

.btn-final {
  --h: 72px;
  padding: 0 40px;
  font-size: 20px;
  color: #fff;
  border: 1.5px solid rgba(151, 201, 203, .55);
  /* en reposo ya es un botón: relleno teal tenue; la línea al llegar lo completa */
  background: rgba(46, 124, 128, .35);
  overflow: hidden;
  isolation: isolate;
}
.btn-final::before {
  content: "";
  position: absolute; inset: -2px;
  z-index: -1;
  background: var(--teal);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform .9s var(--ease-out);
}
/* la línea llega: primero dibuja el contorno, luego lo llena */
.btn-trace {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.btn-trace rect {
  x: .75px; y: .75px;
  width: calc(100% - 1.5px); height: calc(100% - 1.5px);
  rx: calc(var(--h) / 2 - .75px);
  fill: none;
  stroke: var(--teal-light);
  stroke-width: 1.5px;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .4s var(--ease-air);
}
.btn-final.is-lit .btn-trace rect {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .7s cubic-bezier(.45, 0, .2, 1);
}
.btn-final::before { background: #2F7880; }
.btn-final.is-lit::before { transform: scaleX(1); transition: transform .4s var(--ease-out) .65s; }
/* lleno, con un canto de luz de 1 px: sin halo exterior */
.btn-final.is-lit {
  color: #fff; font-weight: 600; border-color: #2F7880;
  box-shadow: inset 0 1px 0 rgba(197, 228, 229, .45);
  transition: color .2s .65s, border-color .3s .65s, box-shadow .4s .65s;
}
.btn-final:hover::before { transform: scaleX(1); }
.btn-final:hover { color: #fff; }
.btn-final:hover .arrow { width: 34px; }
.btn-final:focus-visible { outline-color: var(--teal-light); }

.cierre-contact {
  display: grid;
  gap: 2px;
  font-size: 15px;
  color: rgba(255, 255, 255, .7);
}
.cierre-contact a {
  font-family: var(--font-display);
  font-size: 22px;
  color: #fff;
  text-decoration: none;
  letter-spacing: .02em;
}
.cierre-contact a:hover { color: var(--teal-light); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--night);
  color: rgba(255, 255, 255, .78);
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-block: 72px 32px;
  font-size: 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
}
/* el letrero encendido es el único logo grande al final: el footer lleva solo el nombre, discreto */
.footer-brand img { width: 120px; height: auto; filter: brightness(0) invert(1); opacity: .9; }
.footer-brand p { margin-top: 20px; max-width: 22em; }
.footer-col { display: grid; align-content: start; gap: 10px; }
.footer-col a { text-decoration: none; color: #fff; }
.footer-col a:hover { color: var(--teal-light); }
.footer-label {
  font-family: var(--font-display);
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase;
  color: var(--teal-light);
  margin-bottom: 6px;
}
.footer-base {
  margin-top: 64px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-size: 14px;
  color: rgba(255, 255, 255, .55);
}

/* ---------- Dock móvil ---------- */

.dock { display: none; }

/* ---------- Entradas ---------- */

html.js [data-reveal] {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
  transition: opacity .4s var(--ease-air), transform .4s var(--ease-air);
}
html.js [data-reveal].is-in { opacity: 1; transform: none; }

html.js [data-intro] {
  opacity: 0;
  transform: translate3d(0, 12px, 0);
}
html.js.is-ready [data-intro] {
  opacity: 1; transform: none;
  transition: opacity .4s var(--ease-air), transform .4s var(--ease-air);
}
html.js.is-ready [data-intro]:nth-child(2) { transition-delay: .08s; }
html.js.is-ready [data-intro]:nth-child(3) { transition-delay: .16s; }
html.js.is-ready [data-intro]:nth-child(4) { transition-delay: .24s; }

html.js [data-intro-figure] .arch {
  clip-path: inset(100% 0 0 0 round 999px 999px 6px 6px);
}
html.js.is-ready [data-intro-figure] .arch {
  clip-path: inset(0 0 0 0 round 999px 999px 6px 6px);
  transition: clip-path 1.1s var(--ease-out) .1s;
}

/* ---------- Tablet ---------- */

@media (max-width: 1100px) {
  :root { --lane: 72px; }
  .hero-copy { grid-column: 1 / span 7; }
  .hero-figure { grid-column: 8 / span 5; width: min(100%, 320px); }
  .esp-row { grid-template-columns: var(--lane) minmax(0, 1fr) 200px; }
  .esp-art-live { justify-self: end; margin-left: 0; width: 200px; }
  .esp-link { grid-template-areas: "index" "name" "desc" "more"; grid-template-columns: 1fr; }
  .esp-more { justify-self: start; margin-top: 8px; }
}

/* ---------- Móvil ---------- */

@media (max-width: 767px) {
  :root { --header-h: 64px; --lane: 44px; }
  /* el dock se oculta sobre el cierre y el footer: no hace falta reservar espacio al final */
  body { font-size: 17px; }
  .footer-base { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .brand img { height: 28px; }
  .header-inner { gap: 10px; }
  .header-cta { --h: 44px; padding: 0 18px; font-size: 15px; margin-left: auto; }
  .menu-toggle {
    display: inline-grid; place-items: center;
    width: 44px; height: 44px; margin-right: -8px;
    border: 0; background: transparent; color: var(--ink); cursor: pointer;
  }
  .menu-bars, .menu-bars::before {
    display: block; width: 20px; height: 1.5px; background: currentColor;
    transition: transform .3s var(--ease-air);
  }
  .menu-bars { position: relative; transform: translateY(-3.5px); }
  .menu-bars::before { content: ""; position: absolute; top: 7px; }
  [aria-expanded="true"] .menu-bars { transform: rotate(45deg); }
  [aria-expanded="true"] .menu-bars::before { transform: translateY(-7px) rotate(-90deg); }
  .nav {
    position: absolute; left: 0; right: 0; top: var(--header-h);
    display: grid; gap: 0; margin: 0;
    padding: 8px var(--gutter) 20px;
    background: var(--bg);
    box-shadow: 0 1px 0 var(--divider), 0 24px 40px -24px rgba(12, 34, 66, .25);
    visibility: hidden; opacity: 0; transform: translateY(-8px);
    transition: opacity .25s var(--ease-air), transform .25s var(--ease-air), visibility 0s linear .25s;
  }
  .nav.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .nav a { font-size: 22px; padding: 14px 0; border-bottom: 1px solid var(--divider); background: none; }
  .menu-open .site-header { background: var(--bg); }

  .hero { min-height: 0; padding-block: 20px 56px; display: block; }
  .hero-grid { display: block; }
  .hero-copy .display { margin-top: 18px; font-size: clamp(36px, 10.4vw, 44px); line-height: 1.05; }
  .hero-copy .lede { margin-top: 18px; font-size: 17px; }
  .hero-actions { margin-top: 24px; gap: 4px 20px; align-items: center; }
  .hero-actions .btn-primary { flex: 1 1 auto; }
  .hero-more {
    border: 0; padding: 0 4px; min-height: 48px;
    text-decoration: underline; text-underline-offset: 6px; text-decoration-color: var(--teal-light);
  }
  .hero-figure { width: min(66%, 260px); margin: 24px auto 0; }

  .esp-head { padding-left: 28px; }
  .esp-list { margin-top: 48px; }
  .esp-row {
    grid-template-columns: var(--lane) minmax(0, 1fr);
    min-height: 340px;
    align-items: start;
  }
  .esp-node { justify-self: start; margin-left: 2px; align-self: start; margin-top: 64px; width: 13px; height: 13px; }
  .esp-link { padding-block: 28px; grid-template-columns: 1fr; grid-template-areas: "index" "name" "desc" "more"; }
  .esp-name { font-size: clamp(28px, 8.4vw, 36px); }
  .esp-more { justify-self: start; margin-top: 6px; min-height: 44px; }
  .esp { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .esp-art {
    position: absolute; right: 6px; bottom: 16px;
    width: 196px; opacity: 0;
  }
  .esp-row.is-active .esp-art { opacity: 1; }
  .esp-art-live { position: absolute; width: 196px; opacity: 1; }
  /* la descripción y el enlace dejan libre la esquina del motivo */
  .esp-desc { padding-right: 0; }
  .art-glow { stroke-width: 6px; }

  .cierre { padding-block: 170px 104px; --lx: calc(var(--gutter) + 28px + 124px); --ly: 242px; }
  .cierre-inner { padding-left: calc(var(--gutter) + 28px); }
  .cierre-title { font-size: clamp(40px, 11.5vw, 54px); }
  .cierre-actions { flex-direction: column; align-items: stretch; gap: 28px; }
  .btn-final { width: 100%; --h: 64px; }

  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .footer-col a { min-height: 44px; display: flex; align-items: center; }

  .dock {
    position: fixed; z-index: 60;
    left: 0; right: 0; bottom: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: rgba(246, 248, 248, .96);
    box-shadow: 0 -1px 0 var(--divider);
    transform: translateY(110%);
    transition: transform .4s var(--ease-air);
  }
  .dock.is-shown { transform: none; }
  .dock .btn { --h: 52px; }
  .dock-call { background: var(--surface); }
}

/* ---------- Movimiento reducido ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0s !important; animation-duration: 0s !important; }
  html.js [data-reveal], html.js [data-intro] { opacity: 1; transform: none; }
  html.js [data-intro-figure] .arch { clip-path: none; }
  .arch img { transform: scale(1.04); }
  .esp-art { opacity: 1; transform: none; }
  .esp-name { opacity: 1; }
  .dock { transition: none; }
}
