/* Quiet technical motion. All artwork stays behind the content. */
.hero #vault-network { z-index: 1; }
.hero #magic-ribbon { z-index: 3; }
.hero-visual { --float-y: 0px; }
.hero-phone { transform: translateY(var(--float-y)); }

.motion-toggle {
  position: absolute;
  right: 0;
  bottom: -1px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 9px 12px;
  border: 1px solid #39515b;
  border-radius: 30px;
  background: #0b1317;
  color: #a3bbc5;
  font-size: 12px;
  line-height: 1.2;
  transition: border-color .2s, color .2s;
}
.motion-toggle:hover { color: #ceeff4; border-color: #3a8490; }
.motion-toggle svg { width: 14px; height: 14px; fill: currentColor; }
.motion-toggle .play-glyph { display: none; }
.motion-toggle[aria-pressed="true"] .pause-glyph { display: none; }
.motion-toggle[aria-pressed="true"] .play-glyph { display: block; }
.motion-toggle:disabled { opacity: .65; }
.visual-caption { right: auto; bottom: 13px; }

/* A quiet circuit grid and a moving light along the wallet frame. */
.wallet-stage { isolation: isolate; }
.wallet-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(#64d8e609 1px, transparent 1px),
    linear-gradient(90deg, #64d8e609 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse, transparent 30%, #000 95%);
  -webkit-mask-image: radial-gradient(ellipse, transparent 30%, #000 95%);
}
.wallet-screen {
  position: relative;
  animation: frame-breathe 9s ease-in-out infinite paused;
}
.wallet-screen::after {
  content: "";
  position: absolute;
  left: -1px;
  top: 10%;
  width: 2px;
  height: 56px;
  border-radius: 100%;
  background: linear-gradient(transparent, #8bebf8, transparent);
  box-shadow: 0 0 12px #32d7ec55;
  pointer-events: none;
  opacity: 0;
  animation: frame-signal 9s ease-in-out infinite paused;
}
.privacy-toggle[aria-pressed="true"] { color: #77d8e6; }

/* The simulation is illustrative. These phases visualize its review flow. */
.simulation-card { position: relative; overflow: hidden; isolation: isolate; }
.simulation-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, transparent 74%, #2acfe208 94%, #79e9ff38 99.7%, transparent);
  pointer-events: none;
  transform: translateY(-102%);
  animation: transaction-scan 9s ease-in-out infinite paused;
}
.protocol-flow {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto;
  align-items: start;
  gap: 9px;
  margin: 31px 0 29px;
}
.protocol-step { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.protocol-node {
  display: grid;
  place-items: center;
  width: 39px;
  height: 39px;
  border: 1px solid #314a55;
  border-radius: 11px;
  background: #101b20;
  color: #6e95a4;
  animation: protocol-pulse 9s ease-in-out infinite paused;
  animation-delay: calc(var(--step) * 3s - 9s);
}
.protocol-node .icon { width: 18px; height: 18px; }
.protocol-step b { font-size: 12px; color: #a1b9c3; font-weight: 400; letter-spacing: .02em; }
.protocol-link { height: 1px; background: #2b424b; position: relative; margin-top: 19px; overflow: hidden; }
.protocol-link::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #8df1ff, transparent);
  animation: protocol-transfer 9s linear infinite paused;
  animation-delay: calc(var(--step) * 3s - 9s);
  transform: translateX(-105%);
}
.protocol-flow + .simulation-label { margin-top: 0; }

/* Traces follow the edge of the token panel, leaving the copy clear. */
.token-panel { isolation: isolate; }
#token-field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }
.integration-steps article { position: relative; }
.integration-steps article:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 55px;
  bottom: 12px;
  width: 1px;
  background: linear-gradient(#37677744, #22424e16);
}
.integration-steps article:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 55px;
  width: 3px;
  height: 12px;
  border-radius: 3px;
  background: linear-gradient(transparent, #53cee1);
  box-shadow: 0 0 8px #21c7e055;
  opacity: 0;
  animation: connection-pulse 5s ease-in-out infinite paused;
}
.integration-steps article:nth-child(2)::after { animation-delay: 2.5s; }

/* Pause when a section leaves the screen, the page is hidden, or motion is off. */
.tech-motion-ready:not(.motion-stopped) .fx-visible .wallet-screen,
.tech-motion-ready:not(.motion-stopped) .fx-visible .wallet-screen::after,
.tech-motion-ready:not(.motion-stopped) .fx-visible .simulation-card::before,
.tech-motion-ready:not(.motion-stopped) .fx-visible .protocol-node,
.tech-motion-ready:not(.motion-stopped) .fx-visible .protocol-link::after,
.tech-motion-ready:not(.motion-stopped) .fx-visible article::after { animation-play-state: running; }

@keyframes frame-breathe {
  0%, 65%, 100% { border-color: #37474c; }
  30%, 40% { border-color: #3b8a98; }
}
@keyframes frame-signal {
  0%, 12% { top: 9%; opacity: 0; }
  20% { opacity: .85; }
  65% { top: 85%; opacity: 0; }
  100% { top: 85%; opacity: 0; }
}
@keyframes transaction-scan {
  0%, 9% { transform: translateY(-102%); opacity: 0; }
  14% { opacity: 1; }
  62% { transform: translateY(3%); opacity: .65; }
  76%, 100% { transform: translateY(8%); opacity: 0; }
}
@keyframes protocol-pulse {
  0%, 25% { color: #a4eff8; border-color: #48b6c6; box-shadow: 0 0 22px #21c7dc15, inset 0 0 15px #38c5da0a; }
  33%, 94% { color: #6e95a4; border-color: #314a55; box-shadow: none; }
  100% { color: #a4eff8; border-color: #48b6c6; box-shadow: 0 0 22px #21c7dc15; }
}
@keyframes protocol-transfer {
  0%, 12% { transform: translateX(-105%); opacity: 0; }
  14% { opacity: 1; }
  32% { transform: translateX(105%); opacity: 1; }
  33%, 100% { transform: translateX(105%); opacity: 0; }
}
@keyframes connection-pulse {
  0%, 10% { transform: translateY(-10px); opacity: 0; }
  25% { opacity: .7; }
  80%, 100% { transform: translateY(62px); opacity: 0; }
}

@media (max-width: 680px) {
  .motion-toggle { right: 0; bottom: 5px; font-size: 12px; }
  .protocol-flow { gap: 8px; margin-block: 27px; }
  .protocol-node { width: 37px; height: 37px; }
}
@media (prefers-reduced-motion: reduce) {
  .wallet-screen, .wallet-screen::after, .simulation-card::before,
  .protocol-node, .protocol-link::after, .integration-steps article::after { animation: none !important; }
  .hero-phone { transform: none; }
  .protocol-node { color: #88c7d4; border-color: #3f6672; }
}

/* Planned apps: one quiet device signal for each destination. */
.apps-section {
  border-top: 1px solid var(--border);
  background: radial-gradient(ellipse at 50% 95%, #0a3a421f, transparent 64%);
}
.apps-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.platform-card {
  position: relative;
  overflow: hidden;
  padding: 28px 29px 26px;
  border: 1px solid #263a43;
  border-radius: 20px;
  background: #0e171b;
  transition: border-color .25s, background .25s;
}
.platform-card:hover { border-color: #356775; background: #101c21; }
.platform-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent 20%, #72e8ff99, transparent 80%);
  transform: translateX(-110%);
  animation: app-signal 8s ease-in-out infinite paused;
  animation-delay: var(--app-delay);
}
.platform-topline { display: flex; justify-content: space-between; gap: 12px; align-items: center; color: #6d8b98; font-size: 12px; letter-spacing: .03em; }
.platform-format { letter-spacing: 0; font-size: 12px; color: #9db6bf; }
.platform-icon { position: relative; width: 78px; height: 78px; display: grid; place-items: center; margin: 36px 0 27px; }
.platform-icon::before {
  content: "";
  position: absolute;
  inset: -1px;
  border: 1px solid #367080;
  border-radius: 23px;
  opacity: .3;
  animation: device-ripple 8s ease-out infinite paused;
  animation-delay: var(--app-delay);
}
.platform-icon svg { width: 59px; height: 59px; fill: none; stroke: #b4d4de; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.platform-icon .device-signal { stroke: #37cee2; }
.platform-card h3 { font-size: clamp(22px, 2.15vw, 28px); letter-spacing: -.035em; line-height: 1.25; margin-bottom: 15px; }
.platform-card > p { font-size: 16px; line-height: 1.8; min-height: 86px; }
.platform-status { display: flex; align-items: center; gap: 10px; border-top: 1px solid #25373f; padding-top: 22px; margin-top: 28px; color: #b0ccd5; font-size: 14px; }
.launch-mark { display: inline-block; width: 10px; height: 10px; border: 1px solid #6094a2; border-radius: 3px; transform: rotate(45deg); }
.apps-note { margin-top: 23px; color: #78939e; font-size: 13px; }
.tech-motion-ready:not(.motion-stopped) .fx-visible .platform-card::before,
.tech-motion-ready:not(.motion-stopped) .fx-visible .platform-icon::before { animation-play-state: running; }
@keyframes app-signal {
  0%, 8% { transform: translateX(-110%); opacity: 0; }
  18% { opacity: 1; }
  55%, 100% { transform: translateX(110%); opacity: 0; }
}
@keyframes device-ripple {
  0%, 15%, 100% { opacity: .2; transform: scale(1); }
  25% { opacity: .6; transform: scale(1); }
  48%, 65% { opacity: 0; transform: scale(1.25); }
  80% { opacity: .2; transform: scale(1); }
}
@media (max-width: 900px) {
  .apps-grid { gap: 14px; }
  .platform-card { padding: 22px 20px; }
  .platform-topline { flex-wrap: wrap; gap: 6px; }
  .platform-card > p { min-height: 144px; }
}
@media (max-width: 680px) {
  .apps-grid { grid-template-columns: 1fr; gap: 17px; }
  .platform-card { padding: 26px; }
  .platform-topline { flex-wrap: nowrap; }
  .platform-icon { margin: 28px 0 23px; width: 70px; height: 70px; }
  .platform-icon svg { width: 52px; height: 52px; }
  .platform-card h3 { font-size: 25px; }
  .platform-card > p { min-height: 0; max-width: 370px; }
  .platform-status { margin-top: 25px; padding-top: 19px; }
}
@media (max-width: 360px) {
  .platform-card { padding: 23px 20px; }
  .platform-topline { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .platform-card::before, .platform-icon::before { animation: none !important; }
}
