:root {
  /* Colores de marca BK (tomados del logo) */
  --navy: #012D59;
  --orange: #F26402;
  --orange-ink: #C24E02; /* naranja oscurecido para texto pequeño sobre blanco */

  --frost: #EEF3F6;
  --frost-2: #E1E9F0;
  --ink: var(--navy);
  --ink-2: #2E4A66;
  --muted: #5B6F84;
  --line: #C6D3DD;
  --white: #FFFFFF;
  --wa: #1FAF5B;

  --display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --text: "Instrument Sans", system-ui, sans-serif;

  --gutter: clamp(16px, 4vw, 56px);
  --max: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--frost);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, canvas { display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.02; letter-spacing: -.035em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--ink); color: var(--white); padding: 10px 14px; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 22px; border-radius: 999px;
  font: 700 19px/1 var(--display); letter-spacing: -.01em; text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background-color .2s, color .2s, border-color .2s;
}
.btn-solid { background: var(--orange); color: var(--white); }
.btn-solid:hover { background: var(--orange-ink); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: 15px; background: var(--navy); }
.btn-sm:hover { background: var(--orange-ink); }
.btn-ghost { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-ghost:hover { background: var(--ink); color: var(--frost); }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; gap: 24px;
  padding: 14px var(--gutter);
  transition: background-color .3s, box-shadow .3s;
}
.nav.is-solid { background: color-mix(in srgb, var(--frost) 88%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { height: 40px; width: auto; }
.brand-name { font: 700 13px/1.15 var(--display); letter-spacing: .02em; color: var(--navy); max-width: 9em; }
.nav ul { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.nav nav a { text-decoration: none; font-weight: 500; font-size: 15px; color: var(--ink-2); }
.nav nav a:hover { color: var(--ink); }

/* ---------- Anatomía (escena 3D fijada) ---------- */
.anatomy { position: relative; height: 100vh; height: 100svh; }
.stage {
  position: relative; height: 100vh; height: 100svh; overflow: hidden;
  background:
    radial-gradient(60% 55% at 58% 48%, var(--white) 0%, transparent 70%),
    linear-gradient(180deg, var(--frost) 0%, var(--frost-2) 100%);
}
#scene { position: absolute; inset: 0; width: 100%; height: 100%; }
.leaders { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.leaders polyline { stroke: var(--ink); stroke-width: 1; fill: none; }
.leaders circle { fill: var(--orange); }

.callouts { list-style: none; margin: 0; padding: 0; position: absolute; inset: 0; pointer-events: none; }
.callouts li {
  position: absolute; left: 0; top: 0; width: 230px;
  opacity: 0; will-change: transform, opacity;
}
.callouts strong { display: block; font: 600 15px/1.2 var(--text); color: var(--ink); }
.callouts span { display: block; margin-top: 3px; font-size: 13.5px; line-height: 1.4; color: var(--muted); }

.hero-copy {
  position: absolute; left: var(--gutter); top: 50%; transform: translateY(-50%);
  width: min(34rem, 44vw); z-index: 2;
}
.hero-copy h1 { font-size: clamp(46px, 6.2vw, 100px); text-wrap: balance; }
.hero-copy p { margin-top: 20px; max-width: 30em; font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.stage-title {
  position: absolute; left: var(--gutter); bottom: calc(var(--gutter) * .6);
  font-size: clamp(52px, 7.4vw, 132px); line-height: .9;
  color: var(--ink); opacity: 0; pointer-events: none;
}
.chapters { position: absolute; right: var(--gutter); bottom: calc(var(--gutter) * .9); display: grid; gap: 6px; text-align: right; }
.chapter { font: 600 15px/1.2 var(--text); color: var(--muted); opacity: .35; transition: opacity .3s, color .3s; }
.chapter.is-on { opacity: 1; color: var(--ink); }
.ch-n {
  display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 6px; border-radius: 50%;
  border: 1.5px solid currentColor; font-size: 12px; vertical-align: 1px;
}
.chapter.is-on .ch-n { background: var(--orange); border-color: var(--orange); color: var(--white); }
.chapters { opacity: 0; }

.scroll-hint { position: absolute; left: 50%; bottom: 28px; transform: translateX(-50%); font-size: 14px; color: var(--muted); }
.scroll-hint::after {
  content: ""; display: block; width: 1.5px; height: 28px; margin: 8px auto 0; background: var(--ink);
  transform-origin: top; animation: hint 1.8s ease-in-out infinite;
}
@keyframes hint { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(0); transform-origin: bottom; } }

.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: transparent; }
.progress span { display: block; height: 100%; width: 100%; background: var(--orange); transform-origin: left; transform: scaleX(0); }

/* ---------- Secciones ---------- */
section:not(.anatomy) { padding-block: clamp(80px, 12vw, 160px); }
.sec-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 48px; align-items: end; margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head h2, .signs h2, .faq h2, .contact h2 { font-size: clamp(38px, 5vw, 76px); }
.sec-head p { color: var(--ink-2); max-width: 28em; font-size: 18px; }

.services { background: var(--white); }
.svc-list { list-style: none; margin: 0; padding: 0; border-top: 1.5px solid var(--ink); }
.svc {
  display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr) auto; gap: 16px 40px; align-items: baseline;
  padding: 28px 0; border-bottom: 1px solid var(--line);
}
.svc h3 { font-size: clamp(24px, 2.4vw, 34px); }
.svc p { color: var(--ink-2); max-width: 36em; }
.svc a { justify-self: start; font-weight: 600; color: var(--orange-ink); text-decoration: none; white-space: nowrap; border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.svc a:hover { color: var(--navy); }

.signs { background: var(--navy); color: var(--frost); }
.signs h2 { color: var(--white); }
.signs-list dt::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--orange); margin-right: 12px; vertical-align: 3px; }
.signs-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.signs h2 { position: sticky; top: 110px; }
.signs-list { margin: 0; }
.signs-list > div { padding: 22px 0; border-bottom: 1px solid rgba(238, 243, 246, .18); display: grid; grid-template-columns: 1fr 1fr; gap: 8px 32px; }
.signs-list > div:first-child { border-top: 1px solid rgba(238, 243, 246, .18); }
.signs-list dt { font: 700 clamp(20px, 1.9vw, 26px)/1.15 var(--display); letter-spacing: -.02em; }
.signs-list dd { margin: 0; color: #AFC2D6; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); counter-reset: s; border-top: 1.5px solid var(--ink); }
.steps li { counter-increment: s; padding: 28px 28px 0 0; }
.steps li + li { padding-left: 28px; border-left: 1px solid var(--line); }
.steps li::before { content: counter(s); display: block; font: 800 64px/1 var(--display); letter-spacing: -.04em; color: var(--orange); margin-bottom: 18px; }
.steps h3 { font-size: 23px; margin-bottom: 10px; }
.steps p { color: var(--ink-2); }

.faq { background: var(--white); }
.faq-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; }
.faq-list { border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 40px 22px 0; position: relative;
  font: 600 19px/1.35 var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 14px; height: 14px; margin-top: -9px;
  border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); transition: transform .25s;
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq details p { padding: 0 0 24px; color: var(--ink-2); max-width: 40em; }

.contact-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; }
.contact-copy p { margin-top: 20px; color: var(--ink-2); font-size: 18px; max-width: 24em; }
.direct { margin: 32px 0 0; border-top: 1.5px solid var(--ink); }
.direct > div { display: grid; grid-template-columns: 6.5em 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.direct dt { font-weight: 600; color: var(--muted); font-size: 15px; }
.direct dd { margin: 0; overflow-wrap: anywhere; }
.direct a { color: var(--ink); font-weight: 600; text-decoration-color: var(--orange); text-underline-offset: 3px; }
.legal { margin-top: 16px; font-size: 14px; color: var(--muted); }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-content: start; align-self: start; }
.form label { display: grid; align-content: start; gap: 6px; font-weight: 600; font-size: 14px; }
.form .full { grid-column: 1 / -1; }
.form input, .form select, .form textarea {
  width: 100%; font: 400 16px/1.4 var(--text); color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 12px; padding: 13px 14px;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px color-mix(in srgb, var(--orange) 22%, transparent); }
