/* =========================================================================
   PHASE Institute — Sitio web institucional
   Pro Healthy Aging & Science Experts · "Every phase matters"
   Layout: editorial, columna central de 1120px, secciones con atmósferas
   "nebulosa" (lavanda + azul + rosa) alternadas con blancos limpios.
   ========================================================================= */

/* ---------- Fuentes (self-hosted: sin rastreo de terceros, CSP estricta) ---------- */
@font-face { font-family: "Italiana"; src: url("../fonts/italiana.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-600.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("../fonts/montserrat-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Tokens de marca (Manual PHASE 2026) ---------- */
:root {
  color-scheme: light;
  /* Color */
  --purple: #61366E;          /* Purple Science · principal (Pantone 7665 C) */
  --purple-deep: #4A2556;     /* principal al 120% para fondos profundos */
  --purple-90: #714A7D;
  --purple-60: #A086A8;
  --blue: #5887DA;            /* nebulosa azul ciencia */
  --blue-deep: #4A6CCB;
  --lavender: #A7A4DF;        /* nebulosa lavanda */
  --mauve: #D8BDDC;           /* nebulosa malva */
  --rose: #F0D9EA;            /* nebulosa rosa neblina */
  --mist: #C8D6EB;            /* nebulosa azul niebla */
  --white: #FFFFFF;
  --ink: #3E3446;             /* texto: gris con sesgo morado */
  --ink-soft: #5C5363;            /* ajustado para contraste AA */
  --ink-deep: #2E1638;            /* texto sobre nebulosa lavanda/azul (AA) */
  --paper: #FBFAFD;
  --line: #E7E2EE;
  --wa: #1FAF5A;              /* WhatsApp */
  --danger: #B3261E;
  --ok: #2E7D5B;

  /* Gradientes nebulosa */
  --neb-soft: linear-gradient(120deg, var(--rose) 0%, #EEE6F6 35%, var(--mist) 70%, var(--lavender) 100%);
  --neb-vivid: linear-gradient(115deg, #B49BDB 0%, var(--lavender) 22%, #C3A6DA 45%, #8B8FDB 70%, var(--blue) 100%);
  --neb-text: linear-gradient(100deg, var(--purple) 0%, #7E58A0 55%, #6B58B0 100%);  /* extremo oscurecido: contraste ≥ 4,5:1 */

  /* Tipografía */
  --f-display: "Italiana", "Cormorant Garamond", "Didot", "Bodoni 72", Georgia, serif;
  --f-body: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --f-brand: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  --fs-hero: clamp(3.4rem, 8.2vw, 7.4rem);
  --fs-h2: clamp(2.6rem, 5.2vw, 4.6rem);
  --fs-h3: clamp(1.9rem, 3.2vw, 2.8rem);
  --fs-lead: clamp(1.05rem, 1.25vw, 1.2rem);
  --fs-body: 1rem;
  --fs-small: .875rem;

  /* Espaciado / forma */
  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --sec-y: clamp(40px, 5.2vw, 68px);
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;
  --shadow-1: 0 1px 2px rgba(74, 37, 86, .06), 0 8px 24px rgba(74, 37, 86, .08);
  --shadow-2: 0 2px 6px rgba(74, 37, 86, .08), 0 22px 48px rgba(74, 37, 86, .16);

  /* Movimiento */
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --t-fast: 220ms;
  --t-med: 520ms;
  --t-slow: 900ms;

  --header-h: 84px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 8px); }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; font-weight: 400; text-wrap: balance; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--mauve); color: var(--purple-deep); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link {
  position: fixed; left: 16px; top: -60px; z-index: 200;
  background: var(--purple); color: var(--white); padding: 10px 18px; border-radius: var(--r-pill);
  font-family: var(--f-brand); font-weight: 600; font-size: .85rem; transition: top var(--t-fast) var(--ease-out);
}
.skip-link:focus-visible { top: 16px; }

/* ---------- Tipografía utilitaria ---------- */
.eyebrow {
  font-family: var(--f-body); font-weight: 500; font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  color: var(--purple); letter-spacing: -.005em;
}
.display {
  font-family: var(--f-display); font-weight: 400; line-height: .98; letter-spacing: -.01em;
  color: var(--purple);
}
.display--grad {
  background: var(--neb-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lead { font-size: var(--fs-lead); line-height: 1.55; }
.muted { color: var(--ink-soft); }

/* ---------- Botones ---------- */
.btn {
  --btn-bg: var(--purple); --btn-fg: var(--white);
  position: relative; display: inline-flex; align-items: center; gap: 14px;
  padding: 12px 22px 12px 24px; border-radius: var(--r-pill);
  background: var(--btn-bg); color: var(--btn-fg);
  font-family: var(--f-body); font-weight: 500; font-size: .9rem; letter-spacing: .04em; text-transform: uppercase;
  overflow: hidden; isolation: isolate; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med) var(--ease-out), background-color var(--t-med) var(--ease-out);
  box-shadow: 0 6px 18px rgba(97, 54, 110, .28);
}
.btn::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(100deg, var(--purple) 0%, #7B4A8F 50%, var(--blue) 100%);
  opacity: 0; transition: opacity var(--t-med) var(--ease-out);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(97, 54, 110, .36); }
.btn:hover::before { opacity: 1; }
.btn:active { transform: translateY(0); }
.btn .arrow { width: 30px; height: 10px; flex: none; transition: transform var(--t-med) var(--ease-out); }
.btn:hover .arrow { transform: translateX(6px); }
.btn--ghost { --btn-bg: transparent; --btn-fg: var(--purple); box-shadow: inset 0 0 0 1.5px var(--purple); }
.btn--ghost::before { background: var(--purple); }
.btn--ghost:hover { color: var(--white); }
.btn--light { --btn-bg: var(--white); --btn-fg: var(--purple); }
.btn--light::before { background: var(--rose); }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Barra de progreso de lectura ---------- */
.progress {
  position: fixed; inset: 0 0 auto 0; height: 3px; z-index: 120; pointer-events: none;
  background: linear-gradient(90deg, var(--purple), var(--lavender), var(--blue));
  transform-origin: 0 50%; transform: scaleX(var(--p, 0));
}

/* ---------- Header ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 100;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), backdrop-filter var(--t-med);
}
.header::before { /* velo superior sutil sobre el hero, como en el diseño */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(46, 26, 72, .62) 0%, rgba(46, 26, 72, .5) 70%, rgba(46, 26, 72, 0) 100%);
  transition: opacity var(--t-med);
}
.header__in { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: var(--header-h); }
.header.is-scrolled { background: rgba(255, 255, 255, .82); backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px); box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(74, 37, 86, .06); }
.header.is-scrolled::before { opacity: 0; }
.header.is-hidden { transform: translateY(-100%); }

.brand { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1; color: var(--white); transition: color var(--t-med) var(--ease-out); }
.brand__word { position: relative; font-family: var(--f-brand); font-weight: 700; font-size: 2.05rem; letter-spacing: .01em; }
.brand__word .e { opacity: .72; }
.brand__word sup { position: absolute; top: .1em; right: -.62em; font-size: .3em; font-weight: 600; }
.brand__sub { font-family: var(--f-brand); font-weight: 500; font-size: .74rem; letter-spacing: .14em; margin-top: 3px; }
.header.is-scrolled .brand, .brand--ink { color: var(--purple); }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.6vw, 40px); }
.nav__list { display: flex; gap: clamp(18px, 2.8vw, 46px); }
.nav__link {
  position: relative; color: var(--white); font-size: .95rem; font-weight: 400; padding: 6px 0;
  transition: color var(--t-med) var(--ease-out);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform var(--t-med) var(--ease-out);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); transform-origin: left; }
.header.is-scrolled .nav__link { color: var(--ink); }
.header.is-scrolled .nav__link:hover, .header.is-scrolled .nav__link.is-active { color: var(--purple); }
.nav__cta { display: none; }
.header.is-scrolled .nav__cta { display: inline-flex; }

