/* ═══════════════════════════════════════════════════════════════════════
   MECH — sitio multipágina (WRO 2026)
   Estética: dark #0e0e12, Sora + Space Mono, acentos de marca.
   Motion según las skills de Emil Kowalski / Apple design:
   curvas propias, feedback al presionar, hover solo con puntero fino,
   stagger, transiciones entre páginas (View Transitions), reduced-motion.
   ═══════════════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #E24B4A; --purple: #534AB7; --purple-mid: #7F77DD;
  --amber: #EF9F27; --teal: #1D9E75;
  --bg: #0e0e12; --bg-2: #0a0a0e;
  --surface: #16161d; --surface-2: #1e1e28; --surface-3: #26263a;
  --text: #f0eeff; --muted: #9b9bad; --dim: #6a6a7c;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.16);
  --mono: 'Space Mono', ui-monospace, monospace;
  --sans: 'Sora', system-ui, -apple-system, sans-serif;
  --serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --maxw: 1180px;
  --nav-h: 68px;
  /* curvas fuertes: las nativas son demasiado débiles */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--red); color: #fff; }
img { max-width: 100%; display: block; }
a { color: inherit; }

.mono { font-family: var(--mono); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 820px; margin: 0 auto; padding: 0 24px; }
.accent-red { color: var(--red); } .accent-purple { color: var(--purple-mid); }
.accent-teal { color: var(--teal); } .accent-amber { color: var(--amber); }

/* Transición entre páginas (navegación multipágina) */
@view-transition { navigation: auto; }

/* Salto al contenido (accesibilidad) */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; padding: 12px 20px; border-radius: 0 0 10px 0;
  font-weight: 700; text-decoration: none;
}
.skip:focus { left: 0; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

/* ─── Reveal + stagger ──────────────────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
}
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: .07s; } .d2 { transition-delay: .14s; }
.d3 { transition-delay: .21s; } .d4 { transition-delay: .30s; }

.stagger.visible > .reveal:nth-child(1) { transition-delay: 0s; }
.stagger.visible > .reveal:nth-child(2) { transition-delay: .06s; }
.stagger.visible > .reveal:nth-child(3) { transition-delay: .12s; }
.stagger.visible > .reveal:nth-child(4) { transition-delay: .18s; }
.stagger.visible > .reveal:nth-child(5) { transition-delay: .24s; }
.stagger.visible > .reveal:nth-child(6) { transition-delay: .30s; }
.stagger.visible > .reveal:nth-child(7) { transition-delay: .36s; }
.stagger.visible > .reveal:nth-child(8) { transition-delay: .42s; }

@media (prefers-reduced-motion: reduce) {
  /* menos movimiento, no cero: se conserva el cross-fade */
  .reveal { transform: none; transition: opacity .45s ease; }
  html { scroll-behavior: auto; }
  .marquee-track { animation: none !important; }
  .led-ring span { animation: none !important; opacity: .6 !important; }
  @view-transition { navigation: none; }
}

/* ─── Franja de píxeles (firma visual) ──────────────────────────────── */
.pixel-band {
  height: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='42'%3E%3Cg fill='%23f0eeff' fill-opacity='0.13'%3E%3Crect x='6' y='8' width='13' height='13'/%3E%3Crect x='26' y='18' width='9' height='9'/%3E%3Crect x='44' y='6' width='11' height='11'/%3E%3Crect x='60' y='22' width='14' height='12'/%3E%3Crect x='82' y='9' width='9' height='9'/%3E%3Crect x='97' y='20' width='12' height='11'/%3E%3Crect x='116' y='7' width='14' height='13'/%3E%3Crect x='138' y='19' width='9' height='9'/%3E%3Crect x='154' y='8' width='11' height='11'/%3E%3Crect x='172' y='21' width='12' height='11'/%3E%3Crect x='192' y='9' width='9' height='9'/%3E%3Crect x='206' y='19' width='10' height='10'/%3E%3C/g%3E%3C/svg%3E");
  background-repeat: repeat-x;
}
.pixel-band.flip { transform: scaleY(-1); }

