/* ============================================================
   KADI — sistema de diseño del sitio institucional.
   Sitio estático, sin dependencias de build.
   ============================================================ */

:root {
  /* Color — base */
  --navy-950: #0a1220;
  --navy-900: #0e1a2e;
  --navy-800: #14253f;
  --navy-700: #1d3559;
  --navy-600: #2a4879;
  --gold-600: #a9821c;
  --gold-ink: #7a5e14; /* dorado oscurecido para texto pequeño sobre fondos claros — AA (5.7:1) */
  --gold-500: #c9a227;
  --gold-300: #e2c766;
  --paper: #f6f7fa;
  --paper-raised: #ffffff;
  --line: #dde1e8;
  --line-strong: #c3c9d4;
  --ink-900: #10161f;
  --ink-700: #333d4d;
  --ink-500: #5b6577;
  --ink-400: #7c8598;
  --ok-600: #1c6b4c;
  --ok-100: #e4f2ec;
  --warn-700: #8a5a10;
  --warn-100: #f7ecd6;
  --plan-700: #3b4b63;
  --plan-100: #e7eaf0;
  --danger-700: #8a2a1c;

  /* Type */
  --font-display: "Outfit", "Public Sans", system-ui, sans-serif;
  --font-body: "Public Sans", system-ui, -apple-system, sans-serif;

  /* Layout */
  --content-max: 74rem;
  --text-max: 42rem;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2.25rem;
  --space-6: 3.5rem;
  --space-7: 5.5rem;
  --shadow-card: 0 1px 2px rgba(14, 26, 46, 0.06), 0 8px 24px -12px rgba(14, 26, 46, 0.18);
}

@media (prefers-color-scheme: dark) {
  :root { color-scheme: light; }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink-900);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--navy-900);
  line-height: 1.15;
  margin: 0 0 var(--space-3);
  font-weight: 600;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 1.6rem + 2vw, 3.25rem); font-weight: 650; }
h2 { font-size: clamp(1.5rem, 1.3rem + 1vw, 2.1rem); }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.05rem; }

p { margin: 0 0 var(--space-3); max-width: var(--text-max); }
p.lede { font-size: 1.15rem; color: var(--ink-700); }
ul, ol { margin: 0 0 var(--space-3); padding-left: 1.25rem; }
li { margin-bottom: 0.4rem; }
a { color: var(--navy-700); }
a:hover { color: var(--gold-ink); }
strong { color: var(--navy-900); }
code, pre { font-family: "SFMono-Regular", ui-monospace, Menlo, Consolas, monospace; }
code { background: var(--navy-950); color: var(--gold-300); padding: 0.1em 0.4em; border-radius: 4px; font-size: 0.85em; }

:focus-visible {
  outline: 3px solid var(--gold-500);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--navy-900);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

img { max-width: 100%; display: block; }

.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--space-4);
}

