/* Home público de PanaCuara: estilo "Panamanian Fintech Minimal" (cobalto, esmeralda y ámbar
   sobre superficies frías). Los tokens viven aquí y no en tokens.css porque solo aplican al home;
   la app y el resto de páginas siguen con la marca cálida. */

:root {
  color-scheme: light;
  --fuente: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --fondo: #faf8ff;
  --fondo-gris: #f4f4f6;
  --tarjeta: #ffffff;
  --tarjeta-baja: #f3f3ff;
  --titulo: #131a33;
  --texto: #131a33;
  --suave: #434656;
  --tenue: #64748b;
  --borde: #e2e8f0;
  --borde-fuerte: #c3c5d9;

  /* Azul para actuar: el botón usa el cobalto vivo y el texto el más hondo (≥ 7:1). */
  --primario: #155dfc;
  --primario-hover: #164db2;
  --primario-hondo: #0047cc;
  --primario-texto: #0047cc;
  --azul-suave: #eff5ff;
  --azul-claro: #dce1ff;
  --lavanda: #ebedff;

  --verde: #059669;
  --verde-texto: #006c4a;
  --verde-suave: #ecfdf5;
  --verde-brillo: #82f5c1;
  --verde-claro: #85f8c4;
  --ambar-texto: #774a00;
  --ambar-suave: #fffbeb;
  --yappy-texto: #0369a1;
  --yappy-suave: #ebf8fe;

  --sobre-primario: #ffffff;
  --sobre-primario-suave: #eceeff;

  --sombra-suave: 0 2px 8px rgba(11, 19, 43, .04);
  --sombra-tarjeta: 0 4px 20px -2px rgba(11, 19, 43, .05), 0 2px 6px -1px rgba(11, 19, 43, .03);
  --sombra-tarjeta-hover: 0 12px 30px -4px rgba(11, 19, 43, .09);
  --sombra-flotante: 0 20px 45px -10px rgba(21, 93, 252, .14), 0 4px 16px rgba(11, 19, 43, .05);
  --sombra-boton: 0 4px 16px rgba(21, 93, 252, .25);
  --anillo: 0 0 0 2px var(--fondo), 0 0 0 4px var(--primario);

  --radio-sm: 8px;
  --radio-md: 12px;
  --radio-lg: 16px;
  --radio-xl: 24px;
  --transicion: 180ms ease;
}

/* Claro por defecto (también sin JavaScript): oscuro solo con el botón de modo. */
:root[data-theme="oscuro"] {
  color-scheme: dark;
  --fondo: #0b1020;
  --fondo-gris: #0f1528;
  --tarjeta: #151c33;
  --tarjeta-baja: #1a2240;
  --titulo: #eef1ff;
  --texto: #e3e7ff;
  --suave: #b9bfd8;
  --tenue: #9aa1bd;
  --borde: #263052;
  --borde-fuerte: #36416a;

  --primario: #155dfc;
  --primario-hover: #2f6dff;
  --primario-hondo: #0047cc;
  --primario-texto: #a8c0ff;
  --azul-suave: rgba(21, 93, 252, .18);
  --azul-claro: rgba(21, 93, 252, .35);
  --lavanda: rgba(120, 140, 255, .16);

  --verde: #34d399;
  --verde-texto: #6ee7b7;
  --verde-suave: rgba(16, 185, 129, .15);
  --verde-claro: rgba(16, 185, 129, .45);
  --ambar-texto: #fcd34d;
  --ambar-suave: rgba(245, 158, 11, .15);
  --yappy-texto: #7dd3fc;
  --yappy-suave: rgba(2, 132, 199, .2);

  --sombra-suave: 0 0 0 1px var(--borde);
  --sombra-tarjeta: 0 0 0 1px var(--borde);
  --sombra-tarjeta-hover: 0 0 0 1px var(--borde-fuerte), 0 12px 30px -6px rgba(0, 0, 0, .5);
  --sombra-flotante: 0 0 0 1px var(--borde), 0 24px 48px -12px rgba(0, 0, 0, .6);
  --sombra-boton: 0 4px 16px rgba(21, 93, 252, .35);
  --anillo: 0 0 0 2px var(--fondo), 0 0 0 4px #a8c0ff;
}

/* Base */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font: 400 16px/1.55 var(--fuente);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  transition: background-color .25s, color .25s;
}
a { color: var(--primario-texto); text-decoration: none; text-underline-offset: 3px; }
a:hover { text-decoration: underline; }
.boton:hover, .marca:hover, .barra-enlaces a:hover, .pie a:hover { text-decoration: none; }
button { font: inherit; cursor: pointer; }
img, svg { display: block; }
svg { flex: none; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--titulo); font-family: var(--fuente); }
h1, h2 { text-wrap: balance; }
p { text-wrap: pretty; }
abbr { text-decoration: none; }
:focus-visible { outline: none; box-shadow: var(--anillo); border-radius: var(--radio-sm); }
section { scroll-margin-top: 88px; }

