/* Services · two coded lanyards (src/studio/services). Same White Studio ground, ink type, one orange.
   The stage keeps the 3D scene's framing (4.92 x 5.72 units), so the cards are as large as the window allows. */
.sb { padding-block: var(--space-2xl, 8rem); }
.sb .wrap { display: grid; justify-items: center; }
.sb h2 { justify-self: start; }

.sb-stage, .sb-unders { width: min(100%, calc(90svh * 0.86), 1100px); }
.sb-stage { position: relative; aspect-ratio: 0.86; margin-top: clamp(0.5rem, 2vw, 1.5rem); touch-action: pan-y; }
.sb-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; opacity: 0; pointer-events: none;
  transition: opacity 600ms var(--ease-out, ease);
  /* the wall shadow fades out before the canvas edge instead of stopping on it */
  -webkit-mask-image: linear-gradient(180deg, #000 0, #000 92%, transparent 100%), linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(180deg, #000 0, #000 92%, transparent 100%), linear-gradient(90deg, transparent 0, #000 3%, #000 97%, transparent 100%); mask-composite: intersect; }
.sb-stage.is-live .sb-canvas { opacity: 1; }

/* each half of the stage is one badge button: tap the card itself */
.sb-badges { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; }
.sb-badge { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.sb-badge:focus-visible { outline: none; }
.sb-badge:focus-visible::after { content: ""; position: absolute; left: 7%; right: 7%; top: 39%; bottom: 3%; border-radius: 16px; outline: 2px solid #121417; outline-offset: 4px; pointer-events: none; }

/* DOM fallback lanyard (no WebGL / module failed): flips with CSS, same copy */
.sb-fb { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; padding: 1% 7% 3%; transition: opacity 400ms var(--ease-out, ease); }
.sb-stage.is-live .sb-fb { opacity: 0; visibility: hidden; transition: opacity 400ms, visibility 0s 400ms; }
.sb-fb-strap { width: 52%; height: auto; flex: none; margin-bottom: -2px; }
.sb-fb-card { position: relative; flex: 1; width: 100%; max-width: 100%; aspect-ratio: 2.1 / 2.94; max-height: 100%; perspective: 1400px; }
.sb-fb-face { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 0.6em; padding: 11% 9%; border-radius: 16px; text-align: left;
  background: #EEF0F2; color: #121417; border: 4px solid #C9CED4; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  transition: transform 640ms cubic-bezier(0.3, 1.25, 0.5, 1); font-size: clamp(0.8rem, 0.5rem + 0.9vw, 1.125rem); line-height: 1.3; }
.is-dark .sb-fb-face { background: #15171A; color: #F3F1ED; border-color: #FC5802; }
.sb-fb-face b { font: 600 1.9em/1.02 var(--font-display); font-stretch: var(--stretch, 118%); }
.sb-fb-front b { margin-top: auto; font-size: 2.3em; }
.sb-fb-face small { margin-top: auto; align-self: flex-end; font-size: 0.85em; opacity: 0.72; }
.sb-fb-front small { margin-top: 0.4em; }
.sb-fb-face ul { list-style: none; margin: 0.4em 0 0; padding: 0; display: grid; gap: 0.35em; font-weight: 500; }
.sb-fb-face li { display: flex; gap: 0.55em; align-items: baseline; }
.sb-fb-face li::before { content: ""; width: 0.55em; height: 0.55em; flex: none; background: #FC5802; }
.sb-fb-back { transform: rotateY(180deg); }
.sb-badge[aria-pressed="true"] .sb-fb-front { transform: rotateY(-180deg); }
.sb-badge[aria-pressed="true"] .sb-fb-back { transform: rotateY(0deg); }

.sb-pause { position: absolute; right: 0; top: 0; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; padding: 12px; border: 0; border-radius: 50%; background: none; color: #121417; cursor: pointer; }
.sb-pause[hidden], .sb-i-play, .sb-pause[aria-pressed="true"] .sb-i-pause { display: none; }
.sb-pause[aria-pressed="true"] .sb-i-play { display: block; }
.sb-pause svg { width: 20px; height: 20px; }
.sb-pause:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* one genuine link under each badge, clear of the card and its shadow */
.sb-unders { display: grid; grid-template-columns: 1fr 1fr; margin-top: clamp(0.75rem, 2vw, 1.5rem); text-align: center; }
.sb-under a { display: inline-flex; align-items: center; min-height: 44px; font-size: clamp(1rem, 0.85rem + 0.4vw, 1.1875rem); font-weight: 500; }

@media (max-width: 767px) {
  .sb { padding-block: var(--space-xl, 5rem); }
  .sb-stage, .sb-unders { width: 100%; }
  .sb-fb-face { border-radius: 10px; padding: 9% 8%; border-width: 3px; font-size: 0.72rem; }
  .sb-under a { font-size: 1rem; padding-inline: 0.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sb-canvas, .sb-fb, .sb-fb-face { transition: none; }
}
