/* ==========================================================================
   Academia Ítaca — sistema de diseño «Tinta»
   Blanco y negro, como el sello del logo. Papel, tinta, líneas finas,
   doble anillo y trazo de pincel. Color SOLO funcional:
   WhatsApp = verde (texto tinta) · Llamar = azul (texto blanco) ·
   Formulario = morado y Email = rojo (solo en sus tarjetas de contacto, texto blanco).
   Fondo blanco puro y grises neutros (sin tono cálido ni grano).
   Tipografía: Fraunces (titulares) + Marcellus (rótulos) + Hanken Grotesk (cuerpo).
   Detalle y componentes: NOTAS_DISENO.md.
   ========================================================================== */

:root {
  /* Papel y tinta: blanco y grises neutros */
  --paper: #FFFFFF;
  --white: #FFFFFF;
  --paper-2: #F3F3F3;
  --line-c: #DADADA;
  --ink: #0E0E0E;
  --ink-2: #474747;
  --ink-3: #696969;
  /* Únicos colores: acciones de contacto */
  --wa: #25D366;
  --wa-hover: #1EBE5A;
  --wa-ink: #0B0B0B;
  --call: #1D4ED8;
  --call-hover: #1E40AF;
  --form: #6D28D9;
  --form-hover: #5B21B6;
  --mail: #DC2626;
  --mail-hover: #B91C1C;

  /* Alias heredados del diseño a color (monocromos). No usar en reglas nuevas. */
  --lemon: var(--white);
  --coral: var(--paper-2);
  --mint: var(--paper-2);
  --cobalt: var(--ink);

  /* Líneas, radios, sombras */
  --line: 1.5px solid var(--ink);
  --line-thin: 1px solid var(--ink);
  --line-soft: 1px solid var(--line-c);
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-sm: 2px 2px 0 var(--ink);
  --shadow: 3px 3px 0 var(--ink);
  --shadow-lg: 4px 4px 0 var(--ink);

  /* Tipografía */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-label: "Marcellus", "Trajan Pro", Georgia, serif;
  --font-body: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --track-label: 0.18em;

  /* Espacio y medidas */
  --space-2xs: 4px;
  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-2xl: 64px;
  --space-3xl: 96px;
  --nav-h: 68px;
  --dock-h: 76px;
  --container: 1160px;
  --gutter: 16px; /* padding lateral del .container (24px desde 560) */
  --step: 180ms;
  --ease: cubic-bezier(.2, .7, .2, 1);

  /* Sin grano de papel: el fondo es blanco limpio (petición de Miguel, nov-2026) */
  --grain: none;
}

/* ----- Reset y base ----- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
  -webkit-text-size-adjust: 100%;
}

html,
body { overflow-x: clip; }

body {
  margin: 0;
  background-color: var(--paper);
  background-image: var(--grain);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  padding-bottom: calc(var(--dock-h) + env(safe-area-inset-bottom));
}

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

[hidden] { display: none !important; }

::selection { background: var(--ink); color: var(--paper); }

/* Foco: doble anillo papel + tinta + papel (como el sello). Se ve sobre papel, tinta,
   verde y azul sin reglas por banda; los FAB flotan sobre cualquier fondo. El contorno
   transparente lo pinta el modo de alto contraste del sistema (forced-colors). */
:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--paper), 0 0 0 4.5px var(--ink), 0 0 0 6.5px var(--paper) !important;
}
a:not([class]):focus-visible { border-radius: 3px; }
.ask strong:focus-visible { box-shadow: none !important; }

.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 {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 80;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-pill);
  padding: 10px 16px;
  font-weight: 700;
  text-decoration: none;
}

.skip:focus { top: 12px; }

/* ----- Tipografía ----- */
h1, h2, h3, .font-display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.04;
  color: var(--ink);
}

/* Énfasis: negrita, nunca cursiva (decisión de 13-nov-2026) */
em, i:not(:empty), cite { font-style: normal; font-weight: 650; }
h1 em, h2 em, h3 em { font-style: normal; font-weight: 640; }
/* Fraunces a tamaño grande cierra mucho los blancos: tracking negativo moderado
   y un poco más de espacio entre palabras («Blog y» no debe leerse «Blogy») */
h1, h2, h3, h4, blockquote, .font-display, .pullquote, .ask strong { word-spacing: 0.06em; }

h1 { font-size: clamp(2.35rem, 7vw, 5.4rem); letter-spacing: -0.015em; line-height: 0.98; overflow-wrap: break-word; }
h2 { font-size: clamp(1.95rem, 4.4vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 500; line-height: 1.12; letter-spacing: -0.005em; }

.kicker,
.label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-family: var(--font-label);
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1.3;
  color: var(--ink-2);
}

/* El <i> del kicker es un pequeño sello: dos anillos concéntricos */
.kicker i {
  flex: none;
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid currentColor;
  box-shadow: inset 0 0 0 2px var(--paper), inset 0 0 0 3px currentColor;
}
.band-ink .kicker i { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px currentColor; }
.band-white .kicker i,
.assistant .kicker i { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px currentColor; }
.band-paper-2 .kicker i { box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3px currentColor; }

.lede {
  margin-top: 18px;
  max-width: min(40ch, 100%);
  font-size: 1.125rem;
  line-height: 1.5;
  color: var(--ink-2);
}

/* Palabra clave del titular: negrita + trazo de pincel que se «pinta» */
.scribble {
  position: relative;
  display: inline-block;
  font-style: normal;
  font-weight: 640;
  white-space: nowrap;
}
.scribble .brush {
  position: absolute;
  left: 0;
  bottom: -0.1em;
  width: 100%;
  height: 0.26em;
  color: var(--ink);
  pointer-events: none;
}
.scribble .brush path { fill: currentColor; }
html.js-motion .scribble .brush { animation: brush-paint 900ms var(--ease) 450ms both; }
@keyframes brush-paint {
  from { clip-path: inset(0 100% 0 0); }
  to { clip-path: inset(0 0 0 0); }
}

.rotator {
  display: inline-grid;
  vertical-align: baseline;
  color: var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 650;
}
.rotator-sizer,
.rotator-word { grid-area: 1 / 1; }
.rotator-sizer { visibility: hidden; justify-self: start; white-space: nowrap; }
.rotator-word { justify-self: start; transition: opacity var(--step) ease, transform var(--step) ease; border-bottom: 1px solid var(--ink); }
.rotator-word.is-out { opacity: 0; transform: translateY(6px); }
/* Con JS el ancho sigue a la palabra visible (sin hueco detrás) */
.rotator.is-fitted { transition: width 0.32s var(--ease); white-space: nowrap; }
.rotator.is-fitted .rotator-word { white-space: nowrap; }
.rotator-fallback[hidden] { display: none; }
.rotator-line { display: block; white-space: nowrap; }

/* ----- Layout ----- */
.container {
  width: min(var(--container), 100%);
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding: var(--space-2xl) 0; position: relative; }

.section-head {
  max-width: none;
  margin-bottom: 36px;
  display: grid;
  gap: 16px;
}
.section-head h2 {
  font-size: clamp(2.2rem, 5.4vw, 4.4rem);
  letter-spacing: -0.018em;
  line-height: 0.98;
  max-width: 15ch;
}
.section-head p:not(.kicker) { margin-top: 0; max-width: 36ch; color: var(--ink-2); font-size: 1.125rem; }
.section-aside { display: grid; gap: 16px; align-content: end; justify-items: start; }

@media (min-width: 860px) {
  .section-head-split {
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.7fr);
    align-items: end;
    gap: 40px;
  }
  .section-head-split .section-aside,
  .section-head-split > p { padding-bottom: 8px; }
}

/* Bandas: papel / blanco / papel-2 / tinta. Nada más. */
.band-white { background: var(--white); }
/* Antes gris (#F3F3F3, se veía verdoso en algunas pantallas): ahora blanco, separado por una línea */
.band-paper-2 { background: var(--white); border-top: var(--line-thin); }
.band-ink { background: var(--ink); color: var(--paper); }
.band-ink h2,
.band-ink h3,
.band-ink .kicker,
.band-ink .section-head p:not(.kicker) { color: var(--paper); }
.band-ink .kicker { color: var(--line-c); }
.band-line { border-top: var(--line-thin); border-bottom: var(--line-thin); }

/* Divisor de pincel entre secciones */
.brush-rule {
  display: block;
  width: min(420px, 70%);
  height: 18px;
  margin: 0 auto;
  color: var(--ink);
}
.brush-rule path { fill: currentColor; }

/* ----- Botones ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  max-width: 100%;
  padding: 12px 22px;
  white-space: normal;
  border: var(--line);
  border-radius: var(--radius-pill);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.005em;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: transform var(--step) var(--ease), box-shadow var(--step) var(--ease), background-color var(--step) ease, color var(--step) ease;
}

.btn .icon { width: 20px; height: 20px; flex: none; }

.btn-ink { background: var(--ink); color: var(--paper); }
.btn-paper { background: var(--paper); color: var(--ink); }
.btn-block { width: 100%; }
.btn-nav { min-height: 44px; padding: 8px 16px; font-size: 0.9375rem; }

.btn:hover { transform: translate(-1px, -2px); box-shadow: var(--shadow-lg); }
.btn-ink:hover { background: var(--ink-2); color: var(--paper); }
.btn:active,
.btn:hover:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }

.btn.is-bounce { animation: press-bounce 0.36s ease; }
@keyframes press-bounce {
  0% { transform: translate(0, 0); }
  40% { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
  100% { transform: translate(0, 0); box-shadow: var(--shadow-sm); }
}

/* Sobre tinta, los botones neutros se vuelven papel */
.band-ink .btn:not([href^="tel:"]) { background: var(--paper); color: var(--ink); border-color: var(--paper); box-shadow: 3px 3px 0 var(--ink-2); }
.band-ink .btn:not([href^="tel:"]):hover { background: var(--white); color: var(--ink); }

