/* Biochar Rinconada — estilo común de las cuatro páginas.
   Tema oscuro de cussen.cl. Contrastes medidos sobre #07090f y #0d1220,
   todos >= 7:1 (exigencia de la casa: >= 4,5:1). */

:root {
  --bg: #07090f;
  --card: #0d1220;
  --line: rgba(255, 255, 255, 0.09);
  --tx: #e2e8f0;
  --tx2: #a8b3c4;
  --tx3: #94a3b8;
  --acc: #06b6d4;
  --acc2: #22d3ee;
  --warn: #fbbf24;
  --ok: #34d399;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 62px; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--tx);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { max-width: 940px; margin: 0 auto; padding: 0 16px; }

/* --- Navegación --- */
nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 15, 0.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  min-height: 56px; display: flex; align-items: center;
  padding: 0 16px; gap: 14px;
}
nav .logo {
  font-weight: 800; color: #f9fafb; font-size: 14px;
  letter-spacing: -0.4px; text-decoration: none; flex-shrink: 0;
}
nav .nav-links {
  display: flex; gap: 16px; font-size: 13px; font-weight: 500;
  overflow-x: auto; white-space: nowrap; flex: 1;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
nav .nav-links::-webkit-scrollbar { display: none; }
nav .nav-links a { text-decoration: none; color: var(--tx3); padding: 6px 0; flex-shrink: 0; }
nav .nav-links a:hover, nav .nav-links a[aria-current="page"] { color: var(--acc2); }

/* --- Encabezado --- */
header.hero { padding: 48px 0 8px; }
header.hero h1 {
  font-size: clamp(1.65rem, 5.2vw, 2.6rem); font-weight: 800;
  color: #f9fafb; letter-spacing: -0.8px; line-height: 1.15;
}
header.hero .lede {
  margin-top: 14px; font-size: 1rem; color: var(--tx2);
  max-width: 68ch; text-align: justify;
}

section { padding: 34px 0; }
h2.sec {
  font-size: 1.3rem; font-weight: 700; color: #f9fafb;
  letter-spacing: -0.3px; margin-bottom: 6px;
}
p.sub { color: var(--tx2); font-size: 0.95rem; max-width: 68ch; text-align: justify; }
p.body { color: var(--tx2); font-size: 0.95rem; text-align: justify; margin-top: 12px; }

/* --- Tarjetas de cifra --- */
.cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 22px; }
.cifra {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 16px 14px;
}
.cifra b {
  display: block; font-family: var(--mono); font-size: 1.5rem;
  font-weight: 700; color: var(--acc2); line-height: 1.1; letter-spacing: -0.5px;
}
.cifra span { display: block; margin-top: 6px; font-size: 0.8rem; color: var(--tx2); }
.cifra em { display: block; margin-top: 4px; font-size: 0.72rem; color: var(--tx3); font-style: normal; }

/* --- Figuras --- */
figure {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; padding: 16px 14px 14px; margin-top: 18px;
}
figure > h3 { font-size: 0.98rem; font-weight: 600; color: #f9fafb; margin-bottom: 4px; }
figure > .ejes { font-size: 0.8rem; color: var(--tx3); margin-bottom: 12px; }
.lienzo { position: relative; width: 100%; height: 280px; }
@media (min-width: 720px) { .lienzo { height: 320px; } }
figcaption {
  margin-top: 12px; font-size: 0.82rem; color: var(--tx2);
  line-height: 1.55; text-align: justify;
  border-top: 1px solid var(--line); padding-top: 10px;
}
figcaption b { color: var(--tx); font-weight: 600; }

/* --- Nota / advertencia --- */
.nota {
  background: rgba(251, 191, 36, 0.07);
  border: 1px solid rgba(251, 191, 36, 0.32);
  border-left: 3px solid var(--warn);
  border-radius: 10px; padding: 16px 16px; margin-top: 18px;
}
.nota h3 { font-size: 0.92rem; font-weight: 700; color: var(--warn); margin-bottom: 6px; }
.nota p, .nota li { font-size: 0.9rem; color: var(--tx2); text-align: justify; }
.nota ul { margin: 6px 0 0 18px; }
.nota li { margin-top: 4px; }

.caja {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--acc); border-radius: 10px;
  padding: 16px; margin-top: 14px;
}
.caja h3 { font-size: 0.95rem; font-weight: 600; color: var(--acc2); margin-bottom: 6px; }
.caja p, .caja li { font-size: 0.9rem; color: var(--tx2); text-align: justify; }
.caja ul { margin: 6px 0 0 18px; }
.caja li { margin-top: 5px; }

/* --- Tabla --- */
.tabla-scroll { overflow-x: auto; margin-top: 14px; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; border-collapse: collapse; font-size: 0.88rem;
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
}
th, td { padding: 9px 12px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--tx3); font-weight: 600; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.4px; }
td { color: var(--tx2); }
td.num { font-family: var(--mono); color: var(--tx); text-align: right; white-space: nowrap; }
th.num { text-align: right; }
tr:last-child td { border-bottom: none; }

/* --- Botones / descargas --- */
.enlaces { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.btn {
  display: inline-block; padding: 9px 18px;
  border: 1px solid rgba(6, 182, 212, 0.45); border-radius: 999px;
  color: var(--acc2); text-decoration: none; font-size: 0.86rem; font-weight: 500;
  background: transparent;
}
.btn:hover { background: rgba(6, 182, 212, 0.13); border-color: var(--acc2); }
.btn.primario { background: rgba(6, 182, 212, 0.16); }

/* --- Pie --- */
footer {
  border-top: 1px solid var(--line); padding: 24px 0 36px;
  margin-top: 24px;
}
footer p { font-size: 0.8rem; color: var(--tx3); }
footer a { color: var(--tx2); }

/* --- Responsivo --- */
@media (max-width: 760px) {
  .cifras { grid-template-columns: repeat(2, 1fr); }
  header.hero { padding: 32px 0 4px; }
  section { padding: 26px 0; }
}
@media (max-width: 420px) {
  .cifra b { font-size: 1.28rem; }
}
