/* ==========================================================================
   NAEM ETT — Hoja de estilos
   Paleta de marca: Azul #031D40 · Dorado #F5BD47 · Tipografía: Garamond
   ========================================================================== */

/* ---------- Tokens ----------
   Paleta corporativa (Tablero de Identidad NAEM):
   Azul   #031D40 · Pantone 282 C
   Dorado #F5BD47 · Pantone 142 C
   Crema  #FFF8EC · fondo de la paleta
   Texto  #221F1F
   El resto de tonos son variaciones de estos cuatro. */
:root {
  --navy: #031D40;
  --navy-2: #0F2A4C;
  --gold: #F5BD47;
  --gold-soft: #F8CE74;
  --cream: #FFF8EC;

  --ink: #221F1F;
  --ink-2: #4E5B70;              /* azul corporativo atenuado */
  --line: #EFE3CC;               /* crema oscurecida */
  --bg: #FFFFFF;
  --bg-muted: var(--cream);

  --on-navy: var(--cream);
  --on-navy-2: rgba(255, 248, 236, .66);

  --font-serif: "EB Garamond", "Garamond", "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;

  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 12px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);

  --container: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
  --nav-h: 56px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 6px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 100; padding: 10px 16px; background: var(--gold); color: var(--navy); border-radius: 999px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 12px; }

.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: 900px; }

/* ---------- Tipografía ---------- */
.eyebrow {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 16px;
}
.eyebrow--dark { color: var(--navy); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow--dark::before { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--gold); }
.section__head--center .eyebrow--dark::after { content: ""; width: 24px; height: 2px; border-radius: 2px; background: var(--gold); }

.section__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(36px, 5.6vw, 64px);
  line-height: 1.04;
  letter-spacing: -.02em;
}
.section__title { color: var(--navy); }
.section--navy .section__title { color: var(--on-navy); }
.muted { color: var(--ink-2); }
.section--navy .muted { color: var(--on-navy-2); }

/* ---------- Botones ---------- */
.btn {
  --h: 48px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--h);
  padding: 0 24px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -.01em;
  white-space: nowrap;
  transition: transform .4s var(--ease-out), background-color .3s, color .3s, box-shadow .4s var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.btn:active { transform: scale(.97); transition-duration: .1s; }
.btn--sm { --h: 34px; padding: 0 16px; font-size: 14px; }
.btn--lg { --h: 54px; padding: 0 30px; font-size: 17px; }
.btn--block { width: 100%; }

