/* Nido Brotecitos: cubos de letras de colores, con la paleta medida en la imagen de referencia. */
:root {
  --bg: #faf6f2;
  --surface: #f1ebe4;
  --ink: #27346b;
  --muted: #4d5780;
  --blue: #6183ca;
  --blue-strong: #3f5fb0;
  --yellow: #f6bf3c;
  --coral: #e4784d;
  --pink: #f0a5be;
  --teal: #65bdb6;
  --mint: #a9ddd1;
  --on-dark: #ffffff;
  --ink-tone: #36458a;

  --step-small: clamp(0.875rem, 0.85rem + 0.1vw, 0.9375rem);
  --step-body: clamp(1.0625rem, 1rem + 0.25vw, 1.1875rem);
  --step-lead: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  --step-head: clamp(2rem, 1.3rem + 2.8vw, 3.75rem);
  --step-display: clamp(2.4rem, 0.5rem + 5vw, 5rem);

  --margin: clamp(16px, 2.4vw, 36px);
  --gap-section: clamp(96px, 12vw, 176px);
  --gap-tile: 8px;
  --r: 20px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 24px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--step-body)/1.5 "Figtree", system-ui, sans-serif;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p, h1, h2, h3, dl, dd { margin: 0; }
h1, h2, h3 {
  font-family: "Fredoka", "Figtree", sans-serif;
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.04;
  text-wrap: balance;
}
h2 { font-size: var(--step-head); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.on-field :focus-visible, .ficha :focus-visible { outline-color: var(--yellow); }
.salto {
  position: absolute; left: var(--margin); top: -80px; z-index: 30;
  background: var(--ink); color: var(--on-dark); padding: 12px 16px;
}
.salto:focus { top: 8px; }

/* Botones redondos */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 14px 30px;
  background: var(--blue-strong); color: var(--on-dark);
  border: 0; border-radius: 999px;
  font: 600 var(--step-body)/1.2 "Figtree", sans-serif;
  text-decoration: none; cursor: pointer;
  transition: transform 180ms var(--ease), background-color 180ms ease, color 180ms ease;
}
.boton:hover { background: var(--ink); }
.boton:active { transform: scale(0.97); }
.boton--tinta { background: var(--ink); color: var(--on-dark); }
.boton--tinta:hover { background: var(--blue-strong); }

/* Aviso de demostración y cinta de cubos */
.aviso { background: var(--surface); text-align: center; padding: 6px var(--margin); font-size: var(--step-small); }
.cinta { display: block; width: 100%; height: 10px; }

/* Cabecera */
.barra {
  position: absolute; z-index: 10; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px var(--margin);
}
.marca {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 600 clamp(1.25rem, 1.1rem + 0.5vw, 1.625rem)/1 "Fredoka", sans-serif;
  text-decoration: none;
}
.marca__cubo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 9px; transform: rotate(-5deg);
  background: var(--blue-strong); color: var(--on-dark); font-size: 1.25rem;
}
.nav { display: flex; align-items: center; gap: clamp(14px, 1.6vw, 28px); }
.nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; font-size: var(--step-small); }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }
.menu { display: none; position: relative; }
.menu summary {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px;
  font-weight: 600; cursor: pointer; list-style: none;
  background: var(--ink); color: var(--on-dark); border-radius: 999px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu ul {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; padding: 10px 18px;
  background: var(--ink); color: var(--on-dark); border-radius: var(--r);
}
.menu li a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-weight: 600; }

/* Portada */
.portada {
  position: relative; overflow: hidden;
  display: grid; grid-template-columns: 50vw 1fr; align-items: center; gap: clamp(16px, 3vw, 44px);
  min-height: min(calc(100svh - 44px), 900px);
  padding: 96px var(--margin) 48px;
}
.portada__texto { position: relative; z-index: 2; }
.portada h1 { font-size: var(--step-display); }
.portada__lead { margin-top: 32px; max-width: 32em; font-size: var(--step-lead); line-height: 1.35; }
.portada__accion { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }
.portada__tel { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }

.cubos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cubo {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 1;
  border-radius: var(--r); overflow: hidden;
  transition: transform 260ms var(--ease);
}
.cubo svg { width: 72%; height: 72%; }
.cubo svg.letra { width: 100%; height: 100%; }
.letra--abc text { font-size: 38px !important; }
.letra text { fill: currentColor; font: 600 60px "Fredoka", sans-serif; }
.cubo--azul { background: var(--blue); color: var(--on-dark); transform: rotate(-3deg); }
.cubo--coral { background: var(--coral); color: var(--on-dark); transform: rotate(2deg); }
.cubo--amarillo { background: var(--yellow); transform: rotate(-2deg); }
.cubo--turquesa { background: var(--teal); transform: rotate(3deg); }
.cubo--rosado { background: var(--pink); transform: rotate(-2deg); }
.cubo--menta { background: var(--mint); transform: rotate(2deg); }
.cubo--tinta { background: var(--ink); transform: rotate(-2deg); }
.cubo:hover { transform: rotate(0deg) scale(1.03); }
.cubos__foto { position: relative; grid-column: span 2; grid-row: span 2; border-radius: var(--r); overflow: hidden; aspect-ratio: 1; background: var(--surface); }
.cubos__foto img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1600ms ease;
}
.cubos__foto img.activa { opacity: 1; }

/* Secciones */
.seccion { padding: var(--gap-section) var(--margin) 0; }
.cabeza { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }
.cabeza p { font-weight: 600; white-space: nowrap; }

/* Aulas */
.aulas__lista {
  margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 56px clamp(32px, 5vw, 80px);
}
.aula { display: grid; grid-template-columns: clamp(96px, 11vw, 168px) 1fr; gap: clamp(18px, 2vw, 32px); align-items: center; }
.aula img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); padding: 8px; background: var(--yellow); transform: rotate(-2deg); }
.aula:nth-child(2) img { background: var(--pink); transform: rotate(2deg); }
.aula:nth-child(3) img { background: var(--mint); transform: rotate(2deg); }
.aula:nth-child(4) img { background: var(--blue); transform: rotate(-2deg); }
.aula h3 { font-size: var(--step-lead); line-height: 1.1; }
.aula p { margin-top: 8px; max-width: 38ch; }
.aula__vacantes { font-weight: 600; }

/* Propuesta */
.frase { margin-top: 40px; max-width: 34em; font-size: clamp(1.25rem, 0.9rem + 1.8vw, 2.25rem); line-height: 1.22; font-weight: 600; letter-spacing: -0.01em; }
.junto { white-space: nowrap; }
.frase img {
  display: inline-block; width: 1.9em; height: 1em; vertical-align: -0.12em;
  object-fit: cover; border-radius: 0.24em; margin: 0 0.08em;
}
.propuesta__fila {
  margin-top: 72px; display: grid; grid-template-columns: 5fr 7fr;
  gap: clamp(32px, 6vw, 96px); align-items: center;
}
.propuesta__foto { width: 100%; aspect-ratio: 40 / 21; object-fit: cover; border-radius: var(--r); }
.vinetas li { position: relative; padding: 10px 0 10px 32px; font-size: var(--step-lead); line-height: 1.25; }
.vinetas li::before {
  content: ""; position: absolute; left: 0; top: calc(10px + 0.26em);
  width: 18px; height: 18px; border-radius: 5px; background: var(--coral); transform: rotate(-6deg);
}
.vinetas li:nth-child(2)::before { background: var(--blue); transform: rotate(5deg); }
.vinetas li:nth-child(3)::before { background: var(--yellow); }
.vinetas li:nth-child(4)::before { background: var(--teal); transform: rotate(6deg); }
.vinetas li:nth-child(5)::before { background: var(--pink); }

