/* Home V3 night continuity — Moments + Early Proof
   Loaded after the canonical studies. Scope is intentionally limited to
   #who.mh-moments and #preuve.sp-proof. */

section#who.mh-moments {
  --mh-night: var(--uck-night-950, #0a101b);
  --mh-night-soft: var(--uck-night-800, #162a46);
  --mh-cobalt: var(--uck-night-700, #1c3658);
  --mh-blue: var(--uck-blue-500, #68a8e8);
  --mh-coral: var(--uck-coral-500, #ff315b);
  --mh-result: var(--uck-result-500, #5ca897);
  --mh-paper: var(--uck-paper-50, #fffefd);
}

section#who.mh-moments .mh-rail-shell {
  padding: 1px !important;
  background: linear-gradient(
    118deg,
    rgba(255, 49, 91, .32),
    rgba(104, 168, 232, .42) 48%,
    rgba(92, 168, 151, .3)
  ) !important;
  box-shadow:
    0 30px 72px rgba(10, 16, 27, .1),
    inset 0 1px 0 rgba(255, 255, 255, .82) !important;
}

section#who.mh-moments .mh-rail {
  background: rgba(255, 254, 253, .72) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  backdrop-filter: blur(14px) !important;
}

section#who.mh-moments .mh-moment {
  --glow: rgba(104, 168, 232, .22) !important;
  --badge: rgba(255, 49, 91, .94) !important;
  border-color: rgba(168, 207, 243, .34) !important;
  background: #c9d4df !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .32),
    0 22px 42px rgba(10, 16, 27, .14) !important;
}

/* The source photography carries its own texture. Restoring colour and clean
   mid-tones makes that texture recede without adding a smoothing overlay. */
section#who.mh-moments .mh-moment-img {
  transform: scale(1.012) !important;
  filter: saturate(1.025) contrast(1.008) brightness(1.01) !important;
  transition:
    transform 560ms cubic-bezier(.2, .75, .22, 1),
    filter 560ms ease !important;
}

section#who.mh-moments .mh-moment::after {
  background:
    linear-gradient(
      180deg,
      rgba(10, 16, 27, 0) 0%,
      rgba(10, 16, 27, .04) 36%,
      rgba(10, 16, 27, .38) 64%,
      rgba(10, 16, 27, .94) 100%
    ),
    radial-gradient(circle at 18% 80%, var(--glow), transparent 44%) !important;
}

section#who.mh-moments .mh-moment:hover .mh-moment-img,
section#who.mh-moments .mh-moment:focus .mh-moment-img,
section#who.mh-moments .mh-moment.mh-is-revealed .mh-moment-img {
  transform: scale(1.048) !important;
  filter: saturate(1.055) contrast(1.012) brightness(1.018) !important;
}

/* One semantic badge system: coral = active moment, cobalt = continuity,
   green = a result ready for another person. */
section#who.mh-moments .mh-moment--work,
section#who.mh-moments .mh-moment--voice {
  --glow: rgba(255, 49, 91, .25) !important;
  --badge: rgba(219, 23, 68, .95) !important;
}

section#who.mh-moments .mh-moment--trip,
section#who.mh-moments .mh-moment--learn,
section#who.mh-moments .mh-moment--family {
  --glow: rgba(104, 168, 232, .24) !important;
  --badge: rgba(28, 54, 88, .94) !important;
}

section#who.mh-moments .mh-moment--brief {
  --glow: rgba(92, 168, 151, .24) !important;
  --badge: rgba(47, 111, 104, .95) !important;
}

section#who.mh-moments .mh-label {
  border-color: rgba(255, 255, 255, .28) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .18),
    0 9px 22px rgba(10, 16, 27, .18) !important;
}

section#who.mh-moments .mh-story {
  color: rgba(255, 255, 255, .88) !important;
}

section#who.mh-moments .mh-keep::before {
  background: var(--mh-result) !important;
  box-shadow: 0 0 0 4px rgba(92, 168, 151, .16) !important;
}

section#who.mh-moments .mh-chip {
  color: rgba(255, 255, 255, .95) !important;
  border-color: rgba(168, 207, 243, .28) !important;
  background: rgba(15, 27, 44, .72) !important;
  box-shadow:
    0 12px 28px rgba(10, 16, 27, .2),
    inset 0 1px 0 rgba(255, 255, 255, .1) !important;
  -webkit-backdrop-filter: blur(16px) saturate(1.08) !important;
  backdrop-filter: blur(16px) saturate(1.08) !important;
}

section#who.mh-moments .mh-moment:hover .mh-chip,
section#who.mh-moments .mh-moment:focus .mh-chip,
section#who.mh-moments .mh-moment.mh-is-revealed .mh-chip {
  color: #fff !important;
  background: rgba(22, 42, 70, .9) !important;
  box-shadow:
    0 16px 34px rgba(10, 16, 27, .25),
    inset 0 1px 0 rgba(255, 255, 255, .14) !important;
}

section#who.mh-moments .mh-tool-drawer {
  border-color: rgba(168, 207, 243, .2) !important;
  background: rgba(10, 16, 27, .86) !important;
  box-shadow:
    0 14px 32px rgba(10, 16, 27, .24),
    inset 0 1px 0 rgba(255, 255, 255, .1) !important;
}

section#who.mh-moments .mh-drawer-label {
  color: #ff7894 !important;
  border-inline-end-color: rgba(168, 207, 243, .18) !important;
}

