:root { --scene-paper: var(--white); --scene-font: var(--font-body); --scene-label: var(--ink); --scene-note: var(--muted-foreground); --scene-choice: var(--white); }
.hero-device-availability {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs) var(--space-sm);
  margin-top: var(--space-xs);
  text-align: center;
  color: var(--scene-note);
  font-size: var(--text-xs);
  line-height: 1.6;
}
.hero-device-availability button {
  min-height: 44px;
  padding: 0 var(--space-sm);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-clear);
  color: var(--petrol);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 5px;
  white-space: nowrap;
  transition: background var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out);
}
.hero-device-availability button[aria-pressed='true'] { color: var(--green-text); text-decoration-thickness: 2px; }
.hero-device-availability button:hover { background: var(--mint); }
.hero-device-availability button:active { background: var(--mint-strong); }
.hero-device-availability button:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.hero-device-availability button:disabled { opacity: 0.55; cursor: not-allowed; }

.field-scene { --phone-art-width: 98.894%; --phone-art-height: 100%; --phone-art-left: 0.553%; position: relative; isolation: isolate; width: 100%; aspect-ratio: 1356 / 894; overflow: clip; background: var(--scene-paper); }
.scene-reel { position: absolute; inset: 0 auto 0 0; width: 200%; display: flex; transition: transform 420ms var(--ease-out); }
.scene-slide { position: relative; flex: 0 0 50%; min-width: 0; overflow: clip; }
[data-device='phone'] .scene-reel { transform: translateX(-50%); }
.field-scene:not([data-scene='hero']) .scene-reel { width: 100%; transform: none; }
.field-scene:not([data-scene='hero']) .scene-slide { flex: 0 0 100%; }
.scene-art { position: absolute; pointer-events: none; max-width: none; object-fit: fill; width: 113.274%; height: 114.542%; left: -13.274%; top: -14.542%; mix-blend-mode: multiply; }
.scene-slide .art-phone { width: var(--phone-art-width); height: var(--phone-art-height); left: var(--phone-art-left); top: 0; }

/* Light, recessed segmented device switch in hero */
.scene-navigation {
  position: absolute;
  bottom: var(--space-xs);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  background: rgba(242, 244, 242, 0.94);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-sm);
}
.scene-navigation button {
  min-width: 104px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--color-clear);
  color: var(--muted-foreground);
  font: inherit;
  font-size: var(--text-sm);
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-micro) var(--ease-out), color var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out);
}
.scene-navigation button[aria-pressed='true'] {
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(6, 38, 48, 0.1), 0 0 0 1px rgba(12, 29, 36, 0.06);
}
.scene-navigation button:not([aria-pressed='true']):hover { color: var(--ink); }
.scene-navigation button:active { opacity: 0.92; }
.scene-navigation button:focus-visible { outline: 3px solid var(--ring); outline-offset: 2px; }
.scene-navigation button:disabled { opacity: 0.55; cursor: not-allowed; }
.rotation-control[hidden] { display: none; }
.hero-plan .field-scene { touch-action: pan-y; }

/* Exact screen coordinates aligned with the approved device illustrations */
.device-screen { --device-screen-radius: 1.6%; position: absolute; left: 15.93%; top: 8.84%; width: 68.73%; height: 68.34%; overflow: clip; border-radius: var(--device-screen-radius); clip-path: inset(0 round var(--device-screen-radius)); background: var(--white); }

/* Elevated precision instrument frames for live interactive viewports (1px border keeps iframe edge <= 1px) */
.demo-viewport {
  position: relative;
  width: 100%;
  height: 34rem;
  margin-inline: auto;
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-stage);
  overflow: clip;
  background: var(--white);
  box-shadow: var(--shadow-stage);
  transition: border-color var(--dur-short) var(--ease-out), box-shadow var(--dur-short) var(--ease-out);
}
.demo-viewport:hover {
  border-color: rgba(0, 93, 131, 0.26);
  box-shadow:
    0 2px 4px rgba(6, 38, 48, 0.045),
    0 18px 42px -12px rgba(6, 38, 48, 0.12),
    0 32px 64px -22px rgba(6, 38, 48, 0.09);
}
.demo-viewport[data-view='plan'] { height: 28rem; }
.demo-viewport[data-view='window'] { height: 40rem; }
.demo-viewport[data-view='boiler'] { height: 22rem; }
.demo-viewport .product-demo { position: absolute; inset: 0; width: 100%; height: 100%; transform: none; border-radius: 0; }
.demo-viewport .demo-fallback { position: absolute; inset: 0; padding: var(--space-sm); }
.demo-viewport .demo-fallback img { width: 100%; height: 100%; max-height: 100%; object-fit: contain; }
.showcase-score .product-demo { position: relative; inset: auto; transform: none; width: 100%; min-width: 0; max-width: 100%; }
.device-screen .demo-fallback { position: absolute; inset: 0; }
.device-screen .demo-fallback img { width: 100%; height: 100%; max-height: none; object-fit: contain; }

/* The phone's content remains inset from the original artwork's inner ink contour. */
[data-device='phone'] .device-screen { --device-screen-radius: 2% 2% 10% 10% / 1% 1% 5.3% 5.3%; left: calc(var(--phone-art-left) + var(--phone-art-width) * 704 / 1536); top: calc(var(--phone-art-height) * 147 / 1024); width: calc(var(--phone-art-width) * 388 / 1536); height: calc(var(--phone-art-height) * 732 / 1024); }
.device-captures, .device-capture { width: 100%; height: 100%; }
.device-capture { position: absolute; inset: 0; }
.device-capture img { display: block; width: 100%; height: 100%; max-height: none; object-fit: cover; object-position: top; }
.device-screen .house-viewer { width: 100%; height: 100%; min-height: 0; max-height: none; aspect-ratio: auto; border: 0; border-radius: 0; }
.model .field-scene { --scene-paper: var(--off-white); }

@media (max-width: 60rem) { .field-scene { max-width: 900px; margin-inline: auto; } }
@media (max-width: 40rem) {
  .hero-plan .field-scene { --phone-art-width: 79.115%; --phone-art-height: 80%; --phone-art-left: 10.442%; }
}
@media (prefers-reduced-motion: reduce) { .field-scene *, .demo-viewport { animation: none; transition: none; } }
