.studio-page .studio-hero { position: relative; padding-top: 44px; }
.studio-page .studio-hero-heading h1 { font-size: clamp(54px, 5.1vw, 76px); }
.studio-page .studio-hero-heading .hero-lead { max-width: 690px; font-size: 18px; }
/* The scene's clock controls this entrance once the model and fonts are ready. */
.studio-page :is(.studio-hero-heading h1, .studio-hero-heading .hero-lead, .studio-hero-frame) { animation: none; }
@media (prefers-reduced-motion: no-preference) {
  .duo-intro-pending :is(.studio-hero-heading h1, .studio-hero-heading .hero-lead) { opacity: 0; }
}
.studio-hero-frame.studio-duo { width: calc(100% - 48px); max-width: 1440px; margin-top: -40px; padding-top: 12px; padding-bottom: 0; }
.duo-stage { position: relative; height: clamp(640px, 62vw, 880px); isolation: isolate; }
.duo-stage canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; cursor: grab; }
.duo-stage canvas:active { cursor: grabbing; }
.duo-stage canvas:focus-visible { outline: 1px solid #c8c5d6; outline-offset: -4px; border-radius: 20px; }
.duo-loading[hidden] { display: none; }
.duo-stage:not([data-ready="true"]) canvas { visibility: hidden; }
.duo-stage[data-ready="error"] canvas { display: none; }
.duo-loading { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; width: max-content; max-width: calc(100% - 32px); font-size: 12px; line-height: 1.5; text-align: center; color: var(--muted); pointer-events: none; }
/* Keep loading visible in the viewport even when the hero extends below it. */
.duo-loading[data-duo-loading] { position: fixed; top: 50vh; top: 50dvh; z-index: 16; }
.studio-hero:has(.duo-stage[data-ready="error"]) .duo-loading { position: absolute; top: 50%; z-index: 1; }
/* A lightweight folded silhouette is visible before the 3D bundle is ready. */
.duo-loading-phone { display: flex; width: 76px; height: 48px; perspective: 180px; transform: rotate(-8deg); }
.duo-loading-phone>span { position: relative; width: 50%; height: 100%; border: 1px solid #a0b8bd80; border-radius: 7px 3px 3px 7px; background: linear-gradient(135deg, #384c53, #20272c); transform-origin: right center; animation: duo-loading-fold-left 2.4s cubic-bezier(.45,0,.25,1) infinite; }
.duo-loading-phone>span+span { border-radius: 3px 7px 7px 3px; transform-origin: left center; animation-name: duo-loading-fold-right; }
.duo-loading-phone>span::after { content: ''; position: absolute; inset: 6px 5px; border-radius: 2px; background: linear-gradient(#93c8cb24, #93c8cb06); }
@keyframes duo-loading-fold-left { 0%,100% { transform: rotateY(68deg); } 45%,60% { transform: rotateY(8deg); } }
@keyframes duo-loading-fold-right { 0%,100% { transform: rotateY(-68deg); } 45%,60% { transform: rotateY(-8deg); } }
.duo-controls { position: absolute; z-index: 2; bottom: 13%; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 24px; width: min(calc(100% - 40px), 420px); margin: 0; padding: 0; border: 0; background: transparent; }
.duo-controls button { display: flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 16px; border: 0; background: transparent; color: #9699a3; font: inherit; font-size: 12px; cursor: pointer; transition: color .2s; }
.duo-controls button:hover { color: #c5c9d0; }
.duo-controls button svg { width: 16px; height: 16px; }
.duo-controls :disabled { opacity: .4; cursor: default; }
.duo-controls :focus-visible { outline: 2px solid #d1d0e1; outline-offset: 4px; }
.duo-opening { display: grid; grid-template-columns: auto minmax(60px, 1fr); gap: 16px; align-items: center; flex: 1; min-width: 0; }
.duo-opening output { font-size: 12px; font-variant-numeric: tabular-nums; color: #9699a3; min-width: 4ch; }
.duo-opening input { --opening: 0%; appearance: none; -webkit-appearance: none; width: 100%; height: 48px; margin: 0; background: transparent; cursor: ew-resize; touch-action: pan-y; }
.duo-opening input::-webkit-slider-runnable-track { height: 3px; border-radius: 4px; background: linear-gradient(to right, #7e8490 var(--opening), #41454e var(--opening)); }
.duo-opening input::-moz-range-track { height: 3px; border-radius: 4px; background: #41454e; }
.duo-opening input::-moz-range-progress { height: 3px; background: #7e8490; }
.duo-opening input::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin-top: -7.5px; border-radius: 50%; background: #999eaa; border: 3px solid #626875; box-shadow: none; }
.duo-opening input::-moz-range-thumb { width: 12px; height: 12px; border-radius: 50%; background: #999eaa; border: 3px solid #626875; box-shadow: none; }
@media (max-width: 767px) {
  .studio-page .studio-hero { padding-top: 26px; }
  .studio-page .studio-hero-heading h1 { font-size: clamp(30px, 8.2vw, 44px) !important; margin-top: 0; }
  .studio-page .studio-hero-heading .hero-lead { margin-top: 18px !important; font-size: 15px; line-height: 1.6; max-width: 440px; }
  .studio-hero-frame.studio-duo { width: calc(100% - 40px); margin-top: -22px; padding-top: 6px; padding-bottom: 0; }
  .duo-stage { height: clamp(380px, 110vw, 560px); width: calc(100% + 40px); margin-left: -20px; }
  .duo-controls { gap: 16px; }
  .duo-controls button { padding-inline: 12px; }
  .duo-opening { gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .duo-controls button { transition: none; }
  .duo-loading-phone>span { animation: none; }
}
