/* =========================================================================
   Executive Service Business — Landing
   Dirección de arte: "Meridiano de Oro" (penumbra ejecutiva navy + gris papel,
   oro como hilo / luz). Tipografía serif única en toda la página.
   ========================================================================= */

:root {
  /* Color tokens */
  --navy-deep: #14202E;
  --navy:      #1B3A5C;
  --paper-1:   #D9D7DC;
  --paper-2:   #F5F5F5;
  --ink:       #2E2E2E;
  --ink-soft:  #6E6E6E;
  --gold-1:    #C9A22D;
  --gold-2:    #A38B35;
  --gold-doc:  #B08D3E;
  --gold-ink:  #6E5A20;   /* dorado oscuro solo para TEXTO sobre fondo claro (AA sobre #F5F5F5 ≈ 5.8:1) */
  --gold-hi:        #E7C255;  /* luz de hover (texto) */
  --gold-hi-border: #D8B23E;  /* luz de hover (borde) */
  --offwhite:  #EDEDF0;
  --slate:     #A9B4C0;

  --gold-grad: linear-gradient(180deg, #C9A22D 0%, #A38B35 100%);
  --serif: 'Times New Roman', 'Liberation Serif', Georgia, 'Times', serif;

  --maxw: 1180px;
  --maxw-narrow: 760px;
  --pad-y: clamp(6rem, 10vw, 9rem);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper-2);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-weight: 400; margin: 0; }
p { margin: 0; }
ol, ul { margin: 0; padding: 0; list-style: none; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--navy-deep); color: var(--gold-1);
  padding: .75rem 1.25rem; letter-spacing: .05em;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 clamp(1.25rem, 5vw, 3rem); }
.container--narrow { max-width: var(--maxw-narrow); }

/* Gold text clip (con fallback si no hay soporte de background-clip) */
.clip-gold {
  color: var(--gold-2); /* fallback */
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .clip-gold { background: none; color: var(--gold-1); -webkit-text-fill-color: currentColor; }
}

