/* ==========================================================================
   IMPACTO SEGURIDAD PRIVADA — Home
   Paleta y tipografía según Brandbook V1.0
   ========================================================================== */

@font-face {
  font-family: 'Jost';
  src: url('../fonts/jost.woff2') format('woff2-variations'),
       url('../fonts/jost.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215;
}

:root {
  --navy: #14284B;
  --navy-900: #0B1A33;
  --header-solid: #0A162C;
  --yellow: #F2A900;
  --ink: #1F1D1D;
  --paper: #F5F4F1;
  --paper-hover: #EDEBE5;
  --error: #B3261E;

  --on-dark: rgba(255, 255, 255, 0.94);
  --on-dark-muted: rgba(255, 255, 255, 0.62);
  --on-dark-line: rgba(255, 255, 255, 0.14);
  --on-light-muted: rgba(31, 29, 29, 0.68);
  --on-light-line: rgba(20, 40, 75, 0.16);

  --gutter: clamp(20px, 5vw, 88px);
  --max: 1560px;

  --fs-display: clamp(2.7rem, 6.1vw, 6rem);
  --fs-h2: clamp(1.95rem, 3.9vw, 3.6rem);
  --fs-h3: clamp(1.3rem, 2.1vw, 1.9rem);
  --fs-lead: clamp(1.05rem, 1.45vw, 1.35rem);
  --fs-body: clamp(0.98rem, 1.02vw, 1.075rem);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --hdr-h: 84px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Deja libre el header fijo al saltar a un ancla o al enfocar. */
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--on-dark);
  font-family: 'Jost', 'Helvetica Neue', Arial, sans-serif;
  font-size: var(--fs-body);
  font-weight: 300;
  line-height: 1.68;
  letter-spacing: 0.005em;
  /* Con texto ampliado al 200% ninguna palabra debe empujar el layout. */
  overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
::selection { background: var(--yellow); color: var(--navy-900); }

:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}
.section--paper :focus-visible,
.form :focus-visible,
.footer :focus-visible { outline-color: #fff; outline-offset: 3px; }
.section--paper :focus-visible,
.form :focus-visible { outline-color: var(--navy); }

h1, h2, h3, h4 {
  margin: 0;
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
p {
  margin: 0 0 1.1em;
  text-wrap: pretty;
}
p:last-child { margin-bottom: 0; }
figure, blockquote { margin: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- utilidades tipográficas ---------- */

.skip {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 200;
  padding: 10px 16px;
  background: var(--yellow);
  color: var(--navy-900);
  font-size: 0.8rem;
  font-weight: 500;
  transform: translateY(-200%);
  transition: transform 0.3s var(--ease);
}
.skip:focus { transform: none; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.688rem;
  font-weight: 500;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}
.eyebrow::before {
  content: '';
  width: 7px;
  height: 7px;
  background: var(--yellow);
  flex: none;
}

.section-num {
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--on-light-muted);
  display: flex;
  align-items: center;
  gap: 14px;
}
.section-num::after {
  content: '';
  height: 1px;
  flex: 1;
  background: var(--on-light-line);
}
.section--dark .section-num { color: var(--on-dark-muted); }
.section--dark .section-num::after { background: var(--on-dark-line); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.55;
  font-weight: 300;
}

/* ---------- botones ---------- */

.btn {
  --btn-bg: var(--yellow);
  --btn-fg: var(--navy-900);
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 17px 26px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 1px solid var(--btn-bg);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  transition: color 0.4s var(--ease), border-color 0.4s var(--ease);
  isolation: isolate;
}
.btn span { position: relative; z-index: 1; }
.btn svg { position: relative; z-index: 1; transition: transform 0.45s var(--ease); }
.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--navy-900);
  transform: translateY(101%);
  transition: transform 0.5s var(--ease);
  z-index: 0;
}
.btn:hover { color: #fff; border-color: var(--yellow); }
.btn:hover::after { transform: translateY(0); }
.btn:hover svg { transform: translateX(5px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--on-dark);
  border-color: rgba(255, 255, 255, 0.28);
}
.btn--ghost:hover { color: var(--navy-900); border-color: #fff; }
.btn--ghost::after { background: #fff; }


/* ---------- header ---------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--hdr-h);
  display: flex;
  align-items: center;
  transition: background 0.5s var(--ease), height 0.4s var(--ease), border-color 0.5s var(--ease);
  border-bottom: 1px solid transparent;
}
.header__inner {
  position: relative;
  z-index: 101;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.header.is-stuck {
  height: 68px;
  background: var(--header-solid);
  border-bottom-color: var(--on-dark-line);
}

.brand { display: flex; align-items: center; color: #fff; }
.brand svg { height: 30px; width: auto; }
.header.is-stuck .brand svg { height: 26px; }

.nav { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 38px); }
.nav a {
  position: relative;
  font-size: 0.76rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
  padding-block: 6px;
  transition: color 0.3s var(--ease);
}
.nav a::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--yellow);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.nav a:hover { color: #fff; }
.nav a:hover::after { transform: scaleX(1); }

.header__cta { display: flex; align-items: center; gap: 18px; }

.header__cta .btn { padding: 13px 20px; font-size: 0.72rem; }

.burger {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  cursor: pointer;
  position: relative;
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
}
/* Sobre el hero el header es transparente: un velo degradado garantiza
   contraste del logo y del botón sin dibujar una caja sólida. */
.header:not(.is-stuck)::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 150%;
  background: linear-gradient(180deg, rgba(6, 14, 28, 0.62) 0%, rgba(6, 14, 28, 0.28) 55%, transparent 100%);
  pointer-events: none;
  z-index: 0;
}
.burger span {
  position: absolute;
  left: 12px;
  width: 20px; height: 1px;
  background: #fff;
  transition: transform 0.4s var(--ease), opacity 0.3s;
}
.burger span:nth-child(1) { top: 17px; }
.burger span:nth-child(2) { top: 25px; }
body.nav-open .burger { opacity: 0; pointer-events: none; }
body.nav-open .burger span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
body.nav-open .burger span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
  background: var(--navy-900);
}
.hero__media {
  position: absolute;
  inset: 0 0 0 42%;
  overflow: hidden;
}
.hero__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 55% center;
  transform: scale(1.08);
  filter: saturate(0.82) contrast(1.05);
  animation: heroIn 2.4s var(--ease) forwards;
}
.hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, #0B1A33 0%, rgba(11, 26, 51, 0.86) 18%, rgba(11, 26, 51, 0.28) 48%, rgba(11, 26, 51, 0.12) 100%),
    linear-gradient(180deg, rgba(11, 26, 51, 0.7) 0%, transparent 38%, rgba(11, 26, 51, 0.78) 100%);
}
@keyframes heroIn {
  from { transform: scale(1.14); }
  to { transform: scale(1); }
}

