/* =====================================================================
   HAZLEWOOD SHARED STAGE  (.hz-stage). Version 1, signed off 12 November 2026.
   Needs hazlewood-web.css (the design system web stylesheet) on the page.
   Flat device frames for product screens, with one ground glow and one shadow.
   Reads the ground from the nearest [data-ground] (navy, white or slate).
   Literal values left: the screen ratios (16:9 browser, 1:2 phone), the
   phone's share of the stage in the pair (36 per cent), the trio proportions and the glow ellipse.
   ===================================================================== */
.hz-stage{--s-bar:var(--hz-surface-muted);--s-dot:var(--hz-border-light);--s-pill:var(--hz-surface-light);--s-pill-text:var(--hz-text-secondary-on-light);
  --s-edge:var(--hz-border-light);--s-bezel:var(--hz-surface-dark);--s-bezel-edge:transparent;--s-screen:var(--hz-surface-panel-light);
  position:relative;margin:0;display:grid;justify-items:center;padding-block:var(--hz-space-3) var(--hz-block-web);isolation:isolate;font-family:var(--hz-font-sans)}
[data-ground="navy"] .hz-stage,.hz-stage[data-ground="navy"]{--s-bar:var(--hz-surface-dark-raised);--s-dot:var(--hz-border-planned-on-dark);--s-pill:var(--hz-surface-dark);--s-pill-text:var(--hz-border-planned-on-dark);
  --s-edge:transparent;--s-bezel:var(--hz-surface-dark-raised);--s-bezel-edge:var(--hz-border-dark)}

/* Ground glow: one soft aqua ellipse under the devices (overlay exception 5) */
.hz-stage::before{content:"";position:absolute;z-index:-1;left:10%;right:10%;bottom:0;height:45%;border-radius:50%;
  background:radial-gradient(closest-side,var(--hz-glow-stage-web),transparent);pointer-events:none}
.hz-stage[data-glow="off"]::before{display:none}

/* Device row */
.hz-stage__devices{position:relative;width:100%;display:grid;justify-items:center}

