/* ═══════════════════════════════════════════════════════════
   Octane LLC — Sistema base compartido
   Tokens, navegación, botones, tipografía y footer.
   ═══════════════════════════════════════════════════════════ */

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

:root {
  /* Marca */
  --ink:       #0B1B3A;   /* Azul oscuro — títulos */
  --navy:      #0D47A1;   /* Azul corporativo */
  --navy-dk:   #09367D;
  --navy-lt:   #1565C0;
  --gold:      #FFD600;   /* Solo CTA y acentos pequeños */
  --gold-dk:   #F2C200;

  /* Superficies */
  --bg:        #F5F7FB;   /* Fondo general claro */
  --white:     #FFFFFF;
  --surface:   #FFFFFF;

  /* Texto */
  --body:      #46536B;
  --muted:     #627089;   /* AA sobre blanco (5.00) y sobre --bg (4.66) */
  --on-navy:   rgba(255,255,255,0.74);

  /* Líneas y sombras — suaves y discretas */
  --border:    #E3E9F2;
  --border-sq: #D7E0EE;
  --radius:    14px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(11,27,58,0.04), 0 2px 8px rgba(11,27,58,0.04);
  --shadow-md: 0 2px 4px rgba(11,27,58,0.04), 0 8px 24px rgba(11,27,58,0.06);
  --shadow-lg: 0 12px 40px rgba(11,27,58,0.10);

  /* Layout */
  --container: 1280px;
  --nav-h:     76px;

  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { color: var(--ink); line-height: 1.18; letter-spacing: -0.02em; }

/* Las imágenes llevan width/height en el HTML para reservar espacio y evitar
   saltos de layout. Sin `height: auto` el navegador usaría la altura del
   atributo y las deformaría. */
img { max-width: 100%; height: auto; display: block; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 32px;
}

/* ── NAVEGACIÓN ─────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, box-shadow .25s, background .25s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 1px 20px rgba(11,27,58,0.05);
}
.nav-inner {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
}

.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.nav-logo-mark {
  width: 42px; height: 42px; border-radius: 11px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.nav-logo-mark svg { width: 25px; height: 25px; }
.nav-logo-text {
  font-size: 1.22rem; font-weight: 800;
  color: var(--ink); letter-spacing: -0.025em;
}

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links > li > a {
  position: relative;
  display: block;
  padding: 9px 14px;
  font-size: 0.925rem; font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-radius: 8px;
  transition: color .18s, background .18s;
}
.nav-links > li > a:hover { color: var(--ink); background: rgba(13,71,161,0.05); }
.nav-links > li > a.active { color: var(--ink); }
.nav-links > li > a.active::after {
  content: '';
  position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2.5px; border-radius: 2px;
  background: var(--gold);
}

.nav-cta {
  margin-left: 10px;
  background: var(--navy) !important;
  color: var(--white) !important;
  padding: 11px 26px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  box-shadow: var(--shadow-sm);
  transition: background .18s, transform .15s, box-shadow .18s !important;
}
.nav-cta:hover {
  background: var(--navy-dk) !important;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.nav-cta::after { display: none !important; }

.nav-burger {
  display: none;
  background: none; border: none; cursor: pointer;
  padding: 8px; border-radius: 8px;
}
.nav-burger span {
  display: block; width: 22px; height: 2px; border-radius: 2px;
  background: var(--ink); margin: 5px 0;
  transition: transform .28s, opacity .2s;
}
.nav.open .nav-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav.open .nav-burger span:nth-child(2) { opacity: 0; }
.nav.open .nav-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── BOTONES ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--sans);
  font-size: 0.95rem; font-weight: 700;
  padding: 14px 30px;
  border-radius: 11px;
  border: 1px solid transparent;
  text-decoration: none; cursor: pointer;
  transition: background .18s, border-color .18s, transform .15s, box-shadow .18s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }

/* Amarillo: reservado para el llamado a la acción principal */
.btn-gold { background: var(--gold); color: var(--ink); box-shadow: 0 4px 14px rgba(255,214,0,0.28); }
.btn-gold:hover { background: var(--gold-dk); box-shadow: 0 6px 20px rgba(255,214,0,0.36); }

.btn-navy { background: var(--navy); color: var(--white); box-shadow: var(--shadow-sm); }
.btn-navy:hover { background: var(--navy-dk); box-shadow: var(--shadow-md); }

.btn-ghost-light { background: rgba(255,255,255,0.06); color: var(--white); border-color: rgba(255,255,255,0.26); }
.btn-ghost-light:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.45); }

