html,
body { max-width: 100%; overflow-x: clip; }
main,
section,
footer { min-width: 0; max-width: 100%; }

.page-progress {
  position: fixed;
  top: 77px;
  left: 0;
  z-index: 20;
  width: 100%;
  height: 3px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--blue);
}

.motion-diagram {
  position: absolute;
  inset: 1rem 1rem auto;
  height: 46%;
  opacity: .9;
  pointer-events: none;
  transform: translate3d(var(--motion-x, 0), var(--motion-y, 0), 0);
  transition: transform .5s cubic-bezier(.2, .8, .2, 1);
}
.motion-diagram svg { width: 100%; height: 100%; overflow: visible; }
.motion-path {
  fill: none;
  stroke: rgba(255, 255, 255, .72);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 8 9;
}
.motion-node { fill: var(--blue); stroke: #fff; stroke-width: 2; }
.motion-ring { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 1.5; }
.motion-block { fill: rgba(255, 255, 255, .12); stroke: rgba(255, 255, 255, .55); }
.motion-card { transform-box: fill-box; transform-origin: center; }
.motion-arc { stroke-dasharray: 5 8; transform-box: fill-box; transform-origin: center; }
.motion-node-core { fill: #fff; stroke: var(--blue); stroke-width: 4; }
.motion-shield { fill: rgba(20, 90, 242, .18); stroke: rgba(255, 255, 255, .72); stroke-width: 1.5; }
.motion-label { fill: #fff; font: 700 10px/1 Inter, system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }

.content-band { position: relative; overflow: hidden; isolation: isolate; }
.content-band > .wrap { position: relative; z-index: 1; }
.content-band::before {
  content: var(--band-index, "");
  position: absolute;
  top: 1.25rem;
  right: clamp(1.25rem, 7vw, 8rem);
  z-index: 0;
  color: rgba(20, 90, 242, .055);
  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.08em;
  pointer-events: none;
}
.content-band.blue::before,
.content-band.ink::before { color: rgba(255, 255, 255, .06); }

main > .section { position: relative; overflow: hidden; isolation: isolate; }
main > .section > * { position: relative; z-index: 1; }
main > .section::before {
  content: var(--band-index, "");
  position: absolute;
  top: 1rem;
  right: clamp(1.25rem, 7vw, 8rem);
  z-index: 0;
  color: rgba(20, 90, 242, .05);
  font-size: clamp(5rem, 12vw, 11rem);
  font-weight: 900;
  line-height: .8;
  letter-spacing: -.08em;
  pointer-events: none;
}
main > .section.method::before { color: rgba(255, 255, 255, .07); }

.motion-enabled [data-reveal] {
  opacity: 0;
  transform: translate3d(var(--reveal-x, 0), 30px, 0) scale(.985);
  transition: opacity .75s ease, transform .8s cubic-bezier(.2, .8, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.motion-enabled [data-reveal].is-visible { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
.motion-enabled .motion-path { animation: route-flow 8s linear infinite; }
.motion-enabled .motion-node { transform-box: fill-box; transform-origin: center; animation: node-pulse 3.2s ease-in-out infinite; animation-delay: var(--node-delay, 0s); }
.motion-enabled .motion-card { animation: card-breathe 5.2s ease-in-out infinite alternate; }
.motion-enabled .motion-card:nth-of-type(2) { animation-delay: -.9s; }
.motion-enabled .motion-card:nth-of-type(3) { animation-delay: -1.8s; }
.motion-enabled .motion-arc { animation: arc-turn 16s linear infinite; }
.motion-enabled .motion-arc:nth-of-type(2) { animation-direction: reverse; animation-duration: 12s; }
.motion-enabled .page-hero aside::after { animation: orbit-drift 10s ease-in-out infinite alternate; }
.motion-enabled .page-hero aside::before { animation: grid-drift 18s linear infinite; }
.motion-enabled .usp-card::after {
  content: "";
  position: absolute;
  width: 9rem;
  aspect-ratio: 1;
  right: -5rem;
  bottom: -5rem;
  border: 1px solid rgba(20, 90, 242, .22);
  border-radius: 50%;
  transition: transform .5s ease;
}
.motion-enabled .usp-card:hover::after,
.motion-enabled .usp-card:focus-within::after { transform: scale(1.35); }

.motion-enabled .usp-card,
.motion-enabled .decision-card,
.motion-enabled .legal-summary-grid article,
.motion-enabled .fee-value-grid article { isolation: isolate; }
.motion-enabled .usp-card::before,
.motion-enabled .decision-card::before,
.motion-enabled .legal-summary-grid article::before,
.motion-enabled .fee-value-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  border-radius: inherit;
  background: radial-gradient(260px circle at var(--pointer-x, 50%) var(--pointer-y, 50%), rgba(20, 90, 242, .15), transparent 65%);
  transition: opacity .35s ease;
  pointer-events: none;
}
.motion-enabled .usp-card:hover::before,
.motion-enabled .decision-card:hover::before,
.motion-enabled .legal-summary-grid article:hover::before,
.motion-enabled .fee-value-grid article:hover::before { opacity: 1; }
.motion-enabled .decision-card::after { animation: letter-float 7s ease-in-out infinite alternate; }
.motion-enabled .choice article,
.motion-enabled .method article,
.motion-enabled .video-card {
  transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .45s ease, border-color .45s ease;
}
.motion-enabled .choice article:hover,
.motion-enabled .video-card:hover { transform: translateY(-8px); border-color: rgba(20, 90, 242, .45); box-shadow: 0 24px 60px rgba(16, 42, 67, .11); }
.motion-enabled .method article:hover { transform: translateY(-8px); border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .16); }
.motion-enabled .method article { position: relative; overflow: hidden; }
.motion-enabled .method article::after {
  content: "";
  position: absolute;
  inset: -60% auto -60% -35%;
  width: 24%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent);
  animation: method-sweep 7s ease-in-out infinite;
  animation-delay: calc(var(--reveal-delay, 0ms) * 2);
}
.motion-enabled .metric-strip.is-visible { position: relative; }
.motion-enabled .metric-strip.is-visible::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -35%;
  width: 24%;
  transform: skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(20, 90, 242, .08), transparent);
  animation: metric-sweep 4.8s ease-in-out infinite;
  pointer-events: none;
}
.motion-enabled .process-flow li.is-visible::after {
  content: "";
  position: absolute;
  inset: auto 1.25rem 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--blue);
  animation: line-grow .9s cubic-bezier(.2, .8, .2, 1) forwards;
  animation-delay: var(--reveal-delay, 0ms);
}