/* ═══ NAV ═══════════════════════════════════════════════════════════ */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 100; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 28px;
  background: rgba(14, 14, 18, 0.72);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color .35s var(--ease-out), background .35s var(--ease-out);
  view-transition-name: nav;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(14,14,18,.86); }
.nav-logo { display: flex; align-items: center; color: var(--text); text-decoration: none; }
.nav-logo:active { transform: scale(.97); }
.wordmark { height: 32px; width: auto; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a {
  color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 13px; border-radius: 9px;
  transition: color .2s ease, background .2s ease, transform .14s var(--ease-out);
}
.nav-links a:active { transform: scale(.97); }
.nav-links a[aria-current="page"] { color: var(--text); background: rgba(255,255,255,.07); }
.nav-cta {
  font-family: var(--mono); border: 1px solid var(--border-strong);
  color: var(--text) !important; margin-left: 8px;
}
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--text); background: rgba(255,255,255,.05); }
  .nav-cta:hover { border-color: var(--red); color: var(--red) !important; }
}
/* Interruptor de idioma ES / EN */
.lang-switch {
  display: inline-flex; align-items: center; gap: 2px; margin-left: 10px;
  padding: 3px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(255,255,255,.04);
}
.lang-btn {
  font-family: var(--mono); font-size: 11.5px; font-weight: 700; letter-spacing: 1px;
  color: var(--dim); background: none; border: 0; cursor: pointer;
  padding: 5px 9px; border-radius: 7px;
  transition: color .2s ease, background .25s var(--ease-out), transform .14s var(--ease-out);
}
.lang-btn:active { transform: scale(.94); }
.lang-btn.on { color: var(--text); background: rgba(255,255,255,.10); }
@media (hover: hover) and (pointer: fine) {
  .lang-btn:not(.on):hover { color: var(--muted); }
}