.burger { width: 44px; height: 44px; display: grid; place-content: center; gap: 5px; border-radius: 12px; color: var(--white); transition: color var(--t-med), background-color var(--t-fast); }
.burger span { display: block; width: 26px; height: 2.5px; background: currentColor; border-radius: 2px; transition: transform var(--t-med) var(--ease-out), opacity var(--t-fast); }
.burger:hover { background: rgba(255, 255, 255, .14); }
.header.is-scrolled .burger { color: var(--purple); }
.header.is-scrolled .burger:hover { background: var(--rose); }
body.menu-open .burger span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ---------- Menú lateral ---------- */
.drawer { position: fixed; inset: 0; z-index: 90; visibility: hidden; pointer-events: none; }
.drawer__scrim { position: absolute; inset: 0; background: rgba(46, 22, 54, .38); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); opacity: 0; transition: opacity var(--t-med) var(--ease-out); }
.drawer__panel {
  position: absolute; top: 0; right: 0; bottom: 0; width: min(440px, 100%);
  background: var(--neb-soft); background-color: var(--paper);
  padding: calc(var(--header-h) + 24px + env(safe-area-inset-top, 0px)) 36px calc(32px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; gap: 28px; overflow-y: auto;
  transform: translateX(100%); transition: transform var(--t-slow) var(--ease-out);
  box-shadow: -30px 0 60px rgba(74, 37, 86, .18);
}
body.menu-open .drawer { visibility: visible; pointer-events: auto; }
body.menu-open .drawer__scrim { opacity: 1; }
body.menu-open .drawer__panel { transform: none; }
body.menu-open .header { background: transparent; box-shadow: none; backdrop-filter: none; }
body.menu-open .header .brand, body.menu-open .header .burger { color: var(--purple); }
body.menu-open .header .nav__list, body.menu-open .header .nav__cta { opacity: 0; pointer-events: none; }
body.menu-open .header::before { opacity: 0; }
body.menu-open .drawer__list a { opacity: 1; transform: none; }
body.menu-open .drawer__list li:nth-child(1) a { transition-delay: 120ms, 120ms, 0s, 0s; }
body.menu-open .drawer__list li:nth-child(2) a { transition-delay: 160ms, 160ms, 0s, 0s; }
body.menu-open .drawer__list li:nth-child(3) a { transition-delay: 200ms, 200ms, 0s, 0s; }
body.menu-open .drawer__list li:nth-child(4) a { transition-delay: 240ms, 240ms, 0s, 0s; }
body.menu-open .drawer__list li:nth-child(5) a { transition-delay: 280ms, 280ms, 0s, 0s; }
body.menu-open .drawer__list li:nth-child(6) a { transition-delay: 320ms, 320ms, 0s, 0s; }
body.menu-open .drawer__list li:nth-child(7) a { transition-delay: 360ms, 360ms, 0s, 0s; }
body.menu-open { overflow: hidden; }

/* ---------- HERO ---------- */
.hero { position: relative; min-height: clamp(620px, 92vh, 900px); display: flex; align-items: center; overflow: hidden; color: var(--ink); background: #CBD3E4; }
.hero__media { position: absolute; inset: -6% 0 0 0; z-index: 0; will-change: transform; }
.hero__media img {
  width: 100%; height: 100%; object-fit: cover; object-position: 68% 40%;
  animation: kenburns 22s var(--ease-io) infinite alternate;
  transform-origin: 70% 40%;
}
.hero__veil { /* lavado luminoso hacia el lado del texto, como en el arte */
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 246, 250, .86) 0%, rgba(255, 246, 250, .72) 34%, rgba(255, 246, 250, .3) 50%, rgba(255, 246, 250, 0) 60%),
    linear-gradient(0deg, rgba(255, 255, 255, .28) 0%, rgba(255, 255, 255, 0) 30%);
}
.hero__glow { position: absolute; z-index: 1; width: 52vw; height: 52vw; left: -14vw; top: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgba(240, 217, 234, .55), rgba(240, 217, 234, 0)); filter: blur(10px); animation: drift 16s var(--ease-io) infinite alternate; pointer-events: none; }
.hero__in { position: relative; z-index: 2; width: 100%; padding-block: calc(var(--header-h) + 40px) 72px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px; }
.hero__copy { max-width: 560px; }
.hero__title { font-size: var(--fs-hero); line-height: .9; }
.hero__title .line { display: block; overflow: hidden; padding-bottom: .08em; }
.hero__title .line > span { display: inline-block; }
.hero__tag { margin-top: 18px; font-family: var(--f-body); font-weight: 500; font-size: clamp(1.25rem, 1.9vw, 1.6rem); color: var(--purple); letter-spacing: -.01em; }
.hero__text { margin-top: 6px; max-width: 460px; font-size: var(--fs-lead); color: #4A3A55; line-height: 1.45; }
.hero__actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__words { align-self: center; display: grid; gap: 6px; padding: 14px 18px 14px 26px; border-radius: 14px; background: rgba(40, 24, 60, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); color: var(--white); font-size: .82rem; letter-spacing: .12em; text-transform: uppercase; text-shadow: 0 1px 12px rgba(40, 30, 60, .35); }
.hero__words li { position: relative; padding-left: 0; transition: transform var(--t-med) var(--ease-out), opacity var(--t-med); opacity: .78; }
.hero__words li.is-on { opacity: 1; transform: translateX(-8px); }
.hero__words li::before { content: ""; position: absolute; left: -16px; top: 50%; width: 8px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform var(--t-med) var(--ease-out); }
.hero__words li.is-on::before { transform: scaleX(1); }
.hero__scroll { display: none; position: absolute; z-index: 2; left: 50%; bottom: 22px; translate: -50% 0; display: grid; justify-items: center; gap: 8px; color: var(--white); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; opacity: .9; }
.hero__scroll i { display: block; width: 1px; height: 38px; background: linear-gradient(var(--white), rgba(255, 255, 255, 0)); animation: scrollcue 2.2s var(--ease-io) infinite; transform-origin: top; }

/* Secuencia de entrada del hero */
.js .hero [data-in] { opacity: 0; transform: translateY(24px); }
.js .hero .hero__title .line > span { transform: translateY(105%); opacity: 1; }
.hero.is-in [data-in] { opacity: 1; transform: none; transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); transition-delay: var(--d, 0ms); }
.hero.is-in .hero__title .line > span { transform: none; transition: transform 1.2s var(--ease-out); transition-delay: var(--d, 0ms); }

/* ---------- Cifras de confianza ---------- */
.stats { position: relative; z-index: 3; margin-top: -54px; }
.stats__card {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-radius: var(--r-lg); box-shadow: var(--shadow-2); overflow: hidden;
}
.stat { padding: 26px 24px; display: grid; gap: 2px; text-align: center; position: relative; }
.stat + .stat::before { content: ""; position: absolute; left: 0; top: 24%; bottom: 24%; width: 1px; background: var(--line); }
.stat__n { font-family: var(--f-display); font-size: clamp(2.6rem, 4vw, 3.4rem); line-height: 1; color: var(--purple); font-variant-numeric: tabular-nums; }
.stat__l { font-size: .85rem; color: var(--ink-soft); }

/* ---------- Secciones ---------- */
.section { position: relative; padding-block: var(--sec-y); }
.section__head { display: grid; gap: 14px; margin-bottom: clamp(22px, 2.6vw, 34px); }

/* ---------- Conócenos ---------- */
.about { padding-block: clamp(28px, 3.5vw, 44px) 0; }
.about__grid { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); min-height: 420px; border-radius: 0; }
.about__media { position: relative; overflow: hidden; background: #ECECEE; }
.about__media img { width: 100%; height: 100%; object-fit: cover; object-position: 70% 30%; transform: scale(1.08); transition: transform 1.6s var(--ease-out); }
.about__media.is-visible img { transform: scale(1); }
.about__body { position: relative; overflow: hidden; background: var(--neb-soft); background-size: 200% 200%; animation: nebula 18s var(--ease-io) infinite alternate; padding: clamp(36px, 5vw, 64px) clamp(24px, 5vw, 72px); display: grid; align-content: center; gap: 22px; }
.about__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 40px); align-items: start; }
.about__title { font-size: clamp(2.8rem, 4.8vw, 4.2rem); line-height: 1.04; }
.about__text p + p { margin-top: 12px; }
.about__text strong { display: block; color: var(--purple); font-weight: 600; line-height: 1.4; margin-bottom: 8px; }
.about__text { font-size: .98rem; color: var(--ink-soft); line-height: 1.5; }
.pillars { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: var(--r-pill); background: rgba(255, 255, 255, .62); color: var(--purple); font-size: .8rem; font-weight: 500; box-shadow: inset 0 0 0 1px rgba(97, 54, 110, .14); transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.pill:hover { background: var(--white); transform: translateY(-1px); }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }

/* ---------- Unidades médicas ---------- */
.units { color: var(--ink-deep); background: var(--neb-vivid); background-size: 180% 180%; animation: nebula 20s var(--ease-io) infinite alternate; overflow: hidden; }
.units::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 80% at 10% 100%, rgba(200, 214, 235, .55), transparent 60%), radial-gradient(50% 60% at 95% 0%, rgba(74, 108, 203, .45), transparent 70%); pointer-events: none; }
.units .eyebrow { color: var(--ink-deep); }
.units__feature { position: relative; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(22px, 4vw, 56px); align-items: center; }
.units__img { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 1.7; box-shadow: 0 30px 60px rgba(46, 30, 100, .25); background: var(--lavender); }
.units__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity var(--t-slow) var(--ease-out), transform 1.4s var(--ease-out); }
.units__img img.is-leaving { opacity: 0; transform: scale(1.06); }
.units__img img.is-entering { opacity: 0; transform: scale(1.1); }
.units__copy { min-width: 0; }
.units__title { font-size: clamp(3rem, 6vw, 5rem); color: var(--purple-deep); line-height: 1; }
.units__copy p { margin-top: 18px; font-size: .98rem; line-height: 1.6; max-width: 600px; color: var(--ink-deep); }
.units__copy p strong { font-weight: 600; }
.swap { transition: opacity 420ms var(--ease-out), transform 520ms var(--ease-out), filter 420ms; }
.swap.is-out { opacity: 0; transform: translateY(10px); filter: blur(4px); }
.units__tabs { position: relative; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px clamp(14px, 3vw, 44px); }
.unit-tab { display: grid; gap: 14px; justify-items: center; text-align: center; color: var(--ink-deep); }
.unit-tab__tile { position: relative; width: 100%; aspect-ratio: 664 / 776; border-radius: 18px; overflow: hidden; box-shadow: 0 14px 30px rgba(46, 30, 100, .22); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); background: var(--white); }
.unit-tab__tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out), opacity var(--t-med) var(--ease-out); }
.unit-tab__tile img.unit-tab__icon { object-fit: cover; object-position: center; opacity: 0; transform: scale(1.08); filter: blur(3px); transition: opacity .6s var(--ease-out), transform .8s var(--ease-out), filter .6s var(--ease-out); }
.unit-tab:hover .unit-tab__tile img:not(.unit-tab__icon), .unit-tab:focus-visible .unit-tab__tile img:not(.unit-tab__icon) { transform: scale(1.06); }
.unit-tab:hover .unit-tab__icon, .unit-tab:focus-visible .unit-tab__icon, .unit-tab[aria-expanded="true"] .unit-tab__icon { opacity: 1 !important; transform: none !important; filter: none !important; }
.unit-tab:hover .unit-tab__tile, .unit-tab:focus-visible .unit-tab__tile { transform: translateY(-6px); box-shadow: 0 24px 40px rgba(46, 30, 100, .3); }
.unit-tab.is-active .unit-tab__tile { box-shadow: 0 0 0 3px var(--white), 0 24px 40px rgba(46, 30, 100, .3); }
.unit-tab__name { font-family: var(--f-body); font-weight: 600; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; line-height: 1.2; }
.unit-tab__sub { display: block; margin-top: 2px; font-weight: 400; font-size: .82rem; letter-spacing: 0; text-transform: none; }
.units__note { position: relative; margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; }
.units__note p { font-size: .9rem; max-width: 560px; color: var(--ink-deep); }

/* ---------- Tecnología ---------- */
.tech { background: var(--white); overflow: hidden; }
.tech::before { content: ""; position: absolute; width: 640px; height: 640px; left: -220px; top: -120px; border-radius: 50%; background: radial-gradient(closest-side, rgba(167, 164, 223, .22), rgba(167, 164, 223, 0)); pointer-events: none; }
.tech__feature { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 3.4vw, 48px); align-items: center; }
.tech__intro { display: grid; gap: 20px; align-content: start; }
.tech__head { position: relative; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; }
.tech__h { font-size: var(--fs-h2); line-height: .95; }
.tech__name { font-size: var(--fs-h3); line-height: 1.05; margin-top: 10px; }
.tech__desc { display: grid; gap: 14px; font-size: .97rem; color: var(--ink-soft); line-height: 1.55; max-width: 470px; }
.tech__desc strong { color: var(--ink); font-weight: 600; }
.tech__stage { position: relative; aspect-ratio: 1.3; border-radius: var(--r-lg); overflow: hidden; background: radial-gradient(70% 70% at 30% 70%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%), linear-gradient(135deg, #F7F1FA 0%, var(--rose) 30%, var(--mist) 65%, var(--lavender) 100%); }
.tech__stage::after { content: ""; position: absolute; inset: auto 12% 8% 12%; height: 10%; border-radius: 50%; background: radial-gradient(closest-side, rgba(74, 37, 86, .2), transparent); filter: blur(6px); }
.tech__stage img { position: absolute; z-index: 1; left: 50%; top: 50%; width: 82%; height: 84%; object-fit: contain; translate: -50% -50%; transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); filter: drop-shadow(0 26px 30px rgba(74, 37, 86, .18)); }
.tech__stage img.is-leaving { opacity: 0; transform: translateX(-40px) scale(.96); }
.tech__stage img.is-entering { opacity: 0; transform: translateX(40px) scale(.96); }
.tech__counter { position: absolute; z-index: 2; right: 20px; top: 18px; font-family: var(--f-brand); font-weight: 600; font-size: .78rem; letter-spacing: .12em; color: var(--purple); font-variant-numeric: tabular-nums; background: rgba(255, 255, 255, .7); padding: 6px 12px; border-radius: var(--r-pill); }
.tech__grid { position: relative; margin-top: clamp(26px, 3vw, 38px); display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 18px; }
.tcard {
  position: relative; display: block; width: 100%; text-align: left; min-height: 96px; padding: 16px 44% 16px 18px; border-radius: 18px;
  background: linear-gradient(100deg, #F8F2FA 0%, var(--rose) 40%, #D3D5F0 75%, #B8B2E6 100%);
  overflow: visible; isolation: isolate;
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out);
}
.tcard::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; background: linear-gradient(100deg, #EFE3F4 0%, #E0C9E6 40%, #B7BCEB 75%, #8F95DE 100%); opacity: 0; transition: opacity var(--t-med) var(--ease-out); }
.tcard:hover { transform: translateY(-4px); box-shadow: 0 18px 34px rgba(74, 37, 86, .14); }
.tcard:hover::before, .tcard.is-active::before { opacity: 1; }
.tcard.is-active { box-shadow: 0 0 0 2px var(--purple), 0 18px 34px rgba(74, 37, 86, .14); }
.tcard__t { display: block; font-family: var(--f-body); font-weight: 600; font-size: clamp(1.15rem, 1.7vw, 1.45rem); line-height: 1.02; letter-spacing: -.02em; color: var(--purple); }
.tcard__s { display: block; margin-top: 4px; font-size: .8rem; line-height: 1.25; color: var(--ink-soft); }
.tcard img { position: absolute; z-index: 1; right: 4px; bottom: 4px; width: 46%; height: 128%; object-fit: contain; object-position: right bottom; transition: transform var(--t-med) var(--ease-out); pointer-events: none; }
.tcard:hover img { transform: translateY(-4px) scale(1.04); }
.tcard img.tcard__img--tall { width: 34%; height: 112%; right: 10px; }

/* ---------- Programas ---------- */
.programs { background: var(--white); overflow: hidden; }
.programs::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 70% at 0% 50%, rgba(167, 164, 223, .75), transparent 70%), radial-gradient(40% 60% at 100% 80%, rgba(139, 143, 219, .6), transparent 70%), radial-gradient(40% 60% at 92% 10%, rgba(200, 214, 235, .9), transparent 70%), radial-gradient(50% 50% at 50% 100%, rgba(240, 217, 234, .9), transparent 70%); pointer-events: none; }
.programs__layout { position: relative; display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.1fr) minmax(0, .82fr); gap: clamp(18px, 2.4vw, 28px); align-items: stretch; }
.programs__img { position: relative; border-radius: 18px; overflow: hidden; min-height: 420px; background: var(--lavender); box-shadow: var(--shadow-2); }
.programs__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity var(--t-slow) var(--ease-out), transform 1.4s var(--ease-out); }
.programs__img img.is-leaving { opacity: 0; transform: scale(1.05); }
.programs__img img.is-entering { opacity: 0; transform: scale(1.12); }
.programs__img .prog-pic { opacity: 0; transform: scale(1.06); }
.programs__img .prog-pic.is-active { opacity: 1; transform: none; }
.programs__copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.programs__name { font-size: clamp(2.6rem, 4.4vw, 3.9rem); line-height: .98; }
.programs__claim { font-family: var(--f-body); font-weight: 500; color: var(--purple); font-size: 1.05rem; }
.programs__desc { font-size: .96rem; color: var(--ink); line-height: 1.55; text-align: justify; hyphens: auto; }
.checks { display: grid; gap: 8px; font-size: .92rem; }
.checks li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; align-items: start; }
.checks svg { width: 20px; height: 20px; margin-top: 2px; stroke: var(--purple); fill: none; stroke-width: 2; }
.programs__copy .btn { align-self: flex-end; margin-top: auto; }
.programs__tabs { display: grid; gap: 12px; align-content: stretch; }
.ptab { position: relative; display: flex; flex-direction: column; justify-content: space-between; min-height: 116px; padding: 16px 18px; border-radius: 14px; overflow: hidden; color: var(--white); text-align: left; isolation: isolate; box-shadow: 0 10px 24px rgba(74, 37, 86, .14); transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med) var(--ease-out); }
.ptab img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; transition: transform 1.2s var(--ease-out); }
.ptab::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, rgba(62, 30, 74, .9) 0%, rgba(62, 30, 74, .74) 60%, rgba(62, 30, 74, .5) 100%); transition: opacity var(--t-med); }
.ptab__t { font-family: var(--f-display); font-size: clamp(1.6rem, 2.3vw, 2.05rem); line-height: 1; }
.ptab__s { font-size: .8rem; opacity: .92; }
.ptab:hover { transform: translateX(-6px); box-shadow: 0 18px 36px rgba(74, 37, 86, .22); }
.ptab:hover img { transform: scale(1.08); }
.ptab.is-active { display: none; }
.programs__legal { position: relative; margin-top: 26px; font-size: .78rem; color: var(--ink-soft); max-width: 760px; }