.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--border-sq); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }

/* ── ENCABEZADOS DE SECCIÓN ─────────────────────────────── */
.eyebrow {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 0.775rem; font-weight: 700;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
}
.eyebrow::before {
  content: ''; width: 22px; height: 2.5px; border-radius: 2px;
  background: var(--gold); flex-shrink: 0;
}
.eyebrow.on-dark { color: var(--gold); }

.h2 { font-size: clamp(1.95rem, 3.2vw, 2.7rem); font-weight: 800; margin-bottom: 16px; }
.lead { font-size: 1.055rem; color: var(--muted); line-height: 1.75; max-width: 60ch; }

/* ── FOOTER ─────────────────────────────────────────────── */
.footer { background: var(--ink); padding: 52px 0 26px; }
.footer-top {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.footer-brand-mark {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--navy);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.footer-brand-mark svg { width: 24px; height: 24px; }
.footer-brand-name { font-size: 1.1rem; font-weight: 800; color: var(--white); margin-bottom: 7px; }
.footer-brand-txt { font-size: 0.875rem; color: rgba(255,255,255,0.62); line-height: 1.65; max-width: 30ch; }

.footer-col h4 {
  font-size: 0.735rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.11em;
  color: var(--gold); margin-bottom: 14px;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 9px; }
.footer-col a {
  font-size: 0.895rem; color: rgba(255,255,255,0.72);
  text-decoration: none; transition: color .18s;
}
.footer-col a:hover { color: var(--white); }

.footer-bottom {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 14px;
  padding-top: 22px;
}
.footer-copy { font-size: 0.83rem; color: rgba(255,255,255,0.55); }
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 9px;
  background: rgba(255,255,255,0.09);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.75); text-decoration: none;
  transition: background .18s, color .18s;
}
.footer-social a:hover { background: var(--gold); color: var(--ink); }
.footer-social svg { width: 17px; height: 17px; }

/* ── PÁGINAS LEGALES ────────────────────────────────────── */
.legal-hero {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: calc(var(--nav-h) + 56px) 0 44px;
}
.legal-back {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 0.875rem; font-weight: 600; color: var(--muted);
  text-decoration: none; margin-bottom: 18px;
  transition: color .18s;
}
.legal-back:hover { color: var(--navy); }
.legal-hero h1 { font-size: clamp(2rem, 3.6vw, 2.8rem); font-weight: 800; margin-bottom: 14px; }
.legal-hero .lead { font-size: 1.03rem; }

.legal-meta {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 20px; padding: 7px 14px;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.815rem; font-weight: 600; color: var(--muted);
}
.legal-meta svg { width: 14px; height: 14px; flex-shrink: 0; }

/* Pestañas entre documentos legales */
.legal-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 26px; }
.legal-tab {
  padding: 9px 18px;
  border: 1px solid var(--border-sq);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.885rem; font-weight: 600; color: var(--muted);
  text-decoration: none;
  transition: color .18s, border-color .18s, background .18s;
}
.legal-tab:hover { color: var(--ink); border-color: var(--navy); }
.legal-tab[aria-current="page"] {
  background: var(--navy); border-color: var(--navy); color: var(--white);
}

.legal-wrap { padding: 56px 0 88px; }
.legal-layout { display: grid; grid-template-columns: 232px 1fr; gap: 56px; align-items: start; }

/* Índice lateral */
.legal-toc { position: sticky; top: calc(var(--nav-h) + 26px); }
.legal-toc-t {
  font-size: 0.715rem; font-weight: 800;
  letter-spacing: 0.11em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 13px;
}
.legal-toc ul { list-style: none; border-left: 2px solid var(--border); }
.legal-toc a {
  display: block;
  padding: 8px 0 8px 15px;
  margin-left: -2px;
  border-left: 2px solid transparent;
  font-size: 0.885rem; font-weight: 600; color: var(--muted);
  text-decoration: none;
  transition: color .18s, border-color .18s;
}
.legal-toc a:hover { color: var(--ink); }
.legal-toc a.active { color: var(--navy); border-left-color: var(--gold); }