.section { padding: var(--space-7) 0; }
.section--tight { padding: var(--space-6) 0; }
.section--dark { background: var(--navy-900); color: #cfd7e6; }
.section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--dark p { color: #b7c1d6; }
.section--dark a { color: var(--gold-300); }
.section--raised { background: var(--paper-raised); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

.section-head { max-width: 40rem; margin-bottom: var(--space-5); }
.section-head .kicker { display: block; font-family: var(--font-display); font-size: 0.95rem; color: var(--gold-ink); margin-bottom: 0.4rem; font-weight: 600; }
.section--dark .section-head .kicker { color: var(--gold-300); }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 247, 250, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.25rem;
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img, .brand svg { height: 28px; width: auto; }
.brand-word { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; color: var(--navy-900); letter-spacing: -0.01em; }
.brand-word small { display: block; font-family: var(--font-body); font-weight: 500; font-size: 0.62rem; color: var(--ink-500); letter-spacing: 0.02em; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem 0.65rem;
  cursor: pointer;
}
.nav-toggle svg { display: block; }

.main-nav { display: flex; align-items: center; gap: 1.5rem; }
.main-nav ul { display: flex; gap: 1.35rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { color: var(--ink-700); text-decoration: none; font-size: 0.94rem; font-weight: 500; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--navy-900); }
.main-nav a[aria-current="page"] { border-bottom: 2px solid var(--gold-500); padding-bottom: 4px; }
.nav-cta { display: flex; align-items: center; gap: 0.75rem; }

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    position: fixed;
    inset: 4.25rem 0 0 0;
    background: var(--paper-raised);
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-4);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    overflow-y: auto;
  }
  .main-nav.is-open { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav li { border-bottom: 1px solid var(--line); }
  .main-nav a { display: block; padding: 0.9rem 0.1rem; }
  .nav-cta { flex-direction: column; align-items: stretch; margin-top: var(--space-3); }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.2;
}
.btn--primary { background: var(--navy-900); color: #fff; }
.btn--primary:hover { background: var(--navy-800); color: #fff; }
.btn--gold { background: var(--gold-500); color: var(--navy-950); }
.btn--gold:hover { background: var(--gold-600); color: var(--navy-950); }
.btn--ghost { background: transparent; color: var(--navy-900); border-color: var(--line-strong); }
.btn--ghost:hover { border-color: var(--navy-700); color: var(--navy-900); }
.section--dark .btn--ghost { color: #fff; border-color: #3a4a63; }
.btn--disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; pointer-events: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: var(--space-4); }

/* ---------- Hero ---------- */
.hero { padding: var(--space-7) 0 var(--space-6); }
.hero .container { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: var(--space-6); align-items: start; }
.hero h1 { margin-bottom: var(--space-3); }
.hero .lede { margin-bottom: var(--space-4); }
.hero-panel {
  background: var(--navy-900);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
}
.hero-panel h3 { color: #fff; font-size: 0.95rem; text-transform: none; letter-spacing: 0; margin-bottom: var(--space-3); }
.status-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.6rem; }
.status-list li { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; font-size: 0.9rem; border-bottom: 1px solid #23324c; padding-bottom: 0.6rem; }
.status-list li:last-child { border-bottom: none; padding-bottom: 0; }
.status-list .num { font-family: var(--font-display); font-weight: 700; color: var(--gold-300); font-size: 1.15rem; }
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
}

/* ---------- Pill / tag (truth-tier system) ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}
.tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; display: inline-block; }
.tag--entregado { background: var(--ok-100); color: var(--ok-600); }
.tag--entregado::before { background: var(--ok-600); }
.tag--endurecimiento { background: var(--warn-100); color: var(--warn-700); }
.tag--endurecimiento::before { background: var(--warn-700); }
.tag--roadmap { background: var(--plan-100); color: var(--plan-700); }
.tag--roadmap::before { background: var(--plan-700); }

.legend { display: flex; flex-wrap: wrap; gap: 1rem; font-size: 0.88rem; color: var(--ink-500); margin: var(--space-3) 0 var(--space-5); }
.legend span { display: inline-flex; align-items: center; gap: 0.4rem; }

/* ---------- Grid / cards ---------- */
.grid { display: grid; gap: var(--space-4); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid--3, .grid--4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.card h3 { margin-bottom: 0.4rem; }
.card .tag { margin-bottom: 0.6rem; }
.card p:last-child { margin-bottom: 0; }

/* Module index — table-like list rather than icon cards */
.module-index { border-top: 1px solid var(--line); }
.module-row {
  display: grid;
  grid-template-columns: minmax(0,1.4fr) minmax(0,2.4fr) auto;
  gap: var(--space-3);
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--line);
}
.module-row h4 { margin: 0; }
.module-row p { margin: 0; color: var(--ink-500); font-size: 0.92rem; }
@media (max-width: 760px) {
  .module-row { grid-template-columns: 1fr; }
  .module-row .tag { justify-self: start; }
}

/* ---------- Evidence footnote ---------- */
.evidence {
  font-size: 0.82rem;
  color: var(--ink-500);
  border-left: 2px solid var(--line-strong);
  padding-left: 0.6rem;
  margin-top: 0.5rem;
}

/* ---------- Stat strip ---------- */
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); }
.stat { min-width: 0; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); padding: var(--space-3); text-align: left; }
.stat .n { font-family: var(--font-display); font-weight: 700; font-size: 1.9rem; color: var(--navy-900); display: block; overflow-wrap: anywhere; }
.stat .l { font-size: 0.84rem; color: var(--ink-500); overflow-wrap: anywhere; }
@media (max-width: 760px) { .stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .stat-strip { grid-template-columns: 1fr; } .stat .n { font-size: 1.55rem; } }

