@property --glow {
  syntax: "<color>";
  inherits: true;
  initial-value: #2bff88;
}

@property --wave-r {
  syntax: "<percentage>";
  inherits: false;
  initial-value: 0%;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  --glow: var(--primary);
  transition: --glow 900ms var(--ease-out);
}

.cinema-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.backdrop i {
  position: absolute;
  width: 70vmax;
  height: 70vmax;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 16%, transparent), transparent);
  opacity: 0.45;
  will-change: transform;
}

.backdrop i:nth-of-type(1) { top: -30vmax; left: -18vmax; }
.backdrop i:nth-of-type(2) { top: 18vh; right: -34vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 11%, transparent), transparent); }
.backdrop i:nth-of-type(3) { bottom: -42vmax; left: 22vw; width: 60vmax; height: 60vmax; background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 8%, transparent), transparent); }

.accent-wave {
  position: fixed;
  inset: 0;
  z-index: 45;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
  mix-blend-mode: screen;
  background: radial-gradient(
    circle at var(--wave-x, 50%) var(--wave-y, 32px),
    transparent calc(var(--wave-r) - 22%),
    color-mix(in srgb, var(--primary) 24%, transparent) calc(var(--wave-r) - 5%),
    color-mix(in srgb, var(--primary) 54%, #fff 24%) var(--wave-r),
    transparent calc(var(--wave-r) + 2.5%)
  );
}

.accent-wave[data-sweeping] {
  visibility: visible;
  animation: accent-shockwave 880ms cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero::after,
.section-band::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(color-mix(in srgb, var(--primary) 22%, transparent) 1px, transparent 1px) 0 0 / 100% 120px,
    linear-gradient(90deg, color-mix(in srgb, var(--primary) 22%, transparent) 1px, transparent 1px) 0 0 / 120px 100%;
  mask-image: linear-gradient(105deg, transparent 42%, #000 50%, transparent 58%);
  mask-size: 300% 100%;
  mask-position: 120% 0;
  opacity: 0;
}

.section-band::after { background-size: 100% 96px, 96px 100%; }

h1 em { text-shadow: 0 0 38px color-mix(in srgb, var(--primary) 34%, transparent); }

.brand-icon { transition: transform 380ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 260ms; }
.brand:hover .brand-icon { transform: scale(1.12) rotate(-7deg); filter: drop-shadow(0 0 12px color-mix(in srgb, var(--primary) 65%, transparent)); }

.frame-ticks::before { transition: inset 320ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 280ms; }
.frame-ticks:hover::before { inset: -9px; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--primary) 65%, transparent)); }

.frame-hero { position: relative; }

.motion #intro-video { cursor: pointer; }

.tour-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-left: auto;
}

.tour-actions .toggle { margin-left: 0; }

.tour-time {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 26px;
  padding: 0 0.55rem;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--background);
  color: var(--foreground-soft);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  white-space: nowrap;
  overflow: hidden;
}

.tour-time::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  flex: none;
  transition: background-color 180ms, box-shadow 180ms, opacity 180ms;
}

.tour-time[data-tour-state="playing"]::before {
  background: var(--primary);
  box-shadow: 0 0 8px color-mix(in srgb, var(--primary) 80%, transparent);
}

.tour-time[data-tour-state="paused"]::before { opacity: 0.55; }

.tour-rail {
  flex: 1 0 100%;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.45rem;
  padding-top: 0.55rem;
  border-top: 1px solid var(--line);
}

.tour-chapter {
  display: grid;
  align-content: start;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.3rem 0.55rem 0.36rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: none;
  color: var(--muted);
  font: 500 0.78rem/1.15 var(--font-ui);
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms, border-color 180ms, color 180ms, translate 220ms var(--ease-out);
}

.tour-chapter:hover {
  translate: 0 -1px;
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--foreground);
}

.tour-chapter[data-active] {
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line-strong));
  background: color-mix(in srgb, var(--primary) 7%, var(--card));
  color: var(--foreground);
}

