/* Bricolage Grotesque (SIL OFL) servida desde el propio sitio: variable, pesos 400-600 y opsz 12-96 */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Misma paleta de siempre. Lo que cambió es cuánto se usa: campos enteros de color en vez de crema. */
:root {
  --paper: #faf6ef;
  --paper-2: #f2e4cb;
  --sand: #dcbd8c;
  --pink: #f7d8e0;
  --pink-dark: #c26f8d;
  --blue: #d7e9f1;
  --blue-dark: #4a8fa6;
  --lilac: #e4dcef;
  --ink: #4a4038;

  --step-small: clamp(0.9375rem, 0.9rem + 0.1vw, 1rem);
  --step-body: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  --step-lead: clamp(1.5rem, 1.1rem + 1.3vw, 2.25rem);
  --step-head: clamp(3rem, 1.6rem + 5.2vw, 6.5rem);
  /* El tamaño sale del ancho de la foto: la palabra "kairos" entra justo adentro */
  --name-inset: 14px;
  --step-name: min(calc((47vw - var(--margin) - 2 * var(--name-inset)) / 2.39), 46svh);

  /* Grano de papel para que los campos de color no queden lisos */
  --grain-dark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.2 0 0 0 0 0.2 0 0 0 0 0.2 0.34 0 0 0 -0.145'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  --grain-light: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0.22 0 0 0 -0.095'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");

  --margin: clamp(16px, 1.4vw, 20px);
  --radius: 28px;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ink); } /* dark rubber-band overscroll on Mac, matching the dark hero and footer */
body {
  margin: 0;
  font-family: "Bricolage Grotesque", "Helvetica Neue", Arial, sans-serif;
  font-optical-sizing: auto;
  font-size: var(--step-body);
  line-height: 1.45;
  letter-spacing: -0.005em;
  color: var(--ink);
  background: var(--paper);
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
/* En los campos oscuros (y la página 404) el anillo va en rosa */
:is(.hero, .contact, .foot, .lightbox, .not-found) :focus-visible { outline-color: var(--pink); }
::selection { background: var(--pink-dark); color: var(--paper); }

h2 {
  font-size: var(--step-head);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.link {
  text-decoration: underline;
  text-decoration-thickness: 0.07em;
  text-underline-offset: 0.2em;
  transition: text-underline-offset 200ms ease;
}
.link:hover { text-underline-offset: 0.34em; }

/* Un solo botón en toda la página: redondo del todo */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.5em;
  border-radius: 999px;
  background: var(--pink);
  color: var(--ink);
  font-weight: 500;
  text-decoration: none;
  transition: background-color 200ms ease, transform 300ms var(--ease-out);
}
.btn:hover { background: var(--paper); transform: translateY(-2px); }
.space .btn:hover { background: var(--paper-2); }
.btn:active { transform: scale(0.97); }
.btn .icon { transition: transform 300ms var(--ease-out); }
.btn:hover .icon { transform: rotate(-10deg) scale(1.1); }
.icon { width: 1.25em; height: 1.25em; fill: currentColor; flex-shrink: 0; }

/* ---------- Escenario dividido: foto fija a la izquierda, lectura a la derecha ---------- */
.split {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 47% 53%;
  background-color: var(--paper);
  background-image: var(--grain-dark);
}
/* El primer pantallazo es un campo oscuro de lado a lado */
.split::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: max(100svh, 640px);
  background-color: var(--ink);
  background-image: var(--grain-light);
  z-index: -1;
}

.stage {
  position: sticky;
  top: 0;
  height: 100svh;
  padding: var(--margin) 0 var(--margin) var(--margin);
  z-index: 1;
}
.stage-frame {
  position: relative;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.stage-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  scale: 1.05;
  transition: opacity 900ms ease, scale 1400ms var(--ease-out);
}
.stage-frame img.is-on { opacity: 1; scale: 1; }
/* Velo neutro solo en la primera foto, donde el nombre la cruza */
.stage-frame .scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 48%;
  background: linear-gradient(to top, rgba(40, 34, 29, 0.6), rgba(40, 34, 29, 0)); /* taste-skill-ignore: velo neutro bajo el nombre */
  transition: opacity 900ms ease;
}
.stage[data-room]:not([data-room="ventanal"]) .scrim { opacity: 0; }
.stage-caption {
  position: absolute;
  top: 14px;
  left: 14px;
  padding: 0.4em 0.9em;
  border-radius: 999px;
  background: var(--paper);
  font-size: var(--step-small);
  font-weight: 500;
  line-height: 1.3;
}

