/* AU3 — sitio público v2. Tokens del Design System v1 + tono magenta de fondo. */
:root {
  /* Tono de fondo (lo único que cambia entre opciones) */
  --bg-base: #141019;
  --bg-surface: #1B1622;
  --bg-elevated: #241D2C;
  --glow: rgba(233, 30, 140, 0.26);
  --glow-soft: rgba(233, 30, 140, 0.10);

  --border-subtle: #241D2C;
  --border-elevated: #2F2738;
  --text-primary: #F5F5F7;
  --text-secondary: #9A95A3;
  --text-tertiary: #B4AFBC;
  --text-muted: #625C6B;
  --text-on-accent: #FFFFFF;
  --magenta: #E91E8C;
  --magenta-hover: #D11A7E;
  --cyan: #00BFDE;
  --green: #22C55E;
  --radius-md: 8px;
  --radius-xl: 12px;
  --radius-2xl: 16px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  background-color: var(--bg-base);
  background-image:
    radial-gradient(1100px 760px at 72% -120px, var(--glow), transparent 70%),
    radial-gradient(900px 700px at 0% 55%, var(--glow-soft), transparent 70%),
    radial-gradient(900px 700px at 100% 95%, var(--glow-soft), transparent 70%);
  background-repeat: no-repeat;
  color: var(--text-primary);
  font-family: var(--sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  font-size: 17px;
  line-height: 1.6;
  overflow-x: clip;
}
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg-base) 78%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border-subtle); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; }
.brand .word { font-weight: 700; font-size: 21px; letter-spacing: -0.02em; }
.brand .word span { color: var(--magenta); font-weight: 600; }
.nav { display: flex; align-items: center; gap: 24px; }
.nav a { text-decoration: none; color: var(--text-secondary); font-size: 15px; }
.nav a:hover { color: var(--text-primary); }
.nav .btn { color: var(--text-on-accent); }

.btn {
  display: inline-block;
  background: var(--magenta);
  color: var(--text-on-accent);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  padding: 11px 20px;
  border-radius: var(--radius-md);
  transition: background .15s;
}
.btn:hover { background: var(--magenta-hover); }
.btn.big { font-size: 17px; padding: 15px 28px; }
.btn.ghost { background: transparent; border: 1px solid var(--border-elevated); color: var(--text-primary); }
.btn.ghost:hover { border-color: var(--text-muted); }

/* ---------- Hero ---------- */
.hero { padding: 96px 0 120px; overflow-x: clip; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; }
.hero h1 { font-weight: 700; font-size: clamp(42px, 6vw, 76px); line-height: 1.03; letter-spacing: -0.045em; max-width: 12ch; text-wrap: balance; }
.hero .lede { margin-top: 26px; font-size: clamp(19px, 1.9vw, 23px); line-height: 1.5; color: var(--text-tertiary); max-width: 46ch; }
.hero .actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

