/* ============================================================================
   INDEX · Hub / overview del prototipo — tema neutro (grayscale)
   ----------------------------------------------------------------------------
   Hoja propia y autocontenida (sin librerías ni CDNs). Paleta neutra coherente
   con el prototipo CONAF/ENCCRV (sin branding de color externo). Tipografías
   por stack con fallback a system-ui (no se cargan webfonts externas).
   ============================================================================ */
:root {
  /* Surfaces */
  --surface:         #ffffff;
  --surface-2:       #f1f3f5;
  --surface-3:       #e9ecef;
  --bg:              #f5f5f4;
  --inverse:         #1a1a1a; /* hero / footer oscuro neutro */

  /* Text */
  --text:    #1a1a1a;
  --text-2:  #495057;
  --text-3:  #6c757d;
  --text-inv:#ffffff;
  --text-inv-2: #ced4da;

  /* Border */
  --border:  #dee2e6;
  --border-strong: #adb5bd;

  /* Type */
  --font-display: "Mona Sans", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body:    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Radius */
  --r-md: 8px; --r-lg: 12px; --r-xl: 16px; --r-2xl: 24px; --r-full: 9999px;

  /* Spacing */
  --s2:8px; --s3:12px; --s4:16px; --s5:20px; --s6:24px; --s8:32px; --s10:40px; --s12:48px; --s16:64px; --s20:80px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- Eyebrow / acentos ---------- */
.sm-eyebrow {
  font-family: var(--font-body);
  font-weight: 700; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-3); margin: 0;
}

/* ---------- Navbar (claro, simple) ---------- */
.sm-nav {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s3) var(--s10);
  background: rgba(255,255,255,.94);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.sm-brand { display: flex; align-items: center; gap: 9px; }
.sm-brand-mark {
  width: 22px; height: 22px; border-radius: 6px;
  background: var(--inverse); position: relative; flex: none;
}
.sm-brand-mark::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 7px; height: 7px; border-radius: 50%; background: #fff;
}
.sm-brand-name {
  font-family: var(--font-body);
  font-weight: 700; font-size: 15px; letter-spacing: 0; color: var(--text);
}
.sm-nav-tag { font-size: 12.5px; color: var(--text-3); font-weight: 500; }
.sm-nav-links { display: flex; gap: var(--s5); align-items: center; }
.sm-nav-links a { font-size: 14px; color: var(--text-2); font-weight: 500; }
.sm-nav-links a:hover { color: var(--text); }

/* ---------- Hero (documental, fondo claro) ---------- */
.sm-hero {
  background: var(--surface); color: var(--text);
  padding: var(--s12) var(--s10) var(--s10);
  border-bottom: 1px solid var(--border);
}
.sm-hero-inner { max-width: 760px; margin: 0 auto; }
.sm-hero .sm-eyebrow { color: var(--text-3); font-size: 12px; }
.sm-hero h1 {
  font-family: var(--font-body);
  font-weight: 700; font-size: clamp(24px, 3.2vw, 34px);
  line-height: 1.2; letter-spacing: -0.01em;
  margin: var(--s3) 0 var(--s4); max-width: 28ch; color: var(--text);
}
.sm-hero p.sm-lead {
  font-size: 16px; color: var(--text-2); line-height: 1.65;
  max-width: 70ch; margin: 0 0 var(--s5);
}
.sm-hero-meta {
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  padding-top: var(--s4); border-top: 1px solid var(--border);
  font-size: 13px; color: var(--text-3);
}
.sm-hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.sm-hero-meta span::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--text-3); }

/* ---------- Secciones ---------- */
.sm-section { max-width: 1180px; margin: 0 auto; padding: var(--s16) var(--s10); }
.sm-section-head { margin-bottom: var(--s10); }
.sm-section-head h2 {
  font-family: var(--font-display);
  font-weight: 800; font-size: clamp(24px, 3vw, 34px);
  letter-spacing: -0.01em; margin: var(--s3) 0 var(--s3); color: var(--text);
}
.sm-section-head p { color: var(--text-3); max-width: 72ch; margin: 0; font-size: 16px; }

/* ---------- Tarjetas de flujo ---------- */
.sm-flows { background: var(--surface-2); }
.sm-cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s6); }

.sm-card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.sm-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(0,0,0,.10); border-color: var(--border-strong); }

.sm-card-top { padding: var(--s8) var(--s8) var(--s6); border-bottom: 1px solid var(--border); }
.sm-card-badges { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s5); }
.sm-card-icon {
  width: 48px; height: 48px; border-radius: var(--r-lg);
  display: flex; align-items: center; justify-content: center;
  background: var(--inverse); color: #fff;
}
.sm-badge-role {
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 5px 12px; border-radius: var(--r-full); background: var(--surface-3); color: var(--text-2);
}
.sm-card h3 {
  font-family: var(--font-display);
  font-weight: 800; font-size: 25px; letter-spacing: -0.01em;
  margin: var(--s2) 0 var(--s3); color: var(--text);
}
.sm-card-desc { font-size: 15px; color: var(--text-3); margin: 0; }