.btn--gold { background: var(--gold); color: var(--navy); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--ghost { color: var(--on-navy); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }

@media (hover: hover) {
  .btn--gold:hover { background: var(--gold-soft); box-shadow: 0 10px 30px -10px rgba(245,189,71,.6); transform: translateY(-1px); }
  .btn--navy:hover { background: var(--navy-2); transform: translateY(-1px); box-shadow: 0 10px 30px -12px rgba(3,29,64,.6); }
  .btn--ghost:hover { background: rgba(255,255,255,.08); box-shadow: inset 0 0 0 1px rgba(255,255,255,.5); }
  .btn:hover .btn__arrow { transform: translateX(3px); }
}
.btn__arrow { width: 16px; height: 16px; transition: transform .4s var(--ease-out); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 50;
  height: var(--nav-h);
  padding-top: env(safe-area-inset-top);
  transition: background-color .4s, box-shadow .4s, backdrop-filter .4s;
}
.nav__inner { height: var(--nav-h); display: flex; align-items: center; gap: 32px; }
.nav__brand { position: relative; display: block; height: 22px; flex-shrink: 0; }
.nav__logo { height: 22px; width: auto; transition: opacity .4s; }
.nav__logo--dark { position: absolute; inset: 0; opacity: 0; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { font-size: 13px; color: var(--on-navy-2); transition: color .25s; }
.nav__links a:hover { color: var(--on-navy); }
.nav__cta { flex-shrink: 0; }

/* Sobre el hero: cristal oscuro */
.nav.is-floating {
  background: rgba(3,29,64,.72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
/* Pasado el hero: cristal claro */
.nav.is-scrolled {
  background: rgba(255,248,236,.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  box-shadow: 0 1px 0 rgba(0,0,0,.08);
}
.nav.is-scrolled .nav__logo--light { opacity: 0; }
.nav.is-scrolled .nav__logo--dark { opacity: 1; }
.nav.is-scrolled .nav__links a { color: var(--ink-2); }
.nav.is-scrolled .nav__links a:hover { color: var(--navy); }
.nav.is-scrolled .nav__toggle span { background: var(--navy); }

.nav__toggle { display: none; position: relative; width: 40px; height: 40px; margin-right: -8px; }
.nav__toggle span {
  position: absolute; left: 11px; width: 18px; height: 1.5px; border-radius: 2px;
  background: var(--on-navy);
  transition: transform .5s var(--ease-out), background-color .3s;
}
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 23px; }
.nav.is-open .nav__toggle span:first-child { transform: translateY(3.5px) rotate(45deg); }
.nav.is-open .nav__toggle span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
.nav.is-open { background: var(--navy); box-shadow: none; backdrop-filter: none; }
.nav.is-open .nav__logo--light { opacity: 1; }
.nav.is-open .nav__logo--dark { opacity: 0; }
.nav.is-open .nav__toggle span { background: var(--on-navy); }

/* Menú móvil */
.mobile-menu {
  position: fixed; inset: 0; z-index: 40;
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 24px) var(--gutter) 40px;
  background: var(--navy);
  display: flex; flex-direction: column; justify-content: space-between;
  opacity: 0;
  pointer-events: none;
  transition: opacity .35s var(--ease-out);
}
/* display:flex anula el atributo hidden: sin esto el menú invisible tapa la página */
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open { opacity: 1; pointer-events: auto; }
.mobile-menu nav { display: flex; flex-direction: column; }
.mobile-menu nav a {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.5;
  color: var(--on-navy);
  opacity: 0; transform: translateY(-8px);
  transition: opacity .5s var(--ease-out), transform .5s var(--ease-out);
}
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu.is-open nav a:nth-child(2) { transition-delay: .04s; }
.mobile-menu.is-open nav a:nth-child(3) { transition-delay: .08s; }
.mobile-menu.is-open nav a:nth-child(4) { transition-delay: .12s; }
.mobile-menu.is-open nav a:nth-child(5) { transition-delay: .16s; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--on-navy);
  padding-top: calc(var(--nav-h) + clamp(56px, 11vh, 120px));
  text-align: center;
  isolation: isolate;
}
.hero__glow {
  position: absolute; z-index: -1;
  left: 50%; top: 58%;
  width: min(1100px, 140vw); aspect-ratio: 1;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(245,189,71,.20), rgba(245,189,71,.06) 45%, transparent 70%);
  pointer-events: none;
}
.hero__content { position: relative; }
.hero__title {
  font-family: var(--font-serif);
  font-weight: 500;
  font-size: clamp(52px, 10vw, 120px);
  line-height: .98;
  letter-spacing: -.03em;
}
.hero__line { display: block; }
.hero__line--accent {
  font-style: italic;
  background: linear-gradient(100deg, var(--gold) 20%, #FFE6AE 50%, var(--gold) 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  padding-bottom: .08em;
}
.hero__lead {
  max-width: 600px;
  margin: 28px auto 0;
  font-size: clamp(17px, 2vw, 21px);
  line-height: 1.45;
  color: var(--on-navy-2);
}
.hero__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }

/* Entrada escalonada del hero */
.hero__in {
  opacity: 0;
  transform: translateY(24px);
  filter: blur(8px);
  animation: heroIn 1.1s var(--ease-out) forwards;
  animation-delay: calc(var(--d) * 110ms + 150ms);
}
.hero__line--accent.hero__in {
  animation: heroIn 1.1s var(--ease-out) forwards, shimmer 6s ease-in-out 1.6s infinite;
  animation-delay: calc(var(--d) * 110ms + 150ms), 1.6s;
}
@keyframes heroIn { to { opacity: 1; transform: none; filter: blur(0); } }
@keyframes shimmer { 0%, 100% { background-position: 100% 0; } 50% { background-position: 0 0; } }

/* Escenario de fotos (tríptico) — --p: progreso de scroll 0→1 (lo fija JS) */
.hero__stage {
  --p: 0;
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr 1fr;
  align-items: end;
  gap: clamp(12px, 2vw, 24px);
  max-width: 1000px;
  margin-top: clamp(56px, 9vh, 96px);
  padding-bottom: clamp(48px, 8vw, 96px);
}
.hero__card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: 0 40px 80px -30px rgba(0,0,0,.6);
  opacity: 0;
  animation: stageIn 1.4s var(--ease-out) .7s forwards;
}
.hero__card img { width: 100%; height: 100%; object-fit: cover; }
.hero__card--center { aspect-ratio: 2 / 3; z-index: 2; animation-delay: .6s; }
.hero__card--left,
.hero__card--right { aspect-ratio: 4 / 5; margin-bottom: 8%; }
.hero__card--left  { transform-origin: right bottom; translate: calc(var(--p) * 40px) calc(var(--p) * -30px); }
.hero__card--right { transform-origin: left bottom;  translate: calc(var(--p) * -40px) calc(var(--p) * -30px); animation-delay: .8s; }
.hero__card--center { translate: 0 calc(var(--p) * -60px); }
@keyframes stageIn {
  from { opacity: 0; transform: translateY(60px) scale(.96); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(80px, 12vw, 160px); }
.section--tight { padding-block: clamp(56px, 8vw, 96px); }
.section--muted { background: var(--bg-muted); }
.section--navy { background: var(--navy); color: var(--on-navy); }
.section__head { margin-bottom: clamp(40px, 6vw, 72px); }
.section__head--center { text-align: center; }

/* Revelado al hacer scroll */
[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 1s var(--ease-out), transform 1s var(--ease-out);
  transition-delay: calc(var(--rd, 0) * 90ms);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

/* ---------- Declaración (palabras que se iluminan) ---------- */
.statement__text {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4.6vw, 54px);
  line-height: 1.18;
  letter-spacing: -.015em;
  font-weight: 500;
  color: var(--navy);
}
.statement__text .w { opacity: .16; transition: opacity .35s linear; }
.statement__text .w.is-lit { opacity: 1; }

/* ---------- Valores ---------- */
.values { padding-top: 0; }
.values__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(32px, 4vw, 56px); }
.value__icon {
  width: 48px; height: 48px; margin-bottom: 20px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--navy);
  color: var(--gold);
}
.value__icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.value h3 { color: var(--navy); font-size: 21px; font-weight: 600; letter-spacing: -.015em; margin-bottom: 8px; }
.value p { color: var(--ink-2); }

