/* ============================================================
   jrrwebstudio.com — Sitio de la agencia JRRWeb Studio
   Identidad: moderno · tech · limpio · confiable (velocidad + profesionalismo)
   CSS único. Sin frameworks. Tokens con contraste WCAG 2.1 AA verificado.

   Pares de contraste (calculados WCAG 2.1, 2026-06-22):
     --text     #0F172A  sobre --bg      #FFFFFF  ≈ 17.9:1 (AAA)
     --muted    #475569  sobre --bg      #FFFFFF  ≈  7.6:1 (AAA)
     --muted    #475569  sobre --surface #F8FAFC  ≈  7.2:1 (AAA)
     blanco     #FFFFFF  sobre --primary #4338CA  ≈  7.9:1 (AAA)
     --primary  #4338CA  sobre --bg      #FFFFFF  ≈  7.9:1 (enlaces AAA)
     --accent   #0F766E  sobre --bg      #FFFFFF  ≈  5.5:1 (AA)
     blanco     #FFFFFF  sobre --accent  #0F766E  ≈  5.5:1 (AA)
     blanco     #FFFFFF  sobre --wa      #0B6E4F  ≈  6.3:1 (AA)
     blanco     #FFFFFF  sobre --ink     #1E1B4B  ≈ 16.0:1 (AAA, banda oscura)
     --accent-l #5EEAD4  sobre --ink     #1E1B4B  ≈ 10.8:1 (AAA, sobre oscuro)
     --on-ink-m #C7D2FE  sobre --ink     #1E1B4B  ≈ 10.7:1 (AAA, texto tenue oscuro)
   ============================================================ */

:root {
  /* Color — claro/tech con primario índigo + acento teal */
  --bg: #16213B;
  --surface: #202C4A;
  --line: #2A3550;
  --text: #EAF0FF;
  --muted: #FFFFFF;

  --primary: #38BDF8;          /* azul cian de marca (preferencia usuario, antes índigo #7C83FF) */
  --primary-hover: #5FCDFA;
  --primary-active: #1FA8DD;
  --on-primary: #0B1020;

  --accent: #2DD4BF;           /* teal: velocidad/frescura, contrasta con índigo */
  --accent-hover: #5EEAD4;
  --accent-light: #5EEAD4;     /* solo sobre fondo oscuro --ink */

  --ink: #171F3A;              /* índigo muy oscuro: banda/sección destacada */
  --on-ink: #FFFFFF;
  --on-ink-muted: #C7D2FE;

  --wa: #25D366;               /* verde WhatsApp (igual que las plantillas) */
  --wa-hover: #4ADE80;

  --link: #7DD3FC;
  --focus: #38BDF8;
  --danger: #FCA5A5;
  --ok: #86EFAC;
  --stars: #FBBF24;

  /* Tipografía: stack de sistema (0 requests externos → LCP mínimo, sin fugas de privacidad) */
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Espaciado / forma */
  --space-1: .5rem; --space-2: 1rem; --space-3: 1.75rem;
  --space-4: 3rem; --space-5: 4.75rem;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --shadow: 0 12px 30px rgba(0,0,0,.5);
  --shadow-btn: 0 4px 14px rgba(56,189,248,.30);
  --maxw: 1100px;
}

/* ---------- Reset corto ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  font-family: var(--font);
  background: transparent;
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--primary-hover); }

/* Foco visible en TODO elemento interactivo (gate AA) */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary); color: var(--on-primary);
  padding: .75rem 1.25rem; font-weight: 700; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---------- Layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--space-3); }
section { padding-block: var(--space-5); }
.section-head { max-width: 660px; margin-bottom: var(--space-4); }
.section-head.center { margin-inline: auto; text-align: center; }
.kicker {
  display: inline-block; color: var(--primary);
  font-weight: 700; font-size: .85rem; letter-spacing: .12em;
  text-transform: uppercase; margin-bottom: var(--space-1);
}
h1, h2, h3 { line-height: 1.18; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.1rem); }
h3 { font-size: 1.12rem; }
.lead { color: var(--muted); font-size: 1.125rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,16,32,.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--space-2);
  min-height: 68px;
}
.brand {
  display: flex; align-items: center; gap: .55rem;
  text-decoration: none; color: var(--text);
}
.brand svg { height: 46px; width: auto; flex: none; }
.site-nav { margin-left: auto; }
.site-nav ul { display: flex; gap: var(--space-2); list-style: none; padding: 0; }
.site-nav a {
  color: var(--text); text-decoration: none; font-weight: 600;
  padding: .6rem .5rem; display: inline-block; border-radius: 6px;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--primary); }
