.reveal {
  opacity: 0;
  transform:
    translate3d(0, 2.2rem, 0)
    scale(0.985);
  filter: blur(10px);
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 1100ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 900ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform, filter;
}

.reveal.is-visible {
  opacity: 1;
  transform:
    translate3d(0, 0, 0)
    scale(1);
  filter: blur(0);
}

.chapter {
  transition:
    opacity 500ms ease,
    transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter::before {
  transition:
    opacity 700ms ease,
    transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter::after {
  transition:
    opacity 800ms ease,
    transform 1200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter:not(.is-active-section) {
  opacity: 0.94;
}

.chapter.is-active-section {
  opacity: 1;
}

.archive-shell {
  transform: translate3d(0, var(--section-shift, 0px), 0);
  transition: transform 600ms cubic-bezier(0.16, 1, 0.3, 1);
}

.archive-shell::before {
  transition:
    opacity 900ms ease,
    transform 1400ms cubic-bezier(0.16, 1, 0.3, 1);
}

.chapter.is-active-section .archive-shell::before {
  opacity: 1;
  transform: scale(1);
}

.chapter:not(.is-active-section) .archive-shell::before {
  opacity: 0.76;
  transform: scale(0.992);
}

.organism-core__halo {
  animation:
    archiveHalo 8s ease-in-out infinite;
}

.organism-core__shell--outer {
  animation: shellDriftOuter 12s ease-in-out infinite;
}

.organism-core__shell--mid {
  animation: shellDriftMid 10s ease-in-out infinite;
}

.organism-core__shell--inner {
  animation: shellDriftInner 8.5s ease-in-out infinite;
}

.organism-core__spine {
  animation: spineGlow 6s ease-in-out infinite;
}

.organism-core__pulse {
  animation:
    coreBreath 6.5s ease-in-out infinite,
    coreDrift 11s ease-in-out infinite;
}

.archive-signal-strip span {
  animation: signalBlink 5.8s ease-in-out infinite;
}

.archive-signal-strip span:nth-child(2) {
  animation-delay: 0.7s;
}

.archive-signal-strip span:nth-child(3) {
  animation-delay: 1.3s;
}

.rift-visual::before {
  animation: fieldShimmer 10s linear infinite;
}

.rift-visual::after {
  animation: scanDrift 14s linear infinite;
}

.shell-note,
.protocol-card,
.archive-card,
.node-card,
.rift-text article,
.contact-panel__meta,
.terminal-band {
  position: relative;
  isolation: isolate;
}

.shell-note::before,
.protocol-card::before,
.archive-card::before,
.node-card::before,
.rift-text article::before,
.contact-panel__meta::before,
.terminal-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  border-radius: inherit;
  opacity: 0;
  background:
    radial-gradient(
      circle at var(--pointer-x, 50%) var(--pointer-y, 50%),
      rgba(174, 216, 208, 0.14),
      transparent 34%
    );
  transition: opacity 280ms ease;
}

.shell-note:hover::before,
.shell-note:focus-within::before,
.protocol-card:hover::before,
.protocol-card:focus-within::before,
.archive-card:hover::before,
.archive-card:focus-within::before,
.node-card:hover::before,
.node-card:focus-within::before,
.rift-text article:hover::before,
.rift-text article:focus-within::before,
.contact-panel__meta:hover::before,
.contact-panel__meta:focus-within::before,
.terminal-band:hover::before,
.terminal-band:focus-within::before {
  opacity: 1;
}

.button,
.timeline-item,
.theme-toggle,
.menu-toggle {
  transition:
    transform 220ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 220ms ease,
    color 220ms ease,
    background 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.timeline-item.is-active {
  animation: railPulse 3.2s ease-in-out infinite;
}

.site-header.is-scrolled {
  background:
    linear-gradient(180deg, rgba(7, 12, 12, 0.92), rgba(7, 12, 12, 0.7));
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.14);
}

@keyframes archiveHalo {
  0%, 100% {
    transform: scale(0.96);
    opacity: 0.62;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
}

@keyframes shellDriftOuter {
  0%, 100% {
    transform: rotate(-7deg) scale(1);
  }
  50% {
    transform: rotate(-3deg) scale(1.025);
  }
}

@keyframes shellDriftMid {
  0%, 100% {
    transform: rotate(11deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(6deg) translate3d(0.35rem, -0.3rem, 0);
  }
}

@keyframes shellDriftInner {
  0%, 100% {
    transform: rotate(-12deg) scale(1);
  }
  50% {
    transform: rotate(-6deg) scale(1.04);
  }
}

@keyframes spineGlow {
  0%, 100% {
    opacity: 0.68;
    box-shadow:
      0 0 24px rgba(83, 132, 126, 0.18),
      inset 0 0 10px rgba(255, 255, 255, 0.04);
  }
  50% {
    opacity: 1;
    box-shadow:
      0 0 36px rgba(117, 180, 171, 0.28),
      inset 0 0 14px rgba(255, 255, 255, 0.08);
  }
}

@keyframes coreDrift {
  0%, 100% {
    transform: translate3d(0, 0, 0);
  }
  25% {
    transform: translate3d(0.25rem, -0.35rem, 0);
  }
  50% {
    transform: translate3d(-0.15rem, 0.3rem, 0);
  }
  75% {
    transform: translate3d(0.18rem, 0.08rem, 0);
  }
}

@keyframes signalBlink {
  0%, 100% {
    opacity: 0.72;
    border-color: rgba(194, 210, 201, 0.14);
  }
  50% {
    opacity: 1;
    border-color: rgba(214, 231, 222, 0.24);
  }
}

@keyframes fieldShimmer {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate3d(1.2%, -1.2%, 0) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.88;
  }
}

@keyframes scanDrift {
  0% {
    transform: translateY(0);
    opacity: 0.45;
  }
  50% {
    transform: translateY(0.8rem);
    opacity: 0.7;
  }
  100% {
    transform: translateY(0);
    opacity: 0.45;
  }
}

@keyframes railPulse {
  0%, 100% {
    box-shadow: inset 0 0 0 0 rgba(145, 200, 192, 0);
  }
  50% {
    box-shadow: inset 0 0 0 1px rgba(145, 200, 192, 0.08);
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .archive-shell,
  .chapter,
  .chapter::before,
  .chapter::after,
  .archive-shell::before,
  .organism-core__halo,
  .organism-core__shell--outer,
  .organism-core__shell--mid,
  .organism-core__shell--inner,
  .organism-core__spine,
  .organism-core__pulse,
  .archive-signal-strip span,
  .rift-visual::before,
  .rift-visual::after,
  .timeline-item.is-active {
    animation: none !important;
    transition: none !important;
    transform: none !important;
    filter: none !important;
  }

  .reveal {
    opacity: 1 !important;
  }

  .shell-note::before,
  .protocol-card::before,
  .archive-card::before,
  .node-card::before,
  .rift-text article::before,
  .contact-panel__meta::before,
  .terminal-band::before {
    display: none !important;
  }
}