/* LatinosCPA — sistema de diseño de marca (vanilla, mobile-first).
   Paleta oficial (Web Archive): crecimiento #7CC142 · acción #2FA35C ·
   contraste #1F5C7C · footer #2B2B2B. Tipografía: Titillium Web. */
:root {
  --green:    #7CC142;   /* crecimiento, íconos, acentos */
  --emerald:  #2FA35C;   /* botones de acción / login */
  --emerald-d:#268a4d;
  --navy:     #1F5C7C;   /* navbar, bordes, contraste */
  --navy-d:   #17475f;
  --ink:      #0d1b24;   /* encabezados (negro azulado) */
  --body:     #33434d;   /* texto de párrafo */
  --muted:    #6b7c86;
  --line:     #e4eaee;
  --bg:       #ffffff;
  --bg-soft:  #f4f7f9;   /* gris muy claro para secciones */
  --footer:   #2b2b2b;
  --ok:       #2FA35C;
  --warn:     #e8a13a;
  --danger:   #d9534f;
  --radius:   14px;
  --shadow:   0 10px 30px rgba(31,92,124,.10);
  --shadow-sm:0 2px 10px rgba(31,92,124,.08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: "Titillium Web", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--body);
  background: var(--bg);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--emerald); text-decoration: none; }
.hidden { display: none !important; }
h1, h2, h3 { color: var(--ink); font-weight: 700; line-height: 1.2; }
.brand-word { color: var(--emerald); }
.brand-word.alt { color: var(--green); }

/* ── Botones ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: inherit; font-weight: 700; font-size: 16px; cursor: pointer;
  border: 0; border-radius: 999px; padding: 13px 26px; transition: .18s ease;
  background: var(--emerald); color: #fff; box-shadow: 0 6px 16px rgba(47,163,92,.28);
}
.btn:hover { background: var(--emerald-d); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn.block { width: 100%; }
.btn.small { padding: 8px 16px; font-size: 14px; box-shadow: none; }
.btn.ghost { background: transparent; color: var(--navy); box-shadow: none; border: 1.5px solid var(--line); }
.btn.ghost:hover { background: var(--bg-soft); border-color: var(--navy); }
.btn.navy { background: var(--navy); box-shadow: 0 6px 16px rgba(31,92,124,.25); }
.btn.navy:hover { background: var(--navy-d); }

/* ── Navbar de marketing ─────────────────────────────────── */
.mkt-nav {
  position: sticky; top: 0; z-index: 30; background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px clamp(16px, 5vw, 48px);
}
.mkt-nav .logo { display: flex; align-items: center; gap: 9px; font-weight: 900; font-size: 22px; color: var(--navy); letter-spacing: -.3px; }
.mkt-nav .logo b { color: var(--green); }
.isotype { flex: 0 0 auto; display: block; }
.mkt-nav .links { display: flex; align-items: center; gap: clamp(10px, 3vw, 30px); }
.mkt-nav .links a { color: var(--navy); font-weight: 700; font-size: 15px; }
.mkt-nav .links a:hover { color: var(--emerald); }
/* Tap targets de la navbar: mínimo 44px de alto (accesibilidad táctil) */
.mkt-nav .links .btn { min-height: 44px; }

/* ── Hero ────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(180deg, #ffffff 0%, var(--bg-soft) 100%);
  padding: clamp(40px, 8vw, 84px) clamp(16px, 5vw, 48px) clamp(32px, 6vw, 64px);
  display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(24px, 5vw, 56px);
  align-items: center; max-width: 1180px; margin: 0 auto;
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px;
  color: var(--emerald-d); background: rgba(124,193,66,.14); border: 1px solid rgba(124,193,66,.3);
  padding: 6px 14px; border-radius: 999px; margin-bottom: 18px; text-transform: uppercase; letter-spacing: .5px;
}
.hero h1 { font-size: clamp(30px, 5.2vw, 52px); font-weight: 900; letter-spacing: -1px; }
.hero p.sub { font-size: clamp(16px, 2.2vw, 20px); color: var(--body); margin: 16px 0 26px; max-width: 34ch; }
.hero .cta-row { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .trust { margin-top: 22px; display: flex; gap: 20px; flex-wrap: wrap; color: var(--muted); font-size: 14px; font-weight: 600; }
.hero .trust b { color: var(--navy); font-weight: 900; font-size: 18px; display: block; }

/* Widget central (login / registro) */
.widget {
  background: #fff; border: 1px solid var(--line); border-radius: 18px;
  box-shadow: var(--shadow); padding: clamp(22px, 4vw, 34px);
}
.widget .wtitle { font-size: 22px; font-weight: 900; margin-bottom: 4px; }
.widget .wsub { color: var(--muted); font-size: 14px; margin-bottom: 18px; }

