/* ==========================================================
   SIG+ Consulting — estilos
   Los colores y la tipografía viven en tokens.css
   ========================================================== */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }

h1, h2, h3 { color: var(--ink); font-weight: 800; letter-spacing: -0.015em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); line-height: 1.12; }
h3 { font-size: 1.25rem; line-height: 1.3; }

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

/* ---------- Foco y accesibilidad ---------- */
:focus-visible {
  outline: 3px solid var(--navy);
  outline-offset: 3px;
  border-radius: 4px;
}
.on-dark :focus-visible { outline-color: var(--lime); }

.skip-link {
  position: absolute;
  left: 16px;
  top: -80px;
  z-index: 200;
  padding: 0.75rem 1.1rem;
  background: var(--lime);
  color: var(--navy);
  font-weight: 800;
  border-radius: 999px;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0.8rem 1.6rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}
.btn--primary { background: var(--lime); color: var(--navy); }
.btn--primary:hover { background: var(--lime-hover); }
.btn--ghost-light { border-color: rgba(255, 255, 255, 0.7); color: var(--white); }
.btn--ghost-light:hover { background: rgba(255, 255, 255, 0.14); border-color: var(--white); }
.btn--sm { min-height: 44px; padding: 0.55rem 1.3rem; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* ---------- Encabezado ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
}
.site-header__bar {
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; border-radius: 6px; }
.brand img { width: 150px; height: auto; }

.site-nav ul { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.site-nav a:not(.btn) {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--navy);
  font-weight: 700;
  text-decoration: none;
  background: linear-gradient(var(--lime), var(--lime)) left bottom / 0 3px no-repeat;
  transition: background-size 0.2s ease;
}
.site-nav a:not(.btn):hover,
.site-nav a[aria-current="true"]:not(.btn) { background-size: 100% 3px; }

.nav-toggle { display: none; }

@media (max-width: 859px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 44px;
    padding: 0.4rem 1rem;
    border: 2px solid var(--navy);
    border-radius: 999px;
    background: transparent;
    color: var(--navy);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
  }
  .nav-toggle__icon,
  .nav-toggle__icon::before {
    display: block;
    width: 18px;
    height: 2px;
    background: currentColor;
    border-radius: 2px;
    transition: transform 0.2s ease;
  }
  .nav-toggle__icon { position: relative; box-shadow: 0 6px 0 currentColor; }
  .nav-toggle__icon::before { content: ""; position: absolute; top: -6px; left: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon { box-shadow: none; transform: rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__icon::before { top: 0; transform: rotate(-90deg); }

  /* Con JS el menú se despliega; sin JS queda visible en una fila que baja de línea */
  .js .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    box-shadow: 0 18px 30px -18px rgba(32, 42, 91, 0.35);
  }
  .js .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem var(--gutter) 1.4rem; }
  .site-nav li + li { border-top: 1px solid var(--gray-100); }
  .site-nav a:not(.btn) { display: block; padding: 0.95rem 0; font-size: 1.125rem; background-image: none; }
  .site-nav__cta { border-top: 0 !important; padding-top: 0.8rem; }
  .site-nav__cta .btn { width: 100%; }
  html:not(.js) .site-header__bar { flex-wrap: wrap; padding-block: 0.6rem; }
  html:not(.js) .site-nav ul { flex-direction: row; flex-wrap: wrap; gap: 0 1.2rem; padding: 0; }
  html:not(.js) .site-nav li + li { border-top: 0; }
}

/* ---------- Fondos oscuros ---------- */
.on-dark { color: var(--on-dark-muted); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--on-dark); }

