html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.glass {
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, .82);
}

.trust-scroll::-webkit-scrollbar {
  display: none;
}

.reveal,
.reveal-left,
.reveal-right,
.reveal-up {
  opacity: 0;
  transition: opacity .75s ease, transform .75s cubic-bezier(.2, .7, .2, 1);
  will-change: transform, opacity;
}

.reveal {
  transform: translateY(28px);
}

.reveal-up {
  transform: translateY(38px);
}

.reveal-left {
  transform: translateX(-36px);
}

.reveal-right {
  transform: translateX(36px);
}

.is-visible {
  opacity: 1 !important;
  transform: translate(0, 0) !important;
}

.section-fade {
  position: relative;
}

.section-fade::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 8%;
  right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(99, 102, 241, .22), transparent);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-up {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

.trust-marquee {
  mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 6%, black 94%, transparent);
}

.trust-marquee-track {
  width: max-content;
  animation: trustMarquee 28s linear infinite;
}

.trust-marquee:hover .trust-marquee-track {
  animation-play-state: paused;
}

@keyframes trustMarquee {
  from {
    transform: translateX(0);
  }

  to {
    transform: translateX(-50%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .trust-marquee {
    overflow-x: auto;
    mask-image: none;
    -webkit-mask-image: none;
  }

  .trust-marquee-track {
    animation: none;
  }
}

.legal-content section[id] {
  scroll-margin-top: 6.5rem;
}

.legal-content h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #020617;
  margin-bottom: 0.75rem;
}

.legal-content h3 {
  font-size: 1rem;
  line-height: 1.4;
  font-weight: 600;
  color: #0f172a;
  margin-top: 1.35rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.65;
}

.legal-content p + p {
  margin-top: 0.875rem;
}

.legal-content ul {
  margin-top: 0.625rem;
  margin-bottom: 0.875rem;
  padding-left: 1.25rem;
  list-style-type: disc;
  color: #475569;
  font-size: 0.9375rem;
  line-height: 1.65;
}

@media (min-width: 640px) {
  .legal-content h2 {
    font-size: 1.375rem;
    margin-bottom: 0.875rem;
  }

  .legal-content h3 {
    font-size: 1.0625rem;
    margin-top: 1.5rem;
  }

  .legal-content p,
  .legal-content ul {
    line-height: 1.7;
  }
}

@media (min-width: 1024px) {
  .legal-content h2 {
    font-size: 1.625rem;
    line-height: 1.25;
    margin-bottom: 1rem;
  }

  .legal-content h3 {
    font-size: 1.125rem;
    margin-top: 1.75rem;
    margin-bottom: 0.625rem;
  }

  .legal-content p {
    font-size: 1rem;
    line-height: 1.75;
  }

  .legal-content p + p {
    margin-top: 1rem;
  }

  .legal-content ul {
    margin-top: 0.75rem;
    margin-bottom: 1rem;
    padding-left: 1.375rem;
    font-size: 1rem;
    line-height: 1.75;
  }
}

.legal-content ul ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
  list-style-type: circle;
}

.legal-content li + li {
  margin-top: 0.5rem;
}

.legal-content strong {
  color: #0f172a;
  font-weight: 600;
}

.legal-content a {
  color: #4f46e5;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-content a:hover {
  color: #4338ca;
}

/* Modal overlay and panel open/close animations */
html.modal-open {
  scrollbar-width: none;
}

html.modal-open::-webkit-scrollbar {
  display: none;
}

#modal {
  opacity: 0;
  transition: opacity 220ms ease;
}

#modal #modalPanel {
  opacity: 0;
  transform: translateY(16px) scale(0.97);
  transition:
    opacity 240ms cubic-bezier(.2, .7, .2, 1),
    transform 240ms cubic-bezier(.2, .7, .2, 1);
  will-change: opacity, transform;
}

#modal.is-open {
  opacity: 1;
}

#modal.is-open #modalPanel {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (prefers-reduced-motion: reduce) {
  #modal,
  #modal #modalPanel {
    transition: none;
    transform: none;
  }
}

/* Desktop-only active section indicator for legal Table of Contents */
@media (min-width: 1024px) {
  .legal-toc a {
    border-left: 2px solid transparent;
    padding-left: 0.75rem;
    margin-left: -0.75rem;
    transition: color 180ms ease, border-color 180ms ease;
  }

  .legal-toc a.is-active {
    border-left-color: #4f46e5;
    color: #4f46e5;
    font-weight: 600;
  }
}
