/* ==========================================================
   Carlos Mansilla · Growth Performance
   Dirección: "sala de control" — panel oscuro, retícula
   visible, lecturas en mono y el rojo reservado a la señal.
   ========================================================== */
:root {
  --bg: #09090b;
  --bg-2: #0d0e10;
  --surface: #121316;
  --surface-2: #18191d;
  --line: #2a2b31;
  --line-soft: #1c1d22;
  --grid: rgba(255, 255, 255, .028);
  --text: #f4f4f6;
  --text-2: #c4c4cc;   /* cuerpo: contraste AA sobre --bg */
  --text-3: #8d8d97;
  --accent: #ff2d55;
  --accent-2: #ff5a7a;
  --accent-soft: rgba(255, 45, 85, .12);
  --accent-line: rgba(255, 45, 85, .45);
  --ok: #4ade80;
  --grad: linear-gradient(120deg, #ff2d55 0%, #ff4d6d 55%, #ff7a59 100%);
  --radius: 14px;
  --radius-sm: 10px;
  --wrap: 1180px;
  --font: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  background-position: center top;
  color: var(--text-2);
  font: 400 17px/1.65 var(--font);
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  counter-reset: sec;
}
/* grano sutil: un solo raster, sin costo de animación */
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { color: var(--text); margin: 0; line-height: 1.1; font-weight: 800; }
h1, h2 { font-variation-settings: "wdth" 76; letter-spacing: -.012em; }
/* titulares a dos tonos; el degradado queda sólo para la señal (hero, consultoría, contacto) */
em { font-style: normal; color: var(--text-3); }
.hero__title em, .section--offer h2 em, .section--cta h2 em {
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent;
}
p { margin: 0 0 1em; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .02em; }
.muted { color: var(--text-3); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--accent); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* esquinas tipo visor, reutilizables */
.brackets { position: relative; }
.brackets::before, .brackets::after {
  content: ""; position: absolute; width: 14px; height: 14px; pointer-events: none;
  border-color: var(--accent-line); border-style: solid;
}
.brackets::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; border-top-left-radius: inherit; }
.brackets::after { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; border-bottom-right-radius: inherit; }

