/* ===========================================================
   UMBRALI — Hoja de estilos compartida
   Consultoría de IA para empresas y pymes argentinas
   Paleta: azul acero / navy con acento naranja (sobrio, tecnológico, a futuro)
   Tipografía: Source Serif 4 (sustituto libre de FF Scala — ver nota
   en README / mensaje al usuario: FF Scala es una fuente comercial de
   Monotype y no se puede alojar aquí sin licencia)
   =========================================================== */

/* ---------- Fuentes auto-alojadas ---------- */
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/sourceserif4-300.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/sourceserif4-400.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/sourceserif4-600.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/sourceserif4-700.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Source Serif 4';
  src: url('../fonts/sourceserif4-900.woff2') format('woff2');
  font-weight: 900; font-style: normal; font-display: swap;
}

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

:root {
  /* Paleta de marca — azul acero / navy con acento naranja.
     Se conservan los nombres de variables por compatibilidad:
     --teal-deep = navy profundo · --teal = azul acero · --lime = naranja. */
  --teal-deep: #14273A;
  --teal: #35617F;
  --lime: #F4712E;
  --paper: #F4F7FA;
  --charcoal: #1B2A3A;

  /* Variantes derivadas */
  --charcoal-70: rgba(27,42,58,.72);
  --charcoal-45: rgba(27,42,58,.45);
  --charcoal-10: rgba(27,42,58,.1);
  --teal-08: rgba(53,97,127,.08);
  --teal-16: rgba(53,97,127,.16);
  --teal-30: rgba(53,97,127,.3);
  --paper-dim: #E9EFF5;
  --header-h: 84px;
}

html { scroll-behavior: smooth; }

html, body {
  background: var(--paper);
  color: var(--charcoal);
  font-family: 'Source Serif 4', Georgia, serif;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { font: inherit; }

/* ---------- Fondo ambiental: brisa costera, suave y luminoso ---------- */
.glow-top {
  position: fixed; top: -220px; left: 50%; transform: translateX(-50%);
  width: 760px; height: 520px;
  background: radial-gradient(ellipse, rgba(53,97,127,.16) 0%, transparent 68%);
  pointer-events: none; z-index: 0; animation: breathe 9s ease-in-out infinite;
}
.glow-left {
  position: fixed; bottom: -120px; left: -160px; width: 520px; height: 520px;
  background: radial-gradient(ellipse, rgba(244,113,46,.13) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}
.glow-right {
  position: fixed; top: 80px; right: -120px; width: 420px; height: 420px;
  background: radial-gradient(ellipse, rgba(20,39,58,.10) 0%, transparent 65%);
  pointer-events: none; z-index: 0; animation: breathe 11s ease-in-out infinite reverse;
}
@keyframes breathe {
  0%, 100% { opacity: .7; transform: translateX(-50%) scale(1); }
  50% { opacity: 1; transform: translateX(-50%) scale(1.08); }
}
.grid-lines {
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(53,97,127,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(53,97,127,.045) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none; z-index: 0;
}

/* ---------- Tipografía ---------- */
h1, h2, h3, .logo, .btn, .badge {
  font-family: 'Source Serif 4', Georgia, serif;
}

h1 { font-size: clamp(32px, 5.2vw, 54px); font-weight: 700; line-height: 1.16; letter-spacing: .01em; text-transform: uppercase; }
h2 { font-size: clamp(24px, 3.4vw, 34px); font-weight: 700; line-height: 1.22; letter-spacing: .015em; text-transform: uppercase; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }

.eyebrow {
  display: inline-block;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
  margin-bottom: 14px;
}

.lede {
  font-size: clamp(15px, 1.6vw, 18px);
  font-weight: 300;
  color: var(--charcoal-70);
  line-height: 1.7;
  max-width: 620px;
}

.divider {
  width: 120px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), var(--lime), var(--teal), transparent);
}

/* ---------- Layout genérico ---------- */
main { position: relative; z-index: 2; flex: 1; }

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 88px 0; position: relative; z-index: 2; }
section.tight { padding: 56px 0; }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Header / navegación ---------- */
header.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244,247,250,.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--teal-16);
}

