/* Photophy Studio: quiet surfaces, expressive light, and native controls. */
@font-face {
  font-family: 'Photophy Studio';
  src: url('fonts/inter-latin.woff2') format('woff2');
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}
:root {
  --studio-ink: #24232d;
  --studio-muted: #706d7c;
  --studio-paper: #faf8f5;
  --studio-line: #2922371c;
  --studio-accent: #7656d6;
  --studio-radius: 24px;
  --studio-ease: cubic-bezier(0.22, 1, 0.36, 1);
}
html:has(.photophy-theme) {
  background: var(--studio-paper);
  overflow-x: clip;
}
.photophy-theme .glow {
  display: none;
}
body.photophy-theme {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  background: var(--studio-paper);
  color: var(--studio-ink);
  font-family: 'Photophy Studio', Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  --ink: var(--studio-ink);
  --muted: var(--studio-muted);
  --display: 'Photophy Studio', Inter, system-ui, sans-serif;
  --body: 'Photophy Studio', Inter, system-ui, sans-serif;
  --line: var(--studio-line);
}
.photophy-theme ::selection {
  color: #282133;
  background: #e4d6f6;
}
.photophy-theme :where(button, a, input, select, summary):focus-visible {
  outline: 3px solid #7656d6;
  outline-offset: 4px;
}
.photophy-theme :where(button, a) {
  -webkit-tap-highlight-color: transparent;
}
.photophy-theme :where(a) {
  text-underline-offset: 4px;
}
.photophy-theme :where(button):disabled {
  cursor: not-allowed;
}

/* Soft gradients are painted once, then drift as compositor transforms.
   No full-screen blur, canvas, video, particle loop, or WebGL dependency. */
.ambient-scene {
  position: fixed;
  z-index: -1;
  inset: -28px;
  overflow: hidden;
  pointer-events: none;
  contain: strict;
  transform: translate3d(var(--ambient-x, 0px), var(--ambient-y, 0px), 0);
  transition:
    transform 1.5s var(--studio-ease),
    opacity 0.6s ease;
  background: #faf8f5;
}
.ambient-light {
  position: absolute;
  border-radius: 50%;
}
.ambient-light--peach {
  width: min(92vw, 1250px);
  height: min(92vw, 1250px);
  top: -65%;
  right: -19%;
  background: radial-gradient(
    circle,
    #f3ceb880,
    #f6dcc052 36%,
    transparent 68%
  );
  animation: studio-drift-a 32s ease-in-out infinite alternate;
}
.ambient-light--rose {
  width: min(85vw, 1100px);
  height: min(85vw, 1100px);
  top: 5%;
  left: -35%;
  background: radial-gradient(
    circle,
    #edc7d259,
    #f4d9df33 42%,
    transparent 68%
  );
  animation: studio-drift-b 28s ease-in-out infinite alternate;
}
.ambient-light--lavender {
  width: min(100vw, 1400px);
  height: min(100vw, 1400px);
  top: -16%;
  right: -25%;
  background: radial-gradient(
    circle,
    #d2c9f780,
    #e2d8f13d 41%,
    transparent 69%
  );
  animation: studio-drift-a 38s ease-in-out -12s infinite alternate-reverse;
}
.ambient-ribbon {
  position: absolute;
  width: min(86vw, 1260px);
  aspect-ratio: 1.15;
  right: -17%;
  top: -26%;
  border-radius: 50%;
  background: radial-gradient(
    ellipse closest-side,
    transparent 61%,
    #ffffff66 62.5%,
    #faf8f5b0 64%,
    #e8ddf780 68%,
    #bea7e46e 73%,
    #dfb5c663 78%,
    #f1d1b680 82%,
    #fffcf799 84%,
    transparent 85.5%
  );
  transform: rotate(-26deg) scaleY(0.8);
  animation: studio-ribbon 36s ease-in-out infinite alternate;
}
.ambient-ribbon::after {
  content: '';
  position: absolute;
  inset: 13%;
  border: 1px solid #ffffff9c;
  border-radius: 50%;
  transform: rotate(12deg) scaleY(0.84);
}
@keyframes studio-drift-a {
  to {
    transform: translate3d(-5%, 6%, 0) scale(1.08);
  }
}
@keyframes studio-drift-b {
  to {
    transform: translate3d(6%, -4%, 0) scale(0.94);
  }
}
@keyframes studio-ribbon {
  to {
    transform: translate3d(-3%, 8%, 0) rotate(-12deg) scaleY(0.88);
  }
}
.ambient-scene.is-paused * {
  animation-play-state: paused !important;
}
.ambient-scene.is-static *,
.ambient-scene.is-static {
  animation: none !important;
  transition: none;
}
.ambient-paused .ambient-scene {
  opacity: 0.45;
}
.ambient-scene.is-static {
  transform: none;
}
.photophy-theme .reveal-ready {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
}
.photophy-theme .reveal-ready.is-revealed {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.8s ease,
    transform 0.9s var(--studio-ease);
}
@media (max-width: 759px) {
  .ambient-ribbon {
    width: 145vw;
    right: -75%;
    top: -5%;
    opacity: 0.65;
  }
  .ambient-light--peach {
    top: -15%;
    right: -30%;
    width: 130vw;
    height: 130vw;
  }
  .ambient-light--lavender {
    top: 15%;
    right: -70%;
    width: 150vw;
    height: 150vw;
  }
  .ambient-light--rose {
    left: -70%;
    top: 40%;
    width: 150vw;
    height: 150vw;
  }
}
@media (prefers-reduced-motion: reduce) {
  .ambient-scene,
  .ambient-scene * {
    animation: none !important;
    transition: none !important;
  }
  .ambient-scene {
    transform: none;
  }
  .photophy-theme .reveal-ready {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .photophy-theme {
    scroll-behavior: auto;
  }
}
@media (forced-colors: active) {
  .ambient-scene {
    display: none;
  }
  body.photophy-theme {
    color: CanvasText;
    background: Canvas;
  }
}