/* ---------- Equipo ---------- */
.team { background: var(--white); }
.team__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px 12px; }
.member { display: grid; gap: 12px; align-content: start; width: 100%; text-align: center; font: inherit; color: inherit; }
button.member { cursor: pointer; border-radius: 6px; }
.member__ph { display: block; }
.member__n { display: block; }
.member__more { justify-self: center; display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--purple); padding: 4px 2px; border-bottom: 1.5px solid transparent; transition: border-color var(--t-med), gap var(--t-med) var(--ease-out); }
.member__more::after { content: "→"; transition: transform var(--t-med) var(--ease-out); }
button.member:hover .member__more, button.member:focus-visible .member__more { border-color: currentColor; }
button.member:hover .member__more::after { transform: translateX(3px); }
.member[aria-expanded="true"] .member__ph { box-shadow: 0 0 0 3px var(--purple); }
.member[aria-expanded="true"] .member__more::after { content: "×"; }
.member__ph { position: relative; aspect-ratio: 1.1; overflow: hidden; background: var(--paper); transition: box-shadow var(--t-med) var(--ease-out); }
.member__ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; transition: transform 1.2s var(--ease-out), filter var(--t-med); }
.member:hover .member__ph img { transform: scale(1.06); }
.member:hover .member__n { font-weight: 600; color: var(--ink); font-size: .95rem; line-height: 1.25; letter-spacing: -.01em; }
.member__r { display: block; font-weight: 400; color: var(--ink-soft); font-size: .88rem; line-height: 1.35; margin-top: 2px; }

/* ---------- Academy ---------- */
.academy { position: relative; color: var(--white); background: var(--purple-deep); overflow: hidden; padding-block: clamp(48px, 5.5vw, 76px) clamp(36px, 4vw, 52px); isolation: isolate; }
.academy__bg { position: absolute; inset: 0; z-index: -2; }
.academy__bgimg { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); max-width: none; object-fit: cover; filter: blur(34px) saturate(1.25) brightness(.62); opacity: 0; transform: scale(1.08); transition: opacity 1.6s var(--ease-io), transform 6s var(--ease-out); }
.academy__bgimg.is-active { opacity: 1; transform: scale(1); }
.academy::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 80% at 100% 0%, rgba(88, 135, 218, .35), transparent 65%), radial-gradient(50% 70% at 0% 100%, rgba(216, 189, 220, .22), transparent 60%), linear-gradient(110deg, rgba(46, 22, 54, .94) 0%, rgba(74, 37, 86, .78) 45%, rgba(74, 37, 86, .45) 100%); }
.academy__grid { display: grid; grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr); gap: clamp(28px, 4vw, 56px); align-items: center; }
.academy__copy { display: grid; gap: 22px; align-content: center; }
.academy__eyebrow { color: var(--mauve); }
.academy__h { position: relative; z-index: 4; font-size: clamp(2.6rem, 4.4vw, 3.9rem); line-height: .98; color: var(--white); max-width: 440px; }
.academy__panels { min-height: 120px; }
.academy__t { font-family: var(--f-body); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; color: var(--rose); }
.academy__panels p { margin-top: 8px; max-width: 440px; font-size: 1rem; line-height: 1.6; color: rgba(255, 255, 255, .86); }
.academy__ctrl { display: flex; align-items: center; gap: 14px; }
.ac-btn { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .45); transition: background-color var(--t-med) var(--ease-out), color var(--t-med), box-shadow var(--t-med), transform var(--t-fast) var(--ease-out); }
.ac-btn svg { width: 22px; height: 8px; transition: transform var(--t-med) var(--ease-out); }
.ac-btn[data-ac-prev] svg { transform: scaleX(-1); }
.ac-btn:hover { background: var(--white); color: var(--purple); box-shadow: inset 0 0 0 1.5px var(--white); }
.ac-btn[data-ac-next]:hover svg { transform: translateX(3px); }
.ac-btn[data-ac-prev]:hover svg { transform: scaleX(-1) translateX(3px); }
.ac-btn:active { transform: scale(.94); }
.ac-count { font-family: var(--f-brand); font-weight: 600; font-size: .8rem; letter-spacing: .16em; color: rgba(255, 255, 255, .7); font-variant-numeric: tabular-nums; min-width: 64px; text-align: center; }
.ac-count b { color: var(--white); font-weight: 600; }
.ac-play { position: relative; width: 36px; height: 36px; margin-left: 4px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; gap: 4px; color: rgba(255, 255, 255, .8); transition: color var(--t-fast), background-color var(--t-fast); }
.ac-play i { width: 3px; height: 12px; border-radius: 2px; background: currentColor; transition: all var(--t-med) var(--ease-out); }
.ac-play:hover { color: var(--white); background: rgba(255, 255, 255, .1); }
.ac-play[aria-pressed="true"] i:first-child { width: 0; height: 0; background: none; border-style: solid; border-width: 7px 0 7px 11px; border-color: transparent transparent transparent currentColor; border-radius: 0; margin-left: 3px; }
.ac-play[aria-pressed="true"] i:last-child { width: 0; opacity: 0; }

/* Escenario tipo coverflow */
.academy__stage { position: relative; height: clamp(400px, 38vw, 500px); perspective: 1400px; touch-action: pan-y; user-select: none; -webkit-user-select: none; outline: none; }
.academy__stage:focus-visible { outline: 2px solid var(--mauve); outline-offset: 6px; border-radius: 24px; }
.ac-slide { position: absolute; left: 50%; top: 50%; width: clamp(240px, 21vw, 290px); aspect-ratio: 3 / 4; max-width: 100%; margin: 0; border-radius: 22px; overflow: hidden; background: var(--purple-deep); translate: -50% -50%; transform: translateX(0) scale(.62); opacity: 0; z-index: 1; cursor: pointer;
  box-shadow: 0 30px 70px rgba(20, 8, 26, .55), 0 0 0 1px rgba(255, 255, 255, .08);
  transition: transform 1.1s var(--ease-out), opacity 1.1s var(--ease-out), filter 1.1s var(--ease-out); will-change: transform, opacity; }
.ac-slide img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.14); transition: transform 2.4s var(--ease-out), filter 1.1s var(--ease-out); filter: saturate(.7) brightness(.75); pointer-events: none; }
.ac-slide::after { /* destello de luz que cruza la imagen al activarse */
  content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(105deg, transparent 30%, rgba(240, 217, 234, .32) 48%, rgba(167, 164, 223, .18) 54%, transparent 70%); transform: translateX(-120%); }
