/*
 * contas.cr — landing + centro de ayuda (borrador)
 * Sistema de estilos autocontenido. Paleta y logo tomados de la marca real
 * (contascr-web: tokens.css + components/logo). Sin dependencias externas.
 */

:root {
  /* marca */
  --cyan: #06b6d4;
  --sky: #0ea5e9;
  --emerald: #10b981;
  --navy: #1e3a5f;
  --sky-light: #38bdf8;

  /* slate scale */
  --slate-50: #f8fafc;
  --slate-100: #f1f5f9;
  --slate-200: #e2e8f0;
  --slate-300: #cbd5e1;
  --slate-400: #94a3b8;
  --slate-500: #64748b;
  --slate-600: #475569;
  --slate-700: #334155;
  --slate-800: #1e293b;
  --slate-900: #0f172a;

  --danger: #ef4444;
  --warning: #f59e0b;

  /* semánticos (claro) */
  --bg: var(--slate-50);
  --surface: #ffffff;
  --surface-2: var(--slate-100);
  --border: var(--slate-200);
  --text: var(--slate-800);
  --text-secondary: var(--slate-500);
  --heading: var(--navy);

  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 18px 40px -12px rgba(15, 23, 42, 0.22);
  --gradient: linear-gradient(120deg, var(--cyan), var(--sky) 55%, var(--emerald));
  --max: 1140px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: var(--slate-900);
    --surface: var(--slate-800);
    --surface-2: #0b1220;
    --border: var(--slate-700);
    --text: var(--slate-100);
    --text-secondary: var(--slate-400);
    --heading: #ffffff;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { color: var(--heading); line-height: 1.2; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.5rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1rem; }
a { color: var(--sky); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5.5rem 0; }
.center { text-align: center; }
.muted { color: var(--text-secondary); }
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--sky);
  background: color-mix(in srgb, var(--sky) 12%, transparent);
  padding: 0.35rem 0.8rem; border-radius: 999px; margin-bottom: 1rem;
}
.lead { font-size: 1.2rem; color: var(--text-secondary); max-width: 42rem; }
.center .lead { margin-left: auto; margin-right: auto; }

/* ── logo (4 barras + wordmark) ───────────────────────────── */
.logo { display: inline-flex; align-items: center; gap: 0.55rem; text-decoration: none; }
.logo .bars { display: flex; align-items: flex-end; gap: 3px; height: 26px; }
.logo .bar { width: 5px; border-radius: 3px; background: var(--gradient); }
.logo .bar:nth-child(1) { height: 45%; }
.logo .bar:nth-child(2) { height: 70%; }
.logo .bar:nth-child(3) { height: 100%; }
.logo .bar:nth-child(4) { height: 60%; }
.logo .word { font-weight: 800; font-size: 1.25rem; letter-spacing: -0.02em; color: var(--heading); }
.logo .word .dot { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ── nav ──────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(10px);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.nav .inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.nav .links { display: flex; align-items: center; gap: 1.6rem; }
.nav .links a { color: var(--text-secondary); font-weight: 500; font-size: 0.95rem; }
.nav .links a:hover { color: var(--heading); text-decoration: none; }
@media (max-width: 800px) { .nav .links a.hide-sm { display: none; } }

/* ── botones ──────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer;
  font-weight: 600; font-size: 0.98rem; padding: 0.7rem 1.25rem;
  border-radius: var(--radius); border: 1px solid transparent;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--gradient); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { box-shadow: var(--shadow-lg); color: #fff; }
.btn-ghost { background: transparent; color: var(--heading); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); color: var(--heading); }
.btn-lg { padding: 0.95rem 1.6rem; font-size: 1.05rem; }

/* ── hero ─────────────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; padding: 5rem 0 4rem; }
.hero::before {
  content: ""; position: absolute; inset: -40% 0 auto 0; height: 80%;
  background: radial-gradient(60% 60% at 50% 0%, color-mix(in srgb, var(--sky) 18%, transparent), transparent 70%);
  pointer-events: none;
}
.hero .grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 3rem; align-items: center; }
@media (max-width: 900px) { .hero .grid { grid-template-columns: 1fr; } }
.hero h1 .grad { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-cta { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1.6rem; }
.hero-note { margin-top: 1.1rem; font-size: 0.9rem; color: var(--text-secondary); }

/* mockup del producto */
.mock {
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface); box-shadow: var(--shadow-lg); overflow: hidden;
}
.mock .bar-top { display: flex; align-items: center; gap: 6px; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.mock .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--slate-300); }
.mock .body { padding: 1.1rem; display: grid; gap: 0.7rem; }
.mock .row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 0.6rem 0.8rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); }
.mock .pill { font-size: 0.75rem; font-weight: 700; padding: 0.2rem 0.6rem; border-radius: 999px; }
.pill-ok { color: var(--emerald); background: color-mix(in srgb, var(--emerald) 14%, transparent); }
.pill-warn { color: var(--warning); background: color-mix(in srgb, var(--warning) 16%, transparent); }
.pill-info { color: var(--sky); background: color-mix(in srgb, var(--sky) 14%, transparent); }
.mock .amount { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--heading); }