section#who.mh-moments .mh-tool:hover,
section#who.mh-moments .mh-tool:focus-visible {
  color: #f2f8ff !important;
  background: rgba(104, 168, 232, .16) !important;
  box-shadow: inset 0 0 0 1px rgba(168, 207, 243, .24) !important;
}

section#who.mh-moments .mh-reveal-cue,
section#who.mh-moments .mh-arrow {
  color: #fff !important;
  border-color: rgba(168, 207, 243, .34) !important;
  background: var(--mh-night-soft) !important;
  box-shadow:
    0 12px 28px rgba(10, 16, 27, .2),
    inset 0 1px 0 rgba(255, 255, 255, .1) !important;
}

section#who.mh-moments .mh-arrow:hover {
  background: var(--mh-cobalt) !important;
}

section#preuve.sp-proof {
  --sp-night: var(--uck-night-800, #162a46);
  --sp-cobalt: var(--uck-night-700, #1c3658);
  --sp-blue: var(--uck-blue-500, #68a8e8);
  --sp-blue-pale: var(--uck-blue-100, #eaf3fb);
  --sp-coral: var(--uck-coral-500, #ff315b);
  --sp-coral-deep: var(--uck-coral-600, #db1744);
  --sp-result: var(--uck-result-600, #2f6f68);
  --sp-result-pale: var(--uck-result-100, #dfeee9);
  --sp-paper: var(--uck-paper-50, #fffefd);
  --sp-ivory: var(--uck-paper-100, #f8f5f0);
  --sp-line: var(--uck-line-light, rgba(22, 42, 70, .13));
}

section#preuve.sp-proof .sp-card {
  border-color: var(--sp-line) !important;
  box-shadow: 0 8px 24px rgba(10, 16, 27, .045) !important;
}

section#preuve.sp-proof .sp-card:hover {
  box-shadow: 0 16px 32px rgba(10, 16, 27, .09) !important;
}

section#preuve.sp-proof .sp-metric--green {
  color: #fff !important;
  background: var(--sp-result) !important;
}

section#preuve.sp-proof .sp-metric--yellow {
  color: var(--sp-night) !important;
  background: var(--sp-blue-pale) !important;
}

section#preuve.sp-proof .sp-metric--pink {
  color: #fff !important;
  background: var(--sp-coral-deep) !important;
}

section#preuve.sp-proof .sp-metric--blue {
  color: #fff !important;
  background: var(--sp-cobalt) !important;
}

section#preuve.sp-proof .sp-metric--cream {
  color: var(--sp-night) !important;
  background: var(--sp-ivory) !important;
}

section#preuve.sp-proof .sp-metric--peach {
  color: var(--sp-night) !important;
  background: linear-gradient(145deg, #dcecf9, var(--sp-blue-pale)) !important;
}

section#preuve.sp-proof .sp-quote {
  border-color: var(--sp-line) !important;
  background: rgba(255, 254, 253, .94) !important;
  box-shadow:
    0 8px 24px rgba(10, 16, 27, .045),
    inset 0 1px 0 rgba(255, 255, 255, .86) !important;
}

section#preuve.sp-proof .sp-quote::after {
  width: 3px !important;
  background: linear-gradient(180deg, var(--sp-coral), var(--sp-blue)) !important;
}

section#preuve.sp-proof .sp-quote__label {
  color: var(--sp-coral-deep) !important;
}

section#preuve.sp-proof .sp-quote__label::before,
section#preuve.sp-proof .sp-quote__initial {
  background: var(--sp-coral-deep) !important;
}

section#preuve.sp-proof .sp-quote__footer {
  border-top-color: rgba(22, 42, 70, .1) !important;
}

section#preuve.sp-proof .sp-quote__person span,
section#preuve.sp-proof .sp-proof__note {
  color: var(--uck-ink-600, #625e5a) !important;
}

@media (max-width: 900px) {
  section#who.mh-moments .mh-rail {
    background: rgba(255, 254, 253, .82) !important;
  }

  section#who.mh-moments .mh-moment {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, .3),
      0 18px 34px rgba(10, 16, 27, .13) !important;
  }

  section#preuve.sp-proof .sp-mosaic {
    gap: 10px !important;
  }
}

@media (max-width: 540px) {
  section#who.mh-moments .mh-rail-shell {
    border-radius: 12px !important;
  }

  section#who.mh-moments .mh-rail {
    border-radius: 11px !important;
  }

  section#who.mh-moments .mh-moment {
    border-radius: 9px !important;
  }

  section#who.mh-moments .mh-chip {
    inset-block-start: 18px !important;
    inset-inline-end: 18px !important;
    max-width: calc(100% - 36px) !important;
  }

  section#who.mh-moments .mh-moment:nth-child(even) .mh-chip {
    inset-inline: 18px auto !important;
  }

  section#preuve.sp-proof .sp-card {
    border-radius: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  section#who.mh-moments .mh-moment-img,
  section#who.mh-moments .mh-chip,
  section#who.mh-moments .mh-tool-drawer,
  section#who.mh-moments .mh-keep,
  section#who.mh-moments .mh-reveal-cue,
  section#who.mh-moments .mh-arrow,
  section#preuve.sp-proof .sp-card {
    transition: none !important;
  }

  section#who.mh-moments .mh-moment:hover .mh-moment-img,
  section#who.mh-moments .mh-moment:focus .mh-moment-img,
  section#who.mh-moments .mh-moment.mh-is-revealed .mh-moment-img,
  section#preuve.sp-proof .sp-card:hover {
    transform: none !important;
  }
}