/* WhatsApp en verde y llamar en azul, igual que los botones de las esquinas. */
a.btn[href^="https://wa.me"],
a.btn[href^="https://api.whatsapp.com"] {
  background: var(--wa);
  color: var(--wa-ink);
  border-color: var(--ink);
}
a.btn[href^="https://wa.me"]:hover,
a.btn[href^="https://api.whatsapp.com"]:hover { background: var(--wa-hover); border-color: var(--ink); color: var(--wa-ink); }
a.btn[href^="https://wa.me"] svg,
a.btn[href^="https://api.whatsapp.com"] svg { fill: currentColor; }

a.btn[href^="tel:"] {
  background: var(--call);
  color: var(--white);
  border-color: var(--ink);
}
a.btn[href^="tel:"]:hover { background: var(--call-hover); color: var(--white); }
a.btn[href^="tel:"] svg { stroke: currentColor; }
.band-ink a.btn[href^="https://wa.me"],
.band-ink a.btn[href^="https://api.whatsapp.com"] { background: var(--wa); color: var(--wa-ink); border-color: var(--ink); }
.band-ink a.btn[href^="tel:"] { background: var(--call); color: var(--white); border-color: var(--ink); box-shadow: 3px 3px 0 var(--ink-2); }
.band-ink a.btn[href^="tel:"]:hover { background: var(--call-hover); color: var(--white); }

/* Llamar es https://wa.me/call/… El prefijo https://wa.me también casa estas URL y las pintaba de verde. */
a.btn[href^="https://wa.me/call"] {
  background: var(--call);
  color: var(--white);
  border-color: var(--ink);
}
a.btn[href^="https://wa.me/call"]:hover { background: var(--call-hover); color: var(--white); }
a.btn[href^="https://wa.me/call"] svg { fill: none; stroke: currentColor; }
.band-ink a.btn[href^="https://wa.me/call"] {
  background: var(--call);
  color: var(--white);
  border-color: var(--ink);
  box-shadow: 3px 3px 0 var(--ink-2);
}
.band-ink a.btn[href^="https://wa.me/call"]:hover { background: var(--call-hover); color: var(--white); }
/* En el CTA final y las bandas invertidas --white pasa a negro: el texto usa --ink, que ahí es blanco. */
.tone-night a.btn[href^="https://wa.me/call"],
.cross-links-section a.btn[href^="https://wa.me/call"],
.final-cta-section a.btn[href^="https://wa.me/call"],
.tone-night a.btn[href^="https://wa.me/call"]:hover,
.cross-links-section a.btn[href^="https://wa.me/call"]:hover,
.final-cta-section a.btn[href^="https://wa.me/call"]:hover { color: var(--ink); }

/* ----- Chips ----- */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.chip {
  appearance: none;
  min-height: 44px;
  padding: 8px 16px;
  border: var(--line-thin);
  border-radius: var(--radius-pill);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  cursor: pointer;
  transition: background-color var(--step) ease, color var(--step) ease;
}
.chip:hover { background: var(--paper-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ----- Tarjetas ----- */
.card {
  background: var(--white);
  color: var(--ink);
  border: var(--line-thin);
  border-radius: var(--radius);
  padding: 22px;
}

a.card {
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform var(--step) var(--ease), box-shadow var(--step) var(--ease);
}
a.card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-lg); }

.go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

/* ----- Sello giratorio (doble anillo + texto en círculo) -----
   <div class="seal"><svg class="seal-ring">…textPath…</svg><img class="seal-mark"></div> */
.seal {
  position: relative;
  width: 200px;
  aspect-ratio: 1;
  flex: none;
  color: var(--ink);
}
.seal-ring { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.seal-ring text {
  font-family: var(--font-label);
  font-size: 13.5px;
  letter-spacing: 0.2em;
  fill: currentColor;
}
.seal-ring circle { fill: none; stroke: currentColor; }
.seal-spin { transform-origin: 50% 50%; transform-box: view-box; }
html.js-motion .seal-spin { animation: seal-spin 48s linear infinite; }
@keyframes seal-spin { to { transform: rotate(360deg); } }
.seal-mark {
  position: absolute;
  inset: 16%;
  width: 68%;
  height: 68%;
  border-radius: 50%;
  mix-blend-mode: multiply;
  object-fit: contain;
}
.seal-ring .seal-disc { fill: var(--white); stroke: none; }

/* ----- Navegación ----- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: transform 0.3s var(--ease), border-color 0.3s ease;
}
.nav.is-scrolled,
html.is-static .nav { border-bottom-color: var(--ink); }
.nav.is-hidden { transform: translateY(-110%); }

.nav-bar {
  height: 100%;
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  font-family: var(--font-label);
  font-weight: 400;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 0.9375rem;
  min-width: 0;
  position: relative;
  z-index: 2;
  mix-blend-mode: multiply; /* funde el blanco del logo con el papel */
}

.brand img {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  mix-blend-mode: multiply;
}
.brand span { white-space: nowrap; }

.nav-toggle {
  margin-left: auto;
  position: relative;
  z-index: 2;
  width: 48px;
  height: 48px;
  border: var(--line-thin);
  border-radius: 50%;
  background: var(--paper);
  display: grid;
  place-items: center;
  transition: background-color var(--step) ease;
}
.nav-toggle:hover { background: var(--paper-2); }

.nav-toggle span.bar,
.nav-toggle span.bar::before,
.nav-toggle span.bar::after {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  position: relative;
  transition: transform 0.28s var(--ease), background-color 0.2s ease;
}
.nav-toggle span.bar::before,
.nav-toggle span.bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle span.bar::before { top: -5px; }
.nav-toggle span.bar::after { top: 5px; }
.nav-toggle[aria-expanded="true"] span.bar { background: transparent; }
.nav-toggle[aria-expanded="true"] span.bar::before { transform: translateY(5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span.bar::after { transform: translateY(-5px) rotate(-45deg); }

.nav-menu { display: flex; flex-direction: column; counter-reset: navi; }
.nav-menu a:not(.btn) { text-decoration: none; }
.menu-ctas { display: grid; gap: 10px; margin-top: 18px; }
.nav-cta { display: none; }

@media (max-width: 1079px) {
  .nav-menu {
    position: fixed;
    inset: 0;
    z-index: 1;
    background-color: var(--paper);
    background-image: var(--grain);
    padding: calc(var(--nav-h) + 18px) 24px calc(32px + env(safe-area-inset-bottom));
    gap: 0;
    overflow: auto;
    opacity: 0;
    transform: translateY(-12px);
    visibility: hidden;
    transition: opacity 0.28s ease, transform 0.36s var(--ease), visibility 0.36s;
  }
  .nav-menu.is-open { opacity: 1; transform: none; visibility: visible; }
  .nav-menu::after {
    content: "";
    position: fixed;
    right: -22vw;
    bottom: -14vw;
    width: min(84vw, 440px);
    aspect-ratio: 1;
    background: url("../assets/images/logo-ink.webp") center / contain no-repeat; /* sello en tinta sólida */
    pointer-events: none;
    z-index: -1;
  }

  .nav-menu > a:not(.btn) {
    display: flex;
    align-items: baseline;
    gap: 16px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: clamp(2rem, 9vw, 3.2rem);
    letter-spacing: -0.015em;
    line-height: 1;
    padding: 14px 0;
    border-bottom: var(--line-thin);
  }
  .nav-menu > a:not(.btn)::before {
    counter-increment: navi;
    content: counter(navi, upper-roman);
    min-width: 2.6em;
    font-family: var(--font-label);
    font-size: 0.875rem;
    letter-spacing: var(--track-label);
    color: var(--ink-3);
  }
  .nav-menu > a:not(.btn):hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; }
  .menu-ctas { margin-top: 28px; }
  .menu-ctas .btn { min-height: 60px; font-size: 1.15rem; }

  body.menu-open { overflow: hidden; }
  body.menu-open .fab { opacity: 0; pointer-events: none; }
}

/* Sin JS el botón de menú no hace nada: los enlaces se ven como una fila bajo la marca */
@media (scripting: none) and (max-width: 1079px) {
  .nav { position: relative; height: auto; }
  .nav-bar { flex-wrap: wrap; height: auto; padding-block: 10px; row-gap: 6px; }
  .nav-toggle { display: none; }
  .nav-menu {
    position: static;
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2px 18px;
    padding: 0;
    opacity: 1;
    transform: none;
    visibility: visible;
    background: none;
    overflow: visible;
  }
  .nav-menu::after,
  .nav-menu > a:not(.btn)::before,
  .menu-ctas { display: none; }
  .nav-menu > a:not(.btn) {
    padding: 8px 0;
    border: 0;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
  }
  main { margin-top: calc(-1 * var(--nav-h)); }
}

/* ----- Hero ----- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 40px) 0 72px;
  isolation: isolate;
}

.hero-grid { display: grid; gap: 64px; position: relative; z-index: 1; }
.hero-copy { min-width: 0; }

.hero .kicker { margin-bottom: 22px; }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
}

/* Sello «Sin matrícula ni permanencia» */
.stamp {
  display: grid;
  place-items: center;
  width: 150px;
  height: 150px;
  padding: 20px;
  margin-left: 6px;
  border-radius: 50%;
  border: var(--line-thin);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--ink);
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  line-height: 1.25;
  transform: rotate(-9deg);
  color: var(--ink);
}

