/* ==========================================================================
   Veraver — Ruta A "Evolución"
   ========================================================================== */

:root {
  /* Color */
  --surface: #F4F4F4; /* gris neutro (antes crema #F9F5EE) */
  --surface-elevated: #FFFFFF;
  --ink: #1D194C;
  --ink-secondary: #5B5A7A;
  --border: #E3DFD5;
  --brand-primary: #4233CE;
  --brand-primary-hover: #3526B8;
  --brand-secondary: #1D194C;
  --brand-tint: #E4E7FC;
  --focus-ring: #4233CE;

  /* Dark surfaces (hero, bandas, footer) */
  --dk-surface: #14121F;
  --dk-elevated: #1D194C;
  --dk-ink: #F3F1EA;
  --dk-ink-secondary: #A6A3C4;
  --dk-border: #322C56;
  --dk-primary: #8D80FF;

  /* Derivados de la marca (se calculan a partir de los tokens, no son colores nuevos) */
  --brand-glow: color-mix(in srgb, var(--dk-primary) 60%, #FFFFFF);          /* violeta luminoso para degradados */
  --brand-gradient: linear-gradient(150deg, var(--dk-primary) 0%, var(--brand-primary) 100%);
  --brand-primary-rgb: 66, 51, 206;                                         /* = --brand-primary, para transparencias */
  --dk-primary-rgb: 141, 128, 255;                                          /* = --dk-primary */
  --dk-ink-rgb: 243, 241, 234;                                              /* = --dk-ink */

  /* Tipografía */
  /* Una sola familia para toda la web. Cada rol conserva su variable: para cambiar
     más adelante sólo los titulares (o sólo las etiquetas), basta con editar su línea. */
  --font-family: 'Urbanist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: var(--font-family);   /* títulos de sección, tarjetas, logo */
  --font-headline: var(--font-family);  /* titular del hero */
  --font-body: var(--font-family);      /* párrafos, menú, botones */
  --font-mono: var(--font-family);      /* etiquetas, cifras y datos técnicos */

  /* Espaciado base 4 */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px;
  --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;

  /* Radios */
  /* Un solo sistema de esquinas: tarjetas y bloques 10px · botones e insignias en píldora · detalles pequeños 8px */
  --r-card: 10px;
  --r-btn: 10px;
  --r-chip: 8px;
  --r-pill: 999px;

  /* Titulares de sección: un único tamaño (adaptable), peso e interlineado para toda la web */
  --title-size: clamp(34px, 4.6vw, 58px);
  --title-weight: 500;
  --title-leading: 1.02;
  --title-tracking: -.035em;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --container: 1200px;
  --gutter: 24px;
}

@media (max-width: 640px) { :root { --gutter: 16px; } }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; border-radius: 6px; }
.hero :focus-visible, .final :focus-visible, .footer :focus-visible, .techband:focus-visible { outline-color: var(--dk-primary); }

/* Grano sutil en toda la página */
body::after {
  content: ""; position: fixed; inset: 0; z-index: 100; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.skip { position: absolute; left: -9999px; top: 8px; z-index: 200; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 8px; }
.skip:focus { left: 8px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--s9) 0; }
@media (max-width: 760px) { .section { padding: 72px 0; } }

.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-secondary); }
.ico { width: 18px; height: 18px; flex: none; }
.ico-lg { width: 28px; height: 28px; }

.eyebrow {
  font-family: var(--font-mono); font-size: 16px; font-weight: 500;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand-primary);
  margin-bottom: var(--s4);
}
.eyebrow-light { color: var(--dk-primary); }