.ac-slide figcaption { position: absolute; inset: auto 0 0 0; padding: 48px 20px 18px; display: grid; gap: 2px; font-size: .82rem; color: rgba(255, 255, 255, .85); background: linear-gradient(0deg, rgba(30, 12, 38, .96) 0%, rgba(30, 12, 38, .9) 68%, rgba(30, 12, 38, 0) 100%); opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .8s var(--ease-out); }
.ac-slide figcaption span { font-family: var(--f-display); font-size: 1.6rem; line-height: 1.05; color: var(--white); }
.ac-slide.is-active { transform: translateX(0) scale(1) rotateY(0); opacity: 1; z-index: 3; cursor: zoom-in; }
.ac-slide.is-active img { transform: scale(1); filter: none; }
.ac-slide img.op-l { object-position: 20% 50%; }
.ac-slide img.op-l2 { object-position: 38% 50%; }
.ac-slide img.op-b { object-position: 50% 72%; }
.ac-slide img.op-m { object-position: 50% 45%; }
.ac-slide img.op-c { object-position: 52% 50%; }
.ac-slide.is-active::after { animation: sheen 1.6s var(--ease-out) .35s both; }
.ac-slide.is-active figcaption { opacity: 1; transform: none; transition-delay: .45s; }
.ac-slide.is-prev { transform: translateX(-56%) scale(.78) rotateY(16deg); opacity: .62; z-index: 2; }
.ac-slide.is-next { transform: translateX(56%) scale(.78) rotateY(-16deg); opacity: .62; z-index: 2; }
.ac-slide.is-prev:hover, .ac-slide.is-next:hover { opacity: .85; }
.ac-slide.is-far { transform: translateX(0) scale(.6); opacity: 0; z-index: 0; }
.academy__stage.is-dragging .ac-slide { transition-duration: .35s; }

/* Pestañas con barra de progreso */
.academy__tabs { margin-top: clamp(28px, 3.5vw, 44px); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px clamp(16px, 3vw, 40px); }
.ac-tab { display: grid; grid-template-columns: 46px minmax(0, 1fr); align-items: center; gap: 12px; text-align: left; color: var(--white); font-weight: 500; font-size: 1rem; line-height: 1.15; padding-bottom: 14px; position: relative; opacity: .66; transition: opacity var(--t-med) var(--ease-out); }
.ac-tab:hover, .ac-tab.is-active { opacity: 1; }
.academy__ico { width: 46px; height: 46px; flex: none; border-radius: 50%; background: var(--white); display: grid; place-items: center; transition: transform var(--t-med) var(--ease-out), background-color var(--t-med); }
.academy__ico svg { width: 26px; height: 26px; stroke: var(--purple); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ac-tab:hover .academy__ico { transform: translateY(-3px) rotate(-6deg); }
.ac-tab.is-active .academy__ico { background: var(--rose); }
.ac-tab__bar { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.ac-tab__bar b { position: absolute; inset: 0; background: linear-gradient(90deg, var(--mauve), var(--white)); transform: scaleX(0); transform-origin: left; }
.ac-tab.is-active .ac-tab__bar b { animation: acprog var(--ac-dur, 6s) linear forwards; }
.ac-tab.is-done .ac-tab__bar b { transform: scaleX(1); opacity: .35; }
.academy.is-paused .ac-tab.is-active .ac-tab__bar b { animation-play-state: paused; }
.academy.is-static .ac-tab.is-active .ac-tab__bar b { animation: none; transform: scaleX(1); }
.academy__claim { margin-top: 28px; text-align: center; font-size: .98rem; opacity: .9; }

/* Indicador "ampliar" en la foto activa */
.ac-zoom { position: absolute; top: 14px; right: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: var(--purple); background: rgba(255, 255, 255, .88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); box-shadow: 0 6px 18px rgba(20, 8, 26, .3); opacity: 0; transform: scale(.7); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out), background-color var(--t-fast); pointer-events: none; }
.ac-zoom svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ac-slide.is-active .ac-zoom { opacity: 1; transform: none; transition-delay: .6s; }
.ac-slide.is-active:hover .ac-zoom { background: var(--rose); transform: scale(1.08); }

/* ---------- Visor de imágenes (lightbox) ---------- */
.lb { position: fixed; inset: 0; z-index: 300; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; padding: calc(20px + env(safe-area-inset-top, 0px)) 12px calc(20px + env(safe-area-inset-bottom, 0px)); }
.lb__scrim { position: absolute; inset: 0; background: radial-gradient(80% 80% at 50% 40%, rgba(74, 37, 86, .9), rgba(22, 10, 28, .96)); backdrop-filter: blur(14px) saturate(120%); -webkit-backdrop-filter: blur(14px) saturate(120%); opacity: 0; transition: opacity .5s var(--ease-out); }
.lb.is-open .lb__scrim { opacity: 1; }
.lb__fig { position: relative; grid-column: 2; margin: 0; display: grid; justify-items: center; gap: 16px; min-width: 0; }
.lb__frame { position: relative; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, .04); box-shadow: 0 40px 90px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .1); transform-origin: center; transition: transform .7s var(--ease-out), opacity .5s var(--ease-out); }
.lb__img { display: block; width: 100%; height: 100%; object-fit: contain; transition: opacity .45s var(--ease-out), transform .6s var(--ease-out), filter .45s; }
.lb__img.is-swapping { opacity: 0; transform: scale(.97); filter: blur(4px); }
.lb__cap { display: grid; justify-items: center; gap: 2px; text-align: center; color: rgba(255, 255, 255, .82); font-size: .9rem; opacity: 0; transform: translateY(10px); transition: opacity .5s var(--ease-out) .25s, transform .6s var(--ease-out) .25s; }
.lb.is-open .lb__cap { opacity: 1; transform: none; }
.lb__t { font-family: var(--f-display); font-size: clamp(1.6rem, 3vw, 2.1rem); line-height: 1.05; color: var(--white); }
.lb__n { margin-top: 4px; font-family: var(--f-brand); font-weight: 600; font-size: .72rem; letter-spacing: .18em; color: var(--mauve); }
.lb__btn { position: relative; z-index: 1; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; color: var(--white); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .4); opacity: 0; transition: opacity .5s var(--ease-out) .2s, background-color var(--t-med), color var(--t-med), transform var(--t-fast) var(--ease-out); }
.lb.is-open .lb__btn { opacity: 1; }
.lb__btn:hover { background: var(--white); color: var(--purple); }
.lb__btn:active { transform: scale(.94); }
.lb.is-single .lb__prev, .lb.is-single .lb__next { visibility: hidden; }
.lb__btn svg { width: 22px; height: 8px; }
.lb__prev { grid-column: 1; justify-self: center; }
.lb__prev svg { transform: scaleX(-1); }
.lb__next { grid-column: 3; justify-self: center; }
.lb__close { position: absolute; top: calc(18px + env(safe-area-inset-top, 0px)); right: 18px; width: 48px; height: 48px; }
.lb__close svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
body.lb-open { overflow: hidden; }
@media (max-width: 600px) {
  .lb { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; align-content: center; padding-inline: 12px; }
  .lb__fig { grid-column: 1; grid-row: 1; }
  .lb__prev, .lb__next { grid-row: 2; grid-column: 1; width: 48px; height: 48px; margin-top: 8px; }
  .lb__prev { justify-self: start; margin-left: 18%; }
  .lb__next { justify-self: end; margin-right: 18%; }
}

@keyframes sheen { from { transform: translateX(-120%); } to { transform: translateX(120%); } }
@keyframes acprog { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* ---------- Aseguradoras ---------- */
.partners { padding-block: clamp(32px, 4vw, 48px); background: var(--white); }
.partners h2 { text-align: center; font-family: var(--f-body); font-weight: 500; font-size: clamp(1.2rem, 1.8vw, 1.45rem); color: var(--purple); }
.marquee { margin-top: 28px; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee__track { display: flex; align-items: center; gap: clamp(36px, 5vw, 64px); width: max-content; animation: marquee 38s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee img { height: 52px; width: auto; max-width: 170px; object-fit: contain; transition: transform var(--t-med) var(--ease-out), filter var(--t-med); }
.marquee img:hover { transform: scale(1.08); filter: drop-shadow(0 6px 12px rgba(74, 37, 86, .15)); }

/* ---------- Contacto / Agenda ---------- */
.contact { background: var(--paper); overflow: hidden; }
.contact::before { content: ""; position: absolute; width: 760px; height: 760px; right: -280px; top: -200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(200, 214, 235, .8), rgba(200, 214, 235, 0)); pointer-events: none; }
.contact__grid { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.contact__h { font-size: var(--fs-h2); line-height: .98; }
.contact__info { display: grid; gap: 22px; }
.info-list { display: grid; gap: 12px; margin-top: 8px; }
.info { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--r-md); background: var(--white); box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease-out), box-shadow var(--t-med); }
a.info:hover { transform: translateY(-2px); box-shadow: var(--shadow-2); }
.info__ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--rose); color: var(--purple); }
.info__ico svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.info__ico svg.fill, .footer__contacts svg.fill { fill: currentColor; stroke: none; }
.info__k { display: block; font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); }
.info__v { display: block; color: var(--ink); font-weight: 500; overflow-wrap: break-word; font-size: clamp(.86rem, 3.7vw, 1rem); }
.hours { font-size: .9rem; color: var(--ink-soft); }
.hours b { color: var(--ink); font-weight: 600; }
.map { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 16 / 9; background: var(--neb-soft); box-shadow: var(--shadow-1); }
.map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map__ph { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; text-align: center; font-size: .88rem; color: var(--ink); }
.map__ph strong { color: var(--purple); font-weight: 600; font-size: 1rem; }

