/* ============================================================
   Inteligencia Sanitaria — Sistema de estilos del sitio
   ============================================================ */

/* ---- Tipografía ---- */
@import url('https://fonts.googleapis.com/css2?family=Judson:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* Paleta de marca */
  --navy:        #002B41;   /* fondo oscuro principal */
  --navy-800:    #04344e;   /* superficie oscura elevada */
  --navy-700:    #0a425f;   /* tarjeta sobre oscuro */
  --teal:        #1A8CA6;   /* acento primario */
  --teal-deep:   #157487;
  --teal-soft:   rgba(26,140,166,0.30);
  --teal-line:   rgba(26,140,166,0.85);
  --green:       #78BB6B;   /* acento secundario (logo) */
  --green-deep:  #5fa252;

  --white:       #FFFFFF;
  --mist:        #D9D9D9;   /* texto tenue sobre oscuro */
  --mist-soft:   rgba(255,255,255,0.62);

  /* Claros (secciones invertidas) */
  --paper:       #F3F6F7;   /* fondo claro de sección */
  --paper-2:     #FFFFFF;   /* tarjeta clara */
  --ink:         #002B41;   /* titulares sobre claro */
  --ink-soft:    #46606e;   /* cuerpo sobre claro */

  --line-dark:   rgba(255,255,255,0.12);
  --line-light:  rgba(0,43,65,0.12);

  /* Tipos */
  --serif: 'Judson', Georgia, 'Times New Roman', serif;
  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;

  /* Estructura */
  --maxw: 1200px;
  --radius: 6px;
  --radius-lg: 14px;
  --pill: 999px;

  --shadow-soft: 0 18px 50px -24px rgba(0,43,65,0.45);
  --shadow-card: 0 24px 60px -30px rgba(0,43,65,0.55);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---- Tipografía base ---- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.04;
  margin: 0;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.display {
  font-size: clamp(3.2rem, 7vw, 6rem);
  line-height: 0.98;
}
h1 { font-size: clamp(2.6rem, 5vw, 4rem); }
h2 { font-size: clamp(2rem, 3.6vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.85rem); }
p  { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ---- Layout helpers ---- */
.wrap { width: min(100% - 48px, var(--maxw)); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 130px) 0; }
.section--tight { padding: clamp(48px, 6vw, 90px) 0; }

.bg-navy  { background: var(--navy);  color: var(--white); }
.bg-paper { background: var(--paper); color: var(--ink); }
.bg-white { background: var(--paper-2); color: var(--ink); }

/* Texto contextual */
.bg-paper p, .bg-white p { color: var(--ink-soft); }
.bg-navy .lead, .bg-navy p.body { color: var(--mist); }

.lead {
  font-size: clamp(1.05rem, 1.5vw, 1.25rem);
  line-height: 1.65;
  max-width: 60ch;
}

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0,43,65,0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 84px;
}
.nav__logo img { height: 42px; width: auto; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 38px;
  margin-left: auto;
}
.nav__links a {
  font-size: 0.98rem;
  color: var(--mist);
  letter-spacing: 0.01em;
  transition: color .18s ease;
  position: relative;
  padding: 4px 0;
}
.nav__links a:hover { color: var(--white); }
.nav__links a.is-active { color: var(--white); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--green);
}
.nav__cta { margin-left: 4px; }

/* Selector de idioma */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 22px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}
.lang-switch a {
  color: var(--mist-soft);
  padding: 5px 8px;
  border-radius: 5px;
  transition: color .15s ease, background .15s ease;
}
.lang-switch a:hover { color: var(--white); }
.lang-switch a.is-active {
  color: var(--white);
  font-weight: 700;
  background: var(--teal-soft);
}
.lang-switch .sep { color: rgba(255,255,255,0.28); }

.nav__burger { display: none; }

/* ============================================================
   BOTONES
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 500;
  padding: 14px 26px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, background .18s ease, border-color .18s ease, color .18s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: var(--white); }
.btn-primary:hover { background: var(--teal-deep); }
.btn-ghost {
  background: var(--teal-soft);
  border-color: var(--teal-line);
  color: var(--white);
}
.btn-ghost:hover { background: rgba(26,140,166,0.45); }
.btn-outline-dark {
  background: transparent;
  border-color: var(--line-light);
  color: var(--ink);
}
.btn-outline-dark:hover { border-color: var(--teal); color: var(--teal); }
.btn-lg { padding: 17px 34px; font-size: 1.05rem; }
.btn-arrow::after { content: "→"; font-size: 1.05em; }

/* ============================================================
   PÍLDORA / BADGE
   ============================================================ */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal-soft);
  border: 1px solid var(--teal-line);
  color: var(--white);
  border-radius: var(--pill);
  padding: 9px 20px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}
