/* Home page hero (task 03): PCB animation stage + headline under it. Tokens come from base.css. */

.hero {
  position: relative;
  padding: clamp(8px, 2.5vw, 32px) 0 clamp(40px, 6vw, 72px);
  text-align: center;
  overflow: hidden;
}

/* ---------- stage: canvas when JS runs, static SVG S otherwise */
.hero-stage {
  position: relative;
  height: clamp(320px, 56vh, 620px);
  height: clamp(320px, 56svh, 620px);
  max-width: 1480px;
  margin: 0 auto;
}
.hero-stage::before {
  /* drill grid of a bare board: the no-JS background */
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(11, 37, 69, .14) 1px, transparent 1.4px);
  background-size: 26px 26px;
  background-position: center;
  -webkit-mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 30%, transparent 78%);
  mask-image: radial-gradient(ellipse 60% 62% at 50% 50%, #000 30%, transparent 78%);
  transition: opacity .6s var(--ease);
}
.hero-fallback {
  position: absolute; left: 50%; top: 50%;
  height: 72%; width: auto; max-width: 86%;
  transform: translate(-50%, -50%);
  transition: opacity .6s var(--ease);
}
.hero-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: 0;
  transition: opacity .6s var(--ease);
  touch-action: pan-y;
  -webkit-mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 52%, transparent 100%);
  mask-image: radial-gradient(ellipse 72% 70% at 50% 50%, #000 52%, transparent 100%);
}
.hero.is-live .hero-canvas { opacity: 1; }
.hero.is-live .hero-fallback,
.hero.is-live .hero-stage::before { opacity: 0; }

/* ---------- copy */
.hero-copy { position: relative; margin-top: clamp(-8px, -1vw, 0px); }
.hero-eyebrow {
  margin: 0 0 10px;
  font-size: clamp(17px, 1.8vw, 21px);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--blue);
  background: linear-gradient(90deg, var(--blue), var(--teal));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}
.hero-title {
  margin: 0 auto 16px;
  max-width: 14em;
  font-size: clamp(38px, 6.4vw, 76px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -.035em;
  color: var(--text);
}
.hero-lead {
  margin: 0 auto 28px;
  max-width: 34em;
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.38;
  color: var(--text-2);
}
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin: 0; }
.hero-cta { min-height: 48px; padding: 12px 28px; font-size: 17px; }

/* the copy rises in while the board routes itself */
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.hero-copy > * { animation: hero-rise .9s var(--ease) both; }
.hero-copy > :nth-child(1) { animation-delay: .25s; }
.hero-copy > :nth-child(2) { animation-delay: .4s; }
.hero-copy > :nth-child(3) { animation-delay: .55s; }
.hero-copy > :nth-child(4) { animation-delay: .7s; }

@media (max-width: 767px) {
  .hero-stage { height: clamp(320px, 54vh, 480px); height: clamp(320px, 54svh, 480px); }
  .hero-stage::before { background-size: 22px 22px; }
  .hero-fallback { height: 60%; }
  .hero-lead { margin-bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-copy > * { animation: none; }
  .hero-canvas, .hero-fallback, .hero-stage::before { transition: none; }
}
