/* =========================================================================
   PROYECTO 6-36 — Sistema de diseño
   Derivado de MANUAL DE MARCA PROYECTO 636. No modificar tokens de marca.
   ========================================================================= */

/* ---------- 0. TIPOGRAFÍAS ----------
   Las tres viven en nuestro propio dominio, no en los servidores de Google.
   Motivo: al cargarlas desde Google, el navegador de cada visitante se
   conectaba a un tercero y le entregaba su dirección IP antes de que
   hubiera aceptado nada. Ahora eso no ocurre.

   Son fuentes VARIABLES: un solo archivo por familia cubre todos los pesos
   del 100 al 900, así que son 3 archivos (136 KB) en lugar de 10.
   Por eso font-weight declara un rango y no un número.

   font-display: swap muestra el texto de inmediato con la tipografía del
   sistema y lo cambia al cargar la nuestra: nunca hay texto invisible.     */

@font-face {
  font-family: 'Montserrat';
  src: url('/assets/fonts/montserrat-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Raleway';
  src: url('/assets/fonts/raleway-variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- 1. TOKENS ---------- */
:root {
  /* Marca — del manual, no tocar */
  --brand-turquoise: #0DD1C9;
  --brand-deep-blue: #0A1F2E;
  --brand-lime:      #B6FF00;
  --brand-electric:  #0066FF;
  --brand-gray:      #6B7280;
  --brand-carbon:    #080F14;
  --brand-ivory:     #F6F7F9;
  --brand-white:     #FFFFFF;

  /* Semánticos — tema oscuro (por defecto) */
  --bg-base:      #080F14;
  --bg-surface:   #0A1F2E;
  --bg-surface-2: #0E2838;
  --text-primary:   #FFFFFF;
  --text-secondary: rgba(255,255,255,.72);
  --text-muted:     rgba(255,255,255,.52);
  --border-subtle: rgba(13,209,201,.18);
  --border-strong: rgba(13,209,201,.45);
  --accent: #0DD1C9;
  --accent-emphasis: #B6FF00;
  --danger: #FF6B6B;

  /* Gradiente de marca — solo trazos y bordes, nunca áreas grandes */
  --grad-brand: linear-gradient(90deg, #0066FF 0%, #0DD1C9 55%, #B6FF00 100%);

  /* Tipografía */
  --font-display: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body:    'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-num:     'Raleway', system-ui, sans-serif;

  /* Escala fluida */
  --fs-display: clamp(2.5rem, 1.5rem + 4.2vw, 4.5rem);
  --fs-h1:      clamp(2.375rem, 1.5rem + 3.5vw, 4rem);
  --fs-h2:      clamp(1.875rem, 1.3rem + 2.2vw, 2.75rem);
  --fs-h3:      clamp(1.5rem, 1.25rem + .9vw, 1.875rem);
  --fs-h4:      clamp(1.1875rem, 1.1rem + .35vw, 1.375rem);
  --fs-eyebrow: .75rem;
  --fs-body-l:  clamp(1.0625rem, 1rem + .28vw, 1.1875rem);
  --fs-body-m:  clamp(1rem, .97rem + .14vw, 1.0625rem);
  --fs-body-s:  .9375rem;
  --fs-caption: .8125rem;
  --fs-numeral: clamp(3.5rem, 2rem + 6vw, 6rem);

  /* Espaciado — base 8 */
  --s-1:4px; --s-2:8px;  --s-3:12px; --s-4:16px; --s-5:24px;
  --s-6:32px; --s-7:48px; --s-8:64px; --s-9:96px; --s-10:128px; --s-11:160px;

  --section-y: clamp(72px, 9vw, 160px);
  --container: 1280px;
  --gutter: clamp(24px, 5vw, 80px);

  /* Forma */
  --r-sm:8px; --r-md:12px; --r-lg:20px; --r-xl:28px; --r-pill:999px;

  /* Movimiento */
  --ease-out: cubic-bezier(.22,1,.36,1);
  --ease-io:  cubic-bezier(.4,0,.2,1);

  --header-h: 88px;
}

/* ---------- 2. RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: var(--fs-body-m);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul, ol { list-style: none; padding: 0; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

::selection { background: var(--brand-turquoise); color: var(--brand-carbon); }

/* ---------- 3. TIPOGRAFÍA ---------- */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-display); font-weight: 700; line-height: 1.1; }

.display {
  font-family: var(--font-display); font-weight: 900;
  font-size: var(--fs-display); line-height: .98; letter-spacing: -.03em;
  text-transform: uppercase;
}
.h1 { font-weight: 900; font-size: var(--fs-h1); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
.h2 { font-weight: 700; font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -.02em; text-transform: uppercase; }
.h3 { font-weight: 700; font-size: var(--fs-h3); line-height: 1.15; letter-spacing: -.01em; }
.h4 { font-weight: 600; font-size: var(--fs-h4); line-height: 1.25; }

.eyebrow {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-eyebrow); letter-spacing: .18em;
  text-transform: uppercase; color: var(--accent);
  display: flex; flex-wrap: wrap; align-items: center; gap: .55em;
}
.eyebrow--plain { display: block; }
/* El Gris Tecnológico del manual no alcanza AA sobre el fondo oscuro
   (3.99:1). Sobre oscuro se usa blanco atenuado; sobre claro, el gris. */
.eyebrow .sep { color: var(--text-muted); }
.section--light .eyebrow .sep { color: var(--brand-gray); }

/* En pantallas estrechas los saltos de línea forzados provocan
   desbordamiento: se ignoran y el texto fluye solo. */
@media (max-width: 640px) {
  .display br, .h1 br, .h2 br { display: none; }
  .display, .h1, .h2 { text-wrap: balance; }
}
.display, .h1, .h2, .h3 { overflow-wrap: break-word; }

.lead { font-size: var(--fs-body-l); color: var(--text-secondary); max-width: 58ch; }
.body-s { font-size: var(--fs-body-s); color: var(--text-secondary); }
.caption { font-size: var(--fs-caption); color: var(--text-muted); letter-spacing: .02em; }

/* Regla de marca: TODO número visible va en Raleway */
.num { font-family: var(--font-num); font-weight: 300; font-variant-numeric: tabular-nums; }

.lime { color: var(--accent-emphasis); }
.turq { color: var(--accent); }

/* ---------- 4. LAYOUT ---------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); position: relative; }
.section--surface { background: var(--bg-surface); }
.section--light   { background: var(--brand-ivory); color: var(--brand-deep-blue); }
.section--light .lead,
.section--light .body-s { color: var(--brand-gray); }
.section--light .eyebrow { color: var(--brand-deep-blue); }

.stack > * + * { margin-top: var(--s-5); }
.section-head { max-width: 62ch; margin-bottom: var(--s-8); }
.section-head .h2 { margin-top: var(--s-4); }
.section-head .lead { margin-top: var(--s-5); }

.grid { display: grid; gap: var(--s-5); }
@media (min-width: 768px)  { .grid--2 { grid-template-columns: repeat(2,1fr); } .grid--3 { grid-template-columns: repeat(2,1fr); } .grid--4 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .grid--3 { grid-template-columns: repeat(3,1fr); } .grid--4 { grid-template-columns: repeat(4,1fr); } }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--accent); color: var(--brand-carbon);
  padding: var(--s-3) var(--s-5); font-weight: 700; border-radius: 0 0 var(--r-sm) 0;
}
.skip-link:focus { left: 0; }

/* ---------- 5. BOTONES ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  font-family: var(--font-display); font-weight: 600; font-size: .9375rem;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 1rem 1.6rem; min-height: 52px; border-radius: var(--r-sm);
  border: 1px solid transparent; cursor: pointer;
  transition: background .18s var(--ease-io), border-color .18s var(--ease-io),
              color .18s var(--ease-io), transform .18s var(--ease-io);
}
.btn .arrow { transition: transform .18s var(--ease-io); }
.btn:hover .arrow { transform: translateX(4px); }

/* Primario: turquesa sólido + texto Negro Carbón (10:1) — como el manual */
.btn--primary { background: var(--accent); color: var(--brand-carbon); }
.btn--primary:hover { background: #2ee0d9; }

/* Fantasma */
.btn--ghost { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.btn--ghost:hover { border-color: var(--accent); background: rgba(13,209,201,.08); }

/* Lima: siempre texto Negro Carbón (17:1), nunca blanco */
.btn--lime { background: var(--accent-emphasis); color: var(--brand-carbon); }
.btn--lime:hover { background: #c8ff33; }

.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.section--light .btn--ghost { color: var(--brand-deep-blue); border-color: rgba(10,31,46,.28); }
.section--light .btn--ghost:hover { border-color: var(--brand-deep-blue); background: rgba(10,31,46,.05); }

.link-arrow {
  display: inline-flex; align-items: center; gap: .45em;
  font-family: var(--font-display); font-weight: 600; font-size: .875rem;
  letter-spacing: .04em; color: var(--accent);
}
.link-arrow svg { transition: transform .18s var(--ease-io); }
.link-arrow:hover svg { transform: translateX(4px); }
.section--light .link-arrow { color: var(--brand-deep-blue); }

/* ---------- 6. TARJETAS ---------- */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-lg); padding: var(--s-6);
  display: flex; flex-direction: column; gap: var(--s-4);
  transition: transform .22s var(--ease-io), border-color .22s var(--ease-io), background .22s var(--ease-io);
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); background: var(--bg-surface-2); }
.card .h3 { color: var(--text-primary); }
.card p { color: var(--text-secondary); font-size: var(--fs-body-s); }
.card .benefit { color: var(--accent); font-weight: 500; font-size: var(--fs-body-s); }
.card .link-arrow { margin-top: auto; padding-top: var(--s-2); }
.card__icon { color: var(--accent); }
.card__icon svg { width: 40px; height: 40px; }

.section--light .card { background: var(--brand-white); border-color: rgba(10,31,46,.10); box-shadow: 0 12px 32px rgba(10,31,46,.06); }
.section--light .card p { color: var(--brand-gray); }
.section--light .card .h3 { color: var(--brand-deep-blue); }

/* Chips */
.chip {
  display: inline-flex; align-items: center;
  padding: .55rem 1.1rem; border-radius: var(--r-pill);
  border: 1px solid var(--border-subtle); font-size: var(--fs-body-s);
  color: var(--text-secondary); transition: border-color .18s, color .18s;
}
.chip:hover { border-color: var(--border-strong); color: var(--text-primary); }
.chip-list { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.mega__foot { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-5); }
.mega__sep { width: 1px; height: 16px; background: var(--border-subtle); }

/* ---------- Giros de negocio ---------- */
.giros {
  display: grid; gap: var(--s-3);
  grid-template-columns: repeat(2, 1fr);
}
@media (min-width: 700px)  { .giros { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .giros { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1280px) { .giros--6 { grid-template-columns: repeat(6, 1fr); } }

.giro {
  display: flex; flex-direction: column; gap: var(--s-2);
  padding: var(--s-4) var(--s-4) var(--s-5);
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  transition: border-color .2s var(--ease-io), transform .2s var(--ease-io), background .2s var(--ease-io);
}
.giro:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--bg-surface-2); }
.giro svg { width: 30px; height: 30px; color: var(--accent); }
.giro strong {
  font-family: var(--font-display); font-weight: 600;
  font-size: var(--fs-body-s); line-height: 1.25; color: var(--text-primary);
}
.giro span { font-size: var(--fs-caption); line-height: 1.45; color: var(--text-muted); }

.section--light .giro { background: #fff; border-color: rgba(10,31,46,.10); }
.section--light .giro:hover { border-color: rgba(13,209,201,.55); }
.section--light .giro strong { color: var(--brand-deep-blue); }
.section--light .giro span { color: var(--brand-gray); }

/* Cabecera de familia dentro de la sección */
.giros-fam { margin-top: var(--s-7); }
.giros-fam__head {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s-3);
  margin-bottom: var(--s-4); padding-bottom: var(--s-3);
  border-bottom: 1px solid var(--border-subtle);
}
.giros-fam__head h3 { font-size: var(--fs-h4); font-weight: 700; }
.giros-fam__head .link-arrow { margin-left: auto; }

/* Beneficios: barra turquesa a la izquierda, sin icono */
.benefit-item { border-left: 2px solid var(--accent); padding-left: var(--s-4); }
.benefit-item strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem; }
.benefit-item span { font-size: var(--fs-body-s); color: var(--text-secondary); }

/* ---------- 7. ICONOGRAFÍA (lineal, como el manual) ---------- */
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- 8. CURVA CONECTORA 6-36 ---------- */
.thread { position: absolute; inset-inline: 0; pointer-events: none; opacity: .55; }
.thread svg { width: 100%; height: 100%; }
.thread path { fill: none; stroke: var(--accent); stroke-width: 1.5; }

/* ---------- 9. ANIMACIÓN DE ENTRADA ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .5s var(--ease-out), transform .5s var(--ease-out); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ---------- 10. HEADER ---------- */
.header {
  position: fixed; inset-inline: 0; top: 0; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  transition: height .25s var(--ease-io), background .25s var(--ease-io), border-color .25s var(--ease-io);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  height: 64px; background: rgba(8,15,20,.92);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom-color: rgba(13,209,201,.15);
}
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--s-5); width: 100%; }