.nav-wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo-mark {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: .04em;
  text-decoration: none;
  color: var(--teal-deep);
}
/* "un solo elemento destacado": las letras A / I llevan el resaltado en lima */
.logo-mark .hl {
  display: inline-block;
  background: var(--lime);
  color: var(--charcoal);
  padding: 0 3px;
  border-radius: 4px;
}

nav.main-nav { display: flex; align-items: center; gap: 40px; }

.nav-links { display: flex; gap: 32px; }
.nav-links a {
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Source Serif 4', Georgia, serif;
  color: var(--charcoal-70);
  letter-spacing: .01em;
  padding: 6px 0;
  position: relative;
  transition: color .2s;
}
.nav-links a:hover { color: var(--teal-deep); }
.nav-links a.active { color: var(--teal-deep); }
.nav-links a.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--teal);
  border-radius: 2px;
}

/* Especificidad extra (.main-nav ...) para ganarle a la regla .btn, que si no
   deja visible el CTA en móvil y rompe el header. */
.main-nav .nav-cta { display: none; }
@media (min-width: 860px) { .main-nav .nav-cta { display: inline-flex; } }

.nav-toggle {
  display: none;
  width: 40px; height: 40px;
  border: 1px solid var(--teal-30);
  border-radius: 10px;
  background: transparent;
  color: var(--teal-deep);
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.nav-toggle svg { width: 18px; height: 18px; }

@media (max-width: 859px) {
  .nav-links { 
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--teal-16);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
  }
  .nav-links.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-links a { padding: 14px 0; border-bottom: 1px solid var(--charcoal-10); width: 100%; }
  .nav-toggle { display: inline-flex; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 14px 28px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .03em;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .15s ease, background .2s ease, border-color .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }

/* CTA principal: el otro "elemento destacado" en lima, reservado a la acción más importante */
.btn-primary {
  background: var(--lime);
  color: var(--charcoal);
}
.btn-primary:hover { background: #DA5F22; }

.btn-ghost {
  background: transparent;
  color: var(--teal-deep);
  border-color: var(--teal-30);
}
.btn-ghost:hover { border-color: var(--teal); background: var(--teal-08); }

/* ---------- Badge ---------- */
.badge {
  display: inline-block;
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--teal-deep);
  border: 1px solid var(--teal-30);
  border-radius: 20px;
  padding: 5px 16px;
  text-transform: uppercase;
  background: var(--teal-08);
}

/* ---------- Hero (Inicio) ---------- */
.hero {
  padding: 76px 0 96px;
  text-align: center;
}
.hero .badge { margin-bottom: 28px; }
.hero h1 { margin: 0 auto 22px; max-width: 820px; }
.hero .lede { margin: 0 auto 36px; max-width: 560px; }
.hero .divider { margin: 0 auto 30px; }
.hero-actions { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Value proposition ---------- */
.value-block {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}
.value-block p { font-size: clamp(17px, 2vw, 21px); font-weight: 300; color: var(--charcoal-70); line-height: 1.75; }

/* ---------- Tarjetas de servicios (resumen en Inicio) ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
@media (max-width: 780px) { .card-grid { grid-template-columns: 1fr; } }

.card {
  background: #FFFFFF;
  border: 1px solid var(--teal-16);
  border-radius: 20px;
  padding: 32px 28px;
  transition: border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.card:hover { border-color: var(--teal-30); transform: translateY(-3px); box-shadow: 0 12px 28px rgba(20,39,58,.10); }
.card .num {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13px;
  font-weight: 700;
  color: var(--teal);
  letter-spacing: .08em;
  margin-bottom: 16px;
}
.card h3 { margin-bottom: 12px; color: var(--teal-deep); }
.card p { font-size: 14px; font-weight: 300; color: var(--charcoal-70); line-height: 1.7; }
.card .card-link {
  display: inline-block;
  margin-top: 18px;
  font-size: 13px;
  font-weight: 600;
  color: var(--teal);
  text-decoration: none;
}
.card .card-link:hover { text-decoration: underline; }

/* ---------- Camino (bloque breve + página Servicios) ---------- */
.camino-block {
  background: linear-gradient(135deg, rgba(53,97,127,.10), rgba(244,113,46,.12));
  border: 1px solid var(--teal-16);
  border-radius: 24px;
  padding: 44px;
  text-align: center;
}
.camino-steps {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 24px 0 8px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .03em;
}
.camino-steps span { color: var(--charcoal-70); }
.camino-steps .step { color: var(--teal-deep); }
.camino-steps .arrow { color: var(--teal); }

/* ---------- CTA final ---------- */
.cta-final {
  text-align: center;
  padding: 96px 0;
}
.cta-final h2 { margin-bottom: 14px; color: var(--teal-deep); }
.cta-final .lede { margin: 0 auto 32px; }

/* ---------- Quiénes Somos ---------- */
.vm-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-bottom: 64px;
}
@media (max-width: 780px) { .vm-grid { grid-template-columns: 1fr; } }
.vm-card {
  background: #FFFFFF;
  border: 1px solid var(--teal-16);
  border-radius: 20px;
  padding: 40px 34px;
}
.vm-card .eyebrow { margin-bottom: 18px; }
.vm-card p.stmt {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: clamp(19px, 2.2vw, 24px);
  font-weight: 600;
  line-height: 1.45;
  color: var(--teal-deep);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
@media (max-width: 940px) { .values-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .values-grid { grid-template-columns: 1fr; } }
.value-card {
  border: 1px solid var(--teal-16);
  border-radius: 18px;
  padding: 28px 22px;
  background: var(--paper-dim);
}
.value-card h3 { color: var(--teal-deep); margin-bottom: 10px; font-size: 17px; }
.value-card p { font-size: 14px; font-weight: 300; color: var(--charcoal-70); line-height: 1.65; }

/* ---------- Servicios (página) ---------- */
.service-row {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 28px;
  padding: 44px 0;
  border-top: 1px solid var(--teal-16);
}
.service-row:last-of-type { border-bottom: 1px solid var(--teal-16); }
@media (max-width: 640px) { .service-row { grid-template-columns: 1fr; gap: 14px; } }

.service-row .index {
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 42px;
  font-weight: 700;
  color: var(--teal-30);
  line-height: 1;
}
.service-row h3 { font-size: 24px; margin-bottom: 14px; color: var(--teal-deep); }
.service-row p.desc { font-size: 15px; font-weight: 300; color: var(--charcoal-70); line-height: 1.75; max-width: 620px; margin-bottom: 18px; }

.price-tag { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.price-tag .price { font-family: 'Source Serif 4', Georgia, serif; font-size: 20px; font-weight: 700; color: var(--teal-deep); }
.price-note { font-size: 12.5px; color: var(--charcoal-45); max-width: 520px; line-height: 1.6; margin-bottom: 18px; }

/* ---------- Formulario de contacto ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 56px;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.field { margin-bottom: 18px; }
.field label {
  display: block;
  font-size: 12.5px;
  letter-spacing: .03em;
  color: var(--charcoal-70);
  margin-bottom: 8px;
}
.field input, .field textarea {
  width: 100%;
  background: #FFFFFF;
  border: 1px solid var(--teal-30);
  border-radius: 14px;
  padding: 13px 16px;
  color: var(--charcoal);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 14px;
  outline: none;
  transition: border-color .2s;
}
.field input:focus, .field textarea:focus { border-color: var(--teal); }
.field textarea { min-height: 130px; resize: vertical; }
.field.required label::after { content: ' *'; color: var(--teal); }
.field-hint { font-size: 11.5px; color: var(--charcoal-45); margin-top: 6px; }

/* honeypot anti-spam (oculto para personas) */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; pointer-events: none; }

.form-msg {
  display: none;
  border-radius: 14px;
  padding: 16px 18px;
  font-size: 14px;
  margin-top: 18px;
}
/* El color/tipo de mensaje se define acá; la visibilidad la maneja el JS
   (main.js) mostrándolas solo tras enviar. NO poner display:block acá, o se
   ven permanentemente al cargar la página. */
.form-msg.success { background: rgba(53,97,127,.12); border: 1px solid rgba(53,97,127,.38); color: var(--teal-deep); }
.form-msg.error { background: rgba(220,80,80,.08); border: 1px solid rgba(220,80,80,.35); color: #B23A3A; }

.side-contact { }
.side-contact .item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.side-contact .item .ic {
  width: 38px; height: 38px; flex-shrink: 0;
  border: 1px solid var(--teal-30);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--teal-deep);
  background: var(--teal-08);
}
.side-contact .item a, .side-contact .item span { font-size: 14px; color: var(--charcoal-70); text-decoration: none; }
.side-contact .item a:hover { color: var(--teal-deep); }
.side-contact .item strong { display: block; font-size: 13px; color: var(--charcoal); margin-bottom: 2px; }

/* ---------- Footer ---------- */
footer.site-footer {
  position: relative;
  z-index: 2;
  background: var(--teal-deep);
  color: var(--paper);
  padding: 52px 0 32px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 28px;
  margin-bottom: 32px;
}
.footer-brand .logo-mark { display: inline-block; margin-bottom: 10px; color: var(--paper); }
.footer-brand .logo-mark .hl { color: var(--charcoal); }
.footer-brand p { font-size: 13px; color: rgba(241,250,247,.6); max-width: 280px; line-height: 1.6; }
.footer-col h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: rgba(241,250,247,.55); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 13.5px; color: rgba(241,250,247,.85); text-decoration: none; margin-bottom: 10px; }
.footer-col a:hover { color: var(--lime); }
.footer-col .btn-ghost { color: var(--paper); border-color: rgba(241,250,247,.3); }
.footer-col .btn-ghost:hover { border-color: var(--lime); background: rgba(244,113,46,.14); color: var(--paper); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 24px;
  border-top: 1px solid rgba(241,250,247,.15);
  font-size: 11.5px;
  color: rgba(241,250,247,.45);
  letter-spacing: .03em;
}

/* ---------- Utilidades ---------- */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }

.field input.field-invalid, .field textarea.field-invalid {
  border-color: #B23A3A;
}

/* estado base: visible sin animación (si el navegador prefiere menos movimiento, se queda así) */
.reveal { opacity: 1; transform: none; }

/* ===========================================================
   Movimiento — menos estático, respetando prefers-reduced-motion
   =========================================================== */
@media (prefers-reduced-motion: no-preference) {

  .hero .wrap {
    animation: heroFadeUp .85s cubic-bezier(.16,1,.3,1) both;
  }
  @keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .divider {
    background-size: 200% 100%;
    animation: dividerShimmer 3.5s ease-in-out infinite;
  }
  @keyframes dividerShimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
  }

  .reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .7s cubic-bezier(.16,1,.3,1), transform .7s cubic-bezier(.16,1,.3,1);
  }
  .reveal.reveal-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(244,113,46,.32);
  }
  .btn-ghost:hover {
    transform: translateY(-2px);
  }
  .card:hover .num { transform: translateX(2px); }
  .card .num { transition: transform .25s ease; }
}


/* ===========================================================
   Widget del Asistente de Diagnóstico (chatbot)
   =========================================================== */
.chat-launcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--teal-deep);
  color: var(--paper);
  border: none;
  border-radius: 999px;
  padding: 14px 20px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(20,39,58,.30);
  transition: transform .2s ease, box-shadow .2s ease;
}
.chat-launcher:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(20,39,58,.36); }
.chat-launcher .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--lime);
  flex-shrink: 0;
}
.chat-launcher[hidden] { display: none; }

