/*
 * Hero live-demo (3 self-running tabs) — Blackglass Outbound Stack handoff iteration 3.
 * Keyframes are namespaced `hd-*` so they never collide with blackglass.css.
 * All structural styling is set inline by hero-demo.js to match the handoff verbatim;
 * this file owns only the @keyframes (which cannot be inlined) plus a few responsive rules.
 */

/* typewriter carets + search placeholder (kept as classes so per-frame innerHTML stays CSP-safe) */
.hd-caret11,
.hd-caret13,
.hd-caret15 {
  display: inline-block;
  width: 2px;
  background: #7fe6c6;
  vertical-align: -1px;
  animation: hd-blink 1s step-end infinite;
}
.hd-caret11 {
  height: 11px;
}
.hd-caret13 {
  height: 13px;
}
.hd-caret15 {
  height: 15px;
}
.hd-ph {
  color: #6f7888;
}
.hd-sub b {
  color: #dfe3ea;
  font-weight: 600;
}

/* shared */
@keyframes hd-sceneIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes hd-blink {
  0%,
  49% {
    opacity: 1;
  }
  50%,
  100% {
    opacity: 0;
  }
}
@keyframes hd-clickRing {
  0% {
    transform: scale(0.25);
    opacity: 0.85;
  }
  100% {
    transform: scale(1.9);
    opacity: 0;
  }
}
@keyframes hd-spin360 {
  to {
    transform: rotate(360deg);
  }
}
@keyframes hd-pulseDot {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}
@keyframes hd-floatY {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}

/* scan scene */
@keyframes hd-titleGlow {
  0%,
  100% {
    text-shadow: 0 0 10px rgba(127, 230, 198, 0.25);
  }
  50% {
    text-shadow: 0 0 22px rgba(127, 230, 198, 0.6), 0 0 40px rgba(2, 183, 140, 0.35);
  }
}
@keyframes hd-ahum {
  0%,
  100% {
    opacity: 0.32;
    transform: translate(-50%, -50%) scale(0.9);
  }
  50% {
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.25);
  }
}