/* ---------- Timeline / roadmap ---------- */
.track { display: grid; grid-template-columns: 200px 1fr; gap: var(--space-4); margin-bottom: var(--space-5); }
.track-label { position: sticky; top: 6rem; align-self: start; }
.track-label h3 { margin-bottom: 0.25rem; }
.track-items { display: flex; flex-direction: column; gap: var(--space-3); border-left: 2px solid var(--line); padding-left: var(--space-4); }
.track-item { position: relative; }
.track-item::before { content: ""; position: absolute; left: calc(-1 * var(--space-4) - 5px); top: 0.4rem; width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.track-item.is-entregado::before { background: var(--ok-600); }
.track-item.is-endurecimiento::before { background: var(--warn-700); }
.track-item.is-roadmap::before { background: var(--plan-700); }
.track-item h4 { margin-bottom: 0.2rem; }
.track-item p { color: var(--ink-500); font-size: 0.94rem; }
@media (max-width: 700px) {
  .track { grid-template-columns: 1fr; }
  .track-label { position: static; }
}

/* ---------- Architecture diagram block ---------- */
.diagram {
  background: var(--navy-950);
  color: #d7deec;
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  overflow-x: auto;
}
.diagram pre { margin: 0; font-size: 0.86rem; line-height: 1.55; }
.diagram .cap { color: var(--ink-400); font-size: 0.8rem; margin-top: 0.75rem; }

/* ---------- Audience switch (home) ---------- */
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-4); }
.audience-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-raised);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-card);
}
.audience-card:hover { border-color: var(--gold-500); }
.audience-card .eyebrow { font-family: var(--font-display); color: var(--gold-ink); font-weight: 600; font-size: 0.88rem; margin-bottom: 0.4rem; }
.audience-card h3 { margin-bottom: 0.5rem; }
.audience-card p { color: var(--ink-500); font-size: 0.94rem; margin-bottom: var(--space-3); }
.audience-card .go { margin-top: auto; font-weight: 600; color: var(--navy-900); font-size: 0.92rem; }
@media (max-width: 860px) { .audience-grid { grid-template-columns: 1fr; } }

/* ---------- FAQ (native details) ---------- */
.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: var(--space-3) 0;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy-900);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.3rem;
  color: var(--gold-ink);
  flex-shrink: 0;
  font-family: var(--font-body);
}
.faq-item[open] summary::after { content: "\2212"; }
.faq-item .a { padding: 0 0 var(--space-3); color: var(--ink-700); max-width: var(--text-max); }

/* ---------- Forms ---------- */
form.contact-form { display: flex; flex-direction: column; gap: var(--space-3); max-width: 34rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label { font-weight: 600; font-size: 0.92rem; color: var(--navy-900); }
.field .hint { font-size: 0.8rem; color: var(--ink-500); }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  color: var(--ink-900);
  min-height: 44px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: 3px solid var(--gold-500); outline-offset: 1px; }