.chat-panel {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 81;
  width: min(360px, calc(100vw - 40px));
  height: min(520px, calc(100vh - 100px));
  background: #FFFFFF;
  border: 1px solid var(--teal-16);
  border-radius: 20px;
  box-shadow: 0 20px 50px rgba(20,39,58,.30);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.chat-panel[hidden] { display: none; }

.chat-panel-header {
  background: var(--teal-deep);
  color: var(--paper);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.chat-panel-header .title {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.chat-panel-header .subtitle {
  display: block;
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 300;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
  color: rgba(241,250,247,.7);
  margin-top: 2px;
}
.chat-panel-close {
  background: transparent;
  border: none;
  color: var(--paper);
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}

.chat-panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--paper-dim);
}
.chat-msg {
  max-width: 84%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-line; /* respeta los saltos de línea del mensaje (texto estructurado) */
}
.chat-msg.bot {
  align-self: flex-start;
  background: #FFFFFF;
  border: 1px solid var(--teal-16);
  color: var(--charcoal);
  border-bottom-left-radius: 4px;
}
.chat-msg.user {
  align-self: flex-end;
  background: var(--teal);
  color: #FFFFFF;
  border-bottom-right-radius: 4px;
}
.chat-msg.system {
  align-self: center;
  background: transparent;
  color: var(--charcoal-45);
  font-size: 11.5px;
  text-align: center;
  max-width: 100%;
}
.chat-typing {
  align-self: flex-start;
  display: inline-flex;
  gap: 4px;
  padding: 10px 14px;
  background: #FFFFFF;
  border: 1px solid var(--teal-16);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.chat-typing span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal-30);
  animation: chatTypingBounce 1.2s infinite ease-in-out;
}
.chat-typing span:nth-child(2) { animation-delay: .15s; }
.chat-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes chatTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.chat-panel-form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--teal-16);
  background: #FFFFFF;
}
.chat-panel-form input {
  flex: 1;
  border: 1px solid var(--teal-30);
  border-radius: 999px;
  padding: 10px 16px;
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 13.5px;
  color: var(--charcoal);
  outline: none;
}
.chat-panel-form input:focus { border-color: var(--teal); }
.chat-panel-form button {
  border: none;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--lime);
  color: var(--charcoal);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}
