/* Broad moving planes sit behind the content. Scrolling supplies their position. */
[data-motion-field] { position: relative; isolation: isolate; overflow: clip; }
[data-motion-field]::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -28% -17%;
  pointer-events: none;
  background:
    linear-gradient(128deg,transparent 20%,#bda6cb46 20%,#d5badc20 48%,transparent 48%),
    linear-gradient(61deg,transparent 57%,#ab89b02e 57%,#f8eefb45 81%,transparent 81%);
  transform: translate3d(calc((var(--field-progress,.5) - .5) * 12%),calc((var(--field-progress,.5) - .5) * -14%),0);
}
:is([data-motion-field="atlas"],[data-motion-field="consultation"],.mast-night,.mast-plum)::before {
  inset: -20% -14%;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  opacity: 1;
  background:
    linear-gradient(123deg,transparent 21%,#50315f9e 21%,#b385ba38 57%,transparent 57%),
    linear-gradient(65deg,transparent 55%,#ad8ab33d 55%,#744c8582 76%,transparent 76%);
}
:is(.mast-night,.mast-plum) .eyebrow { color: #ede2f1; }
[data-motion-field="album"]::before {
  clip-path: polygon(0 0,88% 0,100% 80%,0 98%);
  background: linear-gradient(131deg,#e9d4ed88 19%,#c6a7d16e 58%,#efe6f3aa 87%);
  transform: translate3d(calc((var(--field-progress,.5) - .5) * -24%),calc((var(--field-progress,.5) - .5) * 17%),0);
}
[data-motion-field="archive"]::before { transform: translate3d(calc((var(--field-progress,.5) - .5) * -18%),calc((var(--field-progress,.5) - .5) * 9%),0); }

[data-cut-reveal] { position: relative; isolation: isolate; overflow: clip; }
.motion-enhanced [data-cut-reveal]::before, .motion-enhanced [data-cut-reveal="split"]::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
  opacity: calc(1 - var(--cut-open,0));
  background: linear-gradient(117deg,#6a487c 0%,#986fa6 65%,#d2b7dc 98%,#e6edb4 98%);
  transition: transform .88s var(--ease),opacity .71s var(--ease);
}
.motion-enhanced [data-cut-reveal]:is(.is-revealed,:focus-within) { --cut-open: 1; }
.motion-enhanced [data-cut-reveal][data-cut-scrub] { --cut-open: var(--cut-progress,0); }
.motion-enhanced [data-cut-reveal][data-cut-scrub]:focus-within { --cut-open: 1; }
.motion-enhanced [data-cut-scrub]::before, .motion-enhanced [data-cut-scrub]::after { transition: none; }
.motion-enhanced [data-cut-reveal="diagonal"]::before {
  clip-path: polygon(0 0,100% 0,82% 100%,0 100%);
  transform: translateX(calc(-109% * var(--cut-open,0)));
}
.motion-enhanced [data-cut-reveal="reverse"]::before {
  clip-path: polygon(18% 0,100% 0,100% 100%,0 100%);
  transform: translate3d(calc(108% * var(--cut-open,0)),calc(-13% * var(--cut-open,0)),0);
  background: linear-gradient(103deg,#dfecaa 2%,#ad8fba 2%,#785485 57%,#452950);
}
.motion-enhanced [data-cut-reveal="rise"]::before {
  clip-path: polygon(0 0,100% 0,100% 70%,0 100%);
  transform: translate3d(calc(-12% * var(--cut-open,0)),calc(-112% * var(--cut-open,0)),0);
}
.motion-enhanced [data-cut-reveal="slant"]::before {
  clip-path: polygon(0 30%,100% 0,100% 100%,0 100%);
  transform: translate3d(calc(39% * var(--cut-open,0)),calc(112% * var(--cut-open,0)),0);
}
.motion-enhanced [data-cut-reveal="split"]::before {
  clip-path: polygon(0 0,100% 0,100% 29%,0 69%);
  transform: translate3d(calc(-36% * var(--cut-open,0)),calc(-84% * var(--cut-open,0)),0);
}
.motion-enhanced [data-cut-reveal="split"]::after {
  clip-path: polygon(0 69%,100% 29%,100% 100%,0 100%);
  transform: translate3d(calc(41% * var(--cut-open,0)),calc(84% * var(--cut-open,0)),0);
  background: linear-gradient(106deg,#a383b4,#795687 64%,#4e315e);
}
.motion-enhanced :is(.journey-image,.portrait-surface)[data-cut-scrub] > img {
  transform: scale(calc(1 + (1 - var(--cut-open,0)) * .105));
}
.album-stage.is-arriving button::before, .album-stage.is-arriving button::after {
  position: absolute;
  z-index: 1;
  content: "";
  inset: 0;
  pointer-events: none;
}
.album-stage.is-arriving button::before {
  clip-path: polygon(0 0,100% 0,100% 21%,0 70%);
  background: #8b669c;
  animation: photo-upper .63s var(--ease) both;
}
.album-stage.is-arriving button::after {
  clip-path: polygon(0 70%,100% 21%,100% 100%,0 100%);
  background: #51335f;
  animation: photo-lower .71s var(--ease) both;
}
@keyframes photo-upper { to { transform: translate3d(-38%,-108%,0); opacity: .04; } }
@keyframes photo-lower { to { transform: translate3d(49%,108%,0); opacity: .04; } }

.patient-tools { grid-template-columns: repeat(4,minmax(0,1fr)); }
.patient-tools h3 { font-size: clamp(1.5rem,2.5vw,2.24rem); }
@media (max-width: 70rem) {
  .patient-tools { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .patient-tools article:nth-child(even) { padding-inline-end: 0; }
  .patient-tools article:nth-child(odd) { border-left: 0; padding-inline-start: 0; }
  .patient-tools article:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (max-width: 41rem) {
  .patient-tools { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  [data-motion-field]::before { transform: none; }
  .motion-enhanced [data-cut-reveal]::before,
  .motion-enhanced [data-cut-reveal="split"]::after,
  .album-stage.is-arriving button::before,
  .album-stage.is-arriving button::after { display: none; }
  .motion-enhanced :is(.journey-image,.portrait-surface)[data-cut-scrub] > img { transform: none; }
}

/* Cropped corners carry the same motif into still frames. */
.journey-image { clip-path: polygon(0 0,100% 0,100% 78%,87% 100%,0 100%); }
.portrait-surface { clip-path: polygon(10% 0,100% 0,100% 100%,0 100%,0 14%); }
.mast-art { clip-path: polygon(0 0,92% 0,100% 15%,100% 100%,0 100%); }
.album-sleeve { clip-path: polygon(0 0,100% 0,100% 86%,92% 100%,0 100%); }
.album-sleeve.sleeve-1 { clip-path: polygon(0 0,92% 0,100% 15%,100% 100%,0 100%); }
.album-sleeve.sleeve-2 { clip-path: polygon(8% 0,100% 0,100% 84%,91% 100%,0 100%,0 13%); }
.album-stage button img { clip-path: polygon(0 0,94% 0,100% 9%,100% 100%,4% 100%,0 91%); }
.contact-sheet img { clip-path: polygon(0 0,90% 0,100% 16%,100% 100%,0 100%); }
.contact-sheet li:nth-child(even) img { clip-path: polygon(0 0,100% 0,100% 83%,90% 100%,0 100%); }
.flyout-art { clip-path: polygon(14% 0,100% 0,100% 100%,0 100%); }
.scan-link { clip-path: polygon(0 0,95% 0,100% 9%,100% 100%,0 100%); }

/* The opening pane and the profile share an edge and a surface color. */
html:has(.page-home) { scrollbar-gutter: stable; }
.page-home { --profile-curtain-color: #42264e; }
[data-motion-field="hero"] {
  background: linear-gradient(111deg,#faf7fb 10%,#f0e5f3 72%,#e1cced);
}
[data-motion-field="hero"]::before {
  inset: -21% -15%;
  background: linear-gradient(117deg,transparent 53%,#e0cbeab3 53%,#faf1fa 67%,#bc9dd74d 67%,transparent 80%);
  transform: translate3d(calc(var(--hero-travel,0) * -17%),calc(var(--hero-travel,0) * -9%),0);
}
[data-motion-field="hero"]::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -16% -30% 40%;
  pointer-events: none;
  background: linear-gradient(148deg,#cfb8df6b,#e8d9f041 54%,#ad86c66e 55%,#f9eef9a3);
  clip-path: polygon(41% 0,100% 0,100% 89%,0 100%);
  transform: translate3d(calc(var(--hero-travel,0) * 14%),calc(var(--hero-travel,0) * -16%),0);
}
.intro-byline a {
  text-decoration-color: #9a7ca9;
  text-underline-offset: .2em;
}
.intro-byline a:hover { color: var(--ink); }
.intro-lede {
  max-width: 35ch;
  margin-block-start: .92rem;
  color: #4d3b54;
  font-size: clamp(1rem,1.37vw,1.13rem);
  line-height: 1.62;
}
.profile-plate {
  position: relative;
  min-height: clamp(35rem,53vw,49rem);
  --profile-edge-top: 22%;
  --profile-edge-bottom: 1%;
}
.plate-field,
.plate-face,
.plate-camera {
  position: absolute;
  inset: 0;
}
.plate-field {
  isolation: isolate;
  overflow: hidden;
  clip-path: polygon(var(--profile-edge-top) 0,100% 0,100% 100%,var(--profile-edge-bottom) 100%);
  background: linear-gradient(128deg,#26142de0 7%,#2d183ca0 53%,#39214c61), url("/assets/media/atlas-alabaster.webp") 58% 52% / cover #3e2549;
}
.plate-field::after {
  content: "";
  position: absolute;
  z-index: 3;
  inset: auto 0 0;
  height: 27%;
  pointer-events: none;
  background: linear-gradient(0deg,#211427ed 0%,#29183585 36%,transparent 100%);
}
.plate-face {
  overflow: hidden;
  clip-path: polygon(min(100%,calc(var(--hero-cut,0) * 108%)) 0,100% 0,100% 100%,calc(var(--hero-cut,0) * 79%) 100%);
  background: #c9b8d2;
}
.plate-camera {
  transform: translate3d(calc(var(--hero-travel,0) * -3%),calc(var(--hero-travel,0) * -4%),0) scale(calc(1 + var(--hero-travel,0) * .13));
}
.plate-camera img, .profile-contour {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 28% 42%;
}
.profile-contour { pointer-events: none; }
.profile-controls {
  position: absolute;
  z-index: 5;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .2rem .65rem;
  padding: .35rem clamp(1rem,3.8vw,3.1rem) clamp(.65rem,2.05vw,1.5rem);
  color: #fef8ff;
  font-size: .875rem;
  font-weight: 590;
}
.profile-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .48rem;
  min-height: 2.75rem;
  padding: .27rem .65rem;
  border: 1px solid #ceb5d7;
  background: #38233f;
  color: #fff9ff;
  font-size: .875rem;
  cursor: pointer;
  transition: color .22s,background .22s,border-color .22s;
}
.profile-toggle::before {
  content: "";
  width: .72rem;
  height: .72rem;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: linear-gradient(currentColor,currentColor) 50% / 100% 1px no-repeat,
              linear-gradient(currentColor,currentColor) 50% / 1px 100% no-repeat;
}
.profile-toggle[aria-pressed="true"], .profile-toggle:hover {
  color: #281a2f;
  background: var(--highlight);
  border-color: var(--highlight);
}
.profile-toggle:focus-visible { outline-color: var(--highlight); }
.plate-curtain {
  position: absolute;
  z-index: 4;
  inset: 0;
  background: var(--profile-curtain-color);
  visibility: hidden;
  pointer-events: none;
}
.opening-active .plate-curtain, .awaiting-reveal .plate-curtain, .is-unveiling .plate-curtain { visibility: visible; }
.home-motion .is-unveiling .plate-curtain { animation: unveil-profile .91s var(--ease) both; }
@keyframes unveil-profile {
  from { clip-path: polygon(0 0,100% 0,100% 100%,0 100%); transform: none; }
  to {
    clip-path: polygon(96% 0,100% 0,100% 100%,85% 100%);
    transform: translateX(20%);
    visibility: hidden;
  }
}
.plate-beam {
  position: absolute;
  z-index: 2;
  inset: -24%;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(119deg,transparent 33%,#fff8fc62 45%,#f1fac6a3 49%,#f6e3ffa1 54%,transparent 67%);
  mix-blend-mode: soft-light;
}
.home-motion .is-lit .plate-beam { animation: plate-light-pass 2.15s var(--plate-light-delay,.08s) var(--ease) both; }
.is-unveiling { --plate-light-delay: .55s; }
@keyframes plate-light-pass {
  from { transform: translateX(-56%); opacity: 0; }
  18% { opacity: .88; }
  75% { opacity: .56; }
  to { transform: translateX(62%); opacity: 0; }
}
.atlas-fragment img { object-position: 50% 54%; }
.flyout-art {
  background: linear-gradient(143deg,#e2d0e7 23%,#a68ab5 23%,#c7abce 47%,#74537f 47%,#b48ec0 76%,#493154 76%);
}
.consult-band .secondary {
  color: #fff8ff;
  border-color: #ceb9d7;
  background: #4e3558;
}
.consult-band .secondary:is(:hover,:focus-visible) {
  color: #2b1933;
  background: #f0e6f4;
  border-color: #f0e6f4;
}
@media (max-width: 56rem) {
  .intro-lede { max-width: 44ch; margin-block-start: .75rem; }
}
@media (max-width: 41rem) {
  .profile-plate {
    min-height: clamp(20rem,99vw,33rem);
    --profile-edge-top: 13%;
    --profile-edge-bottom: 0%;
  }
  .plate-camera img, .profile-contour { object-position: 32% 40%; }
  .profile-controls { padding-inline: var(--gutter); }
}
@media (prefers-reduced-motion: reduce) {
  [data-motion-field="hero"]::before, [data-motion-field="hero"]::after, .plate-camera { transform: none; }
  .plate-face { clip-path: none; }
  .plate-curtain, .plate-beam { display: none; }
}
