/*
 * HomeMontessori (Theme 6) — hoja de estilos única, FUENTE DE VERDAD (INT-02R, sin compilación).
 * Origen: landing Montessori Fase 05A v0.5.1 (src/styles/*.css), concatenada en el orden de main.ts:
 * fonts · tokens · main · sections · interludio · hero · motion. Se edita directamente aquí.
 * Las fuentes se resuelven en ../fonts/ (mismos archivos woff2 subsetteados de la 05A).
 */

/* ==== fonts.css ==== */
/* GENERADO por scripts/build-fonts.py — no editar a mano.
   Subconjuntos de Fraunces y Manrope (SIL Open Font License) para el prototipo. */
@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 700;
  src: url('../fonts/fraunces-normal.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0-00A1, U+00AA-00AB, U+00B0, U+00B7, U+00BA-00BB, U+00BF, U+00C1, U+00C9, U+00CD, U+00D1, U+00D3, U+00D7, U+00DA, U+00DC, U+00E1, U+00E9, U+00ED, U+00F1, U+00F3, U+00FA, U+00FC, U+2013-2014, U+2018-2019, U+201C-201D, U+2026;
}
@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 400 500;
  src: url('../fonts/fraunces-italic.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0-00A1, U+00AA-00AB, U+00B0, U+00B7, U+00BA-00BB, U+00BF, U+00C1, U+00C9, U+00CD, U+00D1, U+00D3, U+00D7, U+00DA, U+00DC, U+00E1, U+00E9, U+00ED, U+00F1, U+00F3, U+00FA, U+00FC, U+2013-2014, U+2018-2019, U+201C-201D, U+2026;
}
@font-face {
  font-family: 'Manrope Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 400 800;
  src: url('../fonts/manrope.woff2') format('woff2');
  unicode-range: U+0020-007E, U+00A0-00A1, U+00AA-00AB, U+00B0, U+00B7, U+00BA-00BB, U+00BF, U+00C1, U+00C9, U+00CD, U+00D1, U+00D3, U+00D7, U+00DA, U+00DC, U+00E1, U+00E9, U+00ED, U+00F1, U+00F3, U+00FA, U+00FC, U+2013-2014, U+2018-2019, U+201C-201D, U+2026, U+2193;
}

/* ==== tokens.css ==== */
/* Paleta derivada del logotipo (muestreo de Images/Logos/logo.png):
   azul #003080 · verde #30B000 · amarillo #E0B000 · rojo #F01000.
   Se refinan para pantalla y contraste; el azul marino domina. */
:root {
  --navy-950: #08132e;
  --navy-900: #0b1b3f;
  --navy-800: #122a5c;
  --navy: #17378a;
  --navy-200: #c9d3ea;
  --green: #2f9a26;
  --green-ink: #1f6e19;
  --yellow: #e8b100;
  --yellow-soft: #fbe9a6;
  --red: #dc2f1e;
  --red-ink: #b22314;

  --ivory: #f7f3ea;
  --paper: #fffdf8;
  --sand: #ece5d6;
  --ink: #131c33;
  --ink-soft: #444c63;
  --line: #ddd5c4;

  --font-display: 'Fraunces Variable', 'Iowan Old Style', Georgia, serif;
  --font-text: 'Manrope Variable', 'Segoe UI', system-ui, sans-serif;

  --step--1: clamp(0.82rem, 0.8rem + 0.1vw, 0.88rem);
  --step-0: clamp(1rem, 0.96rem + 0.18vw, 1.1rem);
  --step-1: clamp(1.18rem, 1.1rem + 0.35vw, 1.35rem);
  --step-2: clamp(1.45rem, 1.3rem + 0.7vw, 1.9rem);
  --step-3: clamp(1.9rem, 1.55rem + 1.6vw, 3rem);
  --step-4: clamp(2.7rem, 1.9rem + 4vw, 5.6rem);

  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgb(11 27 63 / 0.06), 0 12px 32px -12px rgb(11 27 63 / 0.18);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* Motion (Fase 4): una sola familia de duraciones, curvas y distancias.
     Espejo en src/motion/tokens.ts para GSAP. */
  --m-fast: 200ms;
  --m-base: 520ms;
  --m-slow: 760ms;
  --m-stagger: 70ms;
  --m-ease-out: cubic-bezier(0.16, 1, 0.3, 1); /* expo-out suave: entradas */
  --m-ease-in-out: cubic-bezier(0.65, 0, 0.35, 1); /* transformaciones entre estados */
  --m-distance: 22px;
}

/* ==== main.css ==== */
/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; overflow-x: clip; }
body {
  margin: 0;
  background: var(--ivory);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: var(--step-0);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, h5, h6, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; }

:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.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;
}
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy-900); color: var(--paper); padding: 10px 16px; border-radius: 8px;
}
.skip-link:focus { top: 12px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: var(--step--1); font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before {
  content: ''; width: 22px; height: 10px; flex: none;
  background: linear-gradient(90deg, var(--navy) 0 25%, var(--green) 25% 50%, var(--yellow) 50% 75%, var(--red) 75%);
  border-radius: 2px;
}
.eyebrow--light { color: var(--yellow); }

/* Tonos de los bloques del logo */
.tone--navy { --tone: var(--navy); --tone-ink: var(--navy); --tone-soft: #e3e8f5; }
.tone--green { --tone: var(--green); --tone-ink: var(--green-ink); --tone-soft: #e2f1dc; }
.tone--yellow { --tone: var(--yellow); --tone-ink: #8a6500; --tone-soft: #fbefc6; }
.tone--red { --tone: var(--red); --tone-ink: var(--red-ink); --tone-soft: #fbe2de; }

.icon { width: 100%; height: 100%; display: block; }
.icon--xs { width: 14px; height: 14px; display: inline-block; flex: none; }
.icon--sm { width: 20px; height: 20px; display: inline-block; flex: none; }

.section-head { max-width: 760px; margin-bottom: clamp(36px, 5vw, 64px); }
.section-title {
  font-family: var(--font-display); font-weight: 560; font-size: var(--step-3);
  line-height: 1.08; letter-spacing: -0.015em; margin-top: 14px; font-variation-settings: 'opsz' 96;
}
.section-lead { margin-top: 16px; font-size: var(--step-1); color: var(--ink-soft); max-width: 60ch; }
.section-head--light .section-lead { color: var(--navy-200); }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 24px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 700; font-size: 0.98rem; letter-spacing: 0.01em; text-decoration: none; cursor: pointer;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn--sm { min-height: 44px; padding: 8px 18px; font-size: 0.92rem; }
.btn--lg { min-height: 56px; padding: 14px 28px; font-size: 1.02rem; }
.btn--navy { background: var(--navy-900); color: var(--paper); }
.btn--navy:hover { background: var(--navy); }
.btn--ghost { border-color: currentColor; color: var(--navy-900); background: transparent; }
.btn--ghost:hover { background: var(--navy-900); color: var(--paper); border-color: var(--navy-900); }
.btn--yellow { background: var(--yellow); color: var(--navy-950); }
.btn--yellow:hover { background: #ffc61a; }
.btn__arrow { font-size: 1.05em; line-height: 1; }

/* ---------- Cabecera ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(247 243 234 / 0.9); backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent; transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgb(11 27 63 / 0.4); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.site-header__brand { display: block; flex: none; border-radius: 8px; }
.site-header__logo img { height: 56px; width: auto; }

.site-nav { display: flex; align-items: center; gap: 28px; }
.site-nav ul { display: flex; gap: 26px; }
/* :not(.btn): desde Fase 5 el CTA de la cabecera es un enlace (mejora progresiva) y conserva su estilo de botón. */
.site-nav a:not(.btn) {
  font-weight: 600; font-size: 0.95rem; text-decoration: none; color: var(--ink);
  background: linear-gradient(var(--yellow), var(--yellow)) 0 100% / 0 2px no-repeat;
  padding-block: 4px; transition: background-size 0.25s var(--ease);
}
.site-nav a:not(.btn):hover { background-size: 100% 2px; }
.site-nav__aside { display: flex; align-items: center; gap: 18px; padding-left: 26px; border-left: 1px solid var(--line); }
.portal-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  font-size: 0.9rem; font-weight: 700; color: var(--ink-soft); text-decoration: none;
}
.portal-link:hover { color: var(--navy); text-decoration: underline; text-underline-offset: 4px; }

.menu-toggle { display: none; }

@media (max-width: 959px) {
  .site-header__inner { min-height: 66px; }
  .site-header__logo img { height: 50px; }
  .menu-toggle {
    display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
    border: 1.5px solid var(--line); background: var(--paper); cursor: pointer;
  }
  .menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after {
    display: block; width: 20px; height: 2px; background: var(--navy-900); border-radius: 2px;
    transition: transform 0.25s var(--ease), opacity 0.2s;
  }
  .menu-toggle__bars { position: relative; }
  .menu-toggle__bars::before, .menu-toggle__bars::after { content: ''; position: absolute; left: 0; }
  .menu-toggle__bars::before { top: -6px; }
  .menu-toggle__bars::after { top: 6px; }
  .menu-open .menu-toggle__bars { background: transparent; }
  .menu-open .menu-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
  .menu-open .menu-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

  .site-nav {
    position: absolute; inset: 100% 0 auto; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: 8px var(--gutter) 24px; display: none;
  }
  .menu-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav li a { display: block; padding: 14px 0; font-size: 1.1rem; border-bottom: 1px solid var(--line); background: none; }
  .site-nav__aside { padding: 18px 0 0; border: 0; justify-content: space-between; flex-wrap: wrap; }
}

/* ---------- Hero ---------- */
/* Fase 05A: el relleno superior y el espacio previo al lema pasan a cada escena (hero.css), para que el fondo
   de cada escena cubra todo su bloque. Medidas idénticas a la Fase 5. */
.hero { position: relative; padding: 0 0 clamp(36px, 5vw, 56px); overflow: clip; }
.hero__grid {
  display: grid; grid-template-columns: 1.04fr 0.96fr; column-gap: clamp(32px, 5vw, 72px);
  grid-template-areas: 'head blocks' 'cta blocks' 'cta quote';
}
.hero__head { grid-area: head; align-self: end; }
/* Anclado arriba (Fase 4): con align-self:end los bloques se desplazaban al cambiar la fuente (CLS ≈ 0.09 a 1024 px). */
.hero__blocks { grid-area: blocks; align-self: start; margin-top: clamp(28px, 5vw, 76px); }
.hero__cta { grid-area: cta; }
.hero__quote { grid-area: quote; }
.hero__title-wrap { position: relative; display: block; width: fit-content; margin-top: 18px; padding-right: 28px; }
.hero__title {
  font-family: var(--font-display); font-weight: 520; font-size: var(--step-4);
  line-height: 0.98; letter-spacing: -0.025em; color: var(--navy-900); font-variation-settings: 'opsz' 144;
}
.hero__line { display: block; }
.hero__line--2 { font-style: italic; font-weight: 400; color: var(--green-ink); }
.hero__line--4 { position: relative; display: inline-block; }
.hero__line--4::after {
  content: ''; position: absolute; left: 0.04em; right: 0.1em; bottom: 0.22em; height: 0.14em; z-index: -1; /* 0.06em + padding de la máscara (motion.css) */
  background: var(--yellow); border-radius: 3px; opacity: 0.85;
}
.hero__lead { margin-top: 24px; font-size: var(--step-1); color: var(--ink-soft); max-width: 46ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  margin-top: clamp(32px, 4vw, 48px); padding-top: 22px; border-top: 1px solid var(--line); max-width: 560px;
}
.fact dt { font-family: var(--font-display); font-size: var(--step-3); line-height: 1; color: var(--navy); font-weight: 600; }
.fact dd { margin-top: 8px; font-size: var(--step--1); color: var(--ink-soft); line-height: 1.35; }

.blocks {
  --h: clamp(300px, 40vw, 540px);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(8px, 1.2vw, 14px);
  align-items: end; height: var(--h); padding-top: 22px;
}
.block {
  position: relative; height: 100%; border-radius: 48% 48% 10px 10px / 16% 16% 10px 10px;
  background: var(--navy-900); box-shadow: var(--shadow);
}
.block:nth-child(1) { height: 76%; }
.block:nth-child(2) { height: 90%; }
.block:nth-child(3) { height: 82%; }
.block:nth-child(4) { height: 100%; }
.block__img, .block__img img { width: 100%; height: 100%; }
.block__img { display: block; border-radius: inherit; overflow: hidden; }
.block__img img { object-fit: cover; object-position: var(--focus, 50% 50%); }
.block--green::before {
  /* Pestaña circular del segundo bloque del logo */
  content: ''; position: absolute; left: 50%; top: -18px; width: 30px; height: 30px; translate: -50% 0;
  border-radius: 50%; background: var(--green); border: 4px solid var(--ivory);
}
.block::after {
  content: ''; position: absolute; inset: auto 0 0; height: 7px; border-radius: 0 0 10px 10px;
}
.block--navy::after { background: var(--navy); }
.block--green::after { background: var(--green); }
.block--yellow::after { background: var(--yellow); }
.block--red::after { background: var(--red); }
.block__label--short { display: none; }
.block__label {
  position: absolute; left: 50%; bottom: 20px; translate: -50% 0;
  writing-mode: vertical-rl; rotate: 180deg; white-space: nowrap;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--paper);
  text-shadow: 0 1px 8px rgb(0 0 0 / 0.45);
}
.blocks__arc { display: block; width: 104%; margin: -8px 0 0 -2%; height: clamp(30px, 4vw, 52px); }
.hero__quote { margin-top: 14px; text-align: center; display: flex; flex-direction: column; gap: 4px; }
.hero__blocks { position: relative; margin: 0; }
.hero__quote-text { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); color: var(--navy-900); font-variation-settings: 'opsz' 36; }
.hero__quote-author { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

.hero__motto {
  font-family: var(--font-display); font-style: italic; font-size: var(--step-1); color: var(--ink-soft);
  display: flex; align-items: center; gap: 14px;
}
.hero__motto::before {
  content: ''; width: 46px; height: 12px; flex: none; border-radius: 3px;
  background: linear-gradient(90deg, var(--navy) 0 25%, var(--green) 25% 50%, var(--yellow) 50% 75%, var(--red) 75%);
}

@media (max-width: 959px) {
  /* Móvil y tableta: los bloques aparecen antes de los CTA para dar pista visual en la primera pantalla. */
  .hero-scene { padding-top: 20px; }
  .hero__grid { grid-template-columns: 1fr; grid-template-areas: 'head' 'blocks' 'cta' 'quote'; }
  .hero__lead { margin-top: 16px; }
  .blocks { --h: clamp(190px, 46vw, 360px); padding-top: 26px; }
  .hero__blocks { margin-top: 8px; }
  .hero__actions { margin-top: 8px; }
  .hero__quote { margin-top: 28px; }
}
@media (max-width: 520px) {
  .hero__title { font-size: clamp(2.55rem, 11.5vw, 3rem); }
  .hero__lead { font-size: 1.05rem; }
  .hero__facts { grid-template-columns: 1fr 1fr 1fr; gap: 12px; margin-top: 28px; }
  .fact dd { font-size: 0.78rem; }
  .hero__actions .btn { flex: 1 1 100%; }
  .block__label { font-size: 0.75rem; letter-spacing: 0.08em; bottom: 14px; }
  .block__label--long { display: none; }
  .block__label--short { display: block; }
  .blocks__arc { height: 26px; }
}

/* ---------- Oferta ---------- */
.oferta { background: var(--paper); padding: clamp(64px, 9vw, 120px) 0; border-top: 1px solid var(--line); }
.track + .track { margin-top: clamp(48px, 7vw, 88px); }
.track__title {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px;
  font-size: var(--step-1); font-weight: 700; color: var(--navy-900);
}
.track__num {
  font-family: var(--font-display); font-weight: 500; font-size: 0.85em; color: var(--paper);
  background: var(--navy-900); border-radius: 999px; padding: 2px 12px;
}

.levels { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.level {
  position: relative; padding: 28px 24px 26px; border-radius: var(--radius-lg);
  background: var(--ivory); border: 1px solid var(--line); overflow: hidden;
  display: flex; flex-direction: column; gap: 12px; min-height: 230px;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.level:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.level::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; background: var(--tone); }
.level__step { font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; color: var(--tone-ink); letter-spacing: 0.06em; }
.level__name { font-family: var(--font-display); font-size: var(--step-2); font-weight: 560; line-height: 1.05; color: var(--navy-900); }
.level__quote { margin-top: auto; font-size: 0.95rem; color: var(--ink-soft); line-height: 1.5; }

/* ---------- Pie ---------- */
.site-footer { background: var(--navy-950); color: var(--navy-200); padding: 56px 0 28px; font-size: 0.95rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1fr; gap: 32px; }
.site-footer__logo { display: inline-block; background: var(--paper); padding: 10px 14px; border-radius: 14px; }
.site-footer__logo img { height: 56px; width: auto; }
.site-footer__motto { margin-top: 14px; font-family: var(--font-display); font-style: italic; color: var(--paper); }
.site-footer__title { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); margin-bottom: 10px; }
.site-footer p + p { margin-top: 6px; }
.site-footer__list li + li { margin-top: 4px; }
.site-footer__legal { margin-top: 44px; padding-top: 20px; border-top: 1px solid rgb(201 211 234 / 0.16); font-size: 0.82rem; color: #9aa6c4; }
@media (max-width: 900px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .site-footer__grid { grid-template-columns: 1fr; } }

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  .btn:hover, .level:hover, .career:hover { transform: none; }
  .career:hover .career__img img { scale: 1; }
}

/* ==== sections.css ==== */
/* =========================================================
   Fase 3 — Oferta (rutas), Valores, Orgullo, Comunidad,
   Conversión, Pie y Diálogo.
   ========================================================= */

/* ---------- Diversificado por rutas ---------- */
.routes { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.route__title {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; padding-bottom: 12px;
  border-bottom: 2px solid var(--navy-900);
  font-size: var(--step--1); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy-900);
}
.route__count {
  font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; text-transform: none; color: var(--ink-soft);
  background: var(--sand); padding: 2px 10px; border-radius: 999px;
}
.route__list { display: grid; gap: 14px; }
.route--bachillerato .route__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.career {
  position: relative; display: flex; flex-direction: column; gap: 22px; min-height: 196px; padding: 22px 22px 26px;
  border-radius: var(--radius-lg); background: var(--ivory); border: 1px solid var(--line); overflow: hidden;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
}
.career::after { content: ''; position: absolute; inset: auto 0 0; height: 5px; background: var(--tone); }
.career:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: transparent; }
.career__icon {
  width: 66px; height: 74px; padding: 15px 13px 11px; flex: none; color: var(--tone-ink); background: var(--tone-soft);
  border-radius: 48% 48% 8px 8px / 26% 26% 8px 8px;
}
.career__body { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.career__title { font-family: var(--font-display); font-size: var(--step-2); font-weight: 560; line-height: 1.05; color: var(--navy-900); }
.career__official { font-size: 0.9rem; line-height: 1.4; color: var(--ink-soft); }

.careers__motto {
  display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; gap: 18px;
  min-height: 196px; padding: 24px; border-radius: var(--radius-lg); color: var(--paper);
  background: var(--navy-900) radial-gradient(circle at 100% 0, rgb(232 177 0 / 0.3), transparent 60%);
}
.careers__motto p { font-family: var(--font-display); font-style: italic; font-size: var(--step-2); line-height: 1.12; color: var(--yellow-soft); }

@media (max-width: 1099px) {
  .routes { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .route--bachillerato { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .routes { grid-template-columns: 1fr; gap: 28px; }
  .route--bachillerato .route__list { grid-template-columns: 1fr; }
  .route__list { gap: 10px; }
  .career { flex-direction: row; align-items: center; min-height: 0; gap: 16px; padding: 16px 16px 18px; }
  .career__icon { width: 50px; height: 56px; padding: 11px 10px 9px; }
  .career__body { margin-top: 0; gap: 2px; }
  .career__title { font-size: 1.3rem; }
  .career__official { font-size: 0.86rem; }
  .careers__motto { min-height: 0; }
}

/* ---------- Valores ---------- */
.valores { padding: clamp(64px, 9vw, 120px) 0; background: var(--ivory); border-top: 1px solid var(--line); }
.valores__grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px);
  grid-template-areas: 'intro values' 'pillars pillars'; align-items: end;
}
.valores__intro { grid-area: intro; }
.valores__vision {
  margin: 28px 0 0; padding: 4px 0 4px 22px; position: relative;
}
.valores__vision::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; border-radius: 3px;
  background: linear-gradient(var(--navy) 0 25%, var(--green) 25% 50%, var(--yellow) 50% 75%, var(--red) 75%);
}
.valores__vision p { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); line-height: 1.45; color: var(--navy-900); font-variation-settings: 'opsz' 36; }
.valores__vision footer { margin-top: 12px; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }

.values { grid-area: values; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; align-items: end; height: 300px; }
.value {
  position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: center;
  height: 100%; padding: 22px 6px 18px; color: var(--paper); background: var(--tone);
  border-radius: 48% 48% 10px 10px / 18% 18% 10px 10px; box-shadow: var(--shadow);
}
.value:nth-child(1) { height: 70%; }
.value:nth-child(2) { height: 88%; }
.value:nth-child(3) { height: 78%; }
.value:nth-child(4) { height: 100%; }
.value:nth-child(5) { height: 84%; }
.value.tone--yellow { color: var(--navy-950); }
.value__icon { width: 40px; height: 40px; }
.value__name {
  writing-mode: vertical-rl; rotate: 180deg; font-family: var(--font-display); font-size: 1.25rem; font-weight: 560; letter-spacing: 0.01em;
}
.value__char { display: inline-block; white-space: pre; }
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .value__char {
    transform: translateY(0);
    transition: transform 380ms cubic-bezier(0.16, 1, 0.3, 1);
    transition-delay: calc(var(--letter) * 24ms);
  }
  /* El nombre gira 180 grados: el eje Y positivo sube las letras en pantalla. */
  .value:hover .value__char { transform: translateY(var(--value-letter-lift, 10px)); }
}
@media (min-width: 641px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .value { isolation: isolate; background: none; box-shadow: none; }
  .value::before {
    content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: var(--tone); border-radius: inherit; box-shadow: var(--shadow);
    transform: scaleY(1); transform-origin: center bottom;
    transition: transform 420ms var(--m-ease-out);
  }
  .value__icon { transition: transform 420ms var(--m-ease-out); }
  .value:hover::before { transform: scaleY(1.12); }
  .value:hover .value__icon { transform: translateY(-14px); }
}

.pillars {
  grid-area: pillars; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 3fr); gap: clamp(24px, 4vw, 56px);
  padding-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); align-items: start;
}
.pillars__quote { font-family: var(--font-display); font-style: italic; font-size: var(--step-2); line-height: 1.15; color: var(--navy-900); }
.pillars__quote span { display: block; margin-top: 12px; font-family: var(--font-text); font-style: normal; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.pillars__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.pillar { display: flex; flex-direction: column; gap: 8px; }
.pillar__icon { width: 44px; height: 44px; color: var(--navy); margin-bottom: 6px; }
.pillar__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 580; color: var(--navy-900); line-height: 1.2; }
.pillar__body { color: var(--ink-soft); font-size: 0.97rem; }