.lang-switch {
  margin-left: var(--space-1);
  border: 1px solid var(--line); border-radius: var(--radius-pill);
  padding: .4rem .9rem; text-decoration: none; color: var(--muted);
  font-weight: 700; font-size: .85rem;
}
.lang-switch:hover { border-color: var(--primary); color: var(--primary); }
.header-cta { display: none; }
@media (min-width: 960px) {
  .header-cta { display: inline-flex; margin-left: var(--space-1); }
}
@media (max-width: 820px) {
  .site-nav { display: none; }
}

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem; min-height: 48px; padding: .8rem 1.6rem;
  border-radius: var(--radius-pill); border: 2px solid transparent;
  font-family: inherit; font-size: 1rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background-color .12s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--primary); color: var(--on-primary); box-shadow: var(--shadow-btn); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-primary:active { background: var(--primary-active); box-shadow: none; }
/* CTA "Cotización gratis" del header en azul cian de marca (preferencia usuario #38BDF8) */
.btn-primary.header-cta { background: #38BDF8; color: #0B1020; box-shadow: 0 4px 14px rgba(56,189,248,.30); }
.btn-primary.header-cta:hover { background: #5FCDFA; color: #0B1020; }
.btn-primary.header-cta:active { background: #1FA8DD; }

.btn-accent { background: var(--accent); color: #062B27; box-shadow: 0 4px 14px rgba(15,118,110,.28); }
.btn-accent:hover { background: var(--accent-hover); color: #062B27; }

.btn-wa { background: var(--wa); color: #111827; }
.btn-wa:hover { background: var(--wa-hover); color: #111827; }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: rgba(67,56,202,.06); }

.btn-ghost-on-ink { background: rgba(255,255,255,.10); color: #FFFFFF; border-color: rgba(255,255,255,.55); }
.btn-ghost-on-ink:hover { background: rgba(255,255,255,.18); color: #FFFFFF; }

.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding-block: clamp(3rem, 9vw, 6.5rem);
  background:
    radial-gradient(900px 420px at 85% -10%, rgba(67,56,202,.08), transparent 60%),
    radial-gradient(700px 380px at -10% 110%, rgba(15,118,110,.06), transparent 60%),
    transparent;
  border-bottom: 1px solid var(--line);
}
.hero .wrap { max-width: 840px; }
.badge {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--surface); border: 1px solid var(--line);
  color: var(--text); border-radius: var(--radius-pill);
  padding: .45rem 1rem; font-size: .85rem; font-weight: 700;
  margin-bottom: var(--space-3);
}
.badge svg { width: 16px; height: 16px; color: var(--accent); }
.hero h1 span { color: #38BDF8; }
.hero h1 { text-shadow: 0 2px 18px rgba(0,0,0,.55); }
.hero .lead { margin-top: var(--space-2); max-width: 600px; text-shadow: 0 1px 12px rgba(0,0,0,.6); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-4); }
.hero-proof {
  display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem;
  margin-top: var(--space-3); color: var(--muted); font-weight: 600; font-size: .95rem;
}
.hero-proof svg { width: 18px; height: 18px; color: var(--accent); vertical-align: -3px; margin-right: .25rem; }

/* ---------- Barra de confianza ---------- */
.trustbar { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: var(--space-3); }
.trustbar ul {
  list-style: none; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: var(--space-2);
}
.trustbar li { display: flex; align-items: center; gap: .7rem; font-weight: 700; }
.trustbar svg { width: 26px; height: 26px; color: var(--primary); flex: none; }
.trustbar small { display: block; color: var(--muted); font-weight: 500; }

/* ---------- Tarjetas / grids ---------- */
.grid { display: grid; gap: var(--space-3); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--space-3);
  box-shadow: var(--shadow);
}
.card .ic {
  width: 48px; height: 48px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(67,56,202,.10); margin-bottom: var(--space-2);
}
.card .ic.teal { background: rgba(15,118,110,.10); }
.card .ic svg { width: 26px; height: 26px; color: var(--primary); }
.card .ic.teal svg { color: var(--accent); }
.card h3 { margin-bottom: .4rem; }
.card p { color: var(--muted); font-size: .98rem; }
.card ul.check { list-style: none; padding: 0; margin-top: var(--space-2); display: grid; gap: .5rem; }
.card ul.check li { position: relative; padding-left: 1.7rem; color: var(--muted); font-size: .96rem; }
.card ul.check li::before {
  content: ""; position: absolute; left: 0; top: .35em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/13px no-repeat;
}

/* ---------- Banda oscura (sección destacada) ---------- */
.band-ink {
  background:
    radial-gradient(800px 400px at 90% -20%, rgba(94,234,212,.10), transparent 60%),
    var(--ink);
  color: var(--on-ink);
  border-block: 1px solid var(--ink);
}
.band-ink .kicker { color: var(--accent-light); }
.band-ink h2 { color: var(--on-ink); }
.band-ink .lead, .band-ink p { color: var(--on-ink-muted); }
.band-ink .stat-grid {
  list-style: none; padding: 0; margin-top: var(--space-3);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-3);
}
.band-ink .stat-grid li { border-left: 3px solid var(--accent-light); padding-left: var(--space-2); }
.band-ink .stat-grid b { display: block; font-size: 1.9rem; color: var(--on-ink); line-height: 1.1; }
.band-ink .stat-grid span { color: var(--on-ink-muted); font-size: .95rem; }

/* ---------- Proceso (pasos) ---------- */
.steps { counter-reset: step; list-style: none; padding: 0; display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space-3); }
.steps li::before {
  counter-increment: step; content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--primary); color: var(--on-primary);
  font-weight: 800; font-size: 1.2rem; margin-bottom: var(--space-2);
}
.steps h3 { margin-bottom: .35rem; }
.steps p { color: var(--muted); font-size: .98rem; }

/* ---------- Precios ---------- */
.pricing-grid { display: grid; gap: var(--space-3); grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); align-items: start; }
.plan {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--space-3);
  box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.plan.featured { border-color: var(--primary); box-shadow: 0 12px 34px rgba(67,56,202,.16); position: relative; }
.plan .tag {
  position: absolute; top: -.85rem; left: var(--space-3);
  background: var(--primary); color: var(--on-primary);
  font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: .3rem .75rem; border-radius: var(--radius-pill);
}
.plan h3 { font-size: 1.25rem; }
.plan .price { margin: var(--space-2) 0 .25rem; }
.plan .price b { font-size: 2.1rem; letter-spacing: -.02em; }
.plan .price small { color: var(--muted); font-weight: 600; }
.plan .price-sub { color: var(--muted); font-size: .95rem; margin-bottom: var(--space-2); }
.plan ul.check { list-style: none; padding: 0; margin: var(--space-2) 0; display: grid; gap: .55rem; flex: 1; }
.plan ul.check li { position: relative; padding-left: 1.7rem; color: var(--text); font-size: .96rem; }
.plan ul.check li::before {
  content: ""; position: absolute; left: 0; top: .3em;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") center/13px no-repeat;
}
.plan .btn { margin-top: var(--space-2); }

/* Tabla comparativa de mercado */
/* La tabla vive dentro de .band-ink (oscura), pero se renderiza sobre fondo claro
   propio: forzamos texto oscuro para garantizar contraste AA independientemente del contenedor. */
.market-table { overflow-x: auto; margin-top: var(--space-3); border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); }
table.compare { width: 100%; border-collapse: collapse; min-width: 520px; color: var(--text); }
table.compare caption { text-align: left; padding: var(--space-2) var(--space-3); color: var(--muted); font-size: .9rem; }
table.compare th, table.compare td { padding: .85rem var(--space-2); border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; color: var(--text); }
table.compare thead th { background: var(--surface); font-size: .92rem; }
table.compare tbody th { font-weight: 700; }
table.compare tr:last-child td, table.compare tr:last-child th { border-bottom: none; }
table.compare .us { color: var(--primary); font-weight: 800; }

/* ---------- FAQ (details nativo, 0 JS) ---------- */
.faq details {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: var(--space-2); box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer; font-weight: 700; padding: 1rem 1.25rem;
  list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  min-height: 48px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--primary); font-size: 1.4rem; font-weight: 800; }
