/* ═══════════════════════════════════════════════════════════
   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: 1760px;
  --nav-h:     76px;

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

  /* Superficies oscuras de profundidad (derivadas de --ink) */
  --ink-deep:  #071430;
  --ink-soft:  #10244A;
  --line-dark: rgba(255,255,255,0.10);

  /* Vidrio: solo sobre fondos oscuros, nunca como tarjeta genérica */
  --glass-fill:   linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.018));
  --glass-border: rgba(255,255,255,0.12);
  --glass-hi:     inset 0 1px 0 rgba(255,255,255,0.09);
  --glass-shadow: 0 28px 70px rgba(2,8,23,0.34);
  --glass-blur:   18px;

  /* Movimiento */
  --ease-out:    cubic-bezier(.16, 1, .3, 1);
  --ease-smooth: cubic-bezier(.65, 0, .35, 1);
  --duration-fast:   250ms;
  --duration-medium: 600ms;
  --duration-slow:   1000ms;
}

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);
  /* Vidrio oscuro: 0.74 mantiene el texto blanco en contraste AA incluso
     cuando pasa por encima de las secciones blancas. */
  background-color: rgba(9,22,48,0.74);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-bottom: 1px solid var(--line-dark);
  transition:
    background-color var(--duration-medium) var(--ease-out),
    border-color var(--duration-medium) var(--ease-out),
    box-shadow var(--duration-medium) var(--ease-out),
    backdrop-filter var(--duration-medium) var(--ease-out),
    -webkit-backdrop-filter var(--duration-medium) var(--ease-out);
}
.nav.scrolled { box-shadow: 0 12px 40px rgba(2,8,23,0.16); }

/* Portada: integrada al hero mientras se ve la fotografía. Pasados ~64px
   de scroll se convierte gradualmente en la superficie de vidrio. */
.nav-hero {
  background-color: rgba(9,22,48,0);
  border-bottom-color: transparent;
  backdrop-filter: blur(0px) saturate(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%);
}
.nav-hero.scrolled {
  background-color: rgba(9,22,48,0.74);
  border-bottom-color: var(--line-dark);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}
.nav-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}
.nav-logo { grid-column: 1; justify-self: start; }
.nav-links { grid-column: 2; justify-self: center; }
.nav-burger { grid-column: 3; justify-self: end; }

.nav-logo { display: flex; align-items: center; gap: 11px; text-decoration: none; flex-shrink: 0; }
.nav-logo-mark {
  display: flex; align-items: center;
  flex-shrink: 0;
}
.nav-logo-mark img { width: 44px; height: auto; }
.nav-logo-text {
  font-size: 1.22rem; font-weight: 800;
  color: #FFFFFF; letter-spacing: -0.025em;
  white-space: nowrap;
}

.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: rgba(255,255,255,0.72);
  text-decoration: none;
  border-radius: 8px;
  transition: color var(--duration-fast) ease;
}
.nav-links > li > a::after {
  content: '';
  position: absolute; left: 14px; right: 14px; bottom: 2px;
  height: 2px; border-radius: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transition: transform var(--duration-medium) var(--ease-out);
}
.nav-links > li > a:hover { color: #FFFFFF; }
.nav-links > li > a.active { color: #FFFFFF; }
.nav-links > li > a.active::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .nav-links > li > a:hover::after { transform: scaleX(0.45); }
  .nav-links > li > a.active:hover::after { transform: scaleX(1); }
}


.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: #FFFFFF; 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-color var(--duration-fast) ease,
    border-color var(--duration-fast) ease,
    color var(--duration-fast) ease,
    box-shadow var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-out);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); transition-duration: 120ms; }

/* Flecha que acompaña al texto */
.btn-arrow {
  display: inline-block;
  transition: transform var(--duration-fast) var(--ease-out);
}
.btn-arrow svg { width: 16px; height: 16px; display: block; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover .btn-arrow { transform: translateX(4px); }
  .btn:active { transform: scale(0.98); }
}

