@font-face {
  font-family: 'Share Tech Mono';
  src: url('./assets/ShareTechMono-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}

.hero.studio-hero {
  display: block;
  min-height: 0;
  padding: 96px 0 0;
}

.studio-scene {
  position: relative;
  width: 100%;
  /* Crop the lower foreground for a shorter full-width banner. */
  aspect-ratio: 5 / 2;

  overflow: hidden;
  background: #141a18;
  touch-action: pan-y;
}

.studio-scene > img,
.studio-scene > canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.studio-scene > img { transform: scale(1.042); }
.studio-scene > canvas { opacity: 0; pointer-events: none; }
.studio-scene.depth-ready > canvas { opacity: 1; }
.studio-scene.depth-ready > img { opacity: 0; }

.studio-controls {
  position: absolute;
  bottom: 18px;
  right: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  color: var(--cream);
  font-size: 0.75rem;
}

.studio-hint { text-shadow: 0 1px 5px #000; }
.studio-toggle {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid rgb(242 230 216 / 0.4);
  border-radius: 3px;
  color: var(--cream);
  background: rgb(9 9 9 / 0.76);
  font: inherit;
  cursor: pointer;
}
.studio-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.studio-toggle[hidden], .studio-hint[hidden] { display: none; }

.studio-hero .hero-content {
  max-width: none;
  padding: 42px clamp(24px, 6vw, 72px) 54px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(110deg, #141b19, #090909 75%);
}

.studio-hero h1 {
  max-width: none;
  font-size: clamp(2.2rem, 4.4vw, 4.4rem);
  line-height: 1;
}

.studio-hero .hero-content > p:not(.eyebrow) { max-width: 720px; }

@media (max-width: 820px) {
  .hero.studio-hero { padding-top: 126px; }
  .studio-scene { max-height: none; }
  .studio-controls { bottom: 10px; right: 12px; left: 12px; }
  .studio-hint { display: none; }
  .studio-hero .hero-content { padding: 28px 18px 36px; }
}

/* Room links remain ordinary navigation if scripting or WebGL is unavailable. */
.studio-frame {
  position: relative;
  width: 100%;
  margin-inline: auto;
  --studio-neon: #f5ff70;
}
.studio-hotspots { position: absolute; inset: 0; pointer-events: none; }
.studio-hotspot {
  position: absolute;
  left: var(--spot-x);
  top: var(--spot-y);
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  pointer-events: auto;
  border-radius: 50%;
  color: var(--studio-neon);
}
.studio-dot {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid transparent;
  border-radius: 50%;
  background: rgb(9 9 9 / 0.4);
  font-size: 20px;
  line-height: 1;
}
.studio-dot::before,
.studio-dot::after {
  content: '';
  position: absolute;
  width: 27px;
  height: 5px;
  border-radius: 3px;
  background: currentColor;
  box-shadow: 0 0 6px #e8ff3c, 0 0 15px rgb(232 255 60 / 0.5);
  transform: rotate(45deg);
  transition: transform 240ms ease, opacity 180ms ease;
}
.studio-dot::after { transform: rotate(-45deg); }
.studio-dot svg {
  width: 29px; height: 29px; fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
  opacity: 0;
  transform: scale(0.5) rotate(-30deg);
  filter: drop-shadow(0 0 5px rgb(232 255 60 / 0.75));
  transition: transform 260ms ease, opacity 180ms ease;
}
.studio-label {
  position: absolute;
  bottom: calc(100% - 8px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #111917;
  color: #f5ff70;
  text-shadow: 0 0 9px rgb(232 255 60 / 0.55);
  white-space: nowrap;
  font-family: 'Share Tech Mono', monospace;
  font-size: 1.3rem;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.04em;
  opacity: 0;
  transform: translateY(5px);
  transition: opacity 180ms ease, transform 180ms ease;
  pointer-events: none;
}
.studio-hotspot:hover,
.studio-hotspot:focus-visible { background: rgb(232 255 60 / 0.12); outline: 2px solid var(--studio-neon); outline-offset: 2px; }
.studio-hotspot:hover .studio-label,
.studio-hotspot:focus-visible .studio-label { opacity: 1; transform: translateY(0); }
.studio-hotspot:hover .studio-dot,
.studio-hotspot:focus-visible .studio-dot { border-color: var(--studio-neon); }
.studio-hotspot:is(:hover, :focus-visible) .studio-dot::before,
.studio-hotspot:is(:hover, :focus-visible) .studio-dot::after { opacity: 0; transform: rotate(90deg) scale(0.3); }
.studio-hotspot:is(:hover, :focus-visible) .studio-dot svg { opacity: 1; transform: scale(1) rotate(0); }

@media (max-width: 820px), (hover: none) {
  .studio-frame { width: 100%; }
  .studio-hotspots {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    padding: 1px;
    background: var(--line);
  }
  .studio-hotspot {
    position: static;
    transform: none;
    display: flex;
    justify-content: flex-start;
    gap: 8px;
    width: auto;
    height: auto;
    min-height: 48px;
    padding: 10px 12px;
    border-radius: 0;
    background: #111917;
  }
  .studio-dot { width: 30px; height: 30px; flex: 0 0 30px; }
  .studio-dot::before, .studio-dot::after { display: none; }
  .studio-dot svg { width: 23px; height: 23px; opacity: 1; transform: none; }
  .studio-label { position: static; padding: 0; border: 0; opacity: 1; transform: none; white-space: normal; font-size: 1rem; background: none; }
}

@media (prefers-reduced-motion: reduce) {
  .studio-dot::before, .studio-dot::after, .studio-dot svg, .studio-label { transition: none; }
}

.studio-audio {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px 20px;
  padding: 10px 24px;
  background: #101817;
  color: #f5ff70;
  font: 0.95rem 'Share Tech Mono', monospace;
}
.studio-audio[hidden] { display: none; }
.studio-audio button {
  min-height: 44px;
  padding: 8px 14px;
  border: 1px solid #778039;
  border-radius: 3px;
  background: #090d0c;
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.studio-audio label { display: flex; align-items: center; gap: 10px; }
.studio-audio input { width: 90px; min-height: 44px; accent-color: #f5ff70; }
.studio-audio :focus-visible { outline: 2px solid #f5ff70; outline-offset: 3px; }
.studio-audio [role="status"]:empty { display: none; }
