/* Hardware surrounds the original screen; no fixed screen height, stretching,
   baked-in skew, duplicate Dynamic Island or generated replacement UI. */
.hero-scene{perspective:1600px;transform-style:preserve-3d}
.hero-device,.gallery-device{
  --device-depth:18px;
  border:0;
  outline:0;
  border-radius:0;
  background:none;
  box-shadow:none;
  overflow:visible;
  filter:none;
  transform-style:preserve-3d;
}
.device-assembly{
  position:relative;
  width:100%;
  border-radius:15.4% / 7.3%;
  transform-style:preserve-3d;
  /* The shadow belongs to the solid rear casing, not to the screen. */
}
.device-chassis{position:absolute;inset:0;border-radius:inherit;transform-style:preserve-3d}
.device-slice{
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(112deg,#b0b5bc 0%,#555e6b 9%,#191e27 24%,#545d69 43%,#171c24 62%,#89929d 81%,#333b47 94%,#89939f 100%);
  border:1px solid #727c885c;
  box-shadow:inset 1px 0 1px #e4e9ef55,inset -1px 0 1px #0a0d13bb;
}
.device-slice:nth-child(1){transform:translateZ(calc(var(--device-depth) * -.08))}
.device-slice:nth-child(2){transform:translateZ(calc(var(--device-depth) * -.16))}
.device-slice:nth-child(3){transform:translateZ(calc(var(--device-depth) * -.25))}
.device-slice:nth-child(4){transform:translateZ(calc(var(--device-depth) * -.33))}
.device-slice:nth-child(5){transform:translateZ(calc(var(--device-depth) * -.42))}
.device-slice:nth-child(6){transform:translateZ(calc(var(--device-depth) * -.50))}
.device-slice:nth-child(7){transform:translateZ(calc(var(--device-depth) * -.58))}
.device-slice:nth-child(8){transform:translateZ(calc(var(--device-depth) * -.66))}
.device-slice:nth-child(9){transform:translateZ(calc(var(--device-depth) * -.75))}
.device-slice:nth-child(10){transform:translateZ(calc(var(--device-depth) * -.83))}
.device-slice:nth-child(11){transform:translateZ(calc(var(--device-depth) * -.92))}
.device-slice:nth-child(12){
  transform:translateZ(calc(var(--device-depth) * -1));
  background:#303641;
  box-shadow:10px 18px 25px #0003,24px 35px 55px #0004,4px 8px 8px #0002;
}
.device-front{
  position:relative;
  padding:2.55%;
  border-radius:inherit;
  background:linear-gradient(126deg,#9ca4ae 0%,#2b323b 2.5%,#090b10 7%,#090b10 87%,#4a5563 97%,#aeb9c3 100%);
  box-shadow:inset 0 0 0 .65px #b3bdc880,inset 1.5px 1px 1px #e6edf760,inset -1.5px -1px 1px #0009;
  transform:translateZ(0);
}
.device-screen{
  position:relative;
  width:100%;
  border-radius:13.1% / 6.05%;
  overflow:hidden;
  background:#06080d;
  box-shadow:0 0 0 1.8px #020307,0 0 0 2.4px #202630;
  isolation:isolate;
}
.device-screen img{
  display:block;
  width:100%;
  max-width:none;
  height:auto;
  aspect-ratio:auto 780 / 1691;
  object-fit:contain;
  border:0;
  border-radius:0;
  transform:none;
}
.device-glass-reflection{
  position:absolute;
  inset:.5%;
  border-radius:inherit;
  pointer-events:none;
  background:linear-gradient(117deg,#e8f0ff0c 0%,#e8f0ff02 17%,transparent 34%,transparent 72%,#d1e4ff04 84%,#d1e4ff0a 100%);
  box-shadow:inset 1px 1px 1px #f3f7ff27,inset -1px -1px 1px #bed3ef20;
}
.device-earpiece{
  position:absolute;
  top:1.03%;
  left:42%;
  width:16%;
  height:.32%;
  border-radius:50px;
  background:repeating-linear-gradient(90deg,#080a0d 0 1px,#2c323a 1px 1.6px);
  box-shadow:0 .4px .4px #d7dce529;
}
.device-hardware{position:absolute;inset:0;border-radius:inherit;transform-style:preserve-3d;pointer-events:none}
.device-button{
  position:absolute;
  width:1.55%;
  border-radius:2px;
  background:linear-gradient(90deg,#161c25,#8b96a5 48%,#424b59 78%,#141922);
  box-shadow:0 0 .7px #dce5f09c,inset 0 .8px 1px #c3ced580,inset 0 -1px 1px #0008;
  transform:translateZ(calc(var(--device-depth) * -.5));
}
.action-button{left:-1.2%;top:17.5%;height:3.2%}
.volume-up{left:-1.2%;top:25%;height:6.1%}
.volume-down{left:-1.2%;top:33%;height:6.1%}
.power-button{right:-1.2%;top:27%;height:10.1%;background:linear-gradient(90deg,#353e4a,#8b96a5 50%,#343d49)}
.antenna{position:absolute;width:1%;height:.7%;background:#19202a;box-shadow:0 0 .4px #e8eaf633;transform:translateZ(calc(var(--device-depth) * -.3))}
.antenna-tl{left:-.05%;top:12%}.antenna-tr{right:-.05%;top:12%}.antenna-bl{left:-.05%;bottom:12%}.antenna-br{right:-.05%;bottom:12%}
.hero-device.front-device{transform:rotateX(5deg) rotateY(-16deg) rotateZ(-9deg)}
.hero-device.back-device{transform:translateY(var(--parallax,0px)) rotateX(4deg) rotateY(-13deg) rotateZ(11deg)}
.back-device .device-screen{filter:brightness(.88)}
.gallery figure{perspective:1300px}
.gallery .gallery-device{transform:translateY(var(--parallax,0px)) rotateX(3deg) rotateY(0deg)}
.gallery figure:nth-child(1) .gallery-device{transform:translateY(var(--parallax,0px)) rotateX(4deg) rotateY(-14deg) rotateZ(-4deg)}
.gallery figure:nth-child(3) .gallery-device{transform:translateY(var(--parallax,0px)) rotateX(4deg) rotateY(14deg) rotateZ(4deg)}
.gallery .device-slice:nth-child(12){box-shadow:8px 15px 22px #17283c1c,18px 30px 40px #17283c20,3px 6px 7px #17283c1c}
@media(max-width:1100px){.hero-device,.gallery-device{--device-depth:16px}}
@media(max-width:700px){
  .hero-device,.gallery-device{--device-depth:14px}
  .hero-device.front-device{transform:rotateX(3deg) rotateY(-12deg) rotateZ(-8deg)}
  .hero-device.back-device{transform:translateY(var(--parallax,0px)) rotateX(3deg) rotateY(-9deg) rotateZ(10deg)}
  .gallery figure{perspective:1100px}
  .gallery .gallery-device,.gallery figure:nth-child(1) .gallery-device,.gallery figure:nth-child(3) .gallery-device{transform:translateY(var(--parallax,0px)) rotateX(3deg) rotateY(-10deg) rotateZ(-2deg)}
}

/* A separate stage reserves the complete rotated hardware envelope.
   Captions are ordinary layout below it, never part of its 3D stack. */
.hero-scene{
  height:auto;
  min-height:0;
  perspective:none;
  transform-style:flat;
  margin-left:0;
  padding-block:5px 25px;
}
.device-stage{
  position:relative;
  width:100%;
  height:720px;
  perspective:1600px;
  transform-style:preserve-3d;
}
.device-stage .route-lines{inset:0;width:100%;height:100%;pointer-events:none}
.device-stage .front-device{top:70px;left:6%}
.device-stage .back-device{top:120px;right:6%}
.device-assembly{transform:rotateX(var(--rx,0deg)) rotateY(var(--ry,0deg))}
.device-glass-reflection{
  background:radial-gradient(ellipse at var(--glare-x,50%) var(--glare-y,30%),#e6f0ff14,transparent 55%),linear-gradient(117deg,#e8f0ff0c,transparent 40%,transparent 75%,#d1e4ff07);
}
.device-caption-row{
  position:relative;
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  align-items:center;
  gap:20px 28px;
  min-height:92px;
  padding:12px 8px 8px;
  isolation:isolate;
}
.device-caption-row .depth-label{
  position:static;
  transform:none;
  flex:0 0 auto;
  padding:10px 15px;
  min-height:62px;
  box-shadow:none;
}
.device-caption-row .scene-caption{
  position:static;
  transform:none;
  white-space:normal;
  max-width:155px;
  line-height:1.65;
}
.device-caption-row .scene-caption i{flex:none}
.hero-grid{column-gap:24px}
@media(min-width:1600px){.device-stage{height:770px}}
@media(max-width:1200px){.device-stage{height:650px}.device-caption-row{gap:16px;min-height:100px}.device-caption-row .scene-caption{max-width:125px}}
@media(max-width:900px) and (min-width:701px){
  .device-stage{height:580px}
  .device-stage .front-device{left:5%;top:70px}
  .device-stage .back-device{right:5%;top:135px}
  .device-caption-row{padding-inline:0;gap:12px}
  .device-caption-row .depth-label{width:100%;max-width:190px;justify-content:center}
}
@media(max-width:700px){
  .hero-scene{height:auto;min-height:0;width:100%;padding-bottom:20px}
  .device-stage{height:550px;perspective:1400px}
  .device-stage .front-device{left:calc(50% - 148px);top:35px}
  .device-stage .back-device{right:calc(50% - 152px);top:90px}
  .device-caption-row{display:grid;grid-template-columns:1fr 1fr;gap:20px 12px;padding:5px 12px 12px;min-height:125px}
  .device-caption-row .depth-label{grid-column:1/-1;justify-self:center;min-height:56px;width:auto;max-width:none}
  .device-caption-row .scene-caption{max-width:none;justify-content:center;text-align:center;font-size:.75rem!important}
  .device-caption-row .depth-label span{font-size:.75rem}
}
@media(max-width:360px){.device-stage{height:490px}.device-stage .front-device{left:calc(50% - 132px)}.device-stage .back-device{right:calc(50% - 137px)}}
@media(prefers-reduced-motion:reduce){.device-assembly{transform:none}}