/* 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.24); }
.btn-gold:hover { background: var(--gold-dk); box-shadow: 0 10px 30px rgba(255,214,0,0.30); }

.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); }

.u-link {
  color: inherit; text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: background-size var(--duration-medium) var(--ease-out), color var(--duration-fast) ease;
}
.u-link:hover { background-size: 100% 1px; }

/* Foco visible y consistente en todo el sitio */
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── 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; }

/* Frase editorial de cierre (portada) */
.footer-statement {
  font-size: clamp(2.5rem, 7vw, 6.6rem);
  font-weight: 800; line-height: 0.98; letter-spacing: -0.045em;
  color: var(--white);
  max-width: 14ch;
  padding: 36px 0 56px;
}
.footer-statement span { color: var(--gold); }
.footer-top.footer-top--wide {
  grid-template-columns: 1.3fr 1fr 1fr 1fr 1.2fr;
  padding-top: 44px;
  border-top: 1px solid var(--line-dark);
}
.footer-contact li { font-size: 0.895rem; color: rgba(255,255,255,0.72); }
.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 {
  display: flex; align-items: center;
  margin-bottom: 14px;
}
.footer-brand-mark img { width: 42px; height: auto; }
.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;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1px; background-position: 0 100%; background-repeat: no-repeat;
  padding-bottom: 2px;
  transition: color var(--duration-fast) ease, background-size var(--duration-medium) var(--ease-out);
}
.footer-col a:hover { background-size: 100% 1px; }
.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; }
/* Las paginas legales se leen mejor en un ancho mas contenido */
.pagina-legal .container { max-width: 1180px; }
.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: translate3d(0, 22px, 0);
  transition: opacity var(--duration-medium) var(--ease-out), transform var(--duration-medium) var(--ease-out);
}
html.js .reveal.in { opacity: 1; transform: none; }
.d1 { transition-delay: .08s; } .d2 { transition-delay: .16s; }
.d3 { transition-delay: .24s; } .d4 { transition-delay: .32s; }

/* Sistema reutilizable: data-reveal="up|left|right|scale|clip|fade".
   El retraso llega por --delay (a mano o desde data-stagger en el padre). */
html.js [data-reveal] {
  opacity: 0;
  transition:
    opacity 900ms var(--ease-out),
    transform 900ms var(--ease-out),
    clip-path 1100ms var(--ease-out);
  transition-delay: var(--delay, 0ms);
}
html.js [data-reveal=""], html.js [data-reveal="up"] { transform: translate3d(0, 40px, 0); }
html.js [data-reveal="left"]  { transform: translate3d(-36px, 0, 0); }
html.js [data-reveal="right"] { transform: translate3d(36px, 0, 0); }
html.js [data-reveal="scale"] { transform: scale(0.96); }
/* No parte de altura cero: IntersectionObserver descuenta el clip-path del
   propio elemento y nunca lo vería entrar en pantalla. */
html.js [data-reveal="clip"]  { clip-path: inset(0 0 94% 0); transform: translate3d(0, 28px, 0); }
html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
  /* Márgenes negativos: no recortar descendentes ni sombras al terminar */
  clip-path: inset(-20% -10% -20% -10%);
}

/* Movimiento ambiental: se pausa fuera de pantalla */
.is-paused [data-ambient] { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal, .reveal { opacity: 1; transform: none; transition: none; }
  /* Menos movimiento, no cero: se conserva la aparición por opacidad */
  html.js [data-reveal] { transform: none !important; clip-path: none !important; transition: opacity 400ms ease; }
  [data-ambient] { animation: none !important; }
  .btn, .btn-arrow, .u-link, .nav-links > li > a::after { transition-duration: 1ms; }
}

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

  .nav-burger { display: block; }
  .nav-inner { display: flex; justify-content: space-between; }

  .nav-links {
    display: none;
    position: fixed; top: var(--nav-h); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(11,27,58,0.98);
    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; }
}

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