@media (max-width: 959px) {
  .valores__grid { grid-template-columns: 1fr; grid-template-areas: 'intro' 'values' 'pillars'; }
  .pillars { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .values { grid-template-columns: 1fr; height: auto; gap: 8px; }
  .value, .value:nth-child(n) {
    height: auto; flex-direction: row; justify-content: flex-start; gap: 14px; padding: 12px 18px;
    border-radius: 14px; box-shadow: none;
  }
  .value__icon { width: 30px; height: 30px; }
  .value__name { --value-letter-lift: -6px; writing-mode: horizontal-tb; rotate: none; font-size: 1.15rem; }
  .pillars__list { grid-template-columns: 1fr; gap: 22px; }
  .pillar { display: grid; grid-template-columns: 44px 1fr; column-gap: 14px; }
  .pillar__icon { grid-row: span 2; margin: 0; }
}

/* ---------- Orgullo (sistema de evidencia) ---------- */
.orgullo {
  background: var(--navy-900); color: var(--paper); padding: clamp(64px, 9vw, 120px) 0;
  background-image: radial-gradient(1200px 500px at 90% -10%, rgb(23 55 138 / 0.65), transparent 60%);
}
.orgullo__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); gap: clamp(20px, 3vw, 40px); align-items: start; }

.evidence {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 16px;
  font-size: 0.8rem; font-weight: 600; color: var(--navy-200);
}
.evidence time { padding-left: 8px; border-left: 1px solid currentColor; font-weight: 500; }

