/* ═══════════════════════════════════════════════════════════════
   HOME — Medicina Prehospi PLATFORM
   Hoja de estilos específica del Home. Se apoya en ../design-system
   (tokens, tipografías, container, motion). Todo está acotado a .hm
   (contenido principal) para no alterar nav.js ni footer.js.

   Mundo visual: manual de campo + revista clínica.
   Papel claro, tinta azul, rojo emergencia como señal.
   Una sola sección oscura de contraste (MPH+) más el cierre.
═══════════════════════════════════════════════════════════════ */

:root {
  --ink:        #0D1B2A;
  --ink-2:      #1A2B3C;
  --ink-3:      #213548;
  --red:        #CC2936;
  --red-d:      #A8202B;
  --amber:      #E8960C;
  --amber-ink:  #8F5400;
  --steel:      #7B8FA6;
  --paper:      #FFFFFF;
  --mist:       #F3F5F8;
  --mist-2:     #E8EDF3;
  --line:       rgba(13, 27, 42, 0.10);
  --line-2:     rgba(13, 27, 42, 0.18);
  --text:       #0D1B2A;
  --text-2:     #46556A;
  --text-3:     #5E6E83;
  --on-ink:     #F0F2F4;
  --on-ink-2:   #B4C2D2;
  --ease-out:   cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io:    cubic-bezier(0.65, 0, 0.35, 1);
  --shadow-s:   0 1px 2px rgba(13,27,42,.06), 0 6px 18px rgba(13,27,42,.07);
  --shadow-m:   0 2px 4px rgba(13,27,42,.06), 0 18px 40px rgba(13,27,42,.12);
  --shadow-l:   0 4px 8px rgba(13,27,42,.08), 0 30px 70px rgba(13,27,42,.18);
}

html { scroll-padding-top: 76px; }
body.home { background: var(--paper); color: var(--text); }

