/* CISO Virtual — traducción del diseño "CISO Virtual v6" (Claude Design). */
:root {
  --navy: #13297d;
  --navy-text: #2c3c7f;
  --orange: #ff8200;
  --orange-dark: #e87600;
  --muted: #6b7699;
  --line: #dfe2ec;
  --placeholder: #eef0f5;
  --mono: 'IBM Plex Mono', monospace;
  /* Movimiento (escala de transitions.dev): solo transform y opacity. */
  --dur-quick: 150ms;
  --dur-fast: 250ms;
  --dur-slow: 400ms;
  --dur-enter: 600ms;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 130px; }
html, body { overflow-x: clip; }
body {
  margin: 0;
  background: #fff;
  color: var(--navy);
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--orange); }
input, textarea, button { font: inherit; color: inherit; }
::selection { background: rgba(255, 130, 0, .28); }
/* Foco de teclado visible en todo el sitio (antes no había ninguno). */
:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.contact :focus-visible, .banner :focus-visible { outline-color: var(--orange); }
[hidden] { display: none !important; }
.pretty { text-wrap: pretty; }
.num { font-family: var(--mono); font-size: 13px; color: var(--muted); }

.wrap { max-width: 1240px; margin: 0 auto; width: 100%; }

/* ── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-block; background: var(--orange); color: #fff; text-decoration: none; font-weight: 500; border: 0; cursor: pointer;
  transition: transform var(--dur-quick) var(--ease-out), opacity var(--dur-quick) var(--ease-out);
}
.btn:hover { background: var(--orange-dark); color: #fff; }
.btn:active { transform: scale(0.96); }
.btn--nav { padding: 10px 22px; border-radius: 16px 0 16px 0; }
.btn--submit { padding: 15px 34px; border-radius: 18px 0 18px 0; font-size: 16px; }
/* Mientras se envía (ver site.js): señal visual, sin bloquear nada. */
.contact__form[aria-busy="true"] .btn--submit { opacity: .7; cursor: progress; }

/* ── Header ──────────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: 1240px; margin: 0 auto; padding: 10px 32px;
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.site-header__logo { display: flex; align-items: center; }
.site-header__logo img { display: block; height: clamp(64px, 7vw, 92px); width: auto; }
.site-nav { display: flex; gap: 28px; align-items: center; font-size: 15px; flex-wrap: wrap; }
.site-nav__link {
  position: relative; text-decoration: none; padding: 6px 0; font-weight: 400;
  display: inline-flex; flex-direction: column; align-items: center;
}
/* Reserva el ancho de la versión en negrita: el menú ya no "salta" al cambiar de sección. */
.site-nav__link::after { content: attr(data-label); font-weight: 600; height: 0; visibility: hidden; overflow: hidden; pointer-events: none; }
/* Subrayado activo: crece desde el centro con transform en vez de aparecer de golpe. */
.site-nav__link::before {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: var(--orange); transform: scaleX(0); opacity: 0;
  transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-quick) var(--ease-out);
}
.site-nav__link.is-active { font-weight: 600; }
.site-nav__link.is-active::before { transform: scaleX(1); opacity: 1; }

/* ── Inicio ──────────────────────────────────────────────── */
.hero { padding: 64px 32px 96px; display: flex; flex-direction: column; gap: 40px; }
.hero__top {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 40px 56px; align-items: end;
}
.hero__title {
  margin: 0; font-weight: 300; font-size: clamp(44px, 6vw, 88px);
  line-height: 0.98; letter-spacing: -0.04em; max-width: 13ch;
}
.hero__img { display: block; width: 100%; height: auto; background: var(--placeholder); outline: 1px solid rgba(0, 0, 0, .08); outline-offset: -1px; }
/* Único momento de entrada del sitio: el hero aparece en tres tiempos al cargar. */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.hero__title, .hero__img, .hero__bottom { animation: rise var(--dur-enter) var(--ease-out) both; }
.hero__img { animation-delay: 100ms; }
.hero__bottom { animation-delay: 200ms; }
.hero__bottom {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: 32px 64px; border-top: 1px solid var(--navy); padding-top: 28px;
}
.hero__lead { margin: 0; font-size: 22px; line-height: 1.4; max-width: 28ch; text-wrap: pretty; }
.hero__index { display: flex; flex-direction: column; gap: 2px; }
.index-link {
  display: grid; grid-template-columns: 40px 1fr 24px; align-items: start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
  text-decoration: none; font-size: 16px; line-height: 1.45;
}
.index-link .num { padding-top: 2px; }
.index-link svg { margin-top: 3px; justify-self: end; color: var(--orange); transition: transform var(--dur-fast) var(--ease-out); }
.index-link:hover .num { color: var(--orange); }
@media (hover: hover) { .index-link:hover svg { transform: translateX(4px); } }