.nav-burger {
  display: none; flex-direction: column; gap: 5px; padding: 10px;
  background: none; border: 0; cursor: pointer;
}
.nav-burger span {
  width: 22px; height: 2px; background: var(--text); border-radius: 2px;
  transition: transform .25s var(--ease-out), opacity .2s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══ HERO ══════════════════════════════════════════════════════════ */
.hero {
  position: relative; min-height: 92vh; padding: calc(var(--nav-h) + 60px) 24px 70px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; overflow: hidden;
}
.hero-glow, .hero-grid { position: absolute; inset: 0; pointer-events: none; }
.hero-glow {
  background:
    radial-gradient(ellipse 55% 45% at 50% 28%, rgba(226,75,74,.15), transparent 70%),
    radial-gradient(ellipse 50% 40% at 22% 74%, rgba(83,74,183,.18), transparent 70%),
    radial-gradient(ellipse 45% 40% at 80% 68%, rgba(29,158,117,.10), transparent 70%);
}
.hero-grid {
  opacity: .5;
  background-image:
    linear-gradient(rgba(240,238,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(240,238,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 75% 65% at 50% 45%, #000 30%, transparent 75%);
}
.hero-inner { position: relative; max-width: 940px; }
.kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--muted); }
.hero-wordmark { height: 78px; width: auto; color: var(--text); margin: 24px auto 24px; }
.hero h1 {
  font-size: clamp(38px, 6.4vw, 74px); font-weight: 800;
  line-height: 1.05; letter-spacing: -.025em; margin-bottom: 20px;
}
.grad {
  background: linear-gradient(100deg, var(--red), var(--purple-mid) 58%, var(--teal));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero h1 em { font-style: italic; }
.hero-sub { font-size: clamp(13px, 2vw, 16px); letter-spacing: 1px; color: var(--muted); margin-bottom: 18px; }
.hero-sub b { font-family: var(--mono); font-weight: 700; }
.lead {
  max-width: 620px; margin: 0 auto 34px; color: var(--muted);
  font-size: clamp(15px, 2vw, 17.5px); font-weight: 300;
}
.lead b { color: var(--text); font-weight: 600; }

/* Chip de voz con aro LED */
.voice-chip {
  display: inline-flex; align-items: center; gap: 16px; margin-bottom: 32px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 11px 26px 11px 13px;
  box-shadow: 0 0 40px rgba(226,75,74,.08);
}
.led-ring { position: relative; width: 42px; height: 42px; flex: 0 0 42px; }
.led-ring span {
  position: absolute; top: 50%; left: 50%; width: 5px; height: 5px;
  margin: -2.5px 0 0 -2.5px; border-radius: 50%; background: var(--teal);
  transform: rotate(calc(var(--i) * 30deg)) translateY(-17px);
  animation: comet 1.8s linear infinite; animation-delay: calc(var(--i) * -.15s);
}
@keyframes comet { 0% { opacity: 1; box-shadow: 0 0 8px var(--teal); } 35%,100% { opacity: .25; box-shadow: none; } }
.voice-text { font-family: var(--mono); font-size: 15px; min-width: 240px; text-align: left; }
.voice-text .prompt { color: var(--red); font-weight: 700; }
.caret {
  display: inline-block; width: 9px; height: 17px; margin-left: 3px; background: var(--text);
  vertical-align: text-bottom; animation: blink 1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* Botones */
.ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font-weight: 700; font-size: 15px; padding: 13px 26px; border-radius: 12px;
  transition: transform .14s var(--ease-out), background .2s ease, border-color .2s ease;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 30px -10px rgba(226,75,74,.55); }
.btn-ghost { color: var(--text); border: 1px solid var(--border-strong); background: rgba(22,22,29,.6); }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: #e85b5a; transform: translateY(-2px); }
  .btn-ghost:hover { border-color: var(--muted); transform: translateY(-2px); }
}

.hero-slogan { font-family: var(--mono); font-size: 13px; letter-spacing: 2px; color: var(--dim); margin-top: 26px; }

/* ═══ BARRA DE PATROCINADORES (transportadora) ══════════════════════ */
.sponsors { padding: 46px 0 10px; }
.sponsors-label {
  text-align: center; font-family: var(--mono); font-size: 11px;
  letter-spacing: 3px; color: var(--dim); margin-bottom: 18px;
}
.marquee {
  position: relative; overflow: hidden;
  /* fondo CLARO para que los logos (tinta oscura) se lean */
  background: #eeedf3;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  padding: 13px 0;
  box-shadow: 0 10px 34px -18px rgba(0,0,0,.8);
  /* desvanecido en los bordes */
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.marquee-track { display: flex; width: max-content; animation: marquee 38s linear infinite; }
.marquee-row {
  display: flex; align-items: center; gap: 66px; padding-right: 66px;
  list-style: none; margin: 0;
}
.marquee-row img {
  height: 42px; width: auto; object-fit: contain;
  filter: saturate(1); transition: transform .3s var(--ease-out);
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
  .marquee-row img:hover { transform: scale(1.08); }
}

/* ═══ CABECERA DE PÁGINA INTERNA ════════════════════════════════════ */
.page-head {
  position: relative; padding: calc(var(--nav-h) + 70px) 0 46px;
  border-bottom: 1px solid var(--border); overflow: hidden;
}
.page-head::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 60% 90% at 20% 0%, rgba(83,74,183,.16), transparent 70%),
              radial-gradient(ellipse 50% 80% at 85% 10%, rgba(226,75,74,.10), transparent 70%);
}
.page-head .container { position: relative; }
.page-num {
  font-family: var(--mono); font-size: clamp(40px, 6vw, 68px); font-weight: 700;
  color: transparent; -webkit-text-stroke: 1.5px var(--dim); line-height: 1;
}
.page-head h1 {
  font-size: clamp(32px, 5.4vw, 56px); font-weight: 800;
  letter-spacing: -.025em; line-height: 1.06; margin: 10px 0 16px;
}
.page-head .lead { margin: 0; max-width: 680px; }
.page-eyebrow {
  display: flex; align-items: center; gap: 16px; margin-bottom: 6px;
}
.page-eyebrow .rule { flex: 1; height: 1px; background: var(--border); }
.page-eyebrow .tag { font-family: var(--mono); font-size: 12px; letter-spacing: 5px; color: var(--red); font-weight: 700; }

/* ═══ SECCIONES ═════════════════════════════════════════════════════ */
.section { padding: 86px 0; }
.section-sm { padding: 60px 0; }
.section-alt { background: var(--bg-2); }
.section-kicker { font-family: var(--mono); font-size: 12px; letter-spacing: 3px; color: var(--red); font-weight: 700; margin-bottom: 12px; }
.section h2 {
  font-size: clamp(27px, 3.8vw, 42px); font-weight: 800;
  line-height: 1.1; letter-spacing: -.022em; margin-bottom: 18px;
}
.section h3 { font-size: 20px; font-weight: 700; margin-bottom: 10px; }
.section p { color: var(--muted); font-weight: 300; }
.section p b, .section li b { color: var(--text); font-weight: 600; }
.section-lead { max-width: 660px; color: var(--muted); font-size: 16.5px; font-weight: 300; margin-bottom: 46px; }

/* Rejillas */
.grid { display: grid; gap: 18px; }
/* sin esto, un hijo con contenido ancho (una tabla) no encoge y desborda
   la pantalla en móvil: los items de grid traen min-width:auto por defecto */
.grid > *, .stats > *, .timeline > * { min-width: 0; }

/* Hardware: diagrama + listas (en móvil pasa a una columna) */
.hw-layout { grid-template-columns: minmax(0, 440px) 1fr; align-items: start; }
@media (max-width: 900px) { .hw-layout { grid-template-columns: 1fr; } }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }

/* Tarjetas */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 26px 24px;
  transition: transform .3s var(--ease-out), border-color .3s ease;
}
.card h3 { font-size: 18px; margin-bottom: 9px; }
.card p { font-size: 14px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { transform: translateY(-5px); border-color: var(--tint, var(--border-strong)); }
}
.card-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 13px; font-size: 22px; margin-bottom: 15px;
  background: color-mix(in srgb, var(--tint, var(--purple-mid)) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--tint, var(--purple-mid)) 32%, transparent);
  color: var(--tint, var(--purple-mid)); font-weight: 700; font-family: var(--mono);
}
/* Antes era una barra de color arriba; ahora es un borde fino que rodea la
   tarjeta entera con un glow tenue del color de acento. */
.card-accent {
  border-color: color-mix(in srgb, var(--tint) 40%, transparent);
  box-shadow: 0 0 18px -8px color-mix(in srgb, var(--tint) 85%, transparent),
              inset 0 0 26px -20px var(--tint);
}
@media (hover: hover) and (pointer: fine) {
  .card-accent:hover {
    border-color: color-mix(in srgb, var(--tint) 68%, transparent);
    box-shadow: 0 0 30px -8px color-mix(in srgb, var(--tint) 95%, transparent),
                inset 0 0 30px -20px var(--tint);
  }
}

/* Estadísticas */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.stat {
  background: rgba(22,22,29,.7); border: 1px solid var(--border);
  border-radius: 15px; padding: 20px 22px;
}
.stat b {
  display: block; font-size: clamp(26px, 3.4vw, 36px); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.1; margin-bottom: 4px;
}
.stat span { font-size: 12.5px; color: var(--muted); }
.stat-src { display: block; font-family: var(--mono); font-size: 10px; color: var(--dim); margin-top: 8px; letter-spacing: .5px; }

/* Cita */
blockquote.pull {
  font-size: clamp(19px, 2.5vw, 27px); font-weight: 600; line-height: 1.38;
  padding: 6px 0 6px 24px; border-left: 3px solid var(--red);
}
blockquote.pull cite {
  display: block; margin-top: 13px; font-family: var(--mono); font-size: 12px;
  color: var(--dim); font-style: normal; letter-spacing: 1px;
}