.feature {
  display: flex; flex-direction: column; padding: clamp(24px, 3vw, 36px); border-radius: var(--radius-lg);
  background: var(--paper); color: var(--ink);
}
.feature__kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--red-ink); }
.feature__head { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 18px; margin-top: 10px; }
.feature__value {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(5.5rem, 10vw, 8.5rem); line-height: 0.85;
  color: var(--navy-900); font-variation-settings: 'opsz' 144;
}
.feature__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 560; line-height: 1.25; color: var(--navy-900); }
.tally { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; height: 70px; margin-top: 26px; align-items: end; }
.tally__block { height: 100%; background: var(--tone); border-radius: 48% 48% 6px 6px / 22% 22% 6px 6px; }
.tally__block.tone--navy { height: 82%; }
.tally__block.tone--green { height: 64%; }
.tally__legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 14px; font-size: 0.9rem; color: var(--ink-soft); }
.tally__legend li { display: inline-flex; align-items: center; gap: 6px; }
.tally__legend strong { color: var(--navy-900); }
.tally__dot { width: 10px; height: 10px; border-radius: 3px; background: var(--tone); }
.feature__context { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--ink-soft); }
.feature .evidence { color: var(--ink-soft); }

.timeline { position: relative; display: grid; gap: 14px; }
.timeline::before { content: ''; position: absolute; left: 27px; top: 28px; bottom: 28px; width: 2px; background: rgb(201 211 234 / 0.25); }
.milestone { position: relative; display: grid; grid-template-columns: 56px 1fr; gap: 18px; }
.milestone__icon {
  width: 56px; height: 56px; padding: 13px; border-radius: 50%; color: var(--navy-950);
  background: var(--yellow); box-shadow: 0 0 0 6px var(--navy-900);
}
.milestone__body {
  padding: 20px 22px; border-radius: var(--radius-lg); border: 1px solid rgb(201 211 234 / 0.22); background: rgb(255 255 255 / 0.04);
}
.milestone__kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); }
.milestone__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 540; line-height: 1.2; margin-top: 8px; }
.milestone__text { margin-top: 8px; color: var(--navy-200); font-size: 0.96rem; }
.milestone .evidence { margin-top: 12px; }

@media (max-width: 959px) {
  .orgullo__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .feature__head { grid-template-columns: 1fr; gap: 6px; }
  .tally { height: 54px; gap: 6px; }
  .timeline::before { left: 21px; }
  .milestone { grid-template-columns: 44px 1fr; gap: 12px; }
  .milestone__icon { width: 44px; height: 44px; padding: 10px; box-shadow: 0 0 0 4px var(--navy-900); }
  .milestone__body { padding: 16px 16px 18px; }
}

/* ---------- Comunidad ---------- */
.comunidad { padding: clamp(64px, 9vw, 120px) 0; background: var(--paper); }
.bento {
  display: grid; gap: 16px; grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: 'deporte banda fest' 'deporte arte tradiciones' 'vacaciones vacaciones vacaciones';
}
.bento__item {
  display: flex; flex-direction: column; gap: 10px; padding: 24px; border-radius: var(--radius-lg);
  background: var(--ivory); border: 1px solid var(--line); position: relative; overflow: hidden;
}
.bento__item--banda { grid-area: banda; }
.bento__item--fest { grid-area: fest; }
.bento__item--deporte { grid-area: deporte; padding-top: 0; }
.bento__item--arte { grid-area: arte; }
.bento__item--tradiciones { grid-area: tradiciones; }
.bento__item--vacaciones {
  grid-area: vacaciones; display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 18px;
  background: var(--tone-soft); border-color: transparent;
}
.bento__item--vacaciones .bento__title { margin: 0; }
.bento__icon {
  width: 50px; height: 56px; padding: 11px 10px 9px; color: var(--tone-ink); background: var(--tone-soft);
  border-radius: 48% 48% 8px 8px / 26% 26% 8px 8px;
}
.bento__item--vacaciones .bento__icon { background: var(--paper); }
.bento__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 580; line-height: 1.2; color: var(--navy-900); margin-top: 6px; }
.bento__body { color: var(--ink-soft); font-size: 0.97rem; }
.bento__media { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin: 0 -24px 14px; height: 230px; }
.bento__media picture { display: block; overflow: hidden; min-height: 0; }
.bento__media picture, .bento__media img { width: 100%; height: 100%; }
.bento__media img { object-fit: cover; }
.bento__media picture:last-child img { object-position: 25% 35%; }

@media (max-width: 1099px) {
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: 'deporte deporte' 'banda fest' 'arte tradiciones' 'vacaciones vacaciones'; }
}
@media (max-width: 640px) {
  .bento { grid-template-columns: 1fr; grid-template-areas: 'deporte' 'banda' 'fest' 'arte' 'tradiciones' 'vacaciones'; gap: 12px; }
  .bento__item { display: grid; grid-template-columns: 50px 1fr; column-gap: 14px; row-gap: 4px; padding: 18px; }
  .bento__icon { grid-row: span 2; }
  .bento__title { margin-top: 2px; }
  .bento__item--deporte { padding-top: 0; }
  .bento__media { grid-column: 1 / -1; margin: 0 -18px 12px; height: 170px; }
  .bento__item--vacaciones { grid-template-columns: 50px 1fr; }
}