.proof-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: var(--line-soft);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.proof-line a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.proof-line .star { width: 16px; height: 16px; color: var(--ink); }
.proof-sep { color: var(--ink-3); }
.proof-line a { min-height: 32px; }
@media (max-width: 559px) {
  .proof-line { gap: 4px 18px; }
  .proof-sep { display: none; }
}

/* Sellos («circulitos»): fichas de tinta de doble anillo con un símbolo.
   Interactivos con JS (initStickers): parallax suave con ratón/scroll, giro al pasar
   el ratón y se pueden coger y soltar (solo puntero fino). Siempre aria-hidden. */
.sticker-stage { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.has-stickers > .container { position: relative; z-index: 1; }
.sticker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  transform: translate(calc(var(--px, 0px) + var(--dx, 0px)), calc(var(--py, 0px) + var(--dy, 0px))) rotate(calc(var(--rot, 0deg) + var(--spin, 0deg)));
  touch-action: auto;
}
.sticker-in {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.35rem;
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
  transition: transform 0.5s var(--ease);
}
.band-white .sticker-in { background: var(--white); box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--ink); }
.band-paper-2 .sticker-in { background: var(--white); box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--ink); }
.sticker-in svg { width: 54%; height: 54%; overflow: visible; }
.sticker.is-word .sticker-in { font-size: 0.95rem; letter-spacing: -0.01em; }
/* H₂O: el 2 es subíndice de verdad (el span evita que <sub> sea un ítem flex) */
.chem { display: inline-block; line-height: 1; }
.chem sub { font-size: 0.66em; vertical-align: baseline; position: relative; top: 0.32em; line-height: 0; margin: 0 0.04em; }

/* Interacción (con JS y puntero fino: html.stickers-live) */
html.stickers-live .sticker { pointer-events: auto; cursor: grab; }
html.stickers-live .sticker:hover .sticker-in { transform: rotate(-14deg) scale(1.08); }
html.stickers-live .sticker.is-dragging { cursor: grabbing; z-index: 3; }
html.stickers-live .sticker.is-dragging .sticker-in { transform: scale(1.14) rotate(6deg); box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink), var(--shadow-lg); }
.sticker.is-dropped .sticker-in { animation: sticker-drop 0.42s var(--ease); }
@keyframes sticker-drop {
  0% { transform: scale(1.14); }
  55% { transform: scale(0.92) rotate(-3deg); }
  100% { transform: none; }
}

/* Hero, por defecto (móvil y escritorio estrecho): una fila de sellos en el margen inferior */
.hero .sticker { display: none; bottom: 22px; }
.hero .sticker.s1 { display: grid; left: 4%; }
.hero .sticker.s5 { display: grid; left: 22%; bottom: 34px; }
.hero .sticker.s8 { display: grid; left: 40%; }

/* Sellos de sección: en móvil uno pequeño en el margen superior derecho; en escritorio ancho,
   centrados en los márgenes laterales (--t = altura, at-l / at-r = lado) */
.sticker-margins .sticker { display: none; width: 46px; height: 46px; top: 10px; right: 12px; }
.sticker-margins .sticker.m1 { display: grid; }
.sticker-margins .sticker-in { font-size: 1.05rem; }
.sticker-margins .sticker.is-word .sticker-in { font-size: 0.72rem; }

/* Fondo del hero: el sello de la academia en tinta sólida, grande y cortado por el borde.
   Es una versión con fondo transparente del logo (logo-ink.webp): negro puro, sin opacidad. */
.hero-seal {
  position: absolute;
  z-index: -1;
  width: 330px;
  height: auto;
  right: -96px;
  bottom: -118px;
  pointer-events: none;
  user-select: none;
}

/* ----- Asistente ----- */
/* Ficha de inscripción: cabecera en tinta (la propia tarjeta) y cuerpo blanco (.assistant-app)
   que llega a los bordes. --ap-t/--ap-x/--ap-b son el padding y el sangrado del cuerpo. */
.assistant {
  --ap-t: 34px;
  --ap-x: 22px;
  --ap-b: 24px;
  position: relative;
  align-self: start;
  background: var(--ink);
  color: var(--paper);
  border: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--ap-t) var(--ap-x) var(--ap-b);
  min-width: 0;
}

.assistant .seal {
  position: absolute;
  width: 112px;
  top: -58px;
  right: -6px;
  z-index: 2;
}
.assistant .seal .seal-ring .seal-disc { fill: var(--white); stroke: none; }

.tape {
  position: absolute;
  top: -15px;
  left: 20px;
  padding: 6px 14px;
  background: var(--white);
  color: var(--ink);
  border: var(--line);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-pill);
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  line-height: 1.2;
}

.assistant-top { display: flex; align-items: center; gap: 12px; padding-right: 96px; }
.assistant-top img { display: none; }
.assistant-top .kicker { margin-bottom: 6px; color: var(--line-c); }
.assistant h2 { font-size: clamp(1.7rem, 3.2vw, 2.3rem); letter-spacing: -0.012em; color: var(--paper); }

.assistant-fallback { display: grid; gap: 10px; margin-top: 18px; }
.assistant-fallback p { color: var(--line-c); }

.assistant-lede { margin-top: 12px; max-width: 44ch; color: var(--line-c); font-size: 1rem; line-height: 1.45; }

/* «30 segundos · Sin compromiso» (la pone JS bajo la entradilla) */
.assistant-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-top: 12px;
  padding: 0;
  list-style: none;
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  line-height: 1.2;
}
.assistant-meta li {
  padding: 5px 11px;
  border: 1px solid var(--ink-2);
  border-radius: var(--radius-pill);
  color: var(--paper);
}

/* Flecha a pincel desde el texto del hero hasta el formulario (solo escritorio, la pone JS) */
.assistant-arrow { display: none; }

/* El formulario: cabecera de paso, pregunta, opciones tipo radio, campos de texto */
.assistant-app {
  margin: 22px calc(-1 * var(--ap-x)) calc(-1 * var(--ap-b));
  padding: 20px var(--ap-x) var(--ap-b);
  background: var(--white);
  color: var(--ink);
  border-top: var(--line);
  border-radius: 0 0 calc(var(--radius-lg) - 2px) calc(var(--radius-lg) - 2px);
  display: grid;
  gap: 18px;
  position: relative;
}

.step-head { display: grid; gap: 8px; }
.progress { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.progress span { height: 4px; background: var(--line-c); border-radius: 2px; transition: background-color 0.3s ease; }
.progress span.is-on { background: var(--ink); }

.step-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 0.875rem;
  line-height: 1.3;
  color: var(--ink-3);
}
.step-count { color: var(--ink); }

.step-form { display: grid; gap: 16px; }

.ask { display: grid; gap: 4px; }
.ask strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.45rem, 2.4vw, 1.75rem);
  letter-spacing: -0.01em;
  line-height: 1.1;
  outline: none;
}
.ask em { color: var(--ink-2); font-size: 0.9375rem; font-style: normal; }

.opt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt-grid.cols-1 { grid-template-columns: 1fr; }

/* Opción seleccionable: casilla redonda (doble anillo al marcarla, como el sello) */
.opt {
  appearance: none;
  text-align: left;
  min-height: 56px;
  min-width: 0;
  padding: 12px 14px 12px 12px;
  border: var(--line-thin);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.2;
  display: flex;
  align-items: center;
  gap: 11px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background-color var(--step) ease, color var(--step) ease, transform var(--step) var(--ease), box-shadow var(--step) var(--ease);
}
/* Las opciones que avanzan llevan una flecha que asoma al pasar el ratón (sin ocupar sitio) */
.opt-grid .opt { position: relative; }
.opt-grid .opt:not(.opt-other)::after {
  content: "→";
  position: absolute;
  right: 12px;
  top: 50%;
  margin-top: -0.6rem;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 1.25rem;
  line-height: 1;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--step) ease, transform var(--step) var(--ease);
}
@media (hover: hover) {
  .opt-grid .opt:not(.opt-other):hover::after { opacity: 1; transform: none; }
}
.opt-mark {
  flex: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: var(--white);
  transition: background-color var(--step) ease, box-shadow var(--step) ease, border-color var(--step) ease;
}
.opt-body { display: grid; gap: 2px; min-width: 0; overflow-wrap: break-word; }
.opt small { font-weight: 500; font-size: 0.875rem; line-height: 1.25; color: var(--ink-3); }
.opt:hover { background: var(--paper-2); transform: translate(-1px, -2px); box-shadow: var(--shadow-lg); }
.opt:active,
.opt:hover:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--ink); }
.opt:hover .opt-mark { background: var(--paper-2); }
.opt.is-selected,
.opt[aria-pressed="true"] { background: var(--ink); color: var(--paper); box-shadow: var(--shadow-sm); }
.opt.is-selected small { color: var(--line-c); }
.opt.is-selected .opt-mark {
  border-color: var(--paper);
  background: var(--paper);
  box-shadow: inset 0 0 0 3.5px var(--ink);
}
/* «Otro/Otra»: borde discontinuo, ocupa la fila entera; se rellena a mano */
.opt-other { grid-column: 1 / -1; border-style: dashed; }
.opt-other.is-selected { border-style: solid; }