/* Selección y foco con la paleta (no los de fábrica) */
.hm ::selection { background: var(--red); color: #fff; }
.hm :focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.hm .on-ink :focus-visible, .hm .sec--ink :focus-visible { outline-color: #fff; }

/* Reseteo de los valores por defecto oscuros del design-system */
.hm :where(h1, h2, h3, h4) { color: inherit; font-family: var(--font-display); text-transform: uppercase; }
.hm :where(p) { color: inherit; font-size: inherit; line-height: inherit; margin: 0; }
.hm :where(p + p) { margin-top: 0; }
.hm :where(strong) { color: inherit; font-weight: 600; }
.hm :where(ul) { list-style: none; margin: 0; padding: 0; }
.hm :where(img, video) { display: block; max-width: 100%; }
.hm :where(a) { color: inherit; }
.hm :where(button) { font: inherit; color: inherit; }
.hm .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Primitivas ──────────────────────────────────────────────── */
.sec { position: relative; padding: clamp(72px, 9vw, 128px) 0; }
.sec--mist { background: var(--mist); }
.sec--ink  { background: var(--ink); color: var(--on-ink); }

.h2 {
  font-weight: 800; letter-spacing: 0.005em; line-height: 0.98;
  font-size: clamp(36px, 4.6vw, 64px); text-wrap: balance;
}
.h2 em { font-style: normal; color: var(--red); }
.lead { font-size: clamp(17px, 1.35vw, 19px); line-height: 1.62; color: var(--text-2); max-width: 58ch; }
.sec--ink .lead { color: var(--on-ink-2); }

/* Botones */
.btn-h {
  --bg: var(--red); --fg: #fff; --bd: var(--red);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 6px;
  background: var(--bg); color: var(--fg); border: 1.5px solid var(--bd);
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  letter-spacing: 0.07em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: transform 260ms var(--ease-out), background-color 200ms, color 200ms, border-color 200ms, box-shadow 260ms var(--ease-out);
  box-shadow: 0 1px 2px rgba(13,27,42,.12), 0 8px 20px rgba(204,41,54,.22);
}
.btn-h svg { width: 18px; height: 18px; transition: transform 260ms var(--ease-out); }
.btn-h:hover { --bg: var(--red-d); --bd: var(--red-d); transform: translateY(-2px); box-shadow: 0 2px 4px rgba(13,27,42,.14), 0 14px 28px rgba(204,41,54,.3); }
.btn-h:hover svg { transform: translateX(4px); }
.btn-h:active { transform: translateY(0) scale(0.98); }
.btn-h--ghost { --bg: transparent; --fg: var(--ink); --bd: var(--ink); box-shadow: none; }
.btn-h--ghost:hover { --bg: var(--ink); --fg: #fff; --bd: var(--ink); box-shadow: var(--shadow-s); }
.btn-h--on-ink { --bg: transparent; --fg: #fff; --bd: rgba(240,242,244,.45); box-shadow: none; }
.btn-h--on-ink:hover { --bg: #fff; --fg: var(--ink); --bd: #fff; box-shadow: none; }

/* Aviso para clientes actuales (transición desde el sitio anterior) */
.btn-h--sm { min-height: 42px; padding: 0 18px; font-size: 15px; gap: 8px; }
.wb { position: relative; background: var(--mist); border-bottom: 1px solid var(--line); }
.wb[hidden], .wb-off .wb { display: none; }
.wb__x { position: absolute; top: 50%; right: clamp(8px, 2vw, 20px); transform: translateY(-50%); width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--text-2); cursor: pointer; transition: background-color 200ms, color 200ms; }
.wb__x svg { width: 18px; height: 18px; }
.wb__x:hover { background: var(--mist-2); color: var(--ink); }
.wb__in { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 28px; padding-block: 12px; padding-right: 56px; }
.wb__txt { margin: 0; color: var(--text); font-size: 15.5px; line-height: 1.45; }
.wb__btns { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 640px) {
  .wb__in { flex-direction: column; align-items: stretch; padding-block: 14px; padding-right: 20px; }
  .wb__txt { padding-right: 34px; }
  .wb__x { top: 8px; transform: none; }
  .wb__btns { flex-direction: column; }
  .wb__btns .btn-h { width: 100%; }
}

.link-h {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  letter-spacing: 0.07em; text-transform: uppercase; text-decoration: none;
  color: var(--red); background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  padding-bottom: 3px; transition: background-size 300ms var(--ease-out);
}
.link-h svg { width: 17px; height: 17px; transition: transform 260ms var(--ease-out); }
.link-h:hover { background-size: 100% 2px; }
.link-h:hover svg { transform: translateX(4px); }
.sec--ink .link-h { color: #fff; }

/* Revelado al scroll — solo si hay JS (sin JS todo queda visible) */
.js .rv { opacity: 0; transform: translateY(26px); transition: opacity 800ms var(--ease-out), transform 900ms var(--ease-out); transition-delay: calc(var(--rd, 0) * 90ms); }
.js .rv.is-in { opacity: 1; transform: none; }
.js .rv--img { transform: translateY(18px) scale(.985); }
.js .rv--l { transform: translateX(-30px); }
.js .rv--r { transform: translateX(30px); }
/* Títulos: cada línea sube desde una máscara */
.js .ln { display: block; overflow: hidden; padding-bottom: .06em; margin-bottom: -.06em; }
.js .ln > span { display: block; transform: translateY(108%); transition: transform 1000ms var(--ease-out); transition-delay: calc(var(--ld, 0) * 110ms + 80ms); }
.js .is-in .ln > span, .js .ln.is-in > span { transform: none; }

/* ═══ 1 · HERO (video de fondo + luz roja que sigue al mouse) ═══ */
.hero { position: relative; overflow: hidden; overflow: clip; isolation: isolate; background: var(--ink); color: #fff; }
.hero__bg { position: absolute; inset: 0; z-index: -1; }
.hero__bg video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero__shade { position: absolute; inset: 0; background:
  linear-gradient(90deg, rgba(13,27,42,.9) 0%, rgba(13,27,42,.66) 46%, rgba(13,27,42,.22) 100%),
  linear-gradient(0deg, rgba(13,27,42,.82) 0%, rgba(13,27,42,0) 42%); }
.cursor-glow { position: absolute; left: 0; top: 0; width: 640px; height: 640px; margin: -320px 0 0 -320px; border-radius: 50%; pointer-events: none; opacity: 0; mix-blend-mode: screen;
  background: radial-gradient(circle, rgba(204,41,54,.5) 0%, rgba(204,41,54,.18) 42%, transparent 70%); transition: opacity 600ms var(--ease-out); will-change: transform; }
.hero.has-cursor .cursor-glow { opacity: 1; }
/* iOS congela el video cuando hay mix-blend-mode encima: en táctil, mezcla normal */
@media (hover: none), (pointer: coarse) { .cursor-glow { mix-blend-mode: normal; width: 440px; height: 440px; margin: -220px 0 0 -220px; } }
/* Control play/pausa del video de fondo */
.hero__vctl { position: absolute; right: clamp(14px, 3vw, 28px); top: clamp(14px, 3vw, 28px); z-index: 3; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; padding: 0; cursor: pointer; color: #fff; background: rgba(8,18,29,.55); border: 1px solid rgba(255,255,255,.28); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); -webkit-tap-highlight-color: transparent; transition: background-color .2s, border-color .2s; }
.hero__vctl:hover { background: rgba(204,41,54,.85); border-color: rgba(204,41,54,1); }
.hero__vctl:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.hero__vctl svg { width: 18px; height: 18px; fill: currentColor; grid-area: 1 / 1; }
.hero__vctl .i-pause { display: none; }
.hero.is-vplaying .hero__vctl .i-play { display: none; }
.hero.is-vplaying .hero__vctl .i-pause { display: block; }
.hero__inner { position: relative; display: flex; flex-direction: column; justify-content: flex-end; min-height: min(840px, calc(100vh - 124px)); min-height: min(840px, calc(100svh - 124px)); padding-top: clamp(120px, 16vw, 200px); padding-bottom: clamp(48px, 6vw, 88px); }
.hero__title { font-weight: 800; line-height: .9; letter-spacing: 0; font-size: clamp(54px, 7.4vw, 104px); color: #fff; }
.hero__title .hl { color: #E03A48; position: relative; display: inline-block; }
.hero__title .hl::after { content: ''; position: absolute; left: 0; right: 4%; bottom: .02em; height: .07em; background: currentColor; transform-origin: left; transform: scaleX(0); transition: transform 900ms var(--ease-out) 900ms; }
.is-ready .hero__title .hl::after { transform: scaleX(1); }
.hero__lead { margin-top: clamp(30px, 3.2vw, 44px); font-size: clamp(18px, 1.5vw, 21px); line-height: 1.55; color: rgba(240,242,244,.9); max-width: 50ch; }
.hero__lead strong { color: #fff; }
.hero__cta { margin-top: clamp(24px, 3vw, 36px); display: flex; flex-wrap: wrap; gap: 14px; }
.hero__note { margin-top: 18px; font-size: 15px; color: var(--on-ink-2); display: flex; align-items: center; gap: 8px; }
.hero__note i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); flex: none; }
.hero__live { position: absolute; right: 80px; bottom: clamp(48px, 6vw, 88px); display: flex; align-items: center; gap: 9px; font-size: 15px; font-weight: 500; color: #fff; }
.hero__live i { width: 9px; height: 9px; border-radius: 50%; background: var(--red); animation: ping 2.4s ease-out infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(204,41,54,.7); } 70%, 100% { box-shadow: 0 0 0 10px rgba(204,41,54,0); } }

/* Cinta de temas */
.ticker { background: var(--ink-2); color: var(--on-ink); overflow: hidden; border-top: 1px solid rgba(255,255,255,.08); position: relative; }
.ticker__track { display: flex; width: max-content; animation: marq 56s linear infinite; }
.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker__set { display: flex; align-items: center; flex: none; }
.ticker__item { display: flex; align-items: center; gap: 28px; padding-right: 28px; font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; line-height: 64px; }
.ticker__item svg { width: 14px; height: 14px; color: var(--red); flex: none; }
@keyframes marq { to { transform: translateX(-50%); } }

/* ═══ 2 · QUÉ ES ═══════════════════════════════════════════════ */
.about__grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.about__body { margin-top: 28px; display: grid; gap: 18px; }
.about__who { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.about__who-t { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }
.roles { display: flex; flex-wrap: wrap; gap: 8px 10px; }
.roles li { font-size: 16px; font-weight: 500; color: var(--ink); padding: 7px 14px; border-radius: 6px; background: var(--mist); border: 1px solid var(--line); transition: background-color 200ms, color 200ms, border-color 200ms, transform 300ms var(--ease-out); }
.roles li:hover { background: var(--ink); color: #fff; border-color: var(--ink); transform: translateY(-2px); }

.collage { position: relative; padding: 0 0 70px 0; }
.collage__main { border-radius: 10px; overflow: hidden; aspect-ratio: 4 / 4.4; box-shadow: var(--shadow-m); width: 82%; margin-left: auto; position: relative; }
.collage__main img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; transition: transform 1400ms var(--ease-out); }
.collage:hover .collage__main img { transform: scale(1.04); }
.collage__second { position: absolute; left: 0; bottom: 0; width: 52%; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-l); border: 6px solid #fff; aspect-ratio: 4 / 3; }
.collage__second img { width: 100%; height: 100%; object-fit: cover; }
.collage__badge { position: absolute; right: -8px; bottom: 6px; background: var(--red); color: #fff; padding: 16px 22px 14px; border-radius: 8px; box-shadow: var(--shadow-m); transform: rotate(-3deg); }
.collage__badge b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 46px; line-height: .9; letter-spacing: .01em; font-variant-numeric: tabular-nums; }
.collage__badge > span { display: block; margin-top: 6px; font-size: 15px; font-weight: 500; line-height: 1.25; max-width: 14ch; }

/* ═══ 3 · HERRAMIENTAS ═════════════════════════════════════════ */
.head2 { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 40px; align-items: end; margin-bottom: clamp(36px, 4.4vw, 60px); }
.head2__aside { color: var(--text-2); font-size: 17px; line-height: 1.6; justify-self: end; max-width: 40ch; }
.sec--ink .head2__aside { color: var(--on-ink-2); }

.tools > * { min-width: 0; }
.tools { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(20px, 3vw, 44px); align-items: stretch; }
.tabs { display: flex; flex-direction: column; gap: 10px; }
.tab {
  position: relative; text-align: left; cursor: pointer; width: 100%;
  padding: 20px 22px 22px; border-radius: 8px; background: transparent; border: 1px solid transparent;
  display: grid; grid-template-columns: 1fr auto; column-gap: 12px; row-gap: 4px; align-items: center;
  transition: background-color 250ms, border-color 250ms, box-shadow 350ms var(--ease-out), transform 350ms var(--ease-out);
}
.tab__name { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; letter-spacing: .02em; font-size: 28px; line-height: 1; color: var(--text-3); transition: color 250ms; }
.tab__desc { grid-column: 1 / -1; font-size: 16px; line-height: 1.45; color: var(--text-3); }
.tab__chip { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--amber-ink); background: rgba(232,150,12,.14); padding: 3px 9px 2px; border-radius: 4px; }
.tab__bar { position: absolute; left: 22px; right: 22px; bottom: 0; height: 3px; border-radius: 3px; background: transparent; overflow: hidden; }
.tab__bar::after { content: ''; position: absolute; inset: 0; background: var(--red); transform: scaleX(0); transform-origin: left; }
.tab:hover { background: rgba(13,27,42,.035); }
.tab[aria-selected="true"] { background: #fff; border-color: var(--line); box-shadow: var(--shadow-s); transform: translateX(6px); }
.tab[aria-selected="true"] .tab__name { color: var(--ink); }
.tab[aria-selected="true"] .tab__desc { color: var(--text-2); }
.tab[aria-selected="true"] .tab__bar { background: var(--line); }
.tab[aria-selected="true"] .tab__bar::after { animation: fillbar var(--dur, 8s) linear forwards; }
.tools.is-paused .tab[aria-selected="true"] .tab__bar::after { animation: none; transform: scaleX(1); }
.tools:not(.is-live):not(.is-paused) .tab[aria-selected="true"] .tab__bar::after,
.tools:hover:not(.is-paused) .tab[aria-selected="true"] .tab__bar::after { animation-play-state: paused; }
@keyframes fillbar { to { transform: scaleX(1); } }

.tools__more { margin-top: 18px; padding: 8px 22px 0; display: grid; gap: 10px; }
.tools__more-t { font-size: 15px; color: var(--text-3); }
.tools__more ul { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.tools__more a { font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: text-decoration-color 200ms, color 200ms; }
.tools__more a:hover { color: var(--red); text-decoration-color: var(--red); }

.tools__stage { display: grid; position: relative; }
.panel { grid-area: 1 / 1; position: relative; border-radius: 10px; overflow: hidden; background: var(--ink); min-height: 480px; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease-out), visibility 0s 600ms; box-shadow: var(--shadow-m); }
.panel.is-active { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease-out); z-index: 1; }
.panel__photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 6s var(--ease-out); }
.panel.is-active .panel__photo { transform: scale(1); }
.panel--light .panel__photo { object-fit: contain; background: #fff; padding: 28px 28px 28px 140px; transform: none; }
.panel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(13,27,42,.55) 0%, transparent 55%); pointer-events: none; }
.panel--light::after { display: none; }
.pcard {
  position: absolute; z-index: 2; left: clamp(16px, 2.4vw, 32px); bottom: clamp(16px, 2.4vw, 32px); width: min(380px, calc(100% - 32px));
  background: #fff; color: var(--ink); border-radius: 10px; padding: 24px 24px 22px; box-shadow: var(--shadow-l);
}
.pcard__t { font-family: var(--font-display); font-weight: 800; font-size: 25px; letter-spacing: .02em; text-transform: uppercase; line-height: 1; }
.pcard__s { margin-top: 6px; font-size: 15px; color: var(--text-2); line-height: 1.45; }
.pcard__viz { margin: 18px 0 18px; }
.pcard__cta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.pcard__src { font-size: 14px; color: var(--text-3); }

/* viz · RCP */
.rcp { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: center; }
.rcp__ring { position: relative; width: 96px; height: 96px; display: grid; place-items: center; }
.rcp__ring::before, .rcp__ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); }
.rcp__ring::before { opacity: .25; }
.rcp__ring::after { animation: beat .5454s ease-out infinite; }
.panel:not(.is-active) .rcp__ring::after { animation-play-state: paused; }
@keyframes beat { 0% { transform: scale(.62); opacity: .95; } 100% { transform: scale(1.12); opacity: 0; } }
.rcp__num { position: relative; text-align: center; font-family: var(--font-display); font-weight: 800; font-size: 36px; line-height: .85; color: var(--ink); }
.rcp__num small { display: block; font-family: var(--font-body); font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-top: 5px; }
.specs { display: grid; gap: 7px; font-size: 15px; }
.specs li { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding-bottom: 7px; border-bottom: 1px dashed var(--line-2); }
.specs li:last-child { border-bottom: 0; padding-bottom: 0; }
.specs span { color: var(--text-2); }
.specs b { font-family: var(--font-display); font-weight: 700; font-size: 19px; letter-spacing: .02em; }

/* viz · Shock */
.shock { display: grid; gap: 12px; }
.shock__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; align-items: end; height: 74px; }
.shock__bars div { position: relative; border-radius: 4px 4px 2px 2px; background: var(--mist-2); display: flex; align-items: flex-end; justify-content: center; transition: background-color 350ms, transform 450ms var(--ease-out); padding-bottom: 6px; font-family: var(--font-display); font-weight: 800; font-size: 20px; color: var(--text-3); }
.shock__bars div:nth-child(1) { height: 34%; } .shock__bars div:nth-child(2) { height: 55%; } .shock__bars div:nth-child(3) { height: 78%; } .shock__bars div:nth-child(4) { height: 100%; }
.shock__bars div.on { background: var(--red); color: #fff; transform: translateY(-5px); }
.shock__row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; font-size: 15px; }
.shock__row span { color: var(--text-2); display: block; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
.shock__row b { font-family: var(--font-display); font-weight: 700; font-size: 21px; letter-spacing: .02em; transition: opacity 250ms; }

/* viz · DEA */
.dea { display: grid; gap: 10px; }
.dea__scr { background: var(--ink); border-radius: 6px; padding: 12px 14px 10px; color: #8FD3F4; position: relative; overflow: hidden; }
.dea__scr svg { width: 100%; height: 54px; display: block; }
.dea__scr path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 520; stroke-dashoffset: 520; animation: trace 4.8s linear infinite; }
@keyframes trace { 0% { stroke-dashoffset: 520; } 70%, 100% { stroke-dashoffset: 0; } }
.dea__st { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: .08em; text-transform: uppercase; color: #fff; }
.dea__st em { font-style: normal; color: #8FD3F4; font-size: 15px; }
.dea__msg { transition: opacity 300ms; }

/* ═══ 4 · GUÍAS ════════════════════════════════════════════════ */
.gtabs { display: flex; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
@media (min-width: 1101px) { .gtabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.gtab { display: flex; align-items: center; gap: 14px; padding: 8px 20px 8px 8px; border-radius: 8px; cursor: pointer; border: 1px solid var(--line); background: #fff; transition: border-color 250ms, box-shadow 350ms var(--ease-out), transform 350ms var(--ease-out); text-align: left; }
.gtab img { width: 54px; height: 54px; object-fit: contain; flex: none; background: var(--mist); border-radius: 6px; padding: 4px; }
.gtab__n { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: 21px; letter-spacing: .03em; line-height: 1; color: var(--text-2); transition: color 250ms; }
.gtab__k { font-size: 14px; color: var(--text-3); margin-top: 3px; }
.gtab:hover { border-color: var(--line-2); transform: translateY(-2px); }
.gtab[aria-selected="true"] { border-color: var(--ink); box-shadow: var(--shadow-s); }
.gtab[aria-selected="true"] .gtab__n { color: var(--ink); }

.gstage { display: grid; position: relative; }
.gp { grid-area: 1 / 1; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); background: var(--tint); border-radius: 12px; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity 600ms var(--ease-out), visibility 0s 600ms; min-height: 560px; }
.gp.is-active { opacity: 1; visibility: visible; transition: opacity 600ms var(--ease-out); z-index: 1; }
.gp__vis { position: relative; display: grid; place-items: center; padding: clamp(28px, 4vw, 56px); perspective: 1400px; }
.gp__vis::before { content: ''; position: absolute; left: 50%; top: 50%; translate: -50% -50%; width: 62%; aspect-ratio: 1; border-radius: 50%; background: var(--glow); filter: blur(2px); opacity: .9; }
.gp__vis img { position: relative; width: min(100%, 560px); filter: drop-shadow(0 26px 34px rgba(13,27,42,.22)); transform: rotateY(calc(var(--ry, 0) * 9deg)) rotateX(calc(var(--rx, 0) * -6deg)); transition: transform 500ms var(--ease-out); }
.gp.is-active .gp__vis img { animation: gin 1100ms var(--ease-out) both; }
@keyframes gin { from { opacity: 0; transform: translateY(40px) rotate(-4deg) scale(.94); } to { opacity: 1; } }
.gp__info { padding: clamp(28px, 4vw, 56px) clamp(24px, 4vw, 56px) clamp(28px, 4vw, 56px) 0; display: flex; flex-direction: column; justify-content: center; gap: 22px; }
.gp__type { display: inline-flex; align-self: flex-start; font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink); background: rgba(255,255,255,.75); padding: 4px 11px 3px; border-radius: 4px; }
.gp__name { font-weight: 800; font-size: clamp(38px, 4.4vw, 62px); line-height: .95; letter-spacing: .005em; }
.gp__desc { font-size: 18px; line-height: 1.6; color: var(--text-2); max-width: 44ch; }
.gp__inc { background: rgba(255,255,255,.72); border-radius: 8px; padding: 16px 18px; font-size: 16px; line-height: 1.5; color: var(--ink); }
.gp__inc b { display: block; font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 4px; color: var(--ink); }
.gp__tags { display: flex; flex-wrap: wrap; gap: 6px 8px; }
.gp__tags li { font-size: 14px; font-weight: 500; padding: 5px 11px; border-radius: 6px; background: rgba(255,255,255,.75); color: var(--ink); }
.gp__cta { display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center; margin-top: 4px; }
.guides__foot { margin-top: 28px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; color: var(--text-2); font-size: 17px; }

/* ═══ 5 · MPH+ (oscura, contraste) ═════════════════════════════ */
.mph { overflow: hidden; }
.mph::before { content: ''; position: absolute; width: 900px; height: 900px; right: -260px; top: -260px; background: radial-gradient(circle, rgba(204,41,54,.16), transparent 62%); pointer-events: none; }
.mph__grid { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: center; }
.mph__title { font-weight: 800; font-size: clamp(60px, 8.4vw, 124px); line-height: .86; letter-spacing: 0; }
.mph__title i { font-style: normal; color: var(--red); }
.mph__sub { margin-top: 18px; font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.2vw, 30px); letter-spacing: .03em; text-transform: uppercase; color: var(--on-ink-2); }
.mph .lead { margin-top: 22px; }
.ways { margin-top: 34px; display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid rgba(240,242,244,.16); }
.way { padding: 22px 24px 4px 0; }
.way + .way { padding-left: 24px; padding-right: 0; border-left: 1px solid rgba(240,242,244,.16); }
.way h3 { font-weight: 800; font-size: 25px; letter-spacing: .03em; line-height: 1; color: #fff; }
.way p { margin-top: 10px; font-size: 16px; line-height: 1.55; color: var(--on-ink-2); }
.way .link-h { margin-top: 14px; font-size: 16px; }
.mph__cta { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 14px; }

.fan { position: relative; --w: clamp(120px, 15.4vw, 218px); height: calc(var(--w) * 1.62); max-width: 640px; margin: 0 auto; width: 100%; }
.fan__item { position: absolute; left: 50%; top: 50%; width: var(--w); z-index: calc(var(--n) * 2); transform: translate(-50%, -50%) rotate(0deg); transition: transform 1100ms var(--ease-out) calc(var(--n) * 90ms), filter 400ms; }
.fan.is-in .fan__item { transform: translate(calc(-50% + var(--k) * var(--w) * .62), calc(-50% + var(--k) * var(--k) * 8px - 14px)) rotate(calc(var(--k) * 6.5deg)); }
.fan__item a { display: block; border-radius: 4px; overflow: hidden; box-shadow: 0 2px 6px rgba(0,0,0,.35), 0 26px 40px rgba(0,0,0,.45); outline-offset: 4px; }
.fan__item img { width: 100%; aspect-ratio: 600 / 850; object-fit: cover; }
.fan__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 38px 12px 12px; background: linear-gradient(transparent, rgba(13,27,42,.92)); color: #fff; font-size: 14px; line-height: 1.25; opacity: 0; transform: translateY(8px); transition: opacity 300ms, transform 400ms var(--ease-out); }
.fan__cap b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 20px; letter-spacing: .04em; text-transform: uppercase; }
.fan.is-in .fan__item:hover, .fan.is-in .fan__item:focus-within { transform: translate(calc(-50% + var(--k) * var(--w) * .62), calc(-50% - 34px)) rotate(0deg) scale(1.07); z-index: 20; transition-delay: 0s; transition-duration: 450ms; }
.fan__item:hover .fan__cap, .fan__item:focus-within .fan__cap { opacity: 1; transform: none; }
.fan__hint { text-align: center; margin-top: 18px; font-size: 15px; color: var(--on-ink-2); }

.campus { position: relative; margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid rgba(240,242,244,.14); display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(28px, 5vw, 80px); align-items: center; }
.campus h3 { font-weight: 800; font-size: clamp(32px, 3.6vw, 50px); line-height: .98; color: #fff; }
.campus p { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--on-ink-2); max-width: 46ch; }
.campus__tools { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }
.campus__tools li { font-size: 14px; font-weight: 500; color: var(--on-ink); border: 1px solid rgba(240,242,244,.22); border-radius: 6px; transition: background-color 200ms, color 200ms, border-color 200ms; }
.campus__tools li:hover { background: #fff; color: var(--ink); border-color: #fff; }
.campus__tools a { display: block; padding: 5px 11px; color: inherit; text-decoration: none; }
.campus .link-h { margin-top: 26px; }
.campus__img { position: relative; }
.campus__img img { width: 100%; filter: drop-shadow(0 30px 46px rgba(0,0,0,.5)); }

/* ═══ 6 · REELS ════════════════════════════════════════════════ */
.reels__grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); align-items: center; }
.reels__txt .lead { margin-top: 20px; }
.reels__ig { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.pod { margin-top: 34px; display: grid; grid-template-columns: 72px 1fr; gap: 16px; align-items: center; padding-top: 24px; border-top: 1px solid var(--line); text-decoration: none; }
.pod img { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; box-shadow: var(--shadow-s); transition: transform 400ms var(--ease-out); }
.pod:hover img { transform: rotate(-4deg) scale(1.05); }
.pod b { display: block; font-family: var(--font-display); font-weight: 800; font-size: 22px; letter-spacing: .03em; text-transform: uppercase; line-height: 1; }
.pod span { display: block; margin-top: 6px; font-size: 15px; line-height: 1.45; color: var(--text-2); }
.pod:hover b { color: var(--red); }

.reels__strip { display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 34px 4px 40px; margin: -34px -4px -40px; scrollbar-width: none; mask-image: linear-gradient(90deg, #000 0, #000 92%, transparent); -webkit-mask-image: linear-gradient(90deg, #000 0, #000 92%, transparent); }
.reels__strip::-webkit-scrollbar { display: none; }
.reel { position: relative; flex: none; width: clamp(168px, 17vw, 218px); aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--ink); scroll-snap-align: start; cursor: pointer; box-shadow: 0 2px 4px rgba(13,27,42,.08), 0 12px 22px rgba(13,27,42,.16); border: 0; padding: 0; transition: transform 500ms var(--ease-out), box-shadow 500ms var(--ease-out); }
.reel:nth-child(even) { transform: translateY(26px); }
.reel:hover { transform: translateY(-8px) scale(1.02); box-shadow: 0 4px 8px rgba(13,27,42,.1), 0 18px 30px rgba(13,27,42,.2); }
.reel:nth-child(even):hover { transform: translateY(18px) scale(1.02); }
.reel video, .reel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel::after { content: ''; position: absolute; inset: 0; background: linear-gradient(transparent 62%, rgba(13,27,42,.6)); pointer-events: none; }
.reel__ic { position: absolute; z-index: 2; right: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.94); color: var(--ink); display: grid; place-items: center; transition: opacity 300ms, transform 300ms var(--ease-out); }
.reel__ic svg { width: 16px; height: 16px; }
.reel__snd { position: absolute; z-index: 3; left: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; color: #fff; background: rgba(13,27,42,.62); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.28); transition: background-color 200ms, transform 200ms; }
.reel__snd svg { width: 18px; height: 18px; }
.reel__snd.is-on { background: var(--red); border-color: var(--red); }
.reel__snd:active { transform: scale(.92); }
.reel .i-pause { display: none; }
.reel.is-playing .i-play { display: none; }
.reel.is-playing .i-pause { display: block; }
.reel.is-playing .reel__ic { opacity: 0; transform: scale(.8); }
.reel.is-playing:hover .reel__ic { opacity: 1; transform: none; }

/* ═══ 7 · CIERRE ═══════════════════════════════════════════════ */
.close { padding: clamp(72px, 9vw, 120px) 0 clamp(96px, 10vw, 140px); overflow: hidden; }
.close__ecg { position: absolute; inset: auto 0 -6px 0; height: 84px; width: 100%; opacity: .6; pointer-events: none; }
.close__ecg path { fill: none; stroke: rgba(240,242,244,.16); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
@keyframes ecg { from { stroke-dashoffset: 240; } to { stroke-dashoffset: -1900; } }
.close__ecg .beat { stroke: var(--red); stroke-width: 2.5; stroke-dasharray: 240 2400; stroke-dashoffset: 240; animation: ecg 6.4s linear infinite; }
.close__t { position: relative; font-weight: 800; font-size: clamp(46px, 6.4vw, 92px); line-height: .9; max-width: 14ch; }
.close__t em { font-style: normal; color: var(--red); }
.close__grid { position: relative; display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(36px, 6vw, 100px); align-items: end; }
.close__l .lead { margin-top: 28px; max-width: 34ch; }
.paths { position: relative; border-top: 1px solid rgba(240,242,244,.18); }
.path { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px 24px; padding: clamp(20px, 2.4vw, 30px) 0; border-bottom: 1px solid rgba(240,242,244,.18); text-decoration: none; position: relative; isolation: isolate; }
.path::before { content: ''; position: absolute; inset: 0 -20px; background: rgba(240,242,244,.06); transform: scaleY(0); transform-origin: bottom; transition: transform 450ms var(--ease-out); z-index: -1; border-radius: 6px; }
.path:hover::before, .path:focus-visible::before { transform: scaleY(1); }
.path__n { font-family: var(--font-display); font-weight: 800; text-transform: uppercase; font-size: clamp(30px, 3.2vw, 46px); line-height: 1; letter-spacing: .01em; transition: transform 450ms var(--ease-out), color 250ms; }
.path:hover .path__n { transform: translateX(10px); color: #fff; }
.path__d { font-size: 17px; line-height: 1.5; color: var(--on-ink-2); }
.path__a { grid-column: 2; grid-row: 1 / 3; width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid rgba(240,242,244,.4); display: grid; place-items: center; transition: background-color 250ms, border-color 250ms, transform 450ms var(--ease-out); }
.path__a svg { width: 22px; height: 22px; }
.path:hover .path__a { background: var(--red); border-color: var(--red); transform: rotate(-45deg); }
.channels { position: relative; z-index: 1; margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; color: var(--on-ink-2); font-size: 16px; }
.channels a { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: #fff; font-weight: 500; transition: color 200ms; }
.channels a:hover { color: var(--amber); }
.channels svg { width: 20px; height: 20px; }

/* ═══ Responsive ═══════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .tools { grid-template-columns: minmax(0, 1fr); }
  .tabs { flex-direction: row; overflow-x: auto; scrollbar-width: none; gap: 8px; padding-bottom: 6px; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { width: auto; min-width: 250px; flex: none; }
  .tab[aria-selected="true"] { transform: none; }
  .tools__more { padding-left: 4px; }
  .gp { grid-template-columns: 1fr; min-height: 0; }
  .gp__info { padding: 0 clamp(24px, 4vw, 48px) clamp(28px, 4vw, 48px); }
  .gp__vis { padding-bottom: 12px; }
  .gp__vis img { width: min(86%, 420px); }
}
@media (max-width: 960px) {
  .close__grid { grid-template-columns: 1fr; }
  .hero__live { display: none; }
  .about__grid, .mph__grid, .campus, .reels__grid, .head2 { grid-template-columns: 1fr; }
  .head2__aside { justify-self: start; }
  .collage { max-width: 560px; }
  .campus__img { order: -1; }
  .reels__txt { order: 0; }
  .path { grid-template-columns: 1fr auto; }
  .path__d { grid-column: 1 / 2; grid-row: 2; }
  .path__a { grid-row: 1 / 3; grid-column: 2; }
  .panel { min-height: 0; display: flex; flex-direction: column; background: #fff; }
  .panel__photo { position: relative; height: 260px; transform: none !important; }
  .panel--light .panel__photo { padding: 16px; height: 260px; }
  .panel::after { display: none; }
  .pcard { position: relative; left: auto; bottom: auto; width: auto; margin: -36px 16px 16px; }
}
@media (max-width: 640px) {
  .ways { grid-template-columns: 1fr; }
  .way, .way + .way { padding: 20px 0 8px; border-left: 0; }
  .way + .way { border-top: 1px solid rgba(240,242,244,.16); }
  .hero__cta .btn-h { width: 100%; }
  .gtab { flex: 1 1 100%; }
  .tab { flex: 0 0 min(80vw, 320px); min-width: 0; }
  .tab__name { font-size: 25px; }
  .collage__badge { right: 0; }
  .reel { width: 176px; }
  .guides__foot { flex-direction: column; align-items: flex-start; }
  .ticker__item { font-size: 19px; line-height: 56px; }
}

/* Movimiento reducido: todo queda en su estado final */
/* (bloque reduced-motion retirado) */

/* Movimiento: el sitio ya no se apaga con el ajuste «reducir movimiento» del teléfono (muchos Android lo activan con el ahorro de batería y dejaba todo estático). Las animaciones son suaves (fundidos y desplazamientos cortos). */

/* Simuladores 3D dentro del bloque MPH+ */
.sims { position: relative; margin-top: clamp(56px, 7vw, 96px); padding-top: clamp(40px, 5vw, 64px); border-top: 1px solid rgba(240,242,244,.16); display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1fr) minmax(0, 1fr); gap: clamp(22px, 3vw, 44px); align-items: start; }
.sims__head { max-width: 64ch; position: sticky; top: 110px; }
.sims__eyebrow { font-family: var(--font-display); font-weight: 700; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.sims__head h3 { margin-top: 10px; font-family: var(--font-display); font-weight: 800; font-size: clamp(30px, 3.4vw, 46px); line-height: 1; text-transform: uppercase; color: var(--on-ink); }
.sims__head > p:not(.sims__eyebrow) { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--on-ink-2); }
.sims__grid { display: contents; }
.sim a { display: grid; gap: 18px; color: inherit; text-decoration: none; }
.sim__frame { display: block; border-radius: 12px; overflow: hidden; border: 1px solid rgba(240,242,244,.18); background: #0a1622; box-shadow: 0 2px 6px rgba(0,0,0,.35), 0 28px 46px rgba(0,0,0,.45); transition: transform 400ms var(--ease-out), box-shadow 400ms; }
.sim__frame img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.sim a:hover .sim__frame, .sim a:focus-visible .sim__frame { transform: translateY(-6px); box-shadow: 0 2px 6px rgba(0,0,0,.35), 0 38px 56px rgba(0,0,0,.5); }
.sim figcaption { display: grid; gap: 8px; }
.sim__tag { font-family: var(--font-display); font-weight: 700; font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); }
.sim figcaption b { font-family: var(--font-display); font-weight: 800; font-size: clamp(26px, 2.4vw, 34px); line-height: 1; text-transform: uppercase; color: var(--on-ink); }
.sim figcaption > span:not(.sim__tag):not(.sim__go) { font-size: 16px; line-height: 1.55; color: var(--on-ink-2); max-width: 56ch; }
.sim__go { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; font-family: var(--font-display); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; color: var(--on-ink); }
.sim__go svg { width: 17px; height: 17px; transition: transform 260ms var(--ease-out); }
.sim a:hover .sim__go svg { transform: translateX(5px); }
.sims__note { grid-column: 1 / -1; margin-top: 4px; font-size: 14px; color: var(--on-ink-2); }
@media (max-width: 1020px) { .sims { grid-template-columns: repeat(2, minmax(0, 1fr)); } .sims__head { grid-column: 1 / -1; position: static; } }
@media (max-width: 640px) { .sims { grid-template-columns: 1fr; } }
