/* ==========================================================================
   Hora Zero — Sitio corporativo
   Hoja de estilos única, organizada como librería de componentes.

   Índice
   1. Tokens de diseño (variables)
   2. Reset y base
   3. Tipografía y utilidades de texto
   4. Layout (contenedor, secciones, rejillas)
   5. Componentes
      5.1 Barra de contacto superior
      5.2 Cabecera / navegación
      5.3 Botones
      5.4 Etiquetas (eyebrow) y separadores
      5.5 Hero
      5.6 Tarjetas de servicio
      5.7 Media placeholder (fotos pendientes)
      5.8 Bloque "por qué" (lista con viñetas)
      5.9 Filas de servicio alternadas
      5.10 Misión / visión y valores
      5.11 Banda CTA
      5.12 Pie de página
      5.13 Modal de cotización
   6. Responsive
   ========================================================================== */

/* ==========================================================================
   1. Tokens de diseño
   ========================================================================== */
:root {
  /* Paleta principal (definida por marca) */
  --c-primary:       #6EC1E4;   /* azul cielo  */
  --c-primary-600:   #3F9BC4;   /* enlaces / hover */
  --c-primary-050:   #EEF7FC;   /* superficies suaves, nav activa */
  --c-secondary:     #9B98D5;   /* lavanda */
  --c-secondary-600: #6B78D0;
  --c-ink:           #404040;   /* gris oscuro principal */
  --c-ink-900:       #2C2D33;   /* casi negro: títulos fuertes, pie */

  /* Acentos que combinan con la paleta fría */
  --c-accent:        #F2A65A;   /* ámbar cálido, uso puntual */
  --c-accent-050:    #FDF1E3;
  --c-success:       #1F7A4D;   /* WhatsApp / confirmación */
  --c-success-050:   #EEFAF2;
  --c-success-line:  #BFE6CF;

  /* Neutros */
  --c-bg:       #E9EAEE;
  --c-surface:  #FFFFFF;
  --c-text:     #3A3B40;
  --c-muted:    #6B6C72;
  --c-muted-2:  #9A9BA1;
  --c-line:     rgba(0, 0, 0, .10);
  --c-line-2:   rgba(0, 0, 0, .08);

  /* Tipografía */
  --font-heading: 'Archivo', system-ui, sans-serif;
  --font-body:    'IBM Plex Sans', system-ui, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, monospace;

  /* Radios */
  --radius-sm: 7px;
  --radius:    8px;
  --radius-md: 14px;
  --radius-lg: 16px;

  /* Sombras */
  --shadow-page:  0 4px 24px rgba(0, 0, 0, .08);
  --shadow-modal: 0 24px 60px rgba(0, 0, 0, .35);

  /* Métricas de layout */
  --container: 1180px;
  --pad-x: 44px;

  /* Patrón de rayas diagonales reutilizable */
  --stripes-primary: repeating-linear-gradient(45deg,
      rgba(110, 193, 228, .18) 0 2px, transparent 2px 15px);
  --stripes-secondary: repeating-linear-gradient(45deg,
      rgba(155, 152, 213, .16) 0 2px, transparent 2px 14px);
}

/* ==========================================================================
   2. Reset y base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--c-bg);
  font-family: var(--font-body);
  color: var(--c-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--c-primary-600);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Enlace para saltar al contenido (accesibilidad) */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 2000;
  background: var(--c-ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 var(--radius) 0;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ==========================================================================
   3. Tipografía y utilidades de texto
   ========================================================================== */
.font-heading { font-family: var(--font-heading); }
.font-mono    { font-family: var(--font-mono); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--c-primary-600);
  margin: 0;
}
.eyebrow--secondary { color: var(--c-secondary-600); }

.text-muted { color: var(--c-muted); }

/* ==========================================================================
   4. Layout
   ========================================================================== */
.page {
  max-width: var(--container);
  margin: 0 auto;
  background: var(--c-surface);
  box-shadow: var(--shadow-page);
}

.section { padding: 56px var(--pad-x); }
.section--tight { padding-block: 40px; }

.section-head { text-align: center; margin-bottom: 40px; }
.section-head .eyebrow { margin-bottom: 12px; }

.section-title {
  font-family: var(--font-heading);
  font-size: 36px;
  font-weight: 700;
  color: var(--c-ink);
  margin: 0;
}