.logo { display: inline-flex; align-items: center; gap: 12px; }
.logo svg { height: 34px; width: auto; transition: height .25s var(--ease-io); }
.header.is-stuck .logo svg { height: 28px; }
.logo__wm { font-family: var(--font-display); font-weight: 800; font-size: .9375rem; letter-spacing: .2em; white-space: nowrap; }

.nav { display: none; }
.nav__list { display: flex; align-items: center; gap: var(--s-6); }
.nav__link {
  font-family: var(--font-display); font-weight: 600; font-size: .875rem;
  letter-spacing: .04em; color: var(--text-secondary);
  padding: .5rem 0; position: relative; transition: color .18s;
  display: inline-flex; align-items: center; gap: .4em;
}
.nav__link:hover, .nav__link[aria-expanded="true"], .nav__link.is-active { color: var(--text-primary); }
.nav__link.is-active::after {
  content:''; position:absolute; left:0; right:0; bottom:0; height:2px; background: var(--accent);
}
.header__cta { display: none; }

@media (min-width: 1024px) {
  .nav { display: block; }
  .header__cta { display: inline-flex; }
}

/* Mega-menú */
.mega {
  position: absolute; top: 100%; left: 0; right: 0;
  background: rgba(10,31,46,.98); backdrop-filter: blur(16px);
  border-block: 1px solid var(--border-subtle);
  padding: var(--s-7) 0; opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity .2s var(--ease-io), transform .2s var(--ease-io), visibility .2s;
}
.mega.is-open { opacity: 1; visibility: visible; transform: none; }
.mega__grid { display: grid; grid-template-columns: repeat(2,1fr); gap: var(--s-3) var(--s-7); }
.mega__item { display: flex; gap: var(--s-4); padding: var(--s-4); border-radius: var(--r-md); transition: background .18s; }
.mega__item:hover { background: rgba(13,209,201,.08); }
.mega__item .card__icon svg { width: 26px; height: 26px; }
.mega__item strong { display: block; font-family: var(--font-display); font-weight: 700; font-size: .9375rem; }
.mega__item span { font-size: var(--fs-caption); color: var(--text-muted); }
.mega__foot { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--border-subtle); }

