:root {
  --navy-900: #071528;
  --navy-800: #0b1f3a;
  --navy-700: #13305a;
  --navy-600: #1d4277;
  --amber: #f5b700;
  --amber-soft: #fff4cc;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --text: #13213a;
  --muted: #5b6b85;
  --line: #dfe5ee;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(11, 31, 58, .06), 0 4px 16px rgba(11, 31, 58, .06);
  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-head: "Barlow Condensed", "Barlow", system-ui, sans-serif;
  --topbar-h: 58px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--topbar-h) + 8px); -webkit-text-size-adjust: 100%; }
html.lock { overflow: hidden; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.1; margin: 0; letter-spacing: .01em; }
button { font: inherit; color: inherit; }

.icon { width: 1em; height: 1em; display: inline-block; vertical-align: middle; flex: none; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* ---------- Topbar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px;
  padding-top: env(safe-area-inset-top);
  background: rgba(7, 21, 40, .92);
  backdrop-filter: saturate(150%) blur(10px);
  -webkit-backdrop-filter: saturate(150%) blur(10px);
  color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  display: grid; place-items: center;
  background: var(--amber); color: var(--navy-900); font-size: 20px;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text strong { font-family: var(--font-head); font-size: 18px; letter-spacing: .02em; }
.brand-text small { font-size: 12px; opacity: .75; }
.nav { display: flex; gap: 2px; }
.nav a {
  text-decoration: none; font-size: 14px; font-weight: 600;
  padding: 8px 10px; border-radius: 999px; opacity: .85;
}
.nav a:hover, .nav a:focus-visible { background: rgba(255,255,255,.1); opacity: 1; }
@media (max-width: 380px) { .brand-text small { display: none; } .nav a { padding: 8px 8px; font-size: 13px; } }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  color: #fff;
  background:
    radial-gradient(120% 80% at 100% 0%, rgba(245,183,0,.18), transparent 55%),
    linear-gradient(160deg, var(--navy-800) 0%, var(--navy-900) 100%);
}
.hero::after {
  content: ""; position: absolute; right: -60px; bottom: -40px; width: 260px; height: 260px;
  background: url("../assets/icon.svg") no-repeat center / contain; opacity: .06; pointer-events: none;
}
.hero-inner { position: relative; max-width: 1080px; margin: 0 auto; padding: 44px 16px 36px; }
.eyebrow { margin: 0 0 12px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--amber); }
.hero h1 { font-size: clamp(44px, 12vw, 76px); text-transform: uppercase; }
.hero .accent { color: var(--amber); }
.lema { margin: 14px 0 26px; font-size: 19px; max-width: 32ch; opacity: .9; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font-weight: 600; text-decoration: none; border: 0; cursor: pointer;
}
.btn-primary { background: var(--amber); color: var(--navy-900); }
.btn-ghost { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.stats {
  list-style: none; margin: 32px 0 0; padding: 18px 0 0;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.stats b { display: block; font-family: var(--font-head); font-size: 34px; color: var(--amber); line-height: 1; }
.stats span { font-size: 13px; opacity: .8; }

/* ---------- Sections ---------- */
.section { padding: 48px 0; }
.kicker { margin: 0 0 6px; font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--navy-600); }
.section-title { font-size: clamp(30px, 8vw, 42px); color: var(--navy-800); }
.section-sub { margin: 8px 0 24px; color: var(--muted); }
.lead { font-size: 18px; margin: 14px 0 20px; max-width: 62ch; }

.intro { background: var(--surface); }
.values { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.values li {
  padding: 8px 16px; border-radius: 999px; font-weight: 600;
  background: var(--amber-soft); color: #7a5a00;
}

/* ---------- Organigrama ---------- */
.org-label {
  font-size: 15px; font-family: var(--font); font-weight: 600; text-transform: uppercase; letter-spacing: .08em;
  color: var(--muted); margin: 28px 0 12px; display: flex; align-items: center; gap: 10px;
}
.org-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.org-top { display: flex; justify-content: center; position: relative; padding-bottom: 20px; }
.org-top::after { content: ""; position: absolute; bottom: 0; left: 50%; width: 2px; height: 20px; background: var(--line); }

.org-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 720px) { .org-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; } }
#org-csj { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 720px) { #org-csj { grid-template-columns: repeat(4, 1fr); } }

