/* ==========================================================================
   GLOBALVETS · Modelo 3 · Video
   Paleta: blanco, #1e293b y acento rojo #CD0610 (aro del logo)
   ========================================================================== */

@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-500-normal.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('fonts/inter-600-normal.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/inter-tight-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/inter-tight-800-normal.woff2') format('woff2');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

@view-transition {
  navigation: auto;
}

:root {
  --tinta: #1e293b;
  --tinta-profunda: #0f172a;
  --texto: #334155;
  --rojo: #cd0610;
  --rojo-oscuro: #a30510;
  --blanco: #ffffff;
  --humo: #f3f5f8;
  --linea: #d8dee8;
  --sombra: 0 18px 40px -22px rgba(15, 23, 42, 0.45);
  --barra-alto: 42px;
  --cabecera-alto: 76px;
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --fuente: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --fuente-titulo: 'Inter Tight', 'Inter', system-ui, sans-serif;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

html.lenis,
html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--texto);
  background: var(--blanco);
  overflow-x: hidden;
}

img,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--rojo);
  outline-offset: 3px;
}

.salto {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 200;
  background: var(--tinta);
  color: var(--blanco);
  padding: 10px 14px;
  border-radius: 6px;
  text-decoration: none;
}

.salto:focus {
  top: 12px;
}

.wrap {
  width: min(1200px, 100% - 48px);
  margin-inline: auto;
}

.visualmente-oculto {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Iconos SVG de línea ---------- */
.icono {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* ==========================================================================
   1. AVISO DE DEMOSTRACIÓN Y SELECTOR DE MODELOS
   ========================================================================== */
.barra-demo {
  background: var(--tinta-profunda);
  color: #e2e8f0;
  font-size: 0.82rem;
  line-height: 1.4;
  position: relative;
  z-index: 90;
}

.barra-interior {
  min-height: var(--barra-alto);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 6px;
}

.barra-texto {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.barra-acciones {
  display: flex;
  align-items: center;
  gap: 20px;
  white-space: nowrap;
  flex: none;
}

.barra-enlace {
  color: var(--blanco);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.barra-enlace:hover {
  color: #fecaca;
}

.selector {
  position: relative;
}

.selector summary {
  list-style: none;
  cursor: pointer;
  color: var(--blanco);
  font-weight: 600;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease);
}

.selector summary:hover {
  background: var(--blanco);
  color: var(--tinta-profunda);
}

.selector summary::-webkit-details-marker {
  display: none;
}

.selector summary::after {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-left: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.selector[open] summary::after {
  transform: translateY(2px) rotate(-135deg);
}

.selector ul {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  z-index: 95;
  list-style: none;
  margin: 0;
  padding: 8px;
  min-width: 220px;
  background: var(--blanco);
  color: var(--tinta);
  border-radius: 12px;
  box-shadow: var(--sombra);
  border: 1px solid var(--linea);
}

.selector li a {
  display: block;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--tinta);
  text-decoration: none;
  font-size: 0.9rem;
}

.selector li a:hover {
  background: var(--humo);
  color: var(--rojo);
}

.selector li a[aria-current='page'] {
  font-weight: 600;
  color: var(--rojo);
}

/* ==========================================================================
   2. CABECERA Y NAVEGACIÓN
   ========================================================================== */
.cabecera {
  position: sticky;
  top: 0;
  z-index: 80;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--linea);
}

.cabecera-interior {
  min-height: var(--cabecera-alto);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.marca img {
  width: 178px;
  height: auto;
}

.menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.menu a {
  text-decoration: none;
  color: var(--tinta);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding-block: 6px;
}

.menu a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}

.menu a:hover::after,
.menu a[aria-current='page']::after {
  transform: scaleX(1);
}

.menu a[aria-current='page'] {
  color: var(--rojo);
}

.boton-menu {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--linea);
  border-radius: 10px;
  background: var(--blanco);
  cursor: pointer;
  padding: 0;
  position: relative;
}

.boton-menu span {
  position: absolute;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--tinta);
  transition: transform 0.4s var(--ease), opacity 0.3s;
}

.boton-menu span:nth-child(1) { top: 15px; }
.boton-menu span:nth-child(2) { top: 21px; }
.boton-menu span:nth-child(3) { top: 27px; }

.boton-menu[aria-expanded='true'] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.boton-menu[aria-expanded='true'] span:nth-child(2) { opacity: 0; }
.boton-menu[aria-expanded='true'] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.menu-movil {
  display: none;
  border-top: 1px solid var(--linea);
  background: var(--blanco);
}

