/* =============================================================
   HERO — dos columnas (texto | robot) + barra de métricas
   ============================================================= */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1.5rem, 4vh, 3rem);
  padding: clamp(9rem, 17vh, 10.5rem) clamp(1rem, 4vw, 2.5rem) clamp(2rem, 5vh, 3.5rem);
  overflow: hidden;
  isolation: isolate;
}

/* ---------- Fondo por capas ---------- */
.hero__bg { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.hero__bg > span { position: absolute; display: block; }

.hero__base {
  inset: 0;
  background:
    radial-gradient(90% 70% at 70% 30%, #430d8e 0%, transparent 60%),
    linear-gradient(180deg, #2c0a62 0%, #1d0742 45%, #10032a 80%, #07020f 100%);
}

.hero__orb { border-radius: 50%; filter: blur(70px); opacity: .85; }
.hero__orb--a {
  width: 50vw; height: 50vw;
  left: 72%; top: 45%;
  transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, rgba(168, 85, 247, .8), rgba(123, 42, 224, .3) 55%, transparent 75%);
  animation: orb-drift 16s var(--ease-in-out) infinite;
}
.hero__orb--b {
  width: 38vw; height: 38vw;
  left: -10%; bottom: -14%;
  background: radial-gradient(closest-side, rgba(240, 171, 252, .35), transparent 70%);
  animation: orb-drift 21s var(--ease-in-out) infinite reverse;
}
.hero__orb--c {
  width: 34vw; height: 34vw;
  left: 10%; top: 0;
  background: radial-gradient(closest-side, rgba(56, 189, 248, .22), transparent 70%);
  animation: orb-drift 18s var(--ease-in-out) infinite;
}

.hero__circle {
  width: min(62vw, 860px);
  aspect-ratio: 1;
  left: 72%; top: 6%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(160, 80, 240, .3), rgba(110, 40, 190, .1) 62%, transparent 72%);
  border: 1px solid rgba(255, 255, 255, .07);
  animation: circle-breathe 12s var(--ease-in-out) infinite;
}

.hero__grid {
  inset: 0;
  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;
  -webkit-mask-image: radial-gradient(70% 60% at 50% 45%, #000 0%, transparent 78%);
  mask-image: radial-gradient(70% 60% at 50% 45%, #000 0%, transparent 78%);
  opacity: .5;
  animation: grid-pan 30s linear infinite;
}

.hero__noise {
  inset: 0;
  opacity: .14;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

.hero__spotlight {
  inset: 0;
  background: radial-gradient(340px circle at var(--mx, 50%) var(--my, 35%), rgba(192, 132, 252, .16), transparent 70%);
  opacity: 0;
  transition: opacity .4s var(--ease-out);
}
.hero:hover .hero__spotlight { opacity: 1; }

.hero__particles {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: .8;
  pointer-events: none;
}

/* ---------- Escenario: 2 columnas ---------- */
.hero__stage {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 4rem);
}

/* ---------- Columna de texto ---------- */
.hero__content {
  display: grid;
  justify-items: start;
  gap: clamp(1rem, 2vh, 1.5rem);
}

/* Titular: líneas centradas entre sí, bloque alineado a la columna */
.title {
  display: grid;
  justify-items: center;
  gap: .1em;
  width: fit-content;
  max-width: 100%;
  text-align: center;
}
.title__line { display: block; max-width: 100%; }
.title__line--sm {
  font-size: clamp(1.25rem, .6rem + 2vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -.01em;
  color: #fff;
}
.title__line--xl {
  font-size: clamp(3.2rem, 1.2rem + 6.2vw, 7rem);
  font-weight: 900;
  letter-spacing: -.045em;
  line-height: .92;
  color: #fff;
  filter: drop-shadow(0 12px 30px rgba(168, 85, 247, .5));
}
.title__line--xl .word { overflow: visible; padding-bottom: .04em; }
.title__line--xl .word > span { clip-path: inset(-20% -10% -20% -10%); }

.title__brush {
  position: relative;
  display: inline-flex;
  align-items: flex-end;
  gap: .2rem;
  margin-top: -.25rem;
  transform: rotate(-2deg) translateX(4%);
}
.brush__with {
  font-family: var(--font-script);
  font-size: clamp(1.7rem, 3.4vw, 2.9rem);
  line-height: .9;
  color: #fff;
  padding-bottom: .55rem;
  text-shadow: 0 8px 30px rgba(0, 0, 0, .4);
  white-space: nowrap;
}
.brush__ia {
  display: inline-flex;
  align-items: flex-end;
  gap: .1rem;
  height: clamp(86px, 12.5vh, 126px);
}
.brush__glyph {
  height: 100%;
  width: auto;
  filter: drop-shadow(0 10px 26px rgba(0, 0, 0, .4)) drop-shadow(0 0 20px rgba(56, 189, 248, .45));
  animation: brush-wipe .8s var(--ease-out) both;
}
.brush__glyph--i { animation-delay: .45s; }
.brush__glyph--a { animation-delay: .72s; }
.brush__underline {
  position: absolute;
  left: 24%;
  bottom: -1.05rem;
  width: 92%;
  height: auto;
  overflow: visible;
  animation: brush-wipe .9s var(--ease-out) 1.05s both;
  filter: drop-shadow(0 0 12px rgba(232, 121, 249, .55));
}

.hero__lead {
  max-width: 46ch;
  color: rgba(238, 233, 251, .8);
  font-size: var(--step-1);
  line-height: 1.6;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: .3rem; }
.btn__play {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .12);
}
.btn__play svg { width: 12px; height: 12px; fill: currentColor; }

/* Prueba social */
.hero__proof {
  display: flex;
  align-items: center;
  gap: .9rem;
  margin-top: .4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--muted);
  line-height: 1.45;
}
.hero__proof strong { color: #fff; }
.hero__proof p span { color: #fcd34d; font-size: .8rem; letter-spacing: .02em; }
.hero__avatars { display: flex; }
.hero__avatars i {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  margin-left: -10px;
  border-radius: 50%;
  border: 2px solid #1d0742;
  font-style: normal;
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(140deg, var(--violet-400), var(--blue-500));
}
.hero__avatars i:first-child { margin-left: 0; }
.hero__avatars i:nth-child(2) { background: linear-gradient(140deg, var(--fuchsia-300), var(--violet-500)); }
.hero__avatars i:nth-child(3) { background: linear-gradient(140deg, var(--cyan-400), var(--violet-600)); }
.hero__avatars i:nth-child(4) { background: rgba(255, 255, 255, .12); backdrop-filter: blur(6px); }

/* ---------- Columna visual ---------- */
.hero__visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: clamp(380px, 52vh, 560px);
}

.hero__robot {
  position: relative;
  z-index: 2;
  margin: 0;
  display: grid;
  justify-items: center;
  transition: transform .5s var(--ease-out);
}
.hero__robot picture {
  position: relative;
  z-index: 2;
  display: block;
  width: min(32vw, 50vh, 440px);
  animation: float-hero 7s var(--ease-in-out) infinite;
}
.hero__robot img {
  position: relative;
  z-index: 2;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 34px 70px rgba(0, 0, 0, .6)) drop-shadow(0 0 40px rgba(168, 85, 247, .35));
  /* Funde los bordes rectos del recorte de la imagen */
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 46%, #000 68%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 46%, #000 68%, transparent 100%);
}
.hero__halo {
  position: absolute;
  z-index: 0;
  width: 115%;
  aspect-ratio: 1;
  top: 46%; left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(168, 85, 247, .5), rgba(123, 42, 224, .16) 55%, transparent 72%);
  filter: blur(14px);
  animation: halo-pulse 5.5s var(--ease-in-out) infinite;
}
.orbit {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  border: 1px dashed rgba(192, 132, 252, .35);
  pointer-events: none;
}
.orbit--1 { width: 100%; aspect-ratio: 1; top: 46%; left: 50%; transform: translate(-50%, -50%); animation: spin 26s linear infinite; }
.orbit--2 { width: 76%; aspect-ratio: 1; top: 42%; left: 50%; transform: translate(-50%, -50%); border-color: rgba(56, 189, 248, .3); animation: spin 18s linear infinite reverse; }
.orbit--3 { width: 128%; aspect-ratio: 1; top: 48%; left: 50%; transform: translate(-50%, -50%); border-style: solid; border-color: rgba(255, 255, 255, .07); animation: spin 40s linear infinite; }

.hero__robot-caption {
  position: relative;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  margin-top: .6rem;
  padding: .5rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: rgba(12, 3, 30, .7);
  backdrop-filter: blur(10px);
  font-size: .8rem;
  color: var(--muted);
}
.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--cyan-400);
  animation: pulse-ring 2.2s var(--ease-out) infinite;
}