/* ── Banner con cita ─────────────────────────────────────── */
.banner { position: relative; width: 100%; aspect-ratio: 3.4 / 1; min-height: 300px; overflow: hidden; background: url('../img/fondo-red.webp') left center / cover no-repeat, var(--navy); }
/* La foto ocupa la mitad derecha: así la persona queda a la vista y la cita sobre azul sólido. */
.banner__img { position: absolute; top: 0; right: 0; width: 62%; height: 100%; object-fit: cover; object-position: 45% 30%; }
.banner__shade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(19,41,125,.82) 0%, rgba(19,41,125,.9) 38%, rgba(19,41,125,.55) 52%, rgba(19,41,125,.1) 70%, rgba(19,41,125,0) 100%);
}
@media (max-width: 700px) {
  .banner__img { width: 100%; }
  .banner__shade { background: rgba(19,41,125,.85); }
}
.banner__inner { position: relative; height: 100%; max-width: 1240px; margin: 0 auto; padding: 40px 32px; display: flex; align-items: center; }
.banner__quote {
  margin: 0; text-indent: -0.42em; /* comilla colgada: el texto alinea ópticamente con el borde */ color: #fff; font-weight: 300; font-size: clamp(28px, 3.8vw, 54px);
  line-height: 1.08; letter-spacing: -0.03em; max-width: 18ch; text-wrap: balance;
}
.accent { color: var(--orange); }

/* ── Patrón de puntos decorativo ─────────────────────────── */
.dots {
  position: absolute; aspect-ratio: 1; pointer-events: none;
  background: var(--navy); opacity: 0.06;
  -webkit-mask: url('../img/mundo.webp') center / contain no-repeat;
          mask: url('../img/mundo.webp') center / contain no-repeat;
}
.dots--right { right: -300px; top: 40px; width: min(900px, 90vw); z-index: -1; }
.dots--left { left: -340px; top: -120px; width: min(820px, 90vw); z-index: 0; }