.tour-chapter[data-done] { color: var(--foreground-soft); }

.tour-track {
  position: relative;
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--line-strong);
}

.tour-track i {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--primary);
  transform-origin: left;
  scale: var(--ch-p, 0) 1;
}

.tour-chapter[data-active] .tour-track i {
  box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 75%, transparent);
}

.tour-chapter[data-done] .tour-track i { opacity: 0.65; }

.tour-meta {
  display: flex;
  align-items: baseline;
  gap: 0.42rem;
  min-width: 0;
}

.tour-num {
  flex: none;
  color: var(--muted);
  font-size: 0.66rem;
  letter-spacing: 0.08em;
}

.tour-chapter[data-active] .tour-num { color: var(--primary); }

.tour-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reveal { --delay: calc(var(--stagger, 0) * 65ms); transition: opacity 680ms var(--ease-out) var(--delay), transform 680ms var(--ease-out) var(--delay); }

.motion .reveal:not(.is-visible) { opacity: 0; transform: translateY(22px) scale(0.985); }

.glow,
.callouts > div {
  position: relative;
  transition: border-color 260ms, box-shadow 300ms var(--ease-out);
}

.glow.reveal,
.callouts > div.reveal {
  transition: opacity 680ms var(--ease-out) var(--delay), transform 680ms var(--ease-out) var(--delay), border-color 260ms, box-shadow 300ms var(--ease-out);
}

.glow:hover,
.callouts > div:hover {
  border-color: color-mix(in srgb, var(--primary) 46%, var(--line-strong));
  background-image: radial-gradient(460px circle at var(--mx, 50%) var(--my, 50%), color-mix(in srgb, var(--primary) 12%, transparent), transparent 64%);
  box-shadow:
    0 24px 52px -30px color-mix(in srgb, var(--primary) 34%, transparent),
    0 14px 28px -18px rgb(0 0 0 / 70%),
    inset 0 1px 0 color-mix(in srgb, var(--primary) 26%, rgb(255 255 255 / 10%));
}

.nav-ink { transition: translate 420ms cubic-bezier(0.34, 1.4, 0.64, 1), width 400ms cubic-bezier(0.34, 1.4, 0.64, 1), opacity 200ms; }

.segmented { position: relative; }
.segmented button { position: relative; z-index: 1; }
.seg-ink {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: var(--seg-w, 0px);
  translate: var(--seg-x, 0px) 0;
  border-radius: 5px;
  background: var(--card-raised);
  box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 -2px 0 var(--primary), 0 6px 18px -8px color-mix(in srgb, var(--primary) 55%, transparent);
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: translate 400ms cubic-bezier(0.34, 1.48, 0.64, 1), width 360ms cubic-bezier(0.34, 1.48, 0.64, 1), opacity 180ms;
}
.segmented[data-seg-ready] .seg-ink { opacity: 1; }
.segmented[data-seg-ready] button[aria-selected="true"] { background: transparent; box-shadow: none; }

.btn-primary { position: relative; overflow: hidden; }
.btn-primary,
.hero-actions .btn-ghost,
.repo-url .btn {
  translate: var(--mag-x, 0px) var(--mag-y, 0px);
  transition: translate 300ms cubic-bezier(0.22, 1.4, 0.36, 1), scale 240ms cubic-bezier(0.34, 1.56, 0.64, 1), background-color 160ms, border-color 160ms, box-shadow 220ms;
}

.btn-primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 32%, rgb(255 255 255 / 50%) 50%, transparent 68%);
  translate: -115% 0;
  pointer-events: none;
}

.btn-primary:hover { box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 24%, transparent), 0 14px 36px -12px color-mix(in srgb, var(--primary) 65%, transparent); }
.btn-primary:hover::after { translate: 115% 0; transition: translate 680ms var(--ease-out); }

.btn:active { scale: 0.96; }

