/* RGI Consulting · hoja de estilos
   Tokens del sistema de marca "RGI Consulting". Cambie un color aquí y se actualiza en todo el sitio. */

:root {
  --surface: #f5f8f8;
  --surface-raised: #ffffff;
  --surface-sunk: #e8eff1;
  --line: #c9d7db;
  --line-strong: #6f878f;
  --ink: #0f2a33;
  --ink-muted: #46616b;
  --teal: #165a72;
  --teal-deep: #0d3f51;
  --teal-tint: #d7e9ee;
  --on-teal: #ffffff;
  --on-deep: #ffffff;
  --on-deep-muted: #b9d3db;
  --link: #165a72;
  --signal: #f2a900;
  --on-signal: #0f2a33;
  --success: #1d7a4c;
  --danger: #b3261e;
  --name-ink: var(--ink);
  --focus: #0d3f51;
  --whatsapp: #1f7a52;
  --pattern: rgba(255, 255, 255, 0.07);

  --font-display: "Archivo", "Arial Narrow", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --space-1: 4px; --space-2: 8px; --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 80px;
  --radius-sm: 2px; --radius-md: 6px; --radius-lg: 10px;
  --shadow-raised: 0 1px 2px rgba(15, 42, 51, 0.08), 0 4px 12px rgba(15, 42, 51, 0.06);
  --max: 1180px;
  color-scheme: light;
}

/* ---------- Ajustes por idioma (data-locale en <html>) ----------
   Cada idioma puede redefinir cualquier token. Ver "Locales" en el sistema de marca.
   es-MX: paleta base. Sin morado ni naranja cempasúchil (asociados a luto / Día de Muertos).
   en:    paleta base.
   de:    paleta base.
   ko:    el azul/verde azulado NO tiene connotación negativa en Corea; se mantiene.
          Los nombres de personas nunca en rojo (--name-ink fijo a tinta).
          Sin bandas blanco-sobre-negro; tipografía coreana IBM Plex Sans KR. */
[data-locale="ko"] {
  --name-ink: var(--ink);
  --font-display: "IBM Plex Sans KR", "Archivo", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --font-sans: "IBM Plex Sans KR", "IBM Plex Sans", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
[data-locale="ko"] body { word-break: keep-all; }
/* Ejemplo de cómo cambiar un color para un país (desactivado):
[data-locale="de"] { --signal: #f2a900; } */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body { margin: 0; background: var(--surface); color: var(--ink); font: 400 17px/28px var(--font-sans); }
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font: 700 clamp(36px, 5.2vw, 56px)/1.07 var(--font-display); letter-spacing: -0.01em; }
h2 { font: 700 clamp(26px, 3.2vw, 34px)/1.18 var(--font-display); letter-spacing: -0.005em; }
h3 { font: 600 20px/28px var(--font-sans); }
p { margin: 0; }
.lead { font-size: 19px; line-height: 30px; color: var(--ink-muted); max-width: 62ch; }
.label { font: 500 12px/16px var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--teal); margin: 0; }
.num { font-family: var(--font-mono); font-weight: 500; letter-spacing: 0.02em; white-space: nowrap; }
.muted { color: var(--ink-muted); }
.small { font-size: 14px; line-height: 20px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: var(--max); margin-inline: auto; padding-inline: var(--space-4); }
@media (min-width: 720px) { .wrap { padding-inline: var(--space-6); } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface-raised); padding: 8px 12px; z-index: 100; }
.skip:focus { left: 8px; }
.ico { flex: none; }