/* ── Franja de features ──────────────────────────────────── */
.features { max-width: 1180px; margin: 0 auto; padding: clamp(28px,5vw,56px) clamp(16px,5vw,48px);
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 22px;
  background: rgba(124,193,66,.14); color: var(--emerald-d); margin-bottom: 12px; }
.feature h3 { font-size: 17px; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 14px; }

/* ── Footer ──────────────────────────────────────────────── */
.mkt-footer { background: var(--footer); color: #fff; padding: 40px 16px 28px; text-align: center; }
.mkt-footer .logo { font-weight: 900; font-size: 20px; margin-bottom: 6px; }
.mkt-footer .logo b { color: var(--green); }
.mkt-footer p { color: #b9b9b9; font-size: 13px; max-width: 46ch; margin: 0 auto 18px; }
.mkt-footer .social { display: flex; gap: 14px; justify-content: center; margin-bottom: 18px; }
.mkt-footer .social a {
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; transition: .18s;
}
.mkt-footer .social a:hover { background: var(--emerald); }
.mkt-footer .social svg { width: 18px; height: 18px; fill: currentColor; }
.mkt-footer .copy { color: #8a8a8a; font-size: 12px; border-top: 1px solid rgba(255,255,255,.1); padding-top: 16px; }

/* ── Formularios ─────────────────────────────────────────── */
label { display: block; font-size: 13px; font-weight: 700; color: var(--navy); margin: 12px 0 5px; }
input, select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 16px; color: var(--ink); background: #fff; transition: .15s;
}
input:focus, select:focus { outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(47,163,92,.14); }

/* ── App / dashboard ─────────────────────────────────────── */
.wrap { max-width: 640px; margin: 0 auto; padding: 16px 14px 88px; }
header.app {
  position: sticky; top: 0; z-index: 20; background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px clamp(14px, 4vw, 20px);
}
header.app .logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 900; letter-spacing: -.2px; }
header.app .logo b { color: var(--green); }
header.app .who { display: flex; align-items: center; gap: 10px; font-size: 13px; }
header.app .who .chip { background: rgba(255,255,255,.16); color: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 700; }
header.app button { background: rgba(255,255,255,.16); color: #fff; border: 0; border-radius: 8px; padding: 6px 12px; font-size: 13px; font-weight: 700; cursor: pointer; }

nav.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 20; background: #fff;
  border-top: 1px solid var(--line); display: flex; justify-content: space-around;
  padding: 6px 0 max(6px, env(safe-area-inset-bottom)); box-shadow: 0 -4px 16px rgba(31,92,124,.06);
}
nav.tabs button { background: none; border: 0; font-family: inherit; font-size: 12px; font-weight: 600; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 12px; cursor: pointer; }
nav.tabs button .ico { font-size: 20px; line-height: 1; }
nav.tabs button.active { color: var(--emerald); font-weight: 700; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); }
.h1 { font-size: 20px; font-weight: 900; margin-bottom: 10px; color: var(--ink); }
.h2 { font-size: 16px; font-weight: 700; margin-bottom: 8px; color: var(--ink); }
.muted { color: var(--muted); font-size: 13px; }
.chip { display: inline-block; background: rgba(124,193,66,.14); color: var(--emerald-d); border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; }
.chip.cycle { background: rgba(31,92,124,.10); color: var(--navy); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mt { margin-top: 12px; }
.center { text-align: center; }
.big { font-size: 26px; font-weight: 900; }

.balance { text-align: center; padding: 14px 6px; border-radius: 12px; background: var(--bg-soft); border: 1px solid var(--line); }
.balance .amt { font-size: 19px; font-weight: 900; color: var(--ink); }
.balance .lbl { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.balance.avail { background: rgba(47,163,92,.10); border-color: rgba(47,163,92,.3); }
.balance.avail .amt { color: var(--emerald-d); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .3px; padding: 8px 6px; border-bottom: 2px solid var(--line); }
td { padding: 9px 6px; border-bottom: 1px solid var(--line); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

.linkbox { background: var(--bg-soft); border: 1px dashed var(--navy); border-radius: 10px; padding: 12px;
  font-family: ui-monospace, Menlo, monospace; font-size: 13px; word-break: break-all; margin: 10px 0; color: var(--navy); }
.status-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.status-dot.ok { background: var(--ok); }
.status-dot.warn { background: var(--warn); }

#toast { position: fixed; bottom: 84px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 11px 20px; border-radius: 10px; font-size: 14px; font-weight: 600; z-index: 50; max-width: 92%; text-align: center;
  box-shadow: var(--shadow); }
#toast.err { background: var(--danger); }

/* ── Responsive ──────────────────────────────────────────── */
/* En pantallas muy chicas, el logo colapsa a [isotipo] CPA para dar aire a los
   botones de conversión (Sign up / Login) sin saltos de línea. */
@media (max-width: 400px) {
  .logo .wordmark { display: none; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; text-align: center; padding-top: 32px; }
  .hero .cta-row, .hero .trust { justify-content: center; }
  .hero p.sub { margin-left: auto; margin-right: auto; }
  .features { grid-template-columns: 1fr; }
  .mkt-nav .links a.hide-sm { display: none; }
}

/* ══════════ Expansión de la home (secciones honestas) ══════════ */
/* Menú hamburguesa móvil */
.mkt-nav .hamb { display: none; background: none; border: 0; font-size: 26px; color: var(--navy); cursor: pointer; line-height: 1; }
@media (max-width: 760px) {
  .mkt-nav { flex-wrap: wrap; }
  .mkt-nav .hamb { display: block; }
  .mkt-nav .links { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding-top: 12px; }
  .mkt-nav .links.open { display: flex; }
  .mkt-nav .links a { padding: 8px 2px; border-bottom: 1px solid var(--line); }
  .mkt-nav .links a.hide-sm { display: block; }
  .mkt-nav .links .btn { width: 100%; }
}

/* Secciones genéricas */
.section { max-width: 1120px; margin: 0 auto; padding: clamp(36px,6vw,68px) clamp(16px,5vw,48px); }
.section.soft { background: var(--bg-soft); max-width: none; }
.section.soft > .inner { max-width: 1120px; margin: 0 auto; }
.section .kicker { text-align: center; color: var(--emerald-d); font-weight: 700; text-transform: uppercase; letter-spacing: .6px; font-size: 13px; margin-bottom: 8px; }
.section h2 { text-align: center; font-size: clamp(24px,3.6vw,36px); font-weight: 900; margin-bottom: 10px; }
.section .lead { text-align: center; color: var(--muted); max-width: 60ch; margin: 0 auto 34px; }

/* Cómo funciona — pasos */
.steps { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; }
.step { text-align: center; }
.step .n { width: 54px; height: 54px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; font-size: 24px;
  background: rgba(124,193,66,.14); color: var(--emerald-d); font-weight: 900; border: 2px solid rgba(124,193,66,.35); }
.step h3 { font-size: 17px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 14px; }

/* Categorías */
.cats { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }
.cat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.cat .emoji { font-size: 28px; } .cat h3 { margin: 8px 0 4px; } .cat p { color: var(--muted); font-size: 14px; }

/* Pagos */
.pays { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 760px; margin: 0 auto; }
.pay { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); text-align: center; }
.pay .badge { font-weight: 900; font-size: 18px; color: var(--navy); }
.pay .badge .u { color: var(--green); }
.pay p { color: var(--muted); font-size: 14px; margin-top: 6px; }
.pay-note { text-align: center; color: var(--muted); font-size: 14px; margin-top: 18px; }

/* Sub-afiliados */
.subs-box { max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow-sm); text-align: center; }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 16px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; color: var(--ink); padding: 14px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--emerald); font-size: 22px; font-weight: 900; }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); font-size: 14px; padding: 0 0 14px; }