/* ---------- Bento de servicios ---------- */
.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: minmax(260px, auto);
  gap: 20px;
}
.tile {
  position: relative;
  overflow: hidden;
  grid-column: span 2;
  display: flex; flex-direction: column;
  padding: clamp(28px, 3vw, 40px);
  border-radius: var(--radius-lg);
  background: var(--bg);
  transition: transform .6s var(--ease-out), box-shadow .6s var(--ease-out), opacity 1s var(--ease-out);
}
@media (hover: hover) {
  .tile:hover { transform: translateY(-4px) scale(1.005); box-shadow: 0 24px 60px -24px rgba(3,29,64,.25); }
}
.tile__kicker {
  display: inline-grid; place-items: center; align-self: flex-start;
  width: 32px; height: 32px; margin-bottom: 18px;
  border-radius: 50%;
  font-size: 13px; font-weight: 600; letter-spacing: .02em;
  background: var(--gold); color: var(--navy);
}
.tile h3 { color: var(--navy); font-family: var(--font-serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 32px); line-height: 1.1; letter-spacing: -.01em; margin-bottom: 12px; }
.tile p { color: var(--ink-2); font-size: 16px; }

.tile--feature { grid-column: span 4; grid-row: span 2; padding: 0; }
.tile--feature .tile__body { padding: clamp(28px, 3.5vw, 48px) clamp(28px, 3.5vw, 48px) 0; max-width: 560px; }
.tile--feature h3 { font-size: clamp(32px, 3.6vw, 44px); }
.tile__media { margin-top: auto; padding: 32px clamp(28px, 3.5vw, 48px) 0; }
.tile__media img {
  width: 100%; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  transition: transform 1.2s var(--ease-out);
}
@media (hover: hover) { .tile--feature:hover .tile__media img { transform: scale(1.03); } }