/* ---------- Buttons ---------- */
.btns { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 48px; padding: 12px 22px; border-radius: var(--radius-md); border: 1.5px solid transparent;
  font: 600 16px/20px var(--font-sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s;
}
.btn .num { font-size: 15px; }
.btn--primary { background: var(--teal); color: var(--on-teal); }
.btn--primary:hover { background: var(--teal-deep); }
.btn--signal { background: var(--signal); color: var(--on-signal); }
.btn--signal:hover { background: #ffbe1a; }
.btn--outline { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--outline:hover { background: var(--teal-tint); }
.btn--outline .wa { color: var(--whatsapp); }
.btn--light { background: var(--surface-raised); color: var(--teal-deep); }
.btn--light:hover { background: var(--teal-tint); }
.btn--outline-light { background: transparent; color: var(--on-deep); border-color: rgba(255,255,255,.55); }
.btn--outline-light:hover { background: rgba(255,255,255,.1); }
.hero .btn:focus-visible, .closing .btn:focus-visible, .division--lead .btn:focus-visible, .ebar a:focus-visible { outline-color: var(--signal); }
.arrow-link { display: inline-flex; align-items: center; gap: var(--space-2); font-weight: 600; color: var(--link); text-decoration: none; margin-top: auto; }
.arrow-link:hover { text-decoration: underline; }

/* ---------- Emergency bar ---------- */
.ebar { background: var(--ink); color: var(--on-deep); font-size: 14px; line-height: 20px; }
.ebar__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-5); padding-block: var(--space-2); }
.ebar__msg { display: flex; align-items: center; gap: var(--space-2); min-width: 0; }
.ebar__dot { width: 9px; height: 9px; background: var(--signal); transform: rotate(45deg); border-radius: 1px; flex: none; }
.ebar__call { display: inline-flex; align-items: center; gap: var(--space-2); padding: 3px 12px; background: var(--signal); color: var(--on-signal); border-radius: var(--radius-md); text-decoration: none; }
@media (max-width: 639px) { .ebar__msg { font-size: 13px; } }

/* ---------- Header ---------- */
.hdr { position: sticky; top: 0; z-index: 50; background: var(--surface-raised); border-bottom: 1px solid var(--line); }
.hdr__in { display: flex; align-items: center; gap: var(--space-4); min-height: 72px; }
.hdr__brand { text-decoration: none; color: var(--teal); flex: none; }
.lockup { display: inline-flex; align-items: center; gap: 10px; color: inherit; }
.lockup__rgi { font: 700 26px/1 "Archivo", var(--font-display); letter-spacing: .04em; }
.lockup__bar { width: 1.5px; height: 28px; background: currentColor; }
.lockup__div { font: 400 11px/1 var(--font-sans); letter-spacing: .28em; text-transform: uppercase; }
.hdr__nav { display: flex; align-items: center; gap: var(--space-4); margin-left: auto; }
.hdr__links { display: flex; gap: var(--space-1); list-style: none; margin: 0; padding: 0; }
.hdr__links a { display: block; white-space: nowrap; padding: 8px 9px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; border-radius: var(--radius-md); }
.hdr__links a:hover { background: var(--surface-sunk); }
.hdr__links a[aria-current="page"] { color: var(--teal); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.hdr__toggle { display: none; margin-left: auto; background: none; border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); width: 44px; height: 44px; align-items: center; justify-content: center; color: var(--ink); cursor: pointer; }
.hdr__toggle .i-close { display: none; }
.hdr__toggle[aria-expanded="true"] .i-close { display: block; }
.hdr__toggle[aria-expanded="true"] .i-open { display: none; }

.lang { position: relative; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 10px; border: 1.5px solid var(--line); border-radius: var(--radius-md); cursor: pointer; font: 500 13px/16px var(--font-mono); letter-spacing: .06em; color: var(--ink); }
.lang summary::-webkit-details-marker { display: none; }
.lang__menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 190px; list-style: none; margin: 0; padding: 6px; background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); z-index: 60; }
.lang__menu a { display: flex; gap: 12px; align-items: center; padding: 8px 10px; border-radius: var(--radius-md); color: var(--ink); text-decoration: none; }
.lang__menu a:hover { background: var(--surface-sunk); }
.lang__menu a[aria-current="true"] { background: var(--teal-tint); font-weight: 600; }
.lang__code { font: 500 12px/16px var(--font-mono); color: var(--teal); width: 22px; }

