/* ==========================================================================
   ASAD.EXE — Holographic homepage stage
   A fixed WebGL layer painted behind the homepage. It is deliberately inert:
   no pointer events, no z-index fights, and the figure is framed into the
   right gutter so copy, cards and the console are never covered.
   ========================================================================== */

.holo-stage {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  contain: strict;
}
.holo-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0;
  transition: opacity 900ms var(--ease-out, ease);
}
.holo-stage--ready canvas { opacity: 1; }
/* the render fades towards the left column, where the copy lives, so the
   figure is always a background presence rather than something to read past */
.holo-stage canvas {
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 1) 62%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.10) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 1) 62%);
}
@media (max-width: 991.98px) {
  /* phones/tablets: the hero reserves a dedicated band at the top for the
     render, so the figure is never painted behind the copy */
  .hero--holo { padding-top: calc(var(--nav-h, 5rem) + 47vw); }
  .hero--holo::before { display: none; }
  .holo-stage canvas {
    -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 7%, rgba(0, 0, 0, 1) 24%, rgba(0, 0, 0, 0) 31%);
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 1) 7%, rgba(0, 0, 0, 1) 24%, rgba(0, 0, 0, 0) 31%);
  }
}

/* page content always paints above the stage */
.home--holo { position: relative; z-index: 1; }
.home--holo > section { position: relative; }

/* -------------------------------------------------- static fallback (no WebGL) */
.holo-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  pointer-events: none;
}
.holo-stage--fallback .holo-fallback { display: grid; }
.holo-stage--fallback canvas { display: none; }
.holo-fallback img {
  width: min(40vw, 560px);
  max-height: 86vh;
  object-fit: contain;
  margin-left: 40vw;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
  transition: transform 240ms linear;
}

/* --------------------------------------------------------------- HUD label */
.holo-hud {
  position: absolute;
  right: clamp(1rem, 2.6vw, 2.2rem);
  bottom: clamp(0.85rem, 2.4vw, 1.6rem);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.38rem 0.66rem;
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  background: rgba(5, 7, 12, 0.55);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  opacity: 0;
  transition: opacity 700ms var(--ease-out, ease) 400ms;
}
[data-theme="light"] .holo-hud { background: rgba(255, 255, 255, 0.72); color: var(--text-soft); }
.holo-stage--ready .holo-hud,
.holo-stage--fallback .holo-hud { opacity: 1; }
.holo-hud__dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan, #22e4ff);
  animation: holoDot 2.8s ease-out infinite;
}
@keyframes holoDot {
  0% { box-shadow: 0 0 0 0 rgba(34, 228, 255, 0.55); }
  70%, 100% { box-shadow: 0 0 0 7px rgba(34, 228, 255, 0); }
}

/* --------------------------------------------------------------------- hero */
.hero--holo { min-height: min(900px, 100svh); display: flex; align-items: center; }
.hero--holo .hero-grid {
  grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}
.hero--holo .hero-copy { max-width: 36rem; }

/* the reserved right column: empty runway for the render, chips docked to its
   top-right and bottom-right corners so nothing crosses the copy */
.hero-stage-slot {
  position: relative;
  align-self: stretch;
  min-height: min(600px, 68vh);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem;
}
.hero-stage-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-end;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  padding: 0.4rem 0.65rem;
  border-radius: var(--r-pill);
  background: rgba(9, 13, 22, 0.78);
  border: 1px solid var(--line-strong);
  color: var(--text-soft);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-md);
  white-space: nowrap;
}
[data-theme="light"] .hero-stage-chip { background: rgba(255, 255, 255, 0.85); }

/* soft scrim behind the hero copy so the render can never reduce contrast */
.hero--holo::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(56% 64% at 26% 48%, rgba(5, 7, 12, 0.94), rgba(5, 7, 12, 0.62) 58%, rgba(5, 7, 12, 0) 80%);
}
[data-theme="light"] .hero--holo::before {
  background: radial-gradient(56% 64% at 26% 48%, rgba(245, 247, 251, 0.96), rgba(245, 247, 251, 0.66) 60%, rgba(245, 247, 251, 0) 82%);
}

/* Sections paint above the stage (the .home wrapper owns z-index 1), so the
   figure only ever reads as a ghost behind the content — no scrim rectangle is
   needed, which means no visible seams between sections. */

/* --------------------------------------------------------- console strip */
.console-strip {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.console-strip .terminal { grid-column: 1 / 2; max-width: 560px; }
.console-strip::after {
  content: '';
  grid-column: 2 / 3;
  height: 1px;
}
.terminal--strip .terminal-body { min-height: 190px; max-height: 240px; overflow: hidden; }

/* --------------------------------------------------------------------- tablet */
@media (max-width: 1199.98px) {
  .console-strip { grid-template-columns: 1fr; }
  .console-strip::after { display: none; }
  .console-strip .terminal { max-width: 100%; }
}
@media (max-width: 991.98px) {
  .hero--holo { min-height: auto; padding-bottom: clamp(2rem, 8vw, 4rem); }
  .hero--holo .hero-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .hero--holo .hero-copy { max-width: none; }
  .hero-stage-slot {
    min-height: 0;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 0.5rem;
  }
  .hero-stage-chip { align-self: flex-start; }
  .hero--holo::before {
    background: radial-gradient(88% 58% at 50% 26%, rgba(5, 7, 12, 0.78), rgba(5, 7, 12, 0.92) 74%);
  }
  [data-theme="light"] .hero--holo::before {
    background: radial-gradient(88% 58% at 50% 26%, rgba(245, 247, 251, 0.84), rgba(245, 247, 251, 0.95) 76%);
  }
  .holo-fallback img { width: min(74vw, 420px); margin-left: 0; opacity: 0.9; }
  .holo-hud, .holo-hud__label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .holo-stage canvas { transition: none; }
  .holo-hud__dot { animation: none; }
}

@media print { .holo-stage { display: none; } }

/* The WebGL figure is fixed behind the page, so its grid placeholder should not
   stretch the hero copy or push the stats below the fold. */
@media (min-width: 992px) {
  .hero--holo { min-height: min(820px, 100svh); align-items: center; }
  .hero--holo .hero-stage-slot { min-height: 0; }
  .hero--holo .hero-grid > div:first-child { align-self: center; }
  .hero--holo .hero-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: clamp(0.75rem, 1.8vw, 1.5rem); }
  .hero--holo .hero-stat { min-width: 0; }
  .hero--holo .hero-stat .l { max-width: 18ch; line-height: 1.45; }
}
@media (min-width: 992px) {
  .hero--holo .hero-stage-slot { position: absolute; inset: 0 0 0 50%; pointer-events: none; }
}
