/* Grayscale light and depth, isolated to the homepage introduction. */
#em-refined .em-hero {
  --light-x: 72%; --light-y: 38%; --edge-x: 35%; --edge-y: 15%;
  --light-shift-x: 0px; --light-shift-y: 0px;
  --tilt-x: 0deg; --tilt-y: -1deg; --sheen: -22%; --orbit: -18deg;
  --motion-strength: 1;
  overflow: hidden;
  background: linear-gradient(110deg, #101010 12%, #141414 63%, #090909);
}
#em-refined .em-hero::before { display: none; }
#em-refined .em-hero > :not(.em-lightstage) { position: relative; z-index: 1; }
#em-refined .em-lightstage {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
  z-index: 0; opacity: var(--motion-strength); contain: paint;
}
#em-refined .em-lightstage::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, #101010 1%, #101010df 23%, transparent 65%),
    linear-gradient(0deg, #101010 0%, transparent 17%, transparent 84%, #10101040);
}
#em-refined .em-halo {
  position: absolute; width: 98%; height: 135%; left: 14%; top: -18%;
  background: radial-gradient(ellipse at var(--light-x) var(--light-y), #fafafaa0 0%, #b8b8b840 15%, #68686822 34%, transparent 63%);
  transform: translate3d(var(--light-shift-x), var(--light-shift-y), 0);
}
#em-refined .em-sculpture {
  position: absolute; width: 90%; height: 150%; top: -31%; left: 40%;
  border-radius: 48%; transform: rotate(var(--orbit));
  background: linear-gradient(135deg, #070707 17%, #191919 37%, #555555 49%, #101010 50%, #060606 66%);
  box-shadow: -2px -2px 2px #ffffff17, -30px -22px 65px #c9c9c91f, 35px 30px 65px #000000b0;
  opacity: .78;
}
#em-refined .em-sculpture-secondary {
  width: 72%; height: 145%; left: 59%; top: -10%;
  background: linear-gradient(133deg, #090909 23%, #333333 49%, #090909 50%);
  transform: rotate(calc(var(--orbit) + 12deg)); opacity: .6;
}
#em-refined .em-floor-light {
  position: absolute; width: 130%; height: 60%; left: 12%; bottom: -45%;
  border-radius: 50%; transform: rotate(-14deg);
  box-shadow: 0 -1px 0 #ffffff36, 0 -12px 42px #ffffff0a;
  background: linear-gradient(0deg, #0a0a0a, #2f2f2f);
}
#em-refined .em-portrait {
  overflow: visible; max-width: 435px; width: 100%; justify-self: center;
  transform: perspective(1200px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y));
  border: 1px solid transparent; border-radius: 12px;
  background: linear-gradient(#191919,#191919) padding-box,
    radial-gradient(ellipse at var(--edge-x) var(--edge-y), #f7f7f7 0%, #a1a1a1 20%, #323232 55%, #575757 90%) border-box;
  box-shadow: 0 24px 56px #00000099, -8px -8px 36px #ffffff0b;
  transform-style: preserve-3d;
}
#em-refined .em-portrait::before {
  content: ''; position: absolute; inset: -28px; z-index: -1; border-radius: 32px;
  background: radial-gradient(ellipse at var(--edge-x) var(--edge-y), #efefef55, transparent 68%);
  filter: blur(24px); opacity: calc(.7 * var(--motion-strength)); pointer-events: none;
}
#em-refined .em-portrait img { border-radius: 11px 11px 0 0; }
#em-refined .em-portrait figcaption {
  position: relative; border-radius: 0 0 11px 11px;
  background: linear-gradient(125deg, #282828, #171717 65%);
  border-top: 1px solid #ffffff17;
}
#em-refined .em-portrait strong { font-size: 18px; }
#em-refined .em-portrait::after {
  content: ''; position: absolute; inset: 0; border-radius: 11px;
  pointer-events: none; opacity: calc(.8 * var(--motion-strength));
  background: linear-gradient(117deg, transparent calc(var(--sheen) - 28%), #ffffff02 calc(var(--sheen) - 12%), #ffffff14 var(--sheen), #ffffff02 calc(var(--sheen) + 10%), transparent calc(var(--sheen) + 24%));
}
#em-refined .em-motion-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
#em-refined .em-motion-button {
  background: #171717; border: 1px solid #414141; border-radius: 5px;
  padding: 8px 12px; min-height: 38px; font-size: 12px; line-height: 1.4;
}
#em-refined .em-motion-label { font-size: 12px; color: #bdbdb9; }
#em-refined .em-motion-help { margin-top: 19px; font-size: 12px; color: #aaaaaa; }
#em-refined .em-motion-help::before {
  content: ''; display: inline-block; width: 5px; height: 5px;
  border-radius: 50%; background: #a6a6a6; margin-right: 8px; vertical-align: middle;
}
#em-refined .em-reviewbar { padding-right: 110px; }
#em-refined .em-button:hover { background: linear-gradient(140deg, #3a3a3a, #252525); }
#em-refined .em-button.text:hover { background: transparent; }
#em-refined[data-lighting="still"] .em-motion-help,
#em-refined[data-lighting="ambient"] .em-motion-help { visibility: hidden; }
@media (max-width: 760px) {
  #em-refined .em-hero { padding-top: 42px; padding-bottom: 42px; }
  #em-refined .em-portrait figcaption { padding: 15px; }
  #em-refined .em-reviewbar { padding-right: 26px; }
}
@media (max-width: 560px) {
  #em-refined .em-hero { gap: 36px; }
  #em-refined .em-portrait { max-width: 350px; transform: none; }
  #em-refined .em-halo { top: 25%; left: -12%; width: 135%; height: 100%; }
  #em-refined .em-lightstage::after { background: linear-gradient(180deg, #101010 0%, #101010e0 29%, transparent 65%, #10101080); }
  #em-refined .em-sculpture { left: 25%; top: 28%; width: 145%; height: 100%; }
  #em-refined .em-sculpture-secondary { left: 67%; top: 47%; }
  #em-refined .em-motion-help { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  #em-refined .em-portrait { transform: none; }
  #em-refined .em-motion-help { display: none; }
}