/* Hamburguesa + panel móvil */
.burger {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; padding: 10px; background: none; border: 0; cursor: pointer;
}
.burger span { display: block; height: 2px; background: currentColor; transition: transform .25s var(--ease-io), opacity .2s; }
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (min-width: 1024px) { .burger { display: none; } }

.mobile-panel {
  position: fixed; inset: 0; z-index: 99; background: var(--bg-base);
  padding: calc(var(--header-h) + var(--s-6)) var(--gutter) var(--s-6);
  display: flex; flex-direction: column; overflow-y: auto;
  transform: translateX(100%); transition: transform .3s var(--ease-io);
}
.mobile-panel.is-open { transform: none; }
.mobile-panel a { font-family: var(--font-display); font-weight: 700; font-size: 1.5rem; padding: var(--s-3) 0; display: block; }
.mobile-panel .sub a { font-size: 1.0625rem; font-weight: 600; color: var(--text-secondary); padding-left: var(--s-4); }
.mobile-panel__cta { margin-top: auto; padding-top: var(--s-6); display: grid; gap: var(--s-3); }
@media (min-width: 1024px) { .mobile-panel { display: none; } }

/* Barra de acción fija en móvil */
.action-bar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 90;
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--border-subtle);
  transform: translateY(100%); transition: transform .3s var(--ease-io);
  padding-bottom: env(safe-area-inset-bottom);
}
.action-bar.is-visible { transform: none; }
.action-bar a {
  display: flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 60px; background: var(--bg-surface);
  font-family: var(--font-display); font-weight: 600; font-size: .8125rem;
  letter-spacing: .06em; text-transform: uppercase;
}
.action-bar a:first-child { background: var(--accent); color: var(--brand-carbon); }
@media (min-width: 1024px) { .action-bar { display: none; } }

