/* ============================================================
   Riofrio Analytics — hoja de estilos v8
   Estilo "observatorio ejecutivo de datos": superficies verde
   teal profundas, paneles tipo dashboard y acentos lima discretos.
   Adaptado del estilo de referencia a la paleta oficial.
   ============================================================ */

:root {
  /* Paleta oficial */
  --primary: #0B6E4F;
  --primary-dark: #064E3B;
  --light-green: #DFF5EA;
  --teal: #0F3D4C;
  --accent: #8BC34A;
  --text: #1F2937;
  --muted: #64748B;
  --cloud: #F3F6F4;
  --white: #FFFFFF;
  --amber: #F59E0B;
  --red: #DC2626;

  /* Superficies oscuras de apoyo */
  --executive: #021F1A;
  --panel: #08382E;
  --data-mist: #EAF7F1;
  --line: rgba(223, 245, 234, 0.16);
  --line-strong: rgba(223, 245, 234, 0.26);

  --border: #E2E8E4;

  /* Gradientes (uso disciplinado) */
  --grad-primary: linear-gradient(95deg, #0B6E4F 0%, #0F3D4C 100%);
  --grad-growth: linear-gradient(90deg, #0B6E4F 0%, #8BC34A 100%);
  --wash:
    radial-gradient(circle at 78% 12%, rgba(139,195,74,0.16), transparent 34%),
    radial-gradient(circle at 12% 8%, rgba(15,61,76,0.42), transparent 40%);

  /* Sombras */
  --shadow-soft: 0 12px 28px rgba(15, 61, 76, 0.06);
  --shadow-card: 0 18px 45px rgba(15, 61, 76, 0.10);
  --shadow-float: 0 24px 60px rgba(2, 31, 26, 0.45);

  /* Radios */
  --r-pill: 999px;
  --r-card: 20px;
  --r-panel: 24px;
  --r-input: 12px;
  --r-sm: 10px;
  --r-lg: 16px;

  --maxw: 1180px;

  /* Rejilla de datos sutil para superficies oscuras */
  --grid-dark:
    linear-gradient(rgba(223,245,234,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(223,245,234,0.05) 1px, transparent 1px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: Inter, "Matter", ui-sans-serif, system-ui, "Segoe UI", Roboto, "Open Sans", Arial, sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; height: auto; }
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }

.container { width: min(var(--maxw), calc(100% - 40px)); margin: 0 auto; }

/* ===== Accesibilidad ===== */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--primary-dark); color: #fff;
  padding: 10px 16px; border-radius: 0 0 12px 0; z-index: 100; font-weight: 700;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 3px solid rgba(139,195,74,0.65); outline-offset: 2px; border-radius: 4px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .reveal { opacity: 1 !important; transform: none !important; }
}

/* ===== Animación de entrada (revelado al hacer scroll) ===== */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
.js .reveal.d1 { transition-delay: .06s; }
.js .reveal.d2 { transition-delay: .12s; }
.js .reveal.d3 { transition-delay: .18s; }

/* ============ Header ============ */

.site-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  min-height: 82px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
}

.logo { display: flex; align-items: center; gap: 12px; font-weight: 800; letter-spacing: -0.02em; min-width: 0; flex-shrink: 0; }

.logo-official { display: none; height: 52px; width: auto; max-width: 260px; object-fit: contain; }
.logo.has-official-logo .logo-official { display: block; }
.logo.has-official-logo .logo-mark, .logo.has-official-logo .logo-text { display: none; }

.logo-mark {
  width: 44px; height: 44px; border-radius: 13px;
  background: var(--grad-primary); color: #fff;
  display: grid; place-items: center; font-weight: 900;
}
.logo-text { line-height: 1.15; }
.logo-text span { display: block; font-size: .72rem; font-weight: 600; color: var(--muted); margin-top: 2px; }

.main-nav {
  display: flex; align-items: center; gap: 26px;
  font-size: .92rem; font-weight: 600; color: #34414f;
}
.main-nav a { padding: 6px 1px; border-bottom: 2px solid transparent; transition: color .15s ease; }
.main-nav a:hover { color: var(--primary); }
.main-nav a.active { color: var(--primary-dark); border-bottom-color: var(--accent); font-weight: 700; }
.main-nav .nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }

.menu-toggle {
  display: none; border: 1px solid var(--border); background: #fff; color: var(--text);
  border-radius: 12px; width: 46px; height: 46px; font-size: 1.2rem; cursor: pointer;
  align-items: center; justify-content: center;
}

/* ============ Botones ============ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 13px 24px; border-radius: var(--r-pill);
  font-weight: 700; font-size: .96rem; border: 1px solid transparent; cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease, color .16s ease;
  text-align: center; white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn svg { width: 18px; height: 18px; }

.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 12px 26px rgba(11,110,79,0.28); }
.btn-primary:hover { background: var(--primary-dark); }

.btn-secondary { background: #fff; color: var(--primary-dark); border-color: rgba(11,110,79,0.28); }
.btn-secondary:hover { background: var(--light-green); border-color: var(--primary); }

.btn-light { background: #fff; color: var(--primary-dark); }
.btn-light:hover { background: var(--light-green); }

.btn-whatsapp { background: var(--light-green); color: var(--primary-dark); border-color: rgba(11,110,79,0.18); }
.btn-whatsapp:hover { background: #cdecdc; }

/* Botones sobre fondos oscuros */
.on-dark .btn-secondary,
.btn-outline-light {
  background: transparent; color: #fff; border-color: rgba(223,245,234,0.35);
}
.on-dark .btn-secondary:hover,
.btn-outline-light:hover { background: rgba(223,245,234,0.10); border-color: rgba(223,245,234,0.6); }