.hero__inner {
  position: relative;
  z-index: 2;
  min-height: inherit;
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding: calc(var(--hdr-h) + 40px) var(--gutter) 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
}
.hero__copy { max-width: 800px; padding-bottom: clamp(48px, 7vh, 96px); }
.hero__copy .eyebrow { margin-bottom: 28px; }

.hero h1 {
  text-wrap: initial;
  font-size: var(--fs-display);
  font-weight: 500;
  line-height: 0.96;
  letter-spacing: -0.03em;
  margin-bottom: 30px;
}
.hero h1 .line {
  display: block;
  /* El recorte con line-height .96 corta las colas de g, q, p:
     se amplía la caja y se compensa el layout con margen negativo. */
  overflow: hidden;
  padding-bottom: 0.2em;
  margin-bottom: -0.2em;
}
.hero h1 .line > span {
  display: block;
  transform: translateY(135%);
  animation: lineUp 1.1s var(--ease) both;
  /* Stagger por posición: el índice lo aporta sibling-index() en .line y hereda. */
  animation-delay: calc(0.03s + var(--line-index) * 0.12s);
}
@property --line-index {
  syntax: '<integer>';
  inherits: true;
  initial-value: 1;
}
@supports (animation-delay: calc(sibling-index() * 0.1s)) {
  .hero h1 .line { --line-index: sibling-index(); }
}
/* Fallback para navegadores sin sibling-index(): índices fijos. */
@supports not (animation-delay: calc(sibling-index() * 0.1s)) {
  .hero h1 .line:nth-child(1) { --line-index: 1; }
  .hero h1 .line:nth-child(2) { --line-index: 2; }
  .hero h1 .line:nth-child(3) { --line-index: 3; }
}
.hero h1 em {
  font-style: normal;
  color: var(--yellow);
}
@keyframes lineUp { to { transform: translateY(0); } }