.tile--navy { background: var(--navy); color: var(--on-navy); }
.tile--navy p { color: var(--on-navy-2); }
.tile--navy h3 { color: var(--on-navy); }
.tile__iso {
  position: absolute; right: -24px; bottom: -28px;
  width: 130px; opacity: .14;
  transition: transform 1s var(--ease-out), opacity .6s;
}
@media (hover: hover) { .tile--navy:hover .tile__iso { transform: rotate(-8deg) scale(1.08); opacity: .28; } }

.tile--photo { grid-column: span 4; padding: 0; min-height: 300px; }
.tile--photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.tile__overlay {
  position: relative; margin-top: auto;
  padding: clamp(28px, 3vw, 40px);
  background: linear-gradient(to top, rgba(3,29,64,.85), rgba(3,29,64,0));
}
.tile__overlay h3 { color: #fff; margin: 0; }
@media (hover: hover) { .tile--photo:hover img { transform: scale(1.04); } }

/* ---------- Soluciones ---------- */
.segmented {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr;
  width: max-content; margin: 0 auto clamp(40px, 5vw, 64px);
  padding: 4px;
  border-radius: 999px;
  background: var(--bg-muted);
}
.segmented button {
  position: relative; z-index: 1;
  min-width: 140px; height: 40px; padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: 500;
  color: var(--ink-2);
  transition: color .4s var(--ease-out);
}
.segmented button[aria-selected="true"] { color: #fff; }
.segmented__thumb {
  position: absolute; top: 4px; left: 4px;
  width: calc(50% - 4px); height: 40px;
  border-radius: 999px;
  background: var(--navy);
  box-shadow: 0 4px 14px -4px rgba(3,29,64,.4);
  transition: transform .55s var(--ease-spring);
}
.segmented[data-active="1"] .segmented__thumb { transform: translateX(100%); }

.panel {
  display: grid; grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 88px);
  align-items: center;
}
.panel[hidden] { display: none; }
.panel.is-entering .panel__media { animation: panelMedia .8s var(--ease-out) both; }
.panel.is-entering .panel__body > * { animation: panelText .7s var(--ease-out) both; }
.panel.is-entering .panel__body > *:nth-child(2) { animation-delay: .05s; }
.panel.is-entering .panel__body > *:nth-child(3) { animation-delay: .1s; }
.panel.is-entering .panel__body > *:nth-child(4) { animation-delay: .15s; }
@keyframes panelMedia { from { opacity: 0; transform: scale(.97); } }
@keyframes panelText  { from { opacity: 0; transform: translateY(14px); } }

.panel__media { overflow: hidden; border-radius: var(--radius-lg); }
.panel__media img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.panel__body h3 { color: var(--navy); font-family: var(--font-serif); font-weight: 500; font-size: clamp(32px, 3.8vw, 44px); line-height: 1.06; letter-spacing: -.015em; margin-bottom: 14px; }
.panel__body > p { color: var(--ink-2); font-size: 19px; margin-bottom: 28px; }
.checklist { display: grid; gap: 14px; margin-bottom: 36px; }
.checklist li { position: relative; padding-left: 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M6 10.5l2.5 2.5L14 7.5' fill='none' stroke='%23031D40' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat;
}

/* ---------- Proceso ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step {
  position: relative;
  padding: 32px 28px 36px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
  transition: background-color .5s, box-shadow .5s, transform .6s var(--ease-out), opacity 1s var(--ease-out);
}
@media (hover: hover) {
  .step:hover { background: rgba(255,255,255,.07); box-shadow: inset 0 0 0 1px rgba(245,189,71,.35); transform: translateY(-4px); }
}
.step__num {
  display: block;
  font-family: var(--font-serif);
  font-size: 56px; line-height: 1;
  color: var(--gold);
  margin-bottom: 28px;
}
.step h3 { font-size: 20px; font-weight: 600; letter-spacing: -.01em; margin-bottom: 8px; }
.step p { color: var(--on-navy-2); font-size: 16px; }

/* ---------- Sectores (marquee) ---------- */
.sectors__label { text-align: center; font-size: 15px; color: var(--ink-2); margin-bottom: 32px; }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee ul { display: flex; gap: 12px; padding-right: 12px; }
.marquee li {
  color: var(--navy);
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.6vw, 30px);
  padding: 10px 28px;
  border-radius: 999px;
  border: 1px solid var(--line);
  white-space: nowrap;
  transition: background-color .3s, color .3s, border-color .3s;
}
.marquee li:hover { background: var(--navy); color: var(--gold); border-color: var(--navy); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Galería de oficinas ---------- */
.offices__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.gallery__controls { display: flex; gap: 12px; margin-bottom: clamp(40px, 6vw, 72px); }
.round-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(3,29,64,.07);
  color: var(--navy);
  transition: background-color .3s, transform .3s var(--ease-out), opacity .3s;
}
.round-btn svg { width: 16px; height: 16px; }
.round-btn:hover { background: var(--gold); }
.round-btn:active { transform: scale(.92); }
.round-btn:disabled { opacity: .35; cursor: default; }