.faq details[open] summary::after { content: "\2013"; }
.faq details > p { padding: 0 1.25rem 1.25rem; color: var(--muted); }

/* ---------- Zona servida ---------- */
.areas { display: flex; flex-wrap: wrap; gap: .6rem; list-style: none; padding: 0; }
.areas li {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-pill); padding: .45rem 1rem; font-weight: 600; color: var(--muted);
}

/* ---------- Bloque destacado nicho / split ---------- */
.split { display: grid; gap: var(--space-4); align-items: center; grid-template-columns: 1fr; }
@media (min-width: 880px) { .split { grid-template-columns: 1.05fr .95fr; } }
.split img, .split .frame {
  width: 100%; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow);
}
.feature-list { list-style: none; padding: 0; display: grid; gap: var(--space-2); margin-top: var(--space-3); }
.feature-list li { display: flex; gap: .8rem; align-items: flex-start; }
.feature-list .fi {
  width: 38px; height: 38px; border-radius: 10px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(15,118,110,.10);
}
.feature-list .fi svg { width: 22px; height: 22px; color: var(--accent); }
.feature-list b { display: block; }
.feature-list span { color: var(--muted); font-size: .96rem; }

/* ---------- CTA final ---------- */
.cta-final { text-align: center; }
.cta-final .wrap { max-width: 720px; }
.cta-final .hero-ctas { justify-content: center; }