/* Instalaciones */
.muro { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-tile); }
.muro > * { aspect-ratio: 1; min-width: 0; border-radius: var(--r); overflow: hidden; }
.muro img { width: 100%; height: 100%; object-fit: cover; }
.ficha-palabra {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 16px; text-align: center; background: var(--mint);
}
.ficha-palabra strong { font: 600 var(--step-head)/1 "Fredoka", sans-serif; }
.ficha-palabra span { font-size: var(--step-small); }
.ficha-palabra--acento { background: var(--yellow); }
.ficha-palabra--rosado { background: var(--pink); }
.ficha-palabra--tinta { background: var(--ink); color: var(--on-dark); }
.muro .muro__titulo { display: flex; align-items: flex-end; padding: clamp(16px, 2vw, 28px); background: var(--blue-strong); color: var(--on-dark); }
.muro__titulo h2 { font-size: clamp(1.625rem, 2.8vw, 2.75rem); }
.nota { margin-top: 14px; font-size: var(--step-small); color: var(--muted); }

/* Matrícula: proceso */
.proceso { margin-top: var(--gap-section); padding: clamp(64px, 8vw, 112px) var(--margin); background: var(--ink); color: var(--on-dark); }
.proceso__intro { max-width: 34em; margin-top: 20px; font-size: var(--step-lead); line-height: 1.35; }
.proceso__figura { margin: 56px 0 0; }
.proceso__figura svg { width: 100%; height: auto; }
.proceso__figura .vertical { display: none; }
.proceso ol { margin-top: 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); }
.proceso h3 { font-size: var(--step-lead); line-height: 1.1; }
.proceso ol p { margin-top: 8px; max-width: 34ch; }

/* Matrícula: pensión */
.pension { padding: clamp(64px, 8vw, 112px) var(--margin); background: var(--yellow); color: var(--ink); }
.pension h2 { font-size: clamp(2.75rem, 0.4rem + 8.2vw, 8rem); line-height: 1; }
.pension__pie { margin-top: 40px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 40px; }
.pension__pie p { max-width: 38em; font-size: var(--step-lead); line-height: 1.3; }

/* Opiniones */
.tablero { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--gap-tile); }
.tablero > * { min-height: clamp(200px, 22vw, 320px); padding: clamp(20px, 2vw, 32px); background: var(--surface); border-radius: var(--r); }
.tablero__titulo { grid-column: span 2; display: flex; flex-direction: column; justify-content: space-between; gap: 24px; }
.tablero > .tablero__titulo { background: var(--pink); }
.tablero__titulo p { font-size: var(--step-lead); line-height: 1.25; max-width: 24em; }
.tablero__dato { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.tablero__dato strong { font: 600 var(--step-head)/1.04 "Fredoka", sans-serif; }
.estrellas { display: flex; gap: 2px; }
.estrellas svg { width: clamp(24px, 3vw, 44px); height: clamp(24px, 3vw, 44px); fill: var(--coral); }
.ejemplo { display: inline-block; font-weight: 600; font-size: var(--step-small); }

/* Preguntas */
.preguntas { display: grid; grid-template-columns: 4fr 8fr; gap: clamp(24px, 4vw, 64px); align-items: start; }
.preguntas__cabeza { position: sticky; top: 32px; }
.preguntas__cabeza p { margin-top: 16px; }
.preguntas__dibujo { margin-top: 28px; width: min(100%, 220px); }
.acordeon { display: grid; gap: var(--gap-tile); }
.acordeon details { background: var(--surface); border-radius: var(--r); transition: background-color 200ms ease; }
.acordeon details[open] { background: var(--mint); }
.acordeon summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  min-height: 72px; padding: 14px 24px; cursor: pointer; list-style: none;
  font-weight: 600; font-size: var(--step-body); line-height: 1.25;
}
.acordeon summary::-webkit-details-marker { display: none; }
.mas { position: relative; flex: none; width: 16px; height: 16px; }
.mas::before, .mas::after { content: ""; position: absolute; background: currentColor; left: 0; right: 0; top: 6.5px; height: 3px; transition: transform 220ms var(--ease); }
.mas::after { transform: rotate(90deg); }
details[open] .mas::after { transform: rotate(0deg); }
.acordeon details p { padding: 0 24px 24px; max-width: 52ch; }