/* ── strip de stats ───────────────────────────────────────── */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.stat { text-align: center; }
.stat .n { font-size: 2.2rem; font-weight: 800; color: var(--heading); }
.stat .l { font-size: 0.9rem; color: var(--text-secondary); }

/* ── grid de features ─────────────────────────────────────── */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
@media (max-width: 900px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .cards { grid-template-columns: 1fr; } }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 1.6rem; box-shadow: var(--shadow-sm); transition: transform 150ms ease, box-shadow 150ms ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .ico {
  width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: color-mix(in srgb, var(--sky) 12%, transparent); color: var(--sky); margin-bottom: 1rem;
}
.card .ico svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: 0.35rem; }
.card p { margin: 0; color: var(--text-secondary); font-size: 0.97rem; }

/* ── pasos ────────────────────────────────────────────────── */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2rem; counter-reset: step; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; padding: 1.4rem; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gradient); color: #fff; font-weight: 800; margin-bottom: 0.8rem;
}
.step h3 { font-size: 1.05rem; }
.step p { margin: 0; color: var(--text-secondary); font-size: 0.95rem; }

/* ── bloque destacado (el reporte) ────────────────────────── */
.feature-split { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
@media (max-width: 880px) { .feature-split { grid-template-columns: 1fr; } }
.checklist { list-style: none; padding: 0; margin: 1.2rem 0 0; display: grid; gap: 0.7rem; }
.checklist li { display: flex; gap: 0.7rem; align-items: flex-start; }
.checklist .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; background: color-mix(in srgb, var(--emerald) 16%, transparent); color: var(--emerald); display: grid; place-items: center; margin-top: 2px; }
.checklist .tick svg { width: 13px; height: 13px; }

.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.4rem; box-shadow: var(--shadow); }
.panel h4 { margin: 0 0 0.9rem; color: var(--heading); }
.qa { display: grid; gap: 0.6rem; }
.qa .item { display: flex; gap: 0.7rem; align-items: flex-start; padding: 0.7rem 0.8rem; border-radius: var(--radius); border-left: 3px solid var(--border); background: var(--bg); }
.qa .item.err { border-left-color: var(--danger); }
.qa .item.warn { border-left-color: var(--warning); }
.qa .item.info { border-left-color: var(--sky); }
.qa .item small { color: var(--text-secondary); display: block; }