.menu-movil[hidden] {
  display: none;
}

.menu-movil a {
  display: block;
  padding: 14px 0;
  border-bottom: 1px solid var(--linea);
  color: var(--tinta);
  text-decoration: none;
  font-weight: 500;
}

/* ==========================================================================
   3. BOTONES Y MICROINTERACCIONES
   ========================================================================== */
.boton {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--rojo);
  background: var(--rojo);
  color: var(--blanco);
  font: 600 0.98rem/1 var(--fuente);
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transform: translate3d(var(--mx, 0), var(--my, 0), 0);
  transition: transform 0.35s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease);
}

.boton::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--tinta);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 0.55s var(--ease);
  z-index: -1;
}

.boton:hover::before,
.boton:focus-visible::before {
  transform: scaleX(1);
}

.boton:hover {
  border-color: var(--tinta);
}

.boton-secundario {
  background: transparent;
  color: var(--blanco);
  border-color: rgba(255, 255, 255, 0.85);
}

.boton-secundario::before {
  background: var(--blanco);
}

.boton-secundario:hover {
  color: var(--tinta);
  border-color: var(--blanco);
}

.boton-oscuro {
  background: transparent;
  color: var(--tinta);
  border-color: var(--tinta);
}

.boton-oscuro::before {
  background: var(--tinta);
}

.boton-oscuro:hover {
  color: var(--blanco);
}

.boton-flecha svg {
  width: 18px;
  height: 18px;
  transition: transform 0.45s var(--ease);
}

.boton-flecha:hover svg {
  transform: translateX(4px);
}

.boton-sm {
  padding: 10px 18px;
  font-size: 0.9rem;
}

/* Cursor propio: solo escritorio con puntero fino */
.cursor-punto,
.cursor-aro {
  display: none;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1024px) {
  html.cursor-propio,
  html.cursor-propio a,
  html.cursor-propio button,
  html.cursor-propio summary {
    cursor: none;
  }

  .cursor-punto,
  .cursor-aro {
    display: block;
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    z-index: 999;
    border-radius: 50%;
    transform: translate3d(-50%, -50%, 0);
  }

  .cursor-punto {
    width: 8px;
    height: 8px;
    background: var(--rojo);
    opacity: 0;
  }

  .cursor-aro {
    opacity: 0;
    width: 40px;
    height: 40px;
    border: 1.5px solid var(--rojo);
    transition: width 0.35s var(--ease), height 0.35s var(--ease), background 0.35s var(--ease);
  }

  .cursor-aro.activo {
    width: 64px;
    height: 64px;
    background: rgba(205, 6, 16, 0.08);
  }
}

/* ==========================================================================
   4. SECCIONES, TITULARES Y MARCOS DE VIDEO
   ========================================================================== */
.etiqueta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rojo);
  margin: 0 0 18px;
}

.etiqueta::before {
  content: '';
  width: 26px;
  height: 2px;
  background: var(--rojo);
}

.etiqueta-clara {
  color: #fecaca;
}

.etiqueta-clara::before {
  background: #fecaca;
}

h1,
h2,
h3 {
  font-family: var(--fuente-titulo);
  color: var(--tinta);
  line-height: 1.08;
  margin: 0;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 5.6vw, 4.6rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 3.8vw, 3.1rem);
  font-weight: 800;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
}

.titular-claro,
.titular-claro h1,
.titular-claro h2 {
  color: var(--blanco);
}

/* Reveal de titulares: cada palabra sube desde una máscara */
.reveal-palabras .palabra {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.08em;
}

.reveal-palabras .palabra > span {
  display: inline-block;
  transform: translate3d(0, 105%, 0);
  will-change: transform;
}

.reveal-palabras.listo .palabra > span {
  transform: translate3d(0, 0, 0);
  transition: transform 0.9s var(--ease);
}

.reveal-palabras.listo .palabra:nth-child(2) > span { transition-delay: 0.05s; }
.reveal-palabras.listo .palabra:nth-child(3) > span { transition-delay: 0.1s; }
.reveal-palabras.listo .palabra:nth-child(4) > span { transition-delay: 0.15s; }
.reveal-palabras.listo .palabra:nth-child(5) > span { transition-delay: 0.2s; }
.reveal-palabras.listo .palabra:nth-child(6) > span { transition-delay: 0.25s; }
.reveal-palabras.listo .palabra:nth-child(7) > span { transition-delay: 0.3s; }

