/* ============================================================
   TOKENS — DESIGN SYSTEM (idénticos al HOME validado)
   ============================================================ */
:root {
  --navy:          #0D1B2A;
  --navy-light:    #152236;
  --navy-dark:     #080F18;
  --aegis-black:   #0A0E17;
  --gold:          #B8975A;
  --gold-dm:       #C4A466;
  --bg:            #F8F7F4;
  --bg-alt:        #F2F0EB;
  --white:         #FFFFFF;
  --gray-dark:     #2C3E50;
  --gray-mid:      #6B7B8D;
  --gray-light:    #B0BEC5;
  --gray-lightest: #ECEFF1;
  --green:         #27AE60;
  --red:           #C0392B;
}

/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  font-size: 1rem; line-height: 1.6; color: var(--gray-dark);
  background: var(--bg);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============================================================
   LAYOUT
   ============================================================ */
.container { max-width: 100%; margin: 0 auto; padding: 0 20px; }
.section   { padding: 48px 0; }
.sec-white { background: var(--white); }
.sec-alt   { background: var(--bg-alt); }
.sec-navy  { background: var(--navy); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1 { font-size: 2rem;   font-weight: 800; line-height: 1.15; letter-spacing: -0.025em; }
h2 { font-size: 1.5rem; font-weight: 700; line-height: 1.2;  letter-spacing: -0.02em; }
h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.25; }

