/* Coronel Truman · base común de todas las páginas
   Valores tomados de public/css/styles.css (web actual): fondo #F5F5F5, rojo #be3e35,
   logo 88/110/130 px a 8vh, puntos laterales 34/46/54 px, tooltip Oswald en mayúsculas. */

@view-transition { navigation: auto; }

:root {
  --gris: #f5f5f5;
  --oscuro: #1a1a1a;
  --punto: #2e2e2f;
  --rojo: #be3e35;
  --texto-suave: rgba(26, 26, 26, 0.62);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --logo: 88px;
  --punto-t: 34px;
  --icono: 14px;
  --nav-dcha: 1.8rem;
}
@media (min-width: 1400px) { :root { --logo: 110px; --punto-t: 46px; --icono: 20px; --nav-dcha: 2.8rem; } }
@media (min-width: 1920px) { :root { --logo: 130px; --punto-t: 54px; --icono: 24px; --nav-dcha: 3.5rem; } }

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Roboto", system-ui, sans-serif; font-weight: 300; color: var(--oscuro); background: var(--gris); min-height: 100svh; }
a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--oscuro); outline-offset: 4px; border-radius: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: fixed; top: 1rem; left: 1rem; z-index: 200; background: var(--oscuro); color: #fff; padding: 0.6rem 1rem; font-family: "Oswald", sans-serif; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; transform: translateY(-200%); }
.saltar:focus { transform: none; }

/* ── Logo (igual que la web actual) ── */
.logo { view-transition-name: logo; position: fixed; top: 8vh; left: 50%; transform: translateX(-50%); width: var(--logo); z-index: 50; }
.logo img { width: 100%; height: auto; }