.h2 {
  font-family: var(--font-display); font-weight: var(--title-weight);
  font-size: var(--title-size); line-height: var(--title-leading); letter-spacing: var(--title-tracking);
}
.section-head { max-width: 720px; margin-bottom: var(--s8); }
.section-head .muted { margin-top: var(--s4); font-size: 18px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.lead { font-size: 20px; line-height: 1.5; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: var(--r-btn);
  font-family: var(--font-body); font-weight: 600; font-size: 16px; white-space: nowrap;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .35s var(--ease-out), box-shadow .35s var(--ease);
  will-change: transform;
}
.btn-sm { height: 40px; padding: 0 18px; font-size: 14px; border-radius: var(--r-pill); }
.btn-lg { height: 58px; padding: 0 28px; font-size: 17px; }
.btn-primary { background: var(--brand-primary); color: #fff; }
.btn-primary:hover { background: var(--brand-primary-hover); box-shadow: 0 12px 30px -12px rgba(66, 51, 206, .7); }
/* Botón sobre fondos oscuros: blanco, y al pasar el mouse toma el azul morado de marca */
.btn-light { background: var(--surface-elevated); color: var(--ink); }
.btn-light:hover { background: #A49AFF; box-shadow: 0 16px 40px -14px rgba(141, 128, 255, .8); }
.btn-ghost-light { color: var(--dk-ink); border: 1.5px solid var(--dk-border); }
.btn-ghost-light:hover { border-color: var(--dk-primary); color: #fff; }
.btn-outline { color: var(--brand-primary); border: 1.5px solid currentColor; margin-top: var(--s5); }
.btn-outline:hover { background: var(--brand-primary); color: #fff; border-color: var(--brand-primary); }

/* ==========================================================================
   HEADER — transparente arriba, píldora flotante al hacer scroll
   ========================================================================== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; justify-content: center;
  padding: 16px var(--gutter);
  transition: padding .5s var(--ease);
}
.header-bar {
  width: 100%; max-width: 1280px; height: 60px;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: var(--s4);
  padding: 0 4px; border-radius: var(--r-pill);
  border: 1px solid transparent; background: transparent;
  transition: max-width .5s var(--ease), padding .5s var(--ease), background-color .5s var(--ease), border-color .5s var(--ease), box-shadow .5s var(--ease);
}
.logo {
  font-family: var(--font-display); font-weight: 800; font-size: 24px; letter-spacing: -.04em;
  color: var(--dk-ink); justify-self: start; transition: color .4s var(--ease);
}
.logo span { color: var(--dk-primary); transition: color .4s var(--ease); }
.logo-light { color: var(--dk-ink); }

/* Menú centrado y transparente */
.nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; }
.nav a { color: var(--dk-ink-secondary); position: relative; padding: 6px 0; transition: color .3s var(--ease); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: right; transition: transform .4s var(--ease-out);
}
.nav a:hover { color: var(--dk-ink); }
.nav a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav a { font-weight: 500; display: inline-flex; align-items: center; }
/* Medium → bold al pasar el mouse, sin que el menú "salte":
   una copia invisible en bold reserva el ancho final */
.nav .t { display: inline-flex; flex-direction: column; align-items: center; transition: font-weight .2s var(--ease); }
.nav .t::before { content: attr(data-label); content: attr(data-label) / ""; font-weight: 700; height: 0; overflow: hidden; visibility: hidden; pointer-events: none; }
.nav a:hover .t, .nav a:focus-visible .t { font-weight: 700; }
.nav-tech { color: var(--dk-primary) !important; display: inline-flex; align-items: center; gap: 6px; }
.nav-tech .tag { font-family: var(--font-mono); font-size: 10px; font-weight: 500; padding: 2px 7px; border-radius: var(--r-pill); background: rgba(141, 128, 255, .18); }

.nav a.nav-cta {
  margin-left: 6px; gap: 6px; padding: 9px 16px; border-radius: var(--r-pill);
  background: var(--dk-primary); color: var(--dk-surface); font-weight: 600;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.nav a.nav-cta::after { display: none; }
.nav a.nav-cta .ico { width: 15px; height: 15px; transition: transform .35s var(--ease-out); }
.nav a.nav-cta:hover { background: #A49AFF; color: var(--dk-surface); }
.nav a.nav-cta:hover .ico { transform: translate(2px, -2px); }

.header-actions { justify-self: end; display: flex; align-items: center; gap: var(--s2); }
.header-cta { background: var(--surface-elevated); color: var(--ink); }
.header-cta:hover { background: #A49AFF; }
.header-cta .sm { display: none; }

.burger { display: none; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--dk-border); flex-direction: column; align-items: center; justify-content: center; gap: 5px; }
.burger i { display: block; width: 16px; height: 1.5px; background: var(--dk-ink); transition: transform .3s var(--ease), background-color .3s; }
.burger[aria-expanded="true"] i:first-child { transform: translateY(3.25px) rotate(45deg); }
.burger[aria-expanded="true"] i:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* Estado píldora */
.site-header.is-pill { padding-top: 12px; }
.site-header.is-pill .header-bar {
  max-width: 1080px; padding: 0 8px 0 24px;
  background: rgba(255, 255, 255, .78);
  -webkit-backdrop-filter: blur(14px) saturate(1.4); backdrop-filter: blur(14px) saturate(1.4);
  border-color: rgba(29, 25, 76, .08);
  box-shadow: 0 10px 34px -12px rgba(29, 25, 76, .18);
}
.site-header.is-pill .logo { color: var(--ink); }
.site-header.is-pill .logo span { color: var(--brand-primary); }
.site-header.is-pill .header-bar { padding: 0 8px 0 24px; }
.site-header.is-pill .nav a { color: var(--ink-secondary); }
.site-header.is-pill .nav a:hover { color: var(--ink); }
.site-header.is-pill .nav-tech { color: var(--brand-primary) !important; }
.site-header.is-pill .nav-tech .tag { background: var(--brand-tint); }
.site-header.is-pill .header-cta { background: var(--brand-primary); color: #fff; }
.site-header.is-pill .header-cta:hover { background: var(--brand-primary-hover); }
.site-header.is-pill .burger { border-color: var(--border); }
.site-header.is-pill .burger i { background: var(--ink); }

/* Menú abierto: header siempre en claro */
.menu-open .site-header .header-bar { background: #fff; border-color: var(--border); padding: 0 8px 0 20px; }
.menu-open .site-header .logo { color: var(--ink); }
.menu-open .site-header .logo span { color: var(--brand-primary); }
.menu-open .site-header .burger i { background: var(--ink); }
.menu-open .site-header .burger { border-color: var(--border); }
.menu-open .site-header .header-cta { background: var(--brand-primary); color: #fff; }

.mobile-menu {
  position: fixed; inset: 0; z-index: 45; background: var(--surface);
  padding: 110px var(--gutter) 40px; display: flex; flex-direction: column; justify-content: space-between;
}
.mobile-menu[hidden] { display: none; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-family: var(--font-display); font-weight: 700; font-size: 34px; letter-spacing: -.03em;
  padding: 12px 0; border-bottom: 1px solid var(--border);
  opacity: 0; transform: translateY(12px); animation: menuIn .5s var(--ease-out) forwards;
}
.mobile-menu nav a:nth-child(2) { animation-delay: .05s; }
.mobile-menu nav a:nth-child(3) { animation-delay: .1s; }
.mobile-menu nav a:nth-child(4) { animation-delay: .15s; }
.mobile-menu nav a:nth-child(5) { animation-delay: .2s; }
.mobile-menu .nav-tech { color: var(--brand-primary) !important; }
.mobile-menu .nav-tech .tag { background: var(--brand-tint); font-size: 12px; }
.mobile-menu .btn { width: 100%; }
@keyframes menuIn { to { opacity: 1; transform: none; } }

@media (max-width: 980px) {
  .nav { display: none; }
  .header-bar { grid-template-columns: 1fr auto; }
  .burger { display: flex; }
}
@media (max-width: 480px) {
  .header-cta .lg { display: none; }
  .header-cta .sm { display: inline; }
  .site-header { padding: 10px 12px; }
  .site-header.is-pill { padding-top: 10px; }
  .site-header.is-pill .header-bar { padding: 0 6px 0 18px; }
}

/* ==========================================================================
   HERO — centrado: insignia, título en dos líneas, CTAs y universidades
   ========================================================================== */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: #0E0C2A; color: var(--dk-ink);
  min-height: 100svh; display: flex; flex-direction: column; justify-content: center;
  padding: 96px 0 48px;
}
.hero-dots { display: none; } /* trama de puntos decorativa: retirada */

/* Foto de fondo */
.hero-bg {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: url("../assets/img/fotos/hero-estudiante.jpg?v=20261016") center 42% / cover no-repeat;
  transform-origin: 54% 48%;
  animation: heroZoom 24s ease-in-out infinite alternate;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(14, 12, 42, .74) 0%, rgba(14, 12, 42, .55) 50%, rgba(14, 12, 42, .28) 100%),
    linear-gradient(180deg, rgba(14, 12, 42, .64) 0%, rgba(14, 12, 42, .12) 35%, rgba(14, 12, 42, .7) 100%);
}
.hero-image-credit { position: absolute; right: max(24px, calc((100vw - 1200px) / 2)); bottom: 18px; z-index: 0; color: rgba(255,255,255,.68); font-size: 12px; letter-spacing: .03em; }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.06); } }

.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }

/* Insignia */
.hero-badge {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: var(--s5);
  padding: 6px 16px 6px 6px; border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .15);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
}
.hero-badge-label {
  display: inline-flex; align-items: center; gap: 5px; flex: none;
  padding: 3px 10px; border-radius: var(--r-pill);
  background: rgba(243, 241, 234, .92); color: var(--ink);
  font-size: 16px; font-weight: 600;
}
.hero-badge-label .ico { width: 13px; height: 13px; color: var(--brand-primary); }
.hero-badge-text { font-family: var(--font-mono); font-size: 16px; font-weight: 500; color: rgba(243, 241, 234, .9); }

/* Título */
.hero-title {
  /* SemiBold: más peso que los titulares de sección (Medium) para que la portada mande */
  font-family: var(--font-headline); font-weight: 600;
  font-size: clamp(46px, 7vw, 100px); line-height: 1.02; letter-spacing: -.04em;
}
.hero-title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-title .line > * { display: inline-block; }
/* Énfasis con el color de marca, sin degradado en el texto */
.hero-title em { font-style: normal; color: var(--dk-primary); }
.hero-lead { font-size: 19px; color: rgba(243, 241, 234, .8); max-width: 620px; margin-top: var(--s5); }

/* Botones */
.hero-ctas { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: var(--s3) var(--s4); margin-top: 40px; }
.btn-pill { border-radius: var(--r-pill); }
.btn-text {
  display: inline-flex; align-items: center; gap: 8px; height: 58px; padding: 0 20px;
  font-weight: 600; font-size: 16px; color: rgba(243, 241, 234, .88); transition: color .3s var(--ease);
}
.btn-text .ico { width: 17px; height: 17px; transition: transform .4s var(--ease-out); }
.btn-text:hover { color: #fff; }
.btn-text:hover .ico { transform: translateY(3px); }

/* Universidades */
.partners { margin-top: 64px; width: 100%; max-width: 1100px; }
.partners-title { font-size: 16px; color: rgba(243, 241, 234, .65); }
/* Rueda de logos: se desplazan a la izquierda y reaparecen por la derecha, sin corte.
   La lista está repetida 4 veces; al avanzar media pista (2 copias) vuelve al inicio sin que se note */
.partners-marquee {
  overflow: hidden; margin-top: var(--s5);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
          mask-image: linear-gradient(90deg, transparent 0, #000 12%, #000 88%, transparent 100%);
}
.partners-grid { display: flex; align-items: center; width: max-content; animation: logosWheel 36s linear infinite; }
.partners-marquee:hover .partners-grid { animation-play-state: paused; }
@keyframes logosWheel { to { transform: translateX(-50%); } }
.partners-grid li { display: flex; align-items: center; justify-content: center; flex: none; height: 72px; margin-right: 72px; }
.partners-grid img { width: auto; height: 50px; max-width: 220px; object-fit: contain; opacity: .78; transition: opacity .3s var(--ease); }
.partners-grid li:hover img { opacity: 1; }
/* Ajuste óptico: cada logo tiene proporciones distintas */
.partners-grid .logo-unmsm { height: 56px; }
.partners-grid .logo-upc { height: 66px; }
.partners-grid .logo-wiener { height: 64px; }
.partners-grid .logo-utp { height: 56px; }
.partners-grid .logo-ucv { height: 60px; }

/* Entrada escalonada */
.js .hero .in-1, .js .hero .in-2, .js .hero .in-3, .js .hero .in-4, .js .hero .in-5 { opacity: 0; transform: translateY(20px); }
.js .hero-title .line > * { transform: translateY(105%); }
.is-ready .hero .in-1, .is-ready .hero .in-2, .is-ready .hero .in-3, .is-ready .hero .in-4, .is-ready .hero .in-5 {
  opacity: 1; transform: none; transition: opacity .9s var(--ease), transform 1s var(--ease-out);
}
.is-ready .hero .in-2 { transition-delay: .1s; }
.is-ready .hero .in-3 { transition-delay: .35s; }
.is-ready .hero .in-4 { transition-delay: .5s; }
.is-ready .hero .in-5 { transition-delay: .7s; }
.is-ready .hero-title .line > * { transform: none; transition: transform 1.1s var(--ease-out) .1s; }
.is-ready .hero-title .line:nth-child(2) > * { transition-delay: .22s; }

@keyframes bob { 50% { transform: translateY(-8px); } }

@media (max-width: 900px) {
  .hero { padding: 120px 0 48px; min-height: 100svh; }
  .hero-bg { background-position: 88% 55%; transform-origin: 88% 55%; }
  .partners { margin-top: 64px; }
  .partners-grid li { margin-right: 48px; height: 56px; }
  .partners-grid img { max-width: 140px; }
  .partners-grid .logo-unmsm, .partners-grid .logo-utp { height: 36px; }
  .partners-grid .logo-upc, .partners-grid .logo-ucv { height: 40px; }
  .partners-grid .logo-wiener { height: 44px; }
}
@media (max-width: 560px) {
  .hero-badge { gap: 10px; padding-right: 12px; text-align: left; }
  .hero-badge-text { font-size: 16px; line-height: 1.35; }
  .hero-lead { font-size: 17px; }
  .hero-ctas { flex-direction: column; width: 100%; }
  .hero-ctas .btn { width: 100%; }
}

/* ==========================================================================
   STATEMENT
   ========================================================================== */
.statement { text-align: center; padding-top: 128px; padding-bottom: 112px; background: var(--surface-elevated); }
.statement-text {
  font-family: var(--font-display); font-weight: var(--title-weight);
  font-size: var(--title-size); line-height: var(--title-leading); letter-spacing: var(--title-tracking);
  max-width: 1000px; margin: 0 auto;
}
.statement-text b { font-weight: 700; }
.js .statement-text .w { color: #D5D0E0; transition: color .35s var(--ease); }
.js .statement-text .w.on { color: var(--ink); }
.js .statement-text b .w.on, .statement-text b { color: var(--brand-primary); }
.pains { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: var(--s7) auto 0; max-width: 760px; }
.pains li {
  display: grid; font-size: 16px; padding: 9px 16px; border-radius: var(--r-pill);
  border: 1px dashed #CFC9BC; color: var(--ink-secondary);
  transition: opacity .9s var(--ease), transform 1s var(--ease-out), background-color .5s var(--ease), border-color .5s var(--ease), color .5s var(--ease);
}
/* Ambos textos ocupan la misma celda: la píldora toma el ancho del más largo y no salta */
.pains li > span {
  grid-area: 1 / 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: opacity .45s var(--ease), transform .55s var(--ease-out);
}
.js .pains li.reveal {
  transition: opacity .9s var(--ease), transform 1s var(--ease-out), background-color .5s var(--ease), border-color .5s var(--ease);
}
.pain-from { text-decoration: line-through; text-decoration-color: var(--brand-primary); text-decoration-thickness: 2px; }
.pain-to { color: var(--brand-primary); font-weight: 500; }
.pain-to .ico { width: 16px; height: 16px; }
html:not(.js) .pain-from { opacity: 0; }
.js .pain-to { opacity: 0; transform: translateY(10px); }
.js .pains li.solved { background: var(--brand-tint); border-style: solid; border-color: transparent; }
.js .pains li.solved .pain-from { opacity: 0; transform: translateY(-10px); }
.js .pains li.solved .pain-to { opacity: 1; transform: none; }
.statement-sub { max-width: 620px; margin: var(--s6) auto 0; color: var(--ink-secondary); font-size: 18px; }
@media (max-width: 760px) { .statement { padding-top: 88px; padding-bottom: 72px; } }

/* ==========================================================================
   SERVICIOS — tarjetas con imagen y tinte violeta
   ========================================================================== */
.services { background: var(--dk-surface); color: var(--dk-ink); }

.services-head { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 720px; margin: 0 auto var(--s7); }
.services-title { font-family: var(--font-display); font-weight: var(--title-weight); font-size: var(--title-size); line-height: var(--title-leading); letter-spacing: var(--title-tracking); color: var(--dk-ink); }
.services-sub { margin-top: var(--s4); font-size: 18px; line-height: 1.5; color: var(--dk-ink-secondary); max-width: 560px; }
.btn-outline-light { margin-top: var(--s5); color: var(--dk-ink); border: 1.5px solid rgba(var(--dk-ink-rgb), .6); background: transparent; }
.btn-outline-light:hover, .btn-outline-light:focus-visible { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--surface-elevated); }

/* Grilla: 3 columnas x 3 filas
   A = columna 1, filas 1-2 · B = columnas 2-3, fila 1
   C = columna 2, fila 2     · D = columna 3, fila 2
   E = columnas 1-2, fila 3  · F = columna 3, fila 3 */
.svc-grid {
  display: grid; gap: var(--s4);
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(236px, 22vw, 290px);
  grid-template-areas:
    "a b b"
    "a c d"
    "e e f";
}
.svc-a { grid-area: a; } .svc-b { grid-area: b; } .svc-c { grid-area: c; }
.svc-d { grid-area: d; } .svc-e { grid-area: e; } .svc-f { grid-area: f; }

.svc {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; border-radius: 10px; color: var(--dk-ink);
  background: var(--brand-gradient);
}
/* Imagen con su color natural + capa violeta en "luz suave" (soft light) */
.svc-media { position: absolute; inset: 0; z-index: -2; isolation: isolate; }
.svc-media img {
  position: relative; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
/* 1) tinte violeta translúcido que unifica todas las fotos */
.svc-media::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(150deg, rgba(var(--dk-primary-rgb), .2) 0%, rgba(var(--brand-primary-rgb), .24) 100%);
}
/* 2) luz suave violeta: tiñe sin borrar los colores de la foto */
.svc-media::after {
  content: ""; position: absolute; inset: 0; z-index: 2;
  background: var(--dk-primary); mix-blend-mode: soft-light;
}
/* Degradado de color bajo el texto: nace del lado del texto (índigo de marca) y se desvanece hacia la imagen */
.svc::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(var(--veil-dir, 90deg), rgba(var(--brand-primary-rgb), .95) 0%, rgba(var(--brand-primary-rgb), .7) 25%, rgba(var(--brand-primary-rgb), .25) 45%, rgba(var(--brand-primary-rgb), 0) 62%);
}
.svc-a .svc-media img { object-position: center top; } /* la escena está arriba; abajo queda la zona oscura del texto */
.svc-b .svc-media img { object-position: right center; }
/* Sustentación: el presentador y la diapositiva quedan a la derecha, lejos del texto */
.svc-e .svc-media img { object-position: right center; }
@media (max-width: 600px) { .br-desk { display: none; } }
.svc-a { --veil-dir: 0deg; }   /* texto abajo: el degradado sube desde abajo */
.svc-c, .svc-f { --veil-dir: 110deg; }
.svc:hover .svc-media img { transform: scale(1.05); }
/* Al pasar el mouse (o enfocar con teclado), el título de la tarjeta se ilumina */
.svc h3 { transition: color .35s var(--ease), text-shadow .45s var(--ease); }
.svc:hover h3, .svc:focus-visible h3 {
  color: var(--surface-elevated);
  text-shadow: 0 0 18px rgba(var(--dk-primary-rgb), .9), 0 0 42px var(--brand-glow);
}

/* Cada tarjeta es su propio contenedor: los anchos de texto (cqw) son % del ancho de la tarjeta */
.svc { container-type: inline-size; }
.svc-body { display: flex; flex-direction: column; padding: var(--s6); width: 100%; }
/* Título y bajada con la misma escala que los bloques de Pregrado / Maestría / Doctorado */
.svc h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.5vw, 32px); letter-spacing: -.025em; line-height: 1.15; color: var(--dk-ink); }
.svc p { margin-top: var(--s2); font-size: 16px; font-weight: 400; line-height: 1.45; color: rgba(var(--dk-ink-rgb), .92); }

/* Guías de diseño: dónde termina el título y el subtítulo en cada tarjeta
   A: el subtítulo termina en la 1.ª guía       · B: el texto termina en el borde de la columna central
   C: subtítulo muy angosto (3.ª guía)           · D: subtítulo hasta la última guía
   E: el título termina antes de la foto         · F: subtítulo más holgado */
.svc-a .svc-body { justify-content: flex-end; padding-bottom: 48px; }
.svc-a h3 { max-width: 70cqw; }  .svc-a p { max-width: 72cqw; }
.svc-b .svc-body { justify-content: center; }
.svc-b h3 { max-width: 40cqw; }  .svc-b p { max-width: max(45cqw, 20.5em); }
.svc-c .svc-body, .svc-d .svc-body, .svc-f .svc-body { padding: 28px; }
.svc-c .svc-body { justify-content: flex-start; }
.svc-c h3 { max-width: 72cqw; }  .svc-c p { max-width: 56cqw; }
.svc-d .svc-body { justify-content: center; }
.svc-d h3 { max-width: 72cqw; }  .svc-d p { max-width: 54cqw; }
.svc-e .svc-body { justify-content: flex-start; } /* alineado arriba, a la altura de Artículos científicos */
.svc-e h3 { max-width: 48cqw; }  .svc-e p { max-width: 40cqw; }
.svc-f .svc-body { justify-content: flex-start; }
.svc-f h3 { max-width: 80cqw; }  .svc-f p { max-width: 61cqw; }

@media (max-width: 900px) {
  .svc-grid {
    grid-template-columns: 1fr 1fr; grid-auto-rows: 260px;
    grid-template-areas:
      "b b"
      "a c"
      "a d"
      "e e"
      "f f";
  }
}
@media (max-width: 600px) {
  .svc-grid {
    grid-template-columns: 1fr; grid-auto-rows: auto;
    grid-template-areas: "a" "b" "c" "d" "e" "f";
  }
  .svc { min-height: 240px; }
  .svc-body { padding: 24px !important; justify-content: flex-end !important; }
  .svc h3 { max-width: 85cqw !important; }
  .svc p { max-width: 80cqw !important; }
}

/* ==========================================================================
   NIVELES
   ========================================================================== */
/* Bloques apilados. En reposo: título y subtítulo. Al pasar el mouse, enfocar o tocar:
   el bloque pasa al índigo de marca, se abre y muestra la lista y la imagen */
.levels { display: grid; gap: var(--s3); }
.lvl {
  position: relative; overflow: hidden; display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s5);
  padding: 28px var(--s6); border-radius: 10px; cursor: default;
  background: var(--surface-elevated); color: var(--ink);
  transition: background-color .45s var(--ease), color .45s var(--ease), opacity .9s var(--ease), transform 1s var(--ease-out);
}
.js .lvl.reveal { transition: background-color .45s var(--ease), color .45s var(--ease), opacity .9s var(--ease), transform 1s var(--ease-out); }
.lvl-text { position: relative; z-index: 1; max-width: 460px; }
.lvl h3 { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 2.5vw, 32px); letter-spacing: -.025em; line-height: 1.15; }
.lvl-sub { margin-top: var(--s2); font-size: 16px; line-height: 1.45; color: var(--ink-secondary); transition: color .45s var(--ease); }