.label {
  display: block; font-size: 0.65rem; font-weight: 600;
  letter-spacing: 0.15em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.label-dm   { color: var(--gold-dm); }
.text-white { color: var(--bg); }
.text-center{ text-align: center; }

/* ============================================================
   MODO OSCURO .sec-navy — Reglas sistemáticas (igual que HOME)
   ============================================================ */
.sec-navy h1, .sec-navy h2, .sec-navy h3, .sec-navy h4 { color: var(--bg); }
.sec-navy p, .sec-navy li { color: rgba(248,247,244,0.80); }

/* ============================================================
   HEADER — Idéntico al HOME validado
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 900;
  height: 56px; background: var(--white);
  box-shadow: 0 1px 0 rgba(13,27,42,0.08), 0 2px 8px rgba(13,27,42,0.06);
}
.header-inner {
  height: 100%; display: flex; align-items: center;
  justify-content: space-between; max-width: 100%; padding: 0 20px;
}
.logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; }
.logo-text   { font-size: 15px; font-weight: 800; letter-spacing: -0.03em; }
.logo-shield { color: var(--navy); }
.logo-quant  { color: var(--gold); }

.nav-desktop { display: none; }
.nav-cta     { display: none !important; }
.nav-link {
  font-size: 0.8125rem; font-weight: 500; color: var(--gray-mid);
  letter-spacing: 0.04em; padding: 4px 0;
  border-bottom: 2px solid transparent;
  border-top: none; border-left: none; border-right: none;
  background: none; font-family: inherit; cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
  text-decoration: none; display: inline-block;
}
.nav-link:hover { color: var(--navy); }
.nav-link.active { color: var(--navy); border-bottom-color: var(--gold); font-weight: 600; }

.burger {
  display: flex; flex-direction: column; gap: 5px;
  cursor: pointer; padding: 8px; background: none; border: none;
}
.burger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px;
  transition: all 0.22s ease; transform-origin: center;
}
.burger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.open span:nth-child(2) { opacity: 0; }
.burger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mob-menu {
  display: none; position: fixed; top: 56px; left: 0; right: 0;
  background: var(--white); box-shadow: 0 8px 24px rgba(13,27,42,0.12);
  z-index: 899; padding: 8px 0 24px;
}
.mob-menu.open { display: block; }
.mob-link {
  display: block; padding: 14px 20px;
  font-size: 1rem; font-weight: 500; color: var(--gray-dark);
  border-left: 3px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
  text-decoration: none;
}
.mob-link:hover { background: var(--bg-alt); }
.mob-link.active {
  color: var(--navy); border-left-color: var(--gold);
  font-weight: 600; background: var(--bg-alt);
}
.mob-link-cta { display: block; margin: 12px 20px 0; }

/* ============================================================
   BUTTONS — Idénticos al HOME validado
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-family: inherit; font-size: 0.9375rem; font-weight: 600;
  letter-spacing: 0.04em; padding: 14px 28px; border-radius: 3px;
  cursor: pointer; border: none;
  transition: background 0.18s ease, transform 0.12s ease, opacity 0.18s ease;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }

/* btn-primary: navy → invierte a bg/navy en hover */
.btn-primary {
  background: var(--navy); color: var(--bg);
  border: 1.5px solid transparent;
}
.btn-primary:hover {
  background: var(--bg); color: var(--navy);
  border-color: var(--navy);
}

/* btn-ghost: para fondos oscuros */
.btn-ghost {
  background: transparent; color: var(--bg);
  border: 1.5px solid rgba(248,247,244,0.55);
}
.btn-ghost:hover { background: var(--bg); color: var(--navy); border-color: var(--bg); }

.btn-full { width: 100%; justify-content: center; }

/* ============================================================
   HERO
   ============================================================ */
.page-hero {
  padding: 72px 0 64px;
  background: var(--navy);
  text-align: center;
}
.hero-subtitle {
  font-size: 1rem; color: rgba(248,247,244,0.75);
  line-height: 1.75; margin: 20px auto 0; max-width: 900px;
}

/* ============================================================
   BANNERS / CITAS
   ============================================================ */
.banner {
  background: rgba(13,27,42,0.05);
  border-left: 3px solid var(--gold);
  padding: 16px 20px; font-style: italic;
  font-size: 0.9rem; color: var(--gray-mid);
  line-height: 1.7; border-radius: 0 3px 3px 0; margin-top: 24px;
}

/* ============================================================
   TABS — LOS 10 FUNDAMENTOS
   ============================================================ */
.tabs-nav {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px;
}
.tab-btn {
  font-family: inherit; font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.04em; padding: 8px 14px; border-radius: 3px;
  border: 1.5px solid var(--gray-lightest);
  background: var(--white); color: var(--gray-mid);
  cursor: pointer; transition: all 0.18s ease; white-space: nowrap;
}
.tab-btn:hover { border-color: var(--gold); color: var(--navy); }
.tab-btn.active { background: var(--navy); border-color: var(--navy); color: var(--bg); }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Tabla dentro de tab */
.fund-table {
  width: 100%; border-collapse: collapse; margin: 20px 0; font-size: 0.875rem;
}
.fund-table th {
  text-align: left; padding: 10px 14px;
  background: var(--navy); color: var(--gold-dm);
  font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.fund-table td {
  padding: 10px 14px; border-bottom: 1px solid var(--gray-lightest);
  color: var(--gray-dark); line-height: 1.6;
}
.fund-table tr:last-child td { border-bottom: none; }
.fund-table td:first-child { font-weight: 700; color: var(--navy); white-space: nowrap; }
.fund-table td.val-neg { color: var(--red);   font-weight: 700; }
.fund-table td.val-pos { color: var(--green); font-weight: 700; }

/* Frase de cierre y fuente dentro de tab */
.fund-cierre {
  font-style: italic; font-weight: 700; color: var(--navy);
  font-size: 0.9375rem; line-height: 1.5;
  border-top: 2px solid var(--gold);
  padding-top: 16px; margin-top: 20px;
}
.fund-fuente {
  font-size: 0.75rem; color: var(--gray-light);
  margin-top: 12px; font-style: italic;
}
.fund-body p {
  font-size: 0.9375rem; line-height: 1.8;
  color: var(--gray-dark); margin-bottom: 12px;
}
.fund-body p:last-of-type { margin-bottom: 0; }
.fund-body strong { color: var(--navy); }

/* ============================================================
   TRANSICIÓN (sección puente entre Acto II y III)
   Navy · padding reducido para función de strip narrativo
   ============================================================ */
.transicion {
  background: var(--navy);
  padding: 40px 0; text-align: center;
  border-top: 1px solid rgba(184,151,90,0.15);
  border-bottom: 1px solid rgba(184,151,90,0.15);
}
.transicion p {
  font-size: 1.0625rem; color: rgba(248,247,244,0.75);
  line-height: 1.75; max-width: 700px; margin: 0 auto;
}
.transicion p + p {
  margin-top: 10px; color: var(--gold-dm);
  font-weight: 600; font-size: 1.125rem;
}

/* ============================================================
   PILARES — ACTO III
   ============================================================ */
.pilares-grid { display: flex; flex-direction: column; gap: 0; margin-top: 36px; }
.pilar-item { border-bottom: 1px solid var(--gray-lightest); }
.pilar-item:first-child { border-top: 1px solid var(--gray-lightest); }
.pilar-head {
  width: 100%; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  padding: 22px 0; background: none; border: none;
  font-family: inherit; cursor: pointer; text-align: left;
  transition: color 0.15s ease;
}
.pilar-head:hover .pilar-num   { color: var(--gold); }
.pilar-head:hover .pilar-title { color: var(--gold); }
.pilar-left { display: flex; align-items: center; gap: 16px; }
.pilar-num {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--gold);
  flex-shrink: 0; transition: color 0.15s ease; min-width: 56px;
}
.pilar-title {
  font-size: 1rem; font-weight: 700; color: var(--navy);
  line-height: 1.3; transition: color 0.15s ease;
}
.pilar-icon {
  font-size: 1.25rem; font-weight: 400; color: var(--gold);
  flex-shrink: 0; transition: transform 0.22s ease; line-height: 1;
}
.pilar-head.open .pilar-icon { transform: rotate(45deg); }
.pilar-body { display: none; padding: 0 0 24px 72px; }
.pilar-body.open { display: block; }
.pilar-body p {
  font-size: 0.9375rem; line-height: 1.8;
  color: var(--gray-dark); margin-bottom: 12px;
}
.pilar-body p:last-of-type { margin-bottom: 0; }
.pilar-cierre {
  font-style: italic; font-weight: 700; color: var(--navy);
  font-size: 0.875rem; border-left: 3px solid var(--gold);
  padding-left: 14px; margin-top: 16px; line-height: 1.5;
}

/* ============================================================
   MECANISMO — ACTO IV
   ============================================================ */
.mecanismo-grid {
  display: flex; flex-direction: column;
  gap: 24px; margin-top: 32px;
}
.mecanismo-card {
  background: var(--white);
  border: 1px solid var(--gray-lightest);
  border-top: 3px solid var(--gold);
  border-radius: 3px; padding: 24px 28px;
}
.mecanismo-card h3 {
  font-size: 0.875rem; font-weight: 700; color: var(--navy);
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 12px;
}
.mecanismo-card p {
  font-size: 0.9375rem; line-height: 1.8; color: var(--gray-dark);
}
.mecanismo-card p + p { margin-top: 12px; }
.mecanismo-card p strong { color: var(--navy); }

/* ============================================================
   ES / NO ES — ACTO V
   ============================================================ */
.es-no-table {
  width: 100%; border-collapse: collapse;
  margin-top: 32px; font-size: 0.875rem;
}
.es-no-table th {
  padding: 14px 16px; text-align: left;
  font-size: 0.75rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}
.es-no-table th:first-child {
  background: var(--navy); color: var(--gold-dm); width: 50%;
}
.es-no-table th:last-child {
  background: var(--bg-alt); color: var(--gray-mid);
}
.es-no-table td {
  padding: 14px 16px; border-bottom: 1px solid var(--gray-lightest);
  line-height: 1.6; vertical-align: top;
}
.es-no-table td:first-child {
  background: rgba(13,27,42,0.02);
  color: var(--navy); font-weight: 500;
}
.es-no-table td:last-child { color: var(--gray-mid); }
.es-no-table tr:last-child td { border-bottom: none; }
.check { color: var(--green); font-weight: 700; margin-right: 8px; }
.cross { color: var(--red);   font-weight: 700; margin-right: 8px; }

.disclaimer-box {
  background: rgba(13,27,42,0.04);
  border: 1px solid var(--gray-lightest);
  border-radius: 3px; padding: 20px 24px;
  font-size: 0.8125rem; color: var(--gray-mid);
  line-height: 1.7; margin-top: 28px; font-style: italic;
}

/* ============================================================
   CIERRE — ACTO VI (fondo beige · contrasta con footer navy)
   ============================================================ */
.cierre-frase {
  font-size: 1.25rem; font-weight: 700; font-style: italic;
  color: var(--navy); line-height: 1.5;
  max-width: 800px; margin: 0 auto 32px; text-align: center;
}

/* ============================================================
   ANIMACIONES — Idénticas al HOME validado
   ============================================================ */
.anim {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.anim.in { opacity: 1; transform: translateY(0); }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }

/* ============================================================
   FOOTER — Idéntico al HOME validado
   ============================================================ */
.site-footer {
  background: var(--navy);
  border-top: 1px solid rgba(184,151,90,0.18);
  padding: 44px 0 40px;
}
.footer-top { display: flex; flex-direction: column; gap: 16px; margin-bottom: 20px; }
.footer-tagline {
  font-size: 0.8125rem; color: rgba(248,247,244,0.45);
  font-style: italic; margin-top: 6px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 12px 16px; }
.footer-links a {
  font-size: 0.8125rem; color: rgba(248,247,244,0.50);
  transition: color 0.15s ease; text-decoration: none;
}
.footer-links a:hover { color: var(--gold-dm); }
.footer-sep {
  border: none; border-top: 1px solid rgba(248,247,244,0.22);
  margin: 20px 0 16px;
}
.footer-disclaimer {
  font-size: 0.75rem; color: rgba(248,247,244,0.35);
  line-height: 1.65; max-width: 1400px; margin-bottom: 14px;
}
.footer-copy { font-size: 0.75rem; color: rgba(248,247,244,0.25); }

/* ============================================================
   label-dm — escalado por breakpoint (igual que HOME)
   ============================================================ */
@media (min-width: 1024px) { .label-dm { font-size: 0.6875rem; } }
@media (min-width: 1440px) { .label-dm { font-size: 0.75rem; }   }
@media (min-width: 1920px) { .label-dm { font-size: 0.8125rem; } }

/* ============================================================
   RESPONSIVE — TABLET ≥768px
   ============================================================ */
@media (min-width: 768px) {
  .container   { padding: 0 40px; }
  .section     { padding: 72px 0; }
  .page-hero   { padding: 96px 0 80px; }
  .transicion  { padding: 56px 0; }
  h1 { font-size: 2.5rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.2rem; }
  .site-header { height: 58px; }
  .header-inner{ padding: 0 40px; }
  .mob-menu    { top: 58px; }
  .footer-top  { flex-direction: row; align-items: flex-start; justify-content: space-between; }
  .mecanismo-grid { flex-direction: row; }
  .mecanismo-card { flex: 1; }
  .tabs-nav  { gap: 10px; }
  .tab-btn   { font-size: 0.8125rem; padding: 9px 16px; }
}

/* ============================================================
   RESPONSIVE — DESKTOP ≥1024px
   ============================================================ */
@media (min-width: 1024px) {
  .container   { max-width: 1200px; padding: 0 64px; }
  .section     { padding: 96px 0; }
  .page-hero   { padding: 112px 0 96px; }
  .transicion  { padding: 64px 0; }
  h1 { font-size: 2.75rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.3rem; }
  body { font-size: 1.0625rem; }
  .label       { font-size: 0.75rem; }
  .nav-link    { font-size: 0.875rem; }
  .nav-desktop { display: flex; align-items: center; gap: 28px; }
  .nav-cta     { display: inline-flex !important; }
  .burger      { display: none; }
  .site-header { height: 60px; }
  .header-inner{ padding: 0 64px; }
  .pilar-body  { padding-bottom: 28px; }
}

/* ============================================================
   RESPONSIVE — LAPTOP ≥1280px  (rango 1280–1439px)
   ============================================================ */
@media (min-width: 1280px) and (max-width: 1439px) {
  .container   { max-width: 1280px; padding: 0 72px; }
  .section     { padding: 108px 0; }
  .page-hero   { padding: 128px 0 108px; }
  .transicion  { padding: 72px 0; }
  .header-inner{ padding: 0 72px; }
  h1 { font-size: 3rem; }
  h2 { font-size: 2.2rem; }
  h3 { font-size: 1.4rem; }
  body { font-size: 1.09375rem; }
  .nav-link    { font-size: 0.9rem; }
  .hero-subtitle { font-size: 1.0625rem; }
}

/* ============================================================
   RESPONSIVE — LARGE ≥1440px
   ============================================================ */
@media (min-width: 1440px) {
  .container   { max-width: 1400px; padding: 0 80px; }
  .section     { padding: 120px 0; }
  .page-hero   { padding: 136px 0 116px; }
  .transicion  { padding: 80px 0; }
  h1 { font-size: 3.25rem; }
  h2 { font-size: 2.4rem; }
  h3 { font-size: 1.5rem; }
  body { font-size: 1.125rem; }
  .label       { font-size: 0.8rem; }
  .nav-link    { font-size: 0.9375rem; }
  .site-header { height: 62px; }
  .hero-subtitle { font-size: 1.125rem; }
}

/* ============================================================
   RESPONSIVE — FULL HD ≥1920px
   ============================================================ */
@media (min-width: 1920px) {
  .container   { max-width: 1600px; padding: 0 100px; }
  .section     { padding: 140px 0; }
  .page-hero   { padding: 156px 0 132px; }
  .transicion  { padding: 96px 0; }
  .header-inner{ padding: 0 100px; }
  h1 { font-size: 4rem; }
  h2 { font-size: 2.85rem; }
  h3 { font-size: 1.75rem; }
  body { font-size: 1.1875rem; }
  .label       { font-size: 0.875rem; }
  .nav-link    { font-size: 1rem; }
  .site-header { height: 64px; }
  .mob-menu    { top: 64px; }
  .hero-subtitle { font-size: 1.25rem; max-width: 1000px; }
  .transicion p  { font-size: 1.25rem; }
  .transicion p + p { font-size: 1.3125rem; }
  .fund-body p   { font-size: 1.0625rem; }
  .fund-cierre   { font-size: 1.0625rem; }
  .mecanismo-card p { font-size: 1.0625rem; }
  .pilar-body p  { font-size: 1.0625rem; }
  .cierre-frase  { font-size: 1.5rem; }
  .es-no-table   { font-size: 1rem; }
}


/* ============================================================
   SQ v1.7 — HARDENING GLOBAL Y CABECERA ESTABLE
   Objetivo: HTML autocontenido, navegación local y cabecera sin
   desplazamiento sistémico entre páginas.
   ============================================================ */
:root {
  --sq-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}
html {
  overflow-y: scroll;
  scrollbar-gutter: stable;
}
body,
button,
input,
select,
textarea {
  font-family: var(--sq-font-sans);
}
.site-header .header-inner {
  width: 100%;
  margin-inline: auto;
}
.site-header .logo,
.site-header .logo-text,
.site-header .nav-desktop,
.site-header .nav-link,
.site-header .nav-cta,
.site-header .btn-back,
.site-header .burger {
  font-family: var(--sq-font-sans) !important;
}
.site-header .logo,
.site-header .nav-desktop,
.site-header .nav-cta,
.site-header .btn-back,
.site-header .burger,
.site-header .btn-primary {
  flex-shrink: 0;
}
.site-header .logo-text {
  line-height: 1;
  white-space: nowrap;
}
.site-header .nav-link,
.site-header .nav-link.active,
.site-header .mob-link,
.site-header .mob-link.active {
  font-weight: 500 !important;
}
.site-header .nav-link {
  text-rendering: geometricPrecision;
  transition-property: color, border-color !important;
}
.site-header .btn:active,
.site-header .nav-cta:active,
.site-header .btn-back:active,
.site-header .btn-primary:active {
  transform: none !important;
}
@media (min-width: 1024px) {
  .site-header .header-inner {
    display: grid !important;
    grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
    align-items: center;
    column-gap: 24px;
  }
  .site-header .logo {
    grid-column: 1;
    justify-self: start;
  }
  .site-header .nav-desktop {
    grid-column: 2;
    justify-self: center;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .site-header .nav-cta,
  .site-header .btn-back,
  .site-header .header-inner > .btn-primary:last-child {
    grid-column: 3;
    justify-self: end;
  }
}
.form-status {
  display: none;
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 3px;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.form-status.show { display: block; }
.form-status.err {
  color: var(--red, #C0392B);
  background: var(--red-light, rgba(192,57,43,0.08));
  border: 1px solid rgba(192,57,43,0.22);
}
.form-status.ok {
  color: var(--navy, #0D1B2A);
  background: var(--gold-light, rgba(184,151,90,0.08));
  border: 1px solid rgba(184,151,90,0.25);
}