.sm-card-body { padding: var(--s6) var(--s8); flex: 1; }
.sm-block + .sm-block { margin-top: var(--s6); }
.sm-block-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text); margin: 0 0 var(--s3);
}
.sm-block-title svg { color: var(--text-2); flex: none; }
.sm-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.sm-list li { position: relative; padding-left: 24px; font-size: 14px; color: var(--text-2); line-height: 1.45; }
.sm-list li::before {
  content: ""; position: absolute; left: 4px; top: 7px;
  width: 7px; height: 7px; border-radius: 2px; background: var(--text);
}
.sm-list--ux li::before { border-radius: 50%; background: var(--text-3); }

.sm-card-foot { padding: var(--s5) var(--s8) var(--s8); display: flex; align-items: center; justify-content: space-between; gap: var(--s4); }
.sm-tag { font-size: 12.5px; color: var(--text-3); }
.sm-tag strong { color: var(--text); }
.sm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--inverse); color: #fff;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: var(--r-md); border: 1px solid var(--inverse);
  cursor: pointer; transition: background .15s ease, color .15s ease;
}
.sm-btn:hover { background: #000; }
.sm-btn svg { transition: transform .15s ease; }
.sm-card:hover .sm-btn svg { transform: translateX(3px); }
.sm-btn--ghost { background: transparent; color: var(--text-2); border-color: var(--border-strong); }
.sm-btn--ghost:hover { background: var(--surface-2); color: var(--text); }
.sm-btn--disabled { background: var(--surface-3); color: var(--text-3); border-color: var(--border); cursor: not-allowed; pointer-events: none; }

/* ---------- Sistema de diseño (banner) ---------- */
.sm-ds {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s8);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-2xl);
  padding: var(--s8); flex-wrap: wrap;
}
.sm-ds-info { flex: 1 1 420px; min-width: 0; }
.sm-ds-info h3 { font-family: var(--font-display); font-weight: 800; font-size: 24px; margin: 0 0 var(--s2); letter-spacing: -0.01em; }
.sm-ds-info p { margin: 0; color: var(--text-3); font-size: 15px; max-width: 60ch; }
.sm-status {
  display: inline-block; margin-bottom: var(--s3);
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  padding: 4px 11px; border-radius: var(--r-full);
  background: var(--surface-3); color: var(--text-2);
}

/* ---------- Cuadro resumen de esfuerzo (tablas) ---------- */
.sm-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s4); margin-bottom: var(--s10); }
.sm-kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: var(--s5); }
.sm-kpi .sm-kpi-n { font-family: var(--font-display); font-weight: 800; font-size: 34px; line-height: 1; color: var(--text); }
.sm-kpi .sm-kpi-l { display: block; margin-top: 6px; font-size: 13px; color: var(--text-3); }
.sm-kpi--total { background: var(--inverse); border-color: var(--inverse); }
.sm-kpi--total .sm-kpi-n, .sm-kpi--total .sm-kpi-l { color: #fff; }

.sm-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); margin-bottom: var(--s8); }
.sm-table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
.sm-table th, .sm-table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.sm-table thead th { background: var(--surface-2); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2); font-weight: 700; }
.sm-table td.sm-num, .sm-table th.sm-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
.sm-table .sm-desc { color: var(--text-3); }
.sm-row-stage td { background: var(--surface-3); font-weight: 800; color: var(--text); text-transform: uppercase; font-size: 12.5px; letter-spacing: .03em; }
.sm-row-stage td .sm-stage-sub { float: right; text-transform: none; letter-spacing: 0; }
.sm-row-total td { background: var(--inverse); color: #fff; font-weight: 800; font-size: 15px; }
.sm-table tbody tr:last-child td { border-bottom: none; }

/* ---------- NotebookLM (valor estratégico) ---------- */
.sm-note { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); padding: var(--s8); margin-top: var(--s8); }
.sm-note h3 { font-family: var(--font-display); font-weight: 800; font-size: 22px; margin: 0 0 var(--s4); letter-spacing: -0.01em; }
.sm-note p { color: var(--text-2); font-size: 15px; margin: 0 0 var(--s4); }
.sm-note p:last-child { margin-bottom: 0; }
.sm-note-list { list-style: none; margin: 0 0 var(--s4); padding: 0; display: grid; gap: var(--s3); }
.sm-note-list li { background: var(--surface-2); border-left: 3px solid var(--text); border-radius: 0 var(--r-md) var(--r-md) 0; padding: var(--s4); font-size: 14.5px; color: var(--text-2); }
.sm-note-list li strong { color: var(--text); }
.sm-note-concl { background: var(--surface-3); border-radius: var(--r-md); padding: var(--s5); font-size: 15px; color: var(--text); }
.sm-note-concl strong { font-weight: 700; }

/* ---------- Footer ---------- */
.sm-footer { background: var(--inverse); color: var(--text-inv-2); padding: var(--s12) var(--s10); }
.sm-footer-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s8); flex-wrap: wrap; }
.sm-footer-title { font-family: var(--font-display); font-weight: 800; font-size: 20px; color: #fff; letter-spacing: -0.01em; }
.sm-footer-meta { font-size: 13px; line-height: 1.7; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .sm-cards { grid-template-columns: 1fr; }
  .sm-kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .sm-nav, .sm-hero, .sm-section, .sm-footer { padding-left: var(--s5); padding-right: var(--s5); }
  .sm-nav-tag { display: none; }
  .sm-kpis { grid-template-columns: 1fr; }
  .sm-card-foot { flex-direction: column; align-items: stretch; }
  .sm-btn { justify-content: center; }
  .sm-ds { flex-direction: column; align-items: stretch; }
}