/* Contenido extra: la fila crece de 0 a su alto natural sin saltos */
.lvl-more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease-out); }
.lvl-more-inner { overflow: hidden; min-height: 0; }
.lvl .checks { display: grid; gap: var(--s3); padding-top: var(--s5); opacity: 0; transition: opacity .35s var(--ease); }
.lvl .checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 16px; color: inherit; }
.lvl .checks .ico { color: currentColor; margin-top: 3px; width: 17px; height: 17px; flex: none; }

/* Imagen: aparece al abrirse, entre el texto y el botón */
.lvl-media {
  position: absolute; top: 20px; bottom: 20px; right: 190px; width: min(300px, 28%);
  border-radius: 8px; overflow: hidden; opacity: 0; transition: opacity .45s var(--ease);
}
.lvl-media img { width: 100%; height: 100%; object-fit: cover; }

/* Botón: texto en reposo, píldora blanca cuando el bloque está activo */
.lvl-cta {
  position: relative; z-index: 1; flex: none; display: inline-flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 20px; border-radius: var(--r-pill);
  font-size: 14px; font-weight: 500; color: var(--ink); background: transparent;
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.lvl-cta .ico { width: 16px; height: 16px; }

/* Estado activo */
.lvl:hover, .lvl:focus-within, .lvl.open { background: var(--brand-primary); color: var(--surface-elevated); }
.lvl:hover .lvl-sub, .lvl:focus-within .lvl-sub, .lvl.open .lvl-sub { color: rgba(255, 255, 255, .85); }
.lvl:hover .lvl-more, .lvl:focus-within .lvl-more, .lvl.open .lvl-more { grid-template-rows: 1fr; }
.lvl:hover .checks, .lvl:focus-within .checks, .lvl.open .checks { opacity: 1; transition-delay: .15s; }
.lvl:hover .lvl-media, .lvl:focus-within .lvl-media, .lvl.open .lvl-media { opacity: 1; transition-delay: .12s; }
.lvl:hover .lvl-cta, .lvl:focus-within .lvl-cta, .lvl.open .lvl-cta { background: var(--surface-elevated); color: var(--brand-primary); }
.lvl .lvl-cta:hover, .lvl .lvl-cta:focus-visible { background: var(--brand-tint); color: var(--brand-primary); }
.lvl:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 3px; }