@media (max-width: 1279px) {
  .hdr__toggle { display: inline-flex; }
  .hdr__cta { display: none; }
  .hdr__nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--surface-raised); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: var(--space-3) var(--space-4) var(--space-5); gap: var(--space-3); box-shadow: var(--shadow-raised); }
  .hdr__nav.is-open { display: flex; }
  .hdr__links { flex-direction: column; }
  .hdr__links a { padding: 12px; font-size: 17px; }
  .hdr__links a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--teal); }
  .lang__menu { position: static; box-shadow: none; margin-top: 6px; }
}

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero--deep { background: var(--teal-deep); color: var(--on-deep); }
.hero--deep .label { color: var(--signal); }
.hero--deep .lead { color: var(--on-deep-muted); }
.hero--tint { background: var(--teal-tint); }
.hero__in { position: relative; display: grid; gap: var(--space-7); padding-block: var(--space-7); align-items: center; }
@media (min-width: 900px) { .hero__in { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); padding-block: 88px; } .hero__in--solo { grid-template-columns: minmax(0, 1fr); padding-block: 72px; } }
.hero__text { display: grid; gap: var(--space-5); min-width: 0; }
.hero__text h1 { max-width: 18ch; }
.hero--tint h1 { max-width: 22ch; }
.diamonds { position: absolute; inset: 0 0 0 auto; width: 46%; height: 100%; color: var(--pattern); pointer-events: none;
  -webkit-mask-image: linear-gradient(to left, #000 30%, transparent); mask-image: linear-gradient(to left, #000 30%, transparent); }
.facts { margin: 0; display: grid; background: rgba(5, 25, 33, .45); border: 1px solid rgba(255,255,255,.14); border-radius: var(--radius-lg); }
.facts__row { display: grid; grid-template-columns: 92px 1fr; gap: var(--space-4); align-items: baseline; padding: 18px 22px; }
.facts__row + .facts__row { border-top: 1px solid rgba(255,255,255,.12); }
.facts dt { font-size: 26px; line-height: 30px; color: var(--signal); }
.facts dd { margin: 0; color: var(--on-deep); font-size: 15px; line-height: 22px; }

/* ---------- Sections ---------- */
.section { padding-block: var(--space-7); }
@media (min-width: 720px) { .section { padding-block: var(--space-8); } }
.section--tight { padding-block: var(--space-6); }
.section--sunk { background: var(--surface-sunk); }
.section--tint { background: var(--teal-tint); }
.sec-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-6); }
.grid3 { display: grid; gap: var(--space-5); }
@media (min-width: 720px) { .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.well { width: 48px; height: 48px; display: grid; place-items: center; background: var(--teal-tint); color: var(--teal); border-radius: var(--radius-md); flex: none; }
.section--tint .well { background: var(--surface-raised); }

/* Divisions (home) */
.divisions { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .divisions { grid-template-columns: 1.35fr 1fr; grid-template-rows: auto auto; } .division--lead { grid-row: span 2; } }
.division { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.division p { color: var(--ink-muted); }
.division--lead { background: var(--teal-deep); color: var(--on-deep); border-color: transparent; padding: var(--space-6); gap: var(--space-4); justify-content: flex-end; min-height: 380px; }
.division--lead h3 { font: 700 clamp(26px, 3vw, 32px)/1.15 var(--font-display); max-width: 20ch; }
.division--lead p { color: var(--on-deep-muted); max-width: 52ch; }
.division--lead .label { color: var(--signal); }
.division--lead .diamonds { width: 60%; }
.division--lead > * { position: relative; }
.division--lead > .diamonds { position: absolute; }
.division--lead .btns { margin-top: var(--space-2); }

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.ticks li { display: flex; gap: var(--space-3); align-items: baseline; font-size: 16px; line-height: 24px; }
.ticks li::before { content: ""; width: 7px; height: 7px; flex: none; background: var(--signal); transform: rotate(45deg) translateY(-2px); }
.ticks--ink li::before { background: var(--teal); }

.pillar { display: grid; gap: var(--space-3); align-content: start; }
.pillar p { color: var(--ink-muted); }

.sectors { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); }
@media (min-width: 720px) { .sectors { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sectors li { display: flex; gap: var(--space-4); align-items: flex-start; padding-top: var(--space-5); border-top: 2px solid var(--teal); }
.sectors .ico { color: var(--teal); margin-top: 2px; }
.sectors p { color: var(--ink-muted); margin-top: var(--space-1); }

/* Partners */
.programs { display: grid; gap: var(--space-5); }
@media (min-width: 900px) { .programs { grid-template-columns: 1.2fr 1fr; } }
.programs .division { justify-content: flex-start; }
.programs .division--lead { min-height: 0; }
.programs .division .btns { margin-top: auto; padding-top: var(--space-3); }
.two-steps { display: grid; gap: var(--space-7); }
@media (min-width: 1000px) { .two-steps { grid-template-columns: 1fr 1fr; gap: var(--space-7); } }
.steps-block { display: grid; gap: var(--space-6); align-content: start; }
.process--3 { grid-template-columns: minmax(0, 1fr) !important; gap: var(--space-5); }
@media (min-width: 640px) and (max-width: 999px) { .process--3 { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; } }

/* Service cards */
.cards { display: grid; gap: var(--space-5); }
@media (min-width: 640px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); min-width: 0; }
.card p { color: var(--ink-muted); }
.card .arrow-link { padding-top: var(--space-2); font-size: 15px; }
.sector-card { display: grid; gap: var(--space-4); align-content: start; padding: var(--space-5); background: var(--surface-raised); border-radius: var(--radius-lg); border: 1px solid var(--line); }

/* Process */
.process { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); counter-reset: none; }
@media (min-width: 900px) { .process { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: var(--space-4); } }
.process li { display: grid; gap: var(--space-2); align-content: start; padding-top: var(--space-4); border-top: 1px solid var(--line-strong); position: relative; }
.process li::before { content: ""; position: absolute; top: -6px; left: 0; width: 11px; height: 11px; background: var(--teal); transform: rotate(45deg); border-radius: 1px; }
.process__n { color: var(--teal); font-size: 14px; margin-top: var(--space-2); }
.process h3 { font-size: 18px; line-height: 26px; }
.process p { color: var(--ink-muted); font-size: 16px; line-height: 25px; }

/* Contract models */
.model { display: flex; flex-direction: column; gap: var(--space-3); padding: var(--space-5); background: var(--surface-raised); border-radius: var(--radius-lg); border: 1px solid var(--line); }
.model p { color: var(--ink-muted); flex: 1; }
.model .btn { align-self: flex-start; }
.model--urgent { border: 2px solid var(--signal); }

/* FAQ */
.faq { max-width: 900px; }
.faq { display: grid; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; padding: 20px 0; cursor: pointer; font: 600 18px/26px var(--font-sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .ico { color: var(--teal); transition: transform .2s; }
.faq details[open] summary .ico { transform: rotate(180deg); }
.faq details p { padding-bottom: 20px; color: var(--ink-muted); max-width: 70ch; }

/* Contact */
.contact-card { display: grid; gap: var(--space-2); align-content: start; padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); text-decoration: none; color: var(--ink); }
.contact-card:hover { border-color: var(--teal); }
.contact-card .well { margin-bottom: var(--space-2); }
.contact-card__v { font-size: 19px; line-height: 27px; font-weight: 600; overflow-wrap: anywhere; }
.contact-card .muted { font-size: 15px; }

/* Form */
.form-wrap { display: grid; gap: var(--space-6); }
@media (min-width: 960px) { .form-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr); gap: var(--space-7); align-items: start; } }
.form-side { display: grid; gap: var(--space-5); }
.note-24 { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-4); background: var(--surface-raised); border: 2px solid var(--signal); border-radius: var(--radius-lg); }
.note-24 .ico { color: var(--ink); margin-top: 2px; }
.note-24 a { font-size: 18px; color: var(--ink); }
.contact-mini { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--space-3); }
.contact-mini li { display: flex; gap: var(--space-3); align-items: center; }
.contact-mini .ico { color: var(--teal); }
.form { display: grid; align-items: start; gap: var(--space-4) var(--space-5); padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-raised); }
@media (min-width: 640px) { .form { grid-template-columns: 1fr 1fr; padding: var(--space-6); } .field--wide { grid-column: 1 / -1; } }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-weight: 600; font-size: 15px; line-height: 20px; }
.field small { color: var(--ink-muted); font-size: 14px; line-height: 20px; }
.field input, .field select, .field textarea { width: 100%; min-height: 48px; padding: 10px 12px; font: 400 16px/24px var(--font-sans); color: var(--ink); background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: var(--radius-md); }
.field textarea { resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--teal); }
.field [aria-invalid="true"] { border-color: var(--danger); }
.field .err { color: var(--danger); font-size: 14px; line-height: 20px; }
.field--check { display: flex; gap: var(--space-3); align-items: flex-start; }
.field--check input { width: 22px; height: 22px; min-height: 0; margin-top: 2px; accent-color: var(--teal); flex: none; }
.field--check label { font-weight: 400; }
.hp { position: absolute; left: -9999px; }
.form__foot { display: grid; gap: var(--space-4); }
.form__foot .btn { justify-self: start; }
.form__status:empty { display: none; }
.form__status { padding: var(--space-4); border-radius: var(--radius-md); font-size: 16px; line-height: 24px; display: grid; gap: var(--space-3); }
.form__status.is-ok { background: #e3f3ea; color: #0f4a2d; }
.form__status.is-err { background: #fbe9e7; color: #7a1a14; }
.form__status.is-demo { background: var(--teal-tint); color: var(--ink); }
.form__status .btn { justify-self: start; }

/* Closing band */
.closing { position: relative; overflow: hidden; background: var(--teal-deep); color: var(--on-deep); }
.closing__in { position: relative; display: grid; gap: var(--space-5); padding-block: var(--space-7); }
@media (min-width: 960px) { .closing__in { padding-block: 72px; } }
.closing__text { display: grid; gap: var(--space-3); }
.closing p { color: var(--on-deep-muted); max-width: 56ch; }
.closing h2 { max-width: 28ch; }

/* Prose (legal) */
.prose { max-width: 760px; display: grid; gap: var(--space-4); }
.prose h1 { font-size: clamp(32px, 4vw, 44px); }
.prose h2 { font-size: 22px; line-height: 30px; margin-top: var(--space-4); }
.company { font-style: normal; padding: var(--space-5); background: var(--surface-raised); border: 1px solid var(--line); border-radius: var(--radius-lg); }

/* Footer */
.ftr { background: var(--surface-sunk); border-top: 1px solid var(--line); padding-block: var(--space-7) var(--space-5); font-size: 15px; line-height: 22px; }
.ftr__grid { display: grid; gap: var(--space-6); }
@media (min-width: 860px) { .ftr__grid { grid-template-columns: 1.2fr 1fr 1.3fr; } }
.ftr__brand { display: grid; gap: var(--space-3); align-content: start; color: var(--teal); }
.ftr__brand p { color: var(--ink); }
.ftr__brand p.muted { color: var(--ink-muted); }
.ftr .label { margin-bottom: var(--space-3); }
.ftr__list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-3); }
.ftr__list--icons li { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: var(--space-2); align-items: start; }
.ftr__list .ico { color: var(--teal); margin-top: 2px; }
.ftr a { color: var(--ink); }
.ftr__base { display: flex; flex-wrap: wrap; gap: var(--space-3) var(--space-5); margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid var(--line); color: var(--ink-muted); font-size: 14px; }
.ftr__langs { display: flex; gap: var(--space-4); margin-left: auto; }

/* Floating WhatsApp (phones) */
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: 58px; height: 58px; border-radius: 50%; display: none; place-items: center; background: var(--teal); color: var(--on-teal); box-shadow: 0 4px 14px rgba(15,42,51,.3); z-index: 40; }
@media (max-width: 1279px) { .fab { display: grid; } }

@media print { .ebar, .hdr, .fab, .closing { display: none; } }