/* ---------- Wordmark ---------- */
.wordmark {
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: .14em;
  white-space: nowrap;
}
.wordmark strong { font-weight: 700; }
.wordmark.on-dark {
  color: var(--gold-2);
  background: var(--gold-grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .wordmark.on-dark { background: none; color: var(--gold-1); -webkit-text-fill-color: currentColor; }
}

/* ---------- Eyebrow / titles / rules ---------- */
.eyebrow {
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .25em;
  color: var(--gold-ink);   /* sobre gris papel; las variantes --dark van sobre navy */
  margin-bottom: 1.1rem;
}
.eyebrow--dark { color: var(--gold-1); }

.section-title {
  font-size: clamp(1.9rem, 4vw, 2.75rem);
  line-height: 1.18;
  color: var(--navy);
  max-width: 22ch;
}
.section-title.on-dark { color: var(--offwhite); }

.section-lead {
  margin-top: 1.5rem;
  max-width: 64ch;
  color: var(--ink-soft);
  font-size: 1.0625rem;
}
.section-lead.on-dark-soft { color: var(--slate); }
.on-dark { color: var(--offwhite); }
.on-dark-soft { color: var(--slate); }

.section-head { margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head--center { text-align: center; }
.section-head--center .section-title,
.section-head--center .section-lead { margin-left: auto; margin-right: auto; }
.section-head--center .section-title { max-width: 26ch; }
.section-lead--center { max-width: 70ch; }

.rule-brass {
  display: block;
  width: 120px; height: 1px;
  margin: 1.75rem 0;
  background: var(--gold-1);
  transform: scaleX(1);
  transform-origin: left center;
}

/* =========================================================================
   MERIDIANO — expresado en las COSTURAS: nodo diamante + hilo corto que
   desciende dentro de cada plancha (cose las secciones sin cruzar el texto)
   ========================================================================= */
.node { position: absolute; top: 0; left: 50%; width: 0; height: 0; z-index: 5; }
/* Rombo dorado centrado en la costura */
.node::before {
  content: "";
  position: absolute; left: -5.5px; top: -5.5px;
  width: 11px; height: 11px;
  background: var(--section-bg, var(--paper-2));
  border: 1px solid var(--gold-doc);
  transform: rotate(45deg) scale(.55);
  opacity: 0;
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
/* Hilo que entra en la plancha */
.node::after {
  content: "";
  position: absolute; left: -0.5px; top: 6px;
  width: 1px; height: clamp(38px, 6vw, 66px);
  background: linear-gradient(180deg, var(--gold-doc), transparent);
  opacity: .55;
  transform: scaleY(0); transform-origin: top center;
  transition: transform .8s var(--ease) .08s;
}
.node.is-visible::before { opacity: 1; transform: rotate(45deg) scale(1); }
.node.is-visible::after  { transform: scaleY(1); }

/* =========================================================================
   CABECERA
   ========================================================================= */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(20,32,46,.72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}
.site-header.scrolled {
  background: rgba(20,32,46,.95);
  border-bottom-color: rgba(201,162,45,.35);
}
.header-inner {
  max-width: var(--maxw); margin: 0 auto;
  height: 64px;
  padding: 0 clamp(1.25rem, 5vw, 3rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem;
}
.brand { text-decoration: none; }
.brand .wordmark { font-size: clamp(.72rem, 2.4vw, .92rem); }
.site-nav { display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.25rem); }
.site-nav a {
  color: var(--slate);
  text-decoration: none;
  font-size: .95rem;
  letter-spacing: .04em;
  position: relative;
  padding: .25rem 0;
}
.site-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0;
  width: 0; height: 1px; background: var(--gold-1);
  transition: width .25s var(--ease);
}
.site-nav a:hover, .site-nav a:focus-visible { color: var(--offwhite); }
.site-nav a:hover::after, .site-nav a:focus-visible::after { width: 100%; }
.site-nav .nav-cta { color: var(--gold-1); }

/* =========================================================================
   SELECTOR DE IDIOMA (botón + listbox)
   Solo se muestra con JS: sin JS no hay traducción posible y un control muerto
   sería peor que su ausencia.
   ========================================================================= */
.flag-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.lang-switch { display: none; }
.js .lang-switch { display: block; position: relative; }

.lang-btn {
  display: flex; align-items: center; gap: .5rem;
  margin: 0; padding: .32rem .55rem;
  font-family: var(--serif); font-size: .95rem; letter-spacing: .04em;
  color: var(--slate);
  background: transparent;
  border: 1px solid rgba(201,162,45,.32);
  border-radius: 3px;
  cursor: pointer;
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.lang-btn:hover, .lang-btn:focus-visible,
.lang-switch.is-open .lang-btn {
  color: var(--offwhite);
  border-color: var(--gold-hi-border);
  background: rgba(201,162,45,.08);
}
.lang-btn:focus-visible { outline: 2px solid var(--gold-1); outline-offset: 3px; }
.lang-code { line-height: 1; }
.lang-caret {
  width: 9px; height: 6px; flex: none;
  color: var(--gold-1);
  transition: transform .25s var(--ease);
}
.lang-switch.is-open .lang-caret { transform: rotate(180deg); }

/* Bandera: filete tenue para que el blanco de FR/GB no se funda con la cabecera */
.flag {
  width: 20px; height: 13.5px; flex: none;
  box-shadow: 0 0 0 1px rgba(237,237,240,.28);
}

.lang-menu {
  position: absolute; top: calc(100% + .65rem); right: 0;
  z-index: 110;
  min-width: 11.5rem;
  /* Con siete idiomas el desplegable ya es alto: en pantallas bajas (móvil en
     horizontal) se desplaza dentro de sí mismo en vez de salirse. */
  max-height: calc(100vh - 5.5rem);
  overflow-y: auto;
  margin: 0; padding: .3rem;
  list-style: none;
  background: rgba(20,32,46,.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(201,162,45,.45);
  border-radius: 4px;
  box-shadow: 0 18px 40px rgba(0,0,0,.45);
  animation: lang-in .22s var(--ease);
}
/* [hidden] pierde ante el display de arriba si no se repite aquí */
.lang-menu[hidden] { display: none; }
@keyframes lang-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: none; }
}

.lang-opt {
  display: flex; align-items: center; gap: .65rem;
  padding: .55rem .65rem;
  font-size: .95rem;
  color: var(--slate);
  cursor: pointer;
  border-radius: 2px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.lang-opt:hover { color: var(--offwhite); background: rgba(201,162,45,.10); }
.lang-opt:focus-visible {
  outline: none;
  color: var(--offwhite);
  background: rgba(201,162,45,.14);
  box-shadow: inset 0 0 0 1px var(--gold-1);
}
.lang-opt[aria-selected="true"] { color: var(--gold-1); }
/* Marca del idioma activo: rombo dorado, el mismo motivo que cose las secciones */
.lang-opt[aria-selected="true"]::after {
  content: "";
  margin-left: auto;
  width: 6px; height: 6px;
  background: var(--gold-1);
  transform: rotate(45deg);
}

/* Velo mientras llega el diccionario: evita leer el español y verlo cambiar.
   El <head> lo retira siempre a los 1200 ms pase lo que pase. */
.i18n-boot body { visibility: hidden; }

/* =========================================================================
   HERO
   ========================================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding-top: 100px;
  background: linear-gradient(180deg, #14202E 0%, #1B3A5C 52%, #14202E 100%);
  overflow: hidden;
}
.hero-inner {
  flex: 1;
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 2rem clamp(1.25rem, 5vw, 3rem) 3rem;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
}
.hero-copy { max-width: 46ch; position: relative; z-index: 4; }
.hero-title {
  font-size: clamp(2.05rem, 4.6vw, 3.5rem);
  line-height: 1.08;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.hero-copy .rule-brass { margin: 1.5rem 0 1.75rem; }
.hero-sub {
  color: var(--offwhite);
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.7;
}
.hero-coverage {
  margin-top: 1.5rem;
  color: var(--gold-1);   /* sobre el navy del hero: ≈4.8:1 (AA) */
  letter-spacing: .16em;
  font-size: .92rem;
  text-transform: uppercase;
}
.btn-ghost {
  display: inline-block;
  margin-top: 2.25rem;
  padding: .95rem 1.9rem;
  border: 1px solid var(--gold-1);
  color: var(--gold-1);
  text-decoration: none;
  letter-spacing: .05em;
  font-size: 1rem;
  background: transparent;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
}
.btn-ghost:hover, .btn-ghost:focus-visible {
  background: rgba(201,162,45,.10);
  border-color: var(--gold-hi-border);
  color: var(--gold-hi);
}

/* Mapa iluminado */
.hero-visual { position: relative; }
.hero-glow {
  position: absolute; inset: -10% -5% -10% 0;
  background: radial-gradient(closest-side, rgba(201,162,45,.28), transparent 72%);
  z-index: 1;
  filter: blur(4px);
  animation: glow-breathe 6s ease-in-out infinite;
}
@keyframes glow-breathe {
  0%, 100% { opacity: .9; }
  50%      { opacity: 1; }
}
.hero-map {
  position: relative; z-index: 2;
  width: 108%;
  max-width: none;
  margin-right: -8%;
  mix-blend-mode: screen;
  filter: drop-shadow(0 0 40px rgba(201,162,45,.18));
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 22%);
          mask-image: linear-gradient(90deg, transparent 0, #000 22%);
}

/* Barra de keywords (eco del flyer) */
.keyword-bar {
  background: var(--navy-deep);
  border-top: 1px solid rgba(201,162,45,.22);
  display: flex; flex-wrap: wrap; justify-content: center;
  gap: clamp(1rem, 4vw, 3rem);
  padding: 1.05rem 1.5rem;
  position: relative; z-index: 4;
}
.keyword-bar li {
  color: var(--gold-1);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .74rem;
}

/* =========================================================================
   SECCIONES (planchas)
   ========================================================================= */
.section { position: relative; padding: var(--pad-y) 0; scroll-margin-top: 76px; }
.section--paper { background: var(--paper-2); --section-bg: var(--paper-2); color: var(--ink); }
.section--navy { background: var(--navy); --section-bg: var(--navy); }
.section--navy-deep { background: var(--navy-deep); --section-bg: var(--navy-deep); }
.section > .container { position: relative; z-index: 4; }

/* Prosa */
.prose { max-width: 66ch; }
.prose p + p { margin-top: 1.4rem; }
.prose p { font-size: 1.1rem; }

/* Binomio: dos columnas */
.duo {
  margin-top: clamp(3rem, 6vw, 5rem);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.duo-divider { background: linear-gradient(180deg, transparent, var(--gold-doc) 20%, var(--gold-doc) 80%, transparent); }
.duo-label { font-size: .78rem; text-transform: uppercase; letter-spacing: .22em; color: var(--gold-ink); margin-bottom: .6rem; }
.duo-title { font-size: clamp(1.5rem, 2.6vw, 1.9rem); color: var(--navy); margin-bottom: 1rem; }
.duo-col p { color: var(--ink); }

/* Lema (cita) */
.lema {
  margin: clamp(3.5rem, 7vw, 6rem) auto 0;
  max-width: 30ch;
  text-align: center;
  position: relative;
}
.lema blockquote {
  margin: 0;
  font-style: italic;
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.35;
  color: var(--navy);
  position: relative;
}
.lema::before {
  content: "\201C";
  display: block;
  font-size: clamp(4rem, 9vw, 7rem);
  line-height: .6;
  color: var(--gold-1);
  opacity: .55;
  margin-bottom: .2rem;
}

/* =========================================================================
   POR QUÉ (razones I / II / III)
   ========================================================================= */
.reasons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}
.reason { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; }
.reason--wide { grid-column: 1 / -1; }
.reason-num {
  font-size: clamp(2.2rem, 4vw, 3rem);
  line-height: 1;
  color: var(--gold-1);
  font-style: italic;
}
.reason-title { font-size: clamp(1.35rem, 2.4vw, 1.65rem); margin-bottom: .85rem; }
.reason--wide .reason-body p { column-count: 2; column-gap: clamp(2rem, 4vw, 3.5rem); }

/* =========================================================================
   SERVICIOS (índice editorial 01–12)
   ========================================================================= */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(2.5rem, 5vw, 4.5rem);
}
.service {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: baseline;
  padding: 1.4rem 0;
  border-bottom: 1px solid rgba(176,141,62,.30);
}
.service-num {
  font-size: 1.05rem;
  color: var(--gold-ink);
  letter-spacing: .05em;
  min-width: 2ch;
}
.service-text h3 { font-size: clamp(1.2rem, 2vw, 1.4rem); color: var(--navy); margin-bottom: .35rem; }
.service-text p { color: var(--ink-soft); font-size: 1rem; }

/* =========================================================================
   VERTICAL DE ESTRATEGIA — líneas de acción (bloques con regla dorada + viñetas)
   ========================================================================= */
.vblock + .vblock { margin-top: clamp(3.5rem, 7vw, 6rem); }
.vsubhead { margin-bottom: clamp(2rem, 4vw, 3rem); }
.lines {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 4vw, 3.5rem);
}
.line { padding-top: 1.5rem; border-top: 2px solid var(--gold-1); }
.line-tag {
  display: block;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .22em;
  color: var(--gold-1); margin-bottom: .7rem;
}
.line-title { font-size: clamp(1.35rem, 2.4vw, 1.75rem); margin-bottom: .9rem; color: var(--offwhite); }
.line > p { font-size: 1rem; color: var(--slate); }
.line-bullets { margin-top: 1.1rem; }
.line-bullets li {
  position: relative;
  padding-left: 1.4em;
  margin-bottom: .55rem;
  font-size: .98rem;
  color: var(--slate);
}
.line-bullets li::before {
  content: "—";
  position: absolute; left: 0;
  color: var(--gold-1);
}