.grid { display: grid; gap: 22px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--2 { grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

/* ==========================================================================
   5. Componentes
   ========================================================================== */

/* 5.1 Barra de contacto superior --------------------------------------- */
.topbar {
  background: var(--c-ink);
  color: #E7E8EA;
  font-family: var(--font-mono);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 9px var(--pad-x);
}
.topbar a { text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* 5.2 Cabecera / navegación -------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px var(--pad-x);
  background: var(--c-surface);
  border-bottom: 2px solid var(--c-primary);
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header__logo { height: 52px; width: auto; }

.nav { display: flex; gap: 8px; align-items: center; font-size: 14.5px; font-weight: 600; }
.nav__link {
  text-decoration: none;
  color: var(--c-ink);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  transition: background-color .15s ease;
}
.nav__link:hover { background: var(--c-primary-050); }
.nav__link[aria-current="page"] { background: var(--c-primary-050); }

.nav__toggle {
  display: none;
  border: 1px solid var(--c-line);
  background: var(--c-surface);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--c-ink);
}

/* 5.3 Botones ----------------------------------------------------------- */
.btn {
  display: inline-block;
  text-decoration: none;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 16px;
  padding: 16px 30px;
  cursor: pointer;
  text-align: center;
  transition: transform .12s ease, opacity .15s ease, background-color .15s ease;
}
.btn:hover { opacity: .92; }
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--c-ink); color: #fff; }
.btn--sky     { background: var(--c-primary); color: var(--c-ink-900); }
.btn--ghost   { background: var(--c-primary-050); color: var(--c-ink); }
.btn--sm      { font-size: 14.5px; padding: 11px 22px; }

/* Botón de navegación destacado */
.nav__cta {
  text-decoration: none;
  color: #fff;
  background: var(--c-ink);
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  margin-left: 8px;
  font-family: var(--font-heading);
}

/* Enlace de texto con flecha */
.link-arrow {
  text-decoration: none;
  color: var(--c-primary-600);
  font-weight: 600;
  font-size: 15px;
}
.link-arrow:hover { text-decoration: underline; }

/* 5.4 Separadores ------------------------------------------------------- */
.page-divider { height: 14px; background: var(--c-bg); }

/* 5.5 Hero -------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  background: linear-gradient(135deg, #CFE6F5, #D9DCF3);
  display: flex;
  align-items: center;
}
.hero__pattern { position: absolute; inset: 0; background-image: var(--stripes-primary); }
.hero__art {
  position: absolute;
  right: -40px;
  top: 50%;
  transform: translateY(-50%);
  width: 420px;
  height: 420px;
  opacity: .5;
  pointer-events: none;
}
.hero__body { position: relative; z-index: 1; padding: 48px 60px; max-width: 660px; }
.hero__title {
  font-family: var(--font-heading);
  font-size: 52px;
  line-height: 1.05;
  font-weight: 800;
  color: var(--c-ink-900);
  margin: 18px 0 20px;
}
.hero__lead {
  font-size: 18px;
  line-height: 1.6;
  color: #3A4A52;
  margin: 0 0 30px;
  max-width: 500px;
}
.hero__caption {
  position: absolute;
  bottom: 14px;
  right: 24px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #5F8BA6;
}

/* Hero secundario (páginas internas) */
.page-hero {
  padding: 52px var(--pad-x) 40px;
  background: #F7F8FA;
  border-bottom: 1px solid var(--c-line-2);
}
.page-hero__title {
  font-family: var(--font-heading);
  font-size: 42px;
  line-height: 1.08;
  font-weight: 700;
  color: var(--c-ink);
  margin: 12px 0 14px;
  max-width: 720px;
}
.page-hero__lead {
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-muted);
  margin: 0;
  max-width: 600px;
}

/* 5.6 Tarjetas de servicio --------------------------------------------- */
.card {
  border: 1px solid var(--c-line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--c-surface);
}
.card__body { padding: 20px; }
.card__title {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--c-ink);
  margin: 0 0 8px;
}
.card__text { font-size: 13.5px; line-height: 1.55; color: var(--c-muted); margin: 0; }