/* ---------- botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 15px 24px; border-radius: 10px; font-weight: 700; font-size: 16px;
  border: 1px solid transparent; cursor: pointer; font-family: inherit; line-height: 1.2; text-align: center;
  transition: transform .2s var(--ease), box-shadow .2s, background-color .2s, border-color .2s;
}
.btn--primary { background: var(--grad); color: #fff; box-shadow: 0 10px 30px -12px rgba(255, 45, 85, .7), inset 0 1px 0 rgba(255,255,255,.2); }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -12px rgba(255, 45, 85, .85), inset 0 1px 0 rgba(255,255,255,.2); }
.btn--ghost { border-color: var(--line); color: var(--text); background: rgba(255,255,255,.025); }
.btn--ghost:hover { border-color: var(--accent); background: var(--accent-soft); }
.btn--sm { padding: 10px 16px; font-size: 14px; }
.btn--block { width: 100%; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(9, 9, 11, .8);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand__mark {
  width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 900; font-size: 14px; letter-spacing: .02em;
}
.brand__text { display: flex; flex-direction: column; color: var(--text); font-weight: 800; line-height: 1.1; }
.brand__text small { font: 500 11px/1.4 var(--mono); color: var(--text-3); letter-spacing: .04em; text-transform: uppercase; margin-top: 2px; }
.nav__links { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.nav__links a:not(.btn) { color: var(--text-2); transition: color .2s; position: relative; }
.nav__links a:not(.btn):hover { color: var(--text); }
.nav__toggle { display: none; background: none; border: 0; width: 42px; height: 42px; cursor: pointer; position: relative; }
.nav__toggle span { position: absolute; left: 10px; right: 10px; height: 2px; background: var(--text); transition: transform .25s, top .25s; }
.nav__toggle span:first-child { top: 16px; }
.nav__toggle span:last-child { top: 25px; }
.nav__toggle[aria-expanded="true"] span:first-child { top: 20px; transform: rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:last-child { top: 20px; transform: rotate(-45deg); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 84px 0 96px; overflow: hidden; border-bottom: 1px solid var(--line-soft); }
.hero::before {
  /* retícula más marcada que se desvanece hacia los bordes */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 64px 64px; background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
          mask-image: radial-gradient(ellipse 70% 70% at 70% 40%, #000 20%, transparent 75%);
}
.hero__glow {
  position: absolute; top: -260px; right: -200px; width: 820px; height: 820px; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 45, 85, .18), transparent 70%);
}
.hero__grid { position: relative; display: grid; grid-template-columns: 1.12fr .88fr; gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 8px;
  border: 1px solid var(--line); background: rgba(255,255,255,.02);
  font: 500 12px/1.4 var(--mono); letter-spacing: .03em; color: var(--text-2); margin-bottom: 26px;
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); flex: none; }
.hero__title { font-size: clamp(36px, 6vw, 74px); font-variation-settings: "wdth" 70; letter-spacing: -.015em; line-height: 1.01; margin-bottom: 24px; text-wrap: balance; }
.hero__title em { display: block; }
.hero__lead { font-size: clamp(17px, 1.6vw, 20px); max-width: 560px; color: var(--text-2); margin-bottom: 32px; }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 44px; }
.hero__proof { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; border-top: 1px solid var(--line); }
.hero__proof li { display: flex; flex-direction: column; padding: 18px 28px 0 0; margin-right: 28px; border-right: 1px solid var(--line-soft); position: relative; }
.hero__proof li::before { content: ""; position: absolute; top: -1px; left: 0; width: 22px; height: 2px; background: var(--accent); }
.hero__proof li:last-child { border-right: 0; margin-right: 0; padding-right: 0; }
.hero__proof strong { color: var(--text); font-size: 22px; font-variation-settings: "wdth" 80; line-height: 1.2; }
.hero__proof span { font-size: 14px; color: var(--text-3); }

/* ---------- panel del sistema (hero) ---------- */
.system {
  position: relative;
  background: linear-gradient(180deg, rgba(24,25,29,.92), rgba(13,14,16,.96));
  border: 1px solid var(--line); border-radius: 18px; padding: 20px;
  box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), 0 0 0 6px rgba(255,255,255,.015), inset 0 1px 0 rgba(255,255,255,.05);
}
.system::before, .system::after {
  content: ""; position: absolute; width: 18px; height: 18px; border: solid var(--accent); pointer-events: none;
}
.system::before { top: -7px; left: -7px; border-width: 2px 0 0 2px; }
.system::after { bottom: -7px; right: -7px; border-width: 0 2px 2px 0; }
.system__head { display: flex; justify-content: space-between; align-items: center; color: var(--text-3); margin-bottom: 14px; }
.system__live { display: inline-flex; align-items: center; gap: 6px; font: 600 12px var(--mono); color: var(--ok); }
.system__live i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 10px var(--ok); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: .35 } }

/* medidor de señal: 12 barras, sólo transform */
.system__scope {
  display: flex; align-items: flex-end; gap: 4px; height: 30px; padding: 0 2px 8px; margin-bottom: 12px;
  border-bottom: 1px dashed var(--line);
}
.system__scope span {
  flex: 1; height: 100%; border-radius: 2px 2px 0 0; background: var(--line);
  transform-origin: bottom; transform: scaleY(.25);
  animation: bar 2.4s var(--ease) infinite;
}
.system__scope span:nth-child(3n)   { animation-duration: 1.9s; }
.system__scope span:nth-child(3n+1) { animation-duration: 2.7s; }
.system__scope span:nth-child(2)  { animation-delay: -.3s }  .system__scope span:nth-child(3)  { animation-delay: -1.1s }
.system__scope span:nth-child(4)  { animation-delay: -.7s }  .system__scope span:nth-child(5)  { animation-delay: -1.6s }
.system__scope span:nth-child(6)  { animation-delay: -.2s }  .system__scope span:nth-child(7)  { animation-delay: -1.3s }
.system__scope span:nth-child(8)  { animation-delay: -.9s }  .system__scope span:nth-child(9)  { animation-delay: -2s }
.system__scope span:nth-child(10) { animation-delay: -.5s }  .system__scope span:nth-child(11) { animation-delay: -1.8s }
.system__scope span:nth-child(12) { animation-delay: -1.2s }
.system__scope span:nth-last-child(-n+4) { background: var(--accent-line); }
@keyframes bar { 0%,100% { transform: scaleY(.25) } 50% { transform: scaleY(.95) } }