@media (max-width: 900px) {
  .lvl { padding: var(--s5); }
  .lvl-media { display: none; }
  .lvl-text { max-width: none; }
}
@media (max-width: 560px) {
  .lvl-cta { width: 44px; padding: 0; justify-content: center; }
  .lvl-cta span { display: none; }
}


/* Puente tesis tecnológicas */
.techband {
  position: relative; overflow: hidden; isolation: isolate;
  margin-top: var(--s7); display: flex; align-items: center; justify-content: space-between; gap: var(--s6);
  padding: 40px 44px; border-radius: var(--r-card);
  background: var(--dk-surface); color: var(--dk-ink);
  transition: transform .5s var(--ease-out), box-shadow .5s var(--ease);
}
.techband:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -30px rgba(66, 51, 206, .6); }
.techband h3 { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.8vw, 34px); letter-spacing: -.025em; line-height: 1.12; max-width: 640px; }
.techband-sub { margin-top: var(--s3); font-size: 16px; color: var(--dk-ink-secondary); min-height: 24px; }
/* Texto completo solo para lectores de pantalla; a la vista va la animación de escritura */
.typer-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.typer-caret { display: inline-block; width: 2px; height: 1.05em; margin-left: 3px; vertical-align: -.15em; background: var(--dk-primary); animation: typerCaret 1s steps(1) infinite; }
@keyframes typerCaret { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .typer-caret { display: none; } }
.techband-btn {
  flex: none; display: inline-flex; align-items: center; gap: 10px; height: 52px; padding: 0 22px;
  border-radius: var(--r-btn); border: 1.5px solid var(--surface-elevated); background: var(--surface-elevated); color: var(--ink); font-weight: 600;
  transition: background-color .3s, color .3s;
}
.techband:hover .techband-btn { background: var(--dk-primary); color: var(--dk-surface); }
@media (max-width: 860px) {
  .techband { flex-direction: column; align-items: flex-start; padding: 28px 24px; }
  .techband-btn { width: 100%; justify-content: center; }
}

/* ==========================================================================
   PROCESO — cuatro tarjetas verticales sobre fondo casi negro
   ========================================================================== */
.process-section { background: #0A0A0A; color: var(--dk-ink); overflow: clip; }

/* Encabezado: título a la izquierda en dos líneas, texto de apoyo a la derecha */
.process-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s7); margin-bottom: var(--s7); }
.process-head .h2 { color: var(--surface-elevated); }
.process-head p { max-width: 400px; text-align: right; font-size: 18px; line-height: 1.45; color: rgba(var(--dk-ink-rgb), .55); }

.pcards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.pcard {
  position: relative; overflow: hidden; isolation: isolate;
  aspect-ratio: 285 / 452; border-radius: var(--r-card);
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 0 var(--s5) 40px var(--s6); color: var(--surface-elevated);
  background: linear-gradient(165deg, #5A4AEC 0%, var(--brand-primary) 55%, var(--brand-primary-hover) 100%);
}
.pcard-image { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; object-position: var(--image-position, center); filter: saturate(.82) brightness(.78); transition: transform .8s var(--ease-out), filter .5s var(--ease); }
.pcard:hover .pcard-image { transform: scale(1.045); filter: saturate(.95) brightness(.86); }
.pcard::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(20, 18, 31, .12) 0%, rgba(29, 25, 76, .18) 34%, rgba(20, 18, 31, .9) 100%), linear-gradient(135deg, rgba(66, 51, 206, .2), transparent 62%);
}
.pcard:nth-child(1) { --image-position: 54% center; }
.pcard:nth-child(2) { --image-position: 36% center; }
.pcard:nth-child(3) { --image-position: 50% center; }
.pcard:nth-child(4) { --image-position: 68% center; }

.pcard-num {
  position: absolute; top: 9%; right: 14%;
  font-size: clamp(56px, 6.4vw, 92px); font-weight: 600; line-height: 1; letter-spacing: -.04em;
}
.pcard h3 { font-family: var(--font-display); font-size: clamp(19px, 1.6vw, 23px); font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.pcard p { margin-top: var(--s3); font-size: 16px; font-weight: 500; line-height: 1.45; }
.pcard-out { display: block; margin-top: var(--s4); font-size: 16px; font-weight: 500; color: rgba(255, 255, 255, .72); }

/* Sección fijada (pantallas grandes): la sección mide 3 pantallas de alto y su contenido
   se queda fijo y centrado. El scroll de esas pantallas extra es el que trae las tarjetas
   02, 03 y 04 desde abajo, una por una. main.js calcula la posición (--y) */
.process-section.is-pinned { height: 300vh; padding: 0; overflow: visible; }
.process-section.is-pinned .process-pin {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center; padding-top: 56px;
}
.process-section.is-pinned .process-head { margin-bottom: clamp(24px, 4.5vh, 48px); }
.process-section.is-pinned .pcard {
  aspect-ratio: auto; height: min(452px, 30vw, calc(100svh - 330px)); min-height: 320px;
  transform: translate3d(0, var(--y, 0px), 0); will-change: transform;
}
/* En tarjetas bajas el número deja de flotar y ocupa su propio espacio arriba, para no pisar los títulos largos */
.process-section.is-pinned .pcard-num { position: static; align-self: flex-end; margin: 24px 0 auto; font-size: clamp(48px, 5vw, 84px); }

@media (max-width: 1000px) {
  .pcards { grid-template-columns: 1fr 1fr; }
  .pcard { aspect-ratio: 4 / 5; padding: 0 var(--s5) var(--s6) var(--s6); }
  .pcard-num { font-size: 84px; }
}
@media (max-width: 760px) {
  .process-head { flex-direction: column; align-items: flex-start; gap: var(--s4); }
  .process-head p { text-align: left; max-width: none; }
}
@media (max-width: 560px) {
  .pcards { grid-template-columns: 1fr; gap: var(--s4); }
  .pcard { aspect-ratio: auto; min-height: 320px; padding: 0 var(--s5) var(--s6); }
  .pcard-num { top: 24px; right: 24px; font-size: 72px; }
}

/* ==========================================================================
   DRA. ROSSANA — encabezado centrado, imagen grande a la izquierda, información a la derecha
   ========================================================================== */
.doctor-head { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: var(--s8); }
/* Etiqueta en píldora sobre el título */
.tag-pill {
  display: inline-flex; align-items: center; gap: var(--s2); margin-bottom: var(--s5);
  padding: 7px 14px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface-elevated);
  font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
}
.tag-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-primary); }
.doctor-title { font-family: var(--font-display); font-weight: var(--title-weight); font-size: var(--title-size); line-height: var(--title-leading); letter-spacing: var(--title-tracking); }

.doctor { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(32px, 6vw, 96px); align-items: center; }

/* Imagen grande, con el botón apoyado en su esquina inferior izquierda */
.portrait-wrap { position: relative; }
.portrait { position: relative; aspect-ratio: 5 / 6; border-radius: var(--r-card); overflow: hidden; background: var(--brand-secondary); }
.portrait img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 42%; }
.portrait-caption { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 1; color: rgba(255,255,255,.92); font-size: 14px; line-height: 1.35; text-shadow: 0 1px 10px rgba(0,0,0,.6); }
.portrait::after { content: ""; position: absolute; inset: 40% 0 0; background: linear-gradient(180deg, transparent, rgba(20,18,31,.64)); pointer-events: none; }
.portrait-ph {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s3);
  background: linear-gradient(160deg, #2C2680, var(--brand-secondary)); color: var(--dk-ink);
}
.portrait-ph span { font-size: clamp(64px, 9vw, 120px); font-weight: 500; letter-spacing: -.05em; line-height: 1; }
.portrait-ph small { font-size: 16px; color: var(--dk-ink-secondary); }
.portrait-cta { position: absolute; left: var(--s5); bottom: var(--s5); background: var(--surface-elevated); color: var(--ink); }
.portrait-cta:hover, .portrait-cta:focus-visible { background: var(--brand-primary); color: var(--surface-elevated); }

/* Información */
.doctor-name { font-family: var(--font-display); font-weight: 700; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -.02em; line-height: 1.15; }
.doctor-intro { margin-top: var(--s4); font-size: 18px; line-height: 1.55; color: var(--ink-secondary); max-width: 46ch; }
.doctor-points { display: grid; gap: var(--s6); margin-top: var(--s7); }
.doctor-points li { display: grid; grid-template-columns: 24px 1fr; column-gap: var(--s3); }
.doctor-points .ico { width: 20px; height: 20px; margin-top: 3px; color: var(--brand-primary); }
.doctor-points h4 { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; }
.doctor-points p { grid-column: 2; margin-top: 6px; font-size: 16px; line-height: 1.5; color: var(--ink-secondary); max-width: 42ch; }

/* Perfiles verificables: fila compacta de enlaces */
.creds { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s7); }
.cred {
  display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px;
  border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface-elevated);
  font-size: 14px; font-weight: 500; transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.cred .ico { width: 15px; height: 15px; color: var(--ink-secondary); transition: color .25s var(--ease); }
.cred:hover, .cred:focus-visible { border-color: var(--brand-primary); background: var(--brand-primary); color: var(--surface-elevated); }
.cred:hover .ico, .cred:focus-visible .ico { color: var(--surface-elevated); }
/* Botón solo con ícono (LinkedIn) */
.cred--icon { width: 40px; padding: 0; justify-content: center; color: var(--brand-primary); }
.cred--icon svg { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .doctor-head { margin-bottom: var(--s7); }
  .doctor { grid-template-columns: 1fr; gap: var(--s7); }
  .portrait { aspect-ratio: 4 / 5; }
}

/* ==========================================================================
   CIFRAS
   ========================================================================== */