/* Contenido — ancho de lectura reducido, texto mayor.
   ~640px con texto de 16px ≈ 70 caracteres por línea. */
.legal-content { max-width: 640px; }
.legal-sec { border-bottom: 1px solid var(--border); padding-bottom: 30px; margin-bottom: 30px; }
.legal-sec:last-child { border-bottom: none; margin-bottom: 0; }

.legal-sec > summary {
  list-style: none;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  cursor: pointer;
}
.legal-sec > summary::-webkit-details-marker { display: none; }
.legal-sec > summary h2 {
  font-size: 1.32rem; font-weight: 800;
  scroll-margin-top: calc(var(--nav-h) + 24px);
}
.legal-chevron {
  width: 20px; height: 20px; flex-shrink: 0; color: var(--muted);
  transition: transform .22s;
}
.legal-sec[open] .legal-chevron { transform: rotate(180deg); }

.legal-body { padding-top: 14px; }
.legal-body p, .legal-body li {
  font-size: 1.005rem;      /* texto más grande que antes */
  line-height: 1.82;
  color: var(--body);
}
.legal-body p { margin-bottom: 15px; }
.legal-body p:last-child, .legal-body ul:last-child { margin-bottom: 0; }
.legal-body ul { list-style: none; margin: 0 0 15px; display: grid; gap: 10px; }
.legal-body li { position: relative; padding-left: 24px; }
.legal-body li::before {
  content: ''; position: absolute; left: 4px; top: 11px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--navy); opacity: .45;
}
.legal-body strong { color: var(--ink); font-weight: 700; }
.legal-body a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

.legal-callout {
  display: flex; gap: 13px;
  padding: 17px 20px; margin: 22px 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-left: 3px solid var(--gold);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-sm);
}
.legal-callout svg { width: 19px; height: 19px; flex-shrink: 0; margin-top: 2px; }
.legal-callout p { font-size: 0.925rem; line-height: 1.7; margin: 0; }

.legal-contact {
  margin-top: 46px; padding: 26px 28px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.legal-contact h3 { font-size: 1.06rem; font-weight: 800; margin-bottom: 8px; }
.legal-contact p { font-size: 0.935rem; color: var(--muted); margin-bottom: 15px; line-height: 1.7; }

@media (max-width: 980px) {
  .legal-layout { grid-template-columns: 1fr; gap: 30px; }
  .legal-toc { display: none; }          /* en móvil el índice lo reemplazan los accordions */
  .legal-content { max-width: none; }
  .legal-wrap { padding: 36px 0 64px; }
  .legal-sec { padding-bottom: 18px; margin-bottom: 18px; }
  .legal-sec > summary h2 { font-size: 1.14rem; }
}

/* ── ANIMACIÓN DE ENTRADA ───────────────────────────────── */
/* Por defecto todo es visible: si el JS falla o está deshabilitado,
   el contenido se ve igual. La clase .js la añade un script en línea. */
.reveal { opacity: 1; transform: none; }
html.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; } .d4 { transition-delay: .32s; }

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

/* ── RESPONSIVE COMÚN ───────────────────────────────────── */
@media (max-width: 980px) {
  .container { padding: 0 22px; }
  .footer-top { grid-template-columns: 1fr 1fr; gap: 32px; }

  .nav-burger { display: block; }
  .nav-links {
    display: none;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--white);
    padding: 16px 22px 26px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
  }
  .nav.open .nav-links { display: flex; }
  .nav-links > li > a { padding: 13px 12px; font-size: 1rem; }
  .nav-links > li > a.active::after { left: 12px; right: auto; width: 18px; bottom: 6px; }
  .nav-cta { margin: 8px 0 0; text-align: center; }
}

@media (max-width: 560px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .btn { width: 100%; }
}