.reading { min-width: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 640px;
  overflow: hidden;
  padding: 84px var(--margin) 0 clamp(32px, 4vw, 56px);
  background-color: var(--ink);
  background-image: var(--grain-light);
  color: var(--paper);
}
/* Las calles alrededor del consultorio, como dibujo de fondo */
.streets {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--paper);
  pointer-events: none;
}
.nav {
  position: absolute;
  top: 28px;
  right: clamp(20px, 2.2vw, 32px);
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  font-size: 1rem;
}
.nav a { white-space: nowrap; text-decoration: none; transition: color 200ms ease; }
.nav a:hover { color: var(--pink); }
@media (max-width: 1180px) { .nav .hide-sm { display: none; } }

.hero-copy { position: relative; z-index: 3; }
.hero-line {
  max-width: 36ch;
  text-wrap: pretty;
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.025em;
}
.areas { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
/* Tres y dos en vez de cuatro y una suelta: el ancho máximo corta la fila después de la tercera */
.areas { max-width: 27em; }
.area {
  display: block;
  padding: 0.4em 0.95em;
  border-radius: 999px;
  color: var(--ink);
  font-size: var(--step-small);
  font-weight: 500;
  text-decoration: none;
  transition: transform 300ms var(--ease-out);
}
.area:hover { transform: translateY(-2px); }
.area-blue { background: var(--blue); }
.area-sand { background: var(--paper-2); }
.area-pink { background: var(--pink); }
.area-ocher { background: var(--sand); }
.area-lilac { background: var(--lilac); }
.hero-facts { margin-top: 18px; display: grid; gap: 2px; }
.hero-facts p { display: flex; flex-wrap: wrap; column-gap: 0.7em; }
.hero-btn { margin-top: 20px; box-shadow: 0 0 0 6px var(--ink); } /* separa el botón del nombre rosa si se pisan */
/* Abierto o cerrado ahora, con un punto de color */
.open-now[data-short] { white-space: nowrap; }
.open-now[data-short]::before {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-right: 0.4em;
  transform: translateY(-0.05em);
  border-radius: 50%;
  background: var(--sand);
}
.open-now.is-open[data-short]::before { background: #9fd6a8; }

.name {
  position: absolute;
  left: calc(var(--margin) + var(--name-inset));
  right: var(--margin);
  top: max(100svh, 640px);
  transform: translateY(calc(-100% - 24px));
  z-index: 2;
  display: flex;
  justify-content: space-between;
  gap: 0.2em;
  margin: 0;
  font-size: var(--step-name);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--pink);
  pointer-events: none;
  transform-origin: 50% 100%;
  clip-path: inset(-8% -2% 0 -2%);
}
.name .ch { display: inline-block; }

/* ---------- Profesionales: bloques de color de distinto tamaño ---------- */
.team {
  padding: clamp(64px, 6vw, 88px) var(--margin) clamp(72px, 8vw, 120px) clamp(32px, 4vw, 56px);
}
.team-intro { margin-top: 20px; max-width: 46ch; }
.finder { margin-top: 28px; }
html:not(.js) .finder { display: none; }
.finder-q { font-weight: 500; }
.finder-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.finder-options button {
  font: inherit;
  font-size: var(--step-small);
  color: var(--ink);
  background: var(--paper-2);
  border: 0;
  border-radius: 999px;
  padding: 0.7em 1.15em;
  cursor: pointer;
  text-align: left;
  transition: background-color 200ms ease, color 200ms ease, transform 300ms var(--ease-out);
}
.finder-options button:hover { background: var(--sand); transform: translateY(-2px); }
.finder-options button:active { transform: scale(0.97); }
.finder-options button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.finder-result { margin-top: 12px; min-height: 1.45em; }

.groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}
/* Con la foto al lado, dos columnas no dejan lugar para los nombres */
@media (min-width: 901px) and (max-width: 1180px) { .groups { grid-template-columns: minmax(0, 1fr); } }
.group {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  min-height: 248px;
  padding: 24px 28px 28px;
  border-radius: var(--radius);
  transition: opacity 300ms ease, transform 500ms var(--ease-out);
}
.group > :not(.group-art) { position: relative; }
/* gap alto: la onda de voz no pisa los nombres */
.group[data-area="habla"] { background: var(--blue); gap: 72px; }
/* Aprendizaje va sobre renglones de cuaderno, con su margen */
.group[data-area="aprendizaje"] {
  min-height: 256px;
  gap: 32px;
  padding: 32px 28px 32px 40px;
  background-position: 0 -7px;
  background-color: var(--paper-2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='32'%3E%3Cpath d='M0 31.25h8' stroke='%23dcbd8c' stroke-opacity='.75' stroke-width='1.5'/%3E%3C/svg%3E");
}
.group[data-area="aprendizaje"]::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 26px;
  width: 2px;
  background: var(--pink-dark);
  opacity: 0.6;
}
.group[data-area="aprendizaje"] :is(.group-name, .who, .what, .detail) { margin: 0; line-height: 32px; }
.group[data-area="aprendizaje"] { justify-content: flex-start; }
.group[data-area="aprendizaje"] ul { gap: 32px; }
.group[data-area="emociones"] { background: var(--pink); grid-column: 1 / -1; }
.group[data-area="temprana"] { background: var(--sand); grid-column: 1 / -1; min-height: 190px; }
.group[data-area="musica"] { background: var(--lilac); grid-column: 1 / -1; min-height: 190px; }
.group.is-match { outline: 3px solid var(--ink); outline-offset: 4px; }
.group-name { font-size: inherit; font-weight: 500; line-height: inherit; letter-spacing: inherit; }
.group ul { display: grid; gap: 20px; }
.who {
  display: block;
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.025em;
}
.what { display: block; margin-top: 6px; font-size: var(--step-small); }
.detail { display: block; margin-top: 4px; font-size: var(--step-small); }
.group-art { position: absolute; }
/* Una onda de voz, tres círculos que se cruzan y bloques apilados */
.art-wave { top: 56px; left: 28px; width: calc(100% - 56px); height: 54px; color: var(--blue-dark); }
.art-rings { top: 16px; right: 20px; width: 130px; color: var(--pink-dark); }
.art-blocks { top: 18px; right: 20px; width: 110px; color: var(--ink); opacity: 0.55; }
.art-notes { top: 18px; right: 20px; width: 84px; color: var(--ink); opacity: 0.55; }