/* Estudios / datos */
.study { display: flex; flex-direction: column; gap: 13px; }
.study .fig {
  font-family: var(--mono); font-size: 31px; font-weight: 700; letter-spacing: -.02em;
  background: linear-gradient(100deg, var(--red), var(--purple-mid));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.study blockquote { font-size: 14px; color: var(--text); font-weight: 300; line-height: 1.5; flex: 1; }
.study figcaption { font-family: var(--mono); font-size: 10.5px; color: var(--dim); }

/* Lista con marca */
.ticks { list-style: none; display: flex; flex-direction: column; gap: 12px; }
.ticks li { position: relative; padding-left: 26px; font-size: 15px; color: var(--muted); font-weight: 300; }
.ticks li::before {
  content: '✦'; position: absolute; left: 0; top: 1px; font-size: 11px;
  color: var(--tint, var(--red));
}

/* Timeline de evolución */
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.tl {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 26px 22px;
  transition: transform .3s var(--ease-out), border-color .3s ease;
}
.tl-marker {
  width: 44px; height: 44px; border-radius: 50%; display: flex;
  align-items: center; justify-content: center; font-family: var(--mono);
  font-size: 17px; font-weight: 700; margin-bottom: 16px;
  border: 2px solid var(--border); color: var(--dim);
}
.tl-status { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--dim); }
.tl h3 { font-size: 23px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 10px; }
.tl p { font-size: 13.5px; }
.tl-done { border-color: color-mix(in srgb, var(--teal) 34%, transparent); }
.tl-done .tl-marker { border-color: var(--teal); color: var(--teal); background: color-mix(in srgb, var(--teal) 12%, transparent); }
.tl-done .tl-status { color: var(--teal); }
.tl-now { border-color: color-mix(in srgb, var(--red) 50%, transparent); background: color-mix(in srgb, var(--red) 6%, var(--surface)); }
.tl-now .tl-marker { border-color: var(--red); background: var(--red); color: #fff; box-shadow: 0 0 22px -4px var(--red); }
.tl-now .tl-status { color: var(--red); }
.tl-next .tl-marker { border-style: dashed; }
.tl-tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 13px; }
.tl-tags span, .chip {
  font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; padding: 3px 8px;
  border-radius: 6px; border: 1px solid var(--border); color: var(--muted);
}
.tl-now .tl-tags span { color: var(--red); border-color: color-mix(in srgb, var(--red) 35%, transparent); }

/* Tira horizontal */
.strip {
  display: flex; gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 8px max(24px, calc((100vw - var(--maxw)) / 2 + 24px)) 24px;
  scrollbar-color: var(--surface-3) transparent;
}
.strip > * { flex: 0 0 auto; scroll-snap-align: center; width: min(330px, 80vw); }
.strip figure { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; overflow: hidden; transition: transform .3s var(--ease-out), border-color .3s ease; }
.strip figure img { width: 100%; height: 260px; object-fit: cover; }
.strip figcaption { padding: 14px 18px; font-size: 14px; display: flex; flex-direction: column; gap: 3px; }
.strip figcaption .mono { font-size: 10px; letter-spacing: 2px; color: var(--red); font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .strip figure:hover { transform: translateY(-5px); border-color: var(--purple-mid); } }

/* ═══ PERFILES DEL EQUIPO ═══════════════════════════════════════════ */
.profiles { display: flex; flex-direction: column; }
.profile {
  display: grid; grid-template-columns: 1fr 1fr; gap: 56px;
  align-items: center; padding: 60px 0;
  border-top: 1px solid var(--border);
}
.profile:first-child { border-top: 0; }
/* alterna el lado de la foto */
.profile:nth-child(even) .profile-photo { order: -1; }

/* nota: se anida bajo .profile para ganarle en especificidad a `.section h3`
   y `.section p`, que si no imponen sus tamaños. */