.form { position: sticky; top: calc(var(--header-h) + 24px); background: var(--white); border-radius: var(--r-lg); box-shadow: var(--shadow-2); padding: clamp(24px, 3.4vw, 40px); display: grid; gap: 18px; }
.form__h { font-family: var(--f-display); font-size: clamp(2rem, 3vw, 2.5rem); color: var(--purple); line-height: 1; }
.form__row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field { position: relative; display: grid; gap: 6px; }
.field label { font-size: .82rem; font-weight: 500; color: var(--ink); }
.field label span { color: var(--purple); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .97rem; color: var(--ink);
  padding: 13px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper);
  transition: border-color var(--t-fast), box-shadow var(--t-med) var(--ease-out), background-color var(--t-fast);
  appearance: none; -webkit-appearance: none;
}
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2361366E' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 40px; }
.field textarea { min-height: 112px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--mauve); }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--purple); background: var(--white); box-shadow: 0 0 0 4px rgba(97, 54, 110, .12); }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); box-shadow: 0 0 0 4px rgba(179, 38, 30, .08); }
.field__err { font-size: .78rem; color: var(--danger); min-height: 0; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; font-size: .84rem; color: var(--ink-soft); line-height: 1.45; }
.consent input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--purple); }
.consent a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
.consent.has-error { color: var(--danger); }
.consent .req { color: var(--purple); font-weight: 500; }
.consent-info { margin-top: -4px; padding: 12px 14px; border-radius: 12px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); font-size: .84rem; line-height: 1.45; color: var(--ink-soft); }
.consent-info p { margin-bottom: 4px; color: var(--purple-deep); font-size: inherit; }
.consent-info ul { display: grid; gap: 3px; }
.consent-info b { font-weight: 600; color: var(--ink); }
.map__ph a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
.footer__bottom a { text-decoration: underline; text-underline-offset: 2px; }
mark.pending { background: #FFF1B8; color: #5A3B00; padding: 0 4px; border-radius: 4px; font-weight: 600; }
.legal-meta { display: grid; gap: 6px; margin-top: 12px; padding: 16px 18px; border-radius: 14px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.legal-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: .92rem; }
.legal-table th, .legal-table td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal-table th { color: var(--purple-deep); font-weight: 600; background: var(--paper); }
.table-wrap { overflow-x: auto; }
.prose h3 { font-family: var(--f-body); font-weight: 600; font-size: 1.02rem; color: var(--ink); margin: 20px 0 6px; }
.prose ol { padding-left: 1.3em; display: grid; gap: 6px; margin-top: 8px; }
.toc { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.toc a { padding: 6px 12px; border-radius: 999px; background: var(--white); color: var(--purple); font-size: .85rem; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.toc a:hover { background: var(--rose); }
.form__status { font-size: .9rem; padding: 12px 14px; border-radius: 12px; }
.form__status.is-ok { background: #E8F4EE; color: var(--ok); }
.form__status.is-err { background: #FBEAEA; color: var(--danger); }
.form__fine { font-size: .76rem; color: var(--ink-soft); text-align: center; }

/* ---------- Footer ---------- */
.footer { position: relative; background: linear-gradient(100deg, #B9A6E0 0%, #EFE4F3 18%, var(--rose) 45%, #E9EEF7 70%, var(--mist) 85%, #9A8FD8 100%); background-size: 200% 100%; animation: nebula 24s var(--ease-io) infinite alternate; color: var(--ink); }
.footer__top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px 36px; padding-block: 36px; }
.footer__contacts { display: flex; flex-wrap: wrap; gap: 14px 30px; font-size: .85rem; color: var(--ink-deep); }
.footer__contacts a, .footer__contacts span { display: inline-flex; align-items: center; gap: 8px; transition: color var(--t-fast); }
.footer__contacts a:hover { color: var(--purple); }
.footer__contacts svg { width: 18px; height: 18px; flex: none; stroke: var(--purple); fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.footer__contacts svg.fill { fill: var(--purple); }
.footer__mid { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 28px; padding-block: 28px; border-top: 1px solid rgba(97, 54, 110, .14); }
.footer__claim { font-family: var(--f-display); font-size: 1.9rem; line-height: 1.05; color: var(--purple); max-width: 300px; }
.footer__sig { margin-top: 10px; font-family: var(--f-brand); font-weight: 600; font-size: .66rem; letter-spacing: .2em; color: var(--purple-deep); text-transform: uppercase; }
.footer h2 { font-family: var(--f-brand); font-weight: 600; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--purple); margin-bottom: 12px; }
.footer__links { display: grid; gap: 8px; font-size: .9rem; }
.footer__links a { color: var(--ink-deep); transition: color var(--t-fast), transform var(--t-fast) var(--ease-out); display: inline-block; }
.footer__links a:hover { color: var(--purple); transform: translateX(3px); }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); border-top: 1px solid rgba(97, 54, 110, .14); font-size: .78rem; color: var(--ink-deep); }
.footer__bottom nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.footer__bottom a:hover { color: var(--purple); }

/* ---------- Flotantes ---------- */
.wa {
  position: fixed; z-index: 80; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 0; height: 58px; padding: 0 17px; border-radius: var(--r-pill);
  background: var(--wa); color: var(--white); box-shadow: 0 14px 30px rgba(31, 175, 90, .38);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), gap var(--t-med) var(--ease-out);
  animation: wa-in .9s var(--ease-out) 1.6s both;
}
.wa svg { width: 25px; height: 25px; flex: none; fill: currentColor; }
.wa span { max-width: 0; overflow: hidden; white-space: nowrap; font-weight: 600; font-size: .9rem; transition: max-width var(--t-med) var(--ease-out); }
.wa:hover { transform: translateY(-3px); gap: 10px; box-shadow: 0 20px 38px rgba(31, 175, 90, .45); }
.wa:hover span { max-width: 160px; }
.wa::before { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(31, 175, 90, .5); animation: pulse 2.8s var(--ease-out) 3s infinite; }
.totop { position: fixed; z-index: 80; right: 28px; bottom: calc(92px + env(safe-area-inset-bottom, 0px)); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--purple); box-shadow: var(--shadow-1); opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity var(--t-med), transform var(--t-med) var(--ease-out), background-color var(--t-fast); }
.totop.is-on { opacity: 1; transform: none; pointer-events: auto; }
.totop:hover { background: var(--rose); }
.totop svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }


/* ---------- Detalle desplegable (Unidades / Tecnología) ---------- */
.xgrid { align-items: start; }
.xpanel { grid-column: 1 / -1; display: grid; grid-template-rows: 0fr; opacity: 0; visibility: hidden; transition: grid-template-rows .65s var(--ease-out), opacity .45s var(--ease-out), margin .65s var(--ease-out), visibility 0s linear .65s; margin-block: -11px; }
.xpanel.is-open { grid-template-rows: 1fr; opacity: 1; visibility: visible; margin-block: 0; transition: grid-template-rows .65s var(--ease-out), opacity .45s var(--ease-out), margin .65s var(--ease-out), visibility 0s; }
.xscrim { position: fixed; inset: 0; z-index: 140; background: rgba(28, 14, 34, .42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; pointer-events: none; transition: opacity .45s var(--ease-out); }
.xscrim.is-on { opacity: 1; pointer-events: auto; }
body.xsheet-open { overflow: hidden; }
.xpanel__in { position: relative; min-height: 0; overflow: hidden; }
.xpanel .units__feature, .xpanel .tech__feature { margin: 6px 0; padding: clamp(18px, 2.6vw, 30px); border-radius: var(--r-lg); transform: translateY(-14px); transition: transform .7s var(--ease-out); }
.xpanel.is-open .units__feature, .xpanel.is-open .tech__feature { transform: none; }
.units .xpanel .units__feature { background: rgba(255, 255, 255, .58); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 24px 50px rgba(46, 30, 100, .18); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.tech .xpanel .tech__feature { background: var(--white); box-shadow: 0 0 0 1px var(--line), var(--shadow-2); }
.xpanel__close { position: absolute; top: 18px; right: 18px; z-index: 3; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--white); color: var(--purple); box-shadow: var(--shadow-1); transition: transform var(--t-fast) var(--ease-out), background-color var(--t-fast); }
.xpanel__close:hover { background: var(--rose); transform: rotate(90deg); }
.xpanel__close svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2.4; stroke-linecap: round; }
.unit-tab[aria-expanded="true"] .unit-tab__tile { box-shadow: 0 0 0 3px var(--white), 0 24px 40px rgba(46, 30, 100, .3); transform: translateY(-6px); }
.tcard[aria-expanded="true"] { box-shadow: 0 0 0 2px var(--purple), 0 18px 34px rgba(74, 37, 86, .14); }
.tcard[aria-expanded="true"]::before { opacity: 1; }
.tech__panels .tech__name { margin-top: 0; }
.tech__panels .tech__desc { margin-top: 12px; }

/* Menú lateral: una sola fuente y un solo tamaño */
.drawer__list { display: grid; gap: 2px; }
.drawer__list a { position: relative; display: inline-flex; align-items: center; gap: 0; padding: 6px 0; font-family: var(--f-display); font-size: clamp(1.75rem, 2.4vw, 2.05rem); line-height: 1.2; letter-spacing: .005em; color: var(--purple); opacity: 0; transform: translateX(30px);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), color var(--t-med), gap var(--t-med) var(--ease-out); }
.drawer__list a::before { content: ""; width: 0; height: 1px; background: linear-gradient(90deg, var(--purple), var(--lavender)); transition: width var(--t-med) var(--ease-out); }
.drawer__list a:hover, .drawer__list a:focus-visible { color: var(--blue-deep); gap: 14px; }
.drawer__list a:hover::before, .drawer__list a:focus-visible::before { width: 28px; }
body.menu-open .drawer__list li:nth-child(8) a { transition-delay: 400ms, 400ms, 0s, 0s; }
.drawer__social { margin-top: auto; display: flex; gap: 12px; padding-top: 22px; border-top: 1px solid rgba(97, 54, 110, .16); }
.drawer__social a { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: var(--purple); background: rgba(255, 255, 255, .7); box-shadow: inset 0 0 0 1px rgba(97, 54, 110, .16); transition: background-color var(--t-med), color var(--t-med), transform var(--t-fast) var(--ease-out); }
.drawer__social a:hover { background: var(--purple); color: var(--white); transform: translateY(-2px); }
.drawer__social svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.drawer__social svg.fill { fill: currentColor; stroke: none; }