.field input:user-invalid, .field select:user-invalid, .field textarea:user-invalid { border-color: var(--danger-700); }
fieldset { border: none; padding: 0; margin: 0; }
legend { font-family: var(--font-display); font-weight: 600; padding: 0; margin-bottom: 0.6rem; color: var(--navy-900); }
.radio-row, .check-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.radio-row label, .check-row label { display: inline-flex; align-items: center; gap: 0.4rem; font-weight: 500; font-size: 0.92rem; border: 1px solid var(--line-strong); border-radius: 999px; padding: 0.45rem 0.9rem; cursor: pointer; }
.radio-row input, .check-row input { accent-color: var(--navy-900); }
.form-note { font-size: 0.82rem; color: var(--ink-500); }
.hp-field { position: absolute; left: -9999px; top: -9999px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9fb0c9; padding: var(--space-6) 0 var(--space-4); }
.site-footer a { color: #cfd7e6; text-decoration: none; }
.site-footer a:hover { color: var(--gold-300); }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--space-4); margin-bottom: var(--space-5); }
.footer-grid h4 { color: #fff; font-size: 0.85rem; margin-bottom: 0.75rem; }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.5rem; font-size: 0.9rem; }
.footer-bottom { border-top: 1px solid #1d2b42; padding-top: var(--space-3); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; font-size: 0.82rem; }
@media (max-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- Utility ---------- */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.text-muted { color: var(--ink-500); }
.small { font-size: 0.86rem; }
.divider { border: none; border-top: 1px solid var(--line); margin: var(--space-5) 0; }
.badge-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: var(--space-3); }
.btn-row--center { justify-content: center; }
.narrow { max-width: 34rem; margin: 0 auto; }
.narrow--md { max-width: 38rem; margin: 0 auto; }
.mt-loose { margin-top: 2rem; }
.grid--align-start { align-items: start; }
.plain-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.9rem; }
.checkbox-field { display: flex; flex-direction: row; align-items: flex-start; gap: 0.5rem; font-weight: 500; }
.checkbox-field input { margin-top: 0.2rem; min-height: auto; }
.footer-brand { margin-bottom: 0.75rem; }
.footer-brand .brand-word { color: #fff; }
.footer-tagline { max-width: 20rem; }
.note-box {
  background: var(--warn-100);
  border: 1px solid #e7d3a0;
  color: var(--warn-700);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
  font-size: 0.92rem;
}
.note-box strong { color: var(--warn-700); }

/* ---------- Data tables (stack, planes) ---------- */
.data-table { width: 100%; border-collapse: collapse; background: var(--paper-raised); border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 0.75rem 1rem; border-bottom: 1px solid var(--line); font-size: 0.94rem; }
.data-table th[scope="row"] { font-weight: 600; color: var(--navy-900); width: 40%; }
.data-table tr:last-child th, .data-table tr:last-child td { border-bottom: none; }
.data-table thead th { background: var(--paper); font-family: var(--font-display); font-size: 0.82rem; color: var(--ink-500); }


/* Branding oficial */
.brand { gap: 0.75rem; }
.brand-logo-shell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy-900);
  border-radius: 8px;
  padding: 5px 8px;
  min-height: 42px;
}
.brand-logo-shell img {
  display: block;
  height: 32px;
  width: auto;
  max-width: 116px;
}
.footer-brand .brand-logo-shell {
  background: var(--navy-800);
}
.footer-brand .brand-logo-shell img {
  height: 28px;
}
.brand-word.brand-label {
  display: flex;
  flex-direction: column;
}
@media (max-width: 560px) {
  .brand-word.brand-label { display: none; }
  .brand-logo-shell img { height: 29px; }
}

/* V2 — Founders, inversión y contacto */
.featured-card { border-color: var(--gold-500); box-shadow: 0 1px 2px rgba(14,26,46,.06), 0 14px 34px -18px rgba(169,130,28,.45); }
.kicker { font-family: var(--font-display); color: var(--gold-ink); font-weight: 600; font-size: .92rem; display: inline-block; margin-bottom: .55rem; }
.section--dark .kicker { color: var(--gold-300); }
.contact-form .hint { font-weight: 400; }
.data-table table { width: 100%; }
@media (max-width: 1180px) { .main-nav { gap: .8rem; } .main-nav ul { gap: .75rem; } .main-nav a { font-size: .88rem; } }