.profile .profile-kicker {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 4px;
  color: var(--muted); margin-bottom: 20px;
}
.profile .profile-name {
  font-family: var(--serif); font-weight: 500;
  font-size: clamp(44px, 6.4vw, 86px); line-height: .96;
  letter-spacing: -.015em; margin-bottom: 22px; color: var(--text);
}
.profile .profile-name .dot { color: var(--tint, var(--red)); }
.profile .profile-role {
  font-family: var(--mono); font-style: italic; font-size: clamp(11px, 1.4vw, 13.5px);
  letter-spacing: 3px; color: var(--muted); margin-bottom: 22px;
}
.profile .profile-role span { color: var(--tint, var(--red)); font-style: normal; margin: 0 4px; }
.profile .profile-bio { font-size: 15.5px; color: var(--muted); font-weight: 300; max-width: 430px; }
.profile .profile-bio b { color: var(--text); font-weight: 600; }

.profile-photo { position: relative; display: flex; justify-content: center; }
.profile-photo img {
  width: min(100%, 430px); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
  /* se funde con el fondo, como en la plantilla */
  mask-image: radial-gradient(circle at 50% 48%, #000 58%, transparent 76%);
  -webkit-mask-image: radial-gradient(circle at 50% 48%, #000 58%, transparent 76%);
  transition: transform .6s var(--ease-out);
}
.profile-photo::before {
  content: ''; position: absolute; inset: 50% auto auto 50%;
  width: min(100%, 430px); aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; pointer-events: none;
  border: 1px solid color-mix(in srgb, var(--tint, var(--red)) 22%, transparent);
  box-shadow: 0 0 60px -20px color-mix(in srgb, var(--tint, var(--red)) 65%, transparent);
}
@media (hover: hover) and (pointer: fine) {
  .profile-photo img:hover { transform: scale(1.03); }
}

/* Foto de equipo */
.team-shot { position: relative; border-radius: 22px; overflow: hidden; border: 1px solid var(--border); }
.team-shot img { width: 100%; display: block; }
.team-shot figcaption {
  position: absolute; left: 22px; bottom: 18px;
  font-size: 11px; letter-spacing: 3px; color: var(--text);
  text-shadow: 0 2px 12px rgba(0,0,0,.9);
}

/* Diagramas (vienen sobre fondo blanco: se enmarcan) */
.diagram {
  background: #fff; border: 1px solid var(--border); border-radius: 20px;
  padding: 16px; overflow: hidden;
  transition: transform .3s var(--ease-out), box-shadow .3s ease;
}
.diagram img { width: 100%; border-radius: 12px; }
.diagram figcaption {
  font-size: 10px; letter-spacing: 2px; color: #6a6a7c;
  padding: 12px 6px 4px; text-align: center;
}
@media (hover: hover) and (pointer: fine) {
  .diagram:hover { transform: translateY(-4px); box-shadow: 0 24px 50px -28px rgba(0,0,0,.9); }
}

/* Tabla de datos */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 460px; }
th, td { text-align: left; padding: 14px 20px; border-bottom: 1px solid var(--border); }
th { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--dim); font-weight: 400; text-transform: uppercase; }
td { color: var(--muted); font-weight: 300; }
td b { color: var(--text); font-weight: 600; }
tr:last-child td { border-bottom: 0; }
tfoot td { color: var(--text); font-weight: 700; background: rgba(255,255,255,.03); }