/* Íconos originales de Academy */
img.academy__ico { display: block; width: 46px; height: 46px; border-radius: 50%; object-fit: cover; background: var(--white); }
.ac-tab.is-active img.academy__ico { box-shadow: 0 0 0 3px rgba(240, 217, 234, .55); }


/* En móvil y tableta el detalle sube desde abajo (hoja inferior): la página no se desplaza */
@media (max-width: 900px) {
  .xpanel { position: fixed; z-index: 150; left: 0; right: 0; bottom: 0; display: block; margin: 0; opacity: 1; max-height: 88vh; border-radius: 26px 26px 0 0; overflow: hidden; box-shadow: 0 -24px 60px rgba(46, 22, 54, .32); transform: translateY(104%); transition: transform .6s var(--ease-out), visibility 0s linear .6s; }
  .xpanel.is-open { transform: none; margin: 0; transition: transform .6s var(--ease-out), visibility 0s; }
  .xpanel.is-dragging { transition: none; }
  .units .xpanel { background: linear-gradient(160deg, #FBF8FD 0%, #EFE6F5 45%, #DCD6F2 100%); color: var(--ink-deep); }
  .tech .xpanel { background: var(--white); }
  .xpanel__in { max-height: 88vh; overflow-y: auto; overscroll-behavior: contain; padding: 30px var(--gutter) calc(24px + env(safe-area-inset-bottom, 0px)); }
  .xpanel__grab { position: absolute; top: 0; left: 0; right: 0; height: 30px; z-index: 2; touch-action: none; cursor: grab; }
  .xpanel__grab::before { content: ""; position: absolute; top: 11px; left: 50%; width: 46px; height: 5px; margin-left: -23px; border-radius: 3px; background: currentColor; opacity: .28; }
  .tech .xpanel__grab { color: var(--purple); }
  .units .xpanel__grab { color: var(--purple); }
  .units .xpanel .units__feature, .tech .xpanel .tech__feature { margin: 0; padding: 0; background: none; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; transform: none; border-radius: 0; gap: 18px; }
  .xpanel .units__img { aspect-ratio: 2; }
  .xpanel .tech__stage { aspect-ratio: 1.6; }
  .xpanel__close { top: 22px; right: 16px; }
  .xpanel .units__title { padding-right: 48px; }
}


/* ---------- Recepción (bienvenida) ---------- */
.welcome { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--purple-deep); box-shadow: var(--shadow-2); isolation: isolate; }
.welcome__media { position: relative; display: block; width: 100%; aspect-ratio: 4 / 4.4; overflow: hidden; cursor: zoom-in; }
.welcome__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 32%; transform: scale(1.02); transition: transform 1.6s var(--ease-out); }
.welcome:hover .welcome__media img, .welcome__media:focus-visible img { transform: scale(1.07); }
.welcome__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(46, 22, 54, 0) 45%, rgba(46, 22, 54, .55) 72%, rgba(40, 18, 48, .94) 100%); pointer-events: none; }
.welcome__media::before { content: ""; position: absolute; z-index: 1; right: 14px; top: 14px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255, 255, 255, .9) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2361366E' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 3h6v6M9 21H3v-6M21 3l-7 7M3 21l7-7'/%3E%3C/svg%3E") center / 16px no-repeat; box-shadow: 0 6px 16px rgba(20, 8, 26, .25); transition: transform var(--t-med) var(--ease-out); }
.welcome:hover .welcome__media::before { transform: scale(1.08); }
.welcome__body { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding: 22px 24px 24px; color: var(--white); pointer-events: none; }
.welcome__k { display: inline-block; font-family: var(--f-brand); font-weight: 600; font-size: .7rem; letter-spacing: .16em; text-transform: uppercase; color: var(--purple-deep); background: var(--rose); padding: 5px 12px; border-radius: var(--r-pill); }
.welcome__h { margin-top: 10px; font-family: var(--f-display); font-weight: 400; font-size: clamp(1.9rem, 3vw, 2.4rem); line-height: 1.02; color: var(--white); }
.welcome__p { margin-top: 8px; font-size: .95rem; line-height: 1.5; color: rgba(255, 255, 255, .94); max-width: 440px; }
.welcome__addr { margin-top: 8px; font-size: .8rem; letter-spacing: .02em; color: var(--mauve); }

/* ---------- Vacunación (Unidades) ---------- */
.units__vax { position: relative; margin-top: 28px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px 22px; align-items: center; padding: 18px 22px; border-radius: var(--r-lg); background: rgba(255, 255, 255, .62); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7), 0 14px 30px rgba(46, 30, 100, .12); color: var(--ink-deep); }
.units__vax-tag { font-family: var(--f-brand); font-weight: 600; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--white); background: var(--purple); padding: 6px 12px; border-radius: var(--r-pill); }
.units__vax p { font-size: .92rem; line-height: 1.5; }
.units__vax strong { color: var(--purple-deep); }