.stats-band { background: var(--brand-primary); color: #fff; padding: var(--s7) 0; position: relative; overflow: hidden; }
.stats { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: 8px var(--s5); border-left: 1px solid rgba(255, 255, 255, .22); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat-n { font-size: clamp(44px, 5.5vw, 72px); font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.stat-n .plus { color: var(--dk-primary); }
.stat p:last-child { margin-top: var(--s2); font-size: 16px; opacity: .82; }
@media (max-width: 800px) {
  .stats { grid-template-columns: 1fr 1fr; row-gap: var(--s6); }
  .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}

/* ==========================================================================
   COMPARATIVA
   ========================================================================== */
.compare { display: grid; grid-template-columns: 1fr 1.08fr; gap: var(--s4); align-items: stretch; max-width: 1000px; margin: 0 auto; }
.compare-col { border-radius: var(--r-card); padding: 36px; }
.compare-title { font-size: 16px; text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--s5); }
.compare-col ul { display: grid; gap: var(--s4); }
.compare-col li { display: flex; gap: 12px; align-items: flex-start; font-size: 16.5px; }
.compare-col .ico { margin-top: 3px; }
.them { background: transparent; border: 1px dashed #CFC9BC; color: var(--ink-secondary); }
.them .ico { color: #B4533A; }
.us { background: var(--brand-secondary); color: var(--dk-ink); box-shadow: 0 40px 80px -40px rgba(29, 25, 76, .6); position: relative; overflow: hidden; }
.us::after { content: ""; position: absolute; width: 380px; height: 380px; right: -140px; top: -140px; border-radius: 50%; background: radial-gradient(circle, rgba(141, 128, 255, .35), transparent 65%); }
.us .compare-title { color: var(--dk-primary); }
.us .ico { color: var(--dk-primary); }
@media (max-width: 800px) { .compare { grid-template-columns: 1fr; } .compare-col { padding: 28px 24px; } }


/* ==========================================================================
   FAQ — encabezado centrado, filtros en píldora y tarjetas que se abren al pasar el mouse
   ========================================================================== */
.faq-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--s4); }
.faq-head .muted { max-width: 100%; text-wrap: balance; }

.faq-filters { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s2); margin-top: var(--s7); }
.faq-filter {
  height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface-elevated); color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.faq-filter:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.faq-filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface-elevated); }

.faq { display: grid; gap: var(--s3); max-width: 900px; margin: var(--s7) auto 0; }
.faq-item {
  border-radius: var(--r-card); background: var(--surface-elevated); color: var(--ink);
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.faq-item[hidden] { display: none; }
.faq-item h3 { margin: 0; font: inherit; }
.faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  padding: 18px 20px 18px 24px; border: 0; background: none; color: inherit; text-align: left; cursor: pointer;
  font-family: var(--font-display); font-weight: 600; font-size: 18px; letter-spacing: -.01em; line-height: 1.3;
  border-radius: var(--r-card);
}
/* Botón redondo con + que pasa a − al abrir */
.faq-icon {
  position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%;
  background: var(--ink); color: var(--surface-elevated);
  transition: background-color .35s var(--ease), color .35s var(--ease);
}
.faq-icon::before, .faq-icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px;
  border-radius: 2px; background: currentColor; transition: transform .35s var(--ease-out);
}
.faq-icon::after { transform: rotate(90deg); }

.faq-a-inner { padding: 0 76px 0 24px; font-size: 16px; line-height: 1.55; }
/* el aire inferior va como bloque interno para que la respuesta plegada mida cero */
.faq-a-inner::after { content: ""; display: block; height: 22px; }
.faq-ask { display: inline-block; margin-top: var(--s3); font-size: 16px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

/* Con JavaScript las respuestas arrancan plegadas; sin él quedan todas visibles */
.js .faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease-out); }
.js .faq-a-inner { overflow: hidden; min-height: 0; opacity: 0; transition: opacity .3s var(--ease); }
.js .faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.js .faq-item.is-open .faq-a-inner { opacity: 1; }
.faq-item.is-open { background: var(--brand-primary); color: var(--surface-elevated); }
.faq-item.is-open .faq-icon { background: var(--surface-elevated); color: var(--ink); }
.faq-item.is-open .faq-icon::after { transform: rotate(0deg); }
.faq-item.is-open .faq-q:focus-visible { outline-color: var(--surface-elevated); }


@media (max-width: 700px) {
  .faq-filters { margin-top: var(--s6); }
  .faq { margin-top: var(--s6); }
  .faq-q { padding: 16px 14px 16px 18px; font-size: 17px; gap: var(--s4); }
  .faq-a-inner { padding: 0 18px; }
}

/* ==========================================================================
   CTA FINAL
   ========================================================================== */
