/* A glass surface shared by screenshot annotations and the social preview. */
.floating-note.glass-card,
.feature-visual .visual-tag.glass-card,
.chip.glass-card {
  --glass-x: 28%;
  --glass-y: 12%;
  color: #1d2938;
  border: 1px solid rgba(255, 255, 255, .78);
  background:
    radial-gradient(ellipse at var(--glass-x) var(--glass-y), #ffffffe6, #ffffff00 65%),
    linear-gradient(135deg, #ffffffa6, #ffffff96 45%, #ffffffb3);
  -webkit-backdrop-filter: blur(16px) saturate(1.65) brightness(1.12);
  backdrop-filter: blur(16px) saturate(1.65) brightness(1.12);
  box-shadow:
    0 16px 40px -18px #18304c66,
    0 4px 12px -6px #18304c33,
    inset 0 1px 1px #ffffff,
    inset 0 -1px 2px #ffffffcc,
    inset 1px 0 1px #ffffffb3,
    inset -1px 0 2px #8ca6be40;
  overflow: hidden;
  text-shadow: 0 1px 3px #ffffffb3;
}

.glass-card::before,
.glass-card::after {
  content: '';
  position: absolute;
  pointer-events: none;
  border-radius: inherit;
}

.glass-card::before {
  inset: 0;
  background: linear-gradient(115deg, #fff0 12%, #ffffff70 27%, #fff0 40%);
  opacity: .65;
}

.glass-card::after {
  inset: 2px;
  border-top: 1px solid #ffffffb3;
  border-bottom: 1px solid #ffffff80;
  box-shadow: inset 0 0 12px #ffffff30;
}

.glass-card > * {
  position: relative;
  z-index: 1;
}

.floating-note.glass-card small {
  color: #3d4b5b;
}

.glass-card .note-symbol {
  flex-shrink: 0;
  background: #e1f4da8c;
  border: 1px solid #ffffffa6;
  box-shadow: inset 0 1px 2px #fff, 0 2px 6px #19334b0d;
}

.note-right.glass-card .note-symbol {
  background: #ece3ff99;
}

/* The duplicate group is only exposed visually when motion is enabled. */
.proof-strip {
  position: relative;
  display: block;
  padding-block: 25px;
}

.proof-window {
  overflow: hidden;
}

.proof-track {
  display: flex;
  width: 100%;
}

.proof-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px 36px;
  flex: 0 0 100%;
}

.proof-group > span {
  white-space: nowrap;
}

.proof-repeat {
  display: none;
}

.motion-enabled .proof-window {
  -webkit-mask-image: linear-gradient(90deg, #0000, #000 4%, #000 96%, #0000);
  mask-image: linear-gradient(90deg, #0000, #000 4%, #000 96%, #0000);
}

.motion-enabled .proof-track {
  width: max-content;
  animation: proof-drift 40s linear infinite;
}

.motion-enabled .proof-group {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 36px;
  padding-right: 36px;
}

.motion-enabled .proof-repeat {
  display: flex;
}

@keyframes proof-drift {
  to { transform: translateX(-50%); }
}

@keyframes soft-arrival {
  from { opacity: 0; translate: 0 28px; }
  to { opacity: 1; translate: 0 0; }
}

.motion-enabled .hero-copy > * {
  animation: soft-arrival 850ms cubic-bezier(.16, 1, .3, 1) backwards;
}

.motion-enabled .hero-copy > :nth-child(2) { animation-delay: 60ms; }
.motion-enabled .hero-copy > :nth-child(3) { animation-delay: 130ms; }
.motion-enabled .hero-copy > :nth-child(4) { animation-delay: 200ms; }
.motion-enabled .hero-copy > :nth-child(5) { animation-delay: 250ms; }

/* Pause decorative loops while the page or their section is out of view. */
.page-idle *,
.page-idle *::before,
.page-idle *::after,
.showcase.motion-offscreen .floating-note,
.proof-strip.motion-offscreen .proof-track {
  animation-play-state: paused !important;
}

@media (hover: hover) and (pointer: fine) {
  .guide-card,
  .step-card {
    transition: transform 300ms cubic-bezier(.2, .8, .2, 1), box-shadow 300ms;
  }
  .guide-card:hover,
  .step-card:hover { transform: translateY(-5px); }
}

@media (max-width: 760px) {
  .proof-group { flex-wrap: wrap; gap: 15px 25px; }
  .motion-enabled .proof-group { gap: 28px; padding-right: 28px; }
  .floating-note.glass-card { -webkit-backdrop-filter: blur(12px) saturate(1.5); backdrop-filter: blur(12px) saturate(1.5); }

}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .floating-note.glass-card,
  .feature-visual .visual-tag.glass-card,
  .chip.glass-card { background: #f6f9fff2; }
}

@media (prefers-reduced-transparency: reduce) {
  .floating-note.glass-card,
  .feature-visual .visual-tag.glass-card,
  .chip.glass-card { background: #f6f9ff; -webkit-backdrop-filter: none; backdrop-filter: none; }
}

@media (prefers-reduced-motion: reduce) {
  .reveal-in { opacity: 1; translate: none; }
  .guide-card:hover,
  .step-card:hover { transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Scroll storytelling. Only decorative layers move continuously; copy stays put. */
.motion-enabled .scroll-layer {
  translate: var(--scroll-x, 0px) var(--scroll-y, 0px);
  rotate: var(--scroll-angle, 0deg);
  scale: var(--scroll-scale, 1);
}

.text-reveal .reveal-word {
  display: inline-block;
  overflow: clip;
  vertical-align: bottom;
  /* Glyph outlines extend past their advance width with negative tracking.
     Give the reveal mask breathing room without changing text wrapping. */
  padding: .06em .14em .14em;
  margin: -.06em -.14em -.14em;
  perspective: 900px;
}

.reveal-word-inner {
  display: inline-block;
  transform-origin: 0% 100%;
}

.motion-enabled.scroll-ready .reveal-word-inner {
  transition: transform 850ms cubic-bezier(.16, 1, .3, 1), opacity 550ms ease;
  transition-delay: var(--word-delay, 0ms);
}

.motion-enabled.scroll-ready .text-reveal:not(.is-inview) .reveal-word-inner {
  transform: translate3d(-.08em, 110%, 0) rotateY(-20deg) rotateZ(3deg);
  opacity: 0;
  transition-delay: 0ms;
}

.motion-enabled.scroll-ready .copy-reveal {
  transition: opacity 700ms ease 120ms, translate 800ms cubic-bezier(.16, 1, .3, 1) 120ms;
}

.motion-enabled.scroll-ready .copy-reveal:not(.is-inview) {
  opacity: 0;
  translate: 0 22px;
  transition-delay: 0ms;
}

.motion-enabled.scroll-ready .block-reveal {
  transition: opacity 650ms ease, translate 850ms cubic-bezier(.16, 1, .3, 1);
  transition-delay: var(--block-delay, 0ms);
}

.motion-enabled.scroll-ready .block-reveal:not(.is-inview):not(:focus-within) {
  opacity: 0;
  translate: 0 48px;
  transition-delay: 0ms;
}

/* A keyboard user can reveal an offscreen link card immediately by focusing it. */
.block-reveal:focus-within .reveal-word-inner {
  transform: none !important;
  opacity: 1 !important;
}

@media (prefers-reduced-motion: reduce) {
  .scroll-layer { translate: none !important; rotate: none !important; scale: none !important; }
  .reveal-word-inner { transform: none !important; opacity: 1 !important; }
  .copy-reveal, .block-reveal { opacity: 1 !important; translate: none !important; }
}
