/* ============================================================
   hero.css — پردهٔ اول: تایپ توخالی، بوم ذرات، شیشه‌های شناور
   ============================================================ */

.hero {
  position: relative;
  min-height: 100svh;
  padding-block-start: 118px;
  overflow: clip;
  isolation: isolate;
}

/* ---- backdrop layers ---- */
.hero__canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  opacity: 0.7;
  pointer-events: none;
}

.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 38%, #000 0%, transparent 78%);
  opacity: 0.55;
}

.hero__halo {
  position: absolute;
  z-index: -1;
  width: 640px;
  height: 640px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(198,255,61,.20), rgba(198,255,61,.05) 42%, transparent 68%);
  filter: blur(20px);
  pointer-events: none;
}

/* ---- layout ---- */
.hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding-block-end: clamp(3rem, 7vw, 6rem);
}

.hero__copy { position: relative; z-index: 3; }

.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-block-end: 26px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.hero__eyebrow b { color: var(--volt); font-weight: 800; }
.hero__eyebrow .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--volt);
  box-shadow: 0 0 10px var(--volt);
}

.hero__title {
  font-size: var(--fs-hero);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-block-end: 24px;
}
.hero__title .line { display: block; }
.hero__title .line--2 {
  color: var(--ink);
  font-size: 0.34em;
  line-height: 1.55;
  font-weight: 800;
  letter-spacing: -0.005em;
  margin-block-start: 14px;
  color: var(--muted);
}
.hero__title .line--2 em {
  font-style: normal;
  color: var(--ink);
  position: relative;
  white-space: nowrap;
}
.hero__title .line--2 em::after {
  content: "";
  position: absolute;
  inset-inline: -2px;
  inset-block-end: 4px;
  height: 8px;
  background: var(--volt);
  opacity: 0.28;
  border-radius: 3px;
  z-index: -1;
}

/* hollow → fill (scroll driven by fx/hollow.js) */
.fx-fill {
  --fill: 100%;
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(242, 246, 241, 0.34);
  background-image: linear-gradient(
    to left,
    var(--volt) 0%,
    var(--volt) var(--fill),
    rgba(255, 255, 255, 0.05) var(--fill),
    rgba(255, 255, 255, 0.05) 100%
  );
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 0 26px rgba(198, 255, 61, 0.16));
}

.hero__lead {
  max-width: 52ch;
  margin-block-end: 30px;
}

.hero__cta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-block-end: 34px;
}

.hero__meta {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  color: var(--dim);
  font-size: var(--fs-xs);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero__meta i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--volt);
  opacity: 0.75;
}

/* ---- stage ---- */
.hero__stage {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  min-height: 640px;
  perspective: 1200px;
}
.hero__stage .hero__halo {
  inset-block-start: 50%;
  inset-inline-start: 50%;
  transform: translate(50%, -50%);
}

/* ---- floating glass stat cards ---- */
.glass-stat {
  position: absolute;
  z-index: 4;
  width: 176px;
  padding: 14px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(155deg, rgba(255,255,255,.085), rgba(255,255,255,.025));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadow-1);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  animation: float-soft 7s var(--ease-io) infinite;
  will-change: transform;
}
.glass-stat__label {
  font-size: 0.68rem;
  color: var(--dim);
  letter-spacing: 0.04em;
  margin-block-end: 6px;
}
.glass-stat__value {
  font-size: 1.45rem;
  font-weight: 900;
  line-height: 1.2;
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.glass-stat__value small { font-size: 0.7rem; font-weight: 600; color: var(--muted); }
.glass-stat__spark { margin-block-start: 10px; height: 26px; }
.glass-stat__spark svg { width: 100%; height: 100%; overflow: visible; }

.glass-stat--1 { inset-block-start: 5%; inset-inline-end: -13%; }
.glass-stat--2 { inset-block-end: 6%; inset-inline-start: -12%; animation-delay: -2.6s; }

@keyframes float-soft {
  0%, 100% { transform: translateY(0) rotate(-0.6deg); }
  50% { transform: translateY(-12px) rotate(0.6deg); }
}

/* ---- vertical rail ---- */
.hero__rail {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  writing-mode: vertical-rl;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.48em;
  color: rgba(255,255,255,.22);
  text-transform: uppercase;
  pointer-events: none;
}

/* ---- scroll cue ---- */
.hero__cue {
  position: absolute;
  inset-block-end: 96px;
  inset-inline-start: 50%;
  transform: translateX(50%);
  display: grid;
  place-items: center;
  gap: 8px;
  color: var(--dim);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  z-index: 3;
}
.hero__cue i {
  width: 1px;
  height: 42px;
  background: linear-gradient(to bottom, var(--volt), transparent);
  animation: cue-drop 2.4s var(--ease-io) infinite;
}
@keyframes cue-drop {
  0% { transform: scaleY(0); transform-origin: top; opacity: 0; }
  35% { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1); transform-origin: bottom; opacity: 0; }
}

/* ---- marquee ---- */
.marquee {
  position: relative;
  z-index: 3;
  display: flex;
  overflow: hidden;
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,.015);
  user-select: none;
}
.marquee__track {
  display: flex;
  align-items: center;
  gap: 34px;
  padding-block: 18px;
  padding-inline-end: 34px;
  white-space: nowrap;
  animation: marquee-rtl 34s linear infinite;
  will-change: transform;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__track span {
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  font-weight: 900;
  letter-spacing: -0.01em;
  color: rgba(255,255,255,.26);
}
.marquee__track span:nth-child(4n+1) { color: var(--volt); }
.marquee__track i {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--volt);
  opacity: .5;
  flex: none;
}
@keyframes marquee-rtl {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* ---- responsive ---- */
@media (max-width: 1080px) {
  .hero { min-height: auto; }
  .hero__inner { grid-template-columns: 1fr; gap: 1rem; }
  .hero__copy { text-align: center; }
  .hero__eyebrow, .hero__cta, .hero__meta { justify-content: center; }
  .hero__lead { margin-inline: auto; }
  .hero__stage { min-height: 600px; margin-block-start: 10px; }
  .hero__rail, .hero__cue { display: none; }
  .glass-stat--1 { inset-inline-end: 2%; }
  .glass-stat--2 { inset-inline-start: 2%; }
}

@media (max-width: 700px) {
  .glass-stat { display: none; }
}

@media (max-width: 640px) {
  .hero { padding-block-start: 92px; }
  .hero__title { letter-spacing: -0.02em; }
  .hero__title .line--2 { font-size: 0.42em; }
  .hero__stage { min-height: 540px; transform: scale(0.9); transform-origin: top center; margin-block-end: -50px; }
  .marquee__track { gap: 22px; padding-block: 14px; }
}