/* Ficha de visita, un cupón con troquel */
.ficha {
  position: relative;
  display: grid; grid-template-columns: 46fr 54fr;
  background: var(--ink); color: var(--on-dark);
  border-radius: var(--r);
}
.ficha::before, .ficha::after {
  content: ""; position: absolute; left: 46%; width: 28px; height: 28px; margin-left: -14px;
  background: var(--bg); border-radius: 50%;
}
.ficha::before { top: -14px; }
.ficha::after { bottom: -14px; }
.ficha__datos { padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 24px; justify-content: space-between; }
.ficha__datos h2 { color: var(--yellow); }
.ficha__lista { display: grid; gap: 16px; }
.ficha__lista dt { font-weight: 600; }
.ficha__enlaces { display: flex; flex-wrap: wrap; gap: 0 24px; }
.ficha__enlaces a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--yellow); }
.ficha__form {
  padding: clamp(28px, 4vw, 56px); display: grid; gap: 14px; align-content: start;
  border-left: 5px dotted var(--bg);
}
.campo { display: grid; gap: 6px; }
.campo label { font-weight: 600; font-size: var(--step-small); }
.campo input, .campo select {
  width: 100%; height: 54px; padding: 0 16px;
  background: var(--ink-tone); color: var(--on-dark);
  border: 2px solid transparent; border-radius: 14px;
  font: 400 1.0625rem/1.2 "Figtree", sans-serif;
}
.campo input::placeholder { color: #d5dbf2; }
.campo input:focus, .campo select:focus { outline: none; border-color: var(--yellow); }
.mensaje { padding: 14px 16px; background: var(--ink-tone); border-radius: 14px; font-size: var(--step-small); white-space: pre-line; }
.mensaje strong { display: block; }
.ficha__form .boton { width: 100%; background: var(--yellow); color: var(--ink); }
.ficha__form .boton:hover { background: var(--pink); }

/* Cierre para la directora */
.cierre {
  margin-top: var(--gap-section);
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
  min-height: 54svh; padding: clamp(28px, 3vw, 44px) var(--margin) 24px;
  background: var(--teal); color: var(--ink);
  text-decoration: none;
  transition: background-color 160ms ease, color 160ms ease;
}
.cierre:hover, .cierre:focus-visible { background: var(--ink); color: var(--yellow); }
.cierre__arriba { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.cierre__arriba p { max-width: 34em; font-size: var(--step-lead); line-height: 1.3; }
.cierre__arriba svg { flex: none; width: clamp(32px, 4vw, 56px); height: clamp(32px, 4vw, 56px); fill: currentColor; }
.cierre h2 { font-size: 21vw; line-height: 0.9; white-space: nowrap; letter-spacing: -0.02em; }

/* Pie */
.pie { padding: 56px var(--margin) 28px; background: var(--bg); }
.bloques { display: flex; align-items: flex-end; gap: 6px; height: min(26svh, 260px); min-height: 170px; }
.bloques span {
  flex: 1; display: flex; align-items: center; justify-content: center;
  border-radius: clamp(10px, 1.6vw, 22px);
  font: 600 clamp(2.75rem, 0.4rem + 8.2vw, 8rem)/1 "Fredoka", sans-serif;
  background: var(--yellow);
}
.bloques span:nth-child(5n+1) { background: var(--blue); color: var(--on-dark); }
.bloques span:nth-child(5n+2) { background: var(--coral); color: var(--on-dark); }
.bloques span:nth-child(5n+4) { background: var(--teal); }
.bloques span:nth-child(5n) { background: var(--pink); }
.pie__fila { margin-top: 56px; display: grid; grid-template-columns: 7fr 5fr; gap: 32px 48px; }
.pie__enlaces { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 32px; align-content: start; }
.pie__enlaces a, .pie__contacto a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; }
.pie__contacto p + p { margin-top: 8px; }
.creditos { margin-top: 40px; max-width: 60ch; font-size: var(--step-small); }
.creditos a { text-underline-offset: 2px; }
.pie__aviso { margin-top: 16px; font-size: var(--step-small); font-weight: 600; }

/* Botón flotante de WhatsApp */
.flotante {
  position: fixed; z-index: 20; right: clamp(12px, 2vw, 24px); bottom: clamp(12px, 2vw, 24px);
  display: flex; align-items: center; justify-content: center;
  width: 60px; height: 60px; background: var(--blue-strong); color: var(--on-dark);
  border: 3px solid var(--bg); border-radius: 50%;
  transition: transform 180ms var(--ease);
}
.flotante svg { width: 32px; height: 32px; fill: currentColor; }
.flotante:hover { transform: scale(1.06); }
.flotante:active { transform: scale(0.96); }

/* Entradas: solo cuando hay JavaScript, nunca dejan contenido oculto sin él */
.js .entra { opacity: 0; translate: 0 24px; transition: opacity 640ms var(--ease), translate 640ms var(--ease); transition-delay: var(--retraso, 0ms); }
.js .entra.visto { opacity: 1; translate: 0 0; }
.foto-lenta { animation: respira 16s ease-in-out infinite alternate; }
@keyframes respira { from { transform: scale(1); } to { transform: scale(1.07); } }

@media (max-width: 1000px) {
  .nav a { display: none; }
  .nav .menu { display: block; }
  .nav .menu a { display: flex; }
}

@media (max-width: 900px) {
  .portada { display: block; min-height: 0; padding: 84px var(--margin) 28px; }
  .portada h1 { font-size: 9.8vw; }
  .portada__lead { margin-top: 18px; font-size: 1.125rem; }
  .portada__accion { margin-top: 20px; }
  .cubos { margin-top: 32px; gap: 8px; }
}

@media (min-width: 761px) and (max-width: 900px) {
  .portada { padding-top: 148px; }
}

@media (max-width: 760px) {
  .cabeza { flex-wrap: wrap; }
  .aulas__lista { grid-template-columns: 1fr; gap: 28px; margin-top: 36px; }
  .propuesta__fila { grid-template-columns: 1fr; margin-top: 40px; }
  .muro { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .muro .muro__titulo, .muro .ficha-palabra--tinta { grid-column: span 2; aspect-ratio: 2 / 1; }
  .muro__titulo h2 { font-size: var(--step-head); }
  .proceso ol { grid-template-columns: 1fr; }
  .proceso__figura .horizontal { display: none; }
  .proceso__figura .vertical { display: block; max-height: 300px; width: auto; margin: 0 auto; }
  .tablero { grid-template-columns: repeat(2, 1fr); gap: 6px; }
  .tablero > * { min-height: 150px; }
  .preguntas { grid-template-columns: 1fr; }
  .preguntas__cabeza { position: static; }
  .preguntas__dibujo { display: none; }
  .acordeon summary { min-height: 64px; padding: 12px 20px; }
  .acordeon details p { padding: 0 20px 20px; }
  .ficha { grid-template-columns: 1fr; }
  .ficha::before, .ficha::after { display: none; }
  .ficha__form { border-left: 0; border-top: 5px dotted var(--bg); }
  .cierre { min-height: 52svh; }
  .cierre__arriba p { font-size: 1.0625rem; }
  .cierre h2 { font-size: 16.4vw; }
  .bloques { flex-wrap: wrap; height: auto; }
  .bloques span { flex: 1 0 calc(20% - 5px); height: 72px !important; font-size: 13vw; }
  .bloques span:nth-child(even) { height: 60px !important; }
  .pie__fila { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0ms !important; }
  .js .entra { opacity: 1; translate: 0 0; }
}