/* ============ Tipografía / secciones ============ */

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 16px; color: var(--text); }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.1rem); font-weight: 800; letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: clamp(1.8rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -0.025em; }
h3 { font-size: 1.24rem; font-weight: 700; }

.lead { font-size: 1.14rem; color: var(--muted); max-width: 760px; }

.meta-label, .eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .16em;
  color: var(--primary); margin-bottom: 14px;
}
.meta-label::before, .eyebrow::before {
  content: ""; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; flex-shrink: 0;
}
.eyebrow {
  background: var(--light-green); border-radius: var(--r-pill);
  padding: 8px 15px 8px 13px; color: var(--primary-dark); letter-spacing: .12em;
}

.section { padding: 84px 0; }
.section-alt { background: var(--cloud); }
.section-tight { padding: 56px 0; }
.section-head { max-width: 820px; margin-bottom: 40px; }

/* ===== Secciones oscuras ejecutivas ===== */
.section-dark, .section-deep {
  position: relative; color: #fff; overflow: hidden;
}
.section-dark { background: var(--primary-dark); }
.section-deep { background: var(--executive); }
.section-dark::before, .section-deep::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--wash);
}
.section-dark > .container, .section-deep > .container { position: relative; z-index: 1; }

.section-dark h1, .section-dark h2, .section-dark h3, .section-dark h4,
.section-deep h1, .section-deep h2, .section-deep h3, .section-deep h4 { color: #fff; }
.section-dark .lead, .section-dark p,
.section-deep .lead, .section-deep p { color: rgba(255,255,255,0.80); }
.section-dark .meta-label, .section-deep .meta-label { color: var(--light-green); }
.section-dark .eyebrow, .section-deep .eyebrow {
  background: rgba(223,245,234,0.12); color: var(--light-green);
}

/* ============ Hero (oscuro) ============ */

.hero, .page-hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--primary-dark);
}
.hero::before, .page-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; background: var(--wash);
}
.hero::after, .page-hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: var(--grid-dark); background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000, transparent 78%);
  mask-image: radial-gradient(circle at 30% 30%, #000, transparent 78%);
  opacity: .7;
}
.hero > .container, .page-hero > .container { position: relative; z-index: 1; }

.hero { padding: 96px 0 92px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 56px; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero .lead { color: rgba(255,255,255,0.82); font-size: 1.18rem; }
.hero .eyebrow { background: rgba(223,245,234,0.12); color: var(--light-green); }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }

.hero-note {
  margin-top: 22px; color: rgba(255,255,255,0.72); font-size: .93rem;
  display: flex; align-items: flex-start; gap: 9px; max-width: 560px;
}
.hero-note svg { flex-shrink: 0; margin-top: 3px; }

.page-hero { padding: 78px 0 66px; }
.page-hero h1 { color: #fff; }
.page-hero .lead { color: rgba(255,255,255,0.82); max-width: 860px; }
.page-hero .eyebrow { background: rgba(223,245,234,0.12); color: var(--light-green); }
.page-hero .hero-actions { margin-top: 26px; }

/* ============ Visual dashboard del hero (panel claro elevado) ============ */

.dashboard-card {
  background: #fff; border: 1px solid rgba(255,255,255,0.6); border-radius: var(--r-panel);
  box-shadow: var(--shadow-float); padding: 22px; color: var(--text);
}
.dashboard-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 10px; }
.dashboard-top strong { font-size: .98rem; color: var(--teal); }

.status-pill {
  background: var(--light-green); color: var(--primary-dark); border-radius: var(--r-pill);
  padding: 5px 12px; font-size: .76rem; font-weight: 700; white-space: nowrap;
}
.status-pill::before { content: "●"; color: var(--primary); margin-right: 5px; font-size: .6rem; vertical-align: 1px; }

.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 14px; }
.kpi { background: var(--cloud); border-radius: 14px; padding: 12px 14px; }
.kpi small { color: var(--muted); display: block; font-weight: 600; font-size: .76rem; }
.kpi strong { font-size: 1.3rem; color: var(--teal); letter-spacing: -0.02em; }
.kpi .delta { display: block; font-size: .74rem; font-weight: 700; margin-top: 2px; }

.chart {
  border-radius: 16px; overflow: hidden;
  background: linear-gradient(180deg, rgba(11,110,79,0.05), rgba(11,110,79,0));
  border: 1px solid var(--border);
}
.chart svg { display: block; width: 100%; height: auto; }