/* =========================================================================
   MODELOS DE COLABORACIÓN (regla dorada superior)
   ========================================================================= */
.models {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.75rem, 3.5vw, 2.75rem);
}
.model { padding-top: 1.4rem; border-top: 2px solid var(--gold-1); }
.model-title { font-size: clamp(1.25rem, 2.2vw, 1.5rem); margin-bottom: .85rem; }
.model p { font-size: 1rem; }

/* =========================================================================
   COBERTURA (regiones)
   ========================================================================= */
.regions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(2rem, 4vw, 3rem);
}
.region-name {
  font-size: clamp(1.3rem, 2.4vw, 1.7rem);
  color: var(--gold-1);
  letter-spacing: .04em;
  margin-bottom: .9rem;
  padding-bottom: .9rem;
  border-bottom: 1px solid rgba(201,162,45,.30);
}
.region p { font-size: 1rem; }
.regions--impact { grid-template-columns: repeat(2, 1fr); }

/* =========================================================================
   CONDICIONES / LAND & EXPAND
   ========================================================================= */
.section--terms .terms-body { text-align: center; }
.terms-quote {
  font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  line-height: 1.45;
  color: var(--navy);
  margin-bottom: 1.75rem;
}
.terms-body > p:not(.terms-quote) {
  color: var(--ink-soft);
  max-width: 60ch; margin: 0 auto;
  font-size: 1.0625rem;
}

