/* Vesper: pregunta y respuesta en los flancos, cerebro en el centro. */
#ov-brain .tl-left { top: 128px; width: 65%; font-size: clamp(38px, 4.2vw, 72px); }
#ov-brain .tl-right { bottom: 45px; width: 55% !important; font-size: clamp(32px, 3.3vw, 56px) !important; }
#ov-brain .cta { bottom: 45px; }
.brain-demo { position: absolute; inset: 0; pointer-events: none; }
.brain-demo__content { position: absolute; top: 37%; left: 3vw; right: 3vw; }
.brain-exchange { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 36%; align-items: start; }
.brain-question,
.brain-answer { position: relative; padding: 26px; border-radius: 24px; }
.brain-answer { margin-top: 34px; }
.brain-question::after,
.brain-answer::before { content: ""; position: absolute; height: 1px; width: 6vw; top: 50%; background: linear-gradient(90deg, var(--cyan), transparent); opacity: .6; }
.brain-question::after { left: 100%; }
.brain-answer::before { right: 100%; transform: rotate(180deg); }
.brain-demo__label { font: 9px/1.5 var(--font-tag); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); }
.brain-question h3 { margin: 20px 0 28px; font-size: clamp(21px, 2vw, 30px); line-height: 1.22; letter-spacing: -.035em; }
.brain-question__arrow { display: block; color: var(--cyan); font-size: 24px; text-align: right; }
.brain-answer__value { margin-top: 16px; color: var(--chalk); font-size: clamp(28px, 3vw, 48px); line-height: 1.08; letter-spacing: -.045em; font-variant-numeric: tabular-nums; }
.brain-answer__detail { margin-top: 14px; color: color-mix(in srgb, var(--chalk) 80%, var(--muted)); font-size: 12px; line-height: 1.6; }
.brain-answer__source { margin-top: 22px; padding-top: 13px; border-top: 1px solid var(--line); font-size: 10px; color: var(--mint); }
.brain-demo__controls { position: absolute; bottom: 150px; left: 3vw; right: 3vw; display: flex; align-items: center; gap: 16px; pointer-events: auto; }
.brain-demo__tabs { display: flex; gap: 4px; border: 1px solid var(--glass-edge); background: var(--glass-ground); padding: 5px; border-radius: 50px; backdrop-filter: blur(12px); }
.brain-demo__tabs button,
.brain-demo__toggle { border: 0; background: transparent; color: var(--muted); border-radius: 30px; padding: 11px 19px; font-size: 12px; }
.brain-demo__tabs button[aria-selected="true"] { color: var(--void); background: var(--cyan); }
.brain-demo__toggle { border: 1px solid var(--line); padding: 10px 16px; }
.brain-demo__note { margin-left: auto; color: var(--muted); font: 10px/1.5 var(--font-tag); }
.brain-demo__pending { position: absolute; top: calc(37% + 34px); right: 3vw; width: 30%; padding: 28px; border-radius: 24px; color: var(--muted); font-size: 13px; }
.brain-demo__thinking { display: block; color: var(--cyan); font-size: 34px; letter-spacing: .15em; margin-bottom: 14px; }
.brain-exchange:not([hidden]) { animation: brain-answer-in 450ms ease both; }
@keyframes brain-answer-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: translateY(0); } }
@media (max-height: 800px) and (min-width: 761px) {
  #ov-brain .tl-left { top: 115px; font-size: 44px; }
  .brain-demo__content { top: 30%; }
  .brain-question,.brain-answer { padding: 20px; }
  .brain-question h3 { font-size: 23px; margin-bottom: 12px; }
  .brain-answer { margin-top: 12px; }
  .brain-answer__value { font-size: 32px; }
  .brain-answer__source { margin-top: 12px; padding-top: 9px; }
  .brain-demo__pending { top: calc(30% + 12px); }
  .brain-demo__controls { bottom: 122px; }
  #ov-brain .tl-right { font-size: 35px !important; bottom: 40px; }
}
@media (max-width: 760px) {
  #ov-brain .tl-left { top: 108px; left: 24px; font-size: 36px; width: calc(100% - 48px); }
  #ov-brain .tl-right { bottom: 105px; right: 24px; width: calc(100% - 48px) !important; font-size: 29px !important; }
  #ov-brain .cta { bottom: 32px; left: 24px; }
  #ov-brain .cta .action { padding: 14px 20px; font-size: 12px; }
  .brain-demo__content { top: 24%; left: 24px; right: 24px; }
  .brain-exchange { gap: 16px; grid-template-columns: 1fr; }
  .brain-question,.brain-answer { padding: 18px 20px; border-radius: 20px; }
  .brain-question { width: 87%; }
  .brain-question h3 { font-size: 19px; margin: 10px 0 0; }
  .brain-question__arrow { display: none; }
  .brain-answer { width: 92%; margin-top: 0; margin-left: auto; }
  .brain-answer__value { font-size: 32px; margin-top: 10px; }
  .brain-answer__detail { font-size: 11px; margin-top: 9px; }
  .brain-answer__source { font-size: 9px; margin-top: 12px; padding-top: 10px; }
  .brain-question::after,.brain-answer::before { display: none; }
  .brain-demo__controls { bottom: 165px; left: 24px; right: 24px; gap: 7px; flex-wrap: wrap; }
  .brain-demo__tabs { padding: 4px; flex: 1; justify-content: space-between; }
  .brain-demo__tabs button { font-size: 10px; padding: 9px 10px; }
  .brain-demo__toggle { padding: 10px; font-size: 10px; }
  .brain-demo__note { width: 100%; font-size: 9px; margin: 5px 0 0; }
  .brain-demo__pending { top: calc(24% + 148px); right: 24px; width: calc(92% - 44px); }
}
/* Sin WebGL o con movimiento reducido la demostración mantiene control manual. */
body:not(.scene-active) #ov-brain { display: block; min-height: 0; padding: 90px 3vw 60px; visibility: visible !important; pointer-events: auto !important; }
body:not(.scene-active) #ov-brain > .tl-left,
body:not(.scene-active) #ov-brain > .tl-right,
body:not(.scene-active) #ov-brain > .cta { position: relative; inset: auto; width: auto !important; margin: 0; transform: none; }
body:not(.scene-active) #ov-brain > .tl-right { margin: 40px 0 26px; }
body:not(.scene-active) .brain-demo { position: relative; inset: auto; margin-top: 32px; }
body:not(.scene-active) .brain-demo__content { position: relative; inset: auto; }
body:not(.scene-active) .brain-exchange { gap: 30px; }
body:not(.scene-active) .brain-demo__controls { position: relative; inset: auto; margin-top: 26px; }
body:not(.scene-active) .brain-demo__pending { position: relative; inset: auto; width: auto; }
body:not(.scene-active) .brain-question::after,
body:not(.scene-active) .brain-answer::before { display: none; }
@media (max-width: 760px) and (max-height: 740px) {
  .brain-demo__content { top: 24%; }
  .brain-exchange { gap: 10px; }
  .brain-question,.brain-answer { padding: 14px 17px; }
  .brain-question h3 { font-size: 16px; margin-top: 7px; }
  .brain-answer__value { font-size: 26px; margin-top: 8px; }
  .brain-answer__detail { font-size: 10px; line-height: 1.5; }
  .brain-answer__source { display: none; }
  .brain-demo__controls { bottom: 148px; }
  #ov-brain .tl-right { bottom: 91px; font-size: 25px !important; }
  #ov-brain .cta { bottom: 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .brain-exchange:not([hidden]) { animation: none; }
}