/* ---------- Conversión ---------- */
.contacto { padding: clamp(64px, 9vw, 112px) 0; background: var(--ivory); border-top: 1px solid var(--line); }
.contacto__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 28px 0 26px; padding: 0; border: 0; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--line); background: var(--paper); font-weight: 600; font-size: 0.95rem; color: var(--ink);
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.chip input:hover + span { border-color: var(--navy); }
.chip input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: var(--paper); }
.chip input:focus-visible + span { outline: 3px solid var(--yellow); outline-offset: 3px; }
.contacto__aside { display: grid; gap: 16px; }
.contact-card { padding: 24px; border-radius: var(--radius-lg); background: var(--paper); border: 1px solid var(--line); }
.contact-card__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 580; color: var(--navy-900); margin-bottom: 14px; }
.contact-card__list { display: grid; gap: 10px; }
.contact-card__list div { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.contact-card__list div:last-child { border: 0; padding-bottom: 0; }
.contact-card__list dt { font-size: var(--step--1); font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); }
.contact-card__list dd { font-weight: 600; }
.portal-card { padding: 22px 24px; border-radius: var(--radius-lg); background: var(--navy-900); color: var(--navy-200); }
.portal-card__kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--yellow); }
.portal-card__link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 6px;
  font-family: var(--font-display); font-size: var(--step-2); font-weight: 560; color: var(--paper); text-decoration: none;
}
.portal-card__link:hover { text-decoration: underline; text-underline-offset: 5px; }
.portal-card__link .icon--xs { width: 18px; height: 18px; }
.portal-card__text { font-size: 0.92rem; margin-top: 4px; }

@media (max-width: 959px) {
  .contacto__grid { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .contacto .btn--lg { width: 100%; }
  .chip span { padding: 8px 14px; font-size: 0.92rem; }
}

/* ---------- Pie ---------- */
.site-footer__portal { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--paper); font-weight: 700; text-decoration: none; }
.site-footer__portal:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Diálogo ---------- */
.info {
  border: 0; padding: 0; border-radius: var(--radius-lg); width: min(calc(100vw - 24px), 520px); max-height: calc(100dvh - 24px);
  box-shadow: 0 30px 80px -20px rgb(8 19 46 / 0.6); background: var(--paper); color: var(--ink);
}
.info::backdrop { background: rgb(8 19 46 / 0.55); backdrop-filter: blur(3px); }
.info__inner { padding: clamp(20px, 4vw, 30px); display: flex; flex-direction: column; gap: 14px; }
.info__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.info__close {
  width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--ivory);
  font-size: 1.5rem; line-height: 1; color: var(--navy-900); cursor: pointer;
}
.info__title { font-family: var(--font-display); font-size: var(--step-2); font-weight: 560; color: var(--navy-900); line-height: 1.1; }
.info__demo { font-size: 0.86rem; color: var(--ink-soft); background: var(--yellow-soft); padding: 10px 12px; border-radius: 10px; }
.info__form { display: grid; gap: 12px; }
.field { display: grid; gap: 6px; font-size: 0.88rem; font-weight: 700; color: var(--ink); }
.field small { font-weight: 500; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 46px; padding: 10px 12px; border-radius: 10px; border: 1.5px solid var(--line);
  background: var(--ivory); font: 500 1rem var(--font-text); color: var(--ink);
}
.field textarea { resize: vertical; min-height: 80px; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--yellow); outline-offset: 1px; border-color: var(--navy); }
.info__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.info__status:not(:empty) { padding: 10px 12px; border-radius: 10px; background: #e3e8f5; color: var(--navy-900); font-size: 0.9rem; font-weight: 600; }
/* CONTACT-02: errores discretos del formulario (mismo tono suave que .tone--red; contraste AA). */
.info__status[data-tone="error"]:not(:empty) { background: #fbe2de; color: var(--red-ink); }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: var(--red-ink); }
.info__direct { padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.92rem; color: var(--ink-soft); }
.info__direct h3 { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink); margin-bottom: 4px; }
.info__direct p { overflow-wrap: anywhere; }

@media (prefers-reduced-motion: reduce) {
  .career:hover { transform: none; }
}

/* ---------- Niveles: responsive ---------- */
@media (max-width: 1099px) {
  .levels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .levels { grid-template-columns: 1fr; gap: 12px; }
  .level { min-height: 0; padding: 22px 20px; }
  .level__quote { margin-top: 4px; }
}

/* =========================================================
   Fase 5 — Mejora progresiva y pulido acotado
   ========================================================= */
/* Visibilidad según JS (html.no-js → html.js lo cambia el script de arranque del <head>). */
.no-js .js-only, .js .nojs-only { display: none !important; }

/* Menú sin JS: enlace (no botón inerte) a la navegación del pie. */
.menu-link { display: none; }
@media (max-width: 959px) {
  .menu-link {
    display: inline-grid; place-items: center; min-width: 64px; height: 48px; padding: 0 14px; border-radius: 12px;
    border: 1.5px solid var(--line); background: var(--paper); color: var(--navy-900); font-weight: 700; text-decoration: none;
  }
  .js .menu-link { display: none; }
}

/* Navegación del pie (destino del menú sin JS; útil también con JS). */
.site-footer__nav { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgb(201 211 234 / 0.16); scroll-margin-top: 88px; }
.site-footer__nav ul { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-footer__nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--paper); font-weight: 600; text-decoration: none; }
.site-footer__nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__nav + .site-footer__legal { margin-top: 16px; }

.contacto__nojs { margin-top: 24px; padding: 14px 16px; border-radius: 12px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; color: var(--ink); max-width: 52ch; }

/* Señal ligera entre «Así se vive Montessori» y Orgullo (ambos marinos; antes separaba el interludio, que en la
   Fase 05A pasó al hero): filete con la firma de 4 colores. */
.orgullo { position: relative; }
.orgullo::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: rgb(201 211 234 / 0.14);
}
.orgullo::after {
  content: ''; position: absolute; top: -2px; left: max(var(--gutter), calc((100% - var(--wrap)) / 2)); width: 72px; height: 5px; border-radius: 3px;
  background: linear-gradient(90deg, var(--navy-200) 0 25%, var(--green) 25% 50%, var(--yellow) 50% 75%, var(--red) 75%);
}

/* =========================================================
   Fase 05A
   ========================================================= */

/* ---------- Oferta: tarjetas uniformes (solo geometría) ----------
   Niveles: todas las filas miden lo mismo (grid-auto-rows: 1fr), también en 2 columnas y en 1 columna.
   Carreras: las tres rutas comparten UNA rejilla (subgrid). Cada tarjeta ocupa una fila «1fr» de la misma
   rejilla, así que las siete carreras y la tarjeta de cierre miden igual sin alturas fijas ni recortes: la fila
   toma la altura del texto más largo. Las 4 columnas iguales igualan además el ancho entre rutas. */
.levels { grid-auto-rows: 1fr; }