.dots button::before { transition: opacity 160ms, box-shadow 200ms, scale 320ms cubic-bezier(0.34, 1.65, 0.64, 1); }
.dots button:hover::before { scale: 1.2; }
.dots button[data-dot-pop]::before { animation: dot-pop 460ms cubic-bezier(0.34, 1.65, 0.64, 1); }

.swatch { transition: border-color 180ms, color 180ms, box-shadow 200ms, translate 260ms cubic-bezier(0.34, 1.56, 0.64, 1), scale 220ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.swatch:hover { translate: 0 -2px; border-color: color-mix(in srgb, var(--primary) 55%, var(--line-strong)); }
.swatch:active { scale: 0.95; }
.swatch[data-dot-pop] { animation: swatch-pop 420ms cubic-bezier(0.34, 1.56, 0.64, 1); }

.spot-reticle {
  position: absolute;
  left: var(--rx, 27.3%);
  top: var(--ry, 52.9%);
  width: var(--rw, 29.6%);
  height: var(--rh, 6.4%);
  pointer-events: none;
  z-index: 3;
  border-radius: 6px;
}

.spot-reticle i {
  position: absolute;
  width: 14px;
  height: 14px;
  border-color: var(--primary);
  border-style: solid;
  border-width: 0;
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--primary) 75%, transparent));
  transition: translate 220ms cubic-bezier(0.34, 1.56, 0.64, 1), width 220ms, height 220ms;
}

.spot-reticle i:nth-child(1) { top: -5px; left: -5px; border-top-width: 2.5px; border-left-width: 2.5px; border-top-left-radius: 4px; }
.spot-reticle i:nth-child(2) { top: -5px; right: -5px; border-top-width: 2.5px; border-right-width: 2.5px; border-top-right-radius: 4px; }
.spot-reticle i:nth-child(3) { bottom: -5px; left: -5px; border-bottom-width: 2.5px; border-left-width: 2.5px; border-bottom-left-radius: 4px; }
.spot-reticle i:nth-child(4) { bottom: -5px; right: -5px; border-bottom-width: 2.5px; border-right-width: 2.5px; border-bottom-right-radius: 4px; }

.spot-reticle[data-seeking] i:nth-child(1) { translate: -5px -5px; }
.spot-reticle[data-seeking] i:nth-child(2) { translate: 5px -5px; }
.spot-reticle[data-seeking] i:nth-child(3) { translate: -5px 5px; }
.spot-reticle[data-seeking] i:nth-child(4) { translate: 5px 5px; }

.spot-scan {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.spot-scan::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 20%, color-mix(in srgb, var(--primary) 42%, transparent) 50%, transparent 80%);
  translate: -110% 0;
  opacity: 0;
}

.spot-reticle[data-locked] .spot-scan::after {
  animation: reticle-scan 540ms var(--ease-out) forwards;
}

.loupe { position: relative; overflow: hidden; transition: border-color 260ms, box-shadow 260ms; }
.loupe::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 35%, color-mix(in srgb, var(--primary) 18%, transparent) 50%, transparent 65%);
  translate: -120% 0;
}
.loupe[data-loupe-lock] { border-color: color-mix(in srgb, var(--primary) 72%, transparent); box-shadow: 0 0 28px -10px color-mix(in srgb, var(--primary) 45%, transparent); }
.loupe[data-loupe-lock]::after { animation: loupe-sweep 520ms var(--ease-out) forwards; }

.node { position: relative; transition: border-color 260ms, box-shadow 300ms, translate 260ms var(--ease-out); }
.node[data-ping] {
  border-color: var(--packet-color, var(--primary));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--packet-color, var(--primary)) 22%, transparent), 0 0 32px -12px var(--packet-color, var(--primary));
}
.node[data-ping] .is-zero { text-shadow: 0 0 12px color-mix(in srgb, var(--primary) 70%, transparent); }

