html {
  scroll-behavior: smooth;
}

[id] {
  scroll-margin-top: 9rem;
}

.section-label {
  letter-spacing: 0.16em;
}

.blob-top-left {
  clip-path: ellipse(60% 70% at 0% 0%);
}

.blob-top-right {
  clip-path: ellipse(70% 70% at 100% 20%);
}

.blob-bottom-right {
  clip-path: ellipse(65% 75% at 100% 100%);
}

.hiw-curve {
  opacity: 0.5;
  filter: blur(0.2px);
}

.has-how-it-works-motion .hiw-step {
  opacity: 0.38;
  transform: translate3d(0, 2rem, 0) scale(0.96);
  filter: saturate(0.78);
  transition:
    transform 520ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 520ms ease,
    filter 520ms ease;
  transition-delay: var(--step-delay, 0ms);
  will-change: transform, opacity, filter;
}

.has-how-it-works-motion .hiw-step.is-visible {
  opacity: 0.72;
  transform: translate3d(0, 0, 0) scale(1);
}

.hiw-step-visual,
.hiw-step-copy {
  transition:
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease,
    filter 280ms ease;
}

.hiw-step-visual {
  transform-origin: center;
}

.hiw-step-copy {
  transform-origin: center left;
}

.hiw-step:hover,
.hiw-step:focus-within,
.has-how-it-works-motion .hiw-step.is-current {
  opacity: 1;
  filter: saturate(1);
  transform: translate3d(0, -0.45rem, 0) scale(1.015);
}

.hiw-step:hover .hiw-step-visual,
.hiw-step:focus-within .hiw-step-visual,
.has-how-it-works-motion .hiw-step.is-current .hiw-step-visual {
  transform: translate3d(0, -0.15rem, 0) scale(1.04) rotate(-1deg);
  filter: drop-shadow(0 28px 45px rgba(15, 23, 42, 0.14));
}

.hiw-step:hover .hiw-step-copy,
.hiw-step:focus-within .hiw-step-copy,
.has-how-it-works-motion .hiw-step.is-current .hiw-step-copy {
  transform: translate3d(0, -0.15rem, 0);
}

.has-how-it-works-motion .hiw-step.is-complete:not(.is-current) {
  opacity: 0.58;
  filter: saturate(0.9);
}

.float-orb-left,
.float-orb-right,
.float-orb-bottom,
.float-orb-hero {
  will-change: transform, opacity;
  animation: none;
}

@keyframes orb-drift-left {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }

  50% {
    transform: translate3d(18px, 16px, 0) scale(1.04);
    opacity: 0.92;
  }
}

@keyframes orb-drift-right {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }

  50% {
    transform: translate3d(-22px, 20px, 0) scale(1.05);
    opacity: 0.9;
  }
}

@keyframes orb-drift-bottom {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 1;
  }

  50% {
    transform: translate3d(-18px, -18px, 0) scale(1.03);
    opacity: 0.9;
  }
}

@keyframes orb-pulse {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.9;
  }

  50% {
    transform: translate3d(0, 10px, 0) scale(1.08);
    opacity: 0.72;
  }
}

.legal-page {
  background:
    radial-gradient(circle at top left, rgba(204, 242, 255, 0.72), transparent 34%),
    radial-gradient(circle at bottom right, rgba(104, 218, 18, 0.14), transparent 24%),
    #f8fbff;
}

.legal-card {
  border: 1px solid rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(24px);
}

.legal-richtext h2 {
  margin-top: 2.5rem;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  color: #0c1d2e;
}

.legal-richtext h2:first-child {
  margin-top: 0;
}

.legal-richtext h3 {
  margin-top: 2rem;
  font-size: 1.125rem;
  font-weight: 800;
  line-height: 1.5;
  color: #0c1d2e;
}

.legal-richtext h2 + p,
.legal-richtext h3 + p,
.legal-richtext h2 + ul,
.legal-richtext h3 + ul {
  margin-top: 1rem;
}

.legal-richtext p,
.legal-richtext li {
  color: #475569;
  font-size: 1rem;
  line-height: 1.85;
}

.legal-richtext ul,
.legal-richtext .legal-document-list {
  margin-top: 1rem;
  list-style: disc;
  padding-left: 1.5rem;
}

.legal-richtext p + ul,
.legal-richtext p + .legal-document-list,
.legal-richtext .legal-document-list + p {
  margin-top: 0.75rem;
}

.legal-richtext li + li,
.legal-richtext p + p {
  margin-top: 0.75rem;
}

.legal-richtext .legal-document-index {
  font-weight: 700;
  color: #0c1d2e;
}

.legal-faq details {
  border: 1px solid rgba(226, 232, 240, 0.9);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.06);
}

.legal-faq summary {
  display: flex;
  cursor: pointer;
  list-style: none;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.legal-faq summary::-webkit-details-marker {
  display: none;
}

.legal-faq .faq-icon {
  flex-shrink: 0;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.legal-faq details[open] .faq-icon {
  transform: rotate(45deg);
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hiw-step,
  .hiw-step-visual,
  .hiw-step-copy,
  .float-orb-left,
  .float-orb-right,
  .float-orb-bottom,
  .float-orb-hero {
    animation: none;
    transition: none;
    transform: none;
    filter: none;
    opacity: 1;
  }
}