/* ---------- Cómo empezar: fichas que se apilan ---------- */
.how {
  position: relative;
  overflow: clip;
  padding: clamp(72px, 8vw, 120px) var(--margin) clamp(150px, 15vw, 210px);
  background-color: var(--blue);
  background-image: var(--grain-dark);
}
/* Ondas de voz sobre el borde inferior */
.how-wave {
  position: absolute;
  left: -4%;
  bottom: 0;
  width: 108%;
  height: clamp(100px, 11vw, 150px);
  color: var(--blue-dark);
  opacity: 0.45;
}
.how-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 24px;
  align-items: start;
}
.how-text {
  grid-column: 1 / span 5;
  position: sticky;
  top: 32px;
  padding-left: clamp(0px, 1.2vw, 16px);
}
.how-text p { margin-top: 24px; max-width: 30ch; }
.how-text .btn { margin-top: 24px; }
.steps { grid-column: 6 / -1; display: grid; gap: 16px; }
.step {
  position: sticky;
  top: var(--stack);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
  min-height: 290px;
  padding: 30px 36px 32px;
  border-radius: var(--radius);
}
.step h3 {
  font-size: var(--step-head);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.04em;
}
.step ul { display: grid; gap: 10px; }
.step ul li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
}
.step .when { font-size: var(--step-small); white-space: nowrap; }
/* --rest reserva lugar abajo para que las tres se suelten juntas y ninguna tape a la anterior */
.step-a { --stack: 24px; --rest: 256px; margin-bottom: var(--rest); background: var(--paper); }
.step-b { --stack: 152px; --rest: 128px; margin-top: -256px; margin-bottom: var(--rest); background: var(--pink); }
.step-c { --stack: 280px; margin-top: -128px; background: var(--ink); color: var(--paper); }
/* En ventanas muy bajas las fichas no entran apiladas */
@media (max-height: 700px) { .step { position: static; margin-block: 0 !important; } .how-text { position: static; } }