/* 5.7 Media placeholder (fotos pendientes) ----------------------------- */
.media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #E3F0F9, #EEF0FB);
  display: flex;
  align-items: center;
  justify-content: center;
}
.media--alt { background: linear-gradient(135deg, #EEF0FB, #E6E9F7); }
.media--tall { background: linear-gradient(135deg, #D9DCF3, #CFE6F5); }
.media__pattern { position: absolute; inset: 0; background-image: var(--stripes-primary); }
.media--alt .media__pattern { background-image: var(--stripes-secondary); }
.media__icon { width: 48px; height: 48px; opacity: .55; position: relative; }
.media__icon--lg { width: 80px; height: 80px; }
.media__icon--isotipo { width: 170px; height: 170px; opacity: .95; }
.media__caption {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11px;
  color: #7FA6BD;
}
.media--alt .media__caption { color: #8B8FC0; }

/* alturas para distintos usos */
.media--card { height: 150px; border-radius: 0; }
.media--split { height: 340px; }
.media--row { height: 260px; }
.media--about { height: 280px; }

/* 5.8 Bloque "por qué" -------------------------------------------------- */
.reasons { display: flex; flex-direction: column; gap: 16px; }
.reason { display: flex; gap: 12px; }
.reason__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-primary);
  margin-top: 7px;
  flex: none;
}
.reason:nth-child(even) .reason__dot { background: var(--c-secondary); }
.reason p { margin: 0; font-size: 15px; line-height: 1.55; color: #43444A; }

.feature__title {
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 700;
  color: var(--c-ink);
  margin: 14px 0 18px;
}

/* 5.9 Filas de servicio alternadas ------------------------------------- */
.service-list { padding: 24px var(--pad-x) 8px; }
.service-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 38px;
  align-items: center;
  padding: 34px 0;
  border-bottom: 1px solid var(--c-line-2);
}
.service-row:last-child { border-bottom: none; }
/* En filas pares se invierte el orden de la imagen */
.service-row:nth-child(even) .media { order: 2; }
.service-row__num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--c-secondary);
  font-weight: 600;
  margin: 0 0 6px;
}
.service-row__title {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--c-ink);
  margin: 0 0 10px;
}
.service-row__text {
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-muted);
  margin: 0 0 16px;
}