.form-error { color: #B42318; font-weight: 600; }
.form .btn { margin-top: 6px; }

.foot { background: var(--navy); color: #AFC2D6; padding-block: 56px; font-size: 15px; }
.foot-grid { display: grid; grid-template-columns: 1fr 1.4fr auto auto; gap: 24px; align-items: center; }
.foot-brand { display: flex; align-items: center; gap: 10px; color: var(--frost); font-weight: 600; }
.foot-tag { color: var(--white); font: 700 17px/1.4 var(--display); }
.foot a { color: var(--frost); }
.foot-small { font-size: 13px; }

.wa-float {
  position: fixed; right: 18px; bottom: 18px; z-index: 60; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--wa); color: var(--white);
  box-shadow: 0 10px 24px -8px rgba(14, 34, 51, .55);
  opacity: 0; transform: translateY(16px); transition: opacity .3s, transform .3s; pointer-events: none;
}
.wa-float.is-on { opacity: 1; transform: none; pointer-events: auto; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Responsivo ---------- */
@media (max-width: 900px) {
  .nav nav { display: none; }
  .sec-head, .signs-grid, .faq-grid, .contact-grid { grid-template-columns: 1fr; }
  .signs h2 { position: static; }
  .svc { grid-template-columns: 1fr; gap: 10px; }
  .steps { grid-template-columns: 1fr 1fr; }
  .steps li:nth-child(3) { padding-left: 0; border-left: 0; }
  .steps li { padding-bottom: 28px; }
  .foot-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .brand-name { display: none; }
  .hero-copy { top: auto; bottom: 28px; transform: none; width: auto; right: var(--gutter); }
  .hero-copy h1 { font-size: clamp(40px, 11.5vw, 60px); }
  .hero-copy p { margin-top: 14px; }
  .hero-actions { margin-top: 20px; }
  .hero-actions .btn { flex: 1 1 auto; }
  .scroll-hint { display: none; }
  .callouts li { width: 46vw; }
  .callouts span { display: none; }
  .callouts strong { font-size: 13.5px; }
  .chapters { left: var(--gutter); right: auto; top: 76px; bottom: auto; text-align: left; }
  .stage-title { font-size: 11.4vw; line-height: .95; }
  .callouts strong { background: color-mix(in srgb, var(--frost) 82%, transparent); padding: 2px 6px; border-radius: 6px; width: max-content; max-width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding-left: 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .signs-list > div { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