/* ---------- El espacio: fila que se arrastra, sobre hoja de cuaderno ---------- */
.space {
  position: relative;
  padding: clamp(64px, 7vw, 104px) 0 clamp(72px, 8vw, 120px);
  background-color: var(--paper);
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='44'%3E%3Cpath d='M0 43.25h8' stroke='%234a8fa6' stroke-opacity='.2' stroke-width='1.5'/%3E%3C/svg%3E"),
    var(--grain-dark);
}
.space-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding-inline: clamp(16px, 2.6vw, 36px);
  margin-bottom: 36px;
}
.space-side { display: flex; align-items: center; gap: 20px; }
.reel {
  display: flex;
  gap: 12px;
  height: 70svh;
  min-height: 420px;
  padding-block: 6px; /* lugar para el anillo de foco */
  padding-inline: var(--margin);
  overflow: auto hidden;
  scroll-snap-type: x proximity;
  scroll-padding-inline: var(--margin);
  scrollbar-width: none;
  cursor: grab;
}
.reel::-webkit-scrollbar { display: none; }
.reel.is-dragging { cursor: grabbing; scroll-snap-type: none; }
.reel a {
  display: block;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--paper-2);
}
.reel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 900ms var(--ease-out);
  -webkit-user-drag: none;
}
.reel a:hover img { transform: scale(1.04); }
.m { flex: none; scroll-snap-align: start; }
.m-tall { aspect-ratio: 3 / 4; height: 100%; }
.m-wide { aspect-ratio: 16 / 10; height: 100%; }
.m-wide img { object-position: 50% 72%; }
.m-pair { display: grid; grid-template-rows: 1fr 1fr; gap: 12px; height: 100%; aspect-ratio: 2 / 3.05; }

/* Indicador de la galería: frase grande, avance y flechas */
.reel-nav {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 24px clamp(16px, 2.6vw, 36px) 0;
}
.reel-hint {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: var(--step-lead);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}
.reel-arrow { width: 0.95em; height: 0.95em; color: var(--pink-dark); }
.reel-bar, .reel-btns { display: none; }
.js .reel-bar {
  display: block;
  flex: 1;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--paper-2);
}
.reel-bar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--ink);
  transform: scaleX(var(--progress, 0.3));
  transform-origin: 0 50%;
  transition: transform 200ms linear;
}
.js .reel-btns { display: flex; gap: 8px; }
.reel-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: var(--paper);
  cursor: pointer;
  transition: background-color 200ms ease, color 200ms ease, transform 300ms var(--ease-out);
}
.reel-btn:hover { background: var(--pink); color: var(--ink); }
.reel-btn:active { transform: scale(0.94); }
.reel-btn:disabled { opacity: .35; cursor: default; }
.reel-back { transform: rotate(180deg); }

/* ---------- Contacto: la página cierra en oscuro, como abrió ---------- */
.contact {
  position: relative;
  overflow: clip;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px 24px;
  align-items: stretch;
  padding: clamp(72px, 8vw, 112px) var(--margin) var(--margin);
  border-radius: var(--radius) var(--radius) 0 0;
  background-color: var(--ink);
  background-image: var(--grain-light);
  color: var(--paper);
  margin-top: calc(-1 * var(--radius));
}
.contact-head {
  position: relative;
  grid-column: 1 / -1;
  padding-left: clamp(0px, 1.2vw, 16px);
}
.contact-head .streets {
  inset: calc(-1 * clamp(72px, 8vw, 112px)) calc(-1 * var(--margin)) calc(-1 * 48px);
  width: calc(100% + 2 * var(--margin));
  height: calc(100% + clamp(72px, 8vw, 112px) + 48px);
}
.contact h2 { position: relative; max-width: 75%; color: var(--pink); }
.contact-act {
  position: relative;
  grid-column: 1 / span 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 28px;
  padding-left: clamp(0px, 1.2vw, 16px);
}
.contact-line {
  font-size: var(--step-lead);
  font-weight: 500;
  line-height: 1.14;
  letter-spacing: -0.025em;
}
.contact-meta { margin-top: auto; display: grid; gap: 8px; }
.map {
  position: relative;
  grid-column: 6 / -1;
  display: block;
  width: 100%;
  min-height: 440px;
  border: 0;
  border-radius: var(--radius);
  background: var(--paper-2);
}

/* ---------- Pie: el nombre vuelve de lado a lado ---------- */
.foot {
  padding: clamp(56px, 6vw, 80px) var(--margin) 24px;
  background-color: var(--ink);
  background-image: var(--grain-light);
  color: var(--paper);
  font-size: var(--step-small);
}
.foot-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: baseline;
  gap: 24px;
  padding-inline: clamp(0px, 1.2vw, 16px);
}
.foot-row > span:first-child { max-width: 34ch; }
.foot nav { display: flex; gap: 24px; }
.foot nav a { padding-block: 11px; }
.foot a { text-decoration: none; transition: color 200ms ease; }
.foot a:hover { color: var(--pink); }
.foot .end { text-align: right; }
.foot-name {
  display: flex;
  justify-content: space-between;
  gap: 0.2em;
  margin-top: 40px;
  padding-left: var(--name-inset);
  font-size: var(--step-name);
  font-weight: 600;
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  color: var(--pink);
}