.system__flow { display: grid; gap: 10px; }
.system__flow li {
  position: relative; display: flex; gap: 14px; align-items: center;
  padding: 12px 14px; border-radius: 11px; background: var(--surface-2); border: 1px solid var(--line-soft);
}
/* conector entre pasos */
.system__flow li:not(:last-child)::after {
  content: ""; position: absolute; left: 31px; bottom: -11px; width: 2px; height: 10px; background: var(--line);
}
/* barrido de la señal: una capa por fila, sólo opacity */
.system__flow li::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  border: 1px solid var(--accent); box-shadow: 0 0 24px -6px rgba(255,45,85,.6), inset 0 0 18px -10px rgba(255,45,85,.8);
  opacity: 0; animation: scan 6s linear infinite;
}
.system__flow li:nth-child(2)::before { animation-delay: .9s; }
.system__flow li:nth-child(3)::before { animation-delay: 1.8s; }
.system__flow li:nth-child(4)::before { animation-delay: 2.7s; animation-name: scan-key; }
.system__flow li:nth-child(5)::before { animation-delay: 3.9s; }
@keyframes scan { 0% { opacity: 0 } 3% { opacity: 1 } 15% { opacity: 0 } 100% { opacity: 0 } }
@keyframes scan-key { 0% { opacity: 0 } 3% { opacity: 1 } 22% { opacity: 1 } 34% { opacity: 0 } 100% { opacity: 0 } }