/* ---------- Pastillas flotantes ---------- */
.pill {
  position: absolute;
  z-index: 4;
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1.1rem .6rem .6rem;
  border-radius: 18px;
  border: 1px solid rgba(192, 132, 252, .45);
  background: linear-gradient(120deg, rgba(46, 10, 92, .82), rgba(24, 6, 52, .78));
  box-shadow: 0 0 0 1px rgba(168, 85, 247, .12), 0 18px 46px -20px rgba(0, 0, 0, .9), 0 0 30px -12px rgba(168, 85, 247, .8);
  backdrop-filter: blur(14px);
  transition: border-color .4s var(--ease-out), box-shadow .4s var(--ease-out);
}
.pill:hover { border-color: rgba(240, 171, 252, .85); }
.pill--a { top: 10%; left: 0; animation: float-hero 6s var(--ease-in-out) infinite; }
.pill--b { top: 40%; right: -4%; animation: float-hero 7s var(--ease-in-out) -2s infinite; }
.pill--c { bottom: 16%; left: 4%; animation: float-hero 8s var(--ease-in-out) -4s infinite; }

.pill__icon {
  width: 42px; height: 42px;
  flex: none;
  display: grid; place-items: center;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(140deg, rgba(240, 171, 252, .5), rgba(123, 42, 224, .45));
  border: 1px solid rgba(240, 171, 252, .45);
  box-shadow: 0 0 22px rgba(168, 85, 247, .45);
}
.pill--b .pill__icon { background: linear-gradient(140deg, rgba(56, 189, 248, .55), rgba(47, 107, 255, .4)); border-color: rgba(125, 211, 252, .5); }
.pill__icon svg {
  width: 22px; height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill__text { display: grid; }
.pill__text strong, .pill__text em {
  font-family: var(--font-display);
  font-size: .98rem;
  line-height: 1.2;
}
.pill__text strong { font-weight: 700; color: #fff; }
.pill__text em { font-style: normal; color: rgba(238, 233, 251, .75); }

/* ---------- Barra de métricas ---------- */
.hero__bar {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, .1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .015)),
    rgba(12, 3, 30, .55);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), var(--shadow-soft);
  overflow: hidden;
}
.hero__bar-cell {
  display: grid;
  align-content: center;
  gap: .35rem;
  padding: 1.1rem 1.4rem;
  border-left: 1px solid var(--line);
}
.hero__bar-cell:first-child { border-left: 0; }
.hero__bar-cell--tag {
  background: linear-gradient(110deg, rgba(123, 42, 224, .25), transparent);
}
.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 600;
  color: #fff;
}
.hero__kicker {
  font-family: var(--font-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--cyan-300);
}
.kpi__label {
  font-size: .68rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted-dim);
}
.kpi__value {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
}
.kpi__bar {
  display: block;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, .1);
  overflow: hidden;
}
.kpi__bar i {
  display: block;
  height: 100%;
  width: var(--w);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--cyan-400), var(--fuchsia-300));
  transform-origin: left;
  animation: bar-grow-x 1.4s var(--ease-out) .8s both;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .hero__bar { grid-template-columns: repeat(3, 1fr); }
  .hero__bar-cell--tag { grid-column: 1 / -1; border-bottom: 1px solid var(--line); text-align: center; justify-items: center; }
  .hero__bar-cell:nth-child(2) { border-left: 0; }
}

