/* ==========================================================================
   El Contador 502 — Hoja de estilos
   Estética: CLARO, cálido y cercano + acentos azul vibrante / esmeralda.
   Limpio, luminoso y confiable. Sin dependencias.
   ========================================================================== */

:root {
  /* Lienzo claro y cálido */
  --bg:        #f5f8fd;
  --bg-2:      #eaf0fa;
  --surface:   #ffffff;
  --surface-2: #f2f6fc;
  --border:    rgba(18, 38, 73, 0.09);
  --border-strong: rgba(18, 38, 73, 0.16);

  /* Texto */
  --text:  #14213d;
  --muted: #56657f;
  --faint: #8a97ad;

  /* Marca: azul vibrante -> cian, esmeralda y un toque ámbar */
  --brand:    #2563eb;
  --brand-2:  #06b6d4;
  --emerald:  #10b981;
  --gold:     #f59e0b;
  --pain:     #ef4444;
  --on-brand: #ffffff; /* texto sobre gradientes de marca */

  --grad-brand:   linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --grad-emerald: linear-gradient(135deg, #06b6d4 0%, #10b981 100%);
  --grad-text:    linear-gradient(120deg, #2563eb 0%, #06b6d4 52%, #10b981 100%);

  --shadow-sm: 0 6px 22px rgba(20, 40, 80, 0.07);
  --shadow-md: 0 14px 40px rgba(20, 40, 80, 0.10);
  --shadow-lg: 0 30px 70px rgba(20, 40, 80, 0.16);
  --glow:      0 0 0 1px rgba(37, 99, 235, 0.18), 0 22px 50px rgba(6, 182, 212, 0.16);

  --radius:    18px;
  --radius-sm: 12px;
  --maxw:      1160px;

  --font: "Plus Jakarta Sans", "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ----- Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* Fondo con halos de color suaves y luminosos */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 620px at 10% -10%, rgba(37, 99, 235, 0.10), transparent 60%),
    radial-gradient(820px 600px at 100% -5%, rgba(6, 182, 212, 0.10), transparent 55%),
    radial-gradient(720px 600px at 50% 118%, rgba(16, 185, 129, 0.08), transparent 60%),
    var(--bg);
}

/* ----- Utilidades -------------------------------------------------------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; position: relative; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--brand);
  padding: 7px 14px; border-radius: 999px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.18);
}
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head h2 { font-size: clamp(28px, 4vw, 42px); line-height: 1.15; letter-spacing: -0.02em; margin: 18px 0 14px; }
.section-head p { color: var(--muted); font-size: 17px; }
.gradient-text { background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ----- Botones ----------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 15.5px; letter-spacing: -0.01em;
  padding: 14px 24px; border-radius: 999px;
  transition: transform .18s ease, box-shadow .25s ease, background .25s ease;
  white-space: nowrap;
}
.btn svg { width: 19px; height: 19px; }
.btn-primary { background: var(--grad-brand); color: var(--on-brand); box-shadow: 0 12px 30px rgba(37, 99, 235, 0.28); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 18px 42px rgba(37, 99, 235, 0.4); }
.btn-wa { background: linear-gradient(135deg, #25d366 0%, #1ebe57 100%); color: #fff; box-shadow: 0 12px 30px rgba(37, 211, 102, 0.32); }
.btn-wa:hover { transform: translateY(-2px); box-shadow: 0 18px 44px rgba(37, 211, 102, 0.45); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: var(--surface-2); transform: translateY(-2px); }
.btn-block { width: 100%; }
.btn-sm { padding: 11px 18px; font-size: 14px; }

/* ----- Navbar ------------------------------------------------------------ */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(245, 248, 253, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(255, 255, 255, 0.85); box-shadow: var(--shadow-sm); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 800; font-size: 18px; letter-spacing: -0.02em; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: var(--grad-brand); color: var(--on-brand);
  font-weight: 900; font-size: 15px;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35);
}
.brand .logo span { transform: translateY(-0.5px); }
.brand b { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a { color: var(--muted); font-size: 15px; font-weight: 600; transition: color .2s; }
.nav-links a:hover { color: var(--text); }
.nav-cta { display: flex; align-items: center; gap: 12px; }
.nav-toggle { display: none; width: 42px; height: 42px; border-radius: 10px; border: 1px solid var(--border-strong); color: var(--text); background: var(--surface); }

/* ----- Hero -------------------------------------------------------------- */
.hero { padding: 70px 0 90px; position: relative; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.4vw, 60px); line-height: 1.04; letter-spacing: -0.03em; margin: 22px 0 22px; }
.hero p.lead { font-size: 19px; color: var(--muted); max-width: 540px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 28px; margin-top: 40px; }
.trust-item { display: flex; flex-direction: column; }
.trust-item b { font-size: 26px; letter-spacing: -0.02em; }
.trust-item span { font-size: 13.5px; color: var(--faint); font-weight: 600; }
.badge-live {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 13.5px; font-weight: 700; color: #0f9d6b;
  padding: 8px 15px; border-radius: 999px;
  background: rgba(16, 185, 129, 0.10); border: 1px solid rgba(16, 185, 129, 0.25);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--emerald); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,0.5);} 70% { box-shadow: 0 0 0 9px rgba(16,185,129,0);} 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0);} }