.final {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--brand-secondary); color: var(--dk-ink); text-align: left;
  padding: 140px 0;
}
.final-glow { display: none; } /* resplandor violeta decorativo: retirado */
.final-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .92fr); gap: clamp(36px, 7vw, 96px); align-items: center; }
.final-copy { display: flex; flex-direction: column; align-items: flex-start; }
/* El cierre va un escalón por encima del resto de titulares (≈ +20%), sin llegar a tamaño de cartel */
.final-title { font-family: var(--font-display); font-weight: var(--title-weight); font-size: clamp(38px, 5.6vw, 70px); line-height: var(--title-leading); letter-spacing: var(--title-tracking); }
.final-lead { color: var(--dk-ink-secondary); font-size: 19px; max-width: 520px; margin: var(--s5) 0 var(--s6); }
.final-note { margin-top: var(--s4); font-size: 16px; color: var(--dk-ink-secondary); }
.final-visual { position: relative; min-height: 500px; margin: 0 -4vw 0 0; overflow: visible; background: transparent; }
.final-visual img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 72% center; filter: saturate(.9) brightness(.82); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 24%, #000 78%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0%, #000 24%, #000 78%, transparent 100%); }
.final-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--brand-secondary) 0%, transparent 43%), linear-gradient(0deg, var(--brand-secondary) 0%, transparent 28%, transparent 78%, var(--brand-secondary) 100%); pointer-events: none; }
.final-visual figcaption { position: absolute; right: 5%; bottom: 7%; z-index: 1; color: rgba(255,255,255,.78); font-size: 12px; }
@media (max-width: 760px) { .final { padding: 96px 0; } .final-inner { grid-template-columns: 1fr; gap: var(--s3); } .final .btn { width: 100%; } .final-visual { min-height: 300px; margin: -16px -6vw 0; } .final-visual img { -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 19%, #000 76%, transparent 100%); mask-image: linear-gradient(180deg, transparent 0%, #000 19%, #000 76%, transparent 100%); } .final-visual::after { background: linear-gradient(180deg, var(--brand-secondary) 0%, transparent 30%, transparent 68%, var(--brand-secondary) 100%); } }

/* ==========================================================================
   FOOTER — marca arriba, columnas de enlaces, contacto con icono y marca gigante al pie
   ========================================================================== */
/* Degradado vertical: casi negro arriba (#151515) → índigo de marca abajo */
.footer { background: linear-gradient(180deg, #151515 0%, var(--brand-secondary) 100%); color: var(--surface-elevated); padding: var(--s8) 0 0; overflow: hidden; }
.footer-tag { margin-top: var(--s3); font-size: 16px; max-width: 320px; }
/* Entrada del footer: cada elemento aparece desde la penumbra y sube un poco, uno tras otro.
   Se usa una animación (no una transición) para no retrasar los efectos al pasar el mouse */
.footer.f-ready .f-item { opacity: 0; }
.footer.f-ready.f-in .f-item { animation: footerIn .8s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 55ms); }
@keyframes footerIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Fila superior: marca a la izquierda y redes a la derecha, alineadas con la columna de contacto */
.footer-brand { display: grid; grid-template-columns: 1fr 1fr 1fr 1.7fr; column-gap: var(--s6); align-items: start; }
.footer-about { grid-column: 1 / span 3; }
.footer-follow-h { font-size: 18px; font-weight: 600; }
.footer-social { display: flex; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s4); }
.footer .footer-social li a {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: var(--r-chip);
  background: var(--surface-elevated); color: var(--brand-primary);
  transition: background-color .25s var(--ease), color .25s var(--ease);
}
.footer-social svg { width: 20px; height: 20px; }
.footer .footer-social li a:hover, .footer .footer-social li a:focus-visible { background: var(--brand-primary); color: var(--surface-elevated); }

/* Columnas: título en gris, enlaces en blanco */
.footer-cols { display: grid; grid-template-columns: 1fr 1fr 1fr 1.7fr; gap: var(--s7) var(--s6); margin-top: 76px; align-items: start; }
.footer-col { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; font-size: 16px; }
.footer-h { font-size: 18px; font-weight: 500; color: var(--dk-ink-secondary); margin-bottom: 6px; }
/* Accionables: blancos, y al pasar el mouse el texto toma el violeta claro de la marca */
.footer-col > a { color: var(--surface-elevated); transition: color .3s var(--ease); }
.footer-col > a:not(.footer-contact):hover, .footer-col > a:not(.footer-contact):focus-visible { color: var(--dk-primary); }

/* Contacto: icono a la izquierda; dato y nota a la derecha. El icono se queda siempre blanco */
.footer-contact { display: flex; align-items: center; gap: 14px; }
.footer-contact svg { flex: none; width: 22px; height: 22px; }
.fc-text { display: flex; flex-direction: column; }
.fc-main { font-size: 17px; overflow-wrap: anywhere; transition: color .3s var(--ease); }
.footer-contact:hover .fc-main, .footer-contact:focus-visible .fc-main { color: var(--dk-primary); }


/* Marca gigante al pie: azul morado de la marca que se funde hacia abajo */
.footer-word-wrap { container-type: inline-size; margin-top: var(--s7); }
.footer-word {
  display: block; font-family: var(--font-display); font-weight: 800; font-size: 30.4cqw; line-height: .8; letter-spacing: -.04em;
  /* "veraver" no tiene letras altas: se sube para compensar el aire vacío sobre las minúsculas */
  white-space: nowrap; margin-top: -.2em; margin-bottom: -.06em; user-select: none; pointer-events: none;
  background: linear-gradient(180deg, #5A4AEC 0%, var(--brand-primary) 40%, rgba(var(--brand-primary-rgb), 0) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

@media (max-width: 900px) {
  .footer-brand { grid-template-columns: 1fr; row-gap: var(--s6); }
  .footer-about { grid-column: auto; }
  .footer-cols { grid-template-columns: 1fr 1fr; margin-top: var(--s7); }
  .footer-col-contact { grid-column: 1 / -1; }
}
@media (max-width: 480px) { .footer-cols { column-gap: var(--s5); } }

/* ==========================================================================
   BOTÓN FLOTANTE WHATSAPP — sutil
   ========================================================================== */
.fab {
  position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 40;
  height: 48px; min-width: 48px; padding: 0 14px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; justify-content: center; gap: 0;
  background: rgba(255, 255, 255, .92); color: var(--ink); border: 1px solid var(--border);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 10px 28px -12px rgba(29, 25, 76, .45);
  font-size: 14px; font-weight: 600;
  opacity: 0; transform: translateY(16px) scale(.9); pointer-events: none;
  transition: opacity .4s var(--ease), transform .5s var(--ease-out), gap .35s var(--ease), box-shadow .3s;
}
.fab .ico { width: 21px; height: 21px; color: #25A366; }
.fab-label { max-width: 0; overflow: hidden; white-space: nowrap; transition: max-width .45s var(--ease-out); }
.fab.show { opacity: 1; transform: none; pointer-events: auto; }
.fab:hover, .fab:focus-visible { gap: 8px; box-shadow: 0 14px 34px -12px rgba(29, 25, 76, .55); }
.fab:hover .fab-label, .fab:focus-visible .fab-label { max-width: 110px; }
@media (max-width: 480px) { .fab { right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); } }

/* ==========================================================================
   BOTONES Y ACCIONABLES — tamaño único
   44px de alto, texto 14px medium, forma de píldora
   ========================================================================== */
.btn, .btn-sm, .btn-lg,
.nav a.nav-cta, .techband-btn, .btn-text {
  height: 44px; padding: 0 20px; gap: 8px;
  font-size: 14px; font-weight: 500; letter-spacing: 0;
  border-radius: var(--r-pill);
}
.btn .ico, .nav a.nav-cta .ico, .techband-btn .ico, .btn-text .ico { width: 16px; height: 16px; }
.nav a.nav-cta { margin-left: 4px; }
.fab { height: 44px; min-width: 44px; font-size: 14px; font-weight: 500; }
.fab .ico { width: 20px; height: 20px; }

/* Hover: el botón no se mueve; cambia el fondo y el texto pasa al blanco del sistema */
.btn, .btn:hover, .nav a.nav-cta, .techband-btn, .btn-text,
.btn .ico, .nav a.nav-cta .ico, .btn-text .ico, .techband-btn .ico { transform: none !important; }
.btn, .nav a.nav-cta, .techband-btn, .btn-text, .fab {
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.btn-light:hover, .btn-light:focus-visible,
.nav a.nav-cta:hover, .nav a.nav-cta:focus-visible,
.header-cta:hover, .header-cta:focus-visible {
  background: var(--brand-primary); color: var(--surface-elevated);
  box-shadow: 0 10px 28px -12px rgba(66, 51, 206, .8);
}
.btn-primary:hover, .btn-primary:focus-visible,
.site-header.is-pill .nav a.nav-cta:hover, .site-header.is-pill .header-cta:hover,
.menu-open .site-header .header-cta:hover {
  background: var(--brand-primary-hover); color: var(--surface-elevated);
}
.btn-outline:hover, .btn-outline:focus-visible { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--surface-elevated); }
.btn-ghost-light:hover, .btn-ghost-light:focus-visible { background: rgba(255, 255, 255, .08); border-color: var(--dk-primary); color: var(--surface-elevated); }
.btn-text:hover, .btn-text:focus-visible { background: rgba(255, 255, 255, .08); color: var(--surface-elevated); }
.techband:hover .techband-btn, .techband-btn:hover { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--surface-elevated); }
.fab:hover, .fab:focus-visible { background: var(--brand-primary); border-color: var(--brand-primary); color: var(--surface-elevated); }
.fab:hover .ico, .fab:focus-visible .ico { color: var(--surface-elevated); }

/* Enlaces de acción dentro de tarjetas y listas */
.nav { font-size: 14px; }
.card-link, .level-link, .cred { font-size: 14px; font-weight: 500; }
.card-link .ico, .level-link .ico { width: 16px; height: 16px; }

/* ==========================================================================
   REVEAL
   ========================================================================== */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform 1s var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* Movimiento reducido: sólo se apagan los efectos intrusivos */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-bg, .id-card { animation: none !important; }
  .pcard-image { transition: none; }
  /* Sin rueda: los cinco logos quedan fijos y centrados */
  .partners-grid { animation: none; width: auto; flex-wrap: wrap; justify-content: center; row-gap: var(--s4); }
  .partners-grid li[aria-hidden="true"] { display: none; }
  .partners-grid li:nth-child(5) { margin-right: 0; }
  .partners-marquee { -webkit-mask-image: none; mask-image: none; }
  .js .reveal { transform: none; }
}

/* ==========================================================================
   TESIS ESPECIALIZADAS (tesis-tecnologicas.html)
   Usa las mismas piezas del inicio; aquí solo lo propio de esta página
   ========================================================================== */
/* Hero con su propia foto de fondo (REFERENCIA: reemplazar por imagen definitiva) */
.hero--tech .hero-bg { background-image: url("../assets/img/fotos/tesis-tecnologicas-hero.jpg?v=20261016"); background-position: center 40%; }
/* Alineado a la izquierda, como la v2 */
.hero--tech .hero-inner { align-items: flex-start; text-align: left; }
.hero--tech .hero-ctas { justify-content: flex-start; }
.hero--tech .hero-lead { max-width: 560px; }
/* Titular en tres líneas: la última se escribe y se borra (un sistema, una app, un modelo, un artefacto) */
.hero--tech .hero-title { font-size: clamp(38px, 7vw, 104px); line-height: .94; letter-spacing: -.05em; }
.hero--tech .hero-title .line:last-child { min-height: 1.04em; }
.hero--tech .hero-title .typer-caret {
  display: inline-block; width: .06em; height: .82em; margin-left: .06em; vertical-align: -.04em;
  background: var(--dk-primary); animation: typerCaret 1s steps(1) infinite;
}
/* Idea → Investigación → Producto */
.tech-signal { display: flex; align-items: center; justify-content: flex-start; flex-wrap: wrap; gap: 14px; margin-top: 56px; }
.tech-signal li {
  display: flex; align-items: center; gap: 14px;
  font-size: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(243, 241, 234, .75);
}
.tech-signal li + li::before { content: ""; width: clamp(28px, 6vw, 72px); height: 1.5px; background: linear-gradient(90deg, rgba(var(--dk-primary-rgb), .2), var(--dk-primary)); }

/* ---------- Secciones propias de esta página (no reutilizan las del inicio) ---------- */
.tsec { padding: var(--s9) 0; scroll-margin-top: 80px; }
.tsec--light { background: var(--surface); }
.tsec--light + .tsec--light { padding-top: 0; }
.tsec--dark { background: var(--dk-surface); color: var(--dk-ink); }
@media (max-width: 760px) { .tsec { padding: 72px 0; } }

/* Cabecera de sección: número y rótulo, titular a la izquierda y bajada a la derecha */
.thead { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: var(--s5) var(--s8); align-items: end; margin-bottom: var(--s8); }
.tlabel {
  display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s5);
  font-size: 16px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--brand-primary);
}
.tsec--dark .tlabel { color: var(--dk-primary); }
.tlabel-num {
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--r-pill);
  border: 1.5px solid currentColor; letter-spacing: 0;
}
.tsec--dark .h2 { color: var(--dk-ink); }
.thead-lead { font-size: 18px; line-height: 1.55; color: var(--ink-secondary); max-width: 46ch; padding-bottom: 6px; }
.tsec--dark .thead-lead { color: var(--dk-ink-secondary); }
@media (max-width: 860px) { .thead { grid-template-columns: 1fr; margin-bottom: var(--s7); } }

/* 01 · Para quién es: rótulo a la izquierda, contenido a la derecha, entre dos líneas */
.tqualify {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: var(--s5) var(--s8);
  padding: var(--s7) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.tqualify-label { font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.02em; color: var(--brand-primary); }
.ttags { display: flex; flex-wrap: wrap; gap: var(--s3); }
.ttags li {
  padding: 10px 20px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface-elevated);
  font-size: 18px; font-weight: 600; color: var(--ink);
}
.tqualify-body > p { margin-top: var(--s5); font-size: 18px; line-height: 1.55; color: var(--ink-secondary); max-width: 52ch; }
@media (max-width: 760px) { .tqualify { grid-template-columns: 1fr; } }

/* 02 · Metodologías: cuatro fichas con rótulo, descripción y cuándo usarla */
.tmethods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4); }
.tmethod {
  display: flex; flex-direction: column; padding: var(--s6);
  border-radius: var(--r-card); background: rgba(255, 255, 255, .03); border: 1px solid var(--dk-border);
  transition: border-color .35s var(--ease), background-color .35s var(--ease);
}
.tmethod:hover { border-color: var(--dk-primary); background: rgba(var(--dk-primary-rgb), .07); }
.tmethod-tag { font-size: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--dk-primary); }
.tmethod h3 { margin-top: var(--s5); font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.025em; line-height: 1.1; color: var(--dk-ink); }
.tmethod > p:not(.tmethod-tag):not(.tmethod-when) { margin-top: var(--s3); font-size: 17px; line-height: 1.55; color: var(--dk-ink-secondary); max-width: 44ch; }
.tmethod-when { margin-top: auto; padding-top: var(--s6); font-size: 16px; line-height: 1.5; color: var(--dk-ink); }
.tmethod-when::before { content: ""; display: block; height: 1px; background: var(--dk-border); margin-bottom: var(--s4); }
.tmethod-when strong { color: var(--dk-primary); font-weight: 600; }
.tnote { margin-top: var(--s6); font-size: 16px; color: var(--dk-ink-secondary); }
@media (max-width: 760px) { .tmethods { grid-template-columns: 1fr; } .tmethod { padding: var(--s5); } }