/* ---------- Etiquetas de sección ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy) url("../assets/img/plus.svg") center / 12px no-repeat;
}
.eyebrow--light { color: var(--white); }
.eyebrow--light::before { background-color: rgba(255, 255, 255, 0.16); }

.lead { margin-top: 1.25rem; font-size: 1.1875rem; line-height: 1.6; color: var(--text); }
.lead--light { color: var(--on-dark); margin-top: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 82vh, 760px);
  background: var(--navy);
  border-bottom-left-radius: var(--radius-xl);
}
.hero__media { position: absolute; inset: 0; z-index: -2; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 45%; }
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(25, 33, 74, 0.95) 0%, rgba(32, 42, 91, 0.88) 42%, rgba(32, 42, 91, 0.45) 75%, rgba(32, 42, 91, 0.2) 100%);
}
.hero__plus {
  position: absolute;
  z-index: 0;
  top: calc(var(--w) * -0.34);
  right: clamp(24px, 9vw, 150px);
  --w: clamp(150px, 22vw, 300px);
  width: var(--w);
  height: var(--w);
}
.hero__inner { padding-block: clamp(120px, 16vh, 150px) clamp(64px, 10vh, 96px); }
.hero__copy { max-width: 40rem; }
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  line-height: 1.04;
  letter-spacing: -0.025em;
}
.hero h1 span { display: block; }
.hero h1 span:last-child { color: var(--white); }
.hero__lead { margin-top: 1.5rem; max-width: 36rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.6; color: var(--on-dark); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.85rem; margin-top: 2.2rem; }
.hero__axes {
  margin-top: 2.4rem;
  padding-top: 1.1rem;
  max-width: 36rem;
  border-top: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--on-dark-muted);
}
@media (max-width: 640px) {
  .hero::after { background: linear-gradient(180deg, rgba(25, 33, 74, 0.9) 0%, rgba(32, 42, 91, 0.9) 100%); }
  .hero__actions .btn { width: 100%; }
}

/* ---------- Secciones ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--tint { background: var(--gray-50); }

.split { display: grid; gap: clamp(32px, 5vw, 56px); }
@media (min-width: 960px) {
  .split { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(48px, 7vw, 104px); align-items: start; }
  .split__head { position: sticky; top: calc(var(--header-h) + 32px); }
  .split--contact .split__head { position: static; }
}

/* ---------- Servicios ---------- */
.services { border-bottom: 1px solid var(--gray-200); }
.service {
  display: grid;
  grid-template-columns: 3.25rem minmax(0, 1fr);
  gap: 0.5rem 1rem;
  padding-block: 2rem;
  border-top: 1px solid var(--gray-200);
}
.service__num { font-size: 1rem; font-weight: 800; color: var(--navy); letter-spacing: 0.04em; padding-top: 0.35rem; }
.service h3 { font-size: clamp(1.4rem, 2.2vw, 1.75rem); }
.service p { margin-top: 0.7rem; max-width: 40rem; }

.norms-label { margin-top: 1.3rem !important; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.norms { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.norms li { padding: 0.25rem 0.8rem; border: 1px solid var(--gray-300); border-radius: 999px; font-size: 0.9375rem; font-weight: 700; color: var(--navy); }

.scope {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-left: 5px solid var(--lime);
  background: var(--gray-50);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 1rem;
  color: var(--text);
}
.scope strong { color: var(--navy); }

/* ---------- Enfoque ---------- */
.checks { display: grid; gap: 1.6rem; }
.checks li { position: relative; padding-left: 3.1rem; }
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--navy) url("../assets/img/plus.svg") center / 16px no-repeat;
}
.checks p { margin-top: 0.3rem; }