/* =========================================================================
   CONTACTO (marco de latón)
   ========================================================================= */
.contact-frame {
  border: 1px solid rgba(201,162,45,.85);
  border-radius: 10px;
  padding: clamp(2.5rem, 6vw, 4.5rem);
  text-align: center;
}
.contact-frame .section-title { margin: 0 auto; max-width: 24ch; }
.contact-p { max-width: 58ch; margin: 1.5rem auto 0; }

/* ---- Formulario de contacto (sobre navy) ---- */
.cform { text-align: left; margin-top: clamp(2rem, 4vw, 3rem); }

/* Pestañas: control segmentado basado en radios (accesible sin JS).
   El flex vive en .cform-tabs-row, no en el fieldset: legend/fieldset tienen
   render especial y WebKit y Chromium divergían con el float-hack anterior. */
.cform-tabs { border: 0; padding: 0; margin: 0 0 2rem; }
.cform-tabs-legend {
  padding: 0; margin-bottom: .9rem;
  font-size: .78rem; text-transform: uppercase; letter-spacing: .22em; color: var(--gold-1);
}
.cform-tabs-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.cform-tab { flex: 1 1 6rem; cursor: pointer; }
.cform-tab input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cform-tab span {
  display: block; text-align: center; padding: .7rem 1rem; font-size: 1rem;
  color: var(--slate);
  border: 1px solid rgba(169,180,192,.30); border-radius: 4px;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.cform-tab:hover span { color: var(--offwhite); border-color: rgba(201,162,45,.6); }
.cform-tab input:checked + span { color: var(--navy-deep); background: var(--gold-grad); border-color: var(--gold-1); }
.cform-tab input:focus-visible + span { outline: 2px solid var(--gold-1); outline-offset: 2px; }

/* Campos */
.cform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem 1.5rem; }
.cform-field { display: flex; flex-direction: column; }
.cform-field--full { grid-column: 1 / -1; }
.cform-field label { font-size: .9rem; letter-spacing: .04em; color: var(--slate); margin-bottom: .5rem; }
.cform-opt { color: var(--slate); }
.cform-field input,
.cform-field textarea {
  font-family: var(--serif); font-size: 1rem; color: var(--offwhite);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(169,180,192,.30); border-radius: 4px;
  padding: .8rem .9rem;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.cform-field textarea { resize: vertical; min-height: 7rem; }
.cform-field input:focus,
.cform-field textarea:focus {
  outline: none;
  border-color: var(--gold-1);
  background: rgba(201,162,45,.06);
  box-shadow: 0 0 0 2px rgba(201,162,45,.45);
}
.cform-field input::placeholder,
.cform-field textarea::placeholder { color: rgba(169,180,192,.85); }

/* Widgets nativos en esquema oscuro solo en el bloque de contacto
   (caret, scrollbar del textarea, paleta de autofill del sistema) */
.section--contact { color-scheme: dark; }

/* AutoFill (WebKit/Blink): iOS fuerza fondo amarillo (#FAFFBD) y Android azul claro
   sobre los campos navy; se tapa con box-shadow inset del color efectivo del campo.
   #1D2936 = rgba(255,255,255,.04) compuesto sobre --navy-deep #14202E. */
.cform-field input:-webkit-autofill,
.cform-field input:-webkit-autofill:hover {
  -webkit-box-shadow: 0 0 0 1000px #1D2936 inset;
  box-shadow: 0 0 0 1000px #1D2936 inset;
  -webkit-text-fill-color: var(--offwhite);
  caret-color: var(--offwhite);
  transition: background-color 999999s ease-out, color 999999s ease-out;
}
/* Conserva el anillo de foco dorado además del relleno navy */
.cform-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 2px rgba(201,162,45,.45), 0 0 0 1000px #1D2936 inset;
  box-shadow: 0 0 0 2px rgba(201,162,45,.45), 0 0 0 1000px #1D2936 inset;
  -webkit-text-fill-color: var(--offwhite);
  caret-color: var(--offwhite);
}
/* Firefox (regla separada: un selector desconocido invalidaría la lista entera) */
.cform-field input:autofill { box-shadow: 0 0 0 1000px #1D2936 inset; }

/* Honeypot: fuera de pantalla */
.cform-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consentimiento — checkbox propio: con accent-color oro, Safari iOS dibuja el
   check blanco sin contraste (WebKit #244233); glifo navy sobre oro como la
   pestaña activa. */
.cform-consent {
  display: flex; gap: .7rem; align-items: flex-start;
  margin: 1.5rem 0 1.75rem; color: var(--slate); font-size: .95rem; line-height: 1.5; cursor: pointer;
}
.cform-consent input {
  -webkit-appearance: none;
  appearance: none;
  margin: .25rem 0 0;
  width: 1.05rem; height: 1.05rem; flex: none;
  border: 1px solid rgba(169,180,192,.5);
  border-radius: 3px;
  background: rgba(255,255,255,.04);
  cursor: pointer;
  transition: border-color .2s var(--ease), background-color .2s var(--ease);
}
.cform-consent input:checked {
  border-color: var(--gold-1);
  background-color: var(--gold-1); /* fallback bajo las capas */
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%2314202E' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round' d='M3 8.5l3.2 3.2L13 4.5'/%3E%3C/svg%3E"),
    var(--gold-grad);
  background-size: 80%, 100%;
  background-position: center;
  background-repeat: no-repeat;
}
.cform-consent input:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 2px;
}

/* Acciones + estado */
.cform-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.cform-submit { margin-top: 0; font-family: var(--serif); cursor: pointer; }
.cform-submit[disabled],
.cform-submit[aria-disabled="true"] { opacity: .6; cursor: default; }
.cform-status { margin: 0; font-size: .95rem; }
.cform-status.is-ok { color: #86c78f; }
.cform-status.is-error { color: #e6867c; }

/* =========================================================================
   FOOTER
   ========================================================================= */
.site-footer { background: var(--navy-deep); padding-top: clamp(3.5rem, 6vw, 5rem); }
.site-footer .container { text-align: center; position: relative; z-index: 4; }
.footer-wordmark { font-size: clamp(1rem, 3vw, 1.35rem); margin-bottom: 1.5rem; }
.footer-lema {
  font-style: italic;
  color: var(--slate);
  font-size: clamp(1.05rem, 2.2vw, 1.3rem);
  max-width: 40ch; margin: 0 auto 1.75rem;
}
.footer-note { color: var(--slate); max-width: 60ch; margin: 0 auto; font-size: .95rem; }
.footer-note a { color: var(--gold-1); text-decoration: none; }
.footer-note a:hover, .footer-note a:focus-visible { text-decoration: underline; }
.keyword-bar--footer { margin-top: clamp(3rem, 5vw, 4rem); border-top-color: rgba(201,162,45,.22); }
.copyright {
  text-align: center;
  color: var(--slate);
  font-size: .8rem;
  letter-spacing: .1em;
  padding: 1.5rem;
  margin: 0;
  opacity: .7;
}

/* =========================================================================
   FOCUS
   ========================================================================= */
a:focus-visible, .btn-ghost:focus-visible {
  outline: 2px solid var(--gold-1);
  outline-offset: 3px;
}
/* El destino del skip-link recibe foco pero sin contorno permanente visible */
main:focus { outline: none; }

/* =========================================================================
   REVEAL (scroll animation)
   ========================================================================= */
/* El contenido es visible por defecto; solo se oculta para animar cuando hay JS. */
.js .reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* =========================================================================
   AJUSTES POR IDIOMA
   La página se traduce en cliente; el <html lang> cambia con ella y de él
   cuelgan los ajustes que cada lengua necesita.
   ========================================================================= */

/* --- Chino: la pila serif latina no tiene glifos CJK. Se mantienen las serifas
   latinas al principio (marca y términos técnicos siguen en Times) y se añaden
   detrás las serifas chinas, que son las que resuelven los ideogramas. --- */
html[lang^="zh"] {
  --serif: 'Times New Roman', 'Liberation Serif', Georgia,
           'Songti SC', 'STSong', 'Noto Serif CJK SC', 'Source Han Serif SC',
           SimSun, 'Microsoft YaHei', serif;
}
html[lang^="zh"] body { line-height: 1.85; }
/* Ni versalitas ni tracking de alfabeto latino sobre ideogramas */
html[lang^="zh"] .hero-title,
html[lang^="zh"] .hero-coverage { text-transform: none; }
html[lang^="zh"] .eyebrow,
html[lang^="zh"] .duo-label,
html[lang^="zh"] .line-tag,
html[lang^="zh"] .cform-tabs-legend,
html[lang^="zh"] .keyword-bar li,
html[lang^="zh"] .hero-coverage { letter-spacing: .12em; }
/* Medida de línea: un ideograma ocupa ~2ch, así que las anchuras en ch se
   quedarían a la mitad; se rehacen en em. */
html[lang^="zh"] .hero-copy { max-width: 27em; }
html[lang^="zh"] .section-title { max-width: 15em; }
html[lang^="zh"] .section-head--center .section-title,
html[lang^="zh"] .contact-frame .section-title { max-width: 18em; }
html[lang^="zh"] .section-lead { max-width: 33em; }
html[lang^="zh"] .section-lead--center { max-width: 35em; }
html[lang^="zh"] .prose { max-width: 34em; }
html[lang^="zh"] .lema { max-width: 17em; }
html[lang^="zh"] .terms-body > p:not(.terms-quote) { max-width: 31em; }
html[lang^="zh"] .contact-p { max-width: 30em; }
html[lang^="zh"] .footer-lema { max-width: 21em; }
html[lang^="zh"] .footer-note { max-width: 31em; }

/* --- Coreano: sin fuentes con hangul en la pila latina. Mismo criterio que el
   chino (latinas delante, hangul detrás), con medidas algo más holgadas: una
   sílaba coreana ocupa un cuadratín pero las palabras son más largas. --- */
html[lang="ko"] {
  --serif: 'Times New Roman', 'Liberation Serif', Georgia,
           'Nanum Myeongjo', 'AppleMyungjo', 'Noto Serif KR', 'Source Han Serif K',
           Batang, 'Malgun Gothic', serif;
}
html[lang="ko"] body { line-height: 1.85; }
html[lang="ko"] .hero-title,
html[lang="ko"] .hero-coverage { text-transform: none; }
html[lang="ko"] .eyebrow,
html[lang="ko"] .duo-label,
html[lang="ko"] .line-tag,
html[lang="ko"] .cform-tabs-legend,
html[lang="ko"] .keyword-bar li,
html[lang="ko"] .hero-coverage { letter-spacing: .12em; }
html[lang="ko"] .hero-copy { max-width: 30em; }
html[lang="ko"] .section-title { max-width: 17em; }
html[lang="ko"] .section-head--center .section-title,
html[lang="ko"] .contact-frame .section-title { max-width: 20em; }
html[lang="ko"] .section-lead { max-width: 36em; }
html[lang="ko"] .section-lead--center { max-width: 38em; }
html[lang="ko"] .prose { max-width: 37em; }
html[lang="ko"] .lema { max-width: 19em; }
html[lang="ko"] .terms-body > p:not(.terms-quote) { max-width: 34em; }
html[lang="ko"] .contact-p { max-width: 33em; }
html[lang="ko"] .footer-lema { max-width: 23em; }
html[lang="ko"] .footer-note { max-width: 34em; }

/* --- Francés, portugués y guaraní: las versiones más largas; se afloja la
   medida de los títulos para que no caigan en cuatro líneas. --- */
html[lang="fr"] .section-title,
html[lang^="pt"] .section-title,
html[lang^="gn"] .section-title { max-width: 24ch; }
html[lang="fr"] .section-head--center .section-title,
html[lang^="pt"] .section-head--center .section-title,
html[lang^="gn"] .section-head--center .section-title { max-width: 28ch; }

/* --- Guaraní: alfabeto latino, pero con vocales nasales (ẽ ĩ ũ ỹ) fuera del
   Latin-1 y con la g̃ nasal, que NO tiene forma precompuesta: es g + tilde
   combinante y hay fuentes que la colocan mal. Se añaden detrás familias con
   cobertura amplia de diacríticos para que ningún glifo caiga en tofu. --- */
html[lang^="gn"] {
  --serif: 'Times New Roman', 'Liberation Serif', Georgia,
           'DejaVu Serif', 'Charis SIL', 'Gentium Plus', 'Noto Serif', serif;
}
/* Sus rótulos de navegación son bastante más largos que en español
   ("Ñomongeta" por "Contacto", y «Tecnología» va entrecomillado), y la cabecera
   se quedaba corta en móvil. Se aprieta solo aquí, sin tocar los demás idiomas. */
@media (max-width: 700px) {
  html[lang^="gn"] .site-nav a[href="#servicios"] { display: none; }
}
@media (max-width: 430px) {
  html[lang^="gn"] .brand .wordmark { font-size: .6rem; letter-spacing: .05em; }
  html[lang^="gn"] .site-nav a { font-size: .85rem; }
  html[lang^="gn"] .site-nav { gap: .6rem; }
}

/* --- Árabe: escritura cursiva y de derecha a izquierda. --- */
html[lang="ar"] {
  --serif: 'Times New Roman', 'Liberation Serif',
           'Amiri', 'Noto Naskh Arabic', 'Traditional Arabic', 'Al Bayan',
           'Geeza Pro', 'Simplified Arabic', serif;
}
/* El árabe tiene una altura de x pequeña en las serifas: un punto más de cuerpo
   y más interlínea para que respiren los signos diacríticos. */
html[lang="ar"] body { font-size: 19px; line-height: 1.95; }
/* El espaciado entre letras rompe la unión cursiva: se anula en todo lo que
   lleva texto árabe (la marca sigue siendo latina y conserva el suyo). */
html[lang="ar"] .eyebrow,
html[lang="ar"] .hero-title,
html[lang="ar"] .hero-coverage,
html[lang="ar"] .keyword-bar li,
html[lang="ar"] .duo-label,
html[lang="ar"] .line-tag,
html[lang="ar"] .region-name,
html[lang="ar"] .cform-tabs-legend,
html[lang="ar"] .cform-field label,
html[lang="ar"] .cform-consent,
html[lang="ar"] .site-nav a,
html[lang="ar"] .btn-ghost,
html[lang="ar"] .lang-btn,
html[lang="ar"] .skip-link,
html[lang="ar"] .copyright { letter-spacing: normal; }
html[lang="ar"] .section-title { max-width: 26ch; }
html[lang="ar"] .section-head--center .section-title { max-width: 30ch; }

/* Espejo de la maquetación. Rejillas, flex y alineaciones se invierten solas
   con dir="rtl"; aquí solo van los desplazamientos y posiciones absolutas que
   están escritos en izquierda/derecha físicas. */
html[dir="rtl"] .skip-link { left: auto; right: -9999px; }
html[dir="rtl"] .skip-link:focus { left: auto; right: 1rem; }

html[dir="rtl"] .hero-map {
  margin-right: 0; margin-left: -8%;
  -webkit-mask-image: linear-gradient(270deg, transparent 0, #000 22%);
          mask-image: linear-gradient(270deg, transparent 0, #000 22%);
}
html[dir="rtl"] .hero-glow { inset: -10% 0 -10% -5%; }
html[dir="rtl"] .rule-brass { transform-origin: right center; }

html[dir="rtl"] .site-nav a::after { left: auto; right: 0; }

html[dir="rtl"] .line-bullets li { padding-left: 0; padding-right: 1.4em; }
html[dir="rtl"] .line-bullets li::before { left: auto; right: 0; }

html[dir="rtl"] .lang-menu { right: auto; left: 0; }
html[dir="rtl"] .lang-opt[aria-selected="true"]::after { margin-left: 0; margin-right: auto; }

html[dir="rtl"] .cform { text-align: right; }
html[dir="rtl"] .cform-hp { left: auto; right: -9999px; }
/* El correo se teclea en latino: se compone de izquierda a derecha, pero
   alineado al margen del formulario para no romper la columna. */
html[dir="rtl"] #cf-email { direction: ltr; text-align: right; }

/* En móvil el mapa ocupa el ancho completo y pierde el degradado; la regla RTL
   de arriba gana por especificidad al bloque responsive, así que se repite. */
@media (max-width: 760px) {
  html[dir="rtl"] .hero-map {
    margin-left: 0;
    -webkit-mask-image: none; mask-image: none;
  }
  /* el hero móvil fija text-align: left explícitamente */
  html[dir="rtl"] .hero-inner { text-align: right; }
}

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 960px) {
  .reasons { grid-template-columns: 1fr; }
  .reason--wide .reason-body p { column-count: 1; }
  .models { grid-template-columns: repeat(2, 1fr); }
  .regions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  /* Con el selector de idioma, la cabecera deja de caber por unos 70 px entre
     760 y ~870 px (y overflow-x: hidden lo recortaría en silencio). Se retira
     el enlace menos crítico, como ya se hace en anchos menores: la sección
     sigue accesible desplazándose. */
  .site-nav a[href="#modelos"] { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 17px; }
  .node::before { left: -4px; top: -4px; width: 8px; height: 8px; }
  .node::after { height: clamp(28px, 8vw, 44px); }

  .hero { min-height: auto; padding-top: 84px; }
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding-top: 2.5rem; padding-bottom: 2.5rem;
    text-align: left;
  }
  .hero-visual { order: -1; }
  .hero-map { width: 100%; margin-right: 0;
    -webkit-mask-image: none; mask-image: none; }
  .hero-glow { inset: -8% 0; }
  .hero-copy { max-width: none; }

  .services { grid-template-columns: 1fr; }
  .models { grid-template-columns: 1fr; }
  .regions, .regions--impact { grid-template-columns: 1fr; }
  .lines { grid-template-columns: 1fr; }
  .cform-grid { grid-template-columns: 1fr; }

  .duo { grid-template-columns: 1fr; }
  .duo-divider { display: none; }
  .duo-col ~ .duo-col { padding-top: .5rem; border-top: 1px solid rgba(176,141,62,.30); }

  .site-nav { gap: 1.1rem; }
  .site-nav a[href="#estrategia"] { display: none; }   /* #modelos ya oculto desde 900px */
}

@media (max-width: 480px) {
  /* Pestañas del form: una sola fila compacta (antes rompían en 2+1 con
     "Otros" sola a ancho completo). Cabe: a 375px cada pestaña dispone de
     ~89px y "Estrategia" a .9rem ocupa ~80px con padding y borde. */
  .cform-tabs-row { flex-wrap: nowrap; gap: .4rem; }
  .cform-tab { flex: 1 1 0; min-width: 0; }
  .cform-tab span {
    padding: .7rem .25rem;
    font-size: .9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

@media (max-width: 420px) {
  .site-nav a[href="#servicios"] { display: none; }
  .site-nav { gap: .9rem; }
  /* Solo bandera: el código de idioma es redundante y la cabecera va justa */
  .lang-code { display: none; }
  .lang-btn { gap: .35rem; padding: .3rem .4rem; }
  .keyword-bar { gap: .6rem 1.1rem; }
  .hero-title { font-size: 2.15rem; letter-spacing: .02em; }
  .brand .wordmark { letter-spacing: .1em; }
  .contact-frame { padding: clamp(1.5rem, 7vw, 2.5rem); }
}

@media (max-width: 350px) {
  .cform-tab span { font-size: .8rem; padding: .75rem .15rem; }
}

@media (max-width: 360px) {
  .header-inner { padding-left: 1rem; padding-right: 1rem; gap: .75rem; }
  .site-nav { gap: .7rem; }
  .brand .wordmark { font-size: .64rem; letter-spacing: .06em; }
  .footer-wordmark { font-size: clamp(.72rem, 3.4vw, 1rem); letter-spacing: .08em; }
}

/* =========================================================================
   REDUCED MOTION
   ========================================================================= */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  .node::before { opacity: 1; transform: rotate(45deg) scale(1); }
  .node::after { transform: scaleY(1); }
}