/* ── bandas / fondos alternos ─────────────────────────────── */
.band { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.band-grad { background: linear-gradient(160deg, color-mix(in srgb, var(--navy) 96%, black), var(--navy)); color: #fff; }
.band-grad h2, .band-grad h3 { color: #fff; }
.band-grad .muted { color: var(--slate-300); }

/* ── precios ──────────────────────────────────────────────── */
.prices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; align-items: stretch; }
@media (max-width: 860px) { .prices { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; } }
.price { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 1.8rem; display: flex; flex-direction: column; }
.price.featured { border-color: var(--sky); box-shadow: var(--shadow-lg); position: relative; }
.price.featured::after { content: "Recomendado"; position: absolute; top: -12px; right: 1.2rem; background: var(--gradient); color: #fff; font-size: 0.72rem; font-weight: 700; padding: 0.25rem 0.7rem; border-radius: 999px; }
.price .amt { font-size: 2.4rem; font-weight: 800; color: var(--heading); margin: 0.4rem 0; }
.price .amt span { font-size: 1rem; font-weight: 500; color: var(--text-secondary); }
.price ul { list-style: none; padding: 0; margin: 1rem 0 1.4rem; display: grid; gap: 0.5rem; }
.price ul li { font-size: 0.95rem; color: var(--text-secondary); padding-left: 1.5rem; position: relative; }
.price ul li::before { content: "✓"; position: absolute; left: 0; color: var(--emerald); font-weight: 800; }
.price .btn { margin-top: auto; justify-content: center; }

/* ── faq / acordeón ───────────────────────────────────────── */
.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 0.8rem; }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.3rem 1.1rem; }
.faq summary { cursor: pointer; font-weight: 600; color: var(--heading); padding: 0.9rem 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(--sky); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 1rem; color: var(--text-secondary); }

/* ── cta final ────────────────────────────────────────────── */
.cta-final { text-align: center; }
.cta-final .btn { margin: 0.4rem; }

/* ── footer ───────────────────────────────────────────────── */
.footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 0 2rem; }
.footer .cols { display: grid; grid-template-columns: 1.5fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }
.footer h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-secondary); }
.footer a { display: block; color: var(--text-secondary); font-size: 0.95rem; padding: 0.2rem 0; }
.footer a:hover { color: var(--heading); text-decoration: none; }
.footer .bottom { margin-top: 2.4rem; padding-top: 1.4rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.6rem; color: var(--text-secondary); font-size: 0.88rem; }

/* ── centro de ayuda ──────────────────────────────────────── */
.help-hero { padding: 3.5rem 0 2.5rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.search-box { display: flex; gap: 0.5rem; max-width: 520px; margin: 1.4rem auto 0; }
.search-box input { flex: 1; padding: 0.8rem 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg); color: var(--text); font-size: 1rem; }
.help-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.3rem; }
@media (max-width: 900px) { .help-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .help-grid { grid-template-columns: 1fr; } }

.toc { position: sticky; top: 80px; align-self: start; display: grid; gap: 0.3rem; }
.toc a { color: var(--text-secondary); font-size: 0.92rem; padding: 0.3rem 0.6rem; border-left: 2px solid var(--border); }
.toc a:hover { color: var(--heading); border-left-color: var(--sky); text-decoration: none; }
.doc-layout { display: grid; grid-template-columns: 220px 1fr; gap: 3rem; }
@media (max-width: 860px) { .doc-layout { grid-template-columns: 1fr; } .toc { position: static; } }
.doc h2 { margin-top: 2.5rem; padding-top: 0.5rem; }
.doc h3 { margin-top: 1.8rem; }
.doc ol, .doc ul { color: var(--text-secondary); }
.doc li { margin-bottom: 0.4rem; }
.note { border-left: 3px solid var(--sky); background: color-mix(in srgb, var(--sky) 7%, transparent); padding: 0.9rem 1.1rem; border-radius: 0 var(--radius) var(--radius) 0; margin: 1.2rem 0; }
.note.warn { border-left-color: var(--warning); background: color-mix(in srgb, var(--warning) 9%, transparent); }
code, .kbd { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.88em; background: var(--surface-2); padding: 0.1rem 0.4rem; border-radius: 5px; }

.glossary { display: grid; gap: 0.2rem; }
.glossary dt { font-weight: 700; color: var(--heading); margin-top: 0.9rem; }
.glossary dd { margin: 0; color: var(--text-secondary); }

.badge-soft { display: inline-block; font-size: 0.78rem; font-weight: 700; padding: 0.15rem 0.55rem; border-radius: 999px; }