.opt-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip { min-height: 44px; padding: 8px 16px 8px 10px; border-radius: var(--radius-pill); gap: 9px; }
.opt-chip .opt-mark { width: 18px; height: 18px; }

/* Campos de texto */
.field { display: grid; gap: 8px; min-width: 0; }
.field-label { font-weight: 700; font-size: 1rem; line-height: 1.3; color: var(--ink); }
.field-input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 13px 14px;
  border: var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem; /* 16px: iOS no hace zoom */
  line-height: 1.45;
  transition: background-color var(--step) ease;
}
textarea.field-input { min-height: 104px; resize: vertical; }
.field-input::placeholder { color: var(--ink-3); opacity: 1; }
.field-input:hover,
.field-input:focus { background: var(--white); }
.field-input[aria-invalid="true"] { border-width: 2.5px; }
.field-other { padding-left: 14px; border-left: 2px solid var(--ink); }
.field-error { font-weight: 700; font-size: 0.9375rem; color: var(--ink); }
.field-error::before { content: "— "; }
.field-message textarea.field-input { min-height: 168px; background: var(--white); }

.step-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.step-next { margin-left: auto; min-width: 148px; }

.linkish {
  justify-self: start;
  appearance: none;
  border: 0;
  background: none;
  min-height: 44px;
  padding: 6px 2px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.linkish:hover { color: var(--ink); }

/* Resumen tipo ticket */
.receipt {
  margin: 0;
  padding: 4px 16px;
  border: 1px dashed var(--ink);
  border-radius: var(--radius);
  background: var(--paper);
  display: grid;
}
.receipt-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 12px;
  row-gap: 2px;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px dotted var(--ink-3);
}
.receipt-row:last-child { border-bottom: 0; }
.receipt dt { grid-column: 1; font-family: var(--font-label); letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.875rem; color: var(--ink-3); }
.receipt dd { grid-column: 1; margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.receipt dd.is-empty { font-weight: 500; color: var(--ink-3); }
.receipt-edit {
  grid-column: 2;
  grid-row: 1 / span 2;
  appearance: none;
  border: 0;
  background: none;
  min-height: 44px;
  padding: 0 4px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}
.receipt-edit:hover { color: var(--ink); }
.wa-note { margin-top: -6px; font-size: 0.9375rem; color: var(--ink-2); text-align: center; }
.btn-huge { min-height: 64px; font-size: 1.2rem; }
.btn-huge .icon { width: 24px; height: 24px; }

/* Móvil estrecho: dos columnas sin partir «Matemáticas» ni «Majadahonda» a 360px */
@media (max-width: 419px) {
  .assistant { --ap-x: 18px; }
  .opt-grid { gap: 6px; }
  .opt-grid .opt { padding: 10px 10px 10px 9px; gap: 8px; }
  .opt-grid .opt-mark { width: 18px; height: 18px; }
  .opt-grid .opt-label { font-size: 0.9375rem; }
  .opt-body { overflow-wrap: break-word; hyphens: auto; }
}

.confetti { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.confetti span {
  position: absolute;
  top: 30%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  background: var(--paper);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1rem;
  opacity: 0;
  animation: confetti-pop 1.1s var(--ease) forwards;
}
.confetti span:nth-child(1) { --dx: -150px; --dy: -60px; --rot: -18deg; }
.confetti span:nth-child(2) { --dx: -70px; --dy: -110px; --rot: 10deg; animation-delay: 60ms; }
.confetti span:nth-child(3) { --dx: 20px; --dy: -125px; --rot: -6deg; animation-delay: 120ms; }
.confetti span:nth-child(4) { --dx: 100px; --dy: -95px; --rot: 14deg; animation-delay: 80ms; }
.confetti span:nth-child(5) { --dx: 160px; --dy: -40px; --rot: -10deg; animation-delay: 140ms; }
@keyframes confetti-pop {
  0% { opacity: 0; transform: translate(-50%, 0) scale(0.4); }
  25% { opacity: 1; }
  80% { opacity: 1; transform: translate(calc(-50% + var(--dx)), var(--dy)) rotate(var(--rot)) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(var(--dy) + 14px)) rotate(var(--rot)) scale(1); }
}

/* ----- Marquee ----- */
.marquee {
  border-top: var(--line-thin);
  border-bottom: var(--line-thin);
  background: var(--white);
  overflow: hidden;
  padding: 16px 0;
}
.marquee-track { display: flex; width: max-content; }
html.js-motion .marquee-track { animation: marquee 60s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; gap: 26px; padding-right: 26px; }
.marquee-group span:not(.sq) {
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 380;
  font-size: clamp(1.35rem, 2.6vw, 1.9rem);
  letter-spacing: -0.008em;
  white-space: nowrap;
}
.marquee-group span:nth-child(4n+1):not(.sq) { font-style: normal; font-family: var(--font-label); font-size: clamp(1rem, 1.8vw, 1.25rem); letter-spacing: var(--track-label); text-transform: uppercase; }
.marquee .sq {
  width: 14px;
  height: 14px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 2px var(--white), inset 0 0 0 3px var(--ink);
}
@keyframes marquee { to { transform: translateX(-50%); } }

/* ----- Cómo funciona: 3 pasos ----- */
.steps { display: grid; gap: 22px; margin: 0; padding: 0; list-style: none; }
.step {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 26px 22px 24px;
  background: var(--white);
  border: var(--line-thin);
  border-radius: var(--radius-lg);
}
.step-index {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  box-shadow: inset 0 0 0 4px var(--white), inset 0 0 0 5px var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.7rem;
  line-height: 1;
}
.step p { color: var(--ink-2); }
.step-arrow { display: grid; place-items: center; height: 44px; color: var(--ink); }
.step-arrow svg { width: 64px; height: 24px; transform: rotate(90deg); overflow: visible; }
.step-arrow path { stroke: currentColor; }
html.js-motion .steps.reveal .step-arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 0.7s var(--ease) 0.35s; }
html.js-motion .steps.reveal .step-arrow path + path { transition-duration: 0.3s; transition-delay: 1s; }
html.js-motion .steps.reveal.is-in .step-arrow path { stroke-dashoffset: 0; }