/* 5.10 Misión / visión y valores --------------------------------------- */
.about-hero {
  padding: 56px var(--pad-x);
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 44px;
  align-items: center;
  background: linear-gradient(120deg, #F7F8FA, #EEF7FC);
}
.about-hero__title {
  font-family: var(--font-heading);
  font-size: 42px;
  line-height: 1.08;
  font-weight: 700;
  color: var(--c-ink);
  margin: 12px 0 16px;
}
.about-hero__lead { font-size: 16.5px; line-height: 1.6; color: var(--c-muted); margin: 0; }

.mv {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--c-line-2);
}
.mv__col { padding: 44px; }
.mv__col + .mv__col { border-left: 1px solid var(--c-line-2); }
.mv__label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.mv__rule { width: 30px; height: 3px; background: var(--c-primary); display: inline-block; }
.mv__rule--secondary { background: var(--c-secondary); }
.mv__text { font-size: 16px; line-height: 1.65; color: #43444A; margin: 0; }

.values { padding: 52px var(--pad-x) 56px; }
.values__title {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: var(--c-ink);
  margin: 0 0 6px;
  text-align: center;
}
.values__subtitle { font-size: 15px; color: var(--c-muted-2); text-align: center; margin: 0 0 36px; }
.values__grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.value { padding: 22px 4px 0; border-top: 3px solid var(--c-primary); }
.value:nth-child(2) { border-color: #8BBFE8; }
.value:nth-child(3) { border-color: #93A9EA; }
.value:nth-child(4) { border-color: var(--c-secondary); }
.value:nth-child(5) { border-color: var(--c-secondary-600); }
.value h3 {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--c-ink);
  margin: 0 0 10px;
}
.value p { font-size: 13px; line-height: 1.55; color: var(--c-muted); margin: 0; }

/* 5.11 Banda CTA -------------------------------------------------------- */
.cta-band {
  background: var(--c-primary);
  padding: 56px var(--pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.cta-band__title {
  font-family: var(--font-heading);
  font-size: 34px;
  font-weight: 800;
  color: #22333C;
  margin: 0 0 8px;
}
.cta-band__text { font-size: 16px; color: #2C4956; margin: 0; }

/* Variante en tarjeta oscura (página servicios) */
.cta-card { padding: 0 var(--pad-x) 48px; }
.cta-card__inner {
  background: var(--c-ink);
  border-radius: var(--radius-lg);
  padding: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}
.cta-card__title {
  font-family: var(--font-heading);
  font-size: 30px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 8px;
}
.cta-card__text { font-size: 15px; color: #C9CACE; margin: 0; max-width: 520px; }

/* 5.12 Pie de página ---------------------------------------------------- */
.site-footer {
  background: var(--c-ink-900);
  padding: 34px var(--pad-x);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.site-footer__brand { display: flex; align-items: center; gap: 12px; }
.site-footer__brand img { height: 34px; }
.site-footer__wordmark {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .03em;
}
.site-footer__meta { font-family: var(--font-mono); font-size: 12.5px; color: var(--c-muted-2); }

/* 5.13 Modal de cotización --------------------------------------------- */
.modal {
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  max-width: 880px;
  width: 100%;
  box-shadow: var(--shadow-modal);
  color: var(--c-text);
}
.modal::backdrop { background: rgba(20, 21, 25, .55); }
.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 26px;
  background: var(--c-ink);
}
.modal__brand { display: flex; align-items: center; gap: 10px; }
.modal__brand img { height: 30px; }
.modal__title {
  font-family: var(--font-heading);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .03em;
}
.modal__close {
  border: none;
  background: transparent;
  cursor: pointer;
  color: #C9CACE;
  font-size: 24px;
  line-height: 1;
  padding: 2px 8px;
}
.modal__close:hover { color: #fff; }
.modal__body { padding: 26px 28px 30px; }
.modal__layout { display: grid; grid-template-columns: 265px 1fr; gap: 30px; align-items: start; }

.modal__aside-lead { margin: 0 0 16px; font-size: 14px; line-height: 1.55; color: var(--c-muted); }
.modal__channels { display: flex; flex-direction: column; gap: 10px; }
.channel {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--c-line);
  border-radius: 10px;
  padding: 13px 14px;
  font-weight: 600;
  font-size: 14px;
  color: var(--c-ink);
}
.channel:hover { border-color: var(--c-primary); }
.channel--wa { border-color: var(--c-success-line); color: var(--c-success); background: var(--c-success-050); }
.modal__note { margin: 16px 0 0; font-size: 11.5px; line-height: 1.5; color: var(--c-muted-2); }

/* Formulario */
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; }
.field label { font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 5px; }
.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: var(--radius);
  padding: 11px 12px;
  font-size: 14px;
  font-family: var(--font-body);
  color: var(--c-text);
  background: #fff;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--c-primary-600);
  box-shadow: 0 0 0 3px var(--c-primary-050);
}
.field--full { grid-column: 1 / -1; }
.field--spaced { margin-bottom: 12px; }
.field--spaced-lg { margin-bottom: 18px; }

/* Enlace centrado bajo una rejilla (p. ej. "ver todos los servicios") */
.link-center { text-align: center; margin-top: 32px; }

.checks-label { display: block; font-size: 12px; font-weight: 600; color: var(--c-muted); margin-bottom: 8px; }
.checks-label span { font-weight: 400; color: var(--c-muted-2); }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(0, 0, 0, .16);
  border-radius: var(--radius);
  padding: 9px 12px;
  font-size: 13.5px;
  color: var(--c-text);
  cursor: pointer;
}
.check:hover { border-color: var(--c-primary); }
.check input { accent-color: var(--c-primary-600); width: 15px; height: 15px; margin: 0; }

/* Honeypot anti-spam: oculto para humanos, visible para bots */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form__error {
  margin: 0 0 12px;
  font-size: 13px;
  color: #B4232A;
  background: #FCECEC;
  border: 1px solid #F2C6C6;
  border-radius: var(--radius);
  padding: 10px 12px;
}
.form__error[hidden] { display: none; }

.btn-block { width: 100%; }
.btn-block[aria-busy="true"] { opacity: .7; cursor: progress; }

/* Estado de éxito */
.modal__success { text-align: center; padding: 16px 4px 6px; }
.modal__success[hidden] { display: none; }
.success-badge {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--c-success-050);
  color: var(--c-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.modal__success h3 {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  color: var(--c-ink);
  margin: 0 0 8px;
}
.modal__success p { font-size: 14.5px; line-height: 1.55; color: var(--c-muted); margin: 0 0 22px; }
.modal__success-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

/* Utilidad para ocultar accesiblemente */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */
@media (max-width: 960px) {
  :root { --pad-x: 28px; }

  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    background: var(--c-surface);
    padding: 12px var(--pad-x) 18px;
    border-bottom: 2px solid var(--c-primary);
    box-shadow: var(--shadow-page);
  }
  .nav.is-open { display: flex; }
  .nav__cta { margin-left: 0; text-align: center; }
  .nav__toggle { display: inline-block; }
  .site-header { position: relative; }

  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--2 { grid-template-columns: 1fr; }
  .about-hero { grid-template-columns: 1fr; }
  .mv { grid-template-columns: 1fr; }
  .mv__col + .mv__col { border-left: none; border-top: 1px solid var(--c-line-2); }
  .values__grid { grid-template-columns: repeat(2, 1fr); }

  .service-row { grid-template-columns: 1fr; gap: 20px; }
  .service-row:nth-child(even) .media { order: 0; }

  .hero__title { font-size: 40px; }
  .hero__art { width: 300px; height: 300px; opacity: .35; }

  .cta-band,
  .cta-card__inner { flex-direction: column; align-items: flex-start; }

  .site-footer { flex-direction: column; align-items: flex-start; }

  .modal__layout { grid-template-columns: 1fr; }
  .form__row { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 11.5px; }
  .grid--4 { grid-template-columns: 1fr; }
  .values__grid { grid-template-columns: 1fr; }
  .hero__title { font-size: 32px; }
  .hero__body { padding: 40px 28px; }
  .section-title { font-size: 28px; }
  .page-hero__title,
  .about-hero__title { font-size: 32px; }
}

/* Respeto por usuarios que prefieren menos movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