/* ---------- Equipo: perfil desplegable ---------- */
.team__grid.xgrid { align-items: start; }
.team__feature { display: grid; grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); gap: clamp(20px, 3.4vw, 44px); align-items: start; }
.team .xpanel .team__feature { margin: 6px 0; padding: clamp(18px, 2.6vw, 30px); border-radius: var(--r-lg); background: var(--paper); box-shadow: 0 0 0 1px var(--line), var(--shadow-2); transform: translateY(-14px); transition: transform .7s var(--ease-out); text-align: left; }
.team .xpanel.is-open .team__feature { transform: none; }
.team__photo { position: relative; aspect-ratio: 4 / 5; border-radius: 18px; overflow: hidden; background: var(--white); }
.team__photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; transition: opacity var(--t-slow) var(--ease-out), transform 1.4s var(--ease-out); }
.team__photo img.is-leaving { opacity: 0; transform: scale(1.04); }
.team__photo img.is-entering { opacity: 0; transform: scale(1.08); }
.team__bios { min-width: 0; padding-right: 44px; }
.team__name { font-size: clamp(2rem, 3.2vw, 2.8rem); line-height: 1.02; color: var(--purple); }
.team__role { margin-top: 6px; font-weight: 600; font-size: .92rem; color: var(--purple-deep); }
.team__bio { margin-top: 14px; display: grid; gap: 10px; font-size: .96rem; line-height: 1.6; color: var(--ink); max-width: 640px; }
.team__ig { margin-top: 16px; display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--r-pill); background: var(--white); color: var(--purple); font-weight: 600; font-size: .9rem; box-shadow: inset 0 0 0 1px var(--line); transition: background-color var(--t-fast), transform var(--t-fast) var(--ease-out); }
.team__ig:hover { background: var(--rose); transform: translateY(-1px); }
.team__ig svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tcard__t sub, .tech__name sub { font-size: .6em; vertical-align: baseline; position: relative; top: .2em; }
@media (max-width: 900px) {
  .team .xpanel { background: var(--white); }
  .team .xpanel__grab { color: var(--purple); }
  .team .xpanel .team__feature { margin: 0; padding: 0; background: none; box-shadow: none; transform: none; border-radius: 0; grid-template-columns: 1fr; gap: 16px; }
  .team__photo { aspect-ratio: 4 / 3.2; max-width: 420px; }
  .team__bios { padding-right: 0; }
  .team .xpanel .team__name { padding-right: 48px; }
  .units__vax { grid-template-columns: 1fr; justify-items: start; }
}
@media (max-width: 600px) {
  .welcome__media { aspect-ratio: 4 / 5; }
  .welcome__body { padding: 18px 18px 20px; }
}

/* ---------- Revelado al hacer scroll ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 650ms var(--ease-out), transform 750ms var(--ease-out); transition-delay: var(--d, 0ms); }
.js [data-reveal="left"] { transform: translateX(-20px); }
.js [data-reveal="right"] { transform: translateX(20px); }
.js [data-reveal="zoom"] { transform: scale(.97); }
.js [data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Keyframes ---------- */
@keyframes kenburns { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.1) translate3d(-1.2%, -1%, 0); } }
@keyframes drift { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(6vw, 4vh, 0) scale(1.12); } }
@keyframes nebula { 0% { background-position: 0% 40%; } 100% { background-position: 100% 60%; } }
@keyframes scrollcue { 0% { transform: scaleY(0); opacity: 1; } 60% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes marquee { to { transform: translateX(calc(-50% - clamp(18px, 2.5vw, 32px))); } }
@keyframes wa-in { from { opacity: 0; transform: translateY(30px) scale(.8); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 175, 90, .45); } 70% { box-shadow: 0 0 0 18px rgba(31, 175, 90, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 175, 90, 0); } }

/* ---------- Páginas internas (legales / 404 / portal) ---------- */
.page-hero { position: relative; padding-block: calc(var(--header-h) + 64px) 56px; background: var(--neb-soft); background-size: 200% 200%; animation: nebula 18s var(--ease-io) infinite alternate; }
.page-hero h1 { font-family: var(--f-display); font-size: clamp(2.8rem, 6vw, 4.6rem); color: var(--purple); line-height: 1; }
.page-hero p { margin-top: 14px; color: var(--ink-soft); }
.prose { max-width: 760px; padding-block: 56px 96px; }
.prose h2 { font-family: var(--f-body); font-weight: 600; font-size: 1.25rem; color: var(--purple); margin: 36px 0 10px; }
.prose p, .prose li { color: var(--ink); line-height: 1.7; }
.prose p + p { margin-top: 12px; }
.prose ul { list-style: disc; padding-left: 1.3em; display: grid; gap: 6px; margin-top: 8px; }
.prose a { color: var(--purple); text-decoration: underline; text-underline-offset: 2px; }
.center-page { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 120px var(--gutter) 80px; background: var(--neb-soft); background-size: 200% 200%; animation: nebula 18s var(--ease-io) infinite alternate; }
.center-page .big { font-family: var(--f-display); font-size: clamp(6rem, 18vw, 12rem); line-height: .9; }
.center-page p { margin: 16px auto 28px; max-width: 460px; color: var(--ink-soft); }
.center-page .title-xl { font-size: clamp(3.2rem, 9vw, 6rem); line-height: 1; }
.center-page .t-md { font-size: clamp(2rem, 5vw, 3rem); }
.actions-center { justify-content: center; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .nav__list { display: none; }
  .header.is-scrolled .nav__cta { display: none; }
  .programs__layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
  .programs__tabs { grid-column: 1 / -1; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tcard { padding-right: 48%; }
}
@media (max-width: 900px) {
  :root { --header-h: 72px; }
  .brand__word { font-size: 1.7rem; }
  .hero__in { grid-template-columns: 1fr; }
  .hero__words { display: none; }
  .hero__media img { object-position: 72% 40%; }
  .hero__veil { background: linear-gradient(180deg, rgba(255, 246, 250, .1) 0%, rgba(255, 246, 250, .72) 42%, rgba(255, 246, 250, .9) 100%); }
  .hero { align-items: flex-end; }
  .hero__in { padding-bottom: 96px; }
  .stats__card { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat:nth-child(3)::before { display: none; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .about__grid { grid-template-columns: 1fr; }
  .about__media { aspect-ratio: 16 / 10; }
  .about__cols { grid-template-columns: 1fr; }
  .units__feature, .tech__feature, .contact__grid { grid-template-columns: 1fr; }
  .form { position: relative; top: auto; }
  .units__tabs { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 20px 14px; }
  .unit-tab { grid-column: span 2; }
  .unit-tab:nth-of-type(4) { grid-column: 2 / span 2; }
  .tech__feature { grid-template-columns: 1fr; }
  .xpanel__close { top: 12px; right: 12px; }
  .tech__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .programs__layout { grid-template-columns: 1fr; }
  .programs__img { min-height: 0; aspect-ratio: 4 / 3.4; }
  .programs__tabs { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; }
  .footer__mid { grid-template-columns: 1fr 1fr; }
  .footer__mid > div:first-child { grid-column: 1 / -1; }
  .academy__grid { grid-template-columns: 1fr; }
  .academy__copy { order: 2; }
  .academy__tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .stat { padding: 20px 12px; }
  .tech__grid { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .team__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .academy__stage { height: 420px; }
  .ac-slide { width: min(66vw, 280px); }
  .ac-slide.is-prev { transform: translateX(-62%) scale(.78) rotateY(14deg); opacity: .5; }
  .ac-slide.is-next { transform: translateX(62%) scale(.78) rotateY(-14deg); opacity: .5; }
  .ac-tab { grid-template-columns: 40px minmax(0, 1fr); font-size: .9rem; }
  .ac-tab .academy__ico { width: 40px; height: 40px; }
  .wa { right: 16px; height: 54px; padding: 0 15px; }
  .totop { right: 22px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
  .hero__actions .btn { width: 100%; justify-content: space-between; }
  .units__copy p { font-size: .94rem; }
  .drawer__panel { padding-inline: 24px; }
}

/* ---------- Accesibilidad: movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal], .js .hero [data-in], .js .hero .hero__title .line > span { opacity: 1 !important; transform: none !important; }
  .marquee__track { animation: none; flex-wrap: wrap; justify-content: center; width: auto; }
  .marquee { -webkit-mask-image: none; mask-image: none; }
}

/* ---------- Impresión ---------- */
@media print {
  .header, .drawer, .wa, .totop, .progress, .hero__scroll, .marquee { display: none !important; }
  .hero { min-height: 0; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; }
}
.prose ul + p, .prose ol + p, .prose .table-wrap + p, .prose .legal-meta + p { margin-top: 14px; }

/* Cambio sincronizado de detalle (Unidades / Tecnología / Equipo) */
.xpanel #unit-img, .xpanel #tech-img, .xpanel #team-img { transition: opacity 280ms var(--ease-out), transform 520ms var(--ease-out); }
.xpanel .swap, .xpanel .tech__counter { transition: opacity 280ms var(--ease-out), transform 420ms var(--ease-out), filter 280ms; }
.xpanel.is-swapping #unit-img, .xpanel.is-swapping #team-img { opacity: 0; transform: scale(1.04); }
.xpanel.is-swapping #tech-img { opacity: 0; transform: scale(.97); }
.xpanel.is-swapping .swap, .xpanel.is-swapping .tech__counter { opacity: 0; transform: translateY(8px); filter: blur(4px); }