/* ----- Cifras (banda en tinta) ----- */
.stats { background: var(--ink); color: var(--paper); padding: 56px 0 44px; }
.stats-row {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: 16px;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.stat {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 18px 14px 22px;
  border-top: 1px solid var(--ink-2);
}
.stat:nth-child(odd) { padding-left: 0; }
.stat:nth-child(even) { border-left: 1px solid var(--ink-2); }
.stat-num {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(2.6rem, 8vw, 5rem);
  letter-spacing: -0.02em;
  line-height: 0.95;
  font-variant-numeric: lining-nums tabular-nums;
}
.stat-num em { font-style: normal; font-weight: 640; }
.stat p { font-size: 0.9375rem; color: var(--line-c); max-width: 18ch; }
.stats-note {
  width: min(var(--container), 100%);
  margin: 22px auto 0;
  padding-inline: 16px;
  font-family: var(--font-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--line-c);
}

/* ----- Testimonios ----- */
.stars { display: inline-flex; gap: 3px; color: var(--ink); }
.stars svg { width: 18px; height: 18px; }
.band-ink .stars { color: var(--paper); }

.pullquote {
  position: relative;
  margin: 0 0 28px;
  padding: 40px 0 36px;
  border-top: var(--line-thin);
  border-bottom: var(--line-thin);
  display: grid;
  gap: 18px;
}
.pullquote::before {
  content: "«";
  position: absolute;
  right: clamp(20px, 4vw, 56px);
  top: -6px;
  font-family: var(--font-display);
  font-style: normal;
  font-size: clamp(7rem, 16vw, 13rem);
  line-height: 1;
  color: var(--line-c);
  pointer-events: none;
}
.pullquote p {
  position: relative;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 340;
  font-size: clamp(1.4rem, 3.1vw, 2.35rem);
  letter-spacing: -0.012em;
  line-height: 1.16;
  max-width: 36ch;
}
.pullquote footer {
  font-family: var(--font-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.quote-row { display: grid; gap: 16px; }
.t-card {
  background: var(--paper);
  border: var(--line-thin);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.t-card-in { display: grid; gap: 14px; }
.t-card .quote {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.t-card .author,
.author {
  font-family: var(--font-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* ----- Servicios apilados ----- */
.head-sticker,
.section-head p.head-sticker {
  display: grid;
  place-items: center;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 5px var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.5rem;
  color: var(--ink);
  transform: rotate(-8deg);
}

.stack { display: grid; gap: 14px; }
.stack-slot { min-width: 0; }
.stack-card {
  position: relative;
  background: var(--white);
  border: var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  display: grid;
  gap: 16px;
  align-items: start;
}
.stack-card h3 { font-size: clamp(1.6rem, 3vw, 2.3rem); letter-spacing: -0.012em; margin-bottom: 8px; }
.stack-card p { color: var(--ink-2); }
.service-logo {
  width: 104px;
  height: 104px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.stack-no {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  color: var(--ink-3);
  margin-bottom: 8px;
}
.stack-links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.stack-links a {
  font-weight: 700;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.stack-card > .btn { justify-self: start; }

/* ----- Zonas: rejilla de mapa con líneas de tinta ----- */
.madrid {
  position: relative;
  border: var(--line-thin);
  border-radius: var(--radius-lg);
  background: var(--ink);
  overflow: hidden;
}
.madrid-rose { display: none; }
/* Silueta de Madrid y los municipios donde damos clase (OpenStreetMap).
   El escenario hace zoom solo al entrar en pantalla; los sellos van dentro y se mueven con él. */
.madrid-map {
  position: relative;
  background: var(--white);
  margin-bottom: 1px;
  padding: 0;
  overflow: hidden;
}
.mm-viewport {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--white);
}
.mm-stage {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  transition: transform 1.15s cubic-bezier(0.16, 1, 0.3, 1);
}
.mm-viewport.is-zoomed .mm-stage { transform: none; }
.mm-stage svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.madrid-map path { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.madrid-map .mm-land { fill: #8a8a8a; stroke: var(--white); stroke-width: 3; }
.madrid-map .mm-m40 { stroke: var(--ink-3); stroke-width: 1.15; stroke-dasharray: 1.6 3.4; }
.madrid-map .mm-m30 { stroke: var(--ink); stroke-width: 1.7; }
.madrid-map .mm-a6 { stroke: var(--ink-2); stroke-width: 1.35; }
.madrid-map .mm-river { stroke: var(--ink-3); stroke-width: 2.15; }
.madrid-map .mm-axis { stroke: var(--ink); stroke-width: 1.85; stroke-dasharray: 5 6; }
.madrid-map text {
  font-family: var(--font-label);
  fill: var(--ink-3);
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  paint-order: stroke;
  stroke: var(--white);
  stroke-width: 5px;
  stroke-linejoin: round;
}
.madrid-map .mm-city {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 22px;
  letter-spacing: 0.04em;
  text-transform: none;
  fill: var(--ink);
  text-anchor: middle;
}
.madrid-map .mm-axis-label { fill: var(--ink); }
.madrid-map .mm-compass path { fill: var(--ink); stroke: none; }
.madrid-map .mm-compass text { font-size: 13px; text-anchor: middle; fill: var(--ink); stroke: none; }
.madrid-map .mm-scale path { stroke: var(--ink); stroke-width: 1.25; }
.madrid-map .mm-scale text { font-size: 12px; text-anchor: middle; fill: var(--ink-2); stroke: none; letter-spacing: 0.08em; }
.mm-pin {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  width: 14px;
  height: 14px;
  transform: translate(-50%, -50%);
  display: block;
  border-radius: 50%;
  border: 2px solid var(--white);
  background: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
  text-decoration: none;
}
.mm-pin .mm-num {
  font-family: var(--font-label);
  font-size: 15px;
  line-height: 1;
  letter-spacing: 0.04em;
}
.mm-pin .mm-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 6px);
  transform: translateX(-50%);
  white-space: nowrap;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  pointer-events: none;
  background: var(--white);
  padding: 1px 4px;
}
.mm-pin.mm-label-e .mm-label { left: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.mm-pin.mm-label-w .mm-label { left: auto; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); }
.mm-pin.mm-label-n .mm-label { top: auto; bottom: calc(100% + 6px); }
.mm-pin:hover,
.mm-pin.is-hot,
.mm-pin:focus-visible {
  background: var(--white);
  box-shadow: 0 0 0 1.5px var(--ink);
}
/* Comunidad de Madrid: punto real de cada zona y etiqueta con línea guía */
.madrid-map > svg { display: block; width: 100%; height: auto; }
.madrid-map .mm-lead { stroke: var(--ink); stroke-width: 1.2; }
.madrid-map .mm-dot { fill: var(--ink); stroke: var(--white); stroke-width: 2; transition: r 0.25s var(--ease); }
.madrid-map .mm-dot.is-hot { fill: var(--white); stroke: var(--ink); r: 7; }
.madrid-map .mm-lead.is-hot { stroke-width: 2.2; }
.mm-tag {
  position: absolute;
  left: var(--x);
  top: var(--y);
  z-index: 2;
  transform: translate(-100%, -50%);
  white-space: nowrap;
  font-family: var(--font-label);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  background: var(--white);
  border: 1px solid var(--ink);
  padding: 4px 9px;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.mm-tag-e { transform: translate(0, -50%); }
.mm-tag:hover, .mm-tag.is-hot, .mm-tag:focus-visible { background: var(--ink); color: var(--white); }
.mm-attr {
  position: absolute;
  right: 10px;
  bottom: 4px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-3);
}
@media (max-width: 719px) {
  .madrid-map .mm-road, .madrid-map .mm-city { display: none; }
  .mm-pin .mm-label { display: none; }
  .mm-tag, .madrid-map .mm-lead { display: none; }
  .mm-pin { width: 12px; height: 12px; }
}
.madrid-grid { display: grid; gap: 1px; counter-reset: zona; }
.zone-card,
.madrid .zone-card {
  position: relative;
  border: 0;
  border-radius: 0;
  background: var(--white);
  padding: 24px 22px 22px;
  min-height: 0;
}
.madrid a.zone-card:hover,
.madrid a.zone-card.is-hot { transform: none; box-shadow: none; background: var(--ink); color: var(--paper); }
.madrid a.zone-card:hover p,
.madrid a.zone-card:hover .zone-kicker,
.madrid a.zone-card.is-hot p,
.madrid a.zone-card.is-hot .zone-kicker { color: var(--line-c); }
.madrid a.zone-card:hover h3,
.madrid a.zone-card.is-hot h3 { color: var(--paper); }
.zone-card::before {
  counter-increment: zona;
  content: counter(zona, upper-roman);
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid currentColor;
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
}
.zone-card h3 { font-size: 1.5rem; padding-right: 48px; transition: color var(--step) ease; }
.zone-card p { color: var(--ink-2); font-size: 0.9875rem; }
.zone-kicker,
.madrid .zone-card .zone-kicker {
  font-family: var(--font-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--ink-3);
  padding-right: 48px;
}
.madrid .zone-card .go { margin-top: auto; padding-top: 10px; }
.zone-card.is-picked { background: var(--ink); color: var(--paper); }
.zone-card.is-picked p,
.zone-card.is-picked h3,
.zone-card.is-picked .zone-kicker { color: var(--paper); }

/* ----- Universidades (banda en tinta) ----- */
.uni-list { display: flex; flex-wrap: wrap; gap: 0 28px; margin: 6px 0 34px; border-top: 1px solid var(--ink-2); padding-top: 18px; }
/* El sellito va delante de cada nombre: nunca queda colgando a final de línea */
.uni-list li { display: flex; align-items: center; gap: 18px; }
.uni-list li::before {
  content: "";
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--line-c);
  box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 3px var(--line-c);
}
.uni-list a {
  font-family: var(--font-display);
  font-weight: 340;
  font-size: clamp(2.6rem, 9vw, 6.4rem);
  letter-spacing: -0.02em;
  line-height: 1.08;
  text-decoration: none;
  color: var(--paper);
  transition: font-style 0s, color var(--step) ease;
}
.uni-list a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.12em; }

/* ----- Material ----- */
.file-grid { display: grid; gap: 12px; }
.file-card { position: relative; padding: 20px 20px 18px; min-height: 176px; }
.file-card::after {
  content: "PDF";
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  box-shadow: inset 0 0 0 3px var(--white), inset 0 0 0 4px var(--ink);
  font-family: var(--font-label);
  font-size: 0.875rem;
  letter-spacing: 0.06em;
}
.file-kicker {
  font-family: var(--font-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--ink-3);
  padding-right: 56px;
}
.file-card h3 { font-size: 1.35rem; padding-right: 40px; }
.file-card p { color: var(--ink-2); font-size: 0.9375rem; }
.file-action {
  margin-top: auto;
  padding-top: 10px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}
.empty-note { color: var(--ink-2); margin-bottom: 16px; }

/* ----- Blog ----- */
.blog-strip .container { display: grid; gap: 22px; align-items: end; }
.blog-strip h2 { font-size: clamp(2.1rem, 5vw, 3.8rem); letter-spacing: -0.018em; }
.blog-strip p:not(.kicker) { color: var(--ink-2); margin-top: 12px; max-width: 46ch; font-size: 1.125rem; }

/* ----- FAQ ----- */
.faq-list { display: grid; border-top: var(--line-thin); }
.faq-item {
  background: transparent;
  border-bottom: var(--line-thin);
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 20px 2px;
  font-family: var(--font-display);
  font-weight: 450;
  font-size: clamp(1.15rem, 2vw, 1.4rem);
  letter-spacing: -0.008em;
  line-height: 1.22;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--ink);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.25s var(--ease), background-color var(--step) ease, color var(--step) ease;
}
.faq-item summary:hover::after { background: var(--ink); color: var(--paper); }
.faq-item[open] summary::after { content: "–"; background: var(--ink); color: var(--paper); }
.faq-item[open] summary { font-weight: 560; }
.faq-answer { padding: 0 52px 22px 2px; color: var(--ink-2); }
.faq-answer p + p { margin-top: 8px; }
.faq-item[open] .faq-answer { animation: faq-in 0.28s ease; }
@keyframes faq-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: none; }
}
.band-ink .faq-list,
.band-ink .faq-item { border-color: var(--paper); }
.band-ink .faq-answer { color: var(--line-c); }

/* ----- Contacto ----- */
.contact-grid { display: grid; gap: 12px; margin-top: 22px; }
.contact-card {
  position: relative;
  text-decoration: none;
  border: 1px solid var(--paper);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 160px;
  background: var(--paper);
  color: var(--ink);
  transition: transform var(--step) var(--ease), box-shadow var(--step) var(--ease);
}
.contact-card:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--ink-2); }
.contact-card h3 { color: var(--ink); font-size: 1.8rem; }
.band-ink .contact-card h3 { color: inherit; }
.contact-card p { font-weight: 600; }
/* Color solo en las vías funcionales */
a.contact-card[href^="https://wa.me"] { background: var(--wa); color: var(--wa-ink); border-color: var(--wa); }
a.contact-card[href^="https://wa.me"]:hover { background: var(--wa-hover); }
a.contact-card[href^="tel:"] { background: var(--call); color: var(--white); border-color: var(--call); }
a.contact-card[href^="tel:"]:hover { background: var(--call-hover); }
a.contact-card[href^="https://wa.me/call"] { background: var(--call); color: var(--white); border-color: var(--call); }
a.contact-card[href^="https://wa.me/call"]:hover { background: var(--call-hover); }

a.contact-card.contact-form { background: var(--form); color: var(--white); border-color: var(--form); }
a.contact-card.contact-form:hover { background: var(--form-hover); }
a.contact-card.contact-mail { background: var(--mail); color: var(--white); border-color: var(--mail); }
a.contact-card.contact-mail:hover { background: var(--mail-hover); }
.contact-card .go { margin-top: auto; padding-top: 8px; }

.qr {
  display: none;
  width: 112px;
  height: 112px;
  object-fit: contain;
  background: var(--white);
  border-radius: 10px;
  padding: 4px;
  margin-top: 10px;
}
.contact-intro { max-width: 36ch; }
.contact-intro a { color: inherit; }
.contact-big { display: none; }

/* ----- Footer ----- */
.footer {
  position: relative;
  background-color: var(--paper);
  background-image: var(--grain);
  border-top: var(--line-thin);
  padding: 52px 0 36px;
  overflow: hidden;
}
.footer::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: 12px;
  width: 340px;
  height: 340px;
  background: url("../assets/images/logo-ink.webp") center / contain no-repeat; /* sello en tinta sólida */
  pointer-events: none;
}
.footer-grid { position: relative; z-index: 1; mix-blend-mode: multiply; } /* el sello del logo (fondo blanco) se funde con el papel */
@media (max-width: 859px) {
  .footer::after { width: 240px; height: 240px; right: -90px; bottom: 16px; }
}
.blog-strip .btn { justify-self: start; }
.footer-grid { display: grid; gap: 36px; }
.footer-brand { display: grid; justify-items: start; gap: 6px; }
.footer-brand img {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  mix-blend-mode: multiply;
}
.footer-brand .font-display {
  font-family: var(--font-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 1.15rem !important;
}
.footer-brand p { color: var(--ink-2); max-width: 32ch; }
.footer-label {
  font-family: var(--font-label);
  letter-spacing: var(--track-label);
  text-transform: uppercase;
  font-size: 0.875rem;
  color: var(--ink-3);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: var(--line-soft);
  align-self: stretch;
}
.footer a { font-weight: 500; text-decoration: none; }
.footer a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.footer-links-wrap { display: grid; gap: 28px; }
.footer-links { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.footer-links a { min-height: 28px; display: inline-flex; align-items: center; }
.footer-copy { margin-top: 18px; padding-top: 14px; border-top: var(--line-soft); color: var(--ink-3) !important; font-size: 0.9375rem; max-width: none !important; }
.footer-copy a { white-space: nowrap; text-decoration: underline; text-underline-offset: 3px; }

/* ----- Botones flotantes de contacto (.fab) -----
   Marcado (dentro de <!--DOCK-->…<!--/DOCK-->), en todas las páginas:
   <a class="fab fab-call" href="tel:+34623927560" aria-label="Llamar a Academia Ítaca: 623 927 560">
     <span class="fab-ico" aria-hidden="true">SVG teléfono</span><span class="fab-txt">¡Llámanos!</span></a>
   <a class="fab fab-wa" href="https://wa.me/34623927560" target="_blank" rel="noopener noreferrer"
      aria-label="Hablamos por WhatsApp (se abre en otra pestaña)">
     <span class="fab-ico" aria-hidden="true">SVG WhatsApp</span>
     <span class="fab-txt"><span class="fab-long">Hablamos por </span>WhatsApp</span></a>
   Marcado completo con los SVG: NOTAS_DISENO.md.
   WhatsApp abajo a la derecha (verde, texto tinta); llamar abajo a la izquierda (azul, texto blanco). */
.fab {
  position: fixed;
  z-index: 45;
  bottom: calc(14px + env(safe-area-inset-bottom));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 5px 14px 5px 5px;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius-pill);
  box-shadow: 3px 3px 0 var(--ink);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.875rem;
  line-height: 1;
  letter-spacing: 0;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--step) var(--ease), box-shadow var(--step) var(--ease), background-color var(--step) ease, opacity var(--step) ease;
  animation: fab-in 620ms var(--ease) 350ms both;
}
.fab-wa { right: 10px; background: var(--wa); color: var(--wa-ink); }
.fab-call { left: 10px; background: var(--call); color: var(--white); animation-delay: 470ms; }
.fab-wa:hover { background: var(--wa-hover); color: var(--wa-ink); }
.fab-call:hover { background: var(--call-hover); color: var(--white); }
.fab:hover { transform: translate(-1px, -2px); box-shadow: 4px 5px 0 var(--ink); }
.fab:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }

.fab-ico {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
}
.fab-ico svg { width: 16px; height: 16px; display: block; }
.fab-wa .fab-ico svg { fill: currentColor; }
.fab-call .fab-ico svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.fab-long { display: inline; }

/* Con JS (html.fab-gate) los FAB esperan a que los CTA del hero salgan de la vista (html.fabs-on) */
/* «Hablamos por WhatsApp» y «¡Llámanos!» caben enteros desde 370 px; por debajo, «WhatsApp» */
@media (max-width: 369px) { .fab-long { display: none; } }

html.fab-gate .fab {
  animation: none;
  transition: transform 420ms var(--ease), opacity 260ms ease, visibility 0s linear 0s, box-shadow var(--step) var(--ease), background-color var(--step) ease;
}
html.fab-gate:not(.fabs-on) .fab {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(140%);
  transition: transform 300ms var(--ease), opacity 200ms ease, visibility 0s linear 300ms;
}
html.fab-gate.fabs-on .fab-call { transition-delay: 60ms; }

@keyframes fab-in {
  from { opacity: 0; transform: translateY(130%); }
  to { opacity: 1; transform: none; }
}

@media (min-width: 560px) {
  .fab { min-height: 54px; font-size: 1rem; padding: 6px 22px 6px 7px; gap: 10px; }
  .fab-ico { width: 38px; height: 38px; }
  .fab-ico svg { width: 18px; height: 18px; }
  .fab-wa { right: 20px; }
  .fab-call { left: 20px; }
}

/* ----- Cursor fino (solo escritorio, lo activa JS) ----- */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border: 1px solid #fff;
  background: #fff;
  border-radius: 50%;
  mix-blend-mode: difference; /* se invierte: negro sobre blanco, blanco sobre negro */
  z-index: 70;
  pointer-events: none;
  opacity: 0;
  transition: width 0.18s var(--ease), height 0.18s var(--ease), margin 0.18s var(--ease), background-color 0.18s ease;
}
body.has-cursor .cursor { opacity: 1; }
body.has-cursor,
body.has-cursor a,
body.has-cursor button,
body.has-cursor summary { cursor: none; }
.cursor.is-hot {
  width: 34px;
  height: 34px;
  margin: -17px 0 0 -17px;
  background: transparent;
  box-shadow: inset 0 0 0 3px #000, inset 0 0 0 4px #fff;
}

/* ----- Prosa (artículos del blog y páginas largas) ----- */
.prose {
  font-size: 1.0625rem;
  line-height: 1.7;
  max-width: 68ch;
  color: var(--ink);
}
.prose > * + * { margin-top: 0.9em; }
.prose h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 1.4em; }
.prose h3 { font-size: 1.35rem; margin-top: 1.2em; }
.prose a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li + li { margin-top: 0.35em; }
.prose blockquote {
  margin: 0;
  padding: 6px 0 6px 20px;
  border-left: 2px solid var(--ink);
  font-family: var(--font-display);
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1.35;
}
.prose img { border: var(--line-thin); border-radius: var(--radius-sm); }
.prose table { width: 100%; border-collapse: collapse; }
.prose th, .prose td { border: var(--line-thin); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose th { background: var(--paper-2); }

/* ----- Entradas al hacer scroll (JS añade .js-motion) ----- */
html.js-motion .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s var(--ease);
}
html.js-motion .reveal.is-in { opacity: 1; transform: none; }