.flow-wrap { margin-top: clamp(56px, 8vw, 96px); }
.flow-title { font-size: 0.875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.flow { display: grid; gap: 2.2rem; margin-top: 1.5rem; counter-reset: step; }
.flow li { position: relative; padding-top: 1.1rem; border-top: 4px solid var(--navy); }
.flow li:last-child { border-top-color: var(--lime); }
.flow__word { display: block; font-size: clamp(1.75rem, 3vw, 2.25rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.02em; color: var(--navy); }
.flow p { margin-top: 0.6rem; max-width: 22rem; }
.flow li + li::before {
  content: "↓";
  content: "↓" / "";
  position: absolute;
  top: -2.1rem;
  left: 0;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--navy);
}
@media (min-width: 760px) {
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
  .flow li + li::before { content: "→"; content: "→" / ""; top: -1.5rem; left: -1.45rem; font-size: 1.4rem; background: var(--gray-50); padding: 0 0.1rem; }
}

.sectors { margin-top: clamp(48px, 7vw, 80px); padding-top: 1.75rem; border-top: 1px solid var(--gray-200); display: grid; gap: 0.8rem; }
.sectors__label { font-size: 0.875rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sectors__list { display: flex; flex-wrap: wrap; gap: 0.4rem 0; }
.sectors__list li { font-size: 1.125rem; font-weight: 800; color: var(--navy); }
.sectors__list li + li::before { content: "·"; margin-inline: 0.7rem; color: var(--muted); }

/* ---------- Nosotros ---------- */
.about {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding-block: clamp(72px, 10vw, 128px);
  background: var(--navy);
  border-top-right-radius: var(--radius-xl);
}
.about::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: clamp(-90px, -4vw, -30px);
  bottom: clamp(-110px, -6vw, -40px);
  width: clamp(190px, 26vw, 360px);
  aspect-ratio: 1;
  background: url("../assets/img/plus.svg") center / contain no-repeat;
  opacity: 0.13;
}
.about h2 { font-size: clamp(2rem, 4vw, 3.25rem); }
.about__body p + p { margin-top: 1.1rem; }
.about__body p:not(.lead) { max-width: 38rem; }

/* ---------- Contacto ---------- */
.channels { display: grid; gap: 1rem; margin-top: 2rem; }
.channels__label { display: block; font-size: 0.8125rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.channels a { font-size: 1.25rem; font-weight: 800; color: var(--navy); text-decoration-color: var(--lime); text-decoration-thickness: 3px; text-underline-offset: 5px; overflow-wrap: anywhere; }
.channels a:hover { text-decoration-color: var(--navy); }
.social { display: flex; flex-wrap: wrap; gap: 0.5rem 1.4rem; margin-top: 1.6rem; }
.social a { font-weight: 800; color: var(--navy); text-underline-offset: 4px; }

.form {
  display: grid;
  gap: 1.15rem;
  padding: clamp(1.4rem, 3vw, 2.25rem);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: var(--gray-50);
}
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.9375rem; font-weight: 800; color: var(--navy); }
.field input, .field textarea {
  width: 100%;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border: 2px solid var(--gray-300);
  border-radius: 10px;
  background: var(--white);
  font: inherit;
  font-weight: 500;
  color: var(--navy);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-color: var(--navy); }
.field input[aria-invalid="true"], .field textarea[aria-invalid="true"] { border-color: #a4262c; }
.field__error { font-size: 0.9375rem; font-weight: 700; color: #a4262c; }
.field--trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
@media (max-width: 480px) { .form .btn { justify-self: stretch; } }
.form__note { font-size: 0.9375rem; color: var(--muted); }
.form__note:empty { display: none; }
.form__note[data-state="error"] { color: #a4262c; font-weight: 700; }
.form__note[data-state="ok"] { color: var(--navy); font-weight: 700; }

/* ---------- Pie ---------- */
.site-footer { padding-block: 3rem 2rem; background: var(--navy-deep); }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 2rem; }
.site-footer__brand p { margin-top: 0.9rem; font-weight: 700; color: var(--on-dark); }
.site-footer__brand img { width: 160px; }
.site-footer__nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.8rem; }
.site-footer__nav a { display: inline-block; padding: 0.5rem 0; font-weight: 700; color: var(--on-dark); text-decoration: none; }
.site-footer__nav a:hover { color: var(--lime); }
.site-footer__legal { display: grid; gap: 0.35rem; margin-top: 2.25rem; padding-top: 1.4rem; border-top: 1px solid rgba(255, 255, 255, 0.18); font-size: 0.875rem; color: var(--on-dark-muted); }
.site-footer__legal a { text-underline-offset: 3px; }
.site-footer__legal a:hover { color: var(--lime); }

/* ---------- Botón flotante de WhatsApp ---------- */
.wa-fab {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 150;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 52px;
  padding: 0.6rem 1.25rem 0.6rem 1rem;
  border-radius: 999px;
  background: var(--lime);
  color: var(--navy);
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 0 0 3px var(--white), 0 10px 24px -6px rgba(25, 33, 74, 0.55);
  transition: background-color 0.18s ease;
}
.wa-fab:hover { background: var(--lime-hover); }
.wa-fab:focus-visible { outline-color: var(--navy); box-shadow: 0 0 0 3px var(--white), 0 0 0 6px var(--navy); }
@media (max-width: 859px) { .site-footer { padding-bottom: 5.5rem; } }

/* ---------- Aviso para desarrollo (solo local / ?dev=1) ---------- */
.dev-panel {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: 300;
  max-width: min(420px, calc(100vw - 24px));
  font: 600 14px/1.45 var(--font);
  color: #1f2937;
}
.dev-panel__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 40px;
  padding: 0.4rem 0.9rem;
  border: 2px solid #1f2937;
  border-radius: 999px;
  background: #ffe27a;
  color: #1f2937;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}
.dev-panel__body {
  margin-top: 0.5rem;
  max-height: 60vh;
  overflow: auto;
  padding: 1rem 1.1rem;
  border: 2px solid #1f2937;
  border-radius: 12px;
  background: #fffbe6;
}
.dev-panel__body[hidden] { display: none; }
.dev-panel h2 { margin-bottom: 0.4rem; font-size: 1rem; color: #1f2937; letter-spacing: 0; }
.dev-panel ul { display: grid; gap: 0.35rem; padding-left: 1.1rem; list-style: disc; }
.dev-panel p { margin-top: 0.7rem; font-weight: 500; }
.dev-mode [data-pending] { outline: 2px dashed #d97706; outline-offset: 6px; }

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