/* ============================================================
   SISTEMA LUNA — Facturación Electrónica Paraguay
   Hoja de estilos global. Mobile-first, sin frameworks.
   Paleta derivada del branding (luna): tinta casi negra +
   acento índigo nocturno + dorado lunar para realces.
   ============================================================ */

:root {
  /* Colores de marca */
  --tinta: #0b1020;          /* casi negro, azulado (cielo nocturno) */
  --tinta-2: #1a2238;        /* superficie oscura secundaria */
  --indigo: #3b47cc;         /* acento primario */
  --indigo-600: #2f3aa6;
  --luna: #e9c46a;           /* dorado lunar para detalles */
  --texto: #1c2333;
  --texto-suave: #4b5468;
  --linea: #e6e8ef;
  --fondo: #ffffff;
  --fondo-alt: #f6f7fb;
  --verde: #1f9d57;          /* checks de features */
  --blanco: #ffffff;

  /* Tipografía con fallback al sistema (0 requests si no carga la web font) */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --radio: 14px;
  --radio-sm: 10px;
  --sombra: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .06);
  --sombra-fuerte: 0 12px 40px rgba(16, 24, 40, .14);
  --contenedor: 1140px;
  --transicion: .18s ease;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--texto);
  background: var(--fondo);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { color: var(--tinta); line-height: 1.2; margin: 0 0 .5em; font-weight: 800; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
p { margin: 0 0 1rem; color: var(--texto-suave); }

.container { width: 100%; max-width: var(--contenedor); margin-inline: auto; padding-inline: 20px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Botón CTA */
.btn {
  display: inline-flex; align-items: center; gap: .55rem;
  font-weight: 700; font-size: 1rem; line-height: 1;
  padding: .95rem 1.5rem; border-radius: 999px;
  border: 2px solid transparent; cursor: pointer; transition: var(--transicion);
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--indigo); color: #fff; box-shadow: var(--sombra); }
.btn-primary:hover { background: var(--indigo-600); }
.btn-wa { background: #25D366; color: #073a1d; }
.btn-wa:hover { background: #1fbe5a; }
.btn-ghost { background: transparent; color: var(--tinta); border-color: var(--linea); }
.btn-ghost:hover { border-color: var(--indigo); color: var(--indigo); }
.btn-lg { padding: 1.1rem 1.9rem; font-size: 1.08rem; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.88); backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--linea);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; min-height: 68px; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .6rem; font-weight: 800; color: var(--tinta); letter-spacing: -.02em; font-size: 1.15rem; }
.brand img { height: 34px; width: auto; }
.nav { display: flex; align-items: center; gap: 1.4rem; }
.nav a { color: var(--texto); font-weight: 600; font-size: .98rem; }
.nav a:hover { color: var(--indigo); text-decoration: none; }
/* El CTA del nav es un botón: mantiene texto blanco y buen contraste (gana a .nav a) */
.nav a.nav-cta { color: #fff; }
.nav a.nav-cta:hover { color: #fff; }
.nav-cta { display: inline-flex; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: .4rem; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--tinta); margin: 5px 0; transition: var(--transicion); }

/* ===== Hero ===== */
.hero {
  background: radial-gradient(1200px 500px at 80% -10%, rgba(59,71,204,.12), transparent 60%),
              linear-gradient(180deg, #fbfbfe 0%, #ffffff 100%);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 3rem; align-items: center; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .85rem; font-weight: 700; color: var(--indigo-600);
  background: rgba(59,71,204,.08); padding: .4rem .8rem; border-radius: 999px; margin-bottom: 1.2rem;
  letter-spacing: .01em;
}
.hero h1 { margin-bottom: .6rem; }
.hero .lead { font-size: 1.2rem; color: var(--texto-suave); max-width: 38ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; }
.hero-trust { margin-top: 1.8rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.hero-trust span {
  display: inline-flex; align-items: center; gap: .45rem;
  font-size: .9rem; font-weight: 600; color: var(--tinta);
  background: #fff; border: 1px solid var(--linea); border-radius: 999px;
  padding: .5rem .9rem; box-shadow: var(--sombra);
}
.hero-trust span svg { color: var(--indigo); flex: 0 0 auto; }
.hero-card {
  background: var(--tinta); color: #fff; border-radius: var(--radio); padding: 1.8rem;
  box-shadow: var(--sombra-fuerte);
}
.hero-card h2 { color: #fff; font-size: 1.25rem; margin-bottom: 1rem; }
.hero-card ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .8rem; }
.hero-card li { display: flex; gap: .6rem; align-items: flex-start; color: #d7dbed; font-size: .98rem; }
.hero-card li svg { flex: 0 0 auto; margin-top: 2px; }

/* ===== Secciones ===== */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section-alt { background: var(--fondo-alt); }
.section-head { max-width: 62ch; margin: 0 auto 2.6rem; text-align: center; }
.section-head p { font-size: 1.1rem; }

/* Grid de beneficios */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; }
.card {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.6rem; transition: var(--transicion);
}
.card:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.card .ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(59,71,204,.1); color: var(--indigo); margin-bottom: 1rem;
}
.card h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.card p { font-size: .98rem; margin: 0; }

/* ===== Planes / Precios ===== */
.planes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; align-items: start; }
.plan {
  background: #fff; border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden;
  display: flex; flex-direction: column; transition: var(--transicion);
}
.plan:hover { box-shadow: var(--sombra); transform: translateY(-3px); }
.plan.destacado { border-color: var(--indigo); box-shadow: var(--sombra); position: relative; }
.plan.destacado::before {
  content: "Más elegido"; position: absolute; top: 12px; right: 12px;
  background: var(--indigo); color: #fff; font-size: .72rem; font-weight: 700;
  padding: .25rem .6rem; border-radius: 999px;
}
.plan-head { padding: 1.4rem 1.4rem 1rem; border-bottom: 1px solid var(--linea); }
.plan-head h3 { margin: 0 0 .5rem; font-size: 1.2rem; }
.plan-precio { font-size: 2rem; font-weight: 800; color: var(--tinta); letter-spacing: -.02em; }
.plan-precio small { font-size: .95rem; font-weight: 600; color: var(--texto-suave); }
.plan-sub { font-size: .9rem; color: var(--texto-suave); margin: .3rem 0 0; }
.plan ul { list-style: none; margin: 0; padding: 1.2rem 1.4rem; display: grid; gap: .7rem; flex: 1; }
.plan li { display: flex; gap: .5rem; align-items: flex-start; font-size: .96rem; color: var(--texto); }
.plan li svg { flex: 0 0 auto; margin-top: 3px; color: var(--verde); }
.plan .plan-cta { padding: 0 1.4rem 1.4rem; }
.plan .btn { width: 100%; justify-content: center; }
.precios-nota { text-align: center; margin-top: 1.6rem; font-size: .95rem; color: var(--texto-suave); }

/* ===== FAQ ===== */
.faq { max-width: 820px; margin-inline: auto; }
.faq details {
  border: 1px solid var(--linea); border-radius: var(--radio-sm); padding: 0 1.2rem; margin-bottom: .8rem;
  background: #fff;
}
.faq summary {
  cursor: pointer; font-weight: 700; color: var(--tinta); padding: 1.1rem 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; color: var(--indigo); font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq details[open] summary { border-bottom: 1px solid var(--linea); }
.faq details p { padding: 1rem 0; margin: 0; }

/* ===== CTA banda ===== */
.cta-band { background: var(--tinta); color: #fff; text-align: center; }
.cta-band h2 { color: #fff; }
.cta-band p { color: #c9cee3; max-width: 52ch; margin-inline: auto; }
.cta-band .hero-actions { justify-content: center; margin-top: 1.6rem; }

/* ===== Footer ===== */
.site-footer { background: var(--tinta-2); color: #c9cee3; padding: 3rem 0 2rem; font-size: .95rem; }
.site-footer p { color: #c9cee3; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.site-footer h3, .site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: .9rem; font-weight: 800; }
.site-footer a { color: #c9cee3; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-brand img { height: 40px; margin-bottom: .8rem; filter: invert(1) brightness(2); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; font-size: .88rem; }

/* Breadcrumb */
.breadcrumb { padding: 1rem 0 0; font-size: .9rem; color: var(--texto-suave); }
.breadcrumb a { color: var(--texto-suave); }
.breadcrumb a:hover { color: var(--indigo); }

/* Botón flotante WhatsApp */
.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%; background: #25D366;
  display: grid; place-items: center; box-shadow: var(--sombra-fuerte);
  transition: var(--transicion);
}
.wa-float:hover { transform: scale(1.08); }

/* Contenido largo (páginas de guía) */
.prose { max-width: 760px; margin-inline: auto; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose ul, .prose ol { color: var(--texto-suave); padding-left: 1.3rem; }
.prose li { margin-bottom: .5rem; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--linea); padding: .7rem .8rem; text-align: left; }
.prose th { background: var(--fondo-alt); }
.nota {
  background: rgba(233,196,106,.14); border-left: 4px solid var(--luna);
  padding: 1rem 1.2rem; border-radius: var(--radio-sm); margin: 1.5rem 0; font-size: .96rem;
}

/* ===== Responsive ===== */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2rem; }
  .hero-card { order: 2; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav { position: fixed; inset: 68px 0 auto 0; background: #fff; flex-direction: column; align-items: stretch;
          padding: 1rem 20px 1.5rem; border-bottom: 1px solid var(--linea); gap: .4rem; display: none; box-shadow: var(--sombra); }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--linea); }
  .nav-cta { margin-top: .6rem; justify-content: center; }
  .nav-toggle { display: block; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; justify-content: center; }
}

/* Respeto a preferencias de movimiento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ============================================================
   Mejoras UX/UI (accesibilidad y feedback)
   ============================================================ */

/* Cursor coherente en todo lo clicable */
.btn, .nav-toggle, .faq summary, [role="button"] { cursor: pointer; }

/* Foco visible y consistente para navegación por teclado */
a:focus-visible,
.btn:focus-visible,
.nav-toggle:focus-visible,
.faq summary:focus-visible,
.wa-float:focus-visible {
  outline: 3px solid var(--indigo);
  outline-offset: 3px;
  border-radius: 6px;
}
.cta-band a:focus-visible,
.hero-card a:focus-visible { outline-color: var(--luna); }

/* Chips de confianza del hero: no se cortan al reflowar */
.hero-trust span { white-space: nowrap; }

/* Franja de confianza (social proof real, sin testimonios inventados) */
.trust-bar { background: var(--fondo-alt); border-top: 1px solid var(--linea); border-bottom: 1px solid var(--linea); }
.trust-bar .container { display: flex; flex-wrap: wrap; justify-content: center; gap: 1.2rem 2.4rem; padding-top: 1.4rem; padding-bottom: 1.4rem; }
.trust-item { display: inline-flex; align-items: center; gap: .6rem; font-weight: 600; color: var(--texto); font-size: .98rem; }
.trust-item svg { color: var(--indigo); flex: 0 0 auto; }

/* Tarjetas "cómo empezar": número del paso bien legible */
#como-empezar .ico { font-weight: 800; font-size: 1.25rem; }