.node-server { cursor: pointer; }
.node-server[data-shimmer] {
  border-color: var(--packet-color, var(--primary));
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--packet-color, var(--primary)) 18%, transparent), 0 26px 80px -28px color-mix(in srgb, var(--packet-color, var(--primary)) 68%, transparent);
}

.vault-shield {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  pointer-events: none;
}

.vault-shield::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: linear-gradient(115deg, transparent 32%, color-mix(in srgb, var(--packet-color, var(--primary)) 34%, rgb(255 255 255 / 26%)) 50%, transparent 68%);
  translate: -125% 0;
  opacity: 0;
}

.node-server[data-shimmer] .vault-shield::before {
  animation: shield-shimmer 540ms var(--ease-out) forwards;
}

.node-facts li { transition: color 220ms, translate 220ms var(--ease-out); }
.node-facts li[data-lit] { color: var(--packet-color, var(--primary)); translate: 4px 0; }

.node-services li { padding: 0; border: 0; background: none; }

.service-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.58rem;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: var(--background-deep);
  color: var(--foreground-soft);
  font: inherit;
  cursor: pointer;
  transition: border-color 180ms, color 180ms, background-color 180ms, translate 260ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms;
}

.service-chip::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  transition: background-color 180ms, box-shadow 180ms, scale 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.service-chip:hover,
.service-chip[data-active] {
  translate: 0 -2px;
  border-color: var(--packet-color, var(--primary));
  background: color-mix(in srgb, var(--packet-color, var(--primary)) 11%, var(--background-deep));
  color: var(--foreground);
  box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--packet-color, var(--primary)) 70%, transparent);
}

.service-chip:hover::before,
.service-chip[data-active]::before {
  background: var(--packet-color, var(--primary));
  box-shadow: 0 0 8px var(--packet-color, var(--primary));
  scale: 1.3;
}

.service-chip[data-hit] { animation: chip-recoil 420ms cubic-bezier(0.34, 1.65, 0.64, 1); }

.wire-burst {
  position: absolute;
  inset: -1px auto -1px 0;
  width: 44%;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--packet-color, var(--primary)) 68%, #fff);
  box-shadow: 0 0 14px var(--packet-color, var(--primary));
  opacity: 0;
  pointer-events: none;
}

.wire-burst[data-dir="fwd"] { animation: wire-shot-fwd 290ms cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.wire-burst[data-dir="rev"] {
  background: linear-gradient(270deg, transparent, var(--packet-color, var(--primary)) 68%, #fff);
  animation: wire-shot-rev 290ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.seekbar { height: 76px; user-select: none; }

.seek-track { top: 34px; cursor: pointer; }
.seek-track::before { content: ""; position: absolute; inset: -14px 0; }

.seekbar[data-seek-live] .seek-played { scale: var(--seek-p, 0.34) 1; }
.seekbar[data-seek-live] .seek-rail { translate: calc(var(--seek-p, 0.34) * 100%) 0; }

.seek-head { transition: scale 220ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms; }
.seekbar[data-hovering] .seek-head,
.seekbar[data-dragging] .seek-head { scale: 1.32; box-shadow: 0 0 0 6px color-mix(in srgb, var(--primary) 30%, transparent); }
.seekbar[data-skipped] .seek-head { animation: head-pop 400ms cubic-bezier(0.34, 1.65, 0.64, 1); }

.seek-warp {
  position: absolute;
  top: -2px;
  bottom: -2px;
  left: var(--warp-l, 14%);
  width: var(--warp-w, 10%);
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--primary), #fff);
  box-shadow: 0 0 16px var(--primary);
  opacity: 0;
  pointer-events: none;
}

.seek-warp[data-firing] { animation: seek-warp 520ms var(--ease-out) forwards; }

.seek-tip {
  position: absolute;
  bottom: 16px;
  left: var(--tip-x, 50%);
  translate: -50% 4px;
  padding: 0.14rem 0.45rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--background-deep);
  color: var(--foreground);
  font-size: 0.64rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms, translate 180ms var(--ease-out);
}
.seekbar[data-hovering] .seek-tip,
.seekbar[data-dragging] .seek-tip { opacity: 1; translate: -50% 0; }

.seek-mark {
  top: 32px;
  padding: 0;
  border: 0;
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 200ms, scale 240ms cubic-bezier(0.34, 1.56, 0.64, 1), filter 200ms;
}
.seek-mark::after { content: ""; position: absolute; inset: -10px -4px -22px; }
.seek-mark:hover,
.seek-mark[data-lit] { opacity: 1; filter: drop-shadow(0 0 8px color-mix(in srgb, var(--amber) 55%, transparent)); }
.seek-mark b { bottom: auto; top: 16px; }

.segments[data-active-mode="hide"] .seek-mark { opacity: 0.08; }

.seek-pill {
  position: absolute;
  top: 0;
  left: var(--pill-x, 14%);
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.6rem 0.34rem;
  border: 1px solid color-mix(in srgb, var(--primary) 65%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 12%, var(--background-deep));
  color: var(--primary);
  font-size: 0.64rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  scale: 0.9;
  translate: 0 5px;
  pointer-events: none;
  box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--primary) 65%, transparent);
  transition: opacity 220ms var(--ease-out), scale 280ms cubic-bezier(0.34, 1.56, 0.64, 1), translate 280ms cubic-bezier(0.34, 1.56, 0.64, 1), left 260ms var(--ease-out), background-color 160ms;
}

