/* Infalible v3 — embudo interactivo.
   Escala tipográfica alineada al promedio global medido (titular ~56 px, cuerpo 17 px).
   Colores de la marca: la "i" azul y la esfera roja del logotipo. */

:root {
  --night: #0a1230;
  --night-2: #121d47;
  --night-3: #1a2760;
  --cobalt: #2e5bff;
  --cobalt-deep: #1d3fd1;
  /* colores medidos del logotipo original */
  --logo-blue: #78a5fe;     /* cara clara del símbolo */
  --logo-slate: #445478;    /* cara oscura del símbolo */
  --logo-neck: #4f69e3;     /* cuello */
  --logo-red: #fd0606;      /* núcleo de la esfera */
  --sky: #78a5fe;
  --ice: #eef2ff;
  --white: #ffffff;
  --ink: #0a1230;
  --ink-soft: #3d4a70;
  --sphere: #e3281b;
  --sphere-strong: #c21f14;
  --sphere-grad: radial-gradient(circle at 34% 30%, #ffd6d6 0, #ff7a7a 9%, #fd0606 34%, #fd0606 62%, #e42a2a 80%, #b85a5c 94%, #7a5a66 100%);

  --f-display: "Unbounded", "Hanken Grotesk", system-ui, sans-serif;
  --f-text: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --t-h1: clamp(2.125rem, 1.2rem + 2.6vw, 3.5rem);
  --t-h2: clamp(1.75rem, 1.2rem + 1.5vw, 2.5rem);
  --t-h3: clamp(1.25rem, 1.1rem + 0.5vw, 1.5rem);
  --t-lead: clamp(1.125rem, 1.05rem + 0.3vw, 1.3125rem);
  --t-body: 1.0625rem;
  --t-small: 0.875rem;

  --wrap: 1200px;
  --gut: clamp(16px, 4vw, 48px);
  --pad: clamp(80px, 10vw, 140px);
  --r: 20px;
  --r-sm: 12px;

  /* curvas de movimiento (Emil Kowalski): entradas, movimiento en pantalla y paneles */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --ease: var(--ease-out);

  /* textos sobre fondos oscuros y estados */
  --on-dark: #ffffff;
  --on-dark-2: #dfe6ff;     /* texto corrido sobre azul noche o cobalto */
  --on-dark-3: #c9d5ff;     /* texto secundario sobre oscuro */
  --muted-dark: #8f9cc4;    /* notas y créditos */
  --night-0: #070b1f;
  --sphere-soft: #ffb4ab;
  --ok: #3ddc84;
  --alert-bg: #3a0f12;
  --ok-bg: #0f2e22;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--night); color: var(--ink); font: 400 var(--t-body)/1.55 var(--f-text); -webkit-font-smoothing: antialiased; }
img, video { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, figure, fieldset { margin: 0; }
ul, ol { padding: 0; list-style: none; }
fieldset { border: 0; padding: 0; min-width: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--sphere); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--cobalt); color: #fff; }

h1, h2 { font-family: var(--f-display); font-weight: 500; letter-spacing: -0.02em; line-height: 1.08; text-wrap: balance; }
h1 { font-size: var(--t-h1); }
h2 { font-size: var(--t-h2); }
h3 { font-size: var(--t-h3); font-weight: 600; letter-spacing: -0.01em; line-height: 1.2; }
.lead { font-size: var(--t-lead); line-height: 1.5; }
.wrap { width: min(100% - 2 * var(--gut), var(--wrap)); margin-inline: auto; }

.skip { position: absolute; left: 16px; top: -60px; z-index: 60; background: #fff; color: var(--ink); padding: 10px 14px; border-radius: 8px; }
.skip:focus { top: 16px; }

/* ---------- Logotipo original de infalible.com (redibujo vectorial en assets/logo) ---------- */
.brand { display: inline-flex; align-items: center; text-decoration: none; color: #fff; }
.logo { display: block; height: 64px; width: auto; }
.logo-foot { height: 84px; }
@media (max-width: 520px) { .logo { height: 52px; } }

/* ---------- Entrada ---------- */
.intro { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; background: var(--night); pointer-events: none; }
.intro-i { width: 98px; height: 250px; overflow: visible; }
.intro-i g { transform-box: fill-box; }
.js .intro { animation: intro-out .35s var(--ease-out) 1s forwards; }
.intro-stem { transform-origin: 50% 100%; animation: stem-up .4s var(--ease-out) both; }
/* la esfera cae y asienta: un rebote físico sutil, una vez por visita */
.intro-ball { animation: ball-drop .62s cubic-bezier(.34, 1.3, .64, 1) .2s both; }
@keyframes stem-up { from { transform: scaleY(0); } to { transform: none; } }
@keyframes ball-drop { 0% { transform: translateY(-150%); opacity: 0; } 30% { opacity: 1; } 100% { transform: none; opacity: 1; } }
@keyframes intro-out { to { opacity: 0; visibility: hidden; } }
.no-intro .intro, html:not(.js) .intro { display: none; }
@media (prefers-reduced-motion: reduce) { .intro { display: none; } }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border-radius: 999px;
  background: var(--sphere); color: #fff; border: 0;
  font: 600 1rem/1.1 var(--f-text); text-decoration: none; cursor: pointer; text-align: center;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s var(--ease);
}
.btn:active { transform: scale(.97); }
.btn-sm { min-height: 40px; padding: 0 18px; font-size: .9375rem; }
.btn-ghost { background: rgba(255, 255, 255, .12); color: #fff; }
.btn-line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--sphere-strong); }
  .btn-ghost:hover { background: rgba(255, 255, 255, .22); }
  .btn-line:hover { background: var(--ink); color: #fff; }
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Navegación ---------- */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 84px; padding: 0 var(--gut); color: #fff;
  transition: background-color .25s ease;
}
.nav.is-solid { background: rgba(10, 18, 48, .92); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.nav ul { display: flex; gap: 32px; font-size: .9375rem; }
.nav ul a { text-decoration: none; opacity: .85; transition: opacity .15s ease; }
@media (hover: hover) { .nav ul a:hover { opacity: 1; } }
@media (max-width: 860px) { .nav nav { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100svh; overflow: hidden; display: grid; grid-template-rows: 1fr auto; background: var(--night); color: #fff; padding: 108px var(--gut) 32px; }
.era-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-copy { position: relative; align-self: center; max-width: 620px; display: grid; gap: 22px; }
.hero-copy .lead { color: var(--on-dark-2); max-width: 46ch; }
.hero-copy .actions { margin-top: 6px; }
.scrub { position: relative; width: min(100%, 720px); display: grid; gap: 10px; padding: 18px 22px; border-radius: var(--r); background: rgba(10, 18, 48, .72); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.scrub-label { font-size: var(--t-small); color: var(--sky); }
.scrub-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; font-size: var(--t-small); color: var(--sky); font-variant-numeric: tabular-nums; }
.scrub-read output { font: 600 var(--t-body)/1 var(--f-display); color: #fff; margin-right: 8px; }
#era-short { color: var(--on-dark-2); }
@media (max-width: 720px) { .hero { padding-top: 88px; gap: 28px; } .hero-copy { align-self: end; } .scrub { padding: 16px; } }

/* Deslizadores */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; margin: 0; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 6px; background: linear-gradient(90deg, var(--track-on, var(--sphere)) var(--fill, 0%), var(--track-off, rgba(143, 176, 255, .3)) var(--fill, 0%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 6px; background: var(--track-off, rgba(143, 176, 255, .3)); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 6px; background: var(--track-on, var(--sphere)); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -9px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 6px rgba(255, 61, 46, .35); transition: transform .12s var(--ease); }
input[type="range"]::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 0; box-shadow: 0 0 0 6px rgba(255, 61, 46, .35); }
input[type="range"]:active::-webkit-slider-thumb { transform: scale(1.15); }

/* ---------- Datos (motion graphics) ---------- */
.data { background: var(--night); color: #fff; padding: var(--pad) 0; }
.data-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 40px 56px; align-items: center; }
.data-copy { display: grid; gap: 18px; }
.data-copy .lead { color: var(--on-dark-2); }
.data-video { position: relative; border-radius: var(--r); overflow: hidden; background: var(--night-2); aspect-ratio: 16 / 9; }
.data-video video { width: 100%; height: 100%; object-fit: cover; }
.data-video.is-vertical { aspect-ratio: 9 / 16; max-width: 420px; justify-self: center; width: 100%; }
.data-video.is-vertical .video-toggle { top: 14px; bottom: auto; }
.video-toggle { position: absolute; right: 14px; bottom: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(10, 18, 48, .8); display: grid; place-items: center; cursor: pointer; }
.ico-pause { width: 14px; height: 14px; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.video-toggle[aria-pressed="true"] .ico-pause { width: 0; height: 0; border-style: solid; border-width: 8px 0 8px 14px; border-color: transparent transparent transparent #fff; margin-left: 4px; }
.facts-row { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.facts-row li { display: grid; gap: 6px; align-content: start; padding: 22px; border-radius: var(--r); background: var(--night-2); }
.facts-row strong { font: 600 var(--t-h2)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.facts-row span { color: var(--on-dark-2); }
.facts-row a { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: -12px; font-size: var(--t-small); color: var(--sky); }
@media (max-width: 960px) { .data-grid { grid-template-columns: 1fr; } .facts-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .facts-row { grid-template-columns: 1fr; } }

/* ---------- Diagnóstico ---------- */
.diag { background: var(--cobalt); color: #fff; padding: var(--pad) 0; --track-on: #fff; --track-off: rgba(255, 255, 255, .3); }
.diag-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px 64px; }
.diag-era { margin-top: 16px; font-size: var(--t-lead); color: #fff; max-width: 32ch; }
.diag-year { margin-top: 32px; display: grid; gap: 6px; max-width: 420px; }
.diag-year label { font-weight: 600; display: flex; justify-content: space-between; gap: 12px; }
.diag-year output { font: 600 var(--t-h3)/1 var(--f-display); }
.diag-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.diag-cols h3 { font-size: var(--t-body); margin-bottom: 12px; }
.diag-cols li { padding: 10px 0 10px 18px; position: relative; transition: opacity .25s var(--ease-out), transform .3s var(--ease-out); }
@starting-style { .diag-cols li { opacity: 0; transform: translateY(6px); } }
.diag-cols li::before { content: ""; position: absolute; left: 0; top: 19px; width: 7px; height: 7px; border-radius: 50%; background: var(--sky); }
#d-risk li::before { background: var(--sphere-soft); }
.diag-form { grid-column: 1 / -1; display: grid; gap: 10px; padding: 24px; border-radius: var(--r); background: var(--cobalt-deep); }
.diag-form label { font-weight: 600; }
.field-row { display: flex; gap: 10px; }
.field-row input { flex: 1; min-width: 0; min-height: 52px; padding: 0 20px; border: 0; border-radius: 999px; font: inherit; color: var(--ink); background: #fff; }
.field-row input::placeholder { color: #5d6890; }
.field-row .btn { min-height: 52px; }
.note { font-size: var(--t-small); color: var(--on-dark-2); }
.is-swap { animation: swap .35s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .is-swap { animation: none; } }
@media (max-width: 900px) { .diag-grid { grid-template-columns: 1fr; gap: 32px; } .diag-cols { grid-template-columns: 1fr; gap: 20px; } .field-row { flex-direction: column; } }

/* ---------- Servicios: tarjetas que se voltean ---------- */
.services { background: var(--ice); padding: var(--pad) 0; }
.srv-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; }
.srv-head p { color: var(--ink-soft); max-width: 46ch; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin: 36px 0 28px; }
.chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 0; background: #fff; color: var(--ink); font-weight: 600; cursor: pointer; transition: background-color .18s ease, color .18s ease; }
.chip.is-on { background: var(--ink); color: #fff; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-top: 36px; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.flip { perspective: 1400px; }
.flip[hidden] { display: none; }
.flip-inner { position: relative; display: grid; height: 100%; min-height: 270px; transform-style: preserve-3d; transition: transform .52s var(--ease-in-out); }
.flip.is-flipped .flip-inner { transform: rotateY(180deg); }
.face { position: relative; grid-area: 1 / 1; display: flex; flex-direction: column; gap: 12px; padding: 24px; border-radius: var(--r); -webkit-backface-visibility: hidden; backface-visibility: hidden; overflow: hidden; }
.front { cursor: pointer; }
.back { transform: rotateY(180deg); background: #fff; color: var(--ink); }
.flip:not(.is-flipped) .back, .flip.is-flipped .front { pointer-events: none; }
.front h3 { margin-top: auto; }
.front p { opacity: .9; }
.front .turn { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; align-self: start; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 0; font-weight: 600; cursor: pointer; background: rgba(6, 10, 30, .32); color: #fff; }
.turn-ico { width: 16px; height: 16px; }
.front { background-color: var(--cobalt); color: #fff; }
.back ul { display: grid; gap: 8px; flex: 1; }
.back li { padding-left: 18px; position: relative; font-size: 1rem; line-height: 1.45; }
.back li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); }
.back-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.add[aria-pressed="true"] { background: var(--ink); }
.back .linkish { min-height: 44px; border: 0; background: none; padding: 8px 4px; font-weight: 600; color: var(--ink-soft); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.flip.is-added .front::after { content: "En tu proyecto"; position: absolute; top: 18px; right: 18px; padding: 4px 10px; border-radius: 999px; background: var(--sphere); color: #fff; font-size: var(--t-small); font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .flip-inner { transition: none; } }
@media (hover: hover) and (pointer: fine) { .flip:not(.is-flipped) .front:hover { filter: brightness(1.06); } }
@media (max-width: 1080px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .srv-head { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } .flip-inner { min-height: 240px; } }

/* ---------- Tu proyecto ---------- */
.project { background: var(--night); color: #fff; padding: var(--pad) 0; }
.project-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.project-copy { display: grid; gap: 20px; position: sticky; top: 100px; }
.project-copy .lead { color: var(--on-dark-2); }
.summary { margin-top: 12px; padding: 22px; border-radius: var(--r); background: var(--night-2); }
.summary h3 { font-size: var(--t-body); margin-bottom: 8px; color: var(--sky); }
.summary p { white-space: pre-line; }
.builder { display: grid; gap: 28px; padding: 32px; border-radius: var(--r); background: var(--ice); color: var(--ink); }
.builder legend { font: 600 var(--t-h3)/1.2 var(--f-text); margin-bottom: 14px; padding: 0; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill { position: relative; }
.pill input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pill span { display: inline-flex; align-items: center; min-height: 44px; padding: 10px 18px; line-height: 1.3; border-radius: 999px; background: #fff; font-weight: 500; transition: background-color .15s ease, color .15s ease; }
.pill input:checked + span { background: var(--cobalt); color: #fff; }
.pill input:focus-visible + span { outline: 3px solid var(--sphere); outline-offset: 2px; }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.fields label { display: grid; gap: 6px; font-weight: 600; }
.fields input { min-height: 50px; padding: 0 18px; border-radius: var(--r-sm); border: 2px solid transparent; background: #fff; font: inherit; color: var(--ink); }
.fields input:focus { border-color: var(--cobalt); outline: none; }
@media (max-width: 900px) { .project-grid { grid-template-columns: 1fr; gap: 32px; } .project-copy { position: static; } .fields { grid-template-columns: 1fr; } .builder { padding: 22px; } }

/* ---------- Proceso: un paso a la vez ---------- */
.process { background: var(--ice); padding: var(--pad) 0; }
.proc-head { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 64px; align-items: end; margin-bottom: 32px; }
.proc-head p { color: var(--ink-soft); max-width: 44ch; }
.step-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.step-tabs button {
  width: 100%; min-height: 56px; display: flex; align-items: center; gap: 12px; padding: 8px 14px;
  border: 0; border-radius: var(--r-sm); background: #fff; color: var(--ink-soft); font-weight: 600; text-align: left; cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.tab-n { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--ice); color: var(--ink); font: 600 .9375rem/1 var(--f-display); transition: background-color .2s ease, color .2s ease; }
.step-tabs button[aria-selected="true"] { background: var(--night); color: #fff; }
.step-tabs button[aria-selected="true"] .tab-n, .step-tabs button.is-done .tab-n { background: var(--sphere); color: #fff; }
.step-progress { height: 4px; margin: 14px 0 20px; border-radius: 4px; background: rgba(10, 18, 48, .1); overflow: hidden; }
.step-progress span { display: block; height: 100%; width: 100%; transform-origin: left; transform: scaleX(var(--progress, .25)); background: var(--sphere); border-radius: 4px; transition: transform .32s var(--ease-out); }
.step-stage { position: relative; overflow-x: clip; }
.step-panel { display: grid; grid-template-columns: 5fr 7fr; border-radius: var(--r); overflow: hidden; background: #fff; min-height: 340px; }
.step-panel[hidden] { display: none; }
.step-img { position: relative; overflow: hidden; background: var(--night-2); }
.step-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.step-body { display: grid; gap: 12px; align-content: center; padding: clamp(24px, 4vw, 48px); }
.step-body > p:not(.step) { color: var(--ink-soft); max-width: 46ch; font-size: var(--t-lead); line-height: 1.5; }
.step { font-weight: 600; color: var(--cobalt); }
.step-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
/* cada paso entra desde el lado hacia donde avanzas; con transición, no keyframes, para que clics rápidos no lo reinicien */
.step-panel { transition: opacity .28s var(--ease-out), transform .32s var(--ease-out); }
@starting-style { .step-panel { opacity: 0; transform: translateX(var(--step-from, 24px)); } }
@media (prefers-reduced-motion: reduce) { @starting-style { .step-panel { transform: none; } } }
@media (max-width: 900px) {
  .proc-head { grid-template-columns: 1fr; }
  .step-tabs { grid-template-columns: repeat(4, auto); justify-content: start; }
  .tab-t { display: none; }
  .step-tabs button { min-height: 48px; padding: 8px; }
  .step-panel { grid-template-columns: 1fr; min-height: 0; }
  .step-img { aspect-ratio: 16 / 9; }
  .step-nav .btn { flex: 1 1 auto; }
}

/* ---------- Garantías: parallax con esferas ---------- */
.promise { position: relative; overflow: hidden; background: var(--cobalt); color: #fff; padding: calc(var(--pad) * 1.1) 0; }
.orb { position: absolute; border-radius: 50%; background: var(--sphere-grad); pointer-events: none; will-change: transform; }
.orb-a { width: 260px; height: 260px; right: -110px; top: -150px; }
.orb-b { width: 90px; height: 90px; left: 44%; top: 70px; opacity: .9; }
.promise .wrap { position: relative; }
.promise-list { margin-top: 40px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 32px; }
.promise-list li { display: grid; gap: 8px; }
.promise-list strong { font: 600 var(--t-h3)/1.15 var(--f-display); }
.promise-list span { color: #fff; }
@media (max-width: 900px) { .promise-list { grid-template-columns: 1fr 1fr; } .orb-a { width: 220px; height: 220px; } }
@media (max-width: 520px) { .promise-list { grid-template-columns: 1fr; } }

/* ---------- Planes ---------- */
.plans { background: var(--ice); padding: var(--pad) 0; --track-on: var(--cobalt); --track-off: rgba(10, 18, 48, .15); }
.plans-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 32px; }
.plans-head p { color: var(--ink-soft); max-width: 46ch; }
.reco { display: grid; grid-template-columns: 1fr 1fr auto; gap: 20px 40px; align-items: end; padding: 24px 28px; border-radius: var(--r); background: #fff; margin-bottom: 20px; }
.reco label { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-weight: 600; }
.reco label input { grid-column: 1 / -1; }
.reco output { font: 600 var(--t-h3)/1 var(--f-display); color: var(--cobalt); }
.reco-read { font-size: var(--t-lead); padding-bottom: 6px; }
.reco-read strong { color: var(--cobalt); }
.plan-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan { display: flex; flex-direction: column; gap: 14px; padding: 32px 28px; border-radius: var(--r); background: #fff; transition: background-color .3s ease, color .3s ease, transform .3s var(--ease); }
.price { color: var(--ink-soft); }
.price span { font: 600 var(--t-h2)/1 var(--f-display); color: var(--ink); letter-spacing: -0.02em; margin-right: 6px; }
.plan-for { color: var(--ink-soft); }
.plan ul { display: grid; gap: 8px; padding: 8px 0 12px; flex: 1; }
.plan li { padding-left: 18px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); }
.plan .btn { align-self: start; }
.plan.is-reco { background: var(--night); color: #fff; transform: translateY(-6px); }
.plan.is-reco .price, .plan.is-reco .plan-for { color: var(--on-dark-3); }
.plan.is-reco .price span { color: #fff; }
.plan.is-reco li::before { background: var(--sphere); }
.plan.is-reco .btn { background: var(--sphere); color: #fff; box-shadow: none; }
@media (max-width: 900px) { .plans-head, .reco { grid-template-columns: 1fr; } .plan-row { grid-template-columns: 1fr; } .plan.is-reco { transform: none; } }

/* ---------- Preguntas: acordeón ---------- */
.faq { background: #fff; padding: var(--pad) 0; }
.faq-grid { display: grid; grid-template-columns: 4fr 8fr; gap: 56px; align-items: start; }
.faq-grid > div:first-child { display: grid; gap: 16px; position: sticky; top: 100px; }
.faq-grid > div:first-child p { color: var(--ink-soft); }
.faq-grid > div:first-child a { color: var(--cobalt); font-weight: 600; }
.accordion { display: grid; gap: 10px; }
.accordion details { border-radius: var(--r-sm); background: var(--ice); padding: 0 24px; transition: background-color .2s ease; }
.accordion details[open] { background: var(--night); color: #fff; }
.accordion summary { cursor: pointer; list-style: none; padding: 20px 36px 20px 0; font-weight: 600; font-size: 1.0625rem; position: relative; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; position: absolute; right: 0; top: 50%; width: 22px; height: 22px; margin-top: -11px; border-radius: 50%; background: var(--cobalt); transition: transform .25s var(--ease), background-color .2s ease;
  -webkit-mask: linear-gradient(#000 0 0) center / 10px 2px no-repeat, linear-gradient(#000 0 0) center / 2px 10px no-repeat, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.accordion details[open] summary::after { transform: rotate(45deg); background: var(--sphere); }
.accordion details p { padding: 0 0 22px; color: inherit; opacity: .9; max-width: 62ch; }
.accordion details::details-content { block-size: 0; overflow: hidden; transition: block-size .3s var(--ease), content-visibility .3s allow-discrete; }
.accordion details[open]::details-content { block-size: auto; }
@supports (interpolate-size: allow-keywords) { :root { interpolate-size: allow-keywords; } }
@media (max-width: 900px) { .faq-grid { grid-template-columns: 1fr; gap: 28px; } .faq-grid > div:first-child { position: static; } }

/* ---------- Quién te atiende ---------- */
.who { background: var(--night-2); color: #fff; padding: var(--pad) 0; }
.who-grid { display: grid; grid-template-columns: 4fr 7fr; gap: 64px; align-items: center; }
.who-photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; max-width: 380px; }
.who-photo img { width: 100%; height: 112%; margin-top: -6%; object-fit: cover; will-change: transform; }
.who-copy { display: grid; gap: 20px; max-width: 560px; }
.who-copy p { color: var(--on-dark-2); }
@media (max-width: 900px) { .who-grid { grid-template-columns: 1fr; gap: 32px; } .who-photo { max-width: 300px; } }

/* ---------- Contacto ---------- */
.contact { position: relative; overflow: hidden; background: var(--night-0); color: #fff; padding: calc(var(--pad) * 1.2) 0; }
.contact-bg { position: absolute; inset: -10% 0; width: 100%; height: 120%; object-fit: cover; opacity: .5; will-change: transform; }
.contact-inner { position: relative; display: grid; gap: 22px; justify-items: start; }
.contact .lead { color: var(--on-dark-2); }
.contact-lines { display: grid; gap: 12px; margin: 8px 0 10px; }
.c-line { display: grid; gap: 2px; text-decoration: none; font: 500 var(--t-h2)/1.15 var(--f-display); letter-spacing: -0.02em; }
.c-line span { font: 500 var(--t-small)/1.4 var(--f-text); letter-spacing: 0; color: var(--sky); }
.c-line:hover { color: var(--sphere-soft); }
@media (max-width: 520px) { .c-line { font-size: 1.375rem; overflow-wrap: anywhere; } }

/* ---------- Pie ---------- */
.foot { background: var(--night); color: var(--on-dark-3); padding: 48px 0 32px; font-size: .9375rem; }
.foot-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 32px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { text-decoration: none; }
.foot a:hover { color: #fff; }
.credits { margin-top: 28px; font-size: var(--t-small); color: var(--muted-dark); max-width: 72ch; margin-left: max(var(--gut), (100% - var(--wrap)) / 2); }

/* ---------- Acompañantes: WhatsApp y tu proyecto ---------- */
.fab {
  position: fixed; right: 18px; bottom: 18px; z-index: 40;
  display: inline-flex; align-items: center; gap: 10px; min-height: 56px; padding: 0 22px 0 18px; border-radius: 999px;
  background: var(--sphere); color: #fff; font-weight: 600; text-decoration: none;
  box-shadow: 0 10px 30px rgba(10, 18, 48, .35);
  transform: translateY(120px); transition: transform .4s var(--ease), background-color .18s ease;
}
.fab svg { width: 22px; height: 22px; fill: #fff; }
.fab.is-on { transform: none; }
.fab:hover { background: var(--sphere-strong); }
.tray {
  position: fixed; left: 50%; bottom: 18px; z-index: 39; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 6px; min-height: 52px; padding: 0 22px; border-radius: 999px;
  background: var(--night); color: #fff; text-decoration: none; font-weight: 500;
  box-shadow: 0 10px 30px rgba(10, 18, 48, .35); white-space: nowrap;
}
.tray strong { color: var(--sphere-soft); }
.tray[hidden] { display: none; }
@media (max-width: 640px) { .fab span { display: none; } .fab { padding: 0; width: 56px; justify-content: center; } .tray { left: 18px; translate: none; } }

/* ---------- Entradas y parallax ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-copy > * { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease-out), transform .7s var(--ease-out); }
  .js .hero-copy > :nth-child(2) { transition-delay: .08s; }
  .js .hero-copy > :nth-child(3) { transition-delay: .16s; }
  .js.is-loaded .hero-copy > * { opacity: 1; transform: none; }
  .js:not(.no-intro) .hero-copy > * { transition-delay: 1s; }
  .js:not(.no-intro) .hero-copy > :nth-child(2) { transition-delay: 1.08s; }
  .js:not(.no-intro) .hero-copy > :nth-child(3) { transition-delay: 1.16s; }
  .js .scrub { opacity: 0; transition: opacity .8s var(--ease) .5s; }
  .js.is-loaded .scrub { opacity: 1; }
  .js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .8s var(--ease); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
}

/* ---------- Aviso de privacidad ---------- */
.legal-page { background: var(--ice); }
.legal-page main { background: var(--ice); }
.legal-hero { background: var(--night); color: #fff; padding: 148px 0 64px; }
.legal-hero .wrap { display: grid; gap: 16px; }
.legal-hero .lead { color: var(--on-dark-2); max-width: 52ch; }
.legal-date { font-size: var(--t-small); color: var(--sky); }
.legal-grid { display: grid; grid-template-columns: 3fr 9fr; gap: 48px; padding: 56px 0 var(--pad); align-items: start; }
.legal-toc { position: sticky; top: 108px; }
.legal-toc ol { list-style: decimal; padding-left: 20px; display: grid; gap: 8px; color: var(--ink-soft); }
.legal-toc a { text-decoration: none; color: var(--ink-soft); }
.legal-toc a:hover { color: var(--cobalt); }
.legal-body { display: grid; gap: 18px; padding: clamp(24px, 4vw, 56px); border-radius: var(--r); background: #fff; }
.legal-body section { display: grid; gap: 12px; padding-bottom: 28px; scroll-margin-top: 108px; }
.legal-body section + section { padding-top: 28px; border-top: 1px solid var(--ice); }
.legal-body h2 { font-size: var(--t-h3); }
.legal-body h3 { font-size: var(--t-body); margin-top: 6px; }
.legal-body p, .legal-body li { max-width: 68ch; }
.legal-body ul { display: grid; gap: 8px; }
.legal-body li { padding-left: 18px; position: relative; }
.legal-body li::before { content: ""; position: absolute; left: 0; top: 10px; width: 7px; height: 7px; border-radius: 50%; background: var(--cobalt); }
.legal-body a { color: var(--cobalt); font-weight: 600; }
.legal-contact { display: grid; gap: 10px; margin-top: 6px; padding: 18px 20px; border-radius: var(--r-sm); background: var(--ice); }
.legal-contact div { display: grid; grid-template-columns: 170px 1fr; gap: 12px; }
.legal-contact dt { font-weight: 600; }
.legal-contact dd { margin: 0; }
@media (max-width: 900px) {
  .legal-grid { grid-template-columns: 1fr; gap: 24px; }
  .legal-toc { position: static; padding: 18px 20px; border-radius: var(--r); background: #fff; }
  .legal-contact div { grid-template-columns: 1fr; gap: 2px; }
  .legal-hero { padding-top: 120px; }
}

/* Aviso corto junto a los formularios */
.privacy-note { font-size: var(--t-small); color: inherit; opacity: .85; }
.privacy-note a { color: inherit; font-weight: 600; }

/* ---------- Menú: Soluciones (desplegable en escritorio, panel en celular) ---------- */
.menu { display: flex; align-items: center; }
.menu-toggle { display: none; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .12); color: #fff; font-weight: 600; cursor: pointer; }
.menu-panel { display: flex; align-items: center; gap: 30px; font-size: .9375rem; }
.menu-panel > a, .sub-toggle { color: #fff; text-decoration: none; opacity: .88; background: none; border: 0; padding: 8px 0; font: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.menu-panel > a:hover, .sub-toggle:hover, .menu-panel > a[aria-current="page"] { opacity: 1; }
.sub-toggle::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-2px) rotate(45deg); transition: transform .2s var(--ease); }
.sub-toggle[aria-expanded="true"]::after { transform: translateY(2px) rotate(-135deg); }
.has-sub { position: relative; }
.submenu {
  position: absolute; top: calc(100% + 18px); left: 50%; translate: -50% 0; width: min(760px, 92vw);
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 14px; border-radius: var(--r);
  background: var(--night-2); box-shadow: 0 24px 60px rgba(4, 8, 24, .5);
  transform-origin: top center;
  opacity: 0; visibility: hidden; transform: translateY(-4px) scale(.97); transition: opacity .12s ease, transform .12s var(--ease-out), visibility 0s .12s;
}
.has-sub.is-open .submenu { opacity: 1; visibility: visible; transform: none; transition: opacity .18s ease, transform .18s var(--ease-out); }
.submenu a { display: grid; gap: 2px; padding: 12px 14px; border-radius: var(--r-sm); text-decoration: none; color: #fff; }
.submenu a span { font-size: var(--t-small); color: var(--on-dark-3); }
.submenu a:hover, .submenu a:focus-visible, .submenu a[aria-current="page"] { background: rgba(120, 165, 254, .14); }
@media (max-width: 860px) {
  .nav nav.menu { display: flex; }
  .menu-toggle { display: inline-flex; align-items: center; }
  .menu-panel {
    position: fixed; inset: 84px 0 0; display: none; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px var(--gut) 32px; background: var(--night); overflow-y: auto; font-size: 1.0625rem;
  }
  .nav.menu-open .menu-panel { display: flex; }
  /* el desenfoque de la barra atraparía al panel fijo dentro de ella; con el menú abierto se quita */
  .nav.menu-open { background: var(--night); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .menu-panel > a, .sub-toggle { padding: 16px 0; width: 100%; justify-content: space-between; border-bottom: 1px solid rgba(120, 165, 254, .14); opacity: 1; }
  .submenu { position: static; translate: none; width: auto; grid-template-columns: 1fr; box-shadow: none; padding: 6px 0 10px; background: none; opacity: 1; visibility: visible; transform: none; display: none; }
  .has-sub.is-open .submenu { display: grid; }
  .nav > .btn-sm { display: none; }
}

/* ---------- Páginas de solución ---------- */
.crumbs { font-size: var(--t-small); color: var(--sky); }
.crumbs a { color: var(--sky); text-decoration: none; }
.crumbs a:hover { color: #fff; }
.page-hero { position: relative; background: var(--night); color: #fff; padding: 140px 0 80px; }
.page-hero .wrap { display: grid; grid-template-columns: 7fr 5fr; gap: 48px; align-items: center; }
.page-hero-copy { display: grid; gap: 20px; }
.page-hero-copy .lead { color: var(--on-dark-2); max-width: 48ch; }
.page-hero-copy .actions { margin-top: 6px; }
/* tarjeta antes / con Infalible: un fragmento de interfaz */
.state-card { border-radius: var(--r); background: var(--night-2); padding: 22px; display: grid; gap: 16px; }
.state-switch { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 999px; background: rgba(10, 18, 48, .7); }
.state-switch button { min-height: 44px; border: 0; border-radius: 999px; background: none; color: var(--on-dark-3); font-weight: 600; cursor: pointer; transition: background-color .2s ease, color .2s ease; }
.state-switch button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.state-view { display: grid; gap: 12px; }
.state-view[hidden] { display: none; }
.state-title { font: 600 var(--t-small)/1.3 var(--f-text); color: var(--on-dark-3); }
.state-big { display: flex; align-items: center; gap: 10px; font: 600 var(--t-h3)/1.2 var(--f-display); }
.state-big::before { content: ""; flex: none; width: 12px; height: 12px; border-radius: 50%; background: var(--sphere); box-shadow: 0 0 0 6px rgba(227, 40, 27, .2); }
.state-view.is-good .state-big::before { background: var(--ok); box-shadow: 0 0 0 6px rgba(61, 220, 132, .18); }
.state-rows { display: grid; gap: 8px; }
.state-rows div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 14px; border-radius: var(--r-sm); background: rgba(10, 18, 48, .55); font-size: .9375rem; }
.state-rows dt { color: var(--on-dark-3); }
.state-rows dd { margin: 0; font-weight: 600; text-align: right; }
.state-note { font-size: var(--t-small); color: var(--muted-dark); }
.state-view { transition: opacity .25s var(--ease-out), transform .3s var(--ease-out); }
@starting-style { .state-view { opacity: 0; transform: translateY(6px); } }

.page-problem { background: var(--ice); padding: var(--pad) 0; }
.two-col { display: grid; grid-template-columns: 5fr 7fr; gap: 56px; align-items: start; }
.two-col > div:first-child { display: grid; gap: 16px; position: sticky; top: 108px; }
.two-col p { color: var(--ink-soft); }
.problem-list { display: grid; gap: 12px; }
.problem-list li { padding: 18px 20px 18px 50px; border-radius: var(--r-sm); background: #fff; position: relative; }
.problem-list li::before { content: ""; position: absolute; left: 20px; top: 24px; width: 14px; height: 14px; border-radius: 50%; background: var(--sphere); box-shadow: 0 0 0 5px rgba(227, 40, 27, .14); }
.problem-list strong { display: block; margin-bottom: 2px; }

.page-steps { background: var(--night); color: #fff; padding: var(--pad) 0; }
.page-steps h2 { margin-bottom: 32px; }
.how-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: how; }
.how-list li { counter-increment: how; display: grid; gap: 10px; align-content: start; padding: 24px; border-radius: var(--r); background: var(--night-2); }
.how-list li::before { content: counter(how); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--sphere); font: 600 1rem/1 var(--f-display); }
.how-list p { color: var(--on-dark-2); }
@media (max-width: 1000px) { .how-list { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .how-list { grid-template-columns: 1fr; } }

.page-tool { background: var(--cobalt); color: #fff; padding: var(--pad) 0; --track-on: #fff; --track-off: rgba(255, 255, 255, .3); }
.tool-grid { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.tool-grid > div:first-child { display: grid; gap: 14px; }
.tool-grid > div:first-child p { color: #eef2ff; }
.tool { display: grid; gap: 22px; padding: 28px; border-radius: var(--r); background: var(--ice); color: var(--ink); }
.tool fieldset { display: grid; gap: 12px; }
.tool legend { font: 600 var(--t-h3)/1.2 var(--f-text); margin-bottom: 12px; padding: 0; }
.tool .pills { display: flex; flex-wrap: wrap; gap: 10px; }
.tool textarea, .tool input[type="number"] { width: 100%; min-height: 52px; padding: 12px 16px; border: 2px solid transparent; border-radius: var(--r-sm); background: #fff; font: inherit; color: var(--ink); }
.tool textarea { min-height: 96px; resize: vertical; }
.tool textarea:focus, .tool input[type="number"]:focus { outline: none; border-color: var(--cobalt); }
.tool-result { padding: 20px; border-radius: var(--r-sm); background: var(--night); color: #fff; display: grid; gap: 8px; }
.tool-result h3 { font-size: var(--t-body); color: var(--sky); }
.tool-result p { white-space: pre-line; }
.tool-result.is-alert { background: var(--alert-bg); }
.tool-result.is-good { background: var(--ok-bg); }
.tool-note { font-size: var(--t-small); color: var(--ink-soft); }
@media (max-width: 900px) { .two-col, .tool-grid, .page-hero .wrap { grid-template-columns: 1fr; } .two-col > div:first-child { position: static; } .page-hero { padding-top: 116px; } }

.page-includes { background: #fff; padding: var(--pad) 0; }
.includes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.includes-grid li { padding: 22px; border-radius: var(--r); background: var(--ice); display: grid; gap: 6px; }
.includes-grid strong { font-size: 1.0625rem; }
.includes-grid span { color: var(--ink-soft); }
@media (max-width: 900px) { .includes-grid { grid-template-columns: 1fr; } }

.page-cta { position: relative; overflow: hidden; background: var(--night); color: #fff; padding: calc(var(--pad) * .9) 0; }
.page-cta .wrap { position: relative; display: grid; gap: 18px; justify-items: start; }
.page-cta .lead { color: var(--on-dark-2); max-width: 52ch; }

.related { background: var(--ice); padding: var(--pad) 0; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 28px; }
.related-grid a { display: grid; gap: 8px; padding: 24px; border-radius: var(--r); background: var(--night); color: #fff; text-decoration: none; transition: transform .2s var(--ease), background-color .2s ease; }
.related-grid a span { color: var(--on-dark-3); }
@media (hover: hover) and (pointer: fine) { .related-grid a:hover { transform: translateY(-3px); background: var(--night-3); } }
@media (max-width: 900px) { .related-grid { grid-template-columns: 1fr; } }
.page-faq { background: #fff; }

/* Tarjetas del inicio: enlace a la página de cada solución */
.back .go { display: inline-flex; align-items: center; min-height: 44px; font-weight: 600; color: var(--cobalt); text-decoration: none; padding: 0 4px; }
.back .go:hover { text-decoration: underline; }

.fields-one { display: grid; gap: 8px; }
.tool-label { font: 600 var(--t-h3)/1.2 var(--f-text); }

@media (max-width: 1080px) { .cards-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards-3 { grid-template-columns: 1fr; } }
.nav.menu-open ~ .fab, .nav.menu-open ~ .tray { display: none; }


/* ---------- Pulido de interacción (filosofía de Emil Kowalski) ---------- */
/* todo lo presionable responde al presionar */
.chip, .pill span, .turn, .state-switch button, .step-tabs button, .video-toggle, .sub-toggle, .menu-toggle, .linkish, .accordion summary, .round {
  transition-property: background-color, color, transform;
  transition-duration: .16s;
  transition-timing-function: var(--ease-out);
}
.chip:active, .pill:active span, .turn:active, .state-switch button:active, .step-tabs button:active, .video-toggle:active, .menu-toggle:active, .linkish:active { transform: scale(.97); }
.accordion summary:active { transform: scale(.995); }

/* se siente app nativa en el celular: sin destello gris ni espera de doble toque */
a, button, summary, label, input { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.fab { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }
.tray { bottom: calc(18px + env(safe-area-inset-bottom, 0px)); }

/* la bandeja "Tu proyecto" aparece en lugar de saltar */
.tray { transition: opacity .25s var(--ease-out), transform .3s var(--ease-out); }
@starting-style { .tray { opacity: 0; transform: translateY(12px); } }

/* la marca "En tu proyecto" confirma con un pequeño pop */
.flip.is-added .front::after { animation: added .22s var(--ease-out); }
@keyframes added { from { opacity: 0; transform: scale(.9); } to { opacity: 1; transform: none; } }

/* menú de celular: entra como panel */
@media (max-width: 860px) {
  .menu-panel { overscroll-behavior: contain; }
  .nav.menu-open .menu-panel { transition: opacity .22s var(--ease-drawer), transform .28s var(--ease-drawer); }
  @starting-style { .nav.menu-open .menu-panel { opacity: 0; transform: translateY(-8px); } }
}

/* escalonado al entrar en pantalla: 50 ms entre elementos, una sola vez, nunca bloquea */
@media (prefers-reduced-motion: no-preference) {
  .js [data-stagger] > * { opacity: 0; transform: translateY(10px); transition: opacity .4s var(--ease-out), transform .5s var(--ease-out); transition-delay: calc(var(--i, 0) * 50ms); }
  .js [data-stagger].is-in > * { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .flip-inner { transition: opacity .2s ease; }
}
