/* ============================================================
   home-intro.css — fullscreen intro overlay (once per session)
   ============================================================ */

.hx-intro {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background:
    radial-gradient(ellipse at 50% 40%, rgba(77, 139, 255, 0.18), transparent 60%),
    radial-gradient(ellipse at 80% 80%, rgba(157, 123, 255, 0.14), transparent 60%),
    #050b1a;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  opacity: 1;
  transition: opacity 0.45s cubic-bezier(.4,0,.2,1), transform 0.45s cubic-bezier(.4,0,.2,1);
}
.hx-intro.is-out {
  opacity: 0;
  transform: translateY(-12px) scale(1.01);
  pointer-events: none;
}
.hx-intro.is-gone { display: none; }

/* lock scroll while intro visible */
.hx-intro-lock { overflow: hidden; }

/* ---------- grid backdrop ---------- */
.hx-intro-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(76, 201, 240, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(76, 201, 240, 0.08) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse at center, #000 0%, #000 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, #000 0%, #000 40%, transparent 80%);
  animation: hxIntroGrid 8s linear infinite;
}
@keyframes hxIntroGrid {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 60px 60px, 60px 60px; }
}

/* ---------- sonar rings ---------- */
.hx-intro-sonar {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
}
.hx-intro-sonar span {
  position: absolute;
  left: 50%; top: 50%;
  width: 100px; height: 100px;
  margin: -50px 0 0 -50px;
  border: 1.5px solid rgba(76, 201, 240, 0.55);
  border-radius: 50%;
  opacity: 0;
  animation: hxSonar 3s ease-out infinite;
}
.hx-intro-sonar span:nth-child(2) { animation-delay: 0.75s; border-color: rgba(157, 123, 255, 0.5); }
.hx-intro-sonar span:nth-child(3) { animation-delay: 1.5s;  border-color: rgba(74, 214, 196, 0.5); }
.hx-intro-sonar span:nth-child(4) { animation-delay: 2.25s; border-color: rgba(76, 201, 240, 0.5); }
@keyframes hxSonar {
  0%   { transform: scale(0.3); opacity: 0.9; }
  100% { transform: scale(9); opacity: 0; }
}