/* contacts scene — pac-man + belt */
@keyframes hd-beltLeft {
  to {
    background-position: -30px 0;
  }
}
@keyframes hd-pacTop {
  0%,
  100% {
    transform: rotate(-34deg);
  }
  50% {
    transform: rotate(0deg);
  }
}
@keyframes hd-pacBot {
  0%,
  100% {
    transform: rotate(34deg);
  }
  50% {
    transform: rotate(0deg);
  }
}
@keyframes hd-winkSpark {
  0% {
    transform: scale(0) rotate(0);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: scale(1.3) rotate(40deg);
    opacity: 0;
  }
}
@keyframes hd-heartUp {
  0% {
    transform: translateY(0) scale(0.4) rotate(-10deg);
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  100% {
    transform: translateY(-80px) scale(1) rotate(10deg);
    opacity: 0;
  }
}
@keyframes hd-premiumSheen {
  0%,
  100% {
    background-position: 0% center;
  }
  50% {
    background-position: 100% center;
  }
}

/* contacts scene — "no skills" confetti (near sparks sp0..11, far sparks spf0..11) */
@keyframes hd-sp0 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(86px, 2px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp1 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(72px, 44px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp2 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(42px, 72px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp3 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(2px, 84px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp4 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(-42px, 72px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp5 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(-72px, 44px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp6 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(-86px, 2px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp7 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(-72px, -42px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp8 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(-42px, -70px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp9 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(2px, -82px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp10 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(44px, -70px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-sp11 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    transform: translate(72px, -42px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-spf0 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(140px, 4px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf1 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(121px, 70px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf2 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(70px, 121px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf3 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(4px, 140px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf4 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(-70px, 121px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf5 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(-121px, 70px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf6 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(-140px, 4px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf7 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(-121px, -70px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf8 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(-70px, -121px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf9 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(4px, -140px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf10 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(70px, -121px) scale(1.1);
    opacity: 0;
  }
}
@keyframes hd-spf11 {
  0% {
    transform: translate(0, 0) scale(0.2);
    opacity: 0;
  }
  14% {
    opacity: 1;
  }
  100% {
    transform: translate(121px, -70px) scale(1.1);
    opacity: 0;
  }
}

/* gold number flash on the contacts subline */
@keyframes hd-goldPop {
  0% {
    opacity: 0;
  }
  16% {
    opacity: 1;
  }
  68% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@keyframes hd-glitter {
  0% {
    transform: translateY(3px) scale(0.3);
    opacity: 0;
  }
  30% {
    opacity: 1;
  }
  100% {
    transform: translateY(-15px) scale(1);
    opacity: 0;
  }
}
@keyframes hd-goldStar {
  0% {
    transform: scale(0) rotate(-30deg);
    opacity: 0;
  }
  35% {
    transform: scale(1.15) rotate(10deg);
    opacity: 1;
  }
  100% {
    transform: scale(0.6) rotate(40deg);
    opacity: 0;
  }
}

/* ---- hero layout ---- */
.hd-hero {
  max-width: 1140px;
  margin: 0 auto;
  padding: 54px 32px 0;
}
.hd-hero-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.hd-h1 {
  font: 600 64px / 1.0 "Space Grotesk", system-ui, sans-serif;
  letter-spacing: -0.03em;
  color: #f3f5f9;
  margin: 0;
  max-width: 820px;
  text-wrap: balance;
}
.hd-sub {
  font: 400 18px / 1.6 Manrope, system-ui, sans-serif;
  color: #9aa3b0;
  margin: 20px auto 0;
  max-width: 772px;
  text-wrap: pretty;
}
/* the JS mounts .hd-demo inside #hero-demo-root, which is a flex item of the
   align-items:center hero column — it must stretch to full width or the grid's
   1fr panel collapses to the tabs' width. */
#hero-demo-root {
  width: 100%;
}
.hd-demo {
  margin: 36px auto 0;
  max-width: 980px;
  width: 100%;
  text-align: left;
  display: grid;
  grid-template-columns: 236px 1fr;
  gap: 16px;
}
.hd-demotabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.hd-tab {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 160px;
  text-align: left;
  padding: 13px 15px;
  border-radius: 13px;
  transition: all .2s;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
}
.hd-tab:focus-visible {
  outline: 2px solid #4f7bff;
  outline-offset: 2px;
}
.hd-panel {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
  box-shadow: 0 30px 70px -50px rgba(0, 0, 0, 0.9);
  min-height: 312px;
}
.hd-stage {
  position: relative;
}
/* the demo panel is content-driven (handoff: min-height 312, grows for BUILD).
   the Sending Film fills the handoff sending content area (panel 312 - caption 40 = 272). */
.hd-film-frame {
  display: block;
  width: 100%;
  height: 272px;
  border: 0;
  background: #06070b;
}

/* model strip */
.hd-modelstrip {
  position: relative;
  max-width: 1264px;
  margin: 64px auto 0;
  padding: 0 32px;
}
.hd-modelstrip::before {
  position: absolute;
  inset: -30px 9% -24px;
  z-index: -1;
  pointer-events: none;
  content: "";
  background: radial-gradient(58% 85% at 72% 50%, rgba(111, 168, 255, 0.16), transparent 66%),
    radial-gradient(52% 80% at 32% 50%, rgba(6, 212, 158, 0.12), transparent 70%);
  filter: blur(16px);
}
.hd-modelstrip-rail {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.078);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018)),
    rgba(6, 7, 11, 0.7);
  box-shadow: 0 24px 70px -48px rgba(0, 0, 0, 0.94), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.hd-modelstrip-label {
  margin-right: 3px;
  color: #737d8f;
  font: 700 9.5px "Space Grotesk", system-ui, sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  white-space: nowrap;
}
.hd-model-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(255, 255, 255, 0.03);
  font: 600 11px "IBM Plex Mono", monospace;
  color: #b8c0cc;
  white-space: nowrap;
}
.hd-model-chip > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.hd-model-plus {
  font: 600 12px "IBM Plex Mono", monospace;
  color: #5f6877;
}
.hd-model-more {
  color: #737d8f;
  font: 600 10.5px Manrope, system-ui, sans-serif;
  white-space: nowrap;
}
.hd-model-equals {
  margin: 0 3px;
  color: #7c8696;
  font: 600 17px "IBM Plex Mono", monospace;
}
.hd-model-result {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border: 1px solid rgba(79, 123, 255, 0.36);
  border-radius: 999px;
  background: linear-gradient(120deg, rgba(6, 212, 158, 0.11), rgba(157, 107, 255, 0.18)),
    rgba(79, 123, 255, 0.12);
  box-shadow: 0 0 30px -14px rgba(79, 123, 255, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  white-space: nowrap;
}

.hero-blackglass + .order-section {
  padding-top: 64px;
}

@media (max-width: 920px) {
  .hd-demo {
    grid-template-columns: 1fr;
  }
  .hd-demotabs {
    flex-direction: row;
    flex-wrap: wrap;
  }
}
@media (max-width: 680px) {
  .hd-h1 {
    font-size: 40px;
    line-height: 1.02;
  }
  .hd-hero {
    padding: 40px 20px 0;
  }
  .hd-modelstrip {
    margin-top: 44px;
    padding: 0 18px;
  }
  .hd-modelstrip-rail {
    gap: 5px;
    padding: 10px;
    border-radius: 22px;
  }
  .hd-modelstrip-label {
    width: 100%;
    margin: 0 0 2px;
    text-align: center;
  }
  .hd-model-chip {
    padding: 4px 8px;
    font-size: 10px;
  }
  .hd-model-plus,
  .hd-model-equals {
    font-size: 10px;
  }
  .hd-model-result {
    padding: 5px 11px;
  }
  .hero-blackglass + .order-section {
    padding-top: 44px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hd-hero [style*="animation"] {
    animation: none !important;
  }
}