/* ---------- 11. HERO ---------- */
.hero {
  position: relative; min-height: min(100svh, 860px);
  display: flex; align-items: center;
  padding-top: calc(var(--header-h) + var(--s-7)); padding-bottom: var(--s-9);
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; max-width: 54ch; }
.hero .display { margin-top: var(--s-5); }
.hero .lead { margin-top: var(--s-5); }
.hero__actions { margin-top: var(--s-7); display: flex; flex-wrap: wrap; gap: var(--s-3); }

.hero__wave {
  position: absolute; inset-block: 0; right: -12%; width: 78%;
  z-index: 1; pointer-events: none; opacity: .95;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
          mask-image: linear-gradient(90deg, transparent 0%, #000 32%, #000 100%);
}
.hero__wave svg { width: 100%; height: 100%; }
@media (max-width: 900px) { .hero__wave { width: 120%; right: -30%; opacity: .38; } }

/* Hero de páginas internas */
.hero--inner { min-height: auto; padding-bottom: var(--s-9); }
.hero--inner .hero__inner { max-width: 62ch; }
.hero--inner .h1 { margin-top: var(--s-4); }
.hero--inner .lead { margin-top: var(--s-5); }

/* ---------- 11b. LISTA DE PALOMAS ---------- */
.ticks { display: grid; gap: var(--s-4); }
.ticks li { display: flex; gap: var(--s-4); align-items: flex-start; }
.ticks svg { flex: none; width: 20px; height: 20px; color: var(--accent); margin-top: 4px; }
.ticks span { color: var(--text-secondary); }

/* ---------- 11c. FAQ (acordeón nativo) ---------- */
.faq { display: grid; gap: 0; max-width: 82ch; }
.faq details { border-bottom: 1px solid var(--border-subtle); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-5) 0; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem;
  color: var(--text-primary); transition: color .18s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent); }