.system__flow b { color: var(--text); display: block; font-size: 15px; }
.system__flow small { color: var(--text-3); font-size: 13px; }
.step { font-family: var(--mono); font-size: 12px; color: var(--text-3); width: 34px; height: 34px; flex: none; display: grid; place-items: center; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); }
.system__flow li.is-key { border-color: var(--accent-line); background: linear-gradient(90deg, rgba(255,45,85,.14), var(--surface-2)); }
.system__flow li.is-key .step { background: var(--grad); color: #fff; border: 0; }
.system__note { margin: 16px 2px 0; font-size: 14px; color: var(--text-2); padding-top: 14px; border-top: 1px dashed var(--line); }
.system.is-paused *, .system.is-paused *::before { animation-play-state: paused !important; }

/* ---------- secciones ---------- */
.section { padding: 112px 0; position: relative; }
.section--tight { padding: 56px 0; }
.section--alt { background: rgba(13, 14, 16, .85); border-block: 1px solid var(--line-soft); }
.section__head { max-width: 780px; margin-bottom: 56px; }
.section__head h2 { font-size: clamp(32px, 4.4vw, 54px); text-wrap: balance; }
.section__sub { margin-top: 18px; font-size: 18px; max-width: 640px; }
/* etiqueta de sección numerada (los números son decorativos, vía CSS) */
.kicker {
  display: flex; align-items: center; gap: 12px;
  font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 18px;
}
.kicker:not(.kicker--center) { counter-increment: sec; }
.kicker:not(.kicker--center)::before {
  content: counter(sec, decimal-leading-zero); color: var(--text-3);
  padding: 3px 7px; border: 1px solid var(--line); border-radius: 5px; letter-spacing: .04em;
}
.kicker:not(.kicker--center)::after { content: ""; height: 1px; width: 48px; background: linear-gradient(90deg, var(--accent-line), transparent); }
.kicker--center { justify-content: center; }

.grid { display: grid; gap: 18px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }

/* problema: celdas de alerta compartiendo línea */
#problema .grid--4 { gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; counter-reset: pain; }
.pain { padding: 30px 26px 28px; background: var(--bg); position: relative; counter-increment: pain; }
.pain::before {
  content: "0" counter(pain); display: block; font: 500 12px var(--mono); color: var(--accent-2); margin-bottom: 22px;
  padding-left: 16px; position: relative;
}
.pain::after { content: ""; position: absolute; left: 26px; top: 36px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.pain h3 { font-size: 19px; margin-bottom: 10px; font-variation-settings: "wdth" 88; }
.pain p { margin: 0; font-size: 16px; }

/* servicios: panel de módulos */
#servicios .grid--3 { gap: 1px; background: var(--line-soft); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.card {
  position: relative; padding: 32px 30px; background: var(--surface);
  transition: background-color .25s; display: flex; flex-direction: column;
}
.card:hover { background: var(--surface-2); }
.card h3 { font-size: 21px; margin: 20px 0 10px; font-variation-settings: "wdth" 88; }
.card p { font-size: 16px; flex: 1; }
.card__icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--bg-2); }
.card__icon svg { width: 22px; height: 22px; fill: none; stroke: var(--accent-2); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.card--featured { background: linear-gradient(160deg, rgba(255,45,85,.14), var(--surface) 55%); box-shadow: inset 0 0 0 1px var(--accent-line); }
.card--featured:hover { background: linear-gradient(160deg, rgba(255,45,85,.18), var(--surface-2) 55%); }
.card--featured .card__icon { background: var(--grad); border: 0; }
.card--featured .card__icon svg { stroke: #fff; }
.badge { position: absolute; top: 24px; right: 24px; font: 600 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--grad); padding: 6px 9px; border-radius: 6px; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font: 500 12px/1.4 var(--mono); padding: 5px 9px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line-soft); color: var(--text-2); }

/* ---------- casos: formato expediente ---------- */
.cases { display: grid; gap: 20px; counter-reset: case; }
.case {
  position: relative; padding: 40px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-soft);
  counter-increment: case;
}
.case:not(.case--sm) { display: grid; grid-template-columns: 132px 1fr; column-gap: 40px; }
.case:not(.case--sm) > * { grid-column: 2; }
.case:not(.case--sm)::before {
  content: counter(case, decimal-leading-zero);
  grid-column: 1; grid-row: 1 / span 4; /* 4 = meta, título, columnas y la métrica opcional */
  font-size: 96px; font-weight: 900; line-height: .8; font-variation-settings: "wdth" 62;
  color: transparent; -webkit-text-stroke: 1px var(--accent-line);
  border-right: 1px dashed var(--line); padding-top: 4px;
}
.case:hover { border-color: var(--line); }
.case__meta { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.case__meta span { font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--text-2); border: 1px solid var(--line); padding: 5px 9px; border-radius: 6px; }
.case__meta span:first-child { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-soft); }
.case h3 { font-size: clamp(22px, 2.4vw, 30px); font-variation-settings: "wdth" 80; margin-bottom: 28px; max-width: 760px; text-wrap: balance; }
.case__cols { display: grid; grid-template-columns: .9fr 1.1fr; gap: 0; border-top: 1px solid var(--line-soft); }
.case__cols > div { padding-top: 22px; }
.case__cols > div:first-child { padding-right: 32px; border-right: 1px solid var(--line-soft); }
.case__cols > div:last-child { padding-left: 32px; }
.case__cols p { margin: 0; }
.case h4 { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 12px; }
.case__cols > div:last-child h4 { color: var(--accent-2); }
/* espacio listo para métricas reales (ver comentario en index.html) */
.case__result { margin-top: 24px; padding: 18px 20px; border-radius: 12px; border: 1px solid var(--accent-line); background: var(--accent-soft); color: var(--text); }
.case__result strong { font-size: 34px; font-variation-settings: "wdth" 70; color: var(--text); margin-right: 10px; }
.checks li { position: relative; padding-left: 28px; margin-bottom: 9px; font-size: 16px; }
.checks li::before {
  content: ""; position: absolute; left: 2px; top: 7px; width: 13px; height: 7px;
  border-left: 2px solid var(--accent-2); border-bottom: 2px solid var(--accent-2); transform: rotate(-45deg);
}
.cases__row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case--sm { padding: 28px; display: flex; flex-direction: column; }
.case--sm::before { content: counter(case, decimal-leading-zero); font: 500 12px var(--mono); color: var(--text-3); margin-bottom: 14px; }
.case--sm h3 { font-size: 20px; margin-bottom: 12px; font-variation-settings: "wdth" 86; }
.case--sm p { margin: 0; font-size: 16px; }
.case--sm .case__result { margin-top: auto; padding: 12px 14px; font-size: 14px; }
.case--sm p + .case__result { margin-top: 18px; }
.case--sm .case__result strong { font-size: 26px; }