.hero__sub {
  max-width: 46ch;
  font-size: var(--fs-lead);
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 40px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.62s forwards;
}
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  opacity: 0;
  animation: fadeUp 1s var(--ease) 0.78s forwards;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

.hero__meta {
  list-style: none;
  margin: 0;
  padding: 22px 0 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  width: 100%;
}
.hero__meta li {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
}
.hero__meta b {
  font-weight: 500;
  color: var(--yellow);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
}

.scroll-cue {
  position: absolute;
  right: var(--gutter);
  bottom: 130px;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  font-size: 0.64rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  writing-mode: vertical-rl;
}
.scroll-cue::after {
  content: '';
  width: 1px;
  height: 64px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), transparent);
}
@media (max-height: 760px) { .scroll-cue { display: none; } }

/* ---------- secciones ---------- */

.section { position: relative; padding-block: clamp(72px, 9.5vw, 150px); }
.section--paper { background: var(--paper); color: var(--ink); }
.section--navy { background: var(--navy); }
.section--deep { background: var(--navy-900); }

.section__head > * { min-width: 0; }
.section__head {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(24px, 5vw, 90px);
  align-items: end;
  margin-bottom: clamp(44px, 6vw, 88px);
}
.section__head h2 {
  font-size: var(--fs-h2);
  font-weight: 500;
  letter-spacing: -0.025em;
  margin-top: 22px;
}
.section__head p { color: var(--on-light-muted); max-width: 50ch; }
.section--dark .section__head p { color: var(--on-dark-muted); }

/* ---------- 01 · quiénes somos ---------- */

.about {
  display: grid;
  margin-top: clamp(36px, 4vw, 64px);
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: clamp(30px, 6vw, 96px);
  align-items: start;
}
.about__body { display: flex; flex-direction: column; min-width: 0; }
.about__body h2 {
  font-size: var(--fs-h2);
  max-width: 15ch;
  margin-bottom: 30px;
}
.about__body p { color: var(--on-light-muted); max-width: 58ch; }
.about__body p + p { margin-top: 1em; }

.about__facts {
  margin-top: 0;
  padding-top: 40px;
  display: grid;
  gap: 0;
  border-top: 1px solid var(--on-light-line);
}
.about__facts div {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--on-light-line);
  font-size: 0.95rem;
}
.about__facts dt {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-light-muted);
  padding-top: 4px;
}
.about__facts dd { margin: 0; font-weight: 400; color: var(--ink); }

.about__figure {
  position: relative;
  min-width: 0;
  aspect-ratio: 3 / 4;
  min-height: 0;
  height: auto;
  overflow: hidden;
  background: var(--navy);
}
.about__figure img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 32%;
  transform: scale(1.14);
  transition: transform 1.6s var(--ease);
}
.about__figure.is-in img { transform: scale(1); }
.about__figure figcaption {
  position: absolute;
  left: 0; bottom: 0;
  right: 0;
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(0deg, rgba(9, 20, 40, 0.92), rgba(9, 20, 40, 0));
  color: #fff;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* ---------- 02 · servicios ---------- */

.svc-list { border-top: 1px solid var(--on-dark-line); }
.svc {
  position: relative;
  display: grid;
  grid-template-columns: 86px minmax(0, 4.3fr) minmax(0, 5.2fr);
  gap: clamp(16px, 3vw, 48px);
  padding: clamp(26px, 3vw, 40px) 0;
  border-bottom: 1px solid var(--on-dark-line);
}
.svc::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--gutter) * -0.4);
  background: rgba(255, 255, 255, 0.035);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.svc:hover::before { opacity: 1; }
.svc__num {
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--yellow);
  padding-top: 10px;
}
.svc h3 {
  font-size: var(--fs-h3);
  font-weight: 500;
  line-height: 1.15;
  transition: transform 0.5s var(--ease);
}
.svc:hover h3 { transform: translateX(10px); }
.svc p {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--on-dark-muted);
  max-width: 48ch;
  margin: 0;
}

.services__note {
  margin-top: 36px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.58);
  max-width: 70ch;
}
.services__note svg { flex: none; width: 16px; margin-top: 3px; color: var(--yellow); }

/* ---------- 03 · enfoque ---------- */