.mini-table { margin-top: 14px; display: grid; gap: 8px; }
.table-row {
  display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center;
  background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 9px 13px; font-size: .88rem;
}
.positive { color: var(--primary); font-weight: 800; }
.warning  { color: var(--amber);   font-weight: 800; }
.negative { color: var(--red);     font-weight: 800; }

/* ============ Banda de cifras ("in numbers") ============ */

.stat-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat { border-left: 1px solid var(--line-strong); padding: 6px 0 6px 22px; }
.stat .num {
  font-size: clamp(2.4rem, 4.4vw, 3.4rem); font-weight: 800; letter-spacing: -0.03em;
  line-height: 1; color: #fff; margin-bottom: 8px;
}
.stat .num span { color: var(--accent); }
.stat .stat-label { color: rgba(255,255,255,0.78); font-size: .96rem; }
.stat-note { margin-top: 28px; color: rgba(255,255,255,0.55); font-size: .85rem; }

/* ============ Cards y grids ============ */

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.card {
  background: #fff; border: 1px solid rgba(11,110,79,0.12); border-radius: var(--r-card);
  padding: 28px; box-shadow: var(--shadow-soft); transition: transform .18s ease, box-shadow .18s ease;
}
.card h3 { margin-bottom: 10px; }
.card-muted { background: var(--cloud); box-shadow: none; border-color: var(--border); }