.pill--light {
  background: rgba(26,140,166,0.12);
  border-color: rgba(26,140,166,0.4);
  color: var(--teal-deep);
}
.pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
}
.hero::before {
  /* halo sutil */
  content: "";
  position: absolute;
  inset: -20% 30% auto -10%;
  height: 520px;
  background: radial-gradient(60% 60% at 30% 30%, rgba(26,140,166,0.22), transparent 70%);
  pointer-events: none;
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  padding: clamp(56px, 8vw, 110px) 0 clamp(40px, 5vw, 72px);
}
.hero__copy { position: relative; z-index: 2; }
.hero__title { margin: 26px 0 22px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 34px; }
.hero__media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--line-dark);
}
.hero__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }

/* Hero interior (páginas internas, una sola columna) */
.hero--inner .hero__inner {
  grid-template-columns: 1fr;
  max-width: 880px;
  padding-bottom: clamp(56px, 7vw, 100px);
}
.hero--inner .lead { max-width: 64ch; }

/* ============================================================
   STATS
   ============================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line-dark);
}
.stat { padding: 38px 8px 4px; position: relative; }
.stat + .stat::before {
  content: "";
  position: absolute;
  left: 0; top: 42px; bottom: 8px;
  width: 1px;
  background: var(--line-dark);
}
.stat__num {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(2.6rem, 4vw, 3.6rem);
  line-height: 1;
  color: var(--white);
}
.stat__num .accent { color: var(--green); }
.stat__label { color: var(--mist); margin-top: 10px; font-size: 0.98rem; }

/* ============================================================
   SPLIT (texto + imagen)
   ============================================================ */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
}
.split--reverse .split__media { order: -1; }
.split__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}
.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; }
.split__title { margin: 14px 0 22px; }
.rule {
  width: 64px; height: 3px; background: var(--green);
  border: 0; margin: 0 0 26px;
}

@media (max-width: 880px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
}

/* ============================================================
   BENEFICIOS (Nuestra Solución)
   ============================================================ */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-top: 1px solid var(--line-dark);
  margin-top: 48px;
}
.benefit {
  padding: 32px 22px 0;
  position: relative;
}
.benefit + .benefit::before {
  content: "";
  position: absolute;
  left: 0; top: 36px; bottom: 4px;
  width: 1px; background: var(--line-dark);
}
.benefit__n {
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--green);
  margin-bottom: 14px;
}
.benefit p { color: var(--mist); margin: 0; font-size: 1.02rem; }

@media (max-width: 900px) {
  .benefit-grid { grid-template-columns: 1fr 1fr; gap: 28px 0; }
}
@media (max-width: 520px) {
  .benefit-grid { grid-template-columns: 1fr; }
  .benefit + .benefit::before { display: none; }
}

/* Caja de compromiso */
.commit {
  margin-top: 64px;
  border: 1px solid var(--teal-line);
  background: var(--teal-soft);
  border-radius: var(--radius-lg);
  padding: clamp(34px, 5vw, 56px);
  text-align: center;
}
.commit p {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.45;
  color: var(--white);
  max-width: 52ch;
  margin: 0 auto;
}

/* ============================================================
   TARJETAS DE SERVICIO
   ============================================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.s-card {
  background: var(--paper-2);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: 34px 30px 36px;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.s-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
  border-color: rgba(26,140,166,0.45);
}
.s-card__mark {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  margin-bottom: 22px;
  color: var(--teal);
}
.s-card__mark svg { width: 46px; height: 46px; }
.s-card h3 { color: var(--ink); font-size: 1.32rem; margin-bottom: 12px; line-height: 1.12; }
.s-card p { margin: 0; font-size: 1rem; }
.s-card__no {
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  color: var(--green-deep);
  margin-bottom: 18px;
}

@media (max-width: 900px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .card-grid { grid-template-columns: 1fr; } }

/* ============================================================
   PROCESO (fases A / B / C)
   ============================================================ */
.phase {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: clamp(20px, 3vw, 48px);
  padding: clamp(30px, 4vw, 48px) 0;
  border-top: 1px solid var(--line-light);
}
.phase:last-child { border-bottom: 1px solid var(--line-light); }
.phase__tag {
  font-family: var(--serif);
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 700;
  color: var(--teal);
  line-height: 1;
}
.phase__title { color: var(--ink); margin-bottom: 22px; }
.phase__list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 48px; }
.phase__list li {
  break-inside: avoid;
  padding: 9px 0 9px 26px;
  position: relative;
  color: var(--ink-soft);
}
.phase__list li::before {
  content: "";
  position: absolute;
  left: 0; top: 16px;
  width: 9px; height: 9px;
  border-radius: 2px;
  background: var(--green);
  transform: rotate(45deg);
}
@media (max-width: 760px) {
  .phase { grid-template-columns: 1fr; gap: 14px; }
  .phase__list { columns: 1; }
}

/* ============================================================
   LISTA DE COMPROBACIÓN (Nosotros)
   ============================================================ */