.seek-pill[data-visible] {
  opacity: 1;
  scale: 1;
  translate: 0 0;
  pointer-events: auto;
}

.seek-pill:hover {
  background: var(--primary);
  color: var(--primary-foreground);
  scale: 1.05;
}

.seek-pill:active { scale: 0.95; }

.seek-pill i {
  position: absolute;
  inset: auto 9px 4px;
  height: 1.5px;
  background: currentColor;
  transform-origin: left;
  scale: var(--count, 1) 1;
}

.seek-toast {
  position: absolute;
  top: 1px;
  right: 5.75rem;
  padding: 0.18rem 0.55rem;
  border: 1px solid color-mix(in srgb, var(--primary) 55%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary) 14%, var(--background-deep));
  color: var(--primary);
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  white-space: nowrap;
  opacity: 0;
  scale: 0.88;
  translate: 0 4px;
  pointer-events: none;
  transition: opacity 200ms var(--ease-out), scale 300ms cubic-bezier(0.34, 1.56, 0.64, 1), translate 300ms cubic-bezier(0.34, 1.56, 0.64, 1);
}

.seek-toast[data-show] { opacity: 1; scale: 1; translate: 0 0; }

.seek-time {
  position: absolute;
  top: 3px;
  right: 0;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
}

.modes > div[data-skip-mode] {
  cursor: pointer;
  transition: border-color 200ms, background-color 200ms, translate 240ms cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 220ms;
}

.modes > div[data-skip-mode]:hover {
  translate: 0 -2px;
  border-color: color-mix(in srgb, var(--primary) 42%, var(--line-strong));
}

.modes > div[data-mode-active] {
  border-color: color-mix(in srgb, var(--primary) 58%, transparent);
  background: color-mix(in srgb, var(--primary) 8%, var(--background-deep));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--primary) 24%, transparent);
}

.modes > div[data-mode-active] dt { color: var(--primary); }

.chips li {
  cursor: pointer;
  transition: translate 280ms cubic-bezier(0.34, 1.65, 0.64, 1), scale 280ms cubic-bezier(0.34, 1.65, 0.64, 1), rotate 280ms cubic-bezier(0.34, 1.65, 0.64, 1), border-color 180ms, color 180ms, background-color 180ms, box-shadow 220ms;
}