/* Entrada del hero al cargar */
html.js-motion .hero-copy > * { animation: rise 0.7s var(--ease) both; }
html.js-motion .hero-copy > *:nth-child(2) { animation-delay: 80ms; }
html.js-motion .hero-copy > *:nth-child(3) { animation-delay: 160ms; }
html.js-motion .hero-copy > *:nth-child(4) { animation-delay: 240ms; }
html.js-motion .hero-copy > *:nth-child(5) { animation-delay: 320ms; }
html.js-motion .assistant { animation: rise 0.8s var(--ease) 200ms both; }
html.js-motion .assistant .seal { animation: stamp-in 0.7s var(--ease) 700ms both; }
html.js-motion .assistant-arrow path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 0.8s var(--ease) 1.1s forwards; }
html.js-motion .assistant-arrow path + path { animation-delay: 1.8s; animation-duration: 0.3s; }
html.js-motion .assistant:not(.is-started) .opt-grid .opt { animation: rise 0.5s var(--ease) backwards; }
html.js-motion .assistant:not(.is-started) .opt-grid .opt:nth-child(1) { animation-delay: 0.75s; }
html.js-motion .assistant:not(.is-started) .opt-grid .opt:nth-child(2) { animation-delay: 0.83s; }
html.js-motion .assistant:not(.is-started) .opt-grid .opt:nth-child(3) { animation-delay: 0.91s; }
html.js-motion .assistant:not(.is-started) .opt-grid .opt:nth-child(4) { animation-delay: 0.99s; }
html.js-motion .assistant:not(.is-started) .opt-grid .opt:nth-child(5) { animation-delay: 1.07s; }
html.js-motion .assistant .tape { animation: tape-nudge 0.7s var(--ease) 2s both; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes tape-nudge {
  0%, 100% { transform: none; }
  30% { transform: translateY(-4px) rotate(-2deg); }
  60% { transform: translateY(0) rotate(1deg); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}
@keyframes stamp-in {
  0% { opacity: 0; transform: scale(1.5) rotate(-14deg); }
  60% { opacity: 1; transform: scale(0.96) rotate(2deg); }
  100% { opacity: 1; transform: none; }
}

/* ----- Tablet y escritorio ----- */
@media (min-width: 560px) {
  :root { --gutter: 24px; }
  .madrid-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nav-bar { padding-inline: 24px; }
  .stats-row { padding-inline: 24px; }
  .stats-note { padding-inline: 24px; }
  .file-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .opt-grid:not(.cols-1) { gap: 10px; }
  .assistant { --ap-t: 38px; --ap-x: 30px; --ap-b: 28px; }
  .assistant .seal { width: 136px; top: -70px; right: -14px; }
  .assistant-top { padding-right: 112px; }
  .footer-links-wrap { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 860px) {
  .section { padding: var(--space-3xl) 0; }
  .steps { grid-template-columns: 1fr 72px 1fr 72px 1fr; gap: 0; align-items: stretch; }
  .step-arrow { height: auto; }
  .step-arrow svg { transform: none; }
  .stats-row { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .stat { padding: 8px 24px 10px; border-top: 0; border-left: 1px solid var(--ink-2); }
  .stat:nth-child(odd) { padding-left: 24px; }
  .stat:first-child { border-left: 0; padding-left: 0; }
  .stack-card { grid-template-columns: 120px minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: 32px; }
  .service-logo { width: 120px; height: 120px; }
  .madrid-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .madrid .zone-card { padding: 30px 28px 26px; min-height: 260px; }
  .file-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .blog-strip .container { grid-template-columns: minmax(0, 1fr) auto; gap: 40px; }
  .faq-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 56px; align-items: start; }
  .faq-layout .section-head { position: sticky; top: calc(var(--nav-h) + 32px); }
  .contact-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .qr { display: block; }
  .footer-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: 56px; }
}

@media (min-width: 1080px) {
  :root { --nav-h: 76px; }
  .nav-toggle { display: none; }
  .nav-menu {
    flex-direction: row;
    align-items: center;
    gap: 26px;
    margin-left: auto;
  }
  .nav-menu > a:not(.btn) {
    position: relative;
    font-weight: 500;
    font-size: 0.9875rem;
    padding: 8px 0;
  }
  .nav-menu > a:not(.btn)::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2px;
    height: 1px;
    background: var(--ink);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s var(--ease);
  }
  .nav-menu > a:not(.btn):hover::after,
  .nav-menu > a[aria-current]::after,
  .nav-menu > a.current::after { transform: scaleX(1); }
  .menu-ctas { display: none; }
  .nav-cta { display: inline-flex; }

  .hero { padding: calc(var(--nav-h) + 92px) 0 120px; }
  /* 4 líneas en cualquier portátil; el tamaño también depende de la altura (CTA sobre el pliegue) */
  .hero h1 { font-size: clamp(2.35rem, min(6.2vw, 10.4vh), 4.9rem); letter-spacing: -0.022em; word-spacing: 0.04em; }
  .hero-grid { grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr); gap: 72px; align-items: center; }
  .assistant { --ap-t: 44px; --ap-x: 36px; --ap-b: 32px; }
  .assistant-arrow {
    display: block;
    position: absolute;
    right: calc(100% + 10px);
    top: 46%;
    width: 150px;
    height: 70px;
    overflow: visible;
    color: var(--ink);
    pointer-events: none;
    transition: opacity 0.4s ease;
  }
  .assistant-arrow path { fill: none; stroke: currentColor; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
  .assistant.is-started .assistant-arrow { opacity: 0; }
  .assistant .seal { width: 164px; top: -80px; right: -12px; }
  .assistant-top { padding-right: 120px; }
  .hero .sticker { width: 72px; height: 72px; }
  .hero .sticker-in { font-size: 1.55rem; }
  .hero .sticker.is-word .sticker-in { font-size: 1.05rem; }
  /* El sello negro, enorme, detrás del asistente (en blanco encima) y cortado por la derecha */
  .hero-seal { width: 920px; right: -330px; top: 50%; bottom: auto; transform: translateY(-46%); }
}

/* Portátiles de poca altura (1280×720, 1366×768): el hero se compacta para que los
   CTA queden por encima del pliegue */
@media (min-width: 1080px) and (max-height: 840px) {
  .hero { padding-top: calc(var(--nav-h) + 36px); }
  .hero .kicker { margin-bottom: 16px; }
  .hero .lede { margin-top: 14px; }
  .hero .cta-row { margin-top: 22px; }
  .hero .stamp { width: 138px; height: 138px; padding: 16px; }
}

@media (min-width: 1240px) {
  .assistant .seal { width: 204px; top: -92px; right: -64px; }
}

/* Con margen lateral de sobra, los sellos viven en los márgenes */
@media (min-width: 1320px) {
  .hero { padding-bottom: 96px; }
  .hero .sticker { display: grid; bottom: auto; left: max(6px, calc((100% - var(--container)) / 4 - 36px)); }
  .hero .sticker.s1,
  .hero .sticker.s5,
  .hero .sticker.s8 { left: max(6px, calc((100% - var(--container)) / 4 - 36px)); bottom: auto; }
  .hero .sticker.s1 { top: 19%; }
  .hero .sticker.s6 { top: 37%; }
  .hero .sticker.s5 { top: 55%; }
  .hero .sticker.s8 { top: 73%; }
  .hero .sticker.s2, .hero .sticker.s3, .hero .sticker.s4, .hero .sticker.s7,
  .hero .sticker.s9, .hero .sticker.s10, .hero .sticker.s11, .hero .sticker.s12 { display: none; }
  /* Bajo la columna de texto, dos sellos sueltos en el margen inferior */
  .hero .sticker.s10 { display: grid; top: auto; bottom: 18px; left: calc((100% - var(--container)) / 2 + 300px); }
  .hero .sticker.s7 { display: grid; top: auto; bottom: 30px; left: calc((100% - var(--container)) / 2 + 400px); }
  .sticker-margins .sticker { display: grid; width: 70px; height: 70px; right: auto; top: var(--t); }
  .sticker-margins .sticker.at-l { left: max(6px, calc((100% - var(--container)) / 4 - 35px)); }
  .sticker-margins .sticker.at-r { left: auto; right: max(6px, calc((100% - var(--container)) / 4 - 35px)); }
  .sticker-margins .sticker-in { font-size: 1.5rem; }
  .sticker-margins .sticker.is-word .sticker-in { font-size: 1rem; }
}

@media (max-width: 559px) {
  /* En móvil el sello se vuelve una cinta de una línea bajo los botones */
  .stamp {
    width: auto;
    height: auto;
    margin: 4px 0 0;
    padding: 9px 16px;
    border-radius: var(--radius-pill);
    box-shadow: inset 0 0 0 3px var(--paper), inset 0 0 0 4px var(--ink);
    letter-spacing: 0.08em;
    transform: rotate(-1.5deg);
  }
  .stamp br { display: none; }
}

@media (max-width: 859px) {
  .hero { padding-bottom: 112px; }
  .hero .sticker { width: 54px; height: 54px; }
  .hero .sticker-in { font-size: 1.1rem; }
  .hero .sticker.is-word .sticker-in { font-size: 0.8rem; }
}

@media (max-width: 380px) {
  .brand { gap: 8px; font-size: 0.875rem; letter-spacing: 0.14em; }
  .brand img { width: 40px; height: 40px; }
}

/* ----- Quieto: ?static y reduced motion (capturas y accesibilidad) ----- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .marquee-track,
  .seal-spin { animation: none !important; }
  .rotator { display: none; }
  .rotator-line { display: inline; white-space: normal; }
  .rotator-fallback { display: inline; }
  .sticker { transform: rotate(var(--rot, 0deg)) !important; }
  .confetti { display: none; }
}

html.is-static .marquee-track,
html.is-static .sticker-in,
html.is-static .btn.is-bounce,
html.is-static .rotator-word,
html.is-static .faq-item[open] .faq-answer,
html.is-static .nav,
html.is-static .seal-spin,
html.is-static .fab,
html.is-static .reveal {
  animation: none !important;
  transition: none !important;
  opacity: 1 !important;
}
html.is-static .reveal,
html.is-static .seal-spin { transform: none !important; }
html.is-static .rotator { display: none; }
html.is-static .rotator-fallback { display: inline; }
html.is-static .cursor { display: none !important; }
html.is-static .sticker { transform: rotate(var(--rot, 0deg)); }
html.is-static .stack-slot { min-height: 0 !important; }
html.is-static .stack-card { position: relative !important; top: auto !important; }
html.is-static .faq-layout .section-head { position: static !important; }
html.is-static .confetti { display: none; }
html.is-static { scroll-behavior: auto; }

@media print {
  .fab, .nav-toggle, .sticker-stage, .hero-seal, .marquee, .cursor { display: none !important; }
  .nav { position: static; }
  body { padding-bottom: 0 !important; background: var(--white); }
  .band-ink, .stats { background: var(--white); color: var(--ink); }
}

/* Sellos laterales de toda la web: initSideSeals (js/itaca.js) los reparte por los márgenes
   de cualquier página en escritorio ancho; cada uno toma el fondo de la banda que tiene debajo. */
.side-seals { position: absolute; left: 0; top: 0; width: 100%; height: 0; z-index: 4; pointer-events: none; overflow-x: clip; overflow-y: visible; }
.side-seals .sticker-stage { position: absolute; inset: auto; width: 130px; height: 260px; overflow: visible; }
.side-seals .sticker { width: 64px; height: 64px; left: 33px; top: 98px; }
.side-seals .sticker-in { background: var(--seal-bg, var(--paper)); box-shadow: inset 0 0 0 3px var(--seal-bg, var(--paper)), inset 0 0 0 4px var(--seal-ink, var(--ink)); border-color: var(--seal-ink, var(--ink)); color: var(--seal-ink, var(--ink)); font-size: 1.4rem; }
.side-seals .sticker.is-word .sticker-in { font-size: 0.9rem; }
@media print { .side-seals { display: none !important; } }

/* Contacto rápido (portada, justo bajo las cifras): continúa la banda negra de .stats */
#contacto-rapido { padding-top: 8px; }

/* Pie con tres columnas (Universidades, Zonas, Asignaturas): deja sitio al sello de la derecha */
@media (min-width: 1080px) {
  .footer-grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 2fr); }
  .footer-links-wrap { grid-template-columns: repeat(3, minmax(0, 1fr)); padding-right: max(0px, calc(240px - (100vw - var(--container)) / 2)); }
}