@supports (grid-template-rows: subgrid) {
  .routes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-rows: auto repeat(2, minmax(0, 1fr));
    column-gap: 18px; row-gap: 14px; align-items: stretch;
  }
  .route { display: grid; grid-row: span 3; grid-template-rows: subgrid; grid-template-columns: subgrid; }
  .route--bachillerato { grid-column: span 2; }
  .route__title { margin-bottom: 0; grid-column: 1 / -1; }
  .route__list { grid-row: span 2; grid-column: 1 / -1; display: grid; grid-template-rows: subgrid; grid-template-columns: subgrid; gap: 14px 18px; }
  .route--bachillerato .route__list { grid-template-columns: subgrid; }

  @media (max-width: 1099px) {
    /* 2 columnas: Bachillerato (2 × 2) arriba; Perito y Magisterio debajo. Mismo «1fr» para todas las filas. */
    .routes { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto repeat(2, minmax(0, 1fr)) auto repeat(2, minmax(0, 1fr)); }
    .route--bachillerato { grid-column: 1 / -1; }
    .route--perito, .route--magisterio { grid-row: 4 / span 3; margin-top: 4px; }
  }
  @media (max-width: 640px) {
    /* 1 columna: las 7 carreras en filas «1fr» iguales. La tarjeta de cierre (última fila, «auto») conserva su
       altura propia y se alinea en ancho: si marcara la altura, añadiría ~60 px vacíos a cada carrera en móvil. */
    .routes {
      grid-template-columns: minmax(0, 1fr); row-gap: 10px;
      grid-template-rows: auto repeat(4, minmax(0, 1fr)) auto repeat(2, minmax(0, 1fr)) auto minmax(0, 1fr) auto;
    }
    .route--bachillerato { grid-row: 1 / span 5; }
    .route--perito { grid-row: 6 / span 3; margin-top: 18px; }
    .route--magisterio { grid-row: 9 / span 3; margin-top: 18px; }
    .route--bachillerato .route__list { grid-row: span 4; }
    .route__list { gap: 10px; }
    .route__title { margin-bottom: 4px; }
  }
}

/* ---------- «Así se vive Montessori» ---------- */
.momentos {
  position: relative; overflow: clip; color: var(--paper); background: var(--navy-950);
  background-image: radial-gradient(900px 420px at 12% 0%, rgb(23 55 138 / 0.55), transparent 65%);
  padding: clamp(64px, 9vw, 116px) 0 clamp(56px, 7vw, 96px);
}
.momentos__grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.momento {
  position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--radius-lg);
  background: rgb(255 255 255 / 0.05); border: 1px solid rgb(201 211 234 / 0.18);
}
.momento::after { content: ''; position: absolute; inset: auto 0 0; height: 5px; background: var(--tone); }
.momento__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--tone); }
.momento__img, .momento__img img { display: block; width: 100%; height: 100%; }
.momento__img img { object-fit: cover; object-position: var(--focus, 50% 50%); }
.momento__body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 26px; flex: 1; }
.momento__kicker { font-size: var(--step--1); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow); }
.momento__title { font-family: var(--font-display); font-size: var(--step-1); font-weight: 560; line-height: 1.2; color: var(--paper); }
.momento__text { color: var(--navy-200); font-size: 0.96rem; }
.momento .evidence { margin-top: auto; padding-top: 10px; }
.momento--post { background: var(--tone-soft); border-color: transparent; color: var(--ink); }
.momento--post .momento__icon {
  width: 66px; height: 74px; margin: 22px 22px 0; padding: 15px 13px 11px; color: var(--paper); background: var(--tone);
  border-radius: 48% 48% 8px 8px / 26% 26% 8px 8px;
}
.momento--post.tone--yellow .momento__icon { color: var(--navy-950); }
.momento--post .momento__kicker { color: var(--tone-ink); }
.momento--post .momento__title { font-style: italic; color: var(--navy-900); font-size: var(--step-2); line-height: 1.12; }
.momento--post .momento__text { color: var(--ink-soft); }
.momento--post .evidence { color: var(--ink-soft); }
.momentos__more { margin-top: clamp(24px, 3vw, 36px); }
.momentos__link {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--paper); font-weight: 700; text-decoration: none;
  border-bottom: 2px solid var(--yellow);
}
.momentos__link:hover { color: var(--yellow-soft); }

@media (max-width: 1099px) {
  .momentos__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .momentos__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .momento__body { padding: 18px 18px 22px; }
  .momento--post { display: grid; grid-template-columns: 56px 1fr; column-gap: 14px; padding: 18px 18px 0; }
  .momento--post .momento__icon { width: 56px; height: 62px; margin: 0; padding: 12px 11px 9px; }
  .momento--post .momento__body { padding: 0 0 22px; }
}

/* ==== interludio.css ==== */
/* =========================================================
   «Cuatro bloques, una historia» — maquetación.
   Fase 05A: deja de ser una sección y pasa a ser la ESCENA B del hero rotativo (hero.css coloca la escena).
   Este CSS describe el ESTADO FINAL (estático y legible). src/motion/interludio.ts solo anima desde un estado
   inicial hacia este; si no carga, esto es lo que se ve.
   ========================================================= */
.hero-scene--b {
  position: relative; overflow: clip; color: var(--paper);
  background: var(--navy-950);
  background-image: radial-gradient(900px 420px at 12% 0%, rgb(23 55 138 / 0.55), transparent 65%);
}

.inter {
  display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); min-width: 0;
  grid-template-areas: 'copy visual' 'triad visual' 'cta visual'; grid-template-rows: auto 1fr auto;
  column-gap: clamp(32px, 5vw, 80px); row-gap: 28px; align-items: start;
}
.inter__cta { grid-area: cta; }
.inter__copy { grid-area: copy; position: relative; }
.inter__visual { grid-area: visual; display: grid; gap: 12px; }
.inter__triad { grid-area: triad; align-self: end; }

/* Máscara reutilizable: la línea se recorta en su borde inferior, con holgura lateral para itálicas. */
.mask { display: block; clip-path: inset(-0.25em -0.6em 0 -0.6em); padding-bottom: 0.14em; margin-bottom: -0.14em; }
.mask__in { display: block; will-change: transform; }

.inter__title {
  margin-top: 18px; font-family: var(--font-display); font-weight: 520; font-size: clamp(2.1rem, 1.3rem + 3vw, 3.9rem);
  line-height: 1.02; letter-spacing: -0.02em; font-variation-settings: 'opsz' 144;
}
.inter__title .mask:last-child .mask__in { font-style: italic; font-weight: 400; color: var(--yellow-soft); }
.inter__arc { display: block; width: min(70%, 360px); height: 36px; margin-top: 20px; overflow: visible; }

/* Escenario: ventana de escenas e identidad comparten la misma celda. */
.inter__window, .inter__identity { grid-area: 1 / 1; border-radius: var(--radius-lg); aspect-ratio: 4 / 3; min-width: 0; }
.inter__window { position: relative; overflow: hidden; background: transparent; visibility: hidden; z-index: 2; }
.inter__scene { background: var(--tone); }
.inter__scene { position: absolute; inset: 0; margin: 0; }
.inter__photo, .inter__photo img { display: block; width: 100%; height: 100%; }
.inter__photo img { object-fit: cover; object-position: var(--fx) var(--fy); transform-origin: var(--fx) var(--fy); }
.inter__scene::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 45%, rgb(8 19 46 / 0.72));
}
.inter__caption { position: absolute; left: clamp(18px, 3vw, 30px); bottom: clamp(16px, 2.6vw, 26px); z-index: 1; }
.inter__caption .mask__in {
  font-family: var(--font-display); font-style: italic; font-weight: 420; font-size: clamp(2.2rem, 1.4rem + 3vw, 4rem);
  line-height: 1; color: var(--paper);
}
.inter__caption small { display: block; margin-top: 8px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--yellow-soft); }