.chips li[data-wave="0"] {
  translate: 0 -6px;
  scale: 1.1;
  rotate: -2deg;
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 12%, var(--background-deep));
  color: var(--primary);
  box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--primary) 60%, transparent);
}

.chips li[data-wave="1"] { translate: 0 -3px; scale: 1.04; border-color: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }
.chips li[data-wave="2"] { translate: 0 -1px; }
.chips li[data-pop] { animation: chip-recoil 380ms cubic-bezier(0.34, 1.65, 0.64, 1); }

.states li { transition: translate 240ms cubic-bezier(0.34, 1.56, 0.64, 1), border-color 180ms; }
.states li:hover { translate: 0 -2px; border-color: color-mix(in srgb, var(--primary) 45%, var(--line-strong)); }

.install-step { transition: border-color 260ms; }
.install-step:hover { border-top-color: color-mix(in srgb, var(--primary) 45%, var(--line)); }
.install-number { transition: transform 320ms cubic-bezier(0.34, 1.56, 0.64, 1), text-shadow 260ms; }
.install-step:hover .install-number { transform: translateX(4px) scale(1.06); text-shadow: 0 0 22px color-mix(in srgb, var(--primary) 55%, transparent); }

.footer { background: linear-gradient(to bottom, rgb(4 7 5 / 76%), rgb(7 11 9 / 42%)); }

.lightbox[open] img { transition: opacity 260ms var(--ease-out); }