/* ---------- Contacto / formulario ---------- */
.contact-grid { display: grid; gap: var(--space-4); grid-template-columns: 1fr; }
@media (min-width: 860px) { .contact-grid { grid-template-columns: 1.1fr .9fr; } }
.form-card {
  background: var(--bg); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--space-3); box-shadow: var(--shadow);
}
.field { margin-bottom: var(--space-2); }
.field label { display: block; font-weight: 700; margin-bottom: .4rem; }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: .75rem 1rem;
  background: var(--bg); color: var(--text);
  border: 2px solid var(--line); border-radius: var(--radius-sm);
  font-family: inherit; font-size: 1rem;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus-visible, .field textarea:focus-visible { border-color: var(--primary); outline-offset: 0; }
.form-note { color: var(--muted); font-size: .85rem; margin-top: var(--space-2); }
.form-msg { margin-top: var(--space-2); padding: 1rem; border-radius: var(--radius-sm); font-weight: 700; }
.form-msg[hidden] { display: none; }
.form-msg.ok { background: rgba(134,239,172,.12); color: var(--ok); border: 1px solid var(--ok); }
.form-msg.err { background: rgba(252,165,165,.12); color: var(--danger); border: 1px solid var(--danger); }

/* Honeypot: fuera de pantalla (no display:none — los bots simples sí lo rellenan) */
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.direct-contact { display: grid; gap: var(--space-2); align-content: start; }
.direct-contact .btn { justify-content: flex-start; }
.direct-contact h3 { margin-bottom: .25rem; }
.hours { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: var(--space-4); }
.site-footer .wrap { display: grid; gap: var(--space-3); }
@media (min-width: 720px) { .site-footer .wrap { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer .brand svg { height: 46px; width: auto; }
.site-footer h2 { font-size: 1rem; margin-bottom: .25rem; }
.site-footer ul { list-style: none; padding: 0; display: grid; gap: .4rem; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--primary); }
.site-footer address { font-style: normal; color: var(--muted); }
.footer-tag { color: var(--muted); margin-top: .5rem; max-width: 36ch; }
.footer-legal { grid-column: 1 / -1; border-top: 1px solid var(--line); padding-top: var(--space-2); color: var(--muted); font-size: .85rem; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }

/* ---------- Barra fija móvil (Cotización / WhatsApp) ---------- */
.mobile-cta {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 60;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line);
  border-top: 1px solid var(--line);
}
.mobile-cta a {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 56px; font-weight: 800; text-decoration: none; font-size: 1rem;
}
.mobile-cta .quote { background: var(--primary); color: var(--on-primary); }
.mobile-cta .wa { background: var(--wa); color: #111827; }
.mobile-cta svg { width: 20px; height: 20px; }
@media (min-width: 768px) { .mobile-cta { display: none; } }
@media (max-width: 767px) { body { padding-bottom: 56px; } }

/* ---------- Páginas utilitarias (404 / privacidad) ---------- */
.page-simple { padding-block: var(--space-5); min-height: 55vh; }
.page-simple .wrap { max-width: 760px; }
.page-simple h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: var(--space-2); }
.page-simple h2 { font-size: 1.25rem; margin: var(--space-3) 0 var(--space-1); }
.page-simple p, .page-simple li { color: var(--muted); }
.page-simple ul { padding-left: 1.25rem; }

/* ---------- Breadcrumb ---------- */
.breadcrumb { background: var(--surface); border-bottom: 1px solid var(--line); padding-block: .75rem; }
.breadcrumb ol { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; font-size: .9rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: var(--line); }
.breadcrumb [aria-current="page"] { color: var(--text); font-weight: 600; }

/* ===== Fondo animado: degradado de esquinas + triangulos, color cambiante (JRRWeb) ===== */
html { background: var(--bg); }
body::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(820px 640px at 0% 0%, rgba(124,131,255,.16), transparent 58%),
    radial-gradient(820px 640px at 100% 100%, rgba(45,212,191,.14), transparent 58%),
    linear-gradient(rgba(22,33,59,.50), rgba(22,33,59,.66)),
    url("/img/hero-tech.jpg") center center / cover no-repeat,
    var(--bg);
}
@media (prefers-reduced-motion: reduce) { body::before { animation: none; } }