.gallery {
  --edge: max(var(--gutter), calc((100vw - var(--container)) / 2 + var(--gutter)));
  display: flex; gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--edge);
  padding: 0 var(--edge) 8px;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery__item {
  flex: 0 0 auto;
  height: clamp(320px, 42vw, 460px);
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: var(--radius-lg);
  scroll-snap-align: start;
  background: var(--line);
}
.gallery__item--tall { aspect-ratio: 2 / 3; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
@media (hover: hover) { .gallery__item:hover img { transform: scale(1.04); } }

/* ---------- Contacto ---------- */
.contact__grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(48px, 7vw, 112px); align-items: start; }
.contact__lead { font-size: 19px; color: var(--on-navy-2); margin: 20px 0 48px; }
.contact__list { display: grid; gap: 24px; }
.contact__list li { display: grid; gap: 2px; padding-bottom: 24px; border-bottom: 1px solid rgba(255,255,255,.1); }
.contact__label { font-size: 13px; color: var(--on-navy-2); }
.contact__list a, .contact__list span:not(.contact__label) { font-size: 19px; color: var(--on-navy); justify-self: start; overflow-wrap: anywhere; transition: color .25s; }
.contact__list a:hover { color: var(--gold); }
.contact__map {
  margin-top: 32px;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 16 / 10;
  background: var(--navy-2);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}
.contact__map iframe {
  width: 100%; height: 100%; border: 0; display: block;
  filter: grayscale(.4) contrast(1.05);
  transition: filter .6s var(--ease-out);
}
.contact__map:hover iframe { filter: none; }

