.qm-section {
  --qm-bg: #ffffff;
  --qm-ink: #202024;
  --qm-accent: #8053db;
  --qm-dim: #c7c4ce;
  --qm-secondary: #77737f;
  --qm-rule: #e6e3eb;
  --qm-enter: 1;
  --qm-reveal-y: 0px;
  --qm-reveal-blur: 0px;
  --qm-orbit-y: 0px;
  position: relative;
  isolation: isolate;
  background: var(--qm-bg);
  color: var(--qm-ink);
  overflow: clip;
}

/* Let the section enter the page with a soft, premium focus transition. */
.qm-section.is-reveal-ready {
  opacity: 0;
  filter: blur(14px);
  transform: translateY(24px) scale(.99);
  transition:
    opacity .8s cubic-bezier(.22, 1, .36, 1),
    filter .95s cubic-bezier(.22, 1, .36, 1),
    transform .95s cubic-bezier(.22, 1, .36, 1);
  will-change: opacity, filter, transform;
}

.qm-section.is-reveal-ready.is-revealed {
  opacity: 1;
  filter: blur(0);
  transform: none;
}

.qm-section[data-tone="dark"] {
  --qm-bg: #0c0d10;
  --qm-ink: #f5f4f0;
  --qm-accent: #c4b0fa;
  --qm-dim: #393b42;
  --qm-secondary: #8d8e98;
  --qm-rule: #292a30;
}

.qm-section::before,
.qm-section::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* A quiet editorial background: visible enough to add depth, soft enough to keep the copy first. */
.qm-section::before {
  opacity: .72;
  background:
    radial-gradient(circle at 14% 22%, rgba(128, 83, 219, .11), transparent 25%),
    radial-gradient(circle at 86% 76%, rgba(202, 255, 86, .11), transparent 21%),
    linear-gradient(rgba(32, 32, 36, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 32, 36, .035) 1px, transparent 1px);
  background-size: auto, auto, 76px 76px, 76px 76px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 16%, black 84%, transparent 100%);
}

.qm-section::after {
  inset: auto -14vw -26vw auto;
  width: min(72vw, 980px);
  height: min(72vw, 980px);
  border: 1px solid rgba(128, 83, 219, .13);
  border-radius: 50%;
  box-shadow:
    0 0 0 72px rgba(128, 83, 219, .035),
    0 0 0 144px rgba(128, 83, 219, .022),
    0 0 90px rgba(128, 83, 219, .08);
  transform: translateY(var(--qm-orbit-y)) rotate(-14deg);
}

.qm-section[data-tone="dark"]::before,
.qm-section[data-tone="dark"]::after {
  display: none;
}

.qm-stage {
  width: 100%;
  position: relative;
  min-height: 0;
  padding: clamp(68px, 7vw, 112px) clamp(24px, 5vw, 90px) 0;
  box-sizing: border-box;
}

.qm-stage::before,
.qm-stage::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  filter: blur(1px);
}

.qm-stage::before {
  top: 15%;
  left: 7%;
  width: 116px;
  height: 116px;
  border: 1px solid rgba(128, 83, 219, .18);
  box-shadow: 0 0 0 16px rgba(128, 83, 219, .035);
}

.qm-stage::after {
  right: 9%;
  bottom: 17%;
  width: 8px;
  height: 8px;
  background: #caff56;
  box-shadow: 22px -10px 0 rgba(128, 83, 219, .24), -16px 19px 0 rgba(32, 32, 36, .12);
}

.qm-section[data-tone="dark"] .qm-stage::before,
.qm-section[data-tone="dark"] .qm-stage::after {
  display: none;
}

.qm-stage > .qm-eyebrow,
.qm-stage > .qm-copy,
.qm-stage > .qm-bottom {
  opacity: var(--qm-enter);
  filter: blur(var(--qm-reveal-blur));
  transform: translate3d(0, var(--qm-reveal-y), 0);
  will-change: opacity, filter, transform;
}

.qm-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 0;
  color: var(--qm-secondary);
  font-size: 10px;
  line-height: 1.5;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.qm-eyebrow > span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--qm-accent);
}

.qm-copy {
  padding: clamp(28px, 3.4vw, 52px) 0 clamp(30px, 3.6vw, 56px);
}

.qm-section h2 {
  max-width: 1100px;
  margin: 0 auto;
  font-family: var(--font-inter-tight, 'Inter Tight', sans-serif);
  font-size: clamp(46px, 5.55vw, 92px);
  font-weight: 450;
  line-height: 1.13;
  letter-spacing: -.025em;
  text-align: center;
  text-wrap: balance;
  color: var(--qm-ink);
}

.qm-line {
  display: block;
}

.qm-line--accent {
  --qm-ink: var(--qm-accent);
  color: var(--qm-accent);
}

.qm-word {
  display: inline-block;
  padding-block: .08em;
  margin-block: -.08em;
}

@supports (background-clip: text) or (-webkit-background-clip: text) {
  .qm-section.is-enhanced .qm-word {
    color: transparent;
    -webkit-text-fill-color: transparent;
    background-image: linear-gradient(90deg, var(--qm-ink) var(--qm-word-fill, 0%), var(--qm-dim) calc(var(--qm-word-fill, 0%) + 16%));
    background-clip: text;
    -webkit-background-clip: text;
  }
}

.qm-bottom {
  width: min(100%, 960px);
  margin: 0 auto;
}

.qm-reading-track {
  width: 112px;
  height: 1px;
  margin: 0 auto 32px;
  background: var(--qm-rule);
  overflow: hidden;
}

.qm-reading-track > span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--qm-accent);
  transform: scaleX(var(--qm-progress, 1));
  transform-origin: left center;
}

.qm-signoff {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px 32px;
}

.qm-signoff p,
.qm-signoff a {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .005em;
  color: var(--qm-secondary);
}

.qm-signoff a {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: var(--qm-ink);
  transition: color .2s ease;
}

.qm-signoff a:hover {
  color: var(--qm-accent);
}

.qm-signoff a:focus-visible {
  outline: 1px solid var(--qm-accent);
  outline-offset: 7px;
  border-radius: 2px;
}

@media (max-width: 700px) {
  .qm-stage {
    padding: 68px 20px 0;
  }

  .qm-section h2 {
    font-size: clamp(32px, 7.9vw, 52px);
    line-height: 1.28;
    letter-spacing: -.02em;
  }

  .qm-copy {
    padding: 28px 0 32px;
  }

  .qm-signoff {
    flex-direction: column;
    gap: 12px;
  }

  .qm-section.is-reveal-ready {
    filter: blur(10px);
    transform: translateY(16px) scale(.995);
  }

  .qm-signoff p,
  .qm-signoff a {
    font-size: 11px;
  }
}

@media (max-height: 560px) and (min-width: 701px) {
  .qm-stage {
    padding-block: 56px 52px;
  }

  .qm-section h2 {
    font-size: clamp(36px, 8svh, 58px);
  }

  .qm-copy {
    padding-block: 24px;
  }
}

@media (prefers-reduced-motion: reduce), print {
  .qm-section.is-reveal-ready,
  .qm-section.is-reveal-ready.is-revealed {
    opacity: 1;
    filter: none;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .qm-section.is-enhanced {
    height: auto;
  }

  .qm-section.is-enhanced .qm-stage {
    position: static;
    height: auto;
    min-height: 0;
  }

  .qm-section.is-enhanced .qm-word {
    color: var(--qm-ink);
    -webkit-text-fill-color: var(--qm-ink);
    background: none;
  }

  .qm-reading-track > span {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  .qm-section {
    --qm-dim: var(--qm-ink);
  }
}