.chat-panel-form button:disabled { opacity: .5; cursor: default; }
.chat-panel-form[data-closed="true"] input,
.chat-panel-form[data-closed="true"] button { display: none; }
.chat-panel-footnote {
  padding: 8px 14px 12px;
  font-size: 10.5px;
  color: var(--charcoal-45);
  text-align: center;
  background: #FFFFFF;
}

/* ---------- Chat en móvil: ancho casi completo y altura dinámica ----------
   En celulares 100vh es más alto que el área visible (por la barra del
   navegador), lo que puede tapar el input. Usamos dvh y márgenes chicos. */
@media (max-width: 480px) {
  .chat-launcher { right: 14px; bottom: 14px; }
  .chat-panel {
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    height: min(560px, calc(100vh - 20px));
    height: min(560px, calc(100dvh - 20px));
  }
}

/* ===========================================================
   Stepper de proceso (página Servicios)
   Fondo oscuro, acento naranja en el paso activo, números y
   títulos en Sora (geométrica bold), bordes finos sin sombras.
   Horizontal en desktop, acordeón vertical en móvil.
   =========================================================== */
.stepper {
  margin-top: 28px;
  background: var(--teal-deep);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 20px;
  padding: 28px 26px 30px;
  display: flex;
  flex-wrap: wrap;
  position: relative;
}

.stepper-step {
  flex: 1 1 0;
  min-width: 0;
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  padding: 4px 8px 8px;
  position: relative;
  color: rgba(244, 247, 250, .68);
  transition: color .2s ease;
}
/* línea conectora entre números (pasa por detrás de los círculos) */
.stepper-step::after {
  content: '';
  position: absolute;
  top: 22px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, .14);
  z-index: 0;
}
.stepper-step:last-of-type::after { display: none; }

.stepper-num {
  position: relative;
  z-index: 1;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .22);
  background: var(--teal-deep);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 800;
  font-size: 15px;
  color: rgba(244, 247, 250, .82);
  transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.stepper-title {
  font-family: 'Sora', system-ui, sans-serif;
  font-weight: 600;
  font-size: 12.5px;
  line-height: 1.3;
  letter-spacing: .01em;
}

.stepper-step:hover .stepper-num { border-color: var(--lime); }
.stepper-step.active { color: #FFFFFF; }
.stepper-step.active .stepper-num {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--teal-deep);
  box-shadow: 0 0 0 4px rgba(244, 113, 46, .18);
}