/* Cards dentro de secciones oscuras */
.section-dark .card, .section-deep .card,
.section-dark .step, .section-deep .step {
  background: var(--panel); border-color: var(--line); color: rgba(255,255,255,0.82); box-shadow: none;
}
.section-dark .card h3, .section-deep .card h3,
.section-dark .step strong, .section-deep .step strong { color: #fff; }
.section-dark .card p, .section-deep .card p,
.section-dark .step p, .section-deep .step p { color: rgba(255,255,255,0.74); }
.section-dark .card-muted, .section-deep .card-muted { background: rgba(223,245,234,0.06); }

.icon {
  width: 46px; height: 46px; border-radius: 13px; background: var(--light-green); color: var(--primary-dark);
  display: grid; place-items: center; font-weight: 800; font-size: .92rem; margin-bottom: 16px;
}
.icon svg { width: 22px; height: 22px; }
.section-dark .icon, .section-deep .icon { background: rgba(139,195,74,0.16); color: var(--accent); }

.card-link {
  display: inline-flex; align-items: center; gap: 6px; color: var(--primary);
  font-weight: 700; font-size: .93rem; margin-top: 14px;
}
.card-link:hover { color: var(--primary-dark); gap: 9px; }
.section-dark .card-link, .section-deep .card-link { color: var(--light-green); }
.section-dark .card-link:hover, .section-deep .card-link:hover { color: #fff; }

/* ============ Listas ============ */

.problem-list, .clean-list { padding-left: 0; list-style: none; display: grid; gap: 11px; margin: 0; }
.problem-list li, .clean-list li { position: relative; padding-left: 28px; }
.clean-list li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 900; }
.problem-list li::before { content: "✕"; position: absolute; left: 0; top: 0; color: var(--red); font-weight: 900; font-size: .85em; line-height: 1.9; }
.section-dark .clean-list li::before, .section-deep .clean-list li::before { color: var(--accent); }

/* ============ Tarjetas de dolor ============ */

.pain-card {
  background: #fff; border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: var(--r-card); padding: 24px; box-shadow: var(--shadow-soft);
  transition: transform .18s ease, box-shadow .18s ease;
}
.pain-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.pain-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.pain-card p { color: var(--muted); font-size: .94rem; }
.pain-card .icon { background: #FDF0F0; color: var(--red); width: 40px; height: 40px; }

/* ============ Servicios detallados ============ */

.service-detail {
  background: #fff; border: 1px solid rgba(11,110,79,0.12); border-radius: var(--r-panel);
  padding: 32px; box-shadow: var(--shadow-soft); display: flex; flex-direction: column; gap: 4px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.service-detail:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.service-detail.featured { border: 1px solid var(--primary); box-shadow: 0 22px 50px rgba(11,110,79,0.16); position: relative; overflow: hidden; }
.service-detail.featured::after {
  content: ""; position: absolute; left: 0; top: 0; height: 100%; width: 4px;
  background: var(--grad-growth);
}

.service-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; flex-wrap: wrap; }

.badge {
  display: inline-block; background: var(--light-green); color: var(--primary-dark);
  border-radius: var(--r-pill); padding: 6px 13px; font-size: .75rem; font-weight: 800;
  letter-spacing: .03em; white-space: nowrap;
}
.badge-teal { background: #E3EEF2; color: var(--teal); }

.service-block { margin-top: 16px; }
.service-block h4 {
  margin: 0 0 8px; font-size: .78rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .1em; color: var(--muted);
}
.service-block p { font-size: .96rem; }

.service-result {
  margin-top: 18px; background: var(--data-mist); border: 1px solid rgba(11,110,79,0.1);
  border-radius: 14px; padding: 14px 16px; font-size: .95rem;
}
.service-result strong { color: var(--primary-dark); }

.service-detail .btn { margin-top: 20px; align-self: flex-start; }

/* ============ Proceso (pasos) ============ */

.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.step { background: #fff; border-radius: var(--r-card); padding: 24px; border: 1px solid var(--border); }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 9px;
  border-radius: 11px; background: var(--light-green); color: var(--primary-dark);
  font-weight: 800; font-size: .86rem; margin-bottom: 14px; letter-spacing: -0.02em;
}
.section-dark .step::before, .section-deep .step::before { background: rgba(139,195,74,0.16); color: var(--accent); }
.step strong { display: block; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ============ Pipeline de arquitectura ============ */

.pipeline { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; }
.pipeline-node { flex: 1 1 150px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 16px; text-align: center; box-shadow: var(--shadow-soft); }
.pipeline-node strong { display: block; color: var(--teal); font-size: .98rem; }
.pipeline-node small { color: var(--muted); font-size: .8rem; }
.pipeline-arrow { align-self: center; color: var(--primary); font-weight: 900; font-size: 1.4rem; flex: 0 0 auto; }
.section-dark .pipeline-node { background: var(--panel); border-color: var(--line); }
.section-dark .pipeline-node strong { color: #fff; }
.section-dark .pipeline-node small { color: rgba(255,255,255,0.7); }
.section-dark .pipeline-arrow { color: var(--accent); }

/* ============ Chips de KPIs ============ */

.chip-group { margin-bottom: 24px; }
.chip-group h3 { font-size: 1rem; margin-bottom: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  background: #fff; border: 1px solid var(--border); border-radius: var(--r-pill);
  padding: 10px 17px; font-size: .9rem; font-weight: 600; color: var(--teal);
}
.chip::before { content: "•"; color: var(--accent); margin-right: 8px; font-weight: 900; }

/* ============ Mock dashboard (portafolio) ============ */

.dashboard-placeholder { background: #fff; border: 1px solid var(--border); border-radius: var(--r-panel); padding: 22px; box-shadow: var(--shadow-card); }
.mock-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 14px; margin-top: 14px; }
.mock-panel { background: var(--cloud); border-radius: 14px; min-height: 150px; padding: 15px; font-size: .92rem; }
.mock-panel strong { display: block; margin-bottom: 10px; font-size: .9rem; color: var(--teal); }
.mock-bars { display: flex; align-items: flex-end; gap: 8px; height: 104px; }
.mock-bars span { flex: 1; background: linear-gradient(180deg, var(--primary), var(--teal)); border-radius: 7px 7px 0 0; opacity: .92; min-height: 8px; }

.kpi-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi-tile { background: var(--cloud); border-radius: 13px; padding: 12px 14px; }
.kpi-tile small { color: var(--muted); font-weight: 600; font-size: .76rem; }
.kpi-tile strong { display: block; font-size: 1.14rem; color: var(--teal); }

.screenshot-slot {
  border: 2px dashed rgba(11,110,79,0.3); border-radius: var(--r-card); background: var(--cloud);
  min-height: 180px; display: grid; place-items: center; text-align: center; color: var(--muted);
  padding: 24px; font-size: .94rem;
}

/* ============ Avisos ============ */

.disclaimer {
  border-left: 5px solid var(--amber); background: rgba(245,158,11,0.14);
  padding: 16px 20px; border-radius: 14px; color: #ffe6b8; font-weight: 600; font-size: .95rem; margin-top: 24px;
}
.section:not(.section-dark):not(.section-deep) .disclaimer { color: #7C4A03; background: #FFF8EB; }

.notice-box { background: var(--light-green); border: 1px solid rgba(11,110,79,0.18); color: var(--primary-dark); border-radius: var(--r-card); padding: 18px 20px; font-weight: 600; }

.alert { border-radius: 14px; padding: 14px 16px; margin: 0 0 18px; font-weight: 700; }
.alert-success { background: var(--light-green); color: var(--primary-dark); border: 1px solid rgba(11,110,79,0.18); }
.alert-error { background: #FEE2E2; color: #991B1B; border: 1px solid rgba(220,38,38,0.22); }

/* ============ Formulario / contacto ============ */

.contact-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 28px; align-items: start; }
.form { display: grid; gap: 16px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
label { display: grid; gap: 7px; font-weight: 700; font-size: .92rem; }
input, textarea, select {
  width: 100%; border: 1px solid var(--border); border-radius: var(--r-input); min-height: 48px;
  padding: 12px 14px; font: inherit; color: var(--text); background: #fff;
}
textarea { min-height: 140px; resize: vertical; }
input:focus, textarea:focus, select:focus { outline: 3px solid rgba(11,110,79,0.16); border-color: var(--primary); }
.form-note { color: var(--muted); font-size: .88rem; font-weight: 500; }
.field-hint { color: var(--muted); font-weight: 500; font-size: .82rem; }
.checkbox-label { display: flex; align-items: flex-start; gap: 10px; font-weight: 550; color: var(--muted); font-size: .9rem; }
.checkbox-label input { width: auto; min-height: auto; margin-top: 4px; }
.checkbox-label a { color: var(--primary); font-weight: 700; text-decoration: underline; }
.honeypot { position: absolute; left: -9999px; opacity: 0; }

.contact-aside h3 { margin-bottom: 14px; }
.contact-aside p { font-size: .95rem; }
.contact-aside hr { border: 0; border-top: 1px solid var(--border); margin: 18px 0; }
.after-send { margin-top: 18px; }
.after-send li { font-size: .93rem; color: var(--muted); }

.success-icon {
  width: 76px; height: 76px; border-radius: 50%; background: rgba(139,195,74,0.18); color: var(--accent);
  display: grid; place-items: center; font-size: 2.2rem; font-weight: 900; margin-bottom: 20px;
  border: 1px solid rgba(223,245,234,0.3);
}

/* ============ Contenido legal ============ */
.legal-content { max-width: 880px; }
.legal-content h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin-top: 38px; }
.legal-content p, .legal-content li { color: var(--muted); }

/* ============ Banda CTA ============ */

.cta-band {
  position: relative; overflow: hidden; background: var(--grad-primary); color: #fff;
  border-radius: var(--r-panel); padding: 48px; display: grid; grid-template-columns: 1fr auto;
  gap: 28px; align-items: center; box-shadow: var(--shadow-card);
}
.cta-band::before { content: ""; position: absolute; inset: 0; background: var(--wash); pointer-events: none; }
.cta-band > * { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; font-size: clamp(1.5rem, 2.8vw, 2.1rem); }
.cta-band p { color: rgba(255,255,255,0.82); margin: 0; }
.cta-band .cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ============ Footer ============ */

.site-footer { position: relative; overflow: hidden; background: var(--executive); color: #fff; padding: 64px 0 26px; }
.site-footer::before { content: ""; position: absolute; inset: 0; background: var(--wash); opacity: .6; pointer-events: none; }
.site-footer > .container { position: relative; z-index: 1; }
.footer-grid { display: grid; grid-template-columns: 1.3fr .8fr .9fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 14px; }
.site-footer p, .site-footer a { color: rgba(255,255,255,0.74); }
.site-footer a:hover { color: #fff; }
.footer-tagline { font-weight: 700; color: var(--light-green); margin: 14px 0 8px; font-size: 1.02rem; }

.site-footer .logo.has-official-logo { display: inline-flex; background: #fff; padding: 11px 16px; border-radius: var(--r-lg); max-width: 100%; }
.site-footer .logo-official { height: 50px; max-width: 250px; }

.footer-links { display: grid; gap: 11px; font-size: .95rem; }
.footer-bottom {
  border-top: 1px solid rgba(223,245,234,0.14); margin-top: 40px; padding-top: 20px;
  color: rgba(255,255,255,0.55); font-size: .9rem; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,0.7); text-decoration: underline; }

/* ============ WhatsApp flotante ============ */

.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: #25D366; color: #fff;
  box-shadow: 0 14px 34px rgba(0,0,0,0.28); border: 3px solid #fff; transition: transform .16s ease;
}
.whatsapp-float svg { width: 30px; height: 30px; fill: currentColor; display: block; }
.whatsapp-float:hover { transform: translateY(-3px); }

/* ============ Recursos ============ */

.resource-card { min-height: 230px; display: flex; flex-direction: column; justify-content: space-between; gap: 16px; }
.resource-card .badge { align-self: flex-start; }

/* ============ Responsive ============ */

@media (max-width: 980px) {
  .hero-grid, .grid-2, .contact-grid, .footer-grid, .mock-grid { grid-template-columns: 1fr; }
  .grid-3, .grid-4, .steps, .kpi-row, .stat-band { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { max-width: none; }
  .hero { padding: 72px 0 68px; }

  .main-nav {
    position: absolute; top: calc(100% + 8px); left: 16px; right: 16px; display: none;
    flex-direction: column; align-items: stretch; gap: 0; background: #fff; border: 1px solid var(--border);
    border-radius: var(--r-card); box-shadow: var(--shadow-card); overflow: hidden; padding: 6px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 14px 16px; border-bottom: 1px solid var(--border); border-radius: 0; }
  .main-nav a.active { border-bottom: 1px solid var(--border); background: var(--cloud); }
  .main-nav a:last-of-type { border-bottom: 0; }
  .main-nav .nav-cta {
    display: inline-flex; margin: 10px; border-bottom: 0; border-radius: var(--r-pill);
    background: var(--primary); color: #fff; justify-content: center; font-weight: 700; padding: 14px 16px;
  }
  .menu-toggle { display: inline-flex; }
  .header-actions .btn { display: none; }

  .cta-band { grid-template-columns: 1fr; padding: 36px; }
  .stat { padding-left: 18px; }
}

@media (max-width: 640px) {
  .container { width: min(100% - 28px, var(--maxw)); }
  .header-inner { min-height: 72px; }
  .logo-official { height: 44px; max-width: 210px; }

  .hero { padding: 56px 0 56px; }
  .section { padding: 58px 0; }

  .grid-3, .grid-4, .steps, .kpi-grid, .kpi-row, .form-row, .stat-band { grid-template-columns: 1fr; }
  .stat { border-left: 0; border-top: 1px solid var(--line-strong); padding: 16px 0 0; }

  .dashboard-card { padding: 16px; border-radius: 20px; }
  .service-detail { padding: 24px; }
  .cta-band { padding: 30px 24px; }

  .site-footer .logo-official { height: 42px; max-width: 200px; }
  .whatsapp-float { right: 16px; bottom: 16px; width: 56px; height: 56px; }
  .whatsapp-float svg { width: 28px; height: 28px; }

  .pipeline { flex-direction: column; }
  .pipeline-arrow { transform: rotate(90deg); align-self: center; }
}

/* ============================================================
   Dashboard interactivo (portafolio) — paleta derivada de #0B6E4F
   Análogos verde/teal + neutros + acento cobre para datos.
   ============================================================ */
:root {
  --dash-bg: #FBFCFB;
  --dash-card: #FFFFFF;
  --dash-border: #E2E8E4;
  --dash-ink: #1F2937;        /* AA en blanco (~13:1) */
  --dash-muted: #475569;      /* AA en blanco (~8:1)  */
  --dash-faint: #64748B;
  --dash-grid: #EEF2EF;
  --c-green: #0B6E4F;
  --c-green-dk: #064E3B;
  --c-teal: #0F3D4C;
  --c-lime: #6FA52E;          /* lima más oscuro que #8BC34A para AA en texto/relleno */
  --c-copper: #B45309;        /* acento cálido que contrasta con el verde */
}

.dash { background: var(--dash-bg); border: 1px solid var(--dash-border); border-radius: var(--r-panel); padding: 22px; box-shadow: var(--shadow-card); }

/* Barra superior: pestañas + filtros */
.dash-bar { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.dash-tabs { display: flex; flex-wrap: wrap; gap: 6px; background: var(--cloud); border: 1px solid var(--dash-border); border-radius: var(--r-pill); padding: 5px; }
.dash-tab {
  border: 0; background: transparent; color: var(--dash-muted); cursor: pointer;
  font: inherit; font-weight: 700; font-size: .9rem; padding: 9px 16px; border-radius: var(--r-pill);
  transition: background .16s ease, color .16s ease; white-space: nowrap;
}
.dash-tab:hover { color: var(--c-green); }
.dash-tab.active { background: var(--c-green); color: #fff; box-shadow: 0 6px 16px rgba(11,110,79,0.24); }

.dash-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.dash-field { display: grid; gap: 4px; }
.dash-field span { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--dash-faint); }
.dash-field select {
  min-height: 42px; min-width: 140px; border: 1px solid var(--dash-border); border-radius: var(--r-sm);
  padding: 8px 12px; font: inherit; font-weight: 600; color: var(--dash-ink); background: #fff; cursor: pointer;
}
.dash-field select:focus { outline: 3px solid rgba(11,110,79,0.16); border-color: var(--c-green); }
.dash-reset {
  min-height: 42px; border: 1px solid var(--dash-border); background: #fff; color: var(--dash-muted);
  border-radius: var(--r-sm); padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer;
  transition: background .16s ease, color .16s ease, border-color .16s ease;
}
.dash-reset:hover { background: var(--light-green); color: var(--c-green-dk); border-color: var(--c-green); }

/* KPIs */
.dash-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.dash-kpi { background: var(--dash-card); border: 1px solid var(--dash-border); border-radius: var(--r-card); padding: 18px; box-shadow: var(--shadow-soft); }
.dash-kpi .k-label { font-size: .8rem; font-weight: 600; color: var(--dash-faint); margin-bottom: 8px; }
.dash-kpi .k-value { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; color: var(--c-teal); line-height: 1; }
.dash-kpi .k-delta { margin-top: 9px; font-size: .82rem; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.dash-kpi .k-delta.up { color: var(--c-green); }
.dash-kpi .k-delta.down { color: var(--red); }
.dash-kpi .k-delta.flat { color: var(--dash-faint); }
.dash-kpi .k-delta .k-sub { color: var(--dash-faint); font-weight: 500; }

/* Grid de gráficos */
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.dash-card-chart { background: var(--dash-card); border: 1px solid var(--dash-border); border-radius: var(--r-card); padding: 18px 18px 14px; box-shadow: var(--shadow-soft); min-width: 0; }
.dash-card-wide { grid-column: 1 / -1; }
.dash-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.dash-card-head h3 { font-size: 1.02rem; margin: 0; color: var(--dash-ink); }
.dash-hint { font-size: .76rem; color: var(--dash-faint); font-weight: 600; display: inline-flex; align-items: center; gap: 5px; }
.dash-hint::before { content: "↗"; color: var(--c-copper); font-weight: 900; }

.dash-toggle { display: inline-flex; background: var(--cloud); border: 1px solid var(--dash-border); border-radius: var(--r-pill); padding: 3px; }
.dash-toggle button { border: 0; background: transparent; color: var(--dash-muted); font: inherit; font-weight: 700; font-size: .8rem; padding: 6px 13px; border-radius: var(--r-pill); cursor: pointer; }
.dash-toggle button.active { background: #fff; color: var(--c-green-dk); box-shadow: var(--shadow-soft); }

.dash-canvas-wrap { position: relative; height: 300px; }
.dash-card-wide .dash-canvas-wrap { height: 320px; }

/* Tabla / ranking */
.dash-table-wrap { overflow-x: auto; }
.dash-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.dash-table th, .dash-table td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--dash-border); white-space: nowrap; }
.dash-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--dash-faint); font-weight: 800; }
.dash-table td { color: var(--dash-ink); }
.dash-table td.num, .dash-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.dash-table tbody tr:hover { background: var(--cloud); }
.dash-table .rank { color: var(--dash-faint); font-weight: 800; width: 26px; }
.dash-bar-cell { position: relative; }
.dash-bar-cell .barfill { position: absolute; left: 0; top: 50%; transform: translateY(-50%); height: 22px; background: rgba(11,110,79,0.10); border-radius: 6px; z-index: 0; }
.dash-bar-cell span { position: relative; z-index: 1; }

.dash-foot { margin-top: 16px; color: var(--dash-faint); font-size: .82rem; }
.dash-active-filter { display: inline-flex; align-items: center; gap: 7px; background: var(--light-green); color: var(--c-green-dk); border-radius: var(--r-pill); padding: 5px 13px; font-size: .82rem; font-weight: 700; }
.dash-active-filter button { border: 0; background: transparent; color: var(--c-green-dk); cursor: pointer; font-weight: 900; font-size: 1rem; line-height: 1; padding: 0; }

/* Chart del caso demostrativo (hero del portafolio) */
.case-chart-wrap { position: relative; height: 230px; margin-top: 4px; }
.case-chart-legend { display: grid; gap: 7px; margin-top: 6px; }
.case-chart-legend .leg { display: flex; align-items: center; gap: 9px; font-size: .88rem; color: var(--dash-muted); }
.case-chart-legend .dot { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }
.case-chart-legend .leg b { color: var(--dash-ink); margin-left: auto; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
  .dash-grid { grid-template-columns: 1fr; }
  .dash-card-wide { grid-column: auto; }
  .dash-kpis { grid-template-columns: repeat(2, 1fr); }
  .dash-bar { flex-direction: column; align-items: stretch; }
  .dash-filters { justify-content: flex-start; }
}
@media (max-width: 480px) {
  .dash { padding: 14px; }
  .dash-kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .dash-kpi .k-value { font-size: 1.4rem; }
  .dash-field select { min-width: 0; width: 100%; }
  .dash-field { width: 100%; }
}

/* ============================================================
   Estilos de artículo / blog (Recursos)
   Reutilizables por cualquier recurso publicado.
   ============================================================ */
.article-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.article-meta span {
  display: inline-flex; align-items: center; gap: 7px;
  background: rgba(223,245,234,0.12); color: var(--light-green);
  border-radius: var(--r-pill); padding: 6px 14px; font-size: .82rem; font-weight: 600;
}
.article-meta span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }

.article-body { max-width: 768px; margin: 0 auto; }
.article-body > p,
.article-body > ul,
.article-body > ol { font-size: 1.07rem; line-height: 1.78; color: #2a3340; }
.article-body > p { margin: 0 0 20px; }
.article-body h2 { font-size: clamp(1.5rem, 3vw, 2rem); margin: 48px 0 16px; }
.article-body h2::after {
  content: ""; display: block; width: 54px; height: 4px; border-radius: 2px;
  background: var(--grad-growth); margin-top: 14px;
}
.article-body h3 { font-size: 1.22rem; margin: 32px 0 12px; color: var(--teal); }
.article-body ul, .article-body ol { padding-left: 0; margin: 0 0 22px; }
.article-body ul li, .article-body ol li { margin-bottom: 10px; }
.article-body ul.clean-list li { padding-left: 30px; }
.article-body a:not(.btn):not(.card-link) { color: var(--primary); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.article-body a:not(.btn):not(.card-link):hover { color: var(--primary-dark); }
.article-body strong { color: var(--text); }

/* Resumen "En 30 segundos" */
.tldr {
  background: var(--light-green); border: 1px solid rgba(11,110,79,0.18);
  border-radius: var(--r-card); padding: 22px 24px; margin: 0 0 36px;
}
.tldr h2 { margin: 0 0 12px; font-size: 1.05rem; color: var(--primary-dark); text-transform: uppercase; letter-spacing: .08em; }
.tldr h2::after { display: none; }
.tldr ul { margin: 0; padding-left: 0; }
.tldr li { padding-left: 26px; position: relative; font-size: .98rem; color: var(--primary-dark); margin-bottom: 8px; }
.tldr li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--primary); font-weight: 900; }

/* Cita destacada */
.pull-quote {
  margin: 36px 0; padding: 8px 0 8px 26px; border-left: 4px solid var(--accent);
}
.pull-quote p {
  font-size: clamp(1.25rem, 2.6vw, 1.6rem); line-height: 1.4; font-weight: 700;
  letter-spacing: -0.01em; color: var(--teal); margin: 0 0 10px; font-style: italic;
}
.pull-quote cite { font-style: normal; font-weight: 600; color: var(--muted); font-size: .95rem; }
.pull-quote cite b { color: var(--primary-dark); font-weight: 700; }

/* Figuras y gráficos */
.article-figure { margin: 32px 0; }
.article-figure figcaption { font-size: .9rem; color: var(--muted); margin-top: 12px; text-align: center; }
.article-figure svg { display: block; width: 100%; height: auto; }

.chart-box {
  background: #fff; border: 1px solid var(--dash-border); border-radius: var(--r-card);
  padding: 20px 20px 14px; box-shadow: var(--shadow-soft);
}
.chart-box h4 { margin: 0 0 4px; font-size: 1rem; color: var(--dash-ink); }
.chart-box .chart-sub { margin: 0 0 12px; font-size: .85rem; color: var(--dash-faint); }
.chart-canvas-sm { position: relative; height: 290px; }

/* Tabla comparativa */
.compare-table { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: .96rem; overflow: hidden; border-radius: var(--r-card); border: 1px solid var(--border); }
.compare-table th, .compare-table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: top; }
.compare-table thead th { background: var(--primary-dark); color: #fff; font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
.compare-table tbody th { background: var(--cloud); color: var(--teal); font-weight: 700; width: 26%; }
.compare-table tbody tr:last-child th, .compare-table tbody tr:last-child td { border-bottom: 0; }
.compare-table td { color: #2a3340; }

/* Llamado / nota dentro del artículo */
.callout {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--data-mist); border: 1px solid rgba(11,110,79,0.12);
  border-radius: var(--r-card); padding: 18px 20px; margin: 30px 0;
}
.callout .callout-icon { flex-shrink: 0; width: 38px; height: 38px; border-radius: 11px; background: #fff; color: var(--primary); display: grid; place-items: center; border: 1px solid rgba(11,110,79,0.15); }
.callout .callout-icon svg { width: 20px; height: 20px; }
.callout p { margin: 0; font-size: .98rem; color: var(--primary-dark); }

/* Caja de pasos numerados */
.steps-mini { counter-reset: smini; display: grid; gap: 14px; margin: 8px 0 24px; padding: 0; list-style: none; }
.steps-mini li { position: relative; padding-left: 52px; min-height: 38px; display: flex; flex-direction: column; justify-content: center; }
.steps-mini li::before {
  counter-increment: smini; content: counter(smini);
  position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 11px;
  background: var(--light-green); color: var(--primary-dark); font-weight: 800;
  display: grid; place-items: center; font-size: 1rem;
}

/* Fuentes */
.sources { font-size: .92rem; color: var(--muted); }
.sources li { margin-bottom: 8px; }

/* Bio / autor */
.author-card {
  display: flex; gap: 16px; align-items: center; margin-top: 36px;
  background: var(--cloud); border: 1px solid var(--border); border-radius: var(--r-card); padding: 20px 22px;
}
.author-card .avatar { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; background: var(--grad-primary); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.author-card p { margin: 0; font-size: .92rem; color: var(--muted); }
.author-card strong { color: var(--text); display: block; font-size: .98rem; }

@media (max-width: 560px) {
  .compare-table thead { display: none; }
  .compare-table, .compare-table tbody, .compare-table tr, .compare-table th, .compare-table td { display: block; width: 100%; }
  .compare-table tr { border-bottom: 1px solid var(--border); padding: 6px 0; }
  .compare-table tbody th { background: transparent; padding-bottom: 4px; }
  .compare-table td { border-bottom: 0; padding-top: 2px; }
  .compare-table td::before { content: attr(data-label); display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--dash-faint); font-weight: 700; margin-bottom: 2px; }
}

/* ===== Fundador, formación y certificaciones (Sobre) ===== */
.founder { align-items: center; }
.founder-photo img {
  width: 100%; max-width: 360px; height: auto; display: block;
  border-radius: var(--r-card); box-shadow: var(--shadow-card);
}
.founder-bio h3 { margin-bottom: 2px; }
.founder-role { color: var(--primary); font-weight: 600; margin: 0 0 14px; }
.credentials { margin-top: 44px; }
.credentials > h3 { margin-bottom: 16px; }
.degree {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--light-green); border: 1px solid rgba(11,110,79,0.18);
  border-radius: 14px; padding: 18px 20px; margin-bottom: 26px;
}
.degree-icon { flex: 0 0 auto; color: var(--primary); line-height: 0; }
.degree-icon svg { width: 30px; height: 30px; }
.degree-title { font-weight: 700; color: var(--text); margin: 0 0 4px; }
.degree-sub { color: var(--muted); margin: 0; font-size: .95rem; }
.cert-intro { color: var(--muted); font-size: .9rem; margin: 0 0 14px; }
.cert-badges { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.cert-badge {
  display: block; text-decoration: none; background: #fff;
  border: 1px solid var(--border); border-radius: 12px; overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.cert-badge:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.cert-badge img { width: 100%; height: auto; display: block; border-bottom: 1px solid #eef2f0; }
.cert-badge span { display: block; padding: 12px 14px; font-weight: 600; color: var(--text); font-size: .9rem; }
@media (min-width: 760px) { .cert-badges { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 640px) { .founder-photo img { margin: 0 auto 8px; } }
