:root {
  color-scheme: light;
  background: #f4e4da;
  --word-width: 83vw;
}

* { box-sizing: border-box; }
html, body, main { margin: 0; width: 100%; height: 100%; overflow: hidden; }
body { min-height: 100svh; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.studio {
  appearance: none;
  position: relative;
  isolation: isolate;
  display: block;
  width: 100%;
  height: 100%;
  height: 100dvh;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: var(--studio-background, #f4e4da);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  cursor: grab;
}
.studio:active { cursor: grabbing; }
.studio:focus { outline: none; }
.studio:focus-visible::after {
  content: "";
  position: absolute;
  inset: max(10px, 1vmin);
  border: 2px solid #752e45;
  border-radius: 3px;
  pointer-events: none;
}
.studio > * { position: absolute; display: block; pointer-events: none; }
.light, .ground, .grain, #sculpture { inset: 0; }
.light {
  background:
    linear-gradient(122deg, transparent 8%, rgb(255 252 231 / 23%) 26%, rgb(255 250 230 / 16%) 38%, transparent 51%),
    radial-gradient(ellipse at 8% 0%, rgb(192 138 136 / 19%), transparent 48%);
}
.ground {
  background: radial-gradient(ellipse 65% 20% at 65% 100%, rgb(255 236 214 / 43%), transparent);
}
.shadow {
  width: min(calc(var(--word-width) * .79), 188vh);
  height: clamp(26px, 5vw, 70px);
  left: 50%;
  top: calc(49% + min(calc(var(--word-width) * .19), 45vh));
  transform: translate(-50%, -42%) rotate(-2deg);
  background:
    radial-gradient(ellipse 24% 18% at 29% 61%, rgb(100 52 49 / 23%), transparent 98%),
    radial-gradient(ellipse 48% 26% at 49% 54%, rgb(119 63 65 / 16%), transparent 100%);
  filter: blur(clamp(4px, .65vw, 12px));
}
.still {
  left: 50%;
  top: 49%;
  width: var(--word-width);
  max-width: 238vh;
  transform: translate(-50%, -50%);
  perspective: 1200px;
}
.still img {
  display: block;
  width: 100%;
  height: auto;
  -webkit-user-drag: none;
  transform: rotateX(var(--tilt-y, 0deg)) rotateY(var(--tilt-x, 0deg));
  transition: transform .65s cubic-bezier(.15,.75,.22,1);
}
.studio-tagline {
  --logo-width: min(var(--word-width), 238vh);
  position: absolute;
  left: calc(50% - var(--logo-width) * .125);
  top: calc(49% + var(--logo-width) * .099);
  margin: 0;
  color: #602739;
  font: 450 clamp(.69rem, calc(var(--logo-width) * .022), 1.65rem)/1.2 "Instrument Sans", Arial, sans-serif;
  letter-spacing: .105em;
  white-space: nowrap;
  pointer-events: none;
}
#sculpture { width: 100%; height: 100%; opacity: 0; }
.ready-3d #sculpture { opacity: 1; }
.ready-3d .still { visibility: hidden; }
.studio-system-font .studio-tagline, .studio-system-font .cards { font-family: Arial, sans-serif; }
.studio-plain .still, .studio-plain .shadow { visibility: hidden; }
.studio-plain h1 {
  position: absolute; z-index: 1; top: 49%; left: 50%; transform: translate(-50%, -60%);
  width: auto; height: auto; margin: 0; overflow: visible; clip-path: none;
  color: #702638; font: italic 600 clamp(3rem, 15vw, 11rem)/1 Georgia, serif;
  letter-spacing: -.065em; pointer-events: none;
}
.studio-plain .studio-tagline {
  top: calc(49% + clamp(1.8rem, 7.5vw, 5.5rem)); left: 50%; transform: translateX(-50%);
}
@media (prefers-reduced-motion: no-preference) {
  .ready-3d.handoff-3d .still {
    visibility: visible;
    animation: still-exit 220ms ease-in-out both;
  }
  .ready-3d.handoff-3d #sculpture { animation: model-enter 220ms ease-in-out both; }
  @keyframes still-exit { 0%, 45% { opacity: 1; } to { opacity: 0; } }
  @keyframes model-enter { from { opacity: 0; } }
}
.grain {
  opacity: .115;
  background-image: url("./grain.png");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}
@media (max-width: 650px) {
  :root { --word-width: 92vw; }
}
@media (prefers-reduced-motion: reduce) {
  .still img { transition: none; transform: none; }
}
@media (forced-colors: active) {
  .studio { forced-color-adjust: none; }
}