.contenedor { max-width: 1200px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); }
.seccion { padding-block: clamp(56px, 8vw, 96px); }
.banda-gris { background: var(--fondo-gris); }
.cabecera-seccion { max-width: 680px; margin: 0 auto clamp(32px, 5vw, 48px); text-align: center; }
.cabecera-seccion > p:last-child { margin-top: 12px; color: var(--suave); font-size: 16px; }
.etiqueta { margin-bottom: 8px; color: var(--primario-texto); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }
.punto { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--primario); }
.punto.verde { background: var(--verde); }
.punto.azul { background: var(--primario); }

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px;
  border: 1px solid transparent; border-radius: var(--radio-sm);
  font: 600 14px/20px var(--fuente); letter-spacing: .01em; text-align: center; white-space: nowrap;
  transition: background-color var(--transicion), color var(--transicion), box-shadow var(--transicion), transform var(--transicion), border-color var(--transicion);
}
.boton.grande { min-height: 52px; padding: 14px 28px; font-size: 15px; }
.principal { background: var(--primario); color: var(--sobre-primario); box-shadow: 0 2px 6px -1px rgba(21, 93, 252, .25); }
.principal:hover { background: var(--primario-hover); color: var(--sobre-primario); transform: translateY(-1px); }
.principal.grande { box-shadow: var(--sombra-boton); }
.secundario { background: var(--tarjeta); color: var(--titulo); box-shadow: var(--sombra-suave); }
.secundario:hover { background: var(--fondo-gris); color: var(--titulo); }
.secundario .play { color: var(--primario-texto); }
.fantasma { background: transparent; color: var(--suave); }
.fantasma:hover { background: var(--fondo-gris); color: var(--titulo); }
.suave { background: var(--fondo-gris); color: var(--titulo); }
.suave:hover { background: var(--lavanda); color: var(--titulo); }
.blanco { background: #ffffff; color: var(--primario-hondo); font-weight: 700; box-shadow: 0 8px 20px rgba(0, 0, 0, .15); }
.blanco:hover { background: var(--azul-suave); color: var(--primario-hondo); transform: translateY(-1px); }
:root[data-theme="oscuro"] .blanco:hover { background: #eff5ff; }

/* Barra superior */
.barra {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--tarjeta) 82%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 8px rgba(11, 19, 43, .04);
}
:root[data-theme="oscuro"] .barra { box-shadow: 0 1px 0 var(--borde); }
.barra-nav { max-width: 1200px; height: 72px; margin: 0 auto; padding-inline: clamp(16px, 4vw, 32px); display: flex; align-items: center; gap: 24px; }
.marca { display: flex; flex: none; align-items: center; gap: 10px; }
.marca img { width: auto; height: 36px; object-fit: contain; }
.marca .marca-palabra { height: 18px; }
.pie .marca img { height: 32px; }
.pie .marca .marca-palabra { height: 16px; }
.barra-enlaces { display: none; align-items: center; gap: 4px; margin-inline: auto; }
.barra-enlaces a { padding: 8px 12px; white-space: nowrap; border-radius: var(--radio-sm); color: var(--suave); font-size: 14px; font-weight: 600; transition: color var(--transicion), background-color var(--transicion); }
.barra-enlaces a:hover { color: var(--titulo); background: var(--fondo-gris); }
.barra-acciones { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.barra-enlaces + .barra-acciones { margin-left: 0; }
.barra-acciones .boton { min-height: 40px; padding: 8px 16px; }
.modo { display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--suave); transition: background-color var(--transicion), color var(--transicion); }
.modo:hover { background: var(--fondo-gris); color: var(--titulo); }
.modo:focus-visible { border-radius: 50%; }
.modo .sol, [data-theme="oscuro"] .modo .luna { display: none; }
[data-theme="oscuro"] .modo .sol { display: block; }

/* Logos claro/oscuro */
.isotipo-oscuro, .marca-palabra-oscura { display: none; }
[data-theme="oscuro"] .isotipo-claro, [data-theme="oscuro"] .marca-palabra-clara { display: none; }
[data-theme="oscuro"] .isotipo-oscuro, [data-theme="oscuro"] .marca-palabra-oscura { display: block; }

/* Portada animada (hero): fondo azul noche con constelación, título con degradado y la factura que
   pasa de Borrador a ¡Enviada a WhatsApp! (antes, a CUFE autorizado). Las clases van con el prefijo pc- del diseño original
   (Downloads/panacuara-hero.zip) para seguirlo fácil. La animación la mueve inicio.js. */
.pc-hero {
  --pc-blue: #155DFC;
  --pc-green: #10B981;
  --pc-green-2: #34D399;
  --pc-ink: #0F172A;
  --pc-bg-1: #04112B;
  --pc-bg-2: #0A2463;
  --alto-barra: 72px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  /* Sube detrás de la barra para que esta quede sobre el fondo oscuro. */
  margin-top: calc(-1 * var(--alto-barra));
  padding-top: var(--alto-barra);
  color: #fff;
  background:
    radial-gradient(900px 600px at 82% 20%, rgba(21, 93, 252, .45), transparent 60%),
    radial-gradient(700px 500px at 8% 95%, rgba(16, 185, 129, .22), transparent 60%),
    linear-gradient(160deg, var(--pc-bg-1) 0%, var(--pc-bg-2) 100%);
}
/* Cuadrícula sutil, desvanecida en los bordes */
.pc-hero::before {
  content: ""; position: absolute; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .045) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 85%);
          mask-image: radial-gradient(ellipse 80% 70% at 60% 40%, #000 30%, transparent 85%);
}
.pc-constellation { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; pointer-events: none; }