/* Entrada de página */
.entrada {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

.entrada.visible {
  opacity: 1;
  transform: none;
}

/* ---------- Hero (inicio) ---------- */
.hero {
  position: relative;
  min-height: min(calc(100svh - var(--barra-alto) - var(--cabecera-alto)), 820px);
  display: flex;
  align-items: center;
  background: var(--tinta-profunda);
  color: var(--blanco);
  overflow: hidden;
  isolation: isolate;
}

/* El video se abre con el scroll dentro de un marco circular (aro del logo) */
.hero-marco {
  position: absolute;
  inset: 0;
  z-index: -2;
  clip-path: circle(calc(26% + var(--p, 0) * 80%) at 80% 48%);
  will-change: clip-path;
}

.hero-marco video,
.video-fondo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-marco video {
  height: 100%;
}

/* Degradado detrás del texto: no es un velo sobre todo el cuadro */
.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.94) 0%, rgba(15, 23, 42, 0.88) 52%, rgba(15, 23, 42, 0.4) 68%, rgba(15, 23, 42, 0) 82%);
  pointer-events: none;
}

.hero-contenido {
  padding-block: 72px 96px;
  max-width: 620px;
}

.hero h1 {
  color: var(--blanco);
  animation: subir 0.9s var(--ease) both;
}

.hero-texto {
  margin: 26px 0 36px;
  font-size: 1.15rem;
  line-height: 1.6;
  color: #e2e8f0;
  max-width: 520px;
}

.hero-acciones {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.hero-aro {
  position: absolute;
  right: 6%;
  top: 50%;
  width: min(34vw, 420px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  z-index: -1;
  pointer-events: none;
  opacity: 0.9;
}

.hero-aro circle {
  fill: none;
  stroke: var(--rojo);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-dasharray: 560 80;
}

@keyframes subir {
  from { opacity: 0.001; transform: translate3d(0, 16px, 0); }
  to { opacity: 1; transform: none; }
}

/* ---------- Secciones con video de fondo ---------- */
.video-seccion {
  position: relative;
  min-height: 78svh;
  display: flex;
  align-items: center;
  background: var(--tinta-profunda);
  color: var(--blanco);
  overflow: hidden;
  isolation: isolate;
  padding-block: 110px;
}

.video-fondo {
  position: absolute;
  inset: 0;
  z-index: -2;
}

.video-seccion::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.92) 0%, rgba(15, 23, 42, 0.74) 42%, rgba(15, 23, 42, 0.12) 80%);
}

.video-seccion h2 {
  color: var(--blanco);
}

.video-seccion p {
  color: #e2e8f0;
}

.video-seccion .wrap {
  width: min(1200px, 100% - 48px);
}

.cabecera-pagina {
  position: relative;
  min-height: 460px;
  display: flex;
  align-items: flex-end;
  background: var(--tinta-profunda);
  color: var(--blanco);
  overflow: hidden;
  isolation: isolate;
  padding-block: 96px 80px;
}

.cabecera-pagina .video-fondo {
  z-index: -2;
}

.cabecera-pagina::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.5) 55%, rgba(15, 23, 42, 0.25) 100%);
}

.cabecera-pagina h1 {
  color: var(--blanco);
  font-size: clamp(2.3rem, 4.8vw, 3.9rem);
  max-width: 880px;
}

.cabecera-pagina p {
  color: #e2e8f0;
  max-width: 640px;
  font-size: 1.1rem;
  margin: 22px 0 0;
}

/* ---------- Historia con fotogramas (canvas) ---------- */
.historia {
  position: relative;
  height: 320vh;
  background: var(--tinta-profunda);
}

.historia-fija {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 520px;
  overflow: hidden;
  isolation: isolate;
  background: var(--tinta-profunda);
}

.historia-fija canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
}

.historia-fija::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.45) 45%, rgba(15, 23, 42, 0.1) 100%);
}

.historia-etiqueta {
  position: absolute;
  top: 112px;
  left: 0;
  right: 0;
  z-index: 2;
}

.historia-etiqueta .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.historia-etiqueta h2 {
  color: var(--blanco);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
}

.historia-progreso {
  height: 2px;
  width: 180px;
  background: rgba(255, 255, 255, 0.25);
  position: relative;
  overflow: hidden;
  flex: none;
}

.historia-progreso span {
  position: absolute;
  inset: 0;
  background: var(--rojo);
  transform: scaleX(var(--avance, 0));
  transform-origin: left;
}

.historia-capitulos {
  position: absolute;
  top: 150px;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  display: flex;
  align-items: center;
}

.capitulo {
  position: absolute;
  left: 0;
  right: 0;
  max-width: 560px;
  opacity: 0;
  transform: translate3d(0, 18px, 0);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}