/* panel de descripción: ocupa el ancho completo, debajo de la fila */
.stepper-panel {
  display: none;
  order: 1;
  flex-basis: 100%;
  margin-top: 22px;
  padding: 20px 22px;
  border: 1px solid rgba(255, 255, 255, .12);
  border-left: 3px solid var(--lime);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
}
.stepper-panel.active { display: block; animation: stepperFade .35s ease both; }
.stepper-panel p {
  margin: 0;
  color: rgba(244, 247, 250, .82);
  font-family: 'Source Serif 4', Georgia, serif;
  font-size: 15px;
  line-height: 1.7;
}
@keyframes stepperFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Móvil: acordeón vertical ---- */
@media (max-width: 720px) {
  .stepper { flex-direction: column; padding: 16px 14px 18px; }
  .stepper-step {
    flex: none;
    flex-direction: row;
    align-items: center;
    text-align: left;
    gap: 14px;
    padding: 13px 4px;
    order: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
  }
  .stepper-step::after { display: none; }
  .stepper-num { width: 38px; height: 38px; font-size: 14px; flex-shrink: 0; }
  .stepper-title { font-size: 14px; }
  .stepper-panel {
    order: 0;
    flex-basis: auto;
    margin: -2px 0 8px 52px;
    padding: 12px 16px;
  }
}

/* ===========================================================
   Indicador interactivo de ahorro de horas (Inicio)
   =========================================================== */
.savings {
  max-width: 660px;
  margin: 44px auto 0;
  text-align: left;
  background: #FFFFFF;
  border: 1px solid var(--teal-16);
  border-radius: 20px;
  padding: 30px 28px;
}
.savings-head { text-align: center; margin-bottom: 24px; }
.savings-title { color: var(--teal-deep); margin: 6px 0 10px; }
.savings-sub {
  font-size: 14px; font-weight: 300; color: var(--charcoal-70);
  line-height: 1.6; max-width: 470px; margin: 0 auto;
}

.savings-control { margin-bottom: 26px; }
.savings-control-top {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 14px; font-size: 13px; color: var(--charcoal-70); letter-spacing: .02em;
}
.savings-control-top strong { font-size: 24px; color: var(--teal-deep); font-weight: 700; }

input#ahorroRange {
  --pct: 21%;
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 6px; border-radius: 999px; margin: 0;
  background: linear-gradient(to right, var(--lime) var(--pct), var(--teal-16) var(--pct));
  outline: none; cursor: pointer;
}
input#ahorroRange::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--lime); border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(20,39,58,.28); cursor: grab; margin-top: -9px;
}
input#ahorroRange::-webkit-slider-thumb:active { cursor: grabbing; }
input#ahorroRange::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; }
input#ahorroRange::-moz-range-thumb {
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--lime); border: 3px solid #FFFFFF;
  box-shadow: 0 2px 8px rgba(20,39,58,.28); cursor: grab;
}
input#ahorroRange::-moz-range-track { height: 6px; border-radius: 999px; background: transparent; }
input#ahorroRange:focus-visible { box-shadow: 0 0 0 3px rgba(244,113,46,.25); }
.savings-scale {
  display: flex; justify-content: space-between; margin-top: 9px;
  font-size: 11px; color: var(--charcoal-45);
}

.savings-bars { display: grid; gap: 16px; margin-bottom: 22px; }
.savings-bar-label {
  font-size: 13px; color: var(--charcoal-70); margin-bottom: 7px;
  display: flex; justify-content: space-between;
}
.savings-bar-val { font-weight: 700; color: var(--teal-deep); }
.savings-bar { height: 16px; border-radius: 999px; background: var(--paper-dim); overflow: hidden; }
.savings-bar-fill { height: 100%; border-radius: 999px; background: var(--teal); transition: width .25s ease; }
.savings-bar.ia .savings-bar-fill { background: var(--lime); }

.savings-result {
  text-align: center; font-size: 16px; color: var(--charcoal-70);
  padding: 16px 18px; border: 1px solid var(--teal-16);
  border-radius: 14px; background: var(--teal-08);
}
.savings-result strong {
  font-family: 'Source Serif 4', Georgia, serif;
  font-weight: 900; font-size: 26px; color: var(--lime);
  margin: 0 3px;
}
.savings-foot {
  font-size: 11.5px; color: var(--charcoal-45); line-height: 1.5;
  margin-top: 14px; text-align: center;
}