/* 03 · Investigación y desarrollo: cuatro pasos encadenados con flechas */
.tflow { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s4); counter-reset: none; }
.tflow-step {
  position: relative; padding: var(--s6) var(--s5);
  border-radius: var(--r-card); background: var(--surface-elevated); border-top: 3px solid var(--brand-primary);
}
.tflow-step:not(:last-child)::after {
  content: "→"; position: absolute; right: -17px; top: 50%; transform: translateY(-50%); z-index: 1;
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand-primary); color: #fff; font-size: 16px; font-weight: 600;
}
.tflow-num { font-size: 16px; font-weight: 600; color: var(--brand-primary); }
.tflow-step h3 { margin-top: var(--s4); font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.02em; }
.tflow-step p { margin-top: var(--s2); font-size: 16px; line-height: 1.5; color: var(--ink-secondary); }
@media (max-width: 900px) {
  .tflow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tflow-step:nth-child(2)::after { display: none; }
}
@media (max-width: 560px) {
  .tflow { grid-template-columns: 1fr; gap: var(--s5); }
  .tflow-step:not(:last-child)::after { content: "↓"; right: auto; left: 50%; top: auto; bottom: -21px; transform: translateX(-50%); display: grid; }
}

/* 04 · Proceso: cuatro columnas separadas por líneas */
.tsteps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--dk-border); }
.tsteps li { padding: var(--s6) var(--s5) var(--s4); border-left: 1px solid var(--dk-border); }
.tsteps li:first-child { border-left: 0; padding-left: 0; }
.tsteps-num { font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--dk-primary); }
.tsteps h3 { margin-top: var(--s4); font-size: clamp(22px, 2vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; color: var(--dk-ink); }
.tsteps p { margin-top: var(--s3); font-size: 16px; line-height: 1.55; color: var(--dk-ink-secondary); }
@media (max-width: 900px) {
  .tsteps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsteps li:nth-child(3) { border-left: 0; padding-left: 0; }
  .tsteps li:nth-child(n+3) { border-top: 1px solid var(--dk-border); }
}
@media (max-width: 560px) {
  .tsteps { grid-template-columns: 1fr; }
  .tsteps li { border-left: 0; padding-left: 0; border-top: 1px solid var(--dk-border); }
  .tsteps li:first-child { border-top: 0; }
}

/* 05 · Preguntas: lista sobria con líneas divisorias */
.tfaq { border-top: 1px solid var(--border); }
.tfaq details { border-bottom: 1px solid var(--border); }
.tfaq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--s5);
  padding: 26px 0; font-size: clamp(19px, 1.7vw, 23px); font-weight: 600; letter-spacing: -.015em; line-height: 1.3;
  transition: color .3s var(--ease);
}
.tfaq summary::-webkit-details-marker { display: none; }
.tfaq summary:hover { color: var(--brand-primary); }
.tfaq-icon { position: relative; flex: none; width: 36px; height: 36px; border-radius: 50%; border: 1.5px solid var(--border); transition: background-color .3s var(--ease), border-color .3s var(--ease); }
.tfaq-icon::before, .tfaq-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; margin: -1px 0 0 -6px; border-radius: 2px; background: var(--brand-primary); transition: transform .35s var(--ease-out), background-color .3s var(--ease); }
.tfaq-icon::after { transform: rotate(90deg); }
.tfaq details[open] .tfaq-icon { background: var(--brand-primary); border-color: var(--brand-primary); }
.tfaq details[open] .tfaq-icon::before, .tfaq details[open] .tfaq-icon::after { background: #fff; }
.tfaq details[open] .tfaq-icon::after { transform: rotate(0deg); }
.tfaq details p { padding: 0 64px 28px 0; font-size: 17px; line-height: 1.6; color: var(--ink-secondary); max-width: 70ch; }
.tfaq details[open] p { animation: tfaqIn .45s var(--ease-out); }
@keyframes tfaqIn { from { opacity: 0; transform: translateY(-6px); } }
.tfaq a { color: var(--brand-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .tfaq details p { padding-right: 0; } }

/* Cierre: titular a la izquierda, texto y botón a la derecha */
.tending { padding: var(--s9) 0; }
.tending-inner { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: var(--s6) var(--s8); align-items: end; }
.tending-title { font-family: var(--font-display); font-weight: var(--title-weight); font-size: clamp(38px, 5.6vw, 70px); line-height: var(--title-leading); letter-spacing: var(--title-tracking); color: var(--dk-ink); }
.tending-side p { font-size: 18px; line-height: 1.55; color: var(--dk-ink-secondary); margin-bottom: var(--s6); max-width: 42ch; }
@media (max-width: 860px) { .tending-inner { grid-template-columns: 1fr; } .tending-side .btn { width: 100%; } }
/* ==========================================================================
   BLOG (blog.html y blog/*.html)
   Usa las cabeceras y el cierre de las páginas internas (.tsec, .thead, .tlabel, .tending)
   ========================================================================== */
/* Portada corta de páginas internas */
.phero {
  position: relative; overflow: hidden; isolation: isolate;
  background: var(--dk-surface); color: var(--dk-ink);
  padding: calc(96px + var(--s9)) 0 var(--s9);
}
.phero::after {
  content: ""; position: absolute; z-index: -1; right: -12%; top: -30%; width: 60vw; height: 60vw; border-radius: 50%;
  background: radial-gradient(circle, rgba(var(--dk-primary-rgb), .22), transparent 62%); pointer-events: none;
}
.phero .tlabel { color: var(--dk-primary); }
.phero-title {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(42px, 6.4vw, 92px);
  line-height: .98; letter-spacing: -.045em; max-width: 14ch;
}
.phero-title em { font-style: normal; color: var(--dk-primary); }
.phero-lead { margin-top: var(--s5); max-width: 52ch; font-size: 19px; line-height: 1.55; color: var(--dk-ink-secondary); }

/* Meta de artículo y enlace con flecha */
.bmeta { font-size: 16px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--brand-primary); }
.blink { display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 600; color: var(--brand-primary); }
.blink .ico { width: 18px; height: 18px; transition: transform .35s var(--ease-out); }

/* Artículo destacado: imagen a la izquierda, texto a la derecha */
.bfeat {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); overflow: hidden;
  border-radius: var(--r-card); background: var(--surface-elevated);
  transition: box-shadow .4s var(--ease);
}
.bfeat:hover { box-shadow: 0 30px 60px -36px rgba(29, 25, 76, .45); }
.bfeat:hover .blink .ico { transform: translateX(4px); }
.bfeat-media { position: relative; min-height: 360px; overflow: hidden; }
.bfeat-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.bfeat:hover .bfeat-media img { transform: scale(1.04); }
.bfeat-flag {
  position: absolute; left: var(--s5); bottom: var(--s5); padding: 6px 14px; border-radius: var(--r-pill);
  background: var(--surface-elevated); color: var(--ink); font-size: 16px; font-weight: 600;
}
.bfeat-copy { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s4); padding: var(--s7) var(--s6); align-self: center; }
.bfeat-copy h3 { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -.03em; line-height: 1.08; }
.bfeat-copy > p:not(.bmeta) { font-size: 17px; line-height: 1.6; color: var(--ink-secondary); max-width: 46ch; }
@media (max-width: 860px) { .bfeat { grid-template-columns: 1fr; } .bfeat-media { min-height: 240px; } .bfeat-copy { padding: var(--s6) var(--s5); } }

/* Filtros por tema */
.btoolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s4); margin: var(--s8) 0 var(--s6); }
.btoolbar h3 { font-size: clamp(24px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.02em; }
.bfilters { display: flex; flex-wrap: wrap; gap: var(--s2); }
.bfilter {
  height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface-elevated); color: var(--ink); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.bfilter:hover { border-color: var(--brand-primary); color: var(--brand-primary); }
.bfilter.is-active { background: var(--ink); border-color: var(--ink); color: var(--surface-elevated); }

/* Rejilla de artículos */
.bgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s5); }
.bcard { display: flex; flex-direction: column; align-items: flex-start; gap: var(--s3); }
.bcard[hidden] { display: none; }
.bcard-media { width: 100%; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--r-card); margin-bottom: var(--s2); }
.bcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease-out); }
.bcard:hover .bcard-media img { transform: scale(1.05); }
.bcard h3 { font-size: clamp(22px, 1.9vw, 26px); font-weight: 600; letter-spacing: -.02em; line-height: 1.15; transition: color .3s var(--ease); }
.bcard:hover h3 { color: var(--brand-primary); }
.bcard > p:not(.bmeta) { font-size: 16px; line-height: 1.55; color: var(--ink-secondary); }
.bempty { margin-top: var(--s5); padding: var(--s6); border-radius: var(--r-card); background: var(--surface-elevated); font-size: 17px; color: var(--ink-secondary); }
.bempty a { color: var(--brand-primary); font-weight: 600; }
@media (max-width: 900px) { .bgrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .bgrid { grid-template-columns: 1fr; } }

/* ---------- Página de artículo ---------- */
.art-head { background: var(--dk-surface); color: var(--dk-ink); padding: calc(96px + var(--s8)) 0 var(--s8); }
.art-head-inner { max-width: 920px; }
.art-back { display: inline-block; margin-bottom: var(--s6); font-size: 16px; font-weight: 600; color: var(--dk-ink-secondary); transition: color .3s var(--ease); }
.art-back:hover { color: var(--dk-primary); }
.art-tags { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s3); margin-bottom: var(--s5); }
.art-tags .tlabel { margin-bottom: 0; color: var(--dk-primary); }
.art-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(38px, 5.4vw, 72px); line-height: 1.02; letter-spacing: -.04em; }
.art-deck { margin-top: var(--s5); font-size: clamp(19px, 1.6vw, 22px); line-height: 1.55; color: var(--dk-ink-secondary); max-width: 58ch; }