.faq summary svg { flex: none; color: var(--accent); transform: rotate(90deg); transition: transform .22s var(--ease-io); }
.faq details[open] summary svg { transform: rotate(-90deg); }
.faq__a { padding-bottom: var(--s-5); }
.faq__a p { color: var(--text-secondary); max-width: 70ch; }

/* ---------- 12. PROCESO 01–05 ---------- */
.steps { display: grid; gap: var(--s-6); position: relative; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(5,1fr); gap: var(--s-5); } }

.step { position: relative; display: grid; gap: var(--s-4); align-content: start; }
.step__num {
  font-family: var(--font-num); font-weight: 200;
  font-size: clamp(3rem, 1.6rem + 3.4vw, 4.5rem);
  line-height: .85; color: var(--brand-deep-blue); opacity: .22;
  letter-spacing: -.02em;
}
.step__body { position: relative; padding-top: var(--s-5); }
.step__body::before {
  content: ''; position: absolute; top: -1px; left: 0;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--brand-ivory); border: 2px solid var(--accent);
  transform: translateY(-4px);
}
.step h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.0625rem;
  letter-spacing: .08em; text-transform: uppercase; color: var(--brand-deep-blue); }
.step p { font-size: var(--fs-body-s); color: var(--brand-gray); margin-top: var(--s-3); }

.steps__rail {
  position: absolute; left: 0; right: 0; height: 2px;
  background: rgba(10,31,46,.10); display: none;
  top: calc(clamp(3rem, 1.6rem + 3.4vw, 4.5rem) * .85 + var(--s-4));
}
@media (min-width: 900px) { .steps__rail { display: block; } }
.steps__rail i { display: block; height: 100%; width: 0; background: var(--accent); transition: width 1s var(--ease-out); }

/* ---------- 13. PROBLEMA ---------- */
.problem-list { display: grid; gap: var(--s-5); }
@media (min-width: 768px) { .problem-list { grid-template-columns: repeat(2,1fr); gap: var(--s-5) var(--s-8); } }
.problem-item { display: flex; gap: var(--s-4); align-items: flex-start; padding-block: var(--s-3); }
.problem-item svg { flex: none; width: 22px; height: 22px; color: var(--accent); margin-top: 3px; }
.problem-item p { color: var(--text-secondary); }
.turn { text-align: center; padding-block: var(--section-y); }