.inter__identity {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center;
  padding: clamp(20px, 3vw, 36px); background: var(--paper); color: var(--ink); box-shadow: 0 30px 60px -30px rgb(0 0 0 / 0.6);
}
.inter__closing { font-family: var(--font-display); font-style: italic; font-size: var(--step-1); color: var(--ink-soft); }
.inter__logo img { height: clamp(84px, 10vw, 124px); width: auto; }
.inter__quote p { font-family: var(--font-display); font-style: italic; font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.15rem); line-height: 1.15; color: var(--navy-900); max-width: 20ch; margin-inline: auto; }
.inter__quote footer { margin-top: 8px; font-size: var(--step--1); font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); }
.inter__motto {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 4px;
  font-size: var(--step--1); font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--navy);
}
.inter__motto::before {
  content: ''; width: 30px; height: 9px; border-radius: 2px;
  background: linear-gradient(90deg, var(--navy) 0 25%, var(--green) 25% 50%, var(--yellow) 50% 75%, var(--red) 75%);
}

.inter__tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.inter__tile {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px 14px;
  background: var(--tone); color: var(--paper); border-radius: 48% 48% 10px 10px / 24% 24% 10px 10px;
}
.inter__tile.tone--yellow { color: var(--navy-950); }
.inter__tile-icon { width: 34px; height: 34px; flex: none; }
.inter__tile-label { font-size: 0.82rem; font-weight: 700; letter-spacing: 0.02em; text-align: center; }

.inter__triad { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 22px; }
.inter__word { display: inline-flex; align-items: center; gap: 12px; }
.inter__word::before { content: ''; width: 12px; height: 12px; border-radius: 3px; flex: none; transform: translateY(-0.15em); }
.inter__word--1::before { background: var(--green); }
.inter__word--2::before { background: var(--yellow); }
.inter__word--3::before { background: var(--red); }
.inter__word .mask__in { font-family: var(--font-display); font-weight: 520; font-size: clamp(1.6rem, 1.1rem + 1.4vw, 2.35rem); line-height: 1.1; letter-spacing: -0.01em; }

@media (max-width: 959px) {
  .inter { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'copy' 'visual' 'triad' 'cta'; grid-template-rows: none; row-gap: 22px; }
  /* Sin aspect-ratio: en móvil la altura la da el contenido (aspect-ratio imponía un ancho mínimo y desbordaba). */
  .inter__window, .inter__identity { aspect-ratio: auto; min-height: clamp(380px, 54vw, 420px); }
}
@media (max-width: 560px) {
  .inter__tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inter__tile { padding: 12px 8px 10px; gap: 6px; border-radius: 14px; }
  .inter__tile-icon { width: 28px; height: 28px; }
  .inter__triad { gap: 2px 16px; }
  .inter__cta .btn { width: 100%; }
}

/* ==== hero.css ==== */
/* =========================================================
   Hero rotativo (Fase 05A): escenas A · B · C en la misma celda.
   - Sin html.hero-rot (sin JS, movimiento reducido, ?motion=off o fallo del bundle) solo existe la escena A,
     estática y completa: B y C van con display:none.
   - Con html.hero-rot (lo pone el script de arranque del <head>) las tres escenas se apilan en la misma celda
     DESDE EL PRIMER PINTADO: la altura del hero = la de la escena más alta y no cambia al rotar (sin CLS).
   - src/motion/hero.ts solo cambia clases (.is-active / .is-leaving / .is-primed), inert y aria-hidden.
   ========================================================= */
.hero__stage { display: grid; }
.hero-scene {
  grid-area: 1 / 1; min-width: 0;
  padding: clamp(28px, 5vw, 64px) 0 clamp(36px, 5vw, 64px);
}
.hero-scene--a { background: var(--ivory); }
html:not(.hero-rot) .hero-scene:not(.hero-scene--a) { display: none; }

/* Pie del hero: lema (como en Fase 5) + control discreto de la rotación. */
.hero__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap;
  padding-top: 18px; border-top: 1px solid var(--line);
}
.hero__rotor { display: none; align-items: center; gap: 14px; }
/* El hueco del control se reserva desde el primer pintado (.hero-rot) y se muestra al arrancar main.ts: sin CLS. */
.hero-rot .hero__rotor { display: inline-flex; visibility: hidden; }
.hero-rot.booted .hero__rotor { visibility: visible; }
.hero__steps { display: flex; gap: 6px; }
.hero__step { width: 28px; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.hero__step span { display: block; height: 100%; background: var(--navy); transform: scaleX(0); transform-origin: left; }
.hero__step.is-current span { animation: hero-step var(--dur, 7.5s) linear both; }
.hero__rotor.is-held .hero__step span { animation-play-state: paused; }
@keyframes hero-step { to { transform: scaleX(1); } }
.hero__pause {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 10px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--paper); color: var(--navy-900);
  font-weight: 700; font-size: 0.86rem; cursor: pointer; transition: border-color var(--m-fast), background-color var(--m-fast);
}
.hero__pause:hover { border-color: var(--navy); }
.hero__pause-icon { position: relative; width: 14px; height: 14px; flex: none; }
.hero__pause-icon::before, .hero__pause-icon::after {
  content: ''; position: absolute; top: 1px; bottom: 1px; width: 4px; border-radius: 1px; background: currentColor;
}
.hero__pause-icon::before { left: 2px; }
.hero__pause-icon::after { right: 2px; }
.hero__pause[data-state='paused'] .hero__pause-icon::before {
  left: 3px; right: 1px; width: auto; border-radius: 0; background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}
.hero__pause[data-state='paused'] .hero__pause-icon::after { display: none; }

/* ---------- Rotación ---------- */
.hero-rot .hero-scene--b, .hero-rot .hero-scene--c { display: grid; align-content: center; }
.hero-rot .hero-scene { position: relative; z-index: 0; }
/* Escena inactiva: invisible y sin puntero. B y C además llevan inert + aria-hidden (hero.ts). A sigue en el árbol
   de accesibilidad (contiene el único h1) pero sus enlaces salen del orden de tabulación mientras no se ve. */
.hero-rot .hero-scene:not(.is-active):not(.is-leaving) { opacity: 0; pointer-events: none; }
.hero-rot .hero-scene:not(.is-active):not(.is-leaving):not(.hero-scene--a) { visibility: hidden; }
.hero-rot .hero-scene.is-leaving { z-index: 1; pointer-events: none; }
.hero-rot .hero-scene.is-active { z-index: 2; }
/* Entrada: la escena nueva «sube» como un bloque (máscara de abajo hacia arriba) sobre la anterior, que sigue
   debajo hasta quedar cubierta: nunca hay un fotograma vacío ni dos h1. 0.8 s (tokens de motion). */
.hero-rot .hero-scene.is-entering { animation: hero-enter 800ms var(--m-ease-in-out) both; }
@keyframes hero-enter {
  from { clip-path: inset(100% 0 0 0); }
  to { clip-path: inset(0 0 0 0); }
}
.hero-rot .hero-scene.is-entering > .wrap { animation: hero-enter-content 800ms var(--m-ease-out) both; }
@keyframes hero-enter-content { from { transform: translateY(26px); opacity: 0.4; } }

/* Imágenes de B y C: llegan en <template> y hero.ts las instancia al preparar la escena (carga diferida). */