.org-card {
  width: 100%; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 12px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px;
  transition: transform .15s ease, border-color .15s ease;
}
.org-card:hover, .org-card:focus-visible { border-color: var(--navy-600); transform: translateY(-2px); outline: none; }
.org-card:active { transform: scale(.98); }
.org-card .org-head { display: flex; align-items: center; gap: 8px; }
.org-card .org-icon {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--navy-800); color: var(--amber); font-size: 16px;
}
.org-card .org-name { font-family: var(--font-head); font-size: 18px; color: var(--navy-800); line-height: 1.05; }
.org-people { display: flex; flex-direction: column; gap: 6px; }
.person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.person .who { min-width: 0; display: flex; flex-direction: column; line-height: 1.2; }
.person .who b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person .who b.tbd { color: var(--muted); font-weight: 500; font-style: italic; padding-right: 2px; }
.person .who small { font-size: 12px; color: var(--muted); }

.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; overflow: hidden;
  display: grid; place-items: center;
  background: #e8edf5; color: var(--navy-600); font-weight: 600; font-size: 13px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar .icon { font-size: 20px; opacity: .55; }
.avatar.lg { width: 84px; height: 84px; font-size: 26px; }
.avatar.lg .icon { font-size: 44px; }
.avatar.md { width: 48px; height: 48px; font-size: 16px; }
.avatar.md .icon { font-size: 26px; }

.org-card.featured {
  max-width: 300px; align-items: center; text-align: center; padding: 20px 16px;
  background: linear-gradient(160deg, var(--navy-800), var(--navy-900)); color: #fff; border: 0;
}
.org-card.featured .org-role { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--amber); }
.org-card.featured .org-person-name { font-family: var(--font-head); font-size: 24px; }
.org-card.featured .org-person-name.tbd { opacity: .7; font-family: var(--font); font-style: italic; font-size: 17px; font-weight: 500; }
.org-card.featured .avatar { background: rgba(255,255,255,.12); color: #fff; box-shadow: 0 0 0 3px var(--amber); }

/* ---------- Cartera cards ---------- */
.carteras { background: var(--surface); }
.card-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .card-grid { grid-template-columns: repeat(4, 1fr); } }