/* ---------- 14. PROPUESTA 6 → 36 ---------- */
.morph { display: grid; place-items: center; margin-top: var(--s-8); }

/* El logotipo se revela con un barrido de izquierda a derecha, para sostener
   la idea de "un solo trazo continuo" de la que habla el texto.
   Antes se animaba con stroke-dashoffset, pero el logotipo ya no se dibuja
   con trazos sino con formas rellenas, y ese truco no aplica.
   El recorte solo se activa cuando el JS anade .is-armed: si el JS falla, el
   logotipo se ve completo en lugar de quedarse invisible. */
[data-wipe].is-armed { clip-path: inset(0 100% 0 0); }
[data-wipe].is-armed.is-drawn {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.5s var(--ease-out);
}
@media (prefers-reduced-motion: reduce) {
  [data-wipe].is-armed, [data-wipe].is-armed.is-drawn { clip-path: none; transition: none; }
}
.morph svg { width: min(100%, 760px); }
.morph__labels { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3) var(--s-6); margin-top: var(--s-6); }
.morph__labels span {
  font-family: var(--font-display); font-weight: 600; font-size: .8125rem;
  letter-spacing: .16em; text-transform: uppercase; color: var(--text-secondary);
}

/* ---------- 15. FORMULARIO ---------- */
.form { display: grid; gap: var(--s-5); }
.form__group { display: grid; gap: var(--s-4); }
.form__group + .form__group { margin-top: var(--s-5); padding-top: var(--s-5); border-top: 1px solid var(--border-subtle); }
.form__group > h2 {
  font-family: var(--font-display); font-weight: 600; font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent);
}
.form__row { display: grid; gap: var(--s-4); }
@media (min-width: 640px) { .form__row--2 { grid-template-columns: 1fr 1fr; } }

.field { display: grid; gap: 6px; }
.field label { font-size: var(--fs-caption); font-weight: 500; color: var(--text-secondary); }
.field .opt { color: var(--text-muted); font-weight: 400; }
.field input, .field select, .field textarea {
  background: var(--bg-surface); border: 1px solid var(--border-subtle);
  border-radius: var(--r-sm); padding: 0 1rem; min-height: 52px;
  color: var(--text-primary); font-size: var(--fs-body-m);
  transition: border-color .18s, box-shadow .18s;
  width: 100%;
}
.field textarea { padding: .85rem 1rem; min-height: 120px; resize: vertical; line-height: 1.6; }
.field select { appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%230DD1C9' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 1rem center; padding-right: 2.6rem; }
.field input::placeholder, .field textarea::placeholder { color: rgba(255,255,255,.38); }
.field input:hover, .field select:hover, .field textarea:hover { border-color: rgba(13,209,201,.35); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(13,209,201,.20);
}
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--danger); }
.field .err { font-size: var(--fs-caption); color: var(--danger); display: none; }
.field.has-error .err { display: block; }

.check { display: flex; gap: var(--s-3); align-items: flex-start; font-size: var(--fs-body-s); color: var(--text-secondary); cursor: pointer; }
.check input { flex: none; width: 22px; height: 22px; min-height: 0; accent-color: var(--brand-turquoise); margin-top: 1px; cursor: pointer; }
.check a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form__status { font-size: var(--fs-body-s); border-radius: var(--r-sm); padding: var(--s-4); display: none; }
.form__status.is-error { display: block; background: rgba(255,107,107,.10); border: 1px solid rgba(255,107,107,.35); color: #ffb0b0; }

/* ---------- 15b. PÁGINAS LEGALES ---------- */
.legal { padding-top: calc(var(--header-h) + var(--s-8)); }
.legal__wrap { display: grid; gap: var(--s-8); margin-top: var(--s-6); }
@media (min-width: 1024px) { .legal__wrap { grid-template-columns: minmax(0,720px) 1fr; gap: var(--s-9); } }
.legal__body h1 { margin-bottom: var(--s-5); }
.legal__body h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.375rem;
  color: var(--brand-deep-blue); margin-top: var(--s-8); margin-bottom: var(--s-4);
  scroll-margin-top: calc(var(--header-h) + var(--s-4));
}
.legal__body p { color: var(--brand-gray); margin-bottom: var(--s-4); line-height: 1.75; }
.legal__body .lead { color: var(--brand-deep-blue); }
/* Sirve tanto en secciones claras como oscuras: el color de texto
   se hereda del contexto y solo se fija en la variante clara. */