/* ── Navegación lateral: los cuatro iconos originales ── */
.lateral { view-transition-name: lateral; position: fixed; right: var(--nav-dcha); top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 100; }
@media (min-width: 1400px) { .lateral { gap: 16px; } }
@media (min-width: 1920px) { .lateral { gap: 20px; } }
.punto { position: relative; width: var(--punto-t); height: var(--punto-t); border-radius: 50%; background: #fff; color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14), 0 0.5px 1px rgba(0, 0, 0, 0.08); transition: background 0.25s, color 0.25s, transform 0.25s, box-shadow 0.25s; }
.punto svg { width: var(--icono); height: var(--icono); }
.punto:hover, .punto[aria-current] { background: var(--punto); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.22); }
.punto:hover { transform: scale(1.08); }
.punto::before { content: attr(data-etiqueta); position: absolute; right: calc(100% + 10px); top: 50%; transform: translateY(-50%) translateX(4px); background: var(--punto); color: #fff; font-family: "Oswald", sans-serif; font-size: 0.6rem; font-weight: 500; text-transform: uppercase; padding: 0.22rem 0.55rem; border-radius: 4px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.2s ease, transform 0.2s ease; }
@media (min-width: 1400px) { .punto::before { font-size: 0.7rem; padding: 0.3rem 0.65rem; right: calc(100% + 14px); } }
.punto:hover::before, .punto:focus-visible::before { opacity: 1; transform: translateY(-50%) translateX(0); }
.punto:focus-visible { outline-offset: 3px; border-radius: 50%; }

/* ── Enlace con flecha: línea que se abre desde el centro, nunca subrayado ── */
.enlace { display: inline-flex; align-items: center; gap: 0.6em; font-family: "Oswald", sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; padding-bottom: 0.35em; background: linear-gradient(currentColor, currentColor) center bottom / 0% 1.5px no-repeat; transition: background-size 0.25s var(--ease); }
.enlace:hover, .enlace:focus-visible { background-size: 100% 1.5px; }
.enlace .flecha { display: inline-block; transition: transform 0.25s var(--ease); }
.enlace:hover .flecha, .enlace:focus-visible .flecha { transform: translateX(5px); }

/* ── Pie discreto: Kit Digital, Área privada y legales ── */
.pie { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.3rem 1.4rem; padding: 3rem 6rem 2.4vh; font-size: 0.72rem; letter-spacing: 0.02em; color: var(--texto-suave); }
.pie.fijo { position: fixed; left: 0; right: 0; bottom: 2.4vh; z-index: 40; padding: 0 6rem; pointer-events: none; }
.pie > * { pointer-events: auto; }
.pie a { transition: color 0.2s; }
.pie a:hover, .pie a:focus-visible { color: var(--oscuro); }

/* ── Botón de pausa (movimiento y vídeo): mismo lenguaje que los puntos ── */
.pausa { position: fixed; left: var(--nav-dcha); bottom: 2.4vh; z-index: 60; width: var(--punto-t); height: var(--punto-t); border-radius: 50%; background: #fff; color: rgba(0, 0, 0, 0.5); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.14); transition: background 0.25s, color 0.25s; }
.pausa svg { width: calc(var(--icono) * 0.85); height: calc(var(--icono) * 0.85); }
.pausa:hover { background: var(--punto); color: #fff; }
.pausa .i-play { display: none; }
.pausa[aria-pressed="true"] .i-play { display: block; }
.pausa[aria-pressed="true"] .i-pausa { display: none; }

/* ── Marca de entorno de desarrollo (no va a producción) ── */
.dev { position: fixed; top: 1rem; left: 1rem; z-index: 300; font-family: "Oswald", sans-serif; font-size: 0.62rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto-suave); border: 1px solid rgba(0, 0, 0, 0.18); padding: 0.25rem 0.55rem; border-radius: 3px; }

/* ── Recurso provisional: hueco neutro con su descripción, se sustituye por la imagen final ── */
.provisional { position: relative; overflow: hidden; background: linear-gradient(135deg, #dcdcdc, #c9c9c9 55%, #d6d6d6); display: flex; align-items: flex-end; }
.provisional img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.provisional figcaption { position: relative; margin: 1rem; font-size: 0.72rem; line-height: 1.45; color: rgba(26, 26, 26, 0.7); max-width: 34ch; }
.provisional figcaption b { display: block; font-family: "Oswald", sans-serif; font-weight: 500; text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.62rem; margin-bottom: 0.2rem; }

/* ── Transición entre páginas: fundido breve, logo y navegación quietos ── */
::view-transition-old(root) { animation: 260ms ease both salir; }
::view-transition-new(root) { animation: 380ms var(--ease) 80ms both entrar; }
::view-transition-group(logo), ::view-transition-group(lateral) { animation-duration: 0s; }
@keyframes salir { to { opacity: 0; } }
@keyframes entrar { from { opacity: 0; } }

/* ── Revelado de titulares por líneas con máscara ── */
.revela .l { display: block; overflow: hidden; padding: 0.14em 0.06em 0.1em; margin: -0.14em -0.06em -0.1em; }
.revela .l > span { display: inline-block; transform: translateY(110%); animation: subir 0.72s var(--ease) forwards; }
.revela .l:nth-child(2) > span { animation-delay: 0.08s; }
.revela .l:nth-child(3) > span { animation-delay: 0.16s; }
@keyframes subir { to { transform: none; } }
.aparece { opacity: 0; animation: fundir 0.6s var(--ease) 0.35s forwards; }
@keyframes fundir { to { opacity: 1; } }

/* ── Móvil: los mismos puntos, en fila abajo ── */
@media (max-width: 767px) {
  :root { --logo: 72px; --punto-t: 44px; --icono: 17px; }
  .logo { top: 5vh; }
  .lateral { top: auto; bottom: max(14px, env(safe-area-inset-bottom)); right: 50%; transform: translateX(50%); flex-direction: row; gap: 12px; padding: 7px; border-radius: 40px; background: rgba(245, 245, 245, 0.78); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
  .punto::before { display: none; }
  .pie, .pie.fijo { position: static; pointer-events: auto; padding: 2rem 1.5rem calc(6rem + env(safe-area-inset-bottom)); }
  .pausa { left: auto; right: 1rem; top: 1rem; bottom: auto; width: 36px; height: 36px; }
  .dev { top: 0.6rem; left: 0.6rem; font-size: 0.55rem; }
  .logo { position: absolute; }
}

@media (prefers-reduced-motion: reduce) {
  @view-transition { navigation: none; }
  .revela .l > span, .aparece { animation: none; transform: none; opacity: 1; }
  .enlace, .enlace .flecha, .punto { transition: none; }
}

/* Volver: la flecha va hacia la izquierda */
.volver { font-size: 0.74rem; margin-bottom: clamp(1.2rem, 3vh, 2rem); }
.volver:hover .flecha, .volver:focus-visible .flecha { transform: translateX(-5px); }

/* Revelado al entrar en pantalla (páginas con revelar.js u horizontal.js) */
.js-revela :is(section, .escena-h):not(.vista) :is(.revela .l > span, .aparece, .provisional, .dispositivos, .pasos li) { animation-play-state: paused; }
.js-revela section:not(.vista) .pasos::before { animation-play-state: paused; }

/* Textos compensados en toda la web: sin una línea muy larga y otra muy corta */
p { text-wrap: balance; }
