/* Succession Radar: homepage radar sweep and entrance.
   Load after site.css. Content is fully visible without JavaScript;
   the entrance is CSS-only, so nothing waits on a script to appear.
   Colour, type and radius come from tokens.css, with no fallback values:
   every page loads tokens.css first, and a literal here fails
   tests/test_brand_rules.py. */
.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}
.hero > .hero__grid { position: relative; z-index: 1; }
.radar-field {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%;
  pointer-events: none;
}
.hero .motion-toggle {
  position: absolute; z-index: 2;
  top: 12px;
  right: max(16px, calc((100% - var(--container-max)) / 2 + 20px));
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 6px 10px;
  font-family: var(--font-body);
  font-size: var(--size-caption);
  font-weight: var(--weight-medium);
  line-height: 1;
  color: var(--text-muted);
  background: var(--surface-page);
  border: var(--border-width) solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.hero .motion-toggle:hover { color: var(--text-heading); border-color: var(--border-default); }
.hero .motion-toggle:focus-visible { outline: var(--focus-ring-width) solid var(--border-focus); outline-offset: var(--focus-ring-offset); }
.hero .motion-toggle svg { width: 12px; height: 12px; }
.hero .motion-toggle .play-icon { display: none; }
.hero .motion-toggle[aria-pressed="true"] .play-icon { display: block; }
.hero .motion-toggle[aria-pressed="true"] .pause-icon { display: none; }
.hero .motion-toggle[hidden] { display: none; }

@media (prefers-reduced-motion: no-preference) {
  .hero .hero__copy > .eyebrow { animation: sr-arrive .75s cubic-bezier(.16,1,.3,1) both; }
  .hero .hero__title { animation: sr-headline 1.2s cubic-bezier(.16,1,.3,1) .08s both; }
  .hero .hero__lead { animation: sr-arrive 1s cubic-bezier(.16,1,.3,1) .26s both; }
  .hero .hero__actions { animation: sr-arrive 1s cubic-bezier(.16,1,.3,1) .34s both; }
  .hero .hero__note { animation: sr-arrive 1s cubic-bezier(.16,1,.3,1) .42s both; }
  .hero .record { animation: sr-record 1.35s cubic-bezier(.16,1,.3,1) .16s both; }
  .hero .record-dots { animation: sr-arrive 1s cubic-bezier(.16,1,.3,1) .7s both; }
  .hero .motion-toggle { animation: sr-fade .8s ease 1.2s both; }

  /* The logo's sweep comes round once and settles in its gap; the signal blip lands last. */
  .site-header .lockup__mark .lockup__rings { animation: sr-fade .5s ease both; }
  .site-header .lockup__mark .lockup__sweep {
    transform-box: view-box; transform-origin: 50% 50%;
    animation: sr-logo-sweep 1.15s cubic-bezier(.25,.8,.25,1) .05s both;
  }
  .site-header .lockup__mark .lockup__contact { transform-box: fill-box; transform-origin: center; animation: sr-logo-pop .35s cubic-bezier(.34,1.56,.64,1) .3s both; }
  .site-header .lockup__mark .lockup__blip { transform-box: fill-box; transform-origin: center; animation: sr-logo-pop .45s cubic-bezier(.34,1.56,.64,1) 1s both; }
  .site-header .lockup__wordmark { animation: sr-fade .7s ease .12s both; }

  .hero.motion-paused *, .hero.motion-paused *::before { animation: none !important; }
}
@keyframes sr-arrive {
  from { opacity: .12; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes sr-headline {
  from { opacity: .1; transform: translateY(26px); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}
@keyframes sr-record {
  from { opacity: .1; transform: translateY(26px) scale(.985); }
  to { opacity: 1; transform: none; }
}
@keyframes sr-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes sr-logo-sweep { from { transform: rotate(-330deg); } to { transform: none; } }
@keyframes sr-logo-pop { from { transform: scale(0); } to { transform: none; } }

@media (max-width: 900px) {
  .hero .motion-toggle { top: 6px; }
}
@media (forced-colors: active) {
  .radar-field, .hero .motion-toggle { display: none; }
}
@media print {
  .radar-field, .hero .motion-toggle { display: none; }
}
