/* ============================================================
   Astra Capital · Landing IA — v2
   Hero inmersivo + consola de bot interactiva
   ============================================================ */

/* ---------- capas de atmósfera del hero ---------- */
.ia-hero{position:relative;overflow:hidden;}
.hero-fx{position:absolute;inset:-10% -5% auto;height:820px;pointer-events:none;z-index:0;}
.hero-fx .aur{position:absolute;border-radius:50%;filter:blur(90px);opacity:.5;mix-blend-mode:screen;}
.hero-fx .a1{width:620px;height:520px;left:52%;top:-120px;background:radial-gradient(circle,rgba(91,140,255,.55),transparent 68%);animation:aurA 18s ease-in-out infinite;}
.hero-fx .a2{width:520px;height:460px;left:8%;top:40px;background:radial-gradient(circle,rgba(169,139,255,.42),transparent 68%);animation:aurB 22s ease-in-out infinite;}
.hero-fx .a3{width:420px;height:380px;left:70%;top:320px;background:radial-gradient(circle,rgba(45,212,167,.24),transparent 70%);animation:aurC 26s ease-in-out infinite;}
@keyframes aurA{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(-60px,40px,0) scale(1.12)}}
@keyframes aurB{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(50px,-30px,0) scale(1.08)}}
@keyframes aurC{0%,100%{transform:translate3d(0,0,0) scale(1)}50%{transform:translate3d(-40px,-50px,0) scale(1.15)}}
.hero-fx .dots i{position:absolute;width:2px;height:2px;border-radius:50%;background:rgba(180,205,255,.85);box-shadow:0 0 6px rgba(140,180,255,.9);animation:floatUp linear infinite;}
@keyframes floatUp{0%{transform:translateY(40px);opacity:0}12%{opacity:.9}88%{opacity:.9}100%{transform:translateY(-340px);opacity:0}}
.ia-hero .ia-wrap{position:relative;z-index:1;}
.hero-glow{position:absolute;width:520px;height:520px;left:0;top:0;border-radius:50%;pointer-events:none;z-index:0;
  background:radial-gradient(circle,rgba(91,140,255,.13),transparent 62%);
  transform:translate3d(-50%,-50%,0);opacity:0;transition:opacity .6s;}
.ia-hero:hover .hero-glow{opacity:1;}