.signal { position: relative; aspect-ratio: 1; max-width: 460px; width: 100%; justify-self: center; }
.signal svg { width: 100%; height: 100%; overflow: visible; }
.signal .wave { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: draw 1.6s cubic-bezier(.6,.1,.2,1) .3s forwards, pulse 3.2s ease-in-out 2s infinite; }
.signal .rail { stroke-dasharray: 120; stroke-dashoffset: 120; animation: rail .7s ease-out forwards; }
.signal .rail.out { animation-delay: 1.7s; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes rail { to { stroke-dashoffset: 0; } }
@keyframes pulse { 0%,100% { filter: drop-shadow(0 0 0 rgba(233,30,140,0)); } 50% { filter: drop-shadow(0 0 24px rgba(233,30,140,.6)); } }

.chip {
  position: absolute; font-size: 13px; line-height: 1.35; padding: 9px 12px;
  border-radius: var(--radius-md); background: var(--bg-surface); border: 1px solid var(--border-elevated);
  max-width: 220px; opacity: 0; transform: translateY(6px); animation: chip .5s ease-out forwards;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.chip b { display: block; font-weight: 600; font-size: 11px; margin-bottom: 2px; }
.chip.voice { left: -8%; top: 4%; animation-delay: 1.9s; }
.chip.voice b { color: var(--cyan); }
.chip.insight { right: -12%; top: 50%; animation-delay: 2.4s; border-color: rgba(233,30,140,.5); }
.chip.insight b { color: var(--magenta); }
.chip.action { left: 2%; bottom: 0; animation-delay: 2.9s; border-color: rgba(34,197,94,.45); }
.chip.action b { color: var(--green); }
@keyframes chip { to { opacity: 1; transform: none; } }

/* ---------- Sections ---------- */
section.block, .cta-block { scroll-margin-top: 68px; }
section.block { padding: 120px 0; border-top: 1px solid var(--border-subtle); }
section.block.pilot { border-top: 1px solid var(--border-subtle); }
.kicker { color: var(--magenta); font-weight: 700; font-size: clamp(20px, 2.2vw, 26px); letter-spacing: -0.02em; margin-bottom: 18px; display: flex; align-items: baseline; gap: 14px; }
.kicker .n { font-family: var(--mono); font-size: 0.7em; font-weight: 500; color: var(--text-muted); }
h2 { font-weight: 700; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.07; letter-spacing: -0.035em; max-width: 22ch; }
.sub { margin-top: 20px; color: var(--text-tertiary); font-size: 19px; max-width: 60ch; }
.sub + .sub { margin-top: 14px; }
.punch { margin-top: 32px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; letter-spacing: -0.02em; max-width: 34ch; }

/* Problem */
.problem-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.known { margin-top: 8px; display: grid; gap: 12px; }
.known div { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-radius: var(--radius-xl); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.known span { color: var(--text-secondary); font-size: 15px; }
.known strong { font-family: var(--mono); font-weight: 600; color: var(--text-primary); }
.known div.unknown { border-style: dashed; border-color: rgba(233,30,140,.5); background: transparent; }
.known div.unknown span { color: var(--text-primary); }
.known div.unknown strong { color: var(--magenta); }

/* Steps */
.steps { list-style: none; margin-top: 56px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.steps li { padding: 30px; border-radius: var(--radius-xl); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.steps .n { font-family: var(--mono); font-size: 14px; color: var(--magenta); display: block; margin-bottom: 18px; }
.steps h3 { font-size: 24px; letter-spacing: -0.02em; }
.steps p { margin-top: 10px; color: var(--text-secondary); font-size: 16px; }

/* For whom */
.forwho { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 56px; align-items: end; }
.forwho .sub { font-size: 20px; }

/* Impact */
.levers { margin-top: 56px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.lever { padding: 30px; border-radius: var(--radius-xl); background: var(--bg-surface); border: 1px solid var(--border-subtle); }
.lever h3 { font-size: 22px; letter-spacing: -0.02em; }
.lever p { margin-top: 8px; color: var(--text-secondary); font-size: 16px; max-width: 46ch; }

/* Pilot */
.pilot { background: color-mix(in srgb, var(--bg-surface) 70%, transparent); border-top: 1px solid var(--border-subtle); border-bottom: 1px solid var(--border-subtle); }
.areas { list-style: none; margin-top: 56px; border-top: 1px solid var(--border-elevated); }
.areas li { display: grid; grid-template-columns: 80px 1fr 1.4fr; gap: 24px; padding: 28px 0; border-bottom: 1px solid var(--border-elevated); align-items: baseline; }
.areas .n { font-family: var(--mono); color: var(--magenta); font-size: 15px; }
.areas h3 { font-size: 22px; letter-spacing: -0.02em; }
.areas p { color: var(--text-secondary); font-size: 16px; }

/* CTA */
.cta-block { padding: 120px 0; border-top: 1px solid var(--border-subtle); }
.cta-block h2 { max-width: 20ch; }
.cta-block .actions { margin-top: 36px; display: flex; gap: 12px; flex-wrap: wrap; }

/* Footer */
.site-footer { border-top: 1px solid var(--border-subtle); padding: 32px 0 44px; font-size: 14px; color: var(--text-muted); }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.site-footer nav a { color: var(--text-secondary); text-decoration: none; margin-left: 22px; }
.site-footer nav a:first-child { margin-left: 0; }
.site-footer nav a:hover { color: var(--text-primary); }

/* ---------- Legal / support ---------- */
.doc { padding: 72px 0 110px; }
.doc .wrap { max-width: 760px; }
.doc h1 { font-size: clamp(34px, 5vw, 50px); letter-spacing: -0.035em; line-height: 1.08; }
.doc .updated { color: var(--text-muted); margin-top: 10px; font-size: 15px; }
.doc h2 { font-size: 21px; letter-spacing: -0.01em; margin: 44px 0 10px; max-width: none; line-height: 1.3; }
.doc p, .doc li { color: var(--text-tertiary); }
.doc p + p { margin-top: 12px; }
.doc ul { margin: 10px 0 0 22px; }
.doc li { margin-bottom: 6px; }
.doc strong { color: var(--text-primary); font-weight: 600; }
.doc a { color: var(--cyan); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero { padding: 56px 0 80px; }
  .hero .wrap, .problem-grid, .forwho { grid-template-columns: 1fr; gap: 40px; }
  .signal { max-width: 340px; }
  .chip.voice { left: 0; } .chip.insight { right: 0; } .chip.action { left: 0; }
  .steps, .levers { grid-template-columns: 1fr; }
  .areas li { grid-template-columns: 48px 1fr; }
  .areas li p { grid-column: 2; }
  section.block, .cta-block { padding: 84px 0; }
}
@media (max-width: 560px) {
  .nav a:not(.btn) { display: none; }
  .chip { font-size: 12px; max-width: 175px; }
}
@media (prefers-reduced-motion: reduce) {
  .signal .wave, .signal .rail { animation: none; stroke-dashoffset: 0; }
  .chip { animation: none; opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}

/* Active nav (scroll spy) */
.nav a:not(.btn) { position: relative; padding: 4px 0; transition: color .15s; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; border-radius: 2px; background: var(--magenta); transform: scaleX(0); transition: transform .2s; }
.nav a.active { color: var(--text-primary); }
.nav a.active::after { transform: scaleX(1); }
.nav .btn.active { box-shadow: 0 0 0 3px rgba(233,30,140,.35); }

/* Pilot inside impact */
.pilot-box { margin-top: 72px; padding: 44px; border-radius: var(--radius-2xl); background: var(--bg-surface); border: 1px solid var(--border-elevated); }
.pilot-tag { display: inline-block; font-size: 14px; font-weight: 600; color: var(--magenta); background: rgba(233,30,140,.12); border: 1px solid rgba(233,30,140,.35); padding: 5px 12px; border-radius: 999px; }
.pilot-h { margin-top: 18px; font-size: clamp(26px, 3vw, 36px); line-height: 1.12; letter-spacing: -0.03em; max-width: 24ch; }
.pilot-box .areas { margin-top: 36px; }
.pilot-box .punch { margin-top: 28px; }

/* "Qué pasa durante la venta" más visible */
.known div.unknown { background: rgba(233,30,140,.14); border: 1px solid rgba(233,30,140,.6); border-style: solid; box-shadow: 0 0 32px rgba(233,30,140,.18); }
.known div.unknown span { color: #FFFFFF; font-weight: 600; font-size: 16px; }
.known div.unknown strong { color: #FFFFFF; background: var(--magenta); width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 14px; }
@media (max-width: 900px) { .pilot-box { padding: 26px; margin-top: 56px; } }

/* v2.1: Para quién apilado */
.forwho { display: block; }
.forwho > div { margin-top: 4px; }

/* v2.1: Impacto como punteo */
.levers { display: block; margin-top: 48px; max-width: 820px; border-top: 1px solid var(--border-elevated); }
.lever { background: none; border: 0; border-radius: 0; border-bottom: 1px solid var(--border-elevated); padding: 26px 0 26px 34px; position: relative; }
.lever::before { content: ""; position: absolute; left: 4px; top: 36px; width: 10px; height: 10px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 12px rgba(233,30,140,.6); }
.lever h3 { font-size: 22px; }
.lever p { margin-top: 6px; font-size: 17px; max-width: 60ch; }

/* v2.2: frase del piloto en una línea (escritorio) */
.pilot-box .punch { max-width: none; font-size: clamp(22px, 2.2vw, 27px); }
@media (min-width: 1000px) { .pilot-box .punch { white-space: nowrap; } }

/* v2.3 */
.sub strong.hl { color: var(--text-primary); font-weight: 700; }
.inline-cta { margin-top: 32px; display: flex; }

/* Hero flow — shared */
.signal.flow { aspect-ratio: auto; max-width: 520px; }
.signal.flow .chip { position: relative; left: auto; right: auto; top: auto; bottom: auto; max-width: none; }
.chip .step { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700; margin-right: 8px; color: #fff; vertical-align: 1px; }
.chip.voice .step { background: var(--cyan); color: #0A0A0B; }
.chip.insight .step { background: var(--magenta); }
.chip.action .step { background: var(--green); color: #0A0A0B; }
.chip b { display: inline; }
.chip .t { display: block; margin-top: 6px; font-size: 14px; }

/* Option V: logo arriba, secuencia vertical */
.flow-v { display: grid; justify-items: center; gap: 8px; }
.flow-v svg { width: 230px; height: 230px; }
.flow-v .steps-v { list-style: none; display: grid; gap: 20px; width: 100%; max-width: 400px; position: relative; }
.flow-v .steps-v li { position: relative; }
.flow-v .steps-v li:not(:last-child)::after { content: ""; position: absolute; left: 50%; bottom: -21px; width: 2px; height: 20px; background: var(--border-elevated); transform: translateX(-50%); }
.flow-v .chip { padding: 12px 16px; }

/* Option H: entrada → AU3 → salida */
.flow-h { display: grid; grid-template-columns: 1fr 170px 1fr; align-items: center; gap: 10px; max-width: 600px; }
.flow-h svg { width: 170px; height: 170px; }
.flow-h .out { display: grid; gap: 14px; }
.flow-h .chip { padding: 12px 14px; font-size: 13px; }
.flow-h .chip .t { font-size: 13px; }
.flow-h .arrow-out { text-align: center; color: var(--text-muted); font-size: 18px; line-height: 1; margin: -6px 0; }
@media (max-width: 900px) {
  .flow-h { grid-template-columns: 1fr; justify-items: center; }
  .flow-h .chip { width: 100%; max-width: 360px; }
}

@media (max-width: 900px) {
  .flow-h { grid-template-columns: 1fr; justify-items: center; gap: 10px; }
  .flow-h .chip { width: 100%; max-width: 380px; }
  .flow-h .out { width: 100%; max-width: 380px; }
  .flow-h svg { width: 110px; height: 110px; }
}

/* v2.5: espacios más compactos */
.hero { padding: 72px 0 80px; }
section.block { padding: 76px 0; }
.cta-block { padding: 80px 0; }
.steps, .levers { margin-top: 40px; }
.pilot-box { margin-top: 48px; }
.punch { margin-top: 24px; max-width: 40ch; }
@media (max-width: 900px) {
  .hero { padding: 44px 0 56px; }
  section.block, .cta-block { padding: 56px 0; }
}

/* ============================================================
   v3 — Hero: animación "caja negra"
   Ciclo: la conversación (cyan) recorre la línea gris y entra a AU3 →
   la onda procesa → sale el diagnóstico (magenta) → AU3 detecta → Acción.
   ============================================================ */
.flow-h { --cyc: 8s; --start: 1s; }

/* Línea gris: arranca plana y llega hasta el logo (una vez, al cargar) */
.flow-h .rail { stroke-dasharray: 116; stroke-dashoffset: 116; animation: railDraw .8s ease-out .15s forwards; }
.flow-h .rail.out { animation-delay: .35s; }
@keyframes railDraw { to { stroke-dashoffset: 0; } }

/* Pulsos que viajan por la línea */
.flow-h .pkt { stroke-dasharray: 64 600; opacity: 0; }
.flow-h .pkt.in { filter: drop-shadow(0 0 14px rgba(0,191,222,.9)); }
.flow-h .pkt.out { filter: drop-shadow(0 0 14px rgba(233,30,140,.9)); }
.flow-h .pkt.in  { stroke-dashoffset: 52;  animation: pktIn  var(--cyc) cubic-bezier(.45,0,.55,1) var(--start) infinite both; }
.flow-h .pkt.out { stroke-dashoffset: -30; animation: pktOut var(--cyc) cubic-bezier(.45,0,.55,1) var(--start) infinite both; }
@keyframes pktIn {
  0%   { stroke-dashoffset: 52;   opacity: 0; }
  2%   { opacity: 1; }
  14%  { stroke-dashoffset: -190; opacity: 1; }
  15%, 100% { stroke-dashoffset: -190; opacity: 0; }
}
@keyframes pktOut {
  0%, 44% { stroke-dashoffset: 30;   opacity: 0; }
  45%     { opacity: 1; }
  56%     { stroke-dashoffset: -210; opacity: 1; }
  58%, 100% { stroke-dashoffset: -210; opacity: 0; }
}

/* La caja recibe la información */
.flow-h .box { animation: boxIn var(--cyc) ease-in-out var(--start) infinite both; }
@keyframes boxIn {
  0%, 12%, 30%, 100% { filter: drop-shadow(0 0 0 rgba(245,245,247,0)); }
  17% { filter: drop-shadow(0 0 18px rgba(245,245,247,.35)); }
}

/* La onda cobra vida mientras procesa */
.flow-h .wave {
  stroke-dasharray: none; stroke-dashoffset: 0;
  transform-box: fill-box; transform-origin: center;
  animation: waveLive var(--cyc) ease-in-out var(--start) infinite both;
}
@keyframes waveLive {
  0%, 14%  { transform: scaleY(1);    opacity: .82; filter: drop-shadow(0 0 0 rgba(233,30,140,0)); }
  19%      { transform: scaleY(1.16); opacity: 1;   filter: drop-shadow(0 0 22px rgba(233,30,140,.65)); }
  25%      { transform: scaleY(.84); }
  31%      { transform: scaleY(1.1); }
  37%      { transform: scaleY(.92); }
  43%      { transform: scaleY(1);    opacity: 1;   filter: drop-shadow(0 0 16px rgba(233,30,140,.5)); }
  60%, 100% { transform: scaleY(1);   opacity: .82; filter: drop-shadow(0 0 0 rgba(233,30,140,0)); }
}

/* Tarjetas: siempre legibles, se iluminan en su momento */
.flow-h .chip { opacity: .5; transform: none; transition: none; }
.flow-h .chip.voice   { animation: litVoice   var(--cyc) ease-in-out var(--start) infinite both; }
.flow-h .chip.insight { animation: litInsight var(--cyc) ease-in-out var(--start) infinite both; }
.flow-h .chip.action  { animation: litAction  var(--cyc) ease-in-out var(--start) infinite both; }
@keyframes litVoice {
  0%, 12% { opacity: 1;   border-color: rgba(0,191,222,.7); box-shadow: 0 0 0 1px rgba(0,191,222,.25), 0 10px 30px rgba(0,191,222,.18); }
  22%, 90% { opacity: .55; border-color: var(--border-elevated); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  100%    { opacity: 1;   border-color: rgba(0,191,222,.7); box-shadow: 0 0 0 1px rgba(0,191,222,.25), 0 10px 30px rgba(0,191,222,.18); }
}
@keyframes litInsight {
  0%, 52%  { opacity: .45; border-color: var(--border-elevated); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  58%, 88% { opacity: 1;   border-color: rgba(233,30,140,.8); box-shadow: 0 0 0 1px rgba(233,30,140,.3), 0 10px 34px rgba(233,30,140,.25); }
  96%, 100% { opacity: .45; border-color: var(--border-elevated); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
}
@keyframes litAction {
  0%, 66%  { opacity: .45; border-color: var(--border-elevated); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
  72%, 88% { opacity: 1;   border-color: rgba(34,197,94,.75); box-shadow: 0 0 0 1px rgba(34,197,94,.28), 0 10px 34px rgba(34,197,94,.2); }
  96%, 100% { opacity: .45; border-color: var(--border-elevated); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
}
.flow-h .arrow-out { animation: arrowLit var(--cyc) ease-in-out var(--start) infinite both; }
@keyframes arrowLit {
  0%, 62%, 96%, 100% { color: var(--text-muted); }
  68%, 88% { color: var(--green); }
}

@media (prefers-reduced-motion: reduce) {
  .signal.flow-h .rail, .signal.flow-h .rail.out { animation: none; stroke-dashoffset: 0; }
  .signal.flow-h .pkt.in, .signal.flow-h .pkt.out { animation: none; opacity: 0; }
  .signal.flow-h .box, .signal.flow-h .wave, .signal.flow-h .arrow-out { animation: none; filter: none; transform: none; opacity: 1; }
  .signal.flow-h .chip.voice, .signal.flow-h .chip.insight, .signal.flow-h .chip.action { animation: none; opacity: 1; }
}

/* v3.1: espacios intermedios */
.hero { padding: 84px 0 100px; }
section.block { padding: 98px 0; }
.cta-block { padding: 100px 0; }
.steps, .levers { margin-top: 48px; }
.pilot-box { margin-top: 60px; }
@media (max-width: 900px) {
  .hero { padding: 50px 0 68px; }
  section.block, .cta-block { padding: 70px 0; }
}