.legal__note {
  background: rgba(13,209,201,.10); border-left: 3px solid var(--brand-turquoise);
  border-radius: 0 var(--r-sm) var(--r-sm) 0; padding: var(--s-5);
  margin: var(--s-6) 0; font-size: var(--fs-body-s); color: var(--text-secondary);
}
.legal__note strong { display: block; margin-bottom: var(--s-2); color: var(--text-primary); }
.legal__note code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; color: var(--accent); }
.section--light .legal__note { color: var(--brand-deep-blue); }
.section--light .legal__note strong { color: var(--brand-deep-blue); }
.legal__toc { align-self: start; position: sticky; top: calc(var(--header-h) + var(--s-4)); }
.legal__toc h2 {
  font-family: var(--font-display); font-weight: 600; font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--brand-deep-blue); margin-bottom: var(--s-4);
}
.legal__toc li + li { margin-top: var(--s-3); }
.legal__toc a { font-size: var(--fs-body-s); color: var(--brand-gray); }
.legal__toc a:hover { color: var(--brand-deep-blue); }
@media (max-width: 1023px) { .legal__toc { display: none; } }

/* ---------- 16. FOOTER ---------- */
.footer { background: var(--bg-base); border-top: 1px solid rgba(13,209,201,.15); padding-block: var(--s-9) var(--s-6); }
.footer__grid { display: grid; gap: var(--s-7); }
@media (min-width: 768px)  { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
@media (min-width: 1024px) { .footer__grid { grid-template-columns: 1.8fr 1fr 1fr 1.2fr; } }
.footer h2 {
  font-family: var(--font-display); font-weight: 600; font-size: .75rem;
  letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: var(--s-4);
}
.footer li + li { margin-top: var(--s-3); }
.footer a:not(.logo):not(.btn) { color: var(--text-secondary); font-size: var(--fs-body-s); transition: color .18s; }
.footer a:not(.logo):not(.btn):hover { color: var(--text-primary); }
.footer__legal {
  margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid rgba(255,255,255,.08);
  display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-5); align-items: center; justify-content: space-between;
}
.footer__legal p, .footer__legal a { font-size: var(--fs-caption); color: var(--text-muted); }
.social { display: flex; gap: var(--s-3); margin-top: var(--s-5); }
.social a {
  width: 40px; height: 40px; display: grid; place-items: center;
  border: 1px solid var(--border-subtle); border-radius: var(--r-sm); transition: border-color .18s, color .18s;
}
.social a:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- 17. UTILIDADES ---------- */
.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;
}
.center { text-align: center; margin-inline: auto; }
.center .lead { margin-inline: auto; }
[hidden] { display: none !important; }

.breadcrumb { font-size: var(--fs-caption); color: var(--text-muted); display: flex; flex-wrap: wrap; gap: .5em; }
.breadcrumb a:hover { color: var(--accent); }

.media { border-radius: var(--r-lg); overflow: hidden; position: relative; background: var(--bg-surface); }
.media img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82) contrast(1.06); }
.media::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 30%, rgba(8,15,20,.55) 100%),
              linear-gradient(180deg, rgba(10,31,46,.28), rgba(10,31,46,.10));
}

/* Cookies */
.cookies {
  position: fixed; left: auto; right: var(--s-4); bottom: var(--s-4); z-index: 120;
  max-width: min(440px, calc(100vw - var(--s-4) * 2)); background: var(--bg-surface); border: 1px solid var(--border-strong);
  border-radius: var(--r-lg); padding: var(--s-5); display: none; gap: var(--s-4); flex-direction: column;
  box-shadow: 0 18px 50px rgba(0,0,0,.5);
}
.cookies.is-open { display: flex; }
/* Con el menú móvil abierto, el aviso de cookies estorba */
body.menu-abierto .cookies { display: none; }
.cookies__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
@media (max-width: 1023px) { .cookies { bottom: calc(60px + var(--s-4)); } }