.card {
  width: 100%; text-align: left; cursor: pointer;
  display: flex; align-items: center; gap: 14px;
  background: var(--bg); border: 1px solid transparent; border-radius: var(--radius);
  padding: 16px; transition: border-color .15s ease, background .15s ease;
}
.card:hover, .card:focus-visible { border-color: var(--navy-600); background: #fff; outline: none; }
.card:active { transform: scale(.99); }
.card-icon {
  width: 46px; height: 46px; border-radius: 12px; flex: none; display: grid; place-items: center;
  background: var(--navy-800); color: var(--amber); font-size: 22px;
}
.card-text { flex: 1; min-width: 0; }
.card-title { display: block; font-family: var(--font-head); font-size: 20px; color: var(--navy-800); line-height: 1.1; }
.card-hook { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.card .chev { color: var(--muted); font-size: 20px; }
@media (min-width: 960px) {
  .carteras .card { flex-direction: column; align-items: flex-start; }
  .carteras .card .chev { display: none; }
}

/* ---------- Diagnóstico ---------- */
.diagnostico { background: var(--navy-800); color: #fff; }
.diagnostico .kicker { color: var(--amber); }
.diagnostico blockquote { margin: 8px 0 0; padding-left: 16px; border-left: 4px solid var(--amber); max-width: 70ch; }
.diagnostico blockquote p { font-size: 18px; margin: 0 0 12px; opacity: .92; }
.diagnostico strong { color: var(--amber); font-weight: 600; }

/* ---------- Propuestas ---------- */
.chips {
  display: flex; gap: 8px; overflow-x: auto; margin: 0 -16px 18px; padding: 2px 16px 6px;
  scrollbar-width: none; scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  min-height: 40px; padding: 0 16px; border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line);
  font-size: 15px; font-weight: 600; color: var(--navy-700);
}
.chip[aria-selected="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip .icon { color: var(--amber); }

.prop-list { display: grid; grid-template-columns: 1fr; gap: 10px; }
@media (min-width: 640px) { .prop-list { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .prop-list { grid-template-columns: repeat(3, 1fr); } }
.prop-list .card { background: var(--surface); box-shadow: var(--shadow); }
.prop-list .card-icon { background: var(--amber-soft); color: #8a6500; width: 42px; height: 42px; font-size: 20px; }
.prop-list .card-title { font-size: 19px; }
.tema-tag { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--navy-600); }

/* ---------- Footer ---------- */
.footer { background: var(--navy-900); color: #fff; padding: 32px 0 calc(32px + env(safe-area-inset-bottom)); text-align: center; }
.footer .wrap { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.footer .brand-mark { margin-bottom: 8px; }
.footer p { margin: 0; }
.footer .muted { opacity: .65; font-size: 14px; }

/* ---------- Popup (bottom sheet en móvil) ---------- */
.sheet {
  border: 0; padding: 0; margin: 0;
  width: 100%; max-width: 100%; max-height: 88vh; max-height: 88dvh;
  inset: auto 0 0 0;
  border-radius: 22px 22px 0 0;
  background: var(--surface); color: var(--text);
  box-shadow: 0 -8px 40px rgba(0,0,0,.25);
  overflow: hidden;
}
.sheet[open] { display: flex; flex-direction: column; animation: sheet-up .28s cubic-bezier(.2,.8,.2,1); }
.sheet::backdrop { background: rgba(7, 21, 40, .55); animation: fade .2s ease; }
.sheet-handle { width: 44px; height: 5px; border-radius: 3px; background: var(--line); margin: 10px auto 0; flex: none; }
.sheet-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--bg); color: var(--navy-800); font-size: 20px;
  display: grid; place-items: center;
}
.sheet-body { overflow-y: auto; overscroll-behavior: contain; padding: 14px 20px calc(28px + env(safe-area-inset-bottom)); }

@media (min-width: 720px) {
  .sheet {
    inset: 0; margin: auto; width: min(560px, 92vw); max-height: 84vh;
    border-radius: 22px;
  }
  .sheet[open] { animation: pop .22s cubic-bezier(.2,.8,.2,1); }
  .sheet-handle { display: none; }
  .sheet-body { padding: 28px 28px 32px; }
}
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sheet[open], .sheet::backdrop { animation: none; }
}

.s-head { display: flex; align-items: center; gap: 12px; padding-right: 44px; margin-top: 6px; }
.s-head .card-icon { width: 48px; height: 48px; }
.s-kicker { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--navy-600); }
.s-title { font-size: 28px; color: var(--navy-800); }
.s-hook { margin: 12px 0 0; font-size: 18px; font-weight: 600; color: #8a6500; }
.s-intro { margin: 10px 0 0; color: var(--muted); }
.s-section { margin-top: 22px; }
.s-section h3 { font-family: var(--font); font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.s-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.s-list li { position: relative; padding-left: 28px; }
.s-list li::before {
  content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--amber-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a6500' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center / 12px;
}
.s-team { display: flex; flex-direction: column; gap: 8px; }
.s-team .dupla { background: var(--bg); border-radius: 14px; padding: 12px; }
.s-team .dupla-role { font-family: var(--font-head); font-size: 17px; color: var(--navy-800); margin-bottom: 8px; }
.s-team .dupla-people { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.s-team .dupla-people.single { grid-template-columns: 1fr; }
.s-team .person .who b { white-space: normal; }
.s-link { margin-top: 22px; width: 100%; background: var(--navy-800); color: #fff; }