/* La señal recorre el cerebro antes de revelar el resultado. */
.neural-flow { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.neural-flow path { fill: none; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.neural-input,.neural-output,.neural-network { opacity: 0; }
.neural-mobile { display: none; }
.neural-wire { stroke: var(--cyan); stroke-width: 1.4; stroke-dasharray: 1; stroke-dashoffset: 1; }
.neural-pulse { stroke: var(--chalk); stroke-width: 3.5; stroke-dasharray: .1 .9; stroke-dashoffset: 1; filter: drop-shadow(0 0 4px var(--cyan)); }
.neural-branch { stroke: var(--cyan); stroke-width: 1.35; stroke-dasharray: 1; stroke-dashoffset: 1; }
.neural-node__halo { fill: var(--cyan); opacity: .1; }
.neural-node__core { fill: var(--chalk); }
.neural-node { opacity: 0; }
[data-brain-phase="receiving"] .neural-input,
[data-brain-phase="thinking"] .neural-input,
[data-brain-phase="responding"] .neural-input,
[data-brain-phase="answer"] .neural-input { opacity: .9; }
[data-brain-phase="receiving"] .neural-input .neural-wire { animation: neural-draw 650ms ease-out forwards; }
[data-brain-phase="receiving"] .neural-input .neural-pulse { animation: neural-packet 750ms linear both; }
[data-brain-phase="thinking"] .neural-network,
[data-brain-phase="responding"] .neural-network { opacity: 1; filter: drop-shadow(0 0 4px color-mix(in srgb, var(--cyan) 45%, transparent)); }
[data-brain-phase="thinking"] .neural-branch { animation: neural-draw 600ms ease-out var(--neural-delay) both; }
[data-brain-phase="thinking"] .neural-node { animation: neural-fire 620ms ease-out var(--neural-delay) both; }
[data-brain-phase="thinking"] .neural-input .neural-wire,
[data-brain-phase="responding"] .neural-wire,
[data-brain-phase="answer"] .neural-wire,
[data-brain-phase="responding"] .neural-branch,
[data-brain-phase="answer"] .neural-branch { stroke-dashoffset: 0; }
[data-brain-phase="responding"] .neural-node,
[data-brain-phase="answer"] .neural-node { opacity: .8; }
[data-brain-phase="responding"] .neural-output { opacity: 1; }
[data-brain-phase="responding"] .neural-output .neural-wire { animation: neural-draw 600ms ease-out both; }
[data-brain-phase="responding"] .neural-output .neural-pulse { animation: neural-packet 750ms linear both; }
[data-brain-phase="answer"] .neural-network { opacity: .35; }
[data-brain-phase="answer"] .neural-output { opacity: .5; }
[data-brain-phase="answer"] .brain-answer { animation: brain-answer-in 550ms ease both; }
.brain-question::after,.brain-answer::before { display: none; }
.brain-demo__pending {
  top: auto; bottom: 26%; left: 50%; right: auto; transform: translateX(-50%);
  width: max-content; max-width: 35%; padding: 10px 16px; border-radius: 999px;
  display: flex; align-items: center; gap: 12px; font-size: 11px;
}
.brain-demo__thinking { display: inline; margin: 0; font-size: 22px; line-height: 1; }
@keyframes neural-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes neural-packet { 0% { stroke-dashoffset: 1; opacity: 0; } 15% { opacity: 1; } 85% { opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes neural-fire { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: .75; } }
@media (max-width: 760px) {
  .brain-demo__content { top: 22%; }
  .brain-exchange { gap: 98px; }
  .brain-answer { padding: 14px 18px; }
  .brain-answer__value { font-size: 28px; }
  .brain-answer__detail { font-size: 10px; }
  .brain-answer__source { margin-top: 10px; padding-top: 8px; }
  .neural-flow { height: 88%; top: -2%; }
  .neural-network { transform: translate(-175px, 0) scale(1.35, 1); transform-origin: 0 0; }
  .neural-input,.neural-output { display: none; }
  .neural-input.neural-mobile,.neural-output.neural-mobile { display: block; }
  .brain-demo__pending { top: 44%; bottom: auto; left: 50%; right: auto; width: max-content; max-width: 85%; padding: 9px 15px; font-size: 10px; }
  body:not(.scene-active) .brain-exchange { gap: 18px; }
}
@media (max-width: 760px) and (max-height: 740px) {
  .brain-exchange { gap: 44px; }
  .brain-question h3 { font-size: 15px; }
  .brain-answer__value { font-size: 24px; }
}
body:not(.scene-active) .neural-flow { display: none; }
[aria-hidden="true"] .neural-flow * { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) {
  .neural-flow { display: none; }
  [data-brain-phase="answer"] .brain-answer { animation: none; }
}