/* Boxed controls glow around their edges; text links glow only around the letters. */
#em-refined :is(a[href], button, summary, select, input:not([type="range"]), textarea) {
  transition: box-shadow 180ms ease, border-color 180ms ease, background-color 180ms ease, text-shadow 180ms ease;
}
#em-refined :is(.em-button:not(.text), button, select, input:not([type="range"]), textarea):focus-visible:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: 0 0 0 1px #ffffff20, 0 0 18px 4px #ffffff14;
  text-shadow: 0 0 12px #80c99628;
}
@media (hover: hover) and (pointer: fine) {
  #em-refined :is(.em-button:not(.text), button, select, input:not([type="range"]), textarea):hover:not(:disabled):not([aria-disabled="true"]) {
    box-shadow: 0 0 18px 4px #ffffff12;
    text-shadow: 0 0 12px #80c99628;
    border-color: #7b7b7b;
  }
  #em-refined :is(.em-button:not(.text), .em-toolbar button, .em-motion-button):hover:not(:disabled):not([aria-disabled="true"]) {
    box-shadow: inset 0 1px 0 #ffffff18, 0 0 0 1px #ffffff14, 0 0 22px 4px #ffffff16;
  }
  #em-refined :is(a[href]:not(.em-button), .em-button.text, summary):hover:not([aria-disabled="true"]) {
    background: transparent;
    box-shadow: none;
    filter: none;
    text-shadow: 0 0 8px #80c99655, 0 0 18px #80c99622;
  }
  #em-refined input[type="range"]:hover { filter: drop-shadow(0 0 5px #ffffff38); }
}
#em-refined input[type="range"]:focus-visible { filter: drop-shadow(0 0 5px #ffffff38); }
#em-refined :is(.em-button:not(.text), button, select, input, textarea):active:not(:disabled):not([aria-disabled="true"]) {
  box-shadow: 0 0 12px 2px #ffffff12;
}
#em-refined :is(a[href]:not(.em-button), .em-button.text, summary):is(:focus-visible, :active):not([aria-disabled="true"]) {
  background: transparent;
  box-shadow: none;
  filter: none;
  text-shadow: 0 0 8px #80c99655, 0 0 18px #80c99622;
}
#em-refined :is(a[href]:not(.em-button), .em-button.text, summary):focus-visible:not([aria-disabled="true"]) {
  outline: none;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: .3em;
}
@media (prefers-reduced-motion: reduce) {
  #em-refined :is(a[href], button, summary, select, input, textarea) { transition: none; }
}

/* Slow, independent grayscale light beneath each homepage content section. */
#em-refined .em-ambient-section {
  position: relative;
  isolation: isolate;
  overflow: clip;
}
#em-refined .em-ambient-section::before,
#em-refined .em-ambient-section::after {
  content: '';
  position: absolute;
  inset: -25% -16%;
  z-index: -1;
  pointer-events: none;
}
#em-refined .em-ambient-section::before {
  background: radial-gradient(ellipse at var(--ambient-origin) 46%, #e6e6e626 0%, #b4b4b40e 30%, transparent 63%);
  opacity: .55;
  animation: em-section-breathe var(--ambient-duration) ease-in-out var(--ambient-delay) infinite alternate paused;
}
#em-refined .em-ambient-section::after {
  background: linear-gradient(var(--ambient-angle), transparent 32%, #ffffff03 43%, #ffffff10 50%, #ffffff03 57%, transparent 68%);
  opacity: .35;
  animation: em-section-sheen calc(var(--ambient-duration) * 1.4) ease-in-out var(--ambient-delay) infinite alternate-reverse paused;
}
#em-refined .em-ambient-section[data-ambient-visible="true"]::before,
#em-refined .em-ambient-section[data-ambient-visible="true"]::after {
  animation-play-state: running;
  will-change: transform, opacity;
}
#em-refined[data-document-hidden="true"] .em-ambient-section::before,
#em-refined[data-document-hidden="true"] .em-ambient-section::after,
#em-refined[data-motion-state="paused"] .em-ambient-section::before,
#em-refined[data-motion-state="paused"] .em-ambient-section::after {
  animation-play-state: paused;
  will-change: auto;
}
#em-refined[data-lighting="still"] .em-ambient-section::before,
#em-refined[data-lighting="still"] .em-ambient-section::after {
  animation: none;
  will-change: auto;
}
@keyframes em-section-breathe {
  0% { transform: translate3d(calc(var(--ambient-sway) * -1), -5%, 0) scale(.98); opacity: .35; }
  55% { opacity: .78; }
  100% { transform: translate3d(var(--ambient-sway), 6%, 0) scale(1.07); opacity: .48; }
}
@keyframes em-section-sheen {
  from { transform: translate3d(-8%, 5%, 0) rotate(-3deg); opacity: .2; }
  to { transform: translate3d(10%, -5%, 0) rotate(3deg); opacity: .48; }
}
@media (prefers-reduced-motion: reduce) {
  #em-refined .em-ambient-section::before,
  #em-refined .em-ambient-section::after { animation: none; will-change: auto; }
}