/* Detalle plegable */
details.box { border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
details.box summary {
  cursor: pointer; padding: 16px 22px; font-family: var(--mono); font-size: 12px;
  letter-spacing: 2px; color: var(--muted); list-style: none; transition: color .2s ease;
}
details.box summary::-webkit-details-marker { display: none; }
@media (hover: hover) and (pointer: fine) { details.box summary:hover { color: var(--text); } }
details.box .box-body { padding: 0 22px 20px; }
details.box img { border-radius: 12px; }

/* Navegación entre páginas (pie de página interna) */
.pager { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.pager a {
  display: flex; flex-direction: column; gap: 6px; text-decoration: none;
  background: var(--surface); border: 1px solid var(--border); border-radius: 16px;
  padding: 22px 24px; transition: transform .2s var(--ease-out), border-color .25s ease;
}
.pager a:active { transform: scale(.99); }
.pager .dir { font-family: var(--mono); font-size: 10.5px; letter-spacing: 2px; color: var(--dim); }
.pager .ttl { font-size: 19px; font-weight: 700; }
.pager .next { text-align: right; align-items: flex-end; }
@media (hover: hover) and (pointer: fine) { .pager a:hover { border-color: var(--red); transform: translateY(-3px); } }

/* Logos de patrocinadores en rejilla (página de contacto) */
.sponsor-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.sponsor-tile {
  background: #eeedf3; border-radius: 16px; padding: 26px 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 150px; transition: transform .3s var(--ease-out);
}
.sponsor-tile img { height: 54px; width: auto; object-fit: contain; }
.sponsor-tile span { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: #4a4a58; text-align: center; }
@media (hover: hover) and (pointer: fine) { .sponsor-tile:hover { transform: translateY(-4px); } }

/* ═══ FOOTER ════════════════════════════════════════════════════════ */
.footer { background: var(--bg-2); }
.footer-inner {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding: 60px 24px 30px; max-width: var(--maxw); margin: 0 auto;
}
.footer-mark { height: 44px; color: var(--text); margin-bottom: 14px; }
.footer-about p { font-size: 14px; color: var(--muted); font-weight: 300; max-width: 320px; }
.footer-col h4 { font-family: var(--mono); font-size: 11px; letter-spacing: 2px; color: var(--dim); margin-bottom: 14px; font-weight: 400; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: var(--muted); text-decoration: none; font-size: 14px; transition: color .2s ease; }
@media (hover: hover) and (pointer: fine) { .footer-col a:hover { color: var(--text); } }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 20px 24px 34px; text-align: center;
  font-family: var(--mono); font-size: 11px; letter-spacing: 1.6px; color: var(--dim);
}

/* ═══ RESPONSIVE ════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .g3, .g4, .stats, .timeline, .sponsor-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .profile { grid-template-columns: 1fr; gap: 30px; text-align: center; padding: 46px 0; }
  .profile:nth-child(even) .profile-photo { order: 0; }
  .profile-photo { order: -1 !important; }
  .profile-bio { margin: 0 auto; }
  .profile-photo img, .profile-photo::before { width: min(78%, 320px); }
}

@media (max-width: 760px) {
  .nav { padding: 0 18px; }
  .nav-burger { display: flex; }
  .nav-links {
    position: fixed; top: calc(var(--nav-h) - 4px); right: 12px; left: 12px;
    flex-direction: column; align-items: stretch; gap: 2px; padding: 12px;
    background: rgba(20,20,26,.96); border: 1px solid var(--border); border-radius: 16px;
    backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
    opacity: 0; pointer-events: none; transform: translateY(-10px) scale(.98);
    transition: opacity .25s var(--ease-out), transform .25s var(--ease-out);
    box-shadow: 0 24px 60px -20px rgba(0,0,0,.9);
  }
  .nav-links.open { opacity: 1; pointer-events: auto; transform: none; }
  .nav-links a { padding: 12px 16px; }
  .nav-cta { margin: 6px 0 0; text-align: center; }
  /* en el desplegable el interruptor ocupa toda la fila */
  .lang-switch { margin: 8px 0 2px; justify-content: stretch; }
  .lang-btn { flex: 1; padding: 9px 0; font-size: 12.5px; }

  .section { padding: 62px 0; }
  .g2, .g3, .g4, .stats, .timeline, .sponsor-grid, .pager { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .marquee-row { gap: 44px; padding-right: 44px; }
  .marquee-row img { height: 34px; }
  .hero { min-height: auto; padding-top: calc(var(--nav-h) + 40px); }
  .voice-text { min-width: 0; font-size: 13px; }
}