.form {
  padding: clamp(24px, 4vw, 44px);
  border-radius: var(--radius-lg);
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 40px 80px -40px rgba(0,0,0,.5);
  display: grid; gap: 14px;
}
.form__type { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; margin: 0 0 6px; }
.form__type label { position: relative; cursor: pointer; }
.form__type input { position: absolute; opacity: 0; }
.form__type span {
  display: grid; place-items: center;
  height: 44px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 500;
  color: var(--ink-2);
  background: var(--bg-muted);
  transition: background-color .3s, color .3s, box-shadow .3s;
}
.form__type input:checked + span { background: var(--navy); color: #fff; }
.form__type input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { position: relative; }
.field input, .field textarea {
  width: 100%;
  padding: 26px 16px 10px;
  font: inherit; font-size: 17px; color: var(--ink);
  background: var(--bg);
  border: 1px solid rgba(3,29,64,.18);
  border-radius: var(--radius-sm);
  outline: none;
  resize: vertical;
  transition: border-color .25s, box-shadow .25s;
}
.field textarea { min-height: 128px; }
.field label {
  position: absolute; left: 17px; top: 18px;
  font-size: 17px; color: var(--ink-2);
  pointer-events: none;
  transform-origin: left top;
  transition: transform .3s var(--ease-out), color .3s;
}
.field input:focus, .field textarea:focus { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(3,29,64,.08); }
.field input:focus + label, .field textarea:focus + label,
.field input:not(:placeholder-shown) + label, .field textarea:not(:placeholder-shown) + label {
  transform: translateY(-10px) scale(.74);
}
.field.is-invalid input, .field.is-invalid textarea { border-color: #D4351C; box-shadow: 0 0 0 4px rgba(212,53,28,.08); }
.field.is-invalid { animation: shake .4s var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); margin: 4px 0 8px; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--navy); flex-shrink: 0; }
.check a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }
.check.is-invalid { color: #D4351C; }

.btn__spinner {
  display: none; width: 18px; height: 18px;
  border: 2px solid rgba(3,29,64,.25); border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.btn.is-loading .btn__label { display: none; }
.btn.is-loading .btn__spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form__status { min-height: 1.5em; font-size: 15px; text-align: center; color: var(--ink-2); }
.form__status.is-success { color: #1E7B45; }

/* ---------- Footer ---------- */
.footer { padding: 40px 0 calc(40px + env(safe-area-inset-bottom)); background: var(--bg-muted); font-size: 13px; color: var(--ink-2); }
.footer__inner { display: flex; align-items: center; gap: 32px; flex-wrap: wrap; }
.footer__logo { height: 20px; width: auto; }
.footer__links { display: flex; gap: 24px; }
.footer__links a:hover { color: var(--navy); }
.footer__copy { margin-left: auto; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .tile, .tile--photo { grid-column: span 3; }
  .tile--feature { grid-column: span 6; grid-row: auto; }
  .steps { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .nav__links, .nav__cta { display: none; }
  .nav__toggle { display: block; margin-left: auto; }

  .values__grid { grid-template-columns: 1fr; gap: 36px; }
  .panel { grid-template-columns: 1fr; }
  .contact__grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }

  .hero__actions .btn { width: 100%; max-width: 340px; }
  .hero__stage { grid-template-columns: 1fr 1.3fr 1fr; gap: 10px; }
  .hero__card { border-radius: 18px; }

  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 14px; }
  .tile, .tile--feature, .tile--photo { grid-column: auto; }
  .tile { min-height: 220px; }
  .tile--photo { min-height: 280px; }

  .steps { grid-template-columns: 1fr; gap: 12px; }
  .step { display: grid; grid-template-columns: 56px 1fr; column-gap: 8px; padding: 24px; }
  .step__num { grid-row: span 2; font-size: 44px; margin: 0; }

  .segmented button { min-width: 0; }
  .offices__head { display: block; }
  .gallery__controls { display: none; }
  .gallery { gap: 12px; }
  .gallery__item { height: 300px; border-radius: var(--radius-md); }

  .field-row { grid-template-columns: 1fr; }
  .footer__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer__copy { margin-left: 0; }
}

/* ---------- Movimiento reducido ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero__in, .hero__card { opacity: 1; filter: none; transform: none; }
  [data-reveal] { opacity: 1; transform: none; }
  .hero__stage { --p: 0 !important; }
  .marquee__track { animation: none; }
  .statement__text .w { opacity: 1; }
}