/* ── Preguntas numeradas ─────────────────────────────────── */
.faq { position: relative; z-index: 0; padding: 112px 32px 0; display: flex; flex-direction: column; gap: 64px; }
.rol { padding: 64px 32px 112px; }
.topic { display: flex; flex-wrap: wrap; gap: 32px 64px; }
.topic--continued { gap: 0 64px; }
.topic__head { display: flex; gap: 16px; align-items: baseline; flex: 1 1 300px; max-width: 400px; min-width: 0; }
.topic__head--sticky { position: sticky; top: 124px; align-self: flex-start; background: #fff; padding: 8px 0; z-index: 1; }
@media (max-width: 1000px) { .topic__head--sticky { position: static; } }
.topic__spacer { flex: 1 1 300px; max-width: 400px; }
.topic__num { font-family: var(--mono); font-size: 14px; color: var(--orange); }
.topic__body {
  flex: 2 1 560px; min-width: 0; max-width: 62ch;
  display: flex; flex-direction: column; gap: 20px; font-size: 18px; line-height: 1.65;
}
.h2 { margin: 0; font-weight: 400; font-size: clamp(26px, 2.8vw, 36px); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.lead { margin: 0; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.35; font-weight: 300; letter-spacing: -0.01em; text-wrap: pretty; }
.lead strong { font-weight: 500; }
.more { display: flex; flex-direction: column; gap: 20px; color: var(--navy-text); }
/* "Leer más": lo que aparece entra suave en vez de saltar (corre cada vez que deja de estar [hidden]). */
@keyframes reveal { from { opacity: 0; transform: translateY(6px); } }
[data-more]:not([hidden]) { animation: reveal var(--dur-slow) var(--ease-out); }
.more p { margin: 0; text-wrap: pretty; }
.more .more__intro { margin-top: 12px; padding-bottom: 20px; }
.rule { width: min(520px, 70%); height: 1px; background: var(--navy); align-self: center; }

.stat { display: flex; flex-direction: column; gap: 6px; }
.stat__value { font-size: clamp(40px, 5vw, 64px); font-weight: 300; letter-spacing: -0.04em; line-height: 1; }
.stat__note { font-size: 15px; color: var(--muted); }

.list { display: flex; flex-direction: column; border-top: 1px solid var(--navy); }
.list__item { border-bottom: 1px solid var(--line); }
.list__item--stack { display: flex; flex-direction: column; gap: 8px; padding: 16px 0; }
.list__row { display: grid; grid-template-columns: 48px 36px 1fr; gap: 8px; align-items: center; }
.list__row strong { font-weight: 500; font-size: 19px; }
.list__detail { padding-left: 104px; color: var(--navy-text); font-size: 17px; line-height: 1.6; text-wrap: pretty; }
.list__item--row { display: grid; grid-template-columns: 48px 36px 1fr; gap: 8px; align-items: start; padding: 14px 0; font-size: 17px; line-height: 1.5; color: var(--navy); }
.list__item--row .num { padding-top: 3px; }
.source { margin: 0; font-size: 14px; color: var(--muted); }
.source a { color: var(--muted); }

.more-btn {
  position: relative; display: flex; align-items: center; gap: 10px; align-self: flex-start;
  background: transparent; border: 0; padding: 4px 0; cursor: pointer;
  font-size: 16px; font-weight: 500; color: var(--navy);
}
.more-btn::after { content: ''; position: absolute; inset: -10px -8px; } /* área táctil ≥ 44px */
.more-btn:hover { color: var(--orange); }
/* "+" / "−" dibujados con dos trazos: la barra vertical se pliega al abrir.
   El glifo que escribe site.js queda como respaldo pero no se ve. */
.more-btn__icon {
  position: relative; width: 22px; height: 22px; border: 1.5px solid var(--orange); border-radius: 7px 0 7px 0;
  display: grid; place-items: center; color: transparent; font-size: 0; line-height: 1;
  transition: transform var(--dur-quick) var(--ease-out);
}
.more-btn__icon::before, .more-btn__icon::after {
  content: ''; position: absolute; left: 50%; top: 50%; width: 10px; height: 1.5px; margin: -0.75px 0 0 -5px;
  background: var(--orange); transition: transform var(--dur-fast) var(--ease-out), opacity var(--dur-fast) var(--ease-out);
}
.more-btn__icon::after { transform: rotate(90deg); }
.more-btn[aria-expanded="true"] .more-btn__icon::after { transform: rotate(90deg) scaleX(0); opacity: 0; }
.more-btn:active .more-btn__icon { transform: scale(0.96); }
.more-btn__label { text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--orange); }
.more-btn--gap[aria-expanded="false"] { margin-top: 20px; }

/* ── Oficinas ────────────────────────────────────────────── */
.offices { position: relative; padding: 0 32px 112px; }
.offices__grid {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 32px 64px; border-top: 1px solid var(--navy); padding-top: 40px; align-items: start;
}
.offices__list { display: flex; flex-direction: column; gap: 24px; }
.offices__buttons { display: flex; flex-direction: column; gap: 6px; }
.office-btn {
  display: flex; gap: 14px; align-items: center; text-align: left; cursor: pointer;
  padding: 12px 0; background: transparent; border: 0; color: var(--navy); font-size: 17px; line-height: 1.4;
}
.office-btn:hover { color: var(--orange); }
.office-btn__dot {
  position: relative; flex: none; width: 12px; height: 12px; border-radius: 6px 0 6px 0;
  border: 1.5px solid var(--orange); overflow: hidden;
}
/* Relleno del punto activo: escala desde el centro en vez de cambiar el fondo. */
.office-btn__dot::before {
  content: ''; position: absolute; inset: 0; background: var(--orange);
  transform: scale(0); transition: transform var(--dur-fast) var(--ease-out);
}
.office-btn__label {
  text-decoration: underline; text-underline-offset: 5px;
  text-decoration-thickness: 1px; text-decoration-color: #b9bfd6;
}
.office-btn.is-active .office-btn__dot::before { transform: scale(1); }
.office-btn.is-active .office-btn__label { text-decoration-thickness: 2px; text-decoration-color: var(--orange); }
.offices__directions { font-size: 15px; display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; }
.offices__directions svg { color: var(--orange); transition: transform var(--dur-fast) var(--ease-out); }
@media (hover: hover) { .offices__directions:hover svg { transform: translate(2px, -2px); } }
.offices__map {
  grid-column: span 2; min-width: 0; width: 100%; aspect-ratio: 16 / 8; border: 0; background: var(--placeholder);
  transition: opacity var(--dur-fast) var(--ease-out);
}
/* Al cambiar de oficina el mapa se atenúa hasta que carga el nuevo (ver site.js). */
.offices__map.is-loading { opacity: .45; }
@media (max-width: 727px) { .offices__map { grid-column: auto; aspect-ratio: 4 / 3; } }

/* ── Contacto ────────────────────────────────────────────── */
.contact {
  color: #fff;
  background: linear-gradient(90deg, rgba(19,41,125,.92) 0%, rgba(19,41,125,.78) 45%, rgba(19,41,125,.35) 100%),
              url('../img/fondo-red.webp') right center / cover no-repeat, var(--navy);
}
.contact__inner { max-width: 1240px; margin: 0 auto; padding: 112px 32px 64px; display: flex; flex-direction: column; gap: 72px; }
.contact__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 56px 80px; align-items: start; }
.contact__intro { display: flex; flex-direction: column; gap: 32px; }
.contact__title { margin: 0; font-weight: 300; font-size: clamp(34px, 4.4vw, 60px); line-height: 1.02; letter-spacing: -0.035em; text-wrap: balance; }
.contact__sub { margin: 0; font-size: 18px; line-height: 1.5; color: #c9d0ea; max-width: 36ch; }
.contact__channels { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.channel { display: flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; }
.channel:hover { color: var(--orange); }
.channel:hover .channel__icon { background: rgba(255,130,0,.24); }
.channel__icon {
  flex: none; width: 32px; height: 32px; border-radius: 10px 0 10px 0;
  background: rgba(255,130,0,.14); display: grid; place-items: center; color: var(--orange);
}
.contact__thanks { margin: 0; font-size: 24px; line-height: 1.35; font-weight: 300; align-self: center; animation: reveal var(--dur-slow) var(--ease-out); }

.contact__form { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 20px; }
.span-all { grid-column: 1 / -1; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #c9d0ea; }
.field input, .field textarea {
  background: #fff; border: 0; border-radius: 4px; padding: 14px 16px;
  font-size: 17px; color: var(--navy); outline: none; box-shadow: inset 0 0 0 2px transparent;
  caret-color: var(--orange);
}
.field textarea { resize: vertical; }
.field input:focus, .field textarea:focus { box-shadow: inset 0 0 0 2px var(--orange); }
/* Campo inválido solo después de que la persona lo tocó (no al cargar). */
.field input:user-invalid { box-shadow: inset 0 0 0 2px #e5484d; }
.field input:user-invalid:focus { box-shadow: inset 0 0 0 2px var(--orange); }
.form-status { margin: 0; padding: 12px 16px; border-radius: 4px; background: rgba(255,130,0,.16); box-shadow: inset 0 0 0 1px rgba(255,130,0,.55); color: #fff; font-size: 15px; animation: reveal var(--dur-slow) var(--ease-out); }
.form-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.site-footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  font-size: 14px; color: #9aa5cc; border-top: 1px solid #4255a0; padding-top: 24px;
}
.site-footer a { color: #9aa5cc; }
.site-footer a:hover { color: var(--orange); }
.social { display: flex; align-items: center; margin-right: -8px; }
/* Área táctil de 44px; los márgenes negativos conservan el espaciado visual de 16px. */
.social a { display: grid; place-items: center; width: 44px; height: 44px; margin: -12px -4px; }

/* ── Móvil: gutter de 16px ───────────────────────────────── */
@media (max-width: 600px) {
  .site-header__inner, .hero, .banner__inner, .faq, .rol, .offices, .contact__inner { padding-left: 16px; padding-right: 16px; }
  .site-nav { gap: 16px 20px; }
}

/* ── Íconos ──────────────────────────────────────────────── */
.ico {
  display: inline-grid; place-items: center; flex: none;
  width: 32px; height: 32px; border-radius: 10px 0 10px 0;
  background: rgba(255,130,0,.1); color: var(--orange);
}
.ico svg { width: 17px; height: 17px; }
.list__item--row .ico { margin-top: -4px; }
@media (max-width: 600px) {
  .list__detail { padding-left: 0; }
}

/* ── Movimiento reducido ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; }
}