/* ---------- método ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { padding: 30px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); position: relative; }
.steps li:not(:last-child)::after {
  /* flecha entre pasos */
  content: ""; position: absolute; right: -14px; top: 50%; width: 10px; height: 10px; z-index: 1;
  border-top: 2px solid var(--accent-line); border-right: 2px solid var(--accent-line); transform: translateY(-50%) rotate(45deg);
}
.steps__n { display: block; font-size: 64px; font-weight: 900; font-variation-settings: "wdth" 62; line-height: .9; color: transparent; -webkit-text-stroke: 1px var(--text-3); margin-bottom: 18px; }
.steps li:first-child { border-color: var(--accent-line); background: linear-gradient(160deg, rgba(255,45,85,.10), var(--surface) 50%); }
.steps li:first-child .steps__n { -webkit-text-stroke-color: var(--accent); }
.steps h3 { font-size: 22px; margin: 0 0 12px; }
.steps p { margin: 0; font-size: 16px; }

/* ---------- sobre mí ---------- */
.about { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; margin-bottom: 64px; }
.about__photo {
  position: sticky; top: 100px; aspect-ratio: 1; border-radius: 18px; overflow: hidden;
  background: linear-gradient(140deg, #2a0f17, var(--surface) 60%); border: 1px solid var(--line);
}
.about__photo::after {
  /* marco de visor sobre la foto */
  content: ""; position: absolute; inset: 14px; z-index: 2; pointer-events: none; border-radius: 8px;
  background:
    linear-gradient(var(--accent), var(--accent)) top left / 18px 2px,
    linear-gradient(var(--accent), var(--accent)) top left / 2px 18px,
    linear-gradient(var(--accent), var(--accent)) bottom right / 18px 2px,
    linear-gradient(var(--accent), var(--accent)) bottom right / 2px 18px;
  background-repeat: no-repeat;
}
.about__photo img { width: 100%; height: 100%; object-fit: cover; position: relative; z-index: 1; }
.about__initials {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: clamp(80px, 12vw, 150px); font-weight: 900; font-variation-settings: "wdth" 70;
  background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; opacity: .85;
}
.about__copy h2 { font-size: clamp(30px, 4vw, 48px); margin-bottom: 22px; text-wrap: balance; }
.timeline { margin-top: 40px; border-left: 1px solid var(--line); padding-left: 26px; display: grid; gap: 26px; }
.timeline li { position: relative; }
.timeline li::before { content: ""; position: absolute; left: -32px; top: 6px; width: 11px; height: 11px; border-radius: 3px; background: var(--bg); border: 2px solid var(--accent); }
.timeline li:first-child::before { background: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.timeline h3 { font-size: 19px; }
.timeline__where { color: var(--accent-2); font: 500 13px/1.4 var(--mono); margin: 5px 0 6px; }
.timeline p:last-child { margin: 0; font-size: 16px; }

.stack { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border-radius: 16px; border: 1px solid var(--line-soft); background: var(--line-soft); overflow: hidden; }
.stack__group { padding: 24px; background: var(--surface); }
.stack h3 { font: 500 11px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--text-3); margin-bottom: 14px; }

/* ---------- marcas ---------- */
.brands { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line-soft); border: 1px solid var(--line-soft); border-radius: var(--radius); overflow: hidden; }
.brands li { text-align: center; padding: 22px 14px; background: var(--bg-2); }
.brands b { display: block; color: var(--text); font-size: 20px; font-variation-settings: "wdth" 78; }
.brands span { font-size: 14px; color: var(--text-3); }

