/*
 * Niyutam Hero — hero-ai-core.css
 * Right-side "AI Core" visualization: a glowing particle core, floating
 * glass service cards and a metrics card, layered over the existing
 * hero particle background. Purely additive — does not alter
 * .hero__container / .hero__content layout or the left column.
 *
 * Depends on tokens already defined in hero.css:
 *   --hero-accent, --hero-text, --hero-font-logo, --hero-font-body,
 *   --hero-nav-height
 */

/* ─── Visual root: absolute, right column of the hero ───────────────── */
.hero__visual {
  position: absolute;
  top: 50%;
  right: clamp(-8px, 2vw, 56px);
  transform: translateY(-50%);
  width: clamp(460px, 42vw, 620px);
  height: clamp(520px, 72vh, 720px);
  z-index: 1;
  pointer-events: none; /* re-enabled per-element below (cards) */
}

/* Wrapper actually receiving the mouse-parallax transform, kept separate
   from the top:50%/translateY(-50%) centering above so the two transforms
   don't fight each other. */
.hero__visual-parallax {
  position: absolute;
  inset: 0;
  transform: translate3d(var(--px, 0px), var(--py, 0px), 0);
  will-change: transform;
}

/* ─── Particle-core canvas ───────────────────────────────────────────── */
.hero__visual-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* ─── Soft neon glow behind the core (pure CSS, cheap to animate) ──── */
.hero__core-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(150px, 15vw, 210px);
  height: clamp(150px, 15vw, 210px);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(200, 255, 0, 0.32) 0%,
    rgba(200, 255, 0, 0.12) 38%,
    transparent 72%
  );
  filter: blur(6px);
  animation: core-breathe 6s ease-in-out infinite;
  pointer-events: none;
}

@keyframes core-breathe {
  0%, 100% { opacity: 0.75; transform: translate(-50%, -50%) scale(0.94); }
  50%       { opacity: 1;    transform: translate(-50%, -50%) scale(1.06); }
}

/* ─── Floating glass cards ───────────────────────────────────────────── */
.hero__cards {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero__card {
  position: absolute;
  left: var(--card-x);
  top: var(--card-y);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: clamp(168px, 16vw, 200px);
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  pointer-events: auto;
  will-change: transform;
  transition: box-shadow 0.35s ease, border-color 0.35s ease;
}

.hero__card:hover {
  border-color: rgba(200, 255, 0, 0.32);
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.45), 0 0 26px rgba(200, 255, 0, 0.14);
}

.hero__card-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(200, 255, 0, 0.1);
  border: 1px solid rgba(200, 255, 0, 0.22);
  color: var(--hero-accent);
}

.hero__card-icon svg { width: 15px; height: 15px; }

.hero__card-body { min-width: 0; }

.hero__card-title {
  font-family: var(--hero-font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--hero-text);
  line-height: 1.3;
  margin-bottom: 3px;
}

.hero__card-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--hero-font-body);
  font-size: 10.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 4px;
}

.hero__card-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--hero-accent);
  box-shadow: 0 0 5px rgba(200, 255, 0, 0.7);
  flex-shrink: 0;
  animation: hero-pulse-dot 2.4s ease-in-out infinite;
}

.hero__card-tags {
  font-family: var(--hero-font-mono, var(--hero-font-body));
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Metrics card (bottom-right) ────────────────────────────────────── */
.hero__metrics {
  position: absolute;
  right: 2%;
  bottom: 2%;
  display: flex;
  align-items: stretch;
  gap: 14px;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 16px;
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  box-shadow: 0 10px 34px rgba(0, 0, 0, 0.4);
  pointer-events: auto;
  will-change: transform;
}

.hero__metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding-inline: 6px;
  position: relative;
}

.hero__metric + .hero__metric::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  bottom: 4px;
  width: 1px;
  background: rgba(255, 255, 255, 0.09);
}

.hero__metric-value {
  font-family: var(--hero-font-logo);
  font-size: 20px;
  font-weight: 600;
  color: var(--hero-text);
  line-height: 1.1;
  margin-bottom: 2px;
}

.hero__metric-label {
  font-family: var(--hero-font-body);
  font-size: 9.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

/* ─── Reduced motion: keep everything visible, calm and static ──────── */
@media (prefers-reduced-motion: reduce) {
  .hero__core-glow { animation: none; opacity: 0.9; }
  .hero__card-dot   { animation: none; }
  .hero__card:hover { box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35); border-color: rgba(255, 255, 255, 0.09); }
}

/* ─── Tablet: scale down, keep hugging the right edge, drop one card ─ */
@media (max-width: 1279px) {
  .hero__visual {
    width: clamp(380px, 40vw, 480px);
    height: clamp(460px, 68vh, 620px);
    right: clamp(-16px, 1.5vw, 24px);
  }
  .hero__core-glow { width: clamp(120px, 14vw, 170px); height: clamp(120px, 14vw, 170px); }
  .hero__card { width: clamp(150px, 19vw, 184px); }
  .hero__card[data-card="5"] { display: none; } /* Staff Augmentation — trimmed first */
}

/* ─── Below 1024px: too narrow (at any aspect ratio) to guarantee the
       floating overlay never crosses into the text column or the service
       pills, so this whole range uses the same safe stacked-below layout
       as mobile rather than a fragile intermediate absolute tier. ────── */
@media (max-width:600px) {
  .hero {
    height: 170vh !important; /* fallback for browsers that support dynamic viewport units */
  }
}
@media (max-width: 1023px) {
  .hero {
    flex-direction: column;
  }

  .hero__container { order: 1; }

  .hero__visual {
    order: 2;
    position: static;
    transform: none;
    width: 100%;
    height: auto;
    min-height: 260px;
    padding: 1.5rem clamp(1rem, 4vw, 3rem) 2.5rem;
  }

  .hero__visual-parallax {
    position: relative;
    inset: auto;
    transform: none !important;
    min-height: 200px;
  }

  .hero__core-glow {
    width: 120px;
    height: 120px;
    animation-duration: 7s;
  }

  /* Cards drop out of absolute flow into a simple, touch-friendly row */
  .hero__cards {
    position: static;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
  }

  .hero__card {
    position: static !important;
    transform: none !important;
    width: clamp(140px, 42vw, 170px);
  }

  /* Only the first 3 cards survive on mobile */
  .hero__card[data-card="4"],
  .hero__card[data-card="5"] { display: none; }

  .hero__metrics {
    position: static;
    width: 100%;
    margin-top: 16px;
    justify-content: space-evenly;
  }
}