@media (max-width: 1100px) {
  .wire-burst { inset: 0 -1px auto -1px; width: auto; height: 44%; background: linear-gradient(180deg, transparent, var(--packet-color, var(--primary)) 68%, #fff); }
  .wire-burst[data-dir="fwd"] { animation-name: wire-shot-down; }
  .wire-burst[data-dir="rev"] { background: linear-gradient(0deg, transparent, var(--packet-color, var(--primary)) 68%, #fff); animation-name: wire-shot-up; }
}

@media (max-width: 760px) {
  .spot-reticle { display: none; }
  .seek-toast { right: auto; left: 0; top: 0; }
  .seek-recap b { left: -2px; }
  .seek-intro b { left: 2px; }
  .tour-actions { order: 1; flex: 1 0 100%; justify-content: flex-end; margin-left: 0; }
  .tour-actions .tour-time { margin-right: auto; }
  .tour-rail { order: 2; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.45rem; }
  .tour-chapter { min-height: 40px; }
  .tour-chapter:last-child { grid-column: 1 / -1; }
}

@media (prefers-reduced-motion: no-preference) {
  .backdrop i:nth-of-type(1) { animation: drift-a 22s ease-in-out infinite alternate; }
  .backdrop i:nth-of-type(2) { animation: drift-b 26s ease-in-out infinite alternate; }
  .backdrop i:nth-of-type(3) { animation: drift-c 18s ease-in-out infinite alternate; }

  .hero::after,
  .section-band::after { opacity: 1; animation: beam 11s linear infinite; }

  .section-band::after { animation-duration: 14s; animation-delay: -5s; }

  .ambient { animation: breathe 20s ease-in-out infinite alternate; }

  .ambient-living { animation-duration: 24s; }

  .glow[data-tilting],
  .callouts > div[data-tilting] {
    transform: perspective(1100px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg)) translateY(var(--lift, 0px));
    will-change: transform;
  }

  .hero h1 { animation: enter 700ms var(--ease-out) both; }
  .hero-row { animation: enter 700ms 120ms var(--ease-out) both; }
  .hero .stage { animation: enter-stage 800ms 220ms var(--ease-out) both; }
  .frame-hero.frame-ticks::before { animation: tick-lock 1100ms 700ms var(--ease-out) both; }

  .install-title { animation: enter 520ms var(--ease-out) both; }
  .install-requires { animation: enter 520ms 60ms var(--ease-out) both; }
  .install-step { animation: enter 480ms var(--ease-out) both; }
  .install-step:nth-child(1) { animation-delay: 80ms; }
  .install-step:nth-child(2) { animation-delay: 140ms; }
  .install-step:nth-child(3) { animation-delay: 200ms; }

  .spot::after {
    content: "";
    position: absolute;
    inset: -2px;
    border: 1.5px solid var(--primary);
    border-radius: inherit;
    opacity: 0;
  }

  .living[data-spot="arriving"] .spot-arriving::after,
  .living[data-spot="upgrade"] .spot-upgrade::after,
  .living[data-spot="ghost"] .spot-ghost::after,
  .living[data-spot="queue"] .spot-queue::after { animation: ping 1.8s var(--ease-out) infinite; }

  .loupe img { animation: focus-lock 480ms cubic-bezier(0.34, 1.38, 0.64, 1) both; }

  .spots button { position: relative; }

  .living[data-cycling] .spots button[aria-pressed="true"]::after {
    content: "";
    position: absolute;
    inset: -1px 0 auto;
    height: 2px;
    background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 50%, transparent), var(--primary));
    box-shadow: 0 0 10px color-mix(in srgb, var(--primary) 70%, transparent);
    transform-origin: left;
    animation: cycle var(--cycle, 4500ms) linear both;
  }

  .seekbar:not([data-seek-live]) .seek-played { animation: scrub-fill 12s linear infinite; }
  .seekbar:not([data-seek-live]) .seek-rail { animation: scrub-head 12s linear infinite; }

  .states li:nth-child(-n+2)::before { animation: status 1.6s ease-in-out infinite; }
  .states li:nth-child(2)::before { animation-delay: -0.8s; }

  .tour-time[data-tour-state="playing"]::before { animation: status 1.8s ease-in-out infinite; }

  [role="tabpanel"]:not([hidden]) { animation: panel-in 420ms var(--ease-out) both; }

  .config tr { animation: row-in 480ms var(--ease-out) both; }
  .config tr:nth-child(2) { animation-delay: 60ms; }
  .config tr:nth-child(3) { animation-delay: 120ms; }
  .config tr:nth-child(4) { animation-delay: 180ms; }
  .config tr:nth-child(5) { animation-delay: 240ms; }
  .config tr:nth-child(6) { animation-delay: 300ms; }

  .node-server::after {
    content: "";
    position: absolute;
    inset: -6px;
    border: 1px solid color-mix(in srgb, var(--primary) 45%, transparent);
    border-radius: 16px;
    pointer-events: none;
    animation: halo 3.6s ease-in-out infinite;
  }

  .lightbox[open] { animation: lightbox-in 280ms var(--ease-out) both; }
  .lightbox[open]::backdrop { animation: fade-in 280ms var(--ease-out) both; }
}

@media (prefers-reduced-motion: reduce) {
  .accent-wave,
  .wire-burst,
  .vault-shield,
  .spot-scan,
  .seek-warp { display: none !important; }
  .glow,
  .callouts > div,
  .frame-hero { transform: none !important; }
  .btn-primary,
  .hero-actions .btn-ghost,
  .repo-url .btn { translate: none !important; }
}

@keyframes accent-shockwave {
  0% { --wave-r: 0%; opacity: 0.95; }
  72% { opacity: 0.72; }
  100% { --wave-r: 155%; opacity: 0; }
}

@keyframes drift-a { from { transform: translate3d(0, 0, 0) scale(1); } to { transform: translate3d(14vw, 10vh, 0) scale(1.18); } }
@keyframes drift-b { from { transform: translate3d(0, 0, 0) scale(1.1); } to { transform: translate3d(-18vw, 14vh, 0) scale(0.92); } }
@keyframes drift-c { from { transform: translate3d(0, 0, 0) scale(0.95); } to { transform: translate3d(-10vw, -12vh, 0) scale(1.15); } }
@keyframes beam { from { mask-position: 120% 0; } to { mask-position: -20% 0; } }
@keyframes breathe { from { transform: scale(1) translate3d(0, 0, 0); opacity: 0.16; } to { transform: scale(1.08) translate3d(2%, -2%, 0); opacity: 0.26; } }
@keyframes enter { from { opacity: 0; translate: 0 18px; } to { opacity: 1; translate: none; } }
@keyframes enter-stage { from { opacity: 0; translate: 0 28px; scale: 0.985; } to { opacity: 1; translate: none; scale: none; } }
@keyframes tick-lock { 0% { opacity: 0; scale: 1.03; } 55% { opacity: 1; scale: 1; filter: drop-shadow(0 0 6px var(--primary)); } 100% { opacity: 1; scale: 1; } }
@keyframes ping { 0% { opacity: 0.8; scale: 1; } 100% { opacity: 0; scale: 1.14 1.6; } }
@keyframes focus-lock { from { opacity: 0; scale: 1.16; filter: blur(4px); } 65% { opacity: 1; scale: 0.985; filter: none; } to { opacity: 1; scale: 1; filter: none; } }
@keyframes cycle { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes scrub-fill { from { scale: 0 1; } to { scale: 1 1; } }
@keyframes scrub-head { from { translate: 0 0; } to { translate: 100% 0; } }
@keyframes status { 0%, 100% { opacity: 1; scale: 1; } 50% { opacity: 0.35; scale: 1.5; } }
@keyframes panel-in { from { opacity: 0; translate: 0 10px; } to { opacity: 1; translate: none; } }
@keyframes row-in { from { opacity: 0; translate: -10px 0; } to { opacity: 1; translate: none; } }
@keyframes halo { 0%, 100% { opacity: 0.15; scale: 1; } 50% { opacity: 0.72; scale: 1.015; } }
@keyframes lightbox-in { from { opacity: 0; scale: 0.985; } to { opacity: 1; scale: 1; } }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes reticle-scan { 0% { translate: -110% 0; opacity: 0.95; } 100% { translate: 110% 0; opacity: 0; } }
@keyframes loupe-sweep { 0% { translate: -120% 0; opacity: 0.9; } 100% { translate: 120% 0; opacity: 0; } }
@keyframes shield-shimmer { 0% { translate: -125% 0; opacity: 0.95; } 100% { translate: 125% 0; opacity: 0; } }
@keyframes wire-shot-fwd { 0% { translate: -105% 0; opacity: 1; } 85% { opacity: 1; } 100% { translate: 245% 0; opacity: 0; } }
@keyframes wire-shot-rev { 0% { translate: 245% 0; opacity: 1; } 85% { opacity: 1; } 100% { translate: -105% 0; opacity: 0; } }
@keyframes wire-shot-down { 0% { translate: 0 -105%; opacity: 1; } 85% { opacity: 1; } 100% { translate: 0 245%; opacity: 0; } }
@keyframes wire-shot-up { 0% { translate: 0 245%; opacity: 1; } 85% { opacity: 1; } 100% { translate: 0 -105%; opacity: 0; } }
@keyframes seek-warp { 0% { opacity: 1; scale: 0.25 1; transform-origin: left; } 45% { opacity: 0.95; scale: 1 1; } 100% { opacity: 0; scale: 1 1; } }
@keyframes head-pop { 0% { scale: 1; } 45% { scale: 1.65; } 100% { scale: 1; } }
@keyframes chip-recoil { 0% { scale: 1; } 40% { scale: 1.16; } 75% { scale: 0.95; } 100% { scale: 1; } }
@keyframes dot-pop { 0% { scale: 1; } 45% { scale: 1.5; } 100% { scale: 1; } }
@keyframes swatch-pop { 0% { scale: 1; } 45% { scale: 1.07; } 100% { scale: 1; } }

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .frame-hero { animation: settle linear both; animation-timeline: view(); animation-range: exit 0% exit 80%; }
  }
}

@keyframes settle { from { scale: 1; opacity: 1; } to { scale: 0.96; opacity: 0.55; } }