.historia-capitulos .wrap {
  position: relative;
  height: 100%;
}

.capitulo.activo {
  opacity: 1;
  transform: none;
}

.capitulo .numero {
  display: block;
  font-family: var(--fuente-titulo);
  font-weight: 800;
  color: var(--rojo);
  font-size: 0.95rem;
  letter-spacing: 0.12em;
  margin-bottom: 14px;
}

.capitulo h3 {
  color: var(--blanco);
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  font-weight: 800;
}

.capitulo p {
  color: #e2e8f0;
  font-size: 1.1rem;
  margin: 18px 0 0;
}

.capitulo-izq {
  top: 50%;
  transform: translate3d(0, -50%, 0);
}

.capitulo-izq.activo {
  transform: translate3d(0, -50%, 0);
}

.capitulo-izq {
  transform: translate3d(0, calc(-50% + 18px), 0);
}

.capitulo-izq.activo {
  transform: translate3d(0, -50%, 0);
}

/* ---------- Públicos (ilustraciones de línea roja sobre el video) ---------- */
.publicos-rejilla {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 56px;
}

.publico {
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  color: var(--tinta);
  border-radius: 18px;
  padding: 30px 26px 28px;
  box-shadow: var(--sombra);
  overflow: hidden;
  transition: transform 0.5s var(--ease);
}

.publico:hover {
  transform: translateY(-6px);
}

.publico img {
  width: 104px;
  height: 104px;
  object-fit: contain;
  margin-bottom: 18px;
}

.publico h3 {
  color: var(--tinta);
  font-size: 1.55rem;
}

.publico-linea {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 4px;
  width: 100%;
  background: var(--rojo);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease);
}

.publico:hover .publico-linea {
  transform: scaleX(1);
}

/* ---------- Líneas de producto y servicios ---------- */
.lista-tarjetas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
  margin-top: 48px;
  list-style: none;
  padding: 0;
}

.tarjeta {
  position: relative;
  background: var(--blanco);
  color: var(--texto);
  border: 1px solid var(--linea);
  border-radius: 16px;
  padding: 26px 24px;
  min-height: 170px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 14px 30px -26px rgba(15, 23, 42, 0.5);
  transition: opacity 0.9s var(--ease), transform 0.5s var(--ease), border-color 0.4s;
}

.tarjeta:hover {
  transform: translateY(-4px);
  border-color: var(--rojo);
}

.tarjeta .icono {
  color: var(--rojo);
  width: 28px;
  height: 28px;
}

.tarjeta h3 {
  font-size: 1.12rem;
}

.tarjeta p {
  margin: 0;
  font-size: 0.97rem;
}

.video-seccion .tarjeta {
  background: rgba(255, 255, 255, 0.97);
  color: var(--texto);
}

.video-seccion .tarjeta h3 {
  color: var(--tinta);
}

.video-seccion .tarjeta p {
  color: var(--texto);
}

/* ---------- Página Nosotros ---------- */
.dos-columnas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.bloque {
  padding-block: 110px;
}

.bloque-humo {
  background: var(--humo);
}

.bloque p.lead {
  font-size: 1.2rem;
  color: var(--texto);
  margin: 0;
}

.foto-marco {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--sombra);
}

.foto-marco img {
  width: 100%;
  height: auto;
  aspect-ratio: 2048 / 858;
  object-fit: cover;
}

.cifras-aviso {
  margin-top: 30px;
  font-size: 0.95rem;
  color: var(--texto);
}

/* ---------- Contacto ---------- */
.contacto-rejilla {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 56px;
  align-items: start;
}

.datos {
  display: grid;
  gap: 20px;
}

.dato {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 22px;
  border: 1px solid var(--linea);
  border-radius: 14px;
  background: var(--blanco);
}

.dato .icono {
  color: var(--rojo);
}

.dato h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.dato p {
  margin: 0;
  color: var(--texto);
}

.dato a {
  color: var(--tinta);
  font-weight: 500;
  text-decoration-color: var(--rojo);
  text-underline-offset: 3px;
}

.formulario {
  background: var(--blanco);
  border: 1px solid var(--linea);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--sombra);
}