.check-list { list-style: none; margin: 0; padding: 0; }
.check-list li {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line-light);
  font-size: 1.08rem;
  color: var(--ink);
}
.check-list li:last-child { border-bottom: 0; }
.check-list .tick {
  flex: none;
  width: 26px; height: 26px;
  margin-top: 2px;
  border-radius: 50%;
  background: rgba(120,187,107,0.18);
  color: var(--green-deep);
  display: grid; place-items: center;
  font-size: 0.85rem;
}

/* ============================================================
   FORMULARIO (Cotización)
   ============================================================ */
.form-card {
  background: var(--paper-2);
  border: 1px solid var(--line-light);
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px);
  box-shadow: var(--shadow-soft);
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 26px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 0.92rem; font-weight: 600; color: var(--ink); letter-spacing: 0.01em; }
.field input, .field select, .field textarea {
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  padding: 14px 16px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26,140,166,0.16);
}

/* Chips de selección (tipo de registro) */
.choice-row { display: flex; flex-wrap: wrap; gap: 12px; }
.choice {
  display: inline-flex; align-items: center; gap: 10px;
  border: 1px solid var(--line-light);
  background: var(--paper-2);
  border-radius: var(--pill);
  padding: 11px 20px;
  font-size: 0.98rem;
  color: var(--ink);
  cursor: pointer;
  transition: all .15s ease;
}
.choice input { accent-color: var(--teal); }
.choice:hover { border-color: var(--teal); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--navy-800);
  border-top: 1px solid var(--line-dark);
  color: var(--mist);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  padding: clamp(56px, 7vw, 88px) 0 40px;
}
.footer__logo img { height: 44px; margin-bottom: 22px; }
.footer__grid h4 {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 18px;
}
.footer__grid ul { list-style: none; margin: 0; padding: 0; }
.footer__grid li { margin-bottom: 12px; }
.footer__grid a { color: var(--mist); transition: color .15s ease; }
.footer__grid a:hover { color: var(--green); }
.footer__bottom {
  border-top: 1px solid var(--line-dark);
  padding: 26px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--mist-soft);
}
@media (max-width: 760px) {
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   PLACEHOLDER de imagen
   ============================================================ */
.img-ph {
  background:
    repeating-linear-gradient(45deg, rgba(26,140,166,0.10) 0 12px, transparent 12px 24px),
    var(--navy-700);
  display: grid; place-items: center;
  color: var(--mist-soft);
  font-family: var(--sans);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============================================================
   ANIMACIÓN de entrada
   ============================================================ */
/* Entrada sutil SIN ocultar contenido: animamos solo el desplazamiento,
   nunca la opacidad, así el texto siempre es legible (incluso en el primer
   fotograma, en impresión/PDF y con animaciones desactivadas). */
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: is-reveal-up .6s cubic-bezier(.2,.7,.2,1) both; }
}
@keyframes is-reveal-up {
  from { transform: translateY(16px); }
  to   { transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 940px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__media { order: -1; }
  .hero--inner .hero__media { display: none; }
}
@media (max-width: 760px) {
  .nav__links { display: none; }
  .nav__links.open {
    display: flex;
    position: absolute;
    top: 84px; left: 0; right: 0;
    flex-direction: column;
    gap: 4px;
    background: var(--navy-800);
    padding: 18px 24px 26px;
    border-bottom: 1px solid var(--line-dark);
  }
  .nav__links.open a { padding: 12px 0; }
  .nav__cta { display: none; }
  .nav__burger {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    background: none; border: 0; cursor: pointer; padding: 8px;
  }
  .nav__burger span { width: 26px; height: 2px; background: var(--white); }
  .stats { grid-template-columns: 1fr; }
  .stat + .stat::before { display: none; }
  .stat { border-top: 1px solid var(--line-dark); }
  .stat:first-child { border-top: 0; }
  .field-grid { grid-template-columns: 1fr; }
}
/* ============================================================
   Cotización — formulario: estado, honeypot y validación
   (Anexar al final de styles/site.css)
   ============================================================ */

/* Campo trampa para bots: invisible y fuera de flujo, sin display:none
   (algunos bots ignoran display:none pero sí llenan campos visibles a su parser) */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Marca de campo obligatorio */
.req { color: var(--teal); font-weight: 700; }

/* Mensaje de estado del formulario */
.form-msg {
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 22px;
  font-size: 0.95rem;
  line-height: 1.45;
  border: 1px solid transparent;
}
.form-msg.is-ok {
  color: var(--green-deep);
  background: rgba(120, 187, 107, 0.12);
  border-color: rgba(120, 187, 107, 0.45);
}
.form-msg.is-error {
  color: #9a2b2b;
  background: rgba(180, 40, 40, 0.08);
  border-color: rgba(180, 40, 40, 0.35);
}

/* Resaltado de campos inválidos tras intentar enviar */
.field input:user-invalid,
.field textarea:user-invalid {
  border-color: #c0392b;
}