/* Browser frame: the deck's L17 frame */
.hz-stage__browser{width:100%;max-width:var(--hz-content-width-web);border:var(--hz-border-width-hairline) solid var(--s-edge);border-radius:var(--hz-radius-card);overflow:hidden;background:var(--s-screen)}
.hz-stage__bar{display:flex;align-items:center;gap:var(--hz-space-3);height:var(--hz-device-bar-height-web);padding-inline:var(--hz-space-3);background:var(--s-bar)}
.hz-stage__dots{display:flex;gap:var(--hz-space-1)}
.hz-stage__dots i{width:var(--hz-space-2);height:var(--hz-space-2);border-radius:var(--hz-radius-pill);background:var(--s-dot)}
.hz-stage__address{flex:1;max-width:calc(var(--hz-content-width-web) / 3);margin-inline:auto;padding:var(--hz-space-1) var(--hz-space-3);border-radius:var(--hz-radius-pill);background:var(--s-pill);color:var(--s-pill-text);
  font-size:var(--hz-web-caption-size);line-height:var(--hz-web-caption-leading);text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hz-stage__bar::after{content:"";width:calc(var(--hz-space-2) * 3 + var(--hz-space-1) * 2)}
.hz-stage[data-bar="plain"] .hz-stage__address{visibility:hidden}
.hz-stage[data-bar="none"] .hz-stage__bar{display:none}
.hz-stage__browser .hz-stage__screen{aspect-ratio:16/9}

/* Phone frame: flat, no buttons, notch or status bar */
.hz-stage__phone{width:min(100%,var(--hz-device-phone-width-web));padding:var(--hz-device-bezel-web);border-radius:var(--hz-device-phone-radius-web);background:var(--s-bezel);
  box-shadow:inset 0 0 0 var(--hz-border-width-hairline) var(--s-bezel-edge)}
.hz-stage__phone .hz-stage__screen{aspect-ratio:1/2;border-radius:calc(var(--hz-device-phone-radius-web) - var(--hz-device-bezel-web));overflow:hidden;background:var(--s-screen)}

/* The screen slot: an image, a video or a live demo, filling the screen */
.hz-stage__screen{position:relative;display:block}
.hz-stage__screen>:is(img,video,picture){display:block;width:100%;height:100%;object-fit:cover;object-position:top center}

/* One shadow under each frame */
.hz-stage:not([data-shadow="off"]) :is(.hz-stage__browser,.hz-stage__phone){box-shadow:var(--hz-shadow-float-web)}
.hz-stage:not([data-shadow="off"]) .hz-stage__phone{box-shadow:inset 0 0 0 var(--hz-border-width-hairline) var(--s-bezel-edge),var(--hz-shadow-float-web)}

/* Which device. browser (default) | phone | pair (the phone over the browser's lower right) | trio (three phones, below) */
.hz-stage:not([data-device="phone"],[data-device="pair"],[data-device="trio"]) .hz-stage__phone{display:none}
.hz-stage[data-device="phone"] .hz-stage__browser{display:none}
.hz-stage[data-device="pair"] .hz-stage__devices{padding-right:min(12%,var(--hz-space-7));padding-bottom:var(--hz-block-web)}
.hz-stage[data-device="pair"] .hz-stage__phone{position:absolute;right:0;bottom:0;width:min(36%,var(--hz-device-phone-width-web))}

/* Trio: the main phone in front, two phones behind it, left and right, a step smaller and lower.
   --hz-trio-phone is the main phone's width: up to 44 per cent of the stage. The side phones are
   84 per cent of it and tuck 32 per cent of their width behind the main phone. */
.hz-stage__phone[data-side]{display:none}
.hz-stage[data-device="trio"] .hz-stage__browser{display:none}
.hz-stage[data-device="trio"] .hz-stage__devices{--hz-trio-phone:min(44%,var(--hz-device-phone-width-web));padding-block:var(--hz-space-3) var(--hz-space-5)}
.hz-stage[data-device="trio"] .hz-stage__phone{display:block;position:relative;z-index:2;width:var(--hz-trio-phone)}
.hz-stage[data-device="trio"] .hz-stage__phone[data-side]{position:absolute;z-index:1;top:var(--hz-space-6);left:50%;width:calc(var(--hz-trio-phone) * 0.84)}
.hz-stage[data-device="trio"] .hz-stage__phone[data-side="left"]{margin-left:calc(var(--hz-trio-phone) * -1.0712)}
.hz-stage[data-device="trio"] .hz-stage__phone[data-side="right"]{margin-left:calc(var(--hz-trio-phone) * 0.2312)}
.hz-stage:not([data-entrance="off"]).is-armed.is-in .hz-stage__phone[data-side]{transition-delay:var(--hz-stagger)}
.hz-stage[data-device="trio"]:not([data-entrance="off"]).is-armed.is-in .hz-stage__phone:not([data-side]){transition-delay:0ms}

/* Entrance: devices rise into place, the phone a step behind */
.hz-stage:not([data-entrance="off"]).is-armed :is(.hz-stage__browser,.hz-stage__phone){opacity:0;transform:translateY(var(--hz-rise))}
.hz-stage:not([data-entrance="off"]).is-armed.is-in :is(.hz-stage__browser,.hz-stage__phone){opacity:1;transform:none;transition:opacity var(--hz-dur-entrance) var(--hz-ease-out),transform var(--hz-dur-entrance) var(--hz-ease-out)}
.hz-stage:not([data-entrance="off"]).is-armed.is-in .hz-stage__phone{transition-delay:calc(var(--hz-stagger) * 2)}
@media (prefers-reduced-motion:reduce){.hz-stage *{transition:none!important}.hz-stage.is-armed :is(.hz-stage__browser,.hz-stage__phone){opacity:1;transform:none}}
@media (forced-colors:active){.hz-stage__browser,.hz-stage__phone{border:1px solid CanvasText}}