/* ---------- Escena C: promocional fotográfica ---------- */
.hero-scene--c { background: var(--paper); }
.promo {
  display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); column-gap: clamp(32px, 5vw, 80px);
  grid-template-areas: 'head visual' 'body visual'; grid-template-rows: auto auto; align-content: center;
}
.promo__head { grid-area: head; align-self: end; }
.promo__body { grid-area: body; align-self: start; }
.promo__visual { grid-area: visual; align-self: center; width: 100%; max-width: 600px; justify-self: end; }
.promo__title {
  margin-top: 18px; font-family: var(--font-display); font-weight: 520; font-size: clamp(2.3rem, 1.4rem + 3.4vw, 4.6rem);
  line-height: 1; letter-spacing: -0.025em; color: var(--navy-900); font-variation-settings: 'opsz' 144;
}
.promo__line { display: block; }
.promo__line--2 { font-style: italic; font-weight: 400; color: var(--red-ink); }
.promo__lead { margin-top: 22px; font-size: var(--step-1); color: var(--ink-soft); max-width: 40ch; }
.promo__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.promo__visual { display: grid; gap: 12px; }
.promo__window {
  position: relative; display: grid; aspect-ratio: 3 / 2; overflow: hidden; background: var(--navy-900);
  border-radius: 48% 48% var(--radius-lg) var(--radius-lg) / 14% 14% var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow);
}
.promo__shot { grid-area: 1 / 1; position: relative; margin: 0; min-height: 0; transition: opacity 700ms var(--m-ease-in-out); }
/* Solo durante la rotación se ocultan las tomas que no tocan (fuera de ella la escena C ni se muestra). */
.hero-rot .promo__shot:not(.is-on) { opacity: 0; }
.promo__shot.is-on { z-index: 1; }
.promo__photo, .promo__photo img { display: block; width: 100%; height: 100%; }
.promo__photo img { object-fit: cover; object-position: var(--focus, 50% 50%); }
.motion .promo__shot.is-on .promo__photo img { animation: promo-push 3.8s var(--m-ease-out) both; }
@keyframes promo-push { from { transform: scale(1.07); } }
.promo__shot::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, transparent 42%, rgb(8 19 46 / 0.78));
}
.promo__caption {
  position: absolute; left: clamp(16px, 2.6vw, 28px); right: clamp(16px, 2.6vw, 28px); bottom: clamp(14px, 2.4vw, 24px); z-index: 1;
  display: grid; justify-items: start; gap: 6px; color: var(--paper);
}
.promo__label {
  padding: 3px 12px; border-radius: 999px; background: var(--tone); color: var(--paper);
  font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
}
.promo__shot.tone--yellow .promo__label { color: var(--navy-950); }
.promo__text { font-family: var(--font-display); font-style: italic; font-size: clamp(1.25rem, 1rem + 0.9vw, 1.8rem); line-height: 1.15; }
.promo__source { font-size: 0.74rem; font-weight: 600; color: var(--navy-200); }
.promo__ticks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.promo__ticks li { height: 5px; border-radius: 5px; background: var(--line); transition: background-color 400ms; }
.promo__ticks li.is-on { background: var(--tone); }

@media (max-width: 959px) {
  /* Móvil y tableta: título → fotografía → texto y CTA (la foto entra en la primera pantalla). */
  .promo { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'head' 'visual' 'body'; row-gap: 20px; }
  .promo__visual { max-width: none; justify-self: stretch; }
  .promo__lead { margin-top: 0; }
  .promo__actions { margin-top: 18px; }
  .hero-rot .hero-scene--b, .hero-rot .hero-scene--c { align-content: start; }
  .promo__window { border-radius: 40% 40% var(--radius-lg) var(--radius-lg) / 12% 12% var(--radius-lg) var(--radius-lg); }
}
@media (max-width: 520px) {
  .promo__title { font-size: clamp(2.3rem, 10.5vw, 2.8rem); }
  .promo__lead { font-size: 1.05rem; }
  .promo__actions .btn { flex: 1 1 100%; }
  .promo__window { aspect-ratio: 4 / 3; }
  .promo__text { font-size: 1.15rem; }
  .promo__source { font-size: 0.68rem; }
  .hero__step { width: 20px; }
  .hero__pause { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-rot .hero-scene.is-entering, .hero-rot .hero-scene.is-entering > .wrap, .motion .promo__shot.is-on .promo__photo img { animation: none; }
}

/* ==== motion.css ==== */
/* =========================================================
   Motion global (Fase 4) — CSS + IntersectionObserver, sin GSAP.
   Todo depende de html.motion, que main.ts solo añade si NO hay
   prefers-reduced-motion. Sin esa clase, todo se ve en estado final.
   Solo se animan transform, opacity y clip-path (sin cambios de layout).
   ========================================================= */

/* ---------- Hero: entrada breve (≈1 s), CTA disponibles desde el inicio ---------- */
.hero__line { clip-path: inset(-0.3em -0.6em 0 -0.6em); padding-bottom: 0.16em; margin-bottom: -0.16em; }
.hero__line-in { display: inline-block; }
.motion .hero__line-in { animation: mt-rise var(--m-slow) var(--m-ease-out) both; animation-delay: calc(var(--i) * var(--m-stagger)); }
.motion .hero__line--4::after { animation: mt-underline var(--m-base) var(--m-ease-out) both; animation-delay: 420ms; transform-origin: left center; }
.motion .block { animation: mt-block var(--m-slow) var(--m-ease-out) both; animation-delay: calc(140ms + var(--i) * 90ms); }
.motion .blocks__arc path { stroke-dasharray: 1; animation: mt-draw 900ms var(--m-ease-in-out) both 380ms; }
.motion .hero__quote { animation: mt-fade var(--m-base) ease-out both 650ms; }

@keyframes mt-rise { from { transform: translateY(120%); } }
@keyframes mt-underline { from { transform: scaleX(0); } }
@keyframes mt-block {
  from { clip-path: inset(100% -60px -60px -60px); transform: translateY(18px); }
  to { clip-path: inset(-60px -60px -60px -60px); transform: none; }
}
@keyframes mt-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes mt-fade { from { opacity: 0; } }

/* ---------- Revelado por grupos al hacer scroll ---------- */
.motion [data-reveal]:not([data-reveal='blocks']) {
  transition: opacity var(--m-base) var(--m-ease-out), transform var(--m-base) var(--m-ease-out);
  transition-delay: calc(var(--d, 0) * var(--m-stagger));
}
.motion [data-reveal]:not([data-reveal='blocks']):not(.is-in) { opacity: 0; transform: translate3d(0, var(--m-distance), 0); }

/* Valores: los bloques suben desde su base (más rápido que el interludio). */
.motion [data-reveal='blocks'] .value {
  transition: clip-path var(--m-base) var(--m-ease-out);
  transition-delay: calc((var(--i) * 60ms));
  clip-path: inset(-60px -40px -40px -40px);
}
.motion [data-reveal='blocks']:not(.is-in) .value { clip-path: inset(100% -40px -40px -40px); }

/* Orgullo: el desglose crece en orden 1 → 2 → 3, sincronizado con el contador. */
.motion [data-counter] .tally__block { transition: transform 420ms var(--m-ease-out); transition-delay: calc(260ms + var(--i) * 110ms); transform-origin: bottom; }
.motion [data-counter]:not(.is-in) .tally__block { transform: scaleY(0); }

/* Contacto: cambio de etiqueta del CTA */
.motion .is-swapping { animation: mt-swap var(--m-fast) var(--m-ease-out); }
@keyframes mt-swap { from { opacity: 0; transform: translateY(6px); } }

/* Seguridad: con reduced-motion no hay animación ni estados ocultos aunque exista .motion. */
@media (prefers-reduced-motion: reduce) {
  .motion [data-reveal]:not(.is-in) { opacity: 1 !important; transform: none !important; }
  .motion [data-reveal] .value, .motion [data-counter] .tally__block { clip-path: none !important; transform: none !important; }
}
[data-interest-label] { display: inline-block; }