/* ---------- titular con palabra rotativa ---------- */
.rotor{display:inline-block;position:relative;vertical-align:bottom;min-height:1.1em;}
.rotor .w{display:inline-block;
  background:linear-gradient(103deg,var(--signal),var(--neural) 70%,#D8C4FF);
  -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;color:transparent;
  animation:rotorIn .55s cubic-bezier(.2,.8,.2,1);}
@keyframes rotorIn{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}

/* ============================================================
   ROBOT OBSERVADOR (sigue la mirada · reacciona al clic/toque)
   ============================================================ */
.hero-bot{display:flex;gap:22px;align-items:center;margin-top:24px;}
.robo-wrap{flex-shrink:0;width:186px;position:relative;cursor:pointer;user-select:none;-webkit-tap-highlight-color:transparent;}
.robo-wrap svg{display:block;width:100%;height:auto;overflow:visible;}
.robo-hint{margin-top:8px;text-align:center;font-family:var(--mono);font-size:9.5px;letter-spacing:.1em;
  text-transform:uppercase;color:var(--dim);transition:opacity .5s;}
.robo-wrap.touched .robo-hint{opacity:0;}

/* cabeza: micro-inclinación al seguir la mirada */
#roboHead{transition:transform .45s cubic-bezier(.2,.8,.2,1);transform-box:fill-box;transform-origin:50% 85%;}
/* pupilas */
.robo-pupil{transition:transform .16s cubic-bezier(.3,.9,.3,1);transform-box:fill-box;transform-origin:center;}
/* párpado (parpadeo) */
.robo-lid{transform:scaleY(0);transform-box:fill-box;transform-origin:center top;transition:transform .1s ease;}
.robo-wrap.blink .robo-lid{transform:scaleY(1);}
/* aro de escaneo al reaccionar */
.robo-ring{opacity:0;transform-box:fill-box;transform-origin:center;}
.robo-wrap.react .robo-ring{animation:roboRing .75s ease-out;}
@keyframes roboRing{0%{opacity:.85;transform:scale(.55)}100%{opacity:0;transform:scale(1.5)}}
.robo-wrap.react .robo-iris{fill:#7EE8C6;}
.robo-iris{transition:fill .35s;}
/* antena */
.robo-ant{transform-box:fill-box;transform-origin:center;animation:roboAnt 2.2s ease-in-out infinite;}
@keyframes roboAnt{0%,100%{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1.15)}}

@media(max-width:640px){
  .hero-bot{gap:14px;}
  .robo-wrap{width:132px;}
  .robo-hint{font-size:9px;}
}
@media(prefers-reduced-motion:reduce){
  #roboHead,.robo-pupil{transition:none;}
  .robo-ant{animation:none;opacity:.8;}
  .robo-wrap.react .robo-ring{animation:none;}
}

/* línea con palabra rotativa bajo el titular */
.hero-rotline{margin-top:16px;font-family:var(--mono);font-size:14.5px;color:var(--muted);letter-spacing:.01em;}

/* badge sobre el titular */
.hero-badge{display:inline-flex;align-items:center;gap:9px;padding:7px 14px;border-radius:999px;
  border:1px solid rgba(45,212,167,.32);background:rgba(45,212,167,.08);
  font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;color:#7EE8C6;}
.hero-badge i{width:6px;height:6px;border-radius:50%;background:var(--live);box-shadow:0 0 8px var(--live);animation:iaPulse 1.6s ease-in-out infinite;}

/* métricas con acento lateral */
.ia-metrics .m{position:relative;padding-left:14px;}
.ia-metrics .m::before{content:"";position:absolute;left:0;top:4px;bottom:4px;width:2px;border-radius:2px;
  background:linear-gradient(180deg,var(--signal),transparent);}

/* ============================================================
   CONSOLA DE BOT (elemento interactivo principal)
   ============================================================ */
.botwrap{border:1px solid var(--edge);border-radius:20px;overflow:hidden;
  background:linear-gradient(180deg,rgba(13,19,34,.96),rgba(8,12,22,.98));
  box-shadow:0 30px 80px rgba(0,0,0,.5);}
.bot-top{display:flex;align-items:center;gap:12px;padding:14px 18px;border-bottom:1px solid var(--edge2);flex-wrap:wrap;}
.bot-top .name{font-family:var(--mono);font-size:12.5px;color:#fff;letter-spacing:.06em;display:flex;align-items:center;gap:9px;}
.bot-top .name .dot{width:7px;height:7px;border-radius:50%;background:var(--dim);transition:background .3s,box-shadow .3s;}
.botwrap.on .bot-top .name .dot{background:var(--live);box-shadow:0 0 10px var(--live);animation:iaPulse 1.6s ease-in-out infinite;}
.bot-top .pill{font-family:var(--mono);font-size:10.5px;letter-spacing:.1em;text-transform:uppercase;
  border:1px solid var(--edge2);border-radius:999px;padding:4px 11px;color:var(--muted);}
.bot-switch{margin-left:auto;display:inline-flex;align-items:center;gap:10px;background:none;border:none;cursor:pointer;
  font-family:var(--mono);font-size:11px;letter-spacing:.1em;text-transform:uppercase;color:var(--muted);padding:0;}
.bot-switch .track{width:46px;height:25px;border-radius:999px;background:rgba(255,255,255,.09);border:1px solid var(--edge);
  position:relative;transition:background .3s,border-color .3s;flex-shrink:0;}
.bot-switch .knob{position:absolute;top:2px;left:2px;width:19px;height:19px;border-radius:50%;background:#8A97B4;
  transition:transform .3s cubic-bezier(.2,.8,.2,1),background .3s;}
.botwrap.on .bot-switch .track{background:rgba(45,212,167,.22);border-color:rgba(45,212,167,.5);}
.botwrap.on .bot-switch .knob{transform:translateX(21px);background:var(--live);box-shadow:0 0 10px rgba(45,212,167,.8);}
.botwrap.on .bot-switch{color:var(--live);}

.bot-chart{position:relative;}
.bot-chart svg{display:block;width:100%;height:270px;}
.bot-chart .paused{position:absolute;inset:0;display:none;place-items:center;background:rgba(6,10,20,.74);backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);}
.botwrap.off .bot-chart .paused{display:grid;}
.bot-chart .paused .msg{text-align:center;padding:18px 24px;max-width:34em;}
.bot-chart .paused .msg strong{display:block;font-family:var(--display);font-size:19px;color:#fff;margin-bottom:7px;}
.bot-chart .paused .msg span{font-size:13.5px;color:var(--soft);line-height:1.55;}

.bot-log{border-top:1px solid var(--edge2);padding:11px 18px;height:120px;overflow:hidden;font-family:var(--mono);font-size:11.5px;}
.bot-log .ln{display:flex;gap:10px;padding:3px 0;color:var(--muted);animation:logIn .4s ease;}
@keyframes logIn{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
.bot-log .ln .t{color:var(--dim);flex-shrink:0;}
.bot-log .ln.ok .m{color:#8FE8C8;}
.bot-log .ln.warn .m{color:#FFD08A;}
.bot-log .ln.hu .m{color:var(--human);}
.bot-foot{border-top:1px solid var(--edge2);padding:13px 18px;display:flex;align-items:center;gap:14px;flex-wrap:wrap;}
.bot-foot .rules{font-family:var(--mono);font-size:11px;color:var(--muted);display:flex;gap:14px;flex-wrap:wrap;}
.bot-foot .rules b{color:var(--soft);font-weight:500;}
.bot-stop{margin-left:auto;display:inline-flex;align-items:center;gap:8px;cursor:pointer;font-family:var(--mono);
  font-size:11.5px;letter-spacing:.08em;text-transform:uppercase;color:var(--human);
  background:rgba(255,174,92,.1);border:1px solid rgba(255,174,92,.36);border-radius:999px;padding:9px 16px;
  transition:background .2s,transform .15s;}
.bot-stop:hover{background:rgba(255,174,92,.2);transform:translateY(-1px);}
.bot-stop:disabled{opacity:.4;cursor:default;transform:none;}
.bot-note{margin-top:15px;font-size:12.5px;color:var(--muted);text-align:center;}

/* tarjetas equilibradas: puede ganar / puede perder */
.balance{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:26px;}
.balance .b{border:1px solid var(--edge);border-radius:16px;padding:22px;background:linear-gradient(180deg,rgba(13,19,34,.7),transparent);}
.balance .b .h{font-family:var(--mono);font-size:11px;letter-spacing:.12em;text-transform:uppercase;margin-bottom:10px;display:flex;align-items:center;gap:8px;}
.balance .up .h{color:var(--live);}
.balance .dn .h{color:#FF9B9B;}
.balance .b p{font-size:14.5px;color:var(--soft);line-height:1.6;}

/* control humano */
.human-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}
.hcard{border:1px solid rgba(255,174,92,.22);border-radius:16px;padding:20px;background:linear-gradient(180deg,rgba(40,28,14,.4),rgba(10,15,28,.35));}
.hcard .ic{width:36px;height:36px;border-radius:10px;display:grid;place-items:center;background:rgba(255,174,92,.14);border:1px solid rgba(255,174,92,.3);margin-bottom:13px;}
.hcard .ic svg{width:18px;height:18px;color:var(--human);}
.hcard h3{font-size:15.5px;margin-bottom:7px;}
.hcard p{font-size:13px;color:var(--muted);line-height:1.55;}

@media(max-width:900px){.human-grid{grid-template-columns:1fr 1fr;}}
@media(max-width:640px){
  .balance{grid-template-columns:1fr;}
  .human-grid{grid-template-columns:1fr;}
  .bot-chart svg{height:210px;}
  .bot-log{height:96px;}
  .bot-foot .rules{font-size:10.5px;gap:10px;}
  .bot-stop{margin-left:0;width:100%;justify-content:center;}
  .hero-fx{height:620px;}
}
@media(prefers-reduced-motion:reduce){
  .hero-fx .aur,.hero-fx .dots i,.rotor .w,.hero-badge i,.bot-log .ln{animation:none!important;}
  .hero-glow{display:none;}
}

/* historial de operaciones (sin cifras de resultado) */
.bot-hist{border-top:1px solid var(--edge2);padding:10px 18px 12px;font-family:var(--mono);font-size:11px;}
.bot-hist .hh,.bot-hist .hr{display:grid;grid-template-columns:.85fr .9fr .8fr .8fr 1.5fr .7fr;gap:8px;align-items:center;}
.bot-hist .hh{color:var(--dim);font-size:9.5px;letter-spacing:.08em;text-transform:uppercase;padding-bottom:7px;border-bottom:1px solid var(--edge2);}
.bot-hist .hr{padding:7px 0;border-bottom:1px solid rgba(139,163,255,.05);color:var(--muted);}
.bot-hist .hr:last-child{border-bottom:none;}
.bot-hist .buy{color:#8FE8C8;} .bot-hist .sell{color:#FF9B9B;}
.bot-hist .id{color:var(--dim);}
.bot-hist .st-open{color:#FFD08A;} .bot-hist .st-closed{color:var(--muted);}
.bot-hist .rsn{color:var(--soft);}
@media(max-width:640px){
  .bot-hist{padding:10px 12px 12px;font-size:10px;}
  .bot-hist .hh,.bot-hist .hr{grid-template-columns:.9fr .8fr 1.5fr .7fr;}
  .bot-hist .hh span:nth-child(2),.bot-hist .hr span:nth-child(2),
  .bot-hist .hh span:nth-child(3),.bot-hist .hr span:nth-child(3){display:none;}
}

/* serie de la sesión (meta medida en operaciones, nunca en dinero) */
.bot-serie{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:11px 18px;
  border-bottom:1px solid var(--edge2);font-family:var(--mono);font-size:11px;background:rgba(91,140,255,.04);}
.bot-serie .lbl{color:var(--muted);letter-spacing:.09em;text-transform:uppercase;font-size:10px;}
.bot-serie .dots{display:inline-flex;gap:5px;}
.bot-serie .dots i{width:11px;height:11px;border-radius:3px;display:inline-block;transition:background .35s,transform .35s,box-shadow .35s;}
.bot-serie .dots i.d-pend{background:rgba(255,255,255,.08);}
.bot-serie .dots i.d-win{background:var(--live);box-shadow:0 0 7px rgba(45,212,167,.6);transform:scale(1.06);}
.bot-serie .dots i.d-lose{background:#FF6B6B;box-shadow:0 0 7px rgba(255,107,107,.5);transform:scale(1.06);}
.bot-serie .dots i.d-flat{background:var(--muted);}
.bot-serie .cnt{color:#fff;font-weight:500;}
.bot-serie .stat{color:var(--muted);margin-left:auto;text-align:right;}
@media(max-width:640px){
  .bot-serie{gap:8px;padding:10px 12px;font-size:10px;}
  .bot-serie .dots i{width:9px;height:9px;}
  .bot-serie .stat{margin-left:0;width:100%;text-align:left;}
}

/* posición abierta: fila viva, cierre y estado vacío */
.bot-hist .hr.live{color:var(--soft);}
.bot-hist .hr.live .st-open{position:relative;padding-left:13px;}
.bot-hist .hr.live .st-open::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);
  width:6px;height:6px;border-radius:50%;background:#FFD08A;box-shadow:0 0 7px rgba(255,208,138,.8);
  animation:iaPulse 1.4s ease-in-out infinite;}
.bot-hist .hr.closing{animation:posOut 2.6s ease forwards;}
@keyframes posOut{0%{opacity:1}68%{opacity:1}100%{opacity:0;transform:translateY(-4px)}}
.bot-hist .hr.empty{grid-template-columns:1fr;color:var(--dim);font-style:normal;padding:9px 0;}
@media(prefers-reduced-motion:reduce){
  .bot-hist .hr.live .st-open::before{animation:none;}
  .bot-hist .hr.closing{animation:none;opacity:.55;}
}