/* Alternancia blanco / negro entre secciones (portada: hero, cómo funciona, [cifras+contacto],
   voces, [servicios], zonas, [universidades], material, [blog], dudas, [contacto]).
   .tone-night invierte las variables de color: los componentes pensados para fondo blanco
   se pintan solos en negro. Las páginas interiores usan el mismo juego en enlaces cruzados
   (negro) y en el CTA final (que pasa a blanco), para no dejar dos bandas negras seguidas. */
.tone-night,
.cross-links-section,
.final-cta-section {
  --paper: #0E0E0E;
  --white: #0E0E0E;
  --paper-2: #1C1C1C;
  --ink: #FFFFFF;
  --ink-2: #D2D2D2;
  --ink-3: #A8A8A8;
  --line-c: #3A3A3A;
  --line: 1.5px solid #FFFFFF;
  --line-thin: 1px solid #FFFFFF;
  --line-soft: 1px solid #3A3A3A;
  --shadow-sm: 2px 2px 0 #FFFFFF;
  --shadow: 3px 3px 0 #FFFFFF;
  --shadow-lg: 4px 4px 0 #FFFFFF;
}
.tone-night { background: var(--paper); color: var(--ink); }
.tone-night .service-logo { filter: invert(1); mix-blend-mode: normal; }
/* El CTA final invertido queda blanco: su texto secundario necesita gris oscuro, no claro */
.final-cta-section { --line-c: #5A5A5A; border-top: 1px solid #0E0E0E; }

/* ----- Móvil: portada más corta ----- */
@media (max-width: 559px) {
  /* Material: 4 tarjetas y el resto tras «Ver todo» (lo activa JS; sin JS se ven todas) */
  .file-grid.is-collapsed > .file-card:nth-child(n+5) { display: none; }
  .file-card { min-height: 0; padding: 16px 18px 14px; }
  .file-more { margin-top: 14px; width: 100%; justify-content: center; }
}
@media (min-width: 560px) { .file-more { display: none !important; } }
@media (max-width: 719px) {
  /* Zonas: lista compacta (una fila por zona); el detalle está en la página de cada zona */
  .madrid .zone-card { padding: 14px 64px 14px 18px; gap: 2px; }
  .madrid .zone-card > p:not(.zone-kicker),
  .madrid .zone-card .go { display: none; }
  .madrid .zone-card .zone-kicker { font-size: 0.75rem; padding-right: 0; }
  .madrid .zone-card h3 { font-size: 1.25rem; padding-right: 0; }
  .madrid .zone-card::before { content: "→"; top: 50%; right: 16px; width: 34px; height: 34px; margin-top: -17px; font-family: var(--font-body); font-size: 1rem; }
}

/* Testimonios: carrusel deslizable en móvil, columnas tipo mosaico en pantallas anchas */
@media (max-width: 719px) {
  .quote-row {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: var(--gutter, 16px);
    margin-inline: calc(var(--gutter, 16px) * -1);
    padding: 2px var(--gutter, 16px) 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }
  .quote-row::-webkit-scrollbar { display: none; }
  .quote-row > .t-card { flex: 0 0 84%; scroll-snap-align: start; padding: 20px; }
  .quote-row .t-card .quote { font-size: 1.15rem; }
  .pullquote { padding: 28px 0 26px; }
  .pullquote::before { font-size: 3.6rem; top: 2px; right: 4px; }
}
@media (min-width: 720px) {
  .quote-row { display: block; columns: 2; column-gap: 16px; }
  .quote-row > .t-card { break-inside: avoid; margin-bottom: 16px; }
}
@media (min-width: 1100px) {
  .quote-row { columns: 3; }
}

/* Móvil y tableta (sin QR): logo en blanco de cada vía arriba a la derecha de su tarjeta (Miguel, 28/11/2026).
   Máscara SVG en data: (la CSP permite img-src data:), así no hace falta tocar el marcado de las 49 páginas. */
@media (max-width: 859px) {
  .contact-card { padding-right: 76px; }
  .contact-card::after {
    content: "";
    position: absolute;
    top: 22px;
    right: 22px;
    width: 40px;
    height: 40px;
    background: var(--white);
    -webkit-mask: var(--contact-ico) center / contain no-repeat;
    mask: var(--contact-ico) center / contain no-repeat;
    pointer-events: none;
  }
  .contact-wa { --contact-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M17.47 14.38c-.3-.15-1.76-.87-2.03-.97-.27-.1-.47-.15-.67.15-.2.3-.77.97-.94 1.16-.17.2-.35.22-.64.08-.3-.15-1.26-.46-2.39-1.48-.88-.79-1.48-1.76-1.65-2.06-.17-.3-.02-.46.13-.61.13-.13.3-.35.45-.52.15-.17.2-.3.3-.5.1-.2.05-.37-.03-.52-.07-.15-.67-1.61-.92-2.2-.24-.58-.49-.5-.67-.51h-.57c-.2 0-.52.07-.79.37-.27.3-1.04 1.02-1.04 2.48s1.07 2.88 1.21 3.07c.15.2 2.1 3.2 5.08 4.49.71.31 1.26.49 1.7.63.71.22 1.36.19 1.87.12.57-.09 1.76-.72 2-1.41.25-.7.25-1.29.18-1.41-.08-.13-.27-.2-.57-.35m-5.42 7.4h-.01a9.87 9.87 0 0 1-5.03-1.38l-.36-.21-3.74.98 1-3.65-.24-.37a9.86 9.86 0 0 1-1.51-5.26c0-5.45 4.44-9.88 9.89-9.88 2.64 0 5.12 1.03 6.99 2.9a9.83 9.83 0 0 1 2.89 6.99c0 5.45-4.44 9.88-9.89 9.88m8.41-18.3A11.82 11.82 0 0 0 12.05 0C5.5 0 .16 5.34.16 11.89c0 2.1.55 4.14 1.59 5.95L.06 24l6.3-1.65a11.88 11.88 0 0 0 5.68 1.45h.01c6.55 0 11.89-5.34 11.89-11.89a11.82 11.82 0 0 0-3.48-8.41z'/%3E%3C/svg%3E"); }
  .contact-phone { --contact-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72c.13.96.36 1.9.7 2.81a2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45c.91.34 1.85.57 2.81.7A2 2 0 0 1 22 16.92z'/%3E%3C/svg%3E"); }
  .contact-form { --contact-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' x='5' y='3.5' width='14' height='18' rx='2'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M9 3.5V2.5h6v1M8.5 9.5l1.5 1.5 2.5-2.5M14.5 10h2M8.5 15.5l1.5 1.5 2.5-2.5M14.5 16h2'/%3E%3C/svg%3E"); }
  .contact-mail { --contact-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' x='2.5' y='5' width='19' height='14' rx='2'/%3E%3Cpath fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M3 6.5l9 6.5 9-6.5'/%3E%3C/svg%3E"); }
}

/* Pasos en móvil: flecha a pincel hacia abajo, del mismo trazo que la del hero de escritorio (Miguel, 28/11/2026) */
.step-arrow .arrow-h { display: none; }
.step-arrow .arrow-v { width: 34px; height: 72px; transform: none; }
.step-arrow .arrow-v path { stroke-width: 5.5; }
@media (max-width: 859px) {
  .step-arrow { height: auto; margin: -6px 0; }
}
@media (min-width: 860px) {
  .step-arrow .arrow-v { display: none; }
  .step-arrow .arrow-h { display: block; }
}

/* Móvil: menos aire entre la cabecera y el hero (Miguel, 28/11/2026: «sobra espacio») */
@media (max-width: 859px) {
  .hero { padding-top: calc(var(--nav-h) + 16px); }
}
