/* NÚCLEO ERP — sitio web. Sin fuentes, scripts ni recursos externos. */

:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef1f5;
  --border: #e1e5eb;
  --text: #0d1b2e;
  --muted: #536173;
  --navy: #001a3c;          /* azul marino de la marca */
  --accent: #00788f;        /* turquesa de la marca, oscurecido para contraste AA */
  --accent-ink: #ffffff;
  --accent-soft: rgba(0, 144, 170, 0.09);
  --green: #6f9f00;         /* verde de la marca */
  --ok: #1f8a4c;
  --warn: #9a5c00;
  --radius: 14px;
  --max: 1120px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1014;
    --surface: #161a20;
    --surface-2: #1d222a;
    --border: #2a303a;
    --text: #e8eef4;
    --muted: #9aa8b8;
    --navy: #e8eef4;
    --accent: #3cc8df;
    --accent-ink: #001a3c;
    --accent-soft: rgba(60, 200, 223, 0.12);
    --green: #9fd21f;
    --ok: #4cc27f;
    --warn: #f0a83a;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

/* Cabecera */
.top {
  position: sticky; top: 0; z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.04em; color: var(--text); text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span b { color: var(--accent); font-weight: 700; }
.brand { color: var(--navy); }
.nav { display: flex; gap: 22px; margin-left: auto; font-size: 15px; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover { color: var(--text); }
@media (max-width: 760px) { .nav { display: none; } }

/* Botones */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 13px 22px; border-radius: 12px; font-weight: 600; font-size: 16px;
  text-decoration: none; border: 1px solid transparent; transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn svg { width: 18px; height: 18px; }

/* Portada */
.hero { padding: 80px 0 72px; }
.hero-text { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.hero-text .lead { margin-left: auto; margin-right: auto; }
.hero-text .cta, .hero-text .chips { justify-content: center; }
@media (max-width: 620px) { .hero { padding-top: 48px; } .hero-text { text-align: left; } .hero-text .cta, .hero-text .chips { justify-content: flex-start; } }
.hero-mark { width: 120px; height: 120px; margin: 0 auto 18px; }
@media (max-width: 620px) { .hero-mark { margin-left: 0; width: 88px; height: 88px; } }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.14em; color: var(--accent); text-transform: uppercase; margin: 0 0 14px; }
h1 { font-size: clamp(36px, 5.4vw, 60px); line-height: 1.07; letter-spacing: -0.02em; margin: 0 0 20px; color: var(--navy); }
h2 { color: var(--navy); }
.lead { font-size: 20px; color: var(--muted); margin: 0 0 32px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.note { font-size: 14px; color: var(--muted); margin-top: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; padding: 0; list-style: none; }
.chips li { font-size: 14px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.chips li::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 8px; vertical-align: 1px; }

.shot {
  border-radius: 16px; overflow: hidden; border: 1px solid var(--border);
  background: var(--surface); box-shadow: 0 30px 60px -30px rgba(20, 30, 60, 0.35);
}

/* Secciones */
section { padding: 72px 0; }
section.alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.15; letter-spacing: -0.015em; margin: 0 0 14px; }
.section-lead { color: var(--muted); font-size: 19px; max-width: 42em; margin: 0 0 40px; }
h3 { font-size: 19px; margin: 0 0 8px; }

.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 24px; }
section.alt .card { background: var(--bg); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.icon {
  width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: 14px;
}
.icon svg { width: 22px; height: 22px; }
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); margin-left: 6px; vertical-align: middle; }

/* Separación NÚCLEO / sistema tributario */
.split { display: grid; grid-template-columns: 1fr auto 1fr; gap: 18px; align-items: stretch; }
.split .arrow { display: grid; place-items: center; color: var(--muted); font-size: 28px; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } .split .arrow { transform: rotate(90deg); } }
.steps { margin: 12px 0 0; padding-left: 20px; color: var(--muted); font-size: 16px; }
.doc-sample {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 14px;
  background: var(--surface-2); border-radius: 10px; padding: 14px 16px; margin-top: 14px; color: var(--text);
}
.doc-sample .legend { display: block; margin-top: 8px; font-weight: 700; color: var(--warn); }

/* Perfiles */
.profiles .card h3 { display: flex; align-items: center; gap: 8px; }

/* Descarga */
.download { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 24px; }
@media (max-width: 900px) { .download { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 18px 0 0; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; overflow-wrap: break-word; }
.kv dd.mono { word-break: break-all; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--warn); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
ol.howto { padding-left: 22px; margin: 12px 0 0; }
ol.howto li { margin-bottom: 8px; }

/* Preguntas frecuentes */
details { border-bottom: 1px solid var(--border); padding: 18px 0; }
details:first-of-type { border-top: 1px solid var(--border); }
summary { cursor: pointer; font-weight: 600; font-size: 18px; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
details[open] summary::after { content: "−"; }
details p { color: var(--muted); margin: 12px 0 0; }

/* Pie */
footer { padding: 48px 0 56px; color: var(--muted); font-size: 14px; border-top: 1px solid var(--border); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
footer nav { display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--muted); }

/* Páginas de texto */
.prose { max-width: 760px; padding: 56px 0 80px; }
.prose h1 { font-size: clamp(32px, 4.4vw, 44px); }
.prose h2 { font-size: 24px; margin-top: 40px; }
.prose p, .prose li { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn { transition: none; }
}
@media print {
  .top, .cta, footer nav { display: none; }
}