/* CTA final */
.cta-final { background: linear-gradient(135deg, var(--navy) 0%, var(--emerald-d) 100%); color: #fff; text-align: center; padding: clamp(40px,7vw,72px) 20px; }
.cta-final h2 { color: #fff; font-size: clamp(24px,4vw,38px); font-weight: 900; }
.cta-final p { color: rgba(255,255,255,.85); max-width: 46ch; margin: 12px auto 24px; }
.cta-final .btn { background: #fff; color: var(--emerald-d); }
.cta-final .btn:hover { background: #f0f0f0; }

/* Footer con columnas */
.mkt-footer .fcols { max-width: 1120px; margin: 0 auto 24px; display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 28px; text-align: left; }
.mkt-footer .fcols h4 { color: #fff; font-size: 14px; margin-bottom: 12px; text-transform: uppercase; letter-spacing: .5px; }
.mkt-footer .fcols a { display: block; color: #b9b9b9; font-size: 14px; padding: 4px 0; }
.mkt-footer .fcols a:hover { color: var(--green); }
.mkt-footer .fcols .about p { color: #b9b9b9; font-size: 13px; margin-top: 8px; }

@media (max-width: 860px) {
  .steps, .cats { grid-template-columns: 1fr 1fr; }
  .pays { grid-template-columns: 1fr; }
  .mkt-footer .fcols { grid-template-columns: 1fr 1fr; gap: 20px; }
}
@media (max-width: 480px) { .steps, .cats, .mkt-footer .fcols { grid-template-columns: 1fr; } }