/* ---------- waveform ring ---------- */
.hx-intro-wave {
  position: relative;
  width: min(72vmin, 620px);
  height: min(72vmin, 620px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hx-intro-wave svg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  overflow: visible;
}
.hx-intro-ring {
  fill: none;
  stroke-width: 1.2;
  transform-origin: center;
  transform-box: fill-box;
}
.hx-intro-ring-1 { stroke: rgba(76, 201, 240, 0.7); stroke-dasharray: 3 8; animation: hxRotate 22s linear infinite; }
.hx-intro-ring-2 { stroke: rgba(157, 123, 255, 0.6); stroke-dasharray: 1 4; animation: hxRotate 16s linear infinite reverse; }
.hx-intro-ring-3 { stroke: rgba(74, 214, 196, 0.55); stroke-dasharray: 12 6; animation: hxRotate 32s linear infinite; }
@keyframes hxRotate { to { transform: rotate(360deg); } }

/* radial spectrum bars */
.hx-intro-bars {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
}
.hx-intro-bars i {
  position: absolute;
  left: 0; top: 0;
  width: 2px;
  height: 28px;
  margin-left: -1px;
  background: linear-gradient(to top, transparent, #4cc9f0, #9d7bff);
  border-radius: 2px;
  transform-origin: 0 0;
  animation: hxBarPulse 1.2s ease-in-out infinite;
  filter: drop-shadow(0 0 4px #4cc9f0);
}
@keyframes hxBarPulse {
  0%, 100% { height: 14px; opacity: 0.45; }
  50%      { height: 56px; opacity: 1; }
}

/* ---------- center title ---------- */
.hx-intro-center {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #eaf1ff;
  font-family: 'Space Grotesk', system-ui, sans-serif;
}
.hx-intro-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.25em;
  color: #4cc9f0;
  padding: 6px 14px;
  border: 1px solid rgba(76, 201, 240, 0.4);
  border-radius: 999px;
  margin-bottom: 28px;
  opacity: 0;
  animation: hxFadeUp 0.7s cubic-bezier(.2,.8,.2,1) 0.2s forwards;
  background: rgba(76, 201, 240, 0.05);
  backdrop-filter: blur(8px);
}
.hx-intro-tag::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #4cc9f0;
  box-shadow: 0 0 10px #4cc9f0;
  animation: hxBlinkDot 1.4s ease-in-out infinite;
}
@keyframes hxBlinkDot { 0%,100% { opacity: 1; } 50% { opacity: 0.3; } }

.hx-intro-title {
  font-size: clamp(36px, 6.4vw, 88px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.05;
  margin: 0 0 18px;
  background: linear-gradient(120deg, #eaf1ff 20%, #4cc9f0 50%, #9d7bff 80%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hxShimmer 4s linear infinite;
}
@keyframes hxShimmer {
  to { background-position: 200% 0; }
}
.hx-intro-title span {
  display: inline-block;
  opacity: 0;
  transform: translateY(24px);
  animation: hxFadeUp 0.7s cubic-bezier(.2,.8,.2,1) forwards;
}
.hx-intro-title em {
  font-style: italic;
  font-weight: 500;
  color: #4cc9f0;
  -webkit-text-fill-color: #4cc9f0;
}

.hx-intro-sub {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.18em;
  color: rgba(220, 230, 250, 0.6);
  margin: 0;
  opacity: 0;
  animation: hxFadeUp 0.7s cubic-bezier(.2,.8,.2,1) 1.4s forwards;
}
.hx-intro-sub b { color: #4ad6c4; font-weight: 600; }

@keyframes hxFadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- pipeline mini-flow under title ---------- */
.hx-intro-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 36px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: rgba(220, 230, 250, 0.55);
  opacity: 0;
  animation: hxFadeUp 0.7s cubic-bezier(.2,.8,.2,1) 1.8s forwards;
}
.hx-intro-flow b {
  color: #eaf1ff;
  font-weight: 600;
  padding: 5px 10px;
  border: 1px solid rgba(76, 201, 240, 0.3);
  border-radius: 4px;
  background: rgba(76, 201, 240, 0.06);
}
.hx-intro-flow i {
  font-style: normal;
  color: #4cc9f0;
  animation: hxArrow 1.6s ease-in-out infinite;
}
@keyframes hxArrow {
  0%, 100% { opacity: 0.3; transform: translateX(0); }
  50%      { opacity: 1;   transform: translateX(4px); }
}

/* ---------- scroll hint ---------- */
.hx-intro-hint {
  position: absolute;
  left: 50%;
  bottom: 42px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.3em;
  color: rgba(220, 230, 250, 0.55);
  opacity: 0;
  animation: hxFadeUp 0.7s ease 2.6s forwards;
  cursor: pointer;
}
.hx-intro-hint:hover { color: #4cc9f0; }
.hx-intro-hint svg {
  width: 22px; height: 32px;
  animation: hxBounce 1.8s ease-in-out infinite;
}
@keyframes hxBounce {
  0%, 100% { transform: translateY(0); opacity: 0.7; }
  50%      { transform: translateY(6px); opacity: 1; }
}

/* ---------- floating particles ---------- */
.hx-intro-particles {
  position: absolute; inset: 0;
  pointer-events: none;
}
.hx-intro-particles i {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: #4cc9f0;
  box-shadow: 0 0 8px #4cc9f0;
  opacity: 0;
  animation: hxParticle 6s linear infinite;
}
@keyframes hxParticle {
  0%   { opacity: 0; transform: translateY(20px) scale(0.5); }
  20%  { opacity: 0.8; }
  100% { opacity: 0; transform: translateY(-120vh) scale(1.2); }
}

/* corner brackets */
.hx-intro-corner {
  position: absolute;
  width: 36px; height: 36px;
  border: 1.5px solid rgba(76, 201, 240, 0.6);
}
.hx-intro-corner-tl { top: 24px; left: 24px; border-right: none; border-bottom: none; }
.hx-intro-corner-tr { top: 24px; right: 24px; border-left: none; border-bottom: none; }
.hx-intro-corner-bl { bottom: 24px; left: 24px; border-right: none; border-top: none; }
.hx-intro-corner-br { bottom: 24px; right: 24px; border-left: none; border-top: none; }

/* corner tags */
.hx-intro-meta {
  position: absolute;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: rgba(220, 230, 250, 0.5);
  opacity: 0;
  animation: hxFadeUp 0.7s ease 0.4s forwards;
}
.hx-intro-meta-tl { top: 36px; left: 76px; }
.hx-intro-meta-tr { top: 36px; right: 76px; }
.hx-intro-meta-bl { bottom: 36px; left: 76px; color: #4cc9f0; }
.hx-intro-meta-br { bottom: 36px; right: 76px; }

@media (max-width: 640px) {
  .hx-intro-meta-tl, .hx-intro-meta-tr,
  .hx-intro-meta-bl, .hx-intro-meta-br { display: none; }
  .hx-intro-wave { width: min(86vw, 330px); height: min(86vw, 330px); }
  .hx-intro-tag { max-width: calc(100vw - 48px); }
  .hx-intro-corner { width: 22px; height: 22px; }
  .hx-intro-flow { font-size: 9px; gap: 8px; flex-wrap: wrap; }
  .hx-intro-hint { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hx-intro-grid,
  .hx-intro-sonar span,
  .hx-intro-ring-1, .hx-intro-ring-2, .hx-intro-ring-3,
  .hx-intro-bars i,
  .hx-intro-title, .hx-intro-particles i,
  .hx-intro-flow i, .hx-intro-hint svg { animation: none; }
  .hx-intro-tag, .hx-intro-title span, .hx-intro-sub,
  .hx-intro-flow, .hx-intro-hint, .hx-intro-meta { opacity: 1; transform: none; }
}
