/* Factuvio - sitio público (presentación y manual) */
:root {
  --ink: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f5f6fb;
  --brand: #4338ca;
  --brand-2: #6366f1;
  --brand-dark: #1e1b4b;
  --brand-soft: #eef2ff;
  --ok: #16a34a;
}
.site { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
.site h1, .site h2, .site h3 { letter-spacing: -.02em; }
.site { --bs-link-color-rgb: 67, 56, 202; --bs-link-hover-color-rgb: 55, 48, 163; }
.site section[id] { scroll-margin-top: 76px; }

/* Botones */
.btn-brand { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.btn-brand:hover, .btn-brand:focus { background: #3730a3; border-color: #3730a3; color: #fff; }
.btn-outline-brand { border: 1.5px solid var(--brand); color: var(--brand); font-weight: 600; }
.btn-outline-brand:hover { background: var(--brand); color: #fff; }
.btn-ghost { background: #fff; border: 1.5px solid var(--line); color: var(--ink); font-weight: 600; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.link-brand { font-weight: 600; text-decoration: none; }

/* Barra superior */
.site-nav { position: sticky; top: 0; z-index: 50; background: rgba(30, 27, 75, .96); backdrop-filter: blur(8px); }
.site-nav nav { height: 64px; }
.site-nav .brand, .site-foot .brand { display: inline-flex; align-items: center; gap: .55rem; font-weight: 800; font-size: 1.25rem; color: #fff; text-decoration: none; }
.nav-links { gap: 1.6rem; margin-left: 1.5rem; }
.nav-links a, .mobile-links a { color: #c7d2fe; text-decoration: none; font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a.active { color: #fff; }
.nav-login { color: #fff !important; text-decoration: none; font-weight: 600; }
.mobile-links { display: flex; flex-direction: column; padding-bottom: .75rem; }
.mobile-links a { padding: .6rem 0; border-top: 1px solid rgba(255, 255, 255, .08); color: #e0e7ff; }

/* Portada */
.hero { background: radial-gradient(1100px 500px at 85% -10%, #e0e7ff 0%, transparent 60%), radial-gradient(800px 400px at -10% 110%, #ede9fe 0%, transparent 55%); padding: 4.5rem 0 4rem; overflow: hidden; }
.eyebrow { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--brand); }
.hero .eyebrow { background: var(--brand-soft); padding: .35rem .75rem; border-radius: 2rem; }
.hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.08; margin: 1rem 0; }
.grad { background: linear-gradient(90deg, var(--brand), #7c3aed); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero .lead { color: var(--muted); font-size: 1.15rem; max-width: 34rem; }
.hero-notes { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; margin-top: 1.2rem; font-size: .9rem; color: var(--muted); }
.hero-notes i { color: var(--ok); }

/* Maqueta del punto de venta */
.mock { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 30px 60px -20px rgba(30, 27, 75, .35); max-width: 560px; margin: 0 auto 5rem; }
.mock-bar { display: flex; align-items: center; gap: .35rem; padding: .6rem .9rem; border-bottom: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: #e2e8f0; }
.mock-bar b { margin-left: .5rem; font-weight: 600; }
.mock-body { display: grid; grid-template-columns: 1.35fr 1fr; gap: .9rem; padding: .9rem; }
.mock-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; align-content: start; }
.mock-item { border: 1px solid var(--line); border-radius: .6rem; padding: .5rem; display: flex; flex-direction: column; gap: .15rem; font-size: .72rem; }
.mock-item i { font-size: 1.1rem; color: var(--brand); background: var(--brand-soft); border-radius: .4rem; text-align: center; padding: .35rem 0; }
.mock-item b { color: var(--brand); }
.mock-cart { background: var(--bg-alt); border-radius: .7rem; padding: .7rem; font-size: .76rem; display: flex; flex-direction: column; gap: .35rem; }
.mock-line { display: flex; justify-content: space-between; gap: .5rem; }
.mock-line.muted { color: var(--muted); }
.mock-total { display: flex; justify-content: space-between; border-top: 1px dashed #cbd5e1; padding-top: .45rem; margin-top: auto; font-size: .95rem; font-weight: 700; }
.mock-pay { background: var(--ok); color: #fff; text-align: center; border-radius: .5rem; padding: .5rem; font-weight: 700; }
.mock-invoice { position: absolute; left: -1.2rem; bottom: -4.6rem; background: #fff; border: 1px solid var(--line); border-radius: .8rem; padding: .7rem .9rem; box-shadow: 0 16px 36px -12px rgba(30, 27, 75, .35); font-size: .76rem; min-width: 250px; }
.mi-head { font-size: .82rem; margin-bottom: .35rem; }
.mi-head i { color: var(--brand); }
.mi-row { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); }
.mi-row b { color: var(--ink); font-weight: 600; }
.mi-row .bi-whatsapp { color: #16a34a; }

/* Franja */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 1.1rem 0; color: var(--muted); font-weight: 500; font-size: .95rem; }
.strip i { color: var(--brand); margin-right: .3rem; }

/* Secciones */
.section { padding: 5rem 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 44rem; margin: 0 auto 3rem; }
.section h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); font-weight: 800; margin: .5rem 0 .75rem; }
.section-head p { color: var(--muted); font-size: 1.08rem; margin: 0; }
.narrow { max-width: 820px; }

.feature { height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.5rem; transition: transform .15s, box-shadow .15s; }
.feature:hover { transform: translateY(-3px); box-shadow: 0 18px 40px -22px rgba(30, 27, 75, .45); }
.f-icon { width: 46px; height: 46px; border-radius: .8rem; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-size: 1.35rem; margin-bottom: 1rem; }
.feature h3 { font-size: 1.1rem; font-weight: 700; }
.feature p { color: var(--muted); margin: 0; font-size: .96rem; }

.checks { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .8rem; }
.checks li { position: relative; padding-left: 1.9rem; color: var(--muted); }
.checks li b { color: var(--ink); }
.checks li::before { content: "\F26E"; font-family: bootstrap-icons; position: absolute; left: 0; top: -.05rem; color: var(--ok); font-size: 1.2rem; }

.sar-card { background: #fff; border: 1px solid var(--line); border-radius: 1rem; box-shadow: 0 24px 50px -24px rgba(30, 27, 75, .4); padding: 1.4rem; }
.sar-top { font-weight: 700; margin-bottom: 1rem; }
.sar-top i { color: var(--brand); }
.sar-row { display: flex; justify-content: space-between; gap: 1rem; padding: .55rem 0; border-bottom: 1px solid var(--line); color: var(--muted); }
.sar-row b { color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sar-row.total { border: 0; font-size: 1.1rem; }
.sar-row.total span, .sar-row.total b { color: var(--brand); font-weight: 800; }
.sar-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem; }
.sar-actions span { background: #ecfdf5; color: #047857; border-radius: .5rem; padding: .35rem .65rem; font-size: .85rem; font-weight: 600; }

.step { background: #fff; border: 1px solid var(--line); border-radius: 1rem; padding: 1.6rem; height: 100%; }
.step span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 800; margin-bottom: .9rem; }
.step h3 { font-size: 1.15rem; font-weight: 700; }
.step p { color: var(--muted); margin: 0; }

/* Precios */
.plan { position: relative; height: 100%; background: #fff; border: 1px solid var(--line); border-radius: 1.1rem; padding: 2rem 1.6rem 1.6rem; display: flex; flex-direction: column; }
.plan.hot { border: 2px solid var(--brand); box-shadow: 0 26px 50px -26px rgba(67, 56, 202, .55); }
.plan-badge { position: absolute; top: -.8rem; left: 50%; transform: translateX(-50%); background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: .25rem .8rem; border-radius: 2rem; white-space: nowrap; }
.plan h3 { font-weight: 800; font-size: 1.3rem; }
.plan-desc { color: var(--muted); font-size: .93rem; min-height: 2.8em; }
.price { font-size: 2.4rem; font-weight: 800; line-height: 1; }
.price small { font-size: .95rem; font-weight: 500; color: var(--muted); }
.price-annual { color: var(--muted); font-size: .88rem; margin: .4rem 0 1.2rem; }
.price-annual b { color: var(--ok); }
.plan ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .55rem; flex: 1; }
.plan li { font-size: .94rem; }
.plan li i { color: var(--brand); margin-right: .45rem; }
.plan li.off { color: #94a3b8; text-decoration: line-through; }
.plan li.off i { color: #94a3b8; }

/* Preguntas */
.faq .accordion-item { border: 1px solid var(--line); border-radius: .8rem !important; margin-bottom: .6rem; overflow: hidden; }
.faq .accordion-button { font-weight: 600; font-size: 1rem; }
.faq .accordion-button:not(.collapsed) { background: var(--brand-soft); color: var(--brand-dark); box-shadow: none; }
.faq .accordion-body { color: var(--muted); }

/* Llamado final y pie */
.cta { background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 65%, var(--brand-2) 100%); color: #fff; padding: 4.5rem 0; }
.cta h2 { font-weight: 800; font-size: clamp(1.7rem, 3vw, 2.4rem); }
.cta p { color: #c7d2fe; font-size: 1.1rem; margin-bottom: 1.6rem; }
.site-foot { background: #0f0d2e; color: #a5b4fc; padding: 3rem 0 1.5rem; font-size: .93rem; }
.site-foot a:not(.brand) { display: block; color: #c7d2fe; text-decoration: none; padding: .2rem 0; }
.site-foot a:not(.brand):hover { color: #fff; }
.foot-title { color: #fff; font-weight: 700; margin-bottom: .5rem; }
.foot-legal { border-top: 1px solid rgba(255, 255, 255, .08); margin-top: 2rem; padding-top: 1.2rem; font-size: .85rem; color: #818cf8; }

/* Manual */
.manual-hero { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 3rem 0 2.5rem; }
.manual-hero h1 { font-weight: 800; font-size: clamp(1.9rem, 4vw, 2.6rem); }
.manual-hero p { color: var(--muted); font-size: 1.08rem; max-width: 46rem; margin: 0; }
.manual-wrap { display: grid; grid-template-columns: 250px 1fr; gap: 3rem; padding: 2.5rem 0 4rem; }
.toc { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 100px); overflow-y: auto; font-size: .92rem; }
.toc .toc-title { font-weight: 700; text-transform: uppercase; font-size: .75rem; letter-spacing: .08em; color: var(--muted); margin-bottom: .6rem; }
.toc a { display: block; padding: .32rem .7rem; border-left: 2px solid var(--line); color: var(--muted); text-decoration: none; }
.toc a:hover, .toc a.active { color: var(--brand); border-left-color: var(--brand); background: var(--brand-soft); }
.doc { min-width: 0; max-width: 780px; }
.doc section { scroll-margin-top: 84px; padding-bottom: 2rem; margin-bottom: 2rem; border-bottom: 1px solid var(--line); }
.doc section:last-child { border-bottom: 0; }
.doc h2 { font-size: 1.6rem; font-weight: 800; display: flex; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.doc h2 i { color: var(--brand); background: var(--brand-soft); border-radius: .6rem; width: 40px; height: 40px; display: inline-grid; place-items: center; font-size: 1.2rem; flex: none; }
.doc h3 { font-size: 1.12rem; font-weight: 700; margin: 1.6rem 0 .6rem; }
.doc p, .doc li { color: #334155; line-height: 1.65; }
.doc ol, .doc ul { padding-left: 1.3rem; }
.doc li { margin-bottom: .35rem; }
.path { display: inline-block; background: var(--bg-alt); border: 1px solid var(--line); border-radius: .4rem; padding: 0 .4rem; font-size: .9em; font-weight: 600; color: var(--brand-dark); white-space: nowrap; }
.tip, .warn { border-radius: .8rem; padding: .9rem 1.1rem; margin: 1rem 0; font-size: .95rem; }
.tip { background: var(--brand-soft); border: 1px solid #c7d2fe; }
.warn { background: #fffbeb; border: 1px solid #fde68a; }
.tip b, .warn b { color: var(--ink); }
.doc table { width: 100%; font-size: .93rem; margin: 1rem 0; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: .5rem .4rem; vertical-align: top; }
.doc th { color: var(--muted); font-weight: 600; text-align: left; }
.manual-select { display: none; }

@media (max-width: 991.98px) {
  .hero { padding: 3rem 0 3rem; }
  .manual-wrap { grid-template-columns: 1fr; gap: 1rem; padding-top: 1.5rem; }
  .toc { display: none; }
  .manual-select { display: block; position: sticky; top: 64px; z-index: 5; background: #fff; padding: .6rem 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 575.98px) {
  .section { padding: 3.5rem 0; }
  .mock-body { grid-template-columns: 1fr; }
  .mock-grid { grid-template-columns: repeat(3, 1fr); }
  .mock-invoice { left: .5rem; right: .5rem; min-width: 0; bottom: -4.6rem; }
  .mock { margin-bottom: 5.5rem; }
  .site-nav .brand { font-size: 1.1rem; }
}
@media print {
  .site-nav, .site-foot, .toc, .manual-select { display: none !important; }
  .manual-wrap { display: block; padding: 0; }
  .doc { max-width: none; }
  .doc section { break-inside: avoid-page; }
}
