/* A real recorded brain signal over the existing graph, not another live HLS player. */
.hero { min-height: 440px; isolation: isolate; }
.hero .hero-inner { padding-top: 56px; padding-bottom: 56px; pointer-events: none; }
.hero-copy { position: relative; width: min(53%, 640px); pointer-events: auto; }
.hero h1 { font-size: clamp(2.4rem, 4.45vw, 3.8rem); line-height: 1.2; }
.hero .hero-body { max-width: 30em; }
.hero .hero-cta .btn { white-space: nowrap; }
.hero-motion { position: absolute; inset: 0; pointer-events: none; }
.hero-art { position: absolute; inset: 0; overflow: hidden; }
.hero-network {
  position: absolute; left: 12%; top: -10%; width: 110%; height: 120%;
  opacity: .68;
  mask-image: linear-gradient(90deg, transparent 6%, #000 48%, #000 90%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent 6%, #000 48%, #000 90%, transparent);
}
.hero-edges { fill: none; stroke: #b1b1b8; stroke-width: .85; }
.hero-node { fill: #85858e; }
.hero-node-hub { fill: var(--accent); }
.hero-signal { fill: none; stroke: var(--accent); stroke-width: 1.6; opacity: .14; }
.hero-network-drift { transform-origin: 65% 50%; animation: hero-drift 24s ease-in-out infinite alternate paused; }
.hero-signals { animation: hero-signal-group 12s ease-in-out infinite paused; }
.hero-signal { animation: hero-signal 9s ease-in-out infinite paused; animation-delay: var(--signal-delay); }
.hero-brain {
  position: absolute; width: min(50vw, 680px); aspect-ratio: 23 / 18;
  right: max(0px, calc((100vw - 1480px) / 2)); top: -30px;
  mix-blend-mode: multiply;
  mask-image: radial-gradient(ellipse 65% 57% at 50% 49%, #000 48%, transparent 91%);
  -webkit-mask-image: radial-gradient(ellipse 65% 57% at 50% 49%, #000 48%, transparent 91%);
}
.hero-brain img, .hero-brain video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hero-brain video { opacity: 0; transition: opacity .5s ease; }
.hero-motion[data-has-frame="true"] .hero-brain video { opacity: 1; }
.hero-motion[data-has-frame="true"] .hero-brain img { opacity: 0; }
.hero-copy-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, #fff 2%, rgba(255,255,255,.99) 31%, rgba(255,255,255,.8) 43%, transparent 63%),
    linear-gradient(0deg, #fff 0%, #fff 8%, transparent 26%);
}
.hero-motion-controls {
  position: absolute; bottom: 26px; right: max(28px, calc((100vw - 1264px) / 2));
  /* Decorative background stays clean; keyboard users retain a pause mechanism. */
  opacity: 0; clip-path: inset(50%); pointer-events: none;
}
.hero-motion-controls:focus-within {
  opacity: 1; clip-path: none; pointer-events: auto;
}
.hero-motion-toggle {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; min-width: 122px; padding: 8px 12px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
  color: var(--text-dim); font: inherit; font-size: 12px; cursor: pointer;
  transition: border-color .15s, color .15s, transform .15s;
}
.hero-motion-toggle[hidden] { display: none; }
.hero-motion-toggle:hover { border-color: var(--accent); color: var(--accent); }
.hero-motion-toggle:active { transform: scale(.98); }
.hero-motion-toggle:disabled { cursor: default; color: var(--text-dim); }
.hero-motion-toggle:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 4px;
}
.hero-motion[data-motion="running"] .hero-network-drift,
.hero-motion[data-motion="running"] .hero-signals,
.hero-motion[data-motion="running"] .hero-signal { animation-play-state: running; }
@keyframes hero-drift { from { transform: translate(0, 0); } to { transform: translate(-10px, 5px); } }
@keyframes hero-signal-group { 0%, 100% { opacity: .75; } 50% { opacity: 1; } }
@keyframes hero-signal { 0%, 65%, 100% { opacity: .07; } 32% { opacity: .75; } }
@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero .hero-inner { padding: 40px 24px 310px; }
  .hero-copy { width: 100%; max-width: 680px; }
  .hero h1 { font-size: clamp(2.1rem, 5.8vw, 3.4rem); margin-bottom: 20px; }
  .hero .hero-body { margin-bottom: 25px; max-width: 36em; }
  .hero-network { top: auto; bottom: 35px; left: -15%; width: 130%; height: 290px; }
  .hero-brain { width: 390px; max-width: 100%; height: 265px; top: auto; right: calc(50% - 195px); bottom: 43px; }
  .hero-copy-scrim { background: linear-gradient(0deg, #fff, transparent 16%, transparent 40%, #fff 55%); }
  .hero-motion-controls { bottom: 14px; left: 24px; right: 24px; margin: auto; width: fit-content; }
}
@media (max-width: 640px) {
  .hero .hero-inner { padding: 32px 20px 285px; }
  .hero h1 { font-size: clamp(1.9rem, 7.2vw, 2.8rem); letter-spacing: -.045em; }
  .hero .hero-body { font-size: 14px; line-height: 1.8; }
  .hero .hero-cta { gap: 9px; }
  .hero .hero-cta .btn { padding: 12px 14px; font-size: 12px; }
  .hero-brain { width: 100%; max-width: 390px; right: max(0px, calc(50% - 195px)); height: 250px; bottom: 35px; }
  .hero-network { height: 270px; bottom: 15px; opacity: .6; }
  .hero-motion-controls { left: 16px; right: 16px; }
  .hero-motion-toggle { font-size: 11px; min-width: 110px; padding: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-network-drift, .hero-signals, .hero-signal { animation: none; animation-play-state: paused; }
  .hero-brain video, .hero-motion-toggle { transition: none; }
}