.enfoque__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--on-light-line);
  border-left: 1px solid var(--on-light-line);
}
.pillar {
  padding: clamp(24px, 2.6vw, 38px) clamp(20px, 2.2vw, 32px) clamp(34px, 3.4vw, 52px);
  border-right: 1px solid var(--on-light-line);
  border-bottom: 1px solid var(--on-light-line);
  position: relative;
  transition: background 0.45s var(--ease);
}
.pillar:hover { background: var(--paper-hover); }
.pillar__mark {
  width: 38px; height: 38px;
  color: var(--navy);
  margin-bottom: clamp(34px, 4vw, 58px);
  transition: transform 0.6s var(--ease);
}
.pillar:hover .pillar__mark { transform: rotate(90deg); }
.pillar__num {
  position: absolute;
  top: clamp(24px, 2.6vw, 38px);
  right: clamp(20px, 2.2vw, 32px);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  color: rgba(20, 40, 75, 0.68);
}
.pillar h3 {
  font-size: 1.22rem;
  font-weight: 500;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.pillar p {
  font-size: 0.9rem;
  line-height: 1.66;
  color: var(--on-light-muted);
  margin: 0;
}

/* ---------- banda con cita ---------- */

.quote-band {
  position: relative;
  overflow: hidden;
  background: var(--navy-900);
  color: #fff;
  isolation: isolate;
}
.quote-band img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 50% 55%;
  z-index: -2;
  filter: saturate(0.7);
}
.quote-band::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(11, 26, 51, 0.94) 0%, rgba(11, 26, 51, 0.72) 55%, rgba(11, 26, 51, 0.4) 100%);
}
.quote-band__inner {
  padding-block: clamp(80px, 12vw, 180px);
  max-width: 900px;
}
.quote-band blockquote {
  margin: 0;
  font-size: clamp(1.5rem, 3.1vw, 2.9rem);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.quote-band blockquote span { color: var(--yellow); }
.quote-band figcaption {
  margin-top: 34px;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}
.quote-band figcaption::before {
  content: '';
  width: 46px; height: 1px;
  background: var(--yellow);
}

/* ---------- 04 · sectores ---------- */

.sectors {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--on-dark-line);
  border-left: 1px solid var(--on-dark-line);
}
.sector {
  position: relative;
  padding: clamp(30px, 3.4vw, 52px);
  border-right: 1px solid var(--on-dark-line);
  border-bottom: 1px solid var(--on-dark-line);
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-height: 250px;
  overflow: hidden;
  transition: color 0.5s var(--ease);
}
.sector::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.045);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
  z-index: 0;
}
.sector:hover::before { opacity: 1; }
.sector::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--yellow);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.5s var(--ease);
}
.sector:hover::after { transform: scaleY(1); }
.sector h3, .sector p { position: relative; z-index: 1; }
.sector__idx {
  position: absolute;
  top: clamp(14px, 1.6vw, 26px);
  right: clamp(18px, 2vw, 32px);
  z-index: 0;
  font-size: clamp(56px, 7vw, 104px);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.04em;
  color: rgba(255, 255, 255, 0.07);
  transition: color 0.5s var(--ease);
}