.art-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: var(--s8); padding-top: var(--s8); padding-bottom: var(--s8); }
.art-toc { position: sticky; top: 110px; align-self: start; }
.art-toc p { font-size: 16px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-secondary); margin-bottom: var(--s4); }
.art-toc ol { display: grid; gap: var(--s3); border-left: 2px solid var(--border); }
.art-toc a { display: block; padding-left: var(--s4); margin-left: -2px; border-left: 2px solid transparent; font-size: 16px; line-height: 1.4; color: var(--ink-secondary); transition: color .25s var(--ease), border-color .25s var(--ease); }
.art-toc a:hover, .art-toc a.is-active { color: var(--brand-primary); border-left-color: var(--brand-primary); }
.art-body { max-width: 68ch; }
.art-body h2 { margin-top: var(--s7); font-size: clamp(26px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.025em; line-height: 1.15; scroll-margin-top: 110px; }
.art-body h2:first-child { margin-top: 0; }
.art-body p { margin-top: var(--s4); font-size: 18px; line-height: 1.75; color: #3D3B5C; }

.art-close {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--s5);
  margin-bottom: var(--s9); padding: var(--s7) var(--s6); border-radius: var(--r-card);
  background: var(--dk-surface); color: var(--dk-ink);
}
.art-close h2 { font-size: clamp(26px, 2.6vw, 36px); font-weight: 600; letter-spacing: -.025em; }
.art-close p { margin-top: var(--s2); font-size: 17px; color: var(--dk-ink-secondary); }
@media (max-width: 860px) {
  .art-layout { grid-template-columns: 1fr; gap: var(--s6); }
  .art-toc { position: static; padding: var(--s5); border-radius: var(--r-card); background: var(--surface-elevated); }
  .art-close .btn { width: 100%; }
}
/* Portada del blog: autora y temas para empezar */
.phero-author { display: flex; align-items: center; gap: var(--s4); margin-top: var(--s6); max-width: 560px; }
.phero-author img { flex: none; width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 55% 22%; border: 2px solid var(--dk-primary); }
.phero-author p { font-size: 16px; line-height: 1.5; color: var(--dk-ink-secondary); }
.phero-author strong { color: var(--dk-ink); font-weight: 600; }
.phero-topics { display: flex; align-items: center; flex-wrap: wrap; gap: var(--s2); margin-top: var(--s7); padding-top: var(--s5); border-top: 1px solid var(--dk-border); }
.phero-topics span { margin-right: var(--s3); font-size: 16px; font-weight: 600; color: var(--dk-ink); }
.phero-topics button {
  height: 40px; padding: 0 18px; border-radius: var(--r-pill); border: 1px solid rgba(var(--dk-ink-rgb), .22);
  background: transparent; color: var(--dk-ink); font: inherit; font-size: 16px; font-weight: 500; cursor: pointer;
  transition: background-color .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.phero-topics button:hover, .phero-topics button:focus-visible { background: var(--brand-primary); border-color: var(--brand-primary); color: #fff; }
.blog-page .phero-title { max-width: none; }
@media (max-width: 560px) { .phero-topics span { width: 100%; margin: 0 0 var(--s2); } }
/* ---------- Artículos reales del blog ---------- */
.bfeat[hidden] { display: none; }
.bdate { font-size: 16px; color: var(--ink-secondary); }
.bcard .bdate { margin-top: auto; }
.art-byline { display: flex; align-items: center; gap: var(--s3); margin-top: var(--s6); }
.art-byline img { flex: none; width: 52px; height: 52px; border-radius: 50%; object-fit: cover; object-position: 55% 22%; border: 2px solid var(--dk-primary); }
.art-byline p { font-size: 16px; line-height: 1.45; color: var(--dk-ink-secondary); }
.art-byline strong { color: var(--dk-ink); font-weight: 600; }
.art-cover { margin: calc(var(--s7) * -1) 0 0; position: relative; z-index: 1; }
.art-cover img { width: 100%; max-height: 520px; object-fit: cover; border-radius: var(--r-card); box-shadow: 0 30px 60px -36px rgba(29, 25, 76, .5); }
.art-layout--solo { grid-template-columns: minmax(0, 1fr); justify-items: center; }
.art-layout--solo .art-body { width: 100%; }
.art-body h3 { margin-top: var(--s6); font-size: clamp(21px, 1.9vw, 25px); font-weight: 600; letter-spacing: -.015em; line-height: 1.25; }
.art-body ul, .art-body ol { margin-top: var(--s4); display: grid; gap: var(--s3); }
.art-body li { position: relative; padding-left: 28px; font-size: 18px; line-height: 1.6; color: #3D3B5C; }
.art-body li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary); }
.art-body strong { color: var(--ink); font-weight: 600; }
.art-body a { color: var(--brand-primary); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.art-body u { text-decoration: none; }
/* Secuencias "paso ↓ paso" del texto, presentadas como diagrama (mismo texto) */
.art-flow {
  margin-top: var(--s5); padding: var(--s6) var(--s5); border-radius: var(--r-card);
  background: var(--surface-elevated); border: 1px solid var(--border);
  display: flex; flex-direction: column; align-items: center; text-align: center;
}
.art-body .art-flow p { margin-top: 0; }
.art-body .art-flow-step {
  display: inline-block; padding: 10px 20px; border-radius: var(--r-pill);
  background: var(--brand-tint); font-size: 16px; letter-spacing: .04em;
}
.art-body .art-flow-step strong { color: var(--brand-primary); }
.art-body .art-flow-note { margin-top: var(--s2); font-size: 16px; line-height: 1.5; color: var(--ink-secondary); max-width: 46ch; }
.art-body .art-flow-arrow { margin: var(--s2) 0; font-size: 20px; line-height: 1; color: var(--brand-primary); }
/* ---------- Destacados que rotan (carrusel del blog) ---------- */
.bfeat-track { display: grid; }
.bfeat-rot .bfeat { grid-area: 1 / 1; opacity: 0; visibility: hidden; transition: opacity .8s var(--ease), visibility 0s linear .8s, box-shadow .4s var(--ease); }
.bfeat-rot .bfeat.is-active { opacity: 1; visibility: visible; transition: opacity .8s var(--ease), visibility 0s, box-shadow .4s var(--ease); }
.bfeat-rot .bfeat.is-active .bfeat-media img { animation: featZoom 7s var(--ease) both; }
@keyframes featZoom { from { transform: scale(1.06); } to { transform: scale(1); } }
.bfeat-dots { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: var(--s4); margin-top: var(--s4); }
.bfeat-dot {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 140px; padding: 4px 0;
  background: none; border: 0; cursor: pointer; font: inherit; font-size: 16px; font-weight: 600; color: var(--ink-secondary);
  transition: color .3s var(--ease);
}
.bfeat-dot[aria-pressed="true"], .bfeat-dot:hover { color: var(--ink); }
/* Barra de progreso como en las plataformas de video */
.bfeat-dot i { position: relative; display: block; width: 100%; height: 3px; border-radius: 3px; background: var(--border); overflow: hidden; }
.bfeat-dot i::after { content: ""; position: absolute; inset: 0; background: var(--brand-primary); transform: scaleX(0); transform-origin: left; }
.bfeat-dot[aria-pressed="true"] i::after { transform: scaleX(1); }
.bfeat-rot.is-playing .bfeat-dot[aria-pressed="true"] i::after { animation: featProgress var(--feat-time, 7s) linear both; }
.bfeat-rot.is-paused .bfeat-dot[aria-pressed="true"] i::after { animation-play-state: paused; }
@keyframes featProgress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .bfeat-rot .bfeat.is-active .bfeat-media img { animation: none; } }
/* ---------- Texto de los artículos como en veraver.pe ----------
   Helvetica 18px con interlineado 1.5; subtítulos del mismo tamaño en seminegrita;
   separación corta entre párrafos y más aire antes de cada subtítulo. */
.art-body, .art-deck {
  --f-article: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  font-family: var(--f-article);
}
.art-body { max-width: 72ch; color: #1D1E20; }
.art-body p, .art-body li { font-family: var(--f-article); font-size: 18px; line-height: 1.5; letter-spacing: normal; color: #1D1E20; }
.art-body p { margin: 0 0 13px; }
.art-body > p + p { margin-top: 0; }
.art-body h2, .art-body h3 {
  font-family: var(--f-article); font-size: 18px; line-height: 1.5; font-weight: 600; letter-spacing: normal;
  color: #1D1E20; margin: 32px 0 14px;
}
.art-body h2:first-child, .art-body h3:first-child { margin-top: 0; }
.art-body h2 + h3 { margin-top: 0; }
.art-body strong { font-weight: 700; color: #1D1E20; }
.art-body ul, .art-body ol { display: block; margin: 0 0 17px; padding-left: 40px; list-style: disc; }
.art-body ol { list-style: decimal; }
.art-body li { padding-left: 0; margin: 0; }
.art-body li::before { content: none; }
.art-body li::marker { color: #1D1E20; }
.art-deck { font-size: 18px; line-height: 1.5; }
/* El diagrama de pasos conserva su recuadro pero con la letra del artículo */
.art-body .art-flow { margin: 8px 0 20px; }
.art-body .art-flow-step, .art-body .art-flow-note, .art-body .art-flow-arrow { margin-bottom: 0; }

/* Animación de entrada de veraver.pe: cada bloque sube un poco y aparece (0.65s, retraso 0.1s) */
.js .art-body > * { opacity: 0; transform: translateY(20%); transition: opacity .65s ease .1s, transform .65s ease .1s; }
.js .art-body > .is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .art-body > * { opacity: 1; transform: none; transition: none; } }
/* Párrafos en negrita que hacen de subtítulo (con ancla para el índice): más aire arriba, como una sección */
.art-body .art-sub { margin-top: 32px; scroll-margin-top: 110px; }
.art-body .art-sub:first-child { margin-top: 0; }
.art-body h3[id] { scroll-margin-top: 110px; }