.wa-float {
  position: fixed;
  right: 20px;
  bottom: calc(20px + env(safe-area-inset-bottom));
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--ink);
  box-shadow: 0 6px 18px rgba(74, 64, 56, 0.25); /* taste-skill-ignore: botón flotante */
  transition: opacity 300ms ease, translate 400ms var(--ease-out), scale 300ms var(--ease-out), visibility 300ms;
}
.wa-float:hover { scale: 1.08; }
.wa-float .icon { width: 28px; height: 28px; }
.js .wa-float:not(.is-on) { opacity: 0; visibility: hidden; translate: 0 16px; pointer-events: none; }

/* ---------- Teléfono ---------- */
@media (max-width: 900px) {
  :root { --radius: 20px; }
  .split { display: flex; flex-direction: column; }
  .split::before { display: none; }
  .stage, .name { background-color: var(--ink); background-image: var(--grain-light); }
  .stage { order: 1; }
  .name { order: 2; }
  .reading { order: 3; }
  .stage {
    position: relative;
    height: 38svh;
    min-height: 210px;
    padding: 12px 12px 0;
  }
  .stage-frame img:not(:first-of-type) { display: none; }
  .stage-frame img:first-of-type { opacity: 1; scale: 1; }
  .stage-frame .scrim { display: none; }
  .nav { display: none; }
  .hero {
    height: auto;
    min-height: 0;
    padding: 16px 20px 40px;
  }
  .name {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    justify-content: center;
    gap: 0.22em;
    padding: 18px 16px 0;
    font-size: min(17.2vw, 34svh);
  }
  .hero-line { max-width: none; }
  .areas { margin-top: 16px; }
  .area { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0.7em; }
  .finder-options button { min-height: 44px; }
  .hero-facts { margin-top: 16px; }
  .team { padding: 64px 20px 72px; }
  .groups { grid-template-columns: minmax(0, 1fr); }
  .group { min-height: 196px; gap: 32px; padding: 20px 22px 24px; }
  .group[data-area="aprendizaje"] { min-height: 288px; padding: 32px 22px 32px 36px; }
  .group[data-area="temprana"], .group[data-area="musica"] { min-height: 172px; }
  .group[data-area="aprendizaje"]::before { left: 22px; }
  .art-wave { top: 52px; left: 22px; width: calc(100% - 44px); height: 56px; }
  .art-rings { top: 14px; right: 14px; width: 96px; }
  .art-blocks { top: 16px; right: 16px; width: 76px; }
  .art-notes { top: 16px; right: 16px; width: 58px; }
  .group[data-area="habla"] { min-height: 220px; gap: 72px; }
  .how { padding: 64px 12px 124px; }
  .how-grid { grid-template-columns: minmax(0, 1fr); gap: 36px; }
  .how-text { grid-column: 1; position: static; padding-inline: 8px; }
  .steps { grid-column: 1; gap: 12px; }
  .step { min-height: 250px; gap: 28px; padding: 22px 22px 24px; }
  .step-a { --stack: 12px; --rest: 160px; }
  .step-b { --stack: 92px; --rest: 80px; margin-top: -160px; }
  .step-c { --stack: 172px; margin-top: -80px; }
  .step ul li { gap: 16px; }
  .step .when { white-space: normal; text-align: right; flex: none; max-width: 40%; }
  .space { padding-block: 56px 72px; }
  .space-head { padding-inline: 20px; margin-bottom: 24px; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
  .space-side { width: 100%; justify-content: space-between; }
  .reel { height: 58svh; min-height: 0; gap: 8px; padding-inline: 12px; scroll-padding-inline: 12px; }
  .m-tall { width: 76vw; height: 100%; aspect-ratio: auto; }
  .m-pair { width: 66vw; aspect-ratio: auto; gap: 8px; }
  .m-wide { width: 88vw; height: 100%; aspect-ratio: auto; }
  .reel-nav { flex-wrap: wrap; justify-content: space-between; gap: 14px 12px; padding: 18px 20px 0; }
  .reel-hint { font-size: 1.25rem; }
  .js .reel-bar { order: 3; flex: 1 0 100%; }
  .reel-btn { width: 46px; height: 46px; }
  .contact { grid-template-columns: minmax(0, 1fr); gap: 36px; padding: 64px 12px 12px; }
  .contact-head { padding-inline: 8px; }
  .contact-head .streets {
    inset: -64px -12px -36px;
    width: calc(100% + 24px);
    height: calc(100% + 100px);
  }
  .streets-names { display: none; }
  .contact h2 { max-width: none; }
  .contact-act { padding-inline: 8px; }
  .contact-act, .map { grid-column: 1; }
  .map { min-height: 320px; }
  .foot { padding: 48px 12px 24px; }
  .foot-row { grid-template-columns: minmax(0, 1fr); gap: 12px; padding-inline: 8px; }
  .foot nav { display: grid; grid-template-columns: repeat(2, max-content); gap: 8px 20px; }
  .foot nav a { padding-block: 12px; }
  .foot .end { text-align: left; }
  .foot-name { justify-content: center; gap: 0.22em; margin-top: 32px; padding-left: 0; font-size: min(17.2vw, 34svh); }
}

/* ---------- Movimiento ---------- */
@media (prefers-reduced-motion: reduce) { .stage-frame img { scale: 1; } }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .js [data-reveal] {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out);
    transition-delay: calc(var(--i, 0) * 80ms);
  }
  .js [data-reveal].is-in, .js [data-reveal]:focus-within, .js [data-reveal]:focus { opacity: 1; transform: none; }
  /* Los que tienen su propio movimiento al pasar el mouse lo recuperan una vez que entraron */
  .js .btn[data-reveal].is-in { transition: background-color 200ms ease, transform 300ms var(--ease-out); }
  .js .btn[data-reveal].is-in:hover { transform: translateY(-2px); }
  .js .group[data-reveal].is-in { transition: opacity 300ms ease, transform 500ms var(--ease-out); }

  .hero [data-rise] {
    opacity: 0;
    animation: rise 900ms var(--ease-out) forwards;
    animation-delay: calc(var(--i, 0) * 90ms + 300ms);
  }
  @keyframes rise { from { opacity: 0; translate: 0 24px; } to { opacity: 1; translate: 0 0; } }

  /* El nombre sube letra por letra desde abajo */
  .name .ch {
    animation: letter 1100ms var(--ease-out) both;
    animation-delay: calc(var(--n) * 38ms + 100ms);
  }
  @keyframes letter { from { transform: translateY(105%); } to { transform: none; } }

  /* La foto del primer ambiente se acerca despacio al cargar */
  .stage-frame img:first-of-type { animation: settle 14s var(--ease-out) both; }
  @keyframes settle { from { scale: 1.1; } to { scale: 1; } }

  /* La flecha de la galería empuja hacia la derecha */
  .reel-arrow { animation: nudge 1800ms var(--ease-out) infinite; }
  @keyframes nudge { 0%, 100% { translate: 0 0; } 45% { translate: 0.22em 0; } }

  @supports (animation-timeline: view()) {
    /* Las fichas de Cómo empezar se achican apenas cuando la siguiente las tapa */
    .step-a, .step-b {
      animation: step-back linear both;
      animation-timeline: view();
      animation-range: exit-crossing 0% exit-crossing 100%;
    }
    @keyframes step-back { to { scale: 0.97; } }

    /* Las ondas de voz se corren apenas al bajar */
    .how-wave {
      animation: wave-drift linear both;
      animation-timeline: view();
    }
    @keyframes wave-drift { from { translate: -3% 0; } to { translate: 3% 0; } }
  }
}

/* ---------- Vista ampliada de las fotos ---------- */
.lightbox {
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0;
  padding: 4rem 4.5rem;
  border: none;
  background: transparent;
  overflow: hidden;
}
.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox::backdrop { background: rgba(40, 32, 26, 0.92); }
.lightbox-img { max-width: 100%; max-height: 100%; width: auto; border-radius: var(--radius); }
.lightbox-btn {
  position: absolute;
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 200ms ease, transform 300ms var(--ease-out);
}
.lightbox-btn:hover { background: var(--pink); }
.lightbox-btn:active { transform: scale(0.94); }
.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev, .lightbox-next { top: calc(50% - 24px); }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
body:has(.lightbox[open]) { overflow: hidden; }
@media (max-width: 900px) { .lightbox { padding: 4rem 0.75rem; } }