/* ---------- consultoría ---------- */
.section--offer {
  background:
    radial-gradient(700px 420px at 85% 30%, rgba(255,45,85,.13), transparent 70%),
    radial-gradient(500px 300px at 0% 100%, rgba(255,45,85,.06), transparent 70%);
}
.offers { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; align-items: stretch; max-width: 1000px; }
.offer { position: relative; padding: 34px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line-soft); display: flex; flex-direction: column; }
.offer--featured {
  padding: 40px;
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, #1c1216, var(--surface) 55%) padding-box,
    linear-gradient(160deg, var(--accent), rgba(255,45,85,.15) 45%, var(--line) 100%) border-box;
  box-shadow: 0 40px 90px -45px rgba(255,45,85,.55);
}
.offer__label { font: 500 12px/1.4 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent-2); margin-bottom: 14px; }
.offer__price { font-size: 52px; font-weight: 900; color: var(--text); font-variation-settings: "wdth" 66; line-height: 1; margin-bottom: 12px; letter-spacing: -.01em; }
.offer--featured .offer__price { font-size: clamp(56px, 7vw, 76px); }
.offer__price small { font: 500 14px var(--mono); color: var(--text-3); letter-spacing: .06em; }
.offer__time { font: 500 13px/1.5 var(--mono); color: var(--text-3); margin-bottom: 24px; padding-bottom: 24px; border-bottom: 1px dashed var(--line); }
.offer .checks { flex: 1; margin-bottom: 28px; }
/* pago → agenda como flujo de dos pasos conectados */
.offer__steps { display: grid; gap: 22px; position: relative; }
.offer__steps::before {
  content: ""; position: absolute; left: 50%; top: calc(50% - 10px); width: 2px; height: 20px; transform: translateX(-50%);
  background: repeating-linear-gradient(var(--accent-line) 0 4px, transparent 4px 7px);
}
.offer__note { margin: 18px 0 0; font-size: 14px; color: var(--text-3); text-align: center; }
.offer__note a { color: var(--accent-2); text-decoration: underline; text-underline-offset: 3px; }
.offer--featured .badge { top: 28px; right: 28px; }

/* ---------- faq ---------- */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; }
.faq .section__head { position: sticky; top: 110px; align-self: start; }
.faq__list { border-top: 1px solid var(--line); counter-reset: q; }
.faq__list details { border-bottom: 1px solid var(--line); counter-increment: q; }
.faq__list summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 44px; position: relative;
  color: var(--text); font-weight: 700; font-size: 18px; transition: color .2s;
}
.faq__list summary:hover { color: #fff; }
.faq__list summary::before { content: counter(q, decimal-leading-zero); position: absolute; left: 0; top: 26px; font: 500 12px var(--mono); color: var(--text-3); }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 6px;
  font: 400 18px/1 var(--mono); color: var(--accent-2); transition: transform .25s var(--ease), border-color .2s;
}
.faq__list details[open] summary::after { transform: translateY(-50%) rotate(45deg); border-color: var(--accent-line); }
.faq__list details p { padding: 0 0 24px 44px; margin: 0; font-size: 16px; max-width: 640px; }