@media (max-width: 900px) {
  .hero { padding-top: clamp(8.5rem, 18vh, 9.5rem); }
  .hero__stage { grid-template-columns: 1fr; gap: 1rem; }
  .hero__content { justify-items: center; text-align: center; }
  .title { margin-inline: auto; }
  .hero__cta { justify-content: center; }
  .hero__proof { text-align: left; }
  .hero__visual { min-height: 0; padding-block: 2.5rem 1rem; }
  .hero__robot picture { width: min(70vw, 360px); }
  .pill--a { top: 2%; left: 2%; }
  .pill--b { top: 40%; right: 0; }
  .pill--c { bottom: 18%; left: 0; }
}

@media (max-width: 560px) {
  .title__line--sm { font-size: clamp(1rem, 5.4vw, 1.45rem); }
  .brush__ia { height: clamp(76px, 11vh, 100px); }
  .brush__with { font-size: 1.55rem; }
  .title__brush { transform: rotate(-2deg) translateX(0); margin-top: -.4rem; }
  .brush__underline { bottom: -.35rem; left: 18%; width: 92%; }
  .eyebrow { font-size: .66rem; letter-spacing: .1em; padding-inline: .7rem; }
  .hero__cta { width: 100%; flex-direction: column; }
  .hero__cta .btn { width: 100%; }
  .hero__proof { font-size: .8rem; }
  .pill { padding: .45rem .8rem .45rem .45rem; gap: .5rem; border-radius: 14px; }
  .pill__icon { width: 32px; height: 32px; border-radius: 10px; }
  .pill__icon svg { width: 17px; height: 17px; }
  .pill__text strong, .pill__text em { font-size: .78rem; }
  .hero__bar { grid-template-columns: 1fr 1fr; }
  .hero__bar-cell { padding: .9rem 1rem; }
  .hero__bar-cell:nth-child(4) { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
  .kpi__value { font-size: 1.3rem; }
}
