:root {
  --glass-fill: #60726b30;
  --glass-edge: #d1dfd844;
  --glass-top: #e6efea62;
  --glass-bottom: #060c0980;
  --glass-light: #dfece724;
  --glass-glint: #f3fff536;
  --glass-text: #f1f6f3;
  --track-fill: #101713bb;
  --lens-fill: #34563f;
  --lens-edge: #b4e6c5a6;
  --lens-text: #f7fff8;
  --glass-release: cubic-bezier(.2,1.45,.35,1);
}

.paper,.lab-story,.stillform.case-masthead,.project-info {
  --glass-fill: #fffaf24d;
  --glass-edge: #69574266;
  --glass-top: #ffffffdb;
  --glass-bottom: #65503a36;
  --glass-light: #fffdf78c;
  --glass-glint: #ffffffe0;
  --glass-text: #2d241e;
  --track-fill: #b5a59042;
  --lens-fill: #f4c79f;
  --lens-edge: #9a6041aa;
  --lens-text: #361e12;
}

/* Fixed rim reflections give the resting shape depth. Only the light inside it moves. */
:where(button,summary,a:not(.brand,.project-link,.next-link),[data-glass-face]) {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background-color: var(--glass-fill);
  background-image:
    radial-gradient(ellipse 75% 70% at 22% -8%,var(--glass-light),transparent 95%),
    radial-gradient(ellipse 65% 45% at 88% 110%,var(--glass-light),transparent),
    linear-gradient(157deg,#ffffff11,transparent 46%,#00000009 72%,#ffffff0a);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  color: var(--glass-text);
  box-shadow: inset 0 1px 1px var(--glass-top),inset 1px 0 2px #fff2,
    inset 0 -2px 3px var(--glass-bottom),0 2px 5px #100b091a;
  transition: scale .46s var(--glass-release),translate .4s var(--ease),
    background-color .22s,border-color .22s,box-shadow .22s,color .18s;
  -webkit-tap-highlight-color: transparent;

  &::after {
    content: '';
    position: absolute;
    z-index: -1;
    inset: -25% -15%;
    pointer-events: none;
    background: radial-gradient(ellipse 45% 76% at 50% 50%,var(--glass-glint),transparent);
    transform: translate(var(--glass-x,-23%),var(--glass-y,-32%));
    opacity: .55;
    transition: transform .32s var(--ease),opacity .26s;
  }
}

@media(hover:hover) {
  :where(button:not(:disabled),summary,a:not(.brand,.project-link,.next-link)):hover,
  :where(a,.sizes label):hover [data-glass-face] {
    border-color: color-mix(in srgb,var(--glass-edge),var(--glass-text) 32%);
  }
  :where(button:not(:disabled),summary,a):hover::after,
  :where(a,.sizes label):hover [data-glass-face]::after {
    opacity: 1;
  }
}

@media(prefers-reduced-motion:no-preference) {
  html:not(.motion-off) :where(button:not(:disabled),summary,a:not(.brand,.project-link,.next-link)):active,
  html:not(.motion-off) :where(a,.sizes label):active [data-glass-face] {
    scale: .964 .94;
    transition-duration: .11s;
  }
}

:where(button,summary,a):focus-visible::after,
:where(a:focus-visible,.sizes label:focus-within) [data-glass-face]::after {
  opacity: 1;
}

.button.primary {
  --glass-fill: #7cff6b;
  --glass-edge: #d7ffe2a8;
  --glass-top: #e3ffe3c2;
  --glass-bottom: #31763d66;
  --glass-light: #dcffd661;
  --glass-glint: #deffe86e;
  --glass-text: #102414;
  color: var(--glass-text);
  box-shadow: inset 0 1px 2px var(--glass-top),inset 0 -3px 5px var(--glass-bottom),0 3px 15px #57dc6c1a;
}

/* Curved highlights catch opposite sides of the edge. The mask leaves the face clear. */
:where(button:not(.motion-toggle),summary,a:not(.brand,.project-link,.next-link),[data-glass-face])::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  padding: 1px;
  background: conic-gradient(from 120deg,transparent 5%,var(--glass-top) 20%,transparent 34% 55%,var(--glass-top) 74%,transparent 87%);
  -webkit-mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  mask: linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

.button.primary:disabled {
  opacity: .75;
  cursor: wait;
}

.brand-mark,.next-icon {
  display: inline-grid;
  place-items: center;
  flex: none;
}

.brand-mark {
  padding: 6px;
  border-radius: 11px;
}

.next-link {
  display: inline-flex;
  align-items: center;
  gap: .24em;
}

.next-icon {
  width: .72em;
  height: .72em;
  min-width: 34px;
  min-height: 34px;
}

.scroll-link,.form-end a,.footer a:not(.brand) {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  text-decoration: none;
}

.skip:focus {
  --glass-glint: #fff9;
}

.main-nav a {
  --glass-fill: #ecfff205;
  --glass-edge: #ecfff21c;
  --glass-top: #ecfff21c;
  --glass-bottom: #0004;
  --glass-light: #ecfff211;
  --glass-glint: #ecfff221;
}

.main-nav a[aria-current],.menu-toggle[aria-expanded=true],
.cap-list details[open] summary,.optional-field[open] summary {
  --glass-fill: #3a55464f;
  --glass-edge: #95afa089;
}

.main-nav a[aria-current] {
  color: #c8f1d4;
}

.cap-list summary {
  border-radius: 19px;
}

.plate-controls,.segmented,.exhibit-controls,.size-options {
  position: relative;
  isolation: isolate;
  border-radius: 999px;
  border: 1px solid var(--glass-edge);
  padding: 3px;
  background: linear-gradient(170deg,#0001,transparent 50%,#fff1),var(--track-fill);
  box-shadow: inset 0 2px 4px var(--glass-bottom),0 1px 0 #fff2;
  -webkit-backdrop-filter: blur(12px) saturate(145%);
  backdrop-filter: blur(12px) saturate(145%);
}

.size-options {
  display: inline-flex;
  gap: 3px;
}

:where(.plate-controls,.segmented,.exhibit-controls) button,.size-options [data-glass-face] {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

:where(.plate-controls,.segmented,.exhibit-controls) button::before,.size-options [data-glass-face]::before {
  content: none;
}

:where(.plate-controls,.segmented,.exhibit-controls) button:not(:hover,:focus-visible)::after,
.size-options label:not(:hover,:focus-within) [data-glass-face]::after {
  opacity: .15;
}

:where(.plate-controls,.segmented,.exhibit-controls) button[aria-pressed=true],
.size-options input:checked+span,[data-zoom][aria-pressed=true],.glass-selection {
  color: var(--lens-text);
  border: 1px solid var(--lens-edge);
  background: radial-gradient(ellipse 80% 75% at 30% -12%,#fffa,transparent),
    linear-gradient(155deg,#fff1,transparent 56%,#d2ffe126),var(--lens-fill);
  box-shadow: inset 0 1px 1.5px #fffb,inset 0 -2px 3px var(--glass-bottom),0 2px 4px #180f0a26;
}

.glass-selection {
  position: absolute;
  inset: 0 auto auto 0;
  border-radius: 999px;
  pointer-events: none;
  visibility: hidden;
}

.has-lens .glass-selection {
  visibility: visible;
}

.has-lens :is(button,label) {
  z-index: 1;
}

.has-lens button[aria-pressed=true],.has-lens input:checked+span {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.magnet {
  translate: var(--magnet-x,0px) var(--magnet-y,0px);
}

@media(forced-colors:active) {
  .has-lens .glass-selection {
    visibility: hidden;
  }
  .has-lens button[aria-pressed=true],.size-options input:checked+span {
    border-color: Highlight;
  }
}