/* ---------- contacto ---------- */
.section--cta { background: radial-gradient(900px 500px at 15% 0%, rgba(255,45,85,.15), transparent 70%), var(--bg-2); border-top: 1px solid var(--line-soft); }
.contact { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: start; }
.contact__copy h2 { font-size: clamp(36px, 5vw, 64px); margin-bottom: 18px; }
.contact__copy > p { font-size: 18px; margin-bottom: 30px; }
.contact__links { display: grid; gap: 10px; }
.contact__links a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-soft); background: var(--surface); transition: border-color .2s, transform .2s var(--ease); }
.contact__links a:hover { border-color: var(--accent); transform: translateX(4px); }
.contact__links b { display: block; color: var(--text); font-size: 15px; }
.contact__links span:last-child { font-size: 15px; color: var(--text-2); line-height: 1.35; }
.ci { width: 40px; height: 40px; flex: none; border-radius: 9px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font: 700 13px var(--mono); }
.ci--wa { background: rgba(37, 211, 102, .12); color: #25d366; }

.form { position: relative; padding: 32px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 16px; box-shadow: 0 40px 90px -50px rgba(0,0,0,.9); }
.form::before, .form::after { content: ""; position: absolute; width: 16px; height: 16px; border: solid var(--accent); pointer-events: none; }
.form::before { top: -6px; left: -6px; border-width: 2px 0 0 2px; }
.form::after { bottom: -6px; right: -6px; border-width: 0 2px 2px 0; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form label { display: grid; gap: 7px; font-size: 14px; font-weight: 600; color: var(--text); }
.form input, .form select, .form textarea {
  width: 100%; font: inherit; font-size: 16px; font-weight: 400; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 13px 14px;
  transition: border-color .2s, box-shadow .2s;
}
.form select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.form textarea { resize: vertical; min-height: 110px; }
.form input::placeholder, .form textarea::placeholder { color: #6b6b75; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.form .is-invalid { border-color: #ff6b6b; }
.form__note { margin: 0; font-size: 13px; color: var(--text-3); text-align: center; }
.form__note.is-error { color: #ff8a8a; }

/* ---------- footer ---------- */
.footer { padding: 34px 0; border-top: 1px solid var(--line-soft); font-size: 14px; background: var(--bg); }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }
.footer p { margin: 0; }
.footer b { color: var(--text); }

.wa-float {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; background: #25d366; color: #fff;
  box-shadow: 0 12px 30px -8px rgba(37, 211, 102, .6); transition: transform .25s var(--ease), opacity .25s;
}
.wa-float:hover { transform: scale(1.07); }
.wa-float svg { width: 30px; height: 30px; }
/* se oculta cuando el formulario de contacto está en pantalla, para no taparlo */
.wa-float.is-hidden { opacity: 0; transform: scale(.6); pointer-events: none; visibility: hidden; transition: transform .25s var(--ease), opacity .25s, visibility 0s .25s; }

/* ---------- barra de acción fija (mobile) ---------- */
.mbar { display: none; }
@media (max-width: 860px) {
  .mbar {
    display: flex; gap: 10px; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
    background: rgba(9, 9, 11, .88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
    transform: translateY(110%); visibility: hidden;
    transition: transform .3s var(--ease), visibility 0s .3s;
  }
  .mbar.is-visible, .no-js .mbar { transform: none; visibility: visible; transition: transform .3s var(--ease), visibility 0s; }
  .mbar__main { flex: 1; padding: 14px 16px; font-size: 15px; }
  .mbar__wa {
    flex: none; width: 52px; display: grid; place-items: center; border-radius: 10px;
    background: rgba(37, 211, 102, .12); border: 1px solid rgba(37, 211, 102, .4); color: #25d366;
  }
  .mbar__wa svg { width: 26px; height: 26px; }
  /* la barra reemplaza al botón flotante en mobile */
  .wa-float { display: none; }
  /* espacio para que la barra no tape el pie */
  .footer { padding-bottom: calc(34px + 76px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  .mbar, .mbar.is-visible { transition: none; }
}

/* ---------- animación de entrada (sólo si hay JS) ---------- */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
/* carga del hero: una sola secuencia escalonada */
.hero__copy > *, .system { animation: rise .8s var(--ease) both; }
.hero__copy > :nth-child(2) { animation-delay: .08s; }
.hero__copy > :nth-child(3) { animation-delay: .16s; }
.hero__copy > :nth-child(4) { animation-delay: .24s; }
.hero__copy > :nth-child(5) { animation-delay: .32s; }
.system { animation-delay: .28s; }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .hero__copy > *, .system { animation: none; }
  .system__live i, .system__scope span, .system__flow li::before { animation: none; }
  .system__scope span { transform: scaleY(.6); }
  .contact__links a:hover { transform: none; }
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3, .steps, .cases__row { grid-template-columns: repeat(2, 1fr); }
  .steps li::after { display: none; }
  .stack, .brands { grid-template-columns: repeat(2, 1fr); }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; }
  .system { max-width: 560px; }
  .case:not(.case--sm) { grid-template-columns: 92px 1fr; column-gap: 28px; }
  .case:not(.case--sm)::before { font-size: 72px; }
}
@media (max-width: 860px) {
  .nav__toggle { display: block; }
  .nav__links {
    position: fixed; top: 70px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 20px 20px;
    transform: translateY(-120%); transition: transform .3s ease; visibility: hidden;
  }
  .nav__links.is-open { transform: none; visibility: visible; }
  .nav__links a:not(.btn) { padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 17px; }
  .nav__links .btn { margin-top: 16px; }
  .about, .faq, .contact, .offers { grid-template-columns: 1fr; gap: 32px; }
  .faq .section__head { position: static; }
  .about__photo { position: relative; top: 0; max-width: 340px; }
  .case__cols { grid-template-columns: 1fr; }
  .case__cols > div:first-child { padding-right: 0; border-right: 0; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); }
  .case__cols > div:last-child { padding-left: 0; }
}
@media (max-width: 620px) {
  body { font-size: 16px; background-size: 48px 48px; }
  .section { padding: 80px 0; }
  .section__head { margin-bottom: 40px; }
  .hero { padding: 48px 0 64px; }
  .hero__title { font-size: clamp(34px, 10vw, 44px); margin-bottom: 18px; }
  .hero__lead { margin-bottom: 26px; }
  .hero__ctas { margin-bottom: 32px; }
  .grid--4, .grid--3, .steps, .stack, .brands, .form__row { grid-template-columns: 1fr; }
  .hero__ctas .btn { width: 100%; }
  .hero__proof { grid-template-columns: repeat(3, 1fr); }
  .hero__proof li { padding-right: 10px; margin-right: 10px; }
  .hero__proof strong { font-size: 17px; }
  .hero__proof span { font-size: 12px; line-height: 1.35; }
  .system { padding: 16px; }
  .system__flow li { padding: 10px 12px; }
  .system__flow li:not(:last-child)::after { left: 28px; }
  .case, .offer, .offer--featured { padding: 26px 22px; }
  .case:not(.case--sm) { display: block; }
  .case:not(.case--sm)::before { display: block; font-size: 52px; border: 0; margin-bottom: 14px; padding: 0; }
  /* casos chicos: carrusel horizontal con snap */
  .cases__row {
    display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: 12px;
    margin: 0 -20px; padding: 0 20px 8px; scrollbar-width: none;
  }
  .cases__row::-webkit-scrollbar { display: none; }
  .cases__row .case { flex: 0 0 84%; scroll-snap-align: center; }
  .offer .badge { position: static; align-self: flex-start; margin-bottom: 16px; }
  .faq__list summary { padding-left: 36px; font-size: 17px; }
  .faq__list details p { padding-left: 36px; }
  .form { padding: 22px; }
  .brand__text small { display: none; }
  .wa-float { right: 14px; bottom: 14px; width: 52px; height: 52px; }
}