.formulario .campo {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.formulario label {
  font-weight: 600;
  color: var(--tinta);
  font-size: 0.95rem;
}

.formulario input,
.formulario textarea {
  font: 400 1rem/1.4 var(--fuente);
  color: var(--tinta);
  background: var(--blanco);
  border: 1.5px solid #b8c2d1;
  border-radius: 10px;
  padding: 13px 14px;
  width: 100%;
}

.formulario textarea {
  min-height: 140px;
  resize: vertical;
}

.formulario input:focus,
.formulario textarea:focus {
  outline: 3px solid rgba(205, 6, 16, 0.35);
  border-color: var(--rojo);
}

.formulario .boton {
  margin-top: 6px;
}

.aviso-formulario {
  margin: 20px 0 0;
  padding: 16px 18px;
  border-left: 4px solid var(--rojo);
  background: var(--humo);
  color: var(--tinta);
  border-radius: 10px;
}

.aviso-formulario[hidden] {
  display: none;
}

.mapa-marco {
  margin-top: 26px;
  padding: 22px;
  border-radius: 14px;
  border: 1px dashed #b8c2d1;
  color: var(--texto);
  font-size: 0.95rem;
}

/* ---------- Pie de página ---------- */
.pie {
  background: var(--tinta-profunda);
  color: #cbd5e1;
  padding-block: 72px 36px;
  font-size: 0.95rem;
}

.pie-rejilla {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
}

.pie img {
  width: 178px;
  height: auto;
  background: var(--blanco);
  padding: 10px 14px;
  border-radius: 12px;
}

.pie h3 {
  color: var(--blanco);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.pie ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.pie a {
  color: #e2e8f0;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}

.pie a:hover {
  color: var(--blanco);
  border-bottom-color: var(--rojo);
}

.pie-legal {
  margin-top: 56px;
  padding-top: 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.88rem;
  color: #94a3b8;
}

.pie-selector ul {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}

.pie-selector a[aria-current='page'] {
  color: var(--blanco);
  font-weight: 600;
}

/* ---------- Cortina de transición (respaldo sin View Transitions) ---------- */
.cortina {
  position: fixed;
  inset: 0;
  z-index: 500;
  pointer-events: none;
  background: var(--rojo);
  clip-path: circle(0% at 50% 50%);
}

.cortina.activa {
  animation: aro-abre 0.6s var(--ease) forwards;
}

@keyframes aro-abre {
  from { clip-path: circle(0% at 50% 50%); }
  to { clip-path: circle(150% at 50% 50%); }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-new(root) {
  clip-path: circle(0% at 50% 50%);
  animation: aro-nuevo 0.9s var(--ease) forwards;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
}

@keyframes aro-nuevo {
  from { clip-path: circle(0% at 50% 50%); }
  to { clip-path: circle(150% at 50% 50%); }
}

/* ==========================================================================
   5. RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .menu {
    gap: 22px;
  }

  .contacto-rejilla,
  .dos-columnas {
    gap: 40px;
  }
}

@media (max-width: 900px) {
  .menu,
  .cabecera .boton.boton-sm {
    display: none;
  }

  .boton-menu {
    display: block;
  }

  .menu-movil:not([hidden]) {
    display: block;
  }

  .publicos-rejilla {
    grid-template-columns: 1fr;
  }

  .dos-columnas,
  .contacto-rejilla,
  .pie-rejilla {
    grid-template-columns: 1fr;
  }

  .hero-aro {
    display: none;
  }

  .hero::after {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.78) 0%, rgba(15, 23, 42, 0.92) 100%);
  }

  .video-seccion::after {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.8) 100%);
  }

  .historia-progreso {
    width: 110px;
  }
}

@media (max-width: 760px) {
  .barra-texto {
    display: none;
  }

  .barra-interior {
    justify-content: space-between;
    padding-block: 4px;
  }

  .barra-acciones {
    width: 100%;
    justify-content: space-between;
  }

  .hero-marco {
    clip-path: circle(calc(60% + var(--p, 0) * 60%) at 50% 30%);
  }

  .hero-contenido {
    padding-block: 56px 72px;
  }
}

@media (max-width: 640px) {
  .wrap {
    width: min(1200px, 100% - 36px);
  }

  .historia {
    height: 300vh;
  }

  .historia-etiqueta .wrap {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .historia-progreso {
    width: 100%;
  }

  .capitulo h3 {
    font-size: 1.9rem;
  }

  .formulario {
    padding: 24px;
  }

  .bloque {
    padding-block: 72px;
  }

  .video-seccion {
    padding-block: 80px;
  }

  .hero-acciones .boton {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   6. MOVIMIENTO REDUCIDO
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .entrada,
  .reveal-palabras .palabra > span {
    opacity: 1;
    transform: none;
  }

  .reveal-palabras .palabra > span {
    transform: none;
  }

  .hero-marco {
    clip-path: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}