.pc-hero__inner {
  max-width: 1200px; margin: 0 auto;
  padding: 72px clamp(16px, 4vw, 32px) 110px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px; align-items: center;
}
.pc-copy { min-width: 0; }

/* Antetítulo: frase simple, sin cápsula ni adornos de plantilla. */
.pc-badge { font-size: 15px; font-weight: 500; line-height: 1.4; color: rgba(226, 232, 240, .72); }
.pc-badge strong { color: #fff; font-weight: 600; }

.pc-title {
  margin: 22px 0 20px; color: #fff;
  font-size: clamp(40px, 5.4vw, 66px); line-height: 1.04; letter-spacing: -.03em; font-weight: 800;
  text-wrap: initial;
}
.pc-grad {
  background: linear-gradient(90deg, #60A5FA 0%, var(--pc-green-2) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pc-lead { max-width: 540px; margin: 0 0 34px; font-size: 19px; line-height: 1.6; color: rgba(226, 232, 240, .82); }

.pc-ctas { display: flex; flex-wrap: wrap; gap: 14px; }
.pc-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 16px 28px; border-radius: 12px;
  font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.pc-btn:hover { text-decoration: none; }
.pc-btn--primary { color: #fff; background: var(--pc-blue); box-shadow: 0 10px 30px -8px rgba(21, 93, 252, .75); }
.pc-btn--primary:hover { color: #fff; transform: translateY(-2px); box-shadow: 0 16px 36px -8px rgba(21, 93, 252, .9); }
.pc-btn--primary svg { transition: transform .2s; }
.pc-btn--primary:hover svg { transform: translateX(3px); }
.pc-btn--ghost {
  color: #fff; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .04);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.pc-btn--ghost:hover { color: #fff; background: rgba(255, 255, 255, .1); }
.pc-hero :focus-visible { box-shadow: 0 0 0 2px var(--pc-bg-1), 0 0 0 4px #a8c0ff; }

.pc-trust { display: flex; align-items: flex-start; gap: 8px; margin-top: 26px; font-size: 14px; color: rgba(203, 213, 225, .75); }
.pc-trust svg { margin-top: 2px; color: var(--pc-green-2); }

/* Tarjeta con la ilustración */
.pc-stage { position: relative; min-width: 0; perspective: 1200px; }
.pc-card {
  position: relative; padding: 18px; border-radius: 28px; background: #fff;
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .65), 0 0 0 1px rgba(255, 255, 255, .06), 0 0 90px -10px rgba(21, 93, 252, .45);
  transform-style: preserve-3d; transition: transform .5s cubic-bezier(.2, .8, .2, 1); will-change: transform;
}
.pc-card svg { display: block; width: 100%; height: auto; }

/* Tarjetas flotantes */
.pc-chip {
  position: absolute; display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  border-radius: 14px; background: #fff; color: var(--pc-ink);
  box-shadow: 0 18px 40px -14px rgba(2, 6, 23, .55);
  font-size: 13px; line-height: 1.35; white-space: nowrap; pointer-events: none;
  opacity: 0; transform: translateY(14px) scale(.96);
  transition: opacity .45s ease, transform .55s cubic-bezier(.34, 1.56, .64, 1);
}
.pc-chip strong { font-weight: 700; }
.pc-chip small { display: block; color: #64748B; font-size: 12px; }
.pc-chip__icon { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; }
.pc-chip--wa { top: 12%; left: -34px; }
.pc-chip--wa .pc-chip__icon { background: #DCFCE7; color: #16A34A; }
.pc-chip--yappy { bottom: -22px; right: 6%; border-left: 4px solid var(--pc-green); }
.pc-chip--yappy .pc-chip__icon { background: #ECFDF5; color: #047857; }
.pc-chip.is-on { opacity: 1; transform: none; }

/* Animación del SVG */
.pc-illus #Planta, .pc-illus #Factura_PanaCuara, .pc-illus #Emprendedora, .pc-illus #Lapiz,
.pc-illus #Burbuja_Aprobado, .pc-illus #Burbuja_Aprobado polygon, .pc-illus #Punto_Pulso,
.pc-illus #Items text, .pc-illus [id^="Estado_"] { transform-box: fill-box; }
.pc-illus #Planta { transform-origin: 50% 100%; animation: pc-sway 6s ease-in-out infinite; }
.pc-illus #Emprendedora { transform-origin: 50% 100%; animation: pc-breathe 4.2s ease-in-out infinite; }
.pc-illus #Factura_PanaCuara { animation: pc-float 5s ease-in-out infinite; }
.pc-illus #Lapiz { transform-origin: 90% 50%; animation: pc-write 2.6s ease-in-out infinite; }
.pc-illus #Txt_Total_Valor { font-variant-numeric: tabular-nums; }

/* Líneas de la factura que se "llenan" (solo con JavaScript; sin él se ve completa). */
.pc-illus #Items text, .pc-illus #Txt_ITBMS, .pc-illus #Txt_ITBMS_Valor, .pc-illus #Txt_Total, .pc-illus #Txt_Total_Valor {
  transition: opacity .35s ease, transform .45s ease;
}
:root.js .pc-hero:not(.is-filled) .pc-illus :is(#Items text, #Txt_ITBMS, #Txt_ITBMS_Valor, #Txt_Total, #Txt_Total_Valor) {
  opacity: 0; transform: translateX(-6px);
}
.pc-hero.is-filled .pc-illus #Items text:nth-child(-n+2) { transition-delay: .05s; }
.pc-hero.is-filled .pc-illus #Items text:nth-child(3),
.pc-hero.is-filled .pc-illus #Items text:nth-child(4) { transition-delay: .3s; }
.pc-hero.is-filled .pc-illus #Items text:nth-child(5),
.pc-hero.is-filled .pc-illus #Items text:nth-child(6) { transition-delay: .55s; }
.pc-hero.is-filled .pc-illus :is(#Txt_ITBMS, #Txt_ITBMS_Valor) { transition-delay: .8s; }
.pc-hero.is-filled .pc-illus :is(#Txt_Total, #Txt_Total_Valor) { transition-delay: 1s; }

/* Estados: Borrador -> Enviando… -> ¡Enviada a WhatsApp! (id Estado_Validando y Estado_CUFE) */
.pc-illus [id^="Estado_"] {
  opacity: 0; transform-origin: 50% 50%; transform: translateY(4px);
  transition: opacity .35s ease, transform .4s ease;
}
.pc-hero[data-state="borrador"]  .pc-illus #Estado_Borrador,
.pc-hero[data-state="validando"] .pc-illus #Estado_Validando,
.pc-hero[data-state="cufe"]      .pc-illus #Estado_CUFE { opacity: 1; transform: none; }
.pc-illus #Punto_Pulso { transform-origin: 50% 50%; animation: pc-dot 1s ease-in-out infinite; }

/* Burbuja de aprobado */
.pc-illus #Burbuja_Aprobado {
  transform-origin: 0% 100%; opacity: 0; transform: scale(.2);
  transition: opacity .25s ease, transform .55s cubic-bezier(.34, 1.56, .64, 1);
}
.pc-illus #Burbuja_Aprobado polygon { transform-origin: 50% 50%; transform: scale(0); transition: transform .45s cubic-bezier(.34, 1.56, .64, 1) .25s; }
.pc-hero[data-state="cufe"] .pc-illus #Burbuja_Aprobado,
.pc-hero[data-state="cufe"] .pc-illus #Burbuja_Aprobado polygon { opacity: 1; transform: none; }

/* Sin JavaScript: la factura queda autorizada, enviada y con el abono. */
:root:not(.js) .pc-illus #Estado_Borrador { opacity: 0; }
:root:not(.js) .pc-illus #Estado_CUFE,
:root:not(.js) .pc-illus #Burbuja_Aprobado,
:root:not(.js) .pc-illus #Burbuja_Aprobado polygon,
:root:not(.js) .pc-chip { opacity: 1; transform: none; }

/* Entrada al cargar */
.pc-reveal {
  opacity: 0; transform: translateY(18px);
  animation: pc-in .8s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: calc(var(--d, 0) * 110ms + 100ms);
}

@keyframes pc-in      { to { opacity: 1; transform: none; } }
@keyframes pc-sway    { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
@keyframes pc-breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.004, 1.01); } }
@keyframes pc-float   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pc-write   { 0%, 100% { transform: translateX(0) rotate(0); } 25% { transform: translateX(-3px) rotate(-1deg); } 75% { transform: translateX(2px) rotate(.8deg); } }
@keyframes pc-dot     { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.6); opacity: .45; } }

/* Barra sobre la portada: mientras se ve el fondo oscuro, va translúcida con el logo blanco.
   inicio.js le pone .fuera-portada al bajar y vuelve a la barra normal del tema. */
.barra { transition: background-color .25s, box-shadow .25s; }
:root.js .barra:not(.fuera-portada) { background: rgba(4, 17, 43, .55); box-shadow: 0 1px 0 rgba(255, 255, 255, .06); }
:root.js .barra:not(.fuera-portada) :is(.isotipo-claro, .marca-palabra-clara) { display: none; }
:root.js .barra:not(.fuera-portada) :is(.isotipo-oscuro, .marca-palabra-oscura) { display: block; }
:root.js .barra:not(.fuera-portada) :is(.barra-enlaces a, .modo, .fantasma) { color: rgba(255, 255, 255, .78); }
:root.js .barra:not(.fuera-portada) :is(.barra-enlaces a, .modo, .fantasma):hover { color: #fff; background: rgba(255, 255, 255, .08); }
:root.js .barra:not(.fuera-portada) :focus-visible { box-shadow: 0 0 0 2px var(--pc-bg-1, #04112B), 0 0 0 4px #a8c0ff; }

@media (max-width: 1000px) {
  .pc-hero__inner { grid-template-columns: 1fr; padding-top: 40px; gap: 64px; }
  .pc-chip--wa { left: -8px; }
}
@media (max-width: 559px) {
  .pc-hero { --alto-barra: 64px; }
  .pc-ctas .pc-btn { flex: 1 1 100%; }
}
@media (max-width: 520px) {
  .pc-chip { font-size: 12px; padding: 10px 12px; }
  .pc-chip--wa { top: -18px; }
}

/* Promoción opcional, controlada por la misma configuración del registro. */
.oferta { padding: 16px clamp(16px, 4vw, 32px) 0; }
.oferta-banda {
  position: relative; overflow: hidden; isolation: isolate;
  max-width: 1200px; margin: 0 auto; padding: clamp(24px, 3vw, 32px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 24px;
  border-radius: var(--radio-lg);
  background: linear-gradient(90deg, var(--primario-hondo), #164db2);
  color: var(--sobre-primario);
  box-shadow: 0 12px 30px -6px rgba(0, 71, 204, .3);
}
.oferta-banda::before, .oferta-banda::after { content: ""; position: absolute; z-index: -1; border-radius: 50%; pointer-events: none; }
.oferta-banda::before { right: -48px; bottom: -48px; width: 256px; height: 256px; background: #ffffff; opacity: .1; }
.oferta-banda::after { left: 33%; top: -64px; width: 192px; height: 192px; background: var(--verde-brillo); opacity: .15; }
.oferta-texto { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; flex: 1 1 320px; }
.oferta-chips { display: flex; gap: 8px; }
.oferta-chips span { padding: 4px 12px; border-radius: 999px; font-size: 14px; font-weight: 800; line-height: 20px; text-transform: uppercase; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }
.pro { background: #fffbeb; color: #986000; }
.gratis { background: #82f5c1; color: #00714e; }
.oferta h2 { color: var(--sobre-primario); font-size: 22px; font-weight: 700; line-height: 28px; letter-spacing: -.015em; }
.oferta p { color: var(--sobre-primario-suave); font-size: 15px; }
.oferta .boton { flex: none; padding-inline: 32px; }

/* Funciones */
.funciones { display: grid; gap: 24px; }
.tarjeta {
  display: flex; flex-direction: column; gap: 14px; padding: 28px;
  border-radius: var(--radio-lg); background: var(--tarjeta); box-shadow: var(--sombra-tarjeta);
  transition: box-shadow .25s ease, transform .25s ease;
}
.tarjeta:hover { box-shadow: var(--sombra-tarjeta-hover); transform: translateY(-2px); }
.icono { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 2px; border-radius: var(--radio-md); transition: transform .25s ease; }
.tarjeta:hover .icono { transform: scale(1.08); }
.tarjeta h3 { font-size: 18px; font-weight: 700; line-height: 24px; letter-spacing: -.01em; }
.tarjeta p { color: var(--suave); font-size: 15px; line-height: 22px; }
.tarjeta-pie { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 18px; font-size: 12px; font-weight: 600; line-height: 16px; letter-spacing: .02em; }
.tarjeta-pie::after { content: "→"; font-size: 14px; transition: transform var(--transicion); }
.tarjeta:hover .tarjeta-pie::after { transform: translateX(3px); }
.tono-azul .icono { background: var(--azul-suave); color: var(--primario-texto); }
.tono-azul .tarjeta-pie { color: var(--primario-texto); }
.tono-verde .icono { background: var(--verde-suave); color: var(--verde-texto); }
.tono-verde .tarjeta-pie { color: var(--verde-texto); }
.tono-yappy .icono { background: var(--yappy-suave); color: var(--yappy-texto); }
.tono-yappy .tarjeta-pie { color: var(--yappy-texto); }
.tono-lavanda .icono { background: var(--lavanda); color: var(--primario-texto); }
.tono-lavanda .tarjeta-pie { color: var(--titulo); }
.tono-ambar .icono { background: var(--ambar-suave); color: var(--ambar-texto); }
.tono-ambar .tarjeta-pie { color: var(--ambar-texto); }

/* Facturación DGI: la resolución, los dos topes y cómo migrar. */
.dgi {
  background:
    radial-gradient(60% 80% at 100% 0%, var(--azul-suave), transparent 70%),
    linear-gradient(180deg, var(--tarjeta-baja), var(--fondo));
}
.dgi-rejilla { display: grid; gap: 32px; align-items: center; }
.dgi-texto { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.dgi-chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--ambar-suave); color: var(--ambar-texto); font-size: 13px; font-weight: 700; line-height: 18px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ambar-texto) 18%, transparent); }
.dgi-texto h2 { max-width: 15em; }
.dgi-texto p { color: var(--suave); font-size: 16px; line-height: 1.6; }
.dgi-texto .dgi-entrada { color: var(--texto); font-size: clamp(16px, 1.6vw, 18px); }
.dgi-texto strong { color: var(--titulo); font-weight: 700; }
.dgi-acciones { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.dgi-acciones .boton { border-radius: var(--radio-md); }
/* La explicación va justificada; con guiones automáticos (lang="es") no quedan huecos grandes. */
.dgi-texto p:not(.dgi-nota) { align-self: stretch; text-align: justify; hyphens: auto; -webkit-hyphens: auto; }
.dgi-texto .dgi-nota { color: var(--tenue); font-size: 13px; line-height: 18px; }

.dgi-tope {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; gap: 16px; padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radio-xl); background: var(--tarjeta); box-shadow: var(--sombra-flotante);
}
.dgi-tope::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--primario), var(--verde)); }
.dgi-tope-titulo { color: var(--titulo); font-size: 22px; font-weight: 800; line-height: 28px; letter-spacing: -.015em; }
.dgi-tope-entrada, .dgi-tope-pie { color: var(--suave); font-size: 15px; line-height: 22px; }
.dgi-tope strong { color: var(--titulo); }
.dgi-topes { display: grid; gap: 12px; }
.dgi-topes li { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radio-md); background: var(--tarjeta-baja); color: var(--texto); font-size: 16px; line-height: 22px; }
.dgi-topes strong { font-size: 20px; font-weight: 800; letter-spacing: -.01em; }
.dgi-tope-icono { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: var(--radio-md); background: var(--azul-suave); color: var(--primario-texto); }
.dgi-topes li + li .dgi-tope-icono { background: var(--verde-suave); color: var(--verde-texto); }
.dgi-tope-pie { padding-top: 16px; border-top: 1px dashed var(--borde-fuerte); }

.dgi-incluye { display: grid; gap: 20px; margin-top: clamp(40px, 6vw, 64px); }
.dgi-incluye .tarjeta { padding: 24px; }
.dgi-incluye .tarjeta h3 { font-size: 17px; }

.dgi-pasos { display: grid; gap: 12px; margin-top: 24px; padding: clamp(20px, 3vw, 28px); border-radius: var(--radio-lg); background: var(--tarjeta); box-shadow: var(--sombra-tarjeta); }
.dgi-pasos li { display: flex; align-items: flex-start; gap: 14px; }
.dgi-paso-numero { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--primario-hondo); color: var(--sobre-primario); font-size: 15px; font-weight: 700; }
.dgi-pasos h3 { font-size: 16px; font-weight: 700; line-height: 22px; }
.dgi-pasos p { color: var(--suave); font-size: 14px; line-height: 20px; }

/* Pasos */
.pasos { display: grid; gap: 24px; counter-reset: none; }
.pasos li { display: flex; flex-direction: column; gap: 12px; padding: 32px; border-radius: var(--radio-lg); background: var(--tarjeta); box-shadow: var(--sombra-tarjeta); }
.paso-numero { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; border-radius: 50%; background: var(--primario-hondo); color: var(--sobre-primario); font-size: 18px; font-weight: 700; box-shadow: 0 4px 10px rgba(0, 71, 204, .25); }
.pasos h3 { font-size: 22px; font-weight: 700; line-height: 28px; letter-spacing: -.015em; }
.pasos p { color: var(--suave); font-size: 15px; line-height: 22px; }
.paso-chip { display: flex; align-items: center; gap: 12px; margin-top: auto; padding: 16px; border-radius: var(--radio-md); font-size: 13px; font-weight: 600; line-height: 18px; }
.pasos li > p { margin-bottom: 20px; }
.paso-chip.tono-azul { background: var(--tarjeta-baja); color: var(--titulo); }
.paso-chip.tono-azul svg { color: var(--primario-texto); }
.paso-chip.tono-verde { background: var(--verde-suave); color: var(--verde-texto); }
.paso-chip.tono-yappy { background: var(--yappy-suave); color: var(--yappy-texto); }

/* Panamá y países */
.panama { display: flex; flex-direction: column; gap: 24px; padding: clamp(28px, 5vw, 48px); border-radius: var(--radio-xl); background: linear-gradient(135deg, var(--tarjeta-baja), var(--fondo-gris)); box-shadow: 0 4px 24px rgba(11, 19, 43, .04); }
.panama-texto { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; max-width: 720px; }
.chip-azul { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--azul-suave); color: var(--primario-texto); font-size: 12px; font-weight: 700; line-height: 16px; }
.panama p { color: var(--suave); font-size: clamp(16px, 1.6vw, 18px); }
.chips { display: flex; flex-wrap: wrap; gap: 12px; padding-bottom: 12px; }
.chips li { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-radius: 999px; background: var(--tarjeta); color: var(--titulo); font-size: 14px; font-weight: 700; line-height: 20px; box-shadow: 0 1px 2px rgba(11, 19, 43, .06); }
.chips .punto { width: 10px; height: 10px; }
.chips .verde { color: var(--verde-texto); }
.chips .yappy { background: var(--yappy-suave); color: var(--yappy-texto); }
.chips .ambar { color: var(--ambar-texto); }
.etiqueta-fuerte { color: var(--titulo); font-size: 14px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.paises { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: -8px; }
.paises li { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px; border-radius: var(--radio-md); background: var(--tarjeta); color: var(--titulo); font-size: 15px; font-weight: 600; line-height: 20px; box-shadow: 0 1px 2px rgba(11, 19, 43, .04); transition: background-color var(--transicion); }
.paises li:hover { background: var(--azul-suave); }
.paises abbr { flex: none; display: grid; place-items: center; width: 28px; height: 20px; border-radius: 4px; background: var(--fondo-gris); color: var(--suave); font-size: 10px; font-weight: 700; letter-spacing: .04em; }

/* Planes */
.planes { display: grid; gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; padding: 24px; border-radius: var(--radio-lg); background: var(--tarjeta); box-shadow: 0 2px 8px rgba(11, 19, 43, .03); }
:root[data-theme="oscuro"] .plan { box-shadow: var(--sombra-tarjeta); }
.plan-nombre { font-size: 18px; font-weight: 700; line-height: 24px; letter-spacing: -.01em; }
.plan-lema { margin-top: 2px; color: var(--suave); font-size: 13px; line-height: 18px; }
.plan-precio { display: flex; flex-direction: column; padding-top: 16px; }
.plan-precio strong { color: var(--titulo); font-size: 34px; font-weight: 800; line-height: 44px; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.plan-precio span { color: var(--suave); font-size: 13px; line-height: 18px; }
.plan-lista { display: grid; gap: 10px; padding-top: 16px; margin-bottom: 24px; color: var(--titulo); font-size: 13px; line-height: 18px; }
.plan-lista li { display: flex; align-items: flex-start; gap: 8px; }
.plan-lista li::before { content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px; background: var(--verde); -webkit-mask: var(--marca-check) center / contain no-repeat; mask: var(--marca-check) center / contain no-repeat; }
.plan-lista li.info { color: var(--suave); }
.plan-lista li.info::before { background: var(--tenue); -webkit-mask-image: var(--marca-info); mask-image: var(--marca-info); }
:root {
  --marca-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7'/%3E%3C/svg%3E");
  --marca-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 8h.01'/%3E%3C/svg%3E");
}
.plan-boton { width: 100%; margin-top: auto; }
.plan-prueba { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; margin-top: 10px; padding: 4px 10px; border-radius: 999px; background: var(--verde-suave); color: var(--verde-texto); font-size: 13px; font-weight: 700; line-height: 18px; }
.plan-prueba svg { flex: none; }
.plan-prueba[hidden], .planes-nota[hidden] { display: none; }
.planes-nota { max-width: 720px; margin: 24px auto 0; color: var(--suave); font-size: 14px; line-height: 21px; text-align: center; }
.planes-nota strong { color: var(--titulo); }
.plan.destacado { border-top: 4px solid var(--primario); box-shadow: 0 8px 30px rgba(21, 93, 252, .15); }
:root[data-theme="oscuro"] .plan.destacado { box-shadow: 0 0 0 1px var(--azul-claro), 0 8px 30px rgba(21, 93, 252, .25); }
.plan.destacado .plan-nombre { color: var(--primario-texto); }
.plan.destacado .plan-lista li:first-child { font-weight: 600; }
.plan-insignia { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); padding: 2px 12px; border-radius: 999px; background: var(--primario-hondo); color: var(--sobre-primario); font-size: 11px; font-weight: 700; line-height: 18px; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }

/* Preguntas: acordeón nativo, utilizable sin JavaScript. */
.preguntas { max-width: 860px; }
.acordeon { display: grid; gap: 12px; }
details { border-radius: var(--radio-md); background: var(--tarjeta); box-shadow: 0 1px 2px rgba(11, 19, 43, .05); overflow: hidden; }
:root[data-theme="oscuro"] details { box-shadow: var(--sombra-tarjeta); }
summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; list-style: none; cursor: pointer; color: var(--titulo); font-size: 17px; font-weight: 600; line-height: 24px; letter-spacing: -.01em; transition: background-color var(--transicion); }
summary:hover { background: var(--tarjeta-baja); }
summary:focus-visible { border-radius: var(--radio-md); }
summary::-webkit-details-marker { display: none; }
.chev { position: relative; flex: none; width: 20px; height: 20px; color: var(--primario-texto); transition: transform .2s ease; }
.chev::before, .chev::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 2px; border-radius: 1px; background: currentColor; transform: translate(-50%, -50%); }
.chev::after { transform: translate(-50%, -50%) rotate(90deg); }
details[open] .chev { transform: rotate(45deg); }
.respuesta { display: grid; gap: 8px; padding: 4px 20px 20px; color: var(--suave); font-size: 15px; line-height: 22px; }
.respuesta a { text-decoration: underline; }

/* Cierre */
.final { padding-bottom: clamp(56px, 8vw, 96px); }
.cierre {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; align-items: center; gap: 16px;
  padding: clamp(40px, 7vw, 64px) clamp(24px, 5vw, 64px);
  border-radius: var(--radio-xl);
  background: linear-gradient(135deg, var(--primario), var(--primario-hondo) 55%, #164db2);
  color: var(--sobre-primario); text-align: center;
  box-shadow: 0 20px 50px rgba(21, 93, 252, .25);
}
.cierre::before, .cierre::after { content: ""; position: absolute; z-index: -1; width: 320px; height: 320px; border-radius: 50%; filter: blur(64px); pointer-events: none; }
.cierre::before { top: -96px; left: -96px; background: var(--verde-brillo); opacity: .2; }
.cierre::after { bottom: -96px; right: -96px; background: #ffffff; opacity: .15; }
.cierre-logo { display: grid; place-items: center; width: 80px; height: 80px; margin-bottom: 8px; padding: 12px; border-radius: var(--radio-lg); background: rgba(255, 255, 255, .15); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); box-shadow: 0 4px 12px rgba(0, 0, 0, .1); }
.cierre-logo img { width: auto; height: 52px; object-fit: contain; }
.cierre h2 { max-width: 16em; color: var(--sobre-primario); font-size: clamp(28px, 4vw, 40px); font-weight: 800; line-height: 1.2; }
.cierre-entrada { max-width: 30em; color: var(--sobre-primario-suave); font-size: clamp(16px, 1.6vw, 18px); line-height: 1.55; }
.cierre .boton { margin-top: 8px; border-radius: var(--radio-md); }
.cierre-nota { color: var(--sobre-primario-suave); font-size: 13px; }

/* Pie */
.pie { padding-block: clamp(48px, 6vw, 64px) 32px; background: var(--fondo-gris); }
.pie-rejilla { display: grid; gap: 40px; padding-bottom: 40px; }
.pie-marca { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; }
.pie-marca p { max-width: 24rem; color: var(--suave); font-size: 15px; line-height: 22px; }
.hecho { display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; border-radius: 999px; background: var(--tarjeta); color: var(--suave); font-size: 12px; font-weight: 600; line-height: 16px; box-shadow: 0 1px 4px rgba(0, 0, 0, .03); }
.pie-columna { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.pie-titulo { margin-bottom: 8px; color: var(--titulo); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.pie-columna a { display: inline-flex; align-items: center; min-height: 32px; color: var(--suave); font-size: 14px; transition: color var(--transicion); }
.pie-columna a:hover { color: var(--primario-texto); }
.pie-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; padding-top: 24px; border-top: 1px solid var(--borde); color: var(--suave); font-size: 13px; }
.pie-sellos { display: flex; flex-wrap: wrap; gap: 8px; }
.pie-sellos span { padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.sello-yappy { background: var(--yappy-suave); color: var(--yappy-texto); }
.sello-itbms { background: var(--verde-suave); color: var(--verde-texto); }

/* Pantallas medianas y grandes */
@media (min-width: 560px) {
  .paises { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 768px) {
  .funciones { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgi-incluye { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dgi-pasos { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .pasos { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .planes { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .paises { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pie-rejilla { grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .funciones { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dgi-rejilla { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 56px; }
  .dgi-incluye, .dgi-pasos { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  /* Una columna por plan visible: si el catálogo oculta alguno, el resto ocupa el ancho. */
  .planes { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
  .plan.destacado { transform: translateY(-8px); }
  .paises { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .barra-enlaces { display: flex; }
}

/* Con cinco enlaces, entre 1024 y 1359 px se aprietan, «Preguntas frecuentes» se acorta y, hasta
   1179 px, «Cómo funciona» (también en el pie) se esconde para que no se desborde la barra. */
@media (min-width: 1024px) and (max-width: 1359px) {
  .barra-nav { gap: 12px; }
  .barra-enlaces { gap: 0; }
  .barra-enlaces a { padding-inline: 9px; font-size: 13.5px; }
  .barra-enlaces .enlace-largo { display: none; }
}
@media (min-width: 1024px) and (max-width: 1179px) {
  .barra-enlaces .enlace-opcional { display: none; }
}

/* Celulares: la barra conserva marca, modo, entrar y crear cuenta. */
@media (max-width: 559px) {
  .barra-nav { height: 64px; gap: 8px; }
  .barra-acciones { gap: 4px; }
  .barra-acciones .boton { padding-inline: 12px; }
  .barra .marca-palabra { display: none !important; }
  .oferta .boton { width: 100%; }
  .dgi-acciones .boton { flex: 1 1 100%; white-space: normal; }
}

@media (max-width: 379px) {
  .barra-acciones .entrar { padding-inline: 8px; }
  .barra-acciones .barra-crear { padding-inline: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .pc-reveal { opacity: 1; transform: none; }
}