.sector h3 {
  font-size: clamp(1.5rem, 2.5vw, 2.35rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  margin-top: auto;
  max-width: 22ch;
}
.sector p {
  font-size: 0.9rem;
  color: var(--on-dark-muted);
  transition: color 0.5s var(--ease);
  margin: 0;
  max-width: 46ch;
}

/* ---------- 05 · contacto ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(34px, 6vw, 100px);
  align-items: start;
}
.contact > * { min-width: 0; }
.contact__intro h2 {
  font-size: var(--fs-h2);
  max-width: 12ch;
  margin: 22px 0 24px;
}
.contact__intro p { color: var(--on-light-muted); max-width: 40ch; }

.contact__details {
  margin-top: 40px;
  border-top: 1px solid var(--on-light-line);
}
.contact__details div {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 20px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--on-light-line);
}
.contact__details dt {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-light-muted);
}
.contact__details dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 400;
}
.contact__details dd.is-pending {
  font-size: 0.86rem;
  letter-spacing: 0.02em;
  color: rgba(20, 40, 75, 0.72);
}

.form {
  display: grid;
  gap: 26px;
  background: #fff;
  border: 1px solid var(--on-light-line);
  padding: clamp(26px, 3vw, 46px);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.field { position: relative; display: flex; flex-direction: column; min-width: 0; }
.field label {
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-light-muted);
  margin-bottom: 10px;
}
.field input,
.field textarea,
.field select {
  appearance: none;
  width: 100%;
  min-width: 0;
  border: 0;
  border-bottom: 1px solid rgba(20, 40, 75, 0.55);
  background: transparent;
  padding: 10px 0 12px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  border-radius: 0;
  transition: border-color 0.35s var(--ease);
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-bottom-color: var(--navy);
  box-shadow: 0 1px 0 0 var(--navy);
}
.field :is(input, textarea, select):focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 4px;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(20, 40, 75, 0.68); }

.form__foot {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.form__note {
  font-size: 0.78rem;
  color: var(--on-light-muted);
  max-width: 32ch;
  line-height: 1.5;
}
.form__status {
  font-size: 0.85rem;
  color: var(--navy);
  display: none;
}
.form.is-sent .form__status { display: block; }
.form.is-sent .form__foot { display: none; }

/* ---------- drawer de navegación (móvil) ---------- */
/*
  Según la guía «navigation-drawer» de Modern Web Guidance:
  <dialog> modal en la capa superior + scroll-snap horizontal (swipe nativo)
  + animación de scroll para el backdrop + IntersectionObserver como fuente de verdad.
*/

.drawer {
  --drawer-width: min(24em, 86vw, calc(100vw - 32px));
  --drawer-backdrop: 0;

  /* El UA pinta `color: CanvasText` en <dialog> y no hereda del body:
     sin esto el menú sale con texto negro sobre el navy. */
  color: var(--on-dark);

  position: fixed;
  inset: 0;
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}

.drawer::backdrop {
  background: var(--navy-900);
  opacity: calc(var(--drawer-backdrop) * 0.9);
}

.drawer__scroller {
  position: relative;
  display: grid;
  grid-template-columns: var(--drawer-width) 100%;
  height: 100vh;
  height: 100svh;
  overflow-x: scroll;
  overflow-y: hidden;
  overscroll-behavior: none;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}
.drawer__scroller::-webkit-scrollbar { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .drawer__scroller { scroll-behavior: smooth; }
}

/* Parada de snap «cerrado»: deja la hoja fuera de pantalla. */
.drawer__scroller::after {
  content: '';
  scroll-snap-align: end;
  scroll-initial-target: nearest;
}

.drawer__sheet {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100vh;
  height: 100svh;
  padding: max(20px, env(safe-area-inset-top)) var(--gutter) max(30px, env(safe-area-inset-bottom));
  background: var(--navy-900);
  border-right: 1px solid var(--on-dark-line);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: none;
  scroll-snap-align: start;
}
.drawer__sheet::-webkit-scrollbar { display: none; }

.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--on-dark-line);
}
.drawer__logo { height: 26px; width: auto; color: #fff; }
.drawer__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s var(--ease), border-color 0.3s var(--ease);
}
.drawer__close:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }

.drawer__nav { display: flex; flex-direction: column; margin-top: 10px; }
.drawer__nav a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 17px 0;
  border-bottom: 1px solid var(--on-dark-line);
  font-size: clamp(1.45rem, 6.2vw, 1.95rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.drawer__nav a .num {
  font-size: 0.64rem;
  letter-spacing: 0.2em;
  color: var(--yellow);
}
.drawer__cta { margin-top: 26px; align-self: flex-start; }
.drawer__foot {
  margin: auto 0 0;
  padding-top: 30px;
  font-size: 0.64rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1.9;
  color: rgba(255, 255, 255, 0.55);
}

/* Backdrop atado a la posición del scroll (se desvanece al arrastrar). */
@supports (animation-timeline: scroll()) {
  @property --drawer-backdrop {
    syntax: '<number>';
    inherits: true;
    initial-value: 0;
  }
  .drawer {
    timeline-scope: --drawer-fade;
    animation: fade-drawer-backdrop linear both;
    animation-timeline: --drawer-fade;
  }
  .drawer__scroller { scroll-timeline: --drawer-fade x; }
  @keyframes fade-drawer-backdrop {
    0% { --drawer-backdrop: 1; }
    100% { --drawer-backdrop: 0; }
  }
}

/* Bloquea el scroll de la página mientras el drawer está abierto. */
html:has(.drawer[open]),
body.nav-open { overflow: hidden; }

/* ---------- errores de formulario ---------- */

.field__error {
  display: none;
  margin-top: 9px;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--error);
}
/* Separadas a propósito: un selector desconocido invalida la lista completa,
   y el respaldo .is-invalid tiene que seguir funcionando sin :user-invalid. */