/* Tarjeta visual del hero (mock de conversación / trámite resuelto) */
.hero-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-lg);
}
.hero-card::before {
  content: ""; position: absolute; inset: 0; border-radius: 24px; padding: 1.5px;
  background: linear-gradient(160deg, rgba(37,99,235,0.5), rgba(6,182,212,0.25), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none;
}
.hc-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.hc-avatar { width: 42px; height: 42px; border-radius: 12px; background: var(--grad-brand); display: grid; place-items: center; font-weight: 900; color: var(--on-brand); }
.hc-head .meta b { display: block; font-size: 15px; }
.hc-head .meta span { font-size: 12.5px; color: #0f9d6b; font-weight: 600; }
.chat-line { display: flex; margin-top: 14px; }
.bubble { max-width: 80%; padding: 11px 15px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; }
.bubble.them { background: var(--surface-2); border: 1px solid var(--border); border-top-left-radius: 5px; color: var(--text); }
.bubble.me { margin-left: auto; background: var(--grad-brand); color: var(--on-brand); font-weight: 600; border-top-right-radius: 5px; }
.hc-status { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(16,185,129,0.10); border: 1px solid rgba(16,185,129,0.22); font-size: 13.5px; font-weight: 700; color: #0f9d6b; }

/* ----- Dolores ----------------------------------------------------------- */
.pains { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.pain-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); transition: transform .2s, border-color .2s, box-shadow .2s; }
.pain-card:hover { transform: translateY(-4px); border-color: rgba(239,68,68,0.3); box-shadow: var(--shadow-md); }
.pain-card .ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 22px; background: rgba(239,68,68,0.08); border: 1px solid rgba(239,68,68,0.18); margin-bottom: 16px; }
.pain-card h3 { font-size: 17.5px; margin-bottom: 8px; }
.pain-card p { font-size: 14.5px; color: var(--muted); }

/* ----- Servicios --------------------------------------------------------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 40px; }
.filter {
  font-size: 14.5px; font-weight: 700; color: var(--muted);
  padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  box-shadow: var(--shadow-sm); transition: all .2s;
}
.filter:hover { color: var(--text); border-color: var(--border-strong); }
.filter.active { color: var(--on-brand); background: var(--grad-brand); border-color: transparent; box-shadow: 0 8px 22px rgba(37,99,235,0.28); }

.services { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.svc {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow-sm);
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease;
}
.svc:hover { transform: translateY(-6px); border-color: rgba(37,99,235,0.25); box-shadow: var(--glow); }
.svc .cat-tag { font-size: 11.5px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: var(--brand); margin-bottom: 14px; }
.svc .ico { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: rgba(37,99,235,0.08); border: 1px solid rgba(37,99,235,0.16); margin-bottom: 16px; }
.svc h3 { font-size: 18.5px; line-height: 1.25; margin-bottom: 9px; letter-spacing: -0.01em; }
.svc p { font-size: 14.5px; color: var(--muted); flex-grow: 1; margin-bottom: 18px; }
.svc-req { margin: 0 0 16px; padding: 13px 15px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.svc-req-t { display: block; font-size: 12px; font-weight: 800; letter-spacing: 0.03em; text-transform: uppercase; color: var(--brand); margin-bottom: 8px; }
.svc-req ul { display: flex; flex-direction: column; gap: 6px; }
.svc-req li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--muted); line-height: 1.4; }
.svc-req li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--emerald); font-weight: 800; }
.svc .price { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 700; color: #c2820a; margin-bottom: 16px; }
.svc .btn { width: 100%; }

/* ----- Cómo funciona ----------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.step { position: relative; padding: 30px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.step .num { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; font-weight: 900; font-size: 19px; background: var(--grad-brand); color: var(--on-brand); margin-bottom: 18px; }
.step h3 { font-size: 19px; margin-bottom: 9px; }
.step p { font-size: 15px; color: var(--muted); }

/* ----- Contenido / redes ------------------------------------------------- */
.content-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.socials-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.social {
  display: flex; align-items: center; gap: 14px; padding: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.social:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.social .si { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; color: #fff; font-weight: 800; }
.social b { display: block; font-size: 15px; }
.social span { font-size: 13px; color: var(--muted); }
.si.tt { background: #111; }
.si.ig { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.si.fb { background: #1877f2; }
.si.yt { background: #ff0000; }

/* ----- Testimonios ------------------------------------------------------- */
.testimonials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.tcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); }
.tcard .stars { color: var(--gold); font-size: 15px; letter-spacing: 2px; margin-bottom: 14px; }
.tcard p { font-size: 15px; color: var(--text); margin-bottom: 18px; }
.tcard .who { display: flex; align-items: center; gap: 12px; }
.tcard .who .av { width: 40px; height: 40px; border-radius: 50%; background: var(--grad-emerald); display: grid; place-items: center; font-weight: 800; color: #fff; }
.tcard .who b { font-size: 14.5px; display: block; }
.tcard .who span { font-size: 12.5px; color: var(--faint); }

/* ----- FAQ --------------------------------------------------------------- */
.faq { max-width: 760px; margin: 0 auto; }
.qa { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface); box-shadow: var(--shadow-sm); overflow: hidden; }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 22px; font-weight: 700; font-size: 16px; cursor: pointer; list-style: none; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary .chev { transition: transform .25s; color: var(--brand); flex-shrink: 0; font-size: 20px; }
.qa[open] summary .chev { transform: rotate(45deg); }
.qa .ans { padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

/* ----- CTA final --------------------------------------------------------- */
.cta-final { position: relative; overflow: hidden; border-radius: 28px; padding: 64px 40px; text-align: center;
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  box-shadow: var(--shadow-lg); }
.cta-final::after { content:""; position:absolute; inset:0; background: radial-gradient(600px 300px at 100% 0%, rgba(255,255,255,0.18), transparent 60%); pointer-events:none; }
.cta-final h2 { font-size: clamp(28px, 4vw, 42px); letter-spacing: -0.02em; margin-bottom: 16px; color: #fff; position: relative; }
.cta-final p { color: rgba(255,255,255,0.92); font-size: 18px; max-width: 540px; margin: 0 auto 30px; position: relative; }
.cta-final .hero-cta { justify-content: center; position: relative; }
.cta-final .btn-wa { background: #fff; color: #0c8a3e; }
.cta-final .btn-wa:hover { background: #f0fff6; }

/* ----- Footer ------------------------------------------------------------ */
.footer { border-top: 1px solid var(--border); padding: 56px 0 32px; margin-top: 40px; background: var(--surface); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; margin-bottom: 40px; }
.footer p.desc { color: var(--muted); font-size: 14.5px; margin-top: 14px; max-width: 320px; }
.footer h4 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--faint); margin-bottom: 16px; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { color: var(--muted); font-size: 14.5px; transition: color .2s; }
.footer ul a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 24px; border-top: 1px solid var(--border); color: var(--faint); font-size: 13.5px; flex-wrap: wrap; gap: 12px; }
.footer-bottom b, .footer-bottom [data-dominio] { color: var(--brand); font-weight: 700; }

/* ----- Botón flotante WhatsApp + Chat widget ----------------------------- */
.float-wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: linear-gradient(135deg, #25d366, #1ebe57); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 14px 36px rgba(37, 211, 102, 0.45);
  transition: transform .2s;
}
.float-wa:hover { transform: scale(1.08); }
.float-wa svg { width: 30px; height: 30px; }

.chat-fab {
  position: fixed; right: 22px; bottom: 92px; z-index: 60;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--grad-brand); display: grid; place-items: center;
  box-shadow: 0 14px 36px rgba(37, 99, 235, 0.42); color: #fff;
  transition: transform .2s;
}
.chat-fab:hover { transform: scale(1.08); }
.chat-fab svg { width: 28px; height: 28px; }

.chat-panel {
  position: fixed; right: 22px; bottom: 160px; z-index: 61;
  width: min(360px, calc(100vw - 44px));
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
  transform: translateY(20px) scale(0.96); opacity: 0; pointer-events: none;
  transition: transform .25s ease, opacity .25s ease;
}
.chat-panel.open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-top { background: var(--grad-brand); color: #fff; padding: 18px 20px; }
.chat-top b { font-size: 16px; }
.chat-top span { font-size: 12.5px; display: block; opacity: 0.88; }
.chat-body { padding: 18px; display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; }
.chat-quick { padding: 0 18px 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.chat-quick button { font-size: 13px; font-weight: 600; color: var(--text); padding: 9px 13px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); transition: all .2s; }
.chat-quick button:hover { background: var(--grad-brand); color: #fff; border-color: transparent; }

/* ----- Animaciones de aparición ------------------------------------------ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; } .reveal.d3 { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } .dot { animation: none; } }

/* ----- Responsive -------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-card { order: -1; }
  .content-wrap { grid-template-columns: 1fr; gap: 32px; }
  .pains, .services, .steps, .testimonials { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: grid; place-items: center; }
  .nav-links.show {
    display: flex; flex-direction: column; position: absolute; top: 72px; left: 0; right: 0;
    background: var(--surface); border-bottom: 1px solid var(--border); padding: 20px 24px; gap: 16px; box-shadow: var(--shadow-md);
  }
  .nav-cta .btn-ghost { display: none; }
}
@media (max-width: 600px) {
  .section { padding: 70px 0; }
  .pains, .services, .steps, .testimonials, .footer-grid, .socials-grid { grid-template-columns: 1fr; }
  .hero-trust { gap: 22px; }
  .cta-final { padding: 44px 24px; }
}