.motion-control {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 30;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .62rem .85rem;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 999px;
  color: #fff;
  background: rgba(16, 42, 67, .9);
  box-shadow: 0 12px 36px rgba(16, 42, 67, .2);
  backdrop-filter: blur(14px);
  font: 750 .72rem/1 Inter, system-ui, sans-serif;
  cursor: pointer;
}
.motion-control span { width: .55rem; aspect-ratio: 1; border-radius: 50%; background: #67e8a5; box-shadow: 0 0 0 .28rem rgba(103, 232, 165, .14); }
.motion-control[aria-pressed="true"] span { background: #f8c15c; box-shadow: 0 0 0 .28rem rgba(248, 193, 92, .14); }
.motion-control:focus-visible { outline: 3px solid rgba(20, 90, 242, .38); outline-offset: 3px; }

.motion-paused *,
.motion-paused *::before,
.motion-paused *::after { animation-play-state: paused !important; }
.motion-paused [data-reveal] { opacity: 1; transform: none; transition: none; }

@keyframes route-flow { to { stroke-dashoffset: -68; } }
@keyframes node-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }
@keyframes orbit-drift { to { transform: translate(-1rem, 1.25rem) rotate(8deg); } }
@keyframes grid-drift { to { background-position: 34px 34px, 34px 34px; } }
@keyframes card-breathe { to { transform: translateY(-8px); } }
@keyframes arc-turn { to { transform: rotate(360deg); } }
@keyframes letter-float { to { transform: translate3d(-8px, -9px, 0) rotate(-2deg); } }
@keyframes metric-sweep { 0%, 18% { transform: translateX(0) skewX(-18deg); opacity: 0; } 32% { opacity: 1; } 72%, 100% { transform: translateX(650%) skewX(-18deg); opacity: 0; } }
@keyframes line-grow { to { transform: scaleX(1); } }
@keyframes method-sweep { 0%, 54% { transform: translateX(0) skewX(-18deg); opacity: 0; } 64% { opacity: 1; } 86%, 100% { transform: translateX(760%) skewX(-18deg); opacity: 0; } }

@media (max-width: 640px) {
  .page-progress { top: 77px; }
  .motion-diagram { inset: .75rem .75rem auto; height: 42%; }
  .motion-control b { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .motion-control { width: 44px; padding: 0; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .page-progress { display: none; }
  .motion-enabled [data-reveal] { opacity: 1; transform: none; transition: none; }
  .motion-enabled .motion-path,
  .motion-enabled .motion-node,
  .motion-enabled .motion-card,
  .motion-enabled .motion-arc,
  .motion-enabled .page-hero aside::before,
  .motion-enabled .page-hero aside::after { animation: none; }
  .motion-control { display: none; }
  .journey-meter span { transition: none; }
}