.field input:user-invalid ~ .field__error,
.field textarea:user-invalid ~ .field__error { display: block; }
.field input:user-invalid,
.field textarea:user-invalid {
  border-bottom-color: var(--error);
  box-shadow: 0 1px 0 0 var(--error);
}

.field.is-invalid .field__error { display: block; }
.field.is-invalid input,
.field.is-invalid textarea {
  border-bottom-color: var(--error);
  box-shadow: 0 1px 0 0 var(--error);
}

/* Oculto a la vista, visible para lectores de pantalla. */
.visually-hidden:where(:not(:focus-within, :active)) {
  position: absolute !important;
  clip-path: inset(50%) !important;
  overflow: hidden !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  border: 0 !important;
  white-space: nowrap !important;
}

/* ---------- footer ---------- */

.footer {
  background: var(--navy-900);
  color: #fff;
  padding-top: clamp(56px, 7vw, 96px);
  position: relative;
  overflow: hidden;
}
.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
  gap: clamp(28px, 4vw, 64px);
  padding-bottom: clamp(48px, 6vw, 80px);
  border-bottom: 1px solid var(--on-dark-line);
}
.footer__brand .brand svg { height: 34px; }
.footer__brand p {
  margin-top: 22px;
  font-size: 0.9rem;
  color: var(--on-dark-muted);
  max-width: 30ch;
}
.footer h3 {
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.58);
  margin-bottom: 20px;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.footer li { font-size: 0.92rem; color: rgba(255, 255, 255, 0.78); }
.footer a { transition: color 0.3s var(--ease); }
.footer a:hover { color: var(--yellow); }

.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding-block: 26px 30px;
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.58);
  letter-spacing: 0.04em;
}
.footer__mark {
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 420px;
  opacity: 0.05;
  pointer-events: none;
}

/* ---------- grano ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 90;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- revelados ---------- */

/* El contenido solo se oculta cuando el JS confirmó que puede revelarlo
   (clase .reveal-ready en <html>). Sin JS o si main.js falla, todo se ve. */
.reveal-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
}
.reveal-ready [data-reveal].is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0ms);
}
@media print {
  [data-reveal] { opacity: 1 !important; transform: none !important; }
}

/* ---------- responsive ---------- */

@media (max-width: 1180px) {
  .enfoque__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .about { grid-template-columns: 1fr; }
  .about__figure {
    aspect-ratio: 16 / 10;
    width: 100%;
    max-width: 720px;
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 1024px) {
  :root { --hdr-h: 72px; }
  .scroll-cue { display: none; }
  .eyebrow { font-size: 0.64rem; letter-spacing: 0.16em; }
  .nav { display: none; }
  .burger { display: block; }
  .header__cta .btn { display: none; }

  /* el menú móvil vive en un <dialog> de capa superior, ver .drawer */

  .hero__media { inset: 0; }
  .hero__media img { object-position: 66% center; }
  .hero__media::after {
    background:
      linear-gradient(180deg, rgba(11, 26, 51, 0.8) 0%, rgba(11, 26, 51, 0.62) 38%, rgba(11, 26, 51, 0.96) 100%);
  }
  .hero__copy { max-width: 100%; }
  .section__head { grid-template-columns: 1fr; align-items: start; }
  .svc { grid-template-columns: 56px minmax(0, 1fr); gap: 10px 18px; }
  .svc p { grid-column: 2; }
    .contact { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .btn {
    white-space: normal;
    text-align: left;
    line-height: 1.35;
    padding-block: 15px;
    padding-inline: 20px;
    font-size: 0.78rem;
    letter-spacing: 0.055em;
  }
  html { scroll-padding-top: 76px; }
  .sector { min-height: 170px; padding-block: 30px; }
  .sector__idx { font-size: 52px; top: 16px; }
  .hero__meta { grid-template-columns: 1fr; gap: 0; }
  .hero__meta li { padding: 10px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.1); }
  .hero__meta li:last-child { border-bottom: 0; }
  .hero__actions .btn { width: 100%; justify-content: space-between; }
  .enfoque__grid { grid-template-columns: 1fr; }
  .sectors { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .about__facts div { grid-template-columns: 1fr; gap: 4px; }
  .footer__top { grid-template-columns: 1fr; }
  .svc { grid-template-columns: 40px minmax(0, 1fr); padding: 24px 0; }
  .svc:hover h3 { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero h1 .line > span { transform: none; }
}
