/* Case-specific device composition. Screens are frozen real HTML, rendered at
   their original390px width, so type stays sharp on Retina and under rotation. */
:root{--phone-width:clamp(236px,22vw,302px);--device-ratio:2.164;--device-rim:7px;--device-radius:calc(var(--phone-width)*.155);--screen-scale:calc((var(--phone-width) - 2*var(--device-rim))/390px)}
.comparison{gap:82px;padding-top:32px;align-items:start}.before,.after{perspective:1400px}.new-phones{gap:52px;perspective:1400px;padding:10px 5px 35px;align-items:start}
.phone{width:var(--phone-width);height:calc(var(--phone-width)*var(--device-ratio));padding:var(--device-rim);border:0;border-radius:var(--device-radius);background:linear-gradient(100deg,#b9b9bc 0%,#646568 1%,#1b1c1e 3%,#08090a 50%,#333538 97%,#c2c2c5 99%,#66676a 100%);position:relative;isolation:isolate;transform-style:preserve-3d;box-shadow:inset 0 0 0 1px #8b8c90,0 1px 1px #0008,7px 9px 0 -3px #484a4d,8px 10px 0 -3px #a1a2a5,18px 25px 30px -12px #0003,25px 50px 60px -28px #0004}
.phone:before{content:"";position:absolute;inset:2px;border-radius:inherit;border:1px solid #ffffff54;pointer-events:none;z-index:5}
.phone-glass{height:100%;position:relative;overflow:hidden;border-radius:calc(var(--device-radius) - var(--device-rim));background:#fff;box-shadow:0 0 0 2px #050505;transform:translateZ(1px)}
.device-status{height:calc(var(--phone-width)*.136);min-height:0;display:flex;align-items:center;justify-content:space-between;padding:0 7.5%;background:white;font:600 calc(var(--phone-width)*.041)/1 -apple-system,BlinkMacSystemFont,Arial,sans-serif;color:#111;position:relative;z-index:3}.device-status svg{width:23%;height:auto}
.dynamic-island{position:absolute;z-index:4;top:calc(var(--phone-width)*.029);left:35%;width:30%;height:calc(var(--phone-width)*.077);background:#070809;border-radius:40px;box-shadow:inset 0 0 0 1px #161719}.dynamic-island:after{content:"";position:absolute;width:calc(var(--phone-width)*.016);height:calc(var(--phone-width)*.016);right:10%;top:40%;border-radius:50%;background:radial-gradient(circle at 40% 40%,#263448,#0e1422 55%,#020407 80%);box-shadow:0 0 0 1px #11151d}
.device-screen{position:relative;overflow:hidden;height:calc(100% - var(--phone-width)*.136);background:#fff}.device-screen iframe{display:block;width:390px;height:844px;max-width:none;border:0;transform:scale(var(--screen-scale));transform-origin:0 0;pointer-events:none}.device-screen>img{width:100%;height:auto;max-width:none;border-radius:0}
.home-indicator{position:absolute;bottom:calc(var(--phone-width)*.021);left:32%;width:36%;height:calc(var(--phone-width)*.012);border-radius:6px;background:#121212;z-index:4}
.device-keys{position:absolute;top:23%;left:-2px;width:3px;height:12%;background:linear-gradient(90deg,#343538,#b3b4b7,#353639);border-radius:2px;transform:translateZ(-1px);box-shadow:0 calc(var(--phone-width)*.30) 0 #55565a}.device-keys:after{content:"";position:absolute;top:calc(var(--phone-width)*.17);left:calc(var(--phone-width) - 1px);height:calc(var(--phone-width)*.24);width:3px;border-radius:2px;background:linear-gradient(90deg,#333438,#b3b4b7,#353639)}
.phone-before{transform:rotateX(6deg) rotateY(18deg) rotateZ(-7deg);margin:0 auto}.phone-day{transform:rotateX(7deg) rotateY(-17deg) rotateZ(-8deg);z-index:2}.phone-detail{transform:translateY(34px) rotateX(8deg) rotateY(-17deg) rotateZ(8deg);z-index:1}.after-caption{padding-top:28px}.comparison figcaption{padding-top:73px}
@media(max-width:1100px) and (min-width:761px){:root{--phone-width:clamp(190px,23vw,245px)}.comparison{gap:36px}.new-phones{gap:22px}}
@media(max-width:760px){:root{--phone-width:clamp(144px,39vw,230px);--device-rim:4px}.comparison{padding-top:14px;gap:52px}.before{gap:25px}.phone-before{--phone-width:clamp(128px,34vw,180px);width:var(--phone-width);transform:rotateX(5deg) rotateY(15deg) rotateZ(-7deg)}.new-phones{gap:14px;padding:8px 0 25px}.phone-day{transform:rotateX(6deg) rotateY(-15deg) rotateZ(-8deg)}.phone-detail{transform:translateY(21px) rotateX(7deg) rotateY(-15deg) rotateZ(8deg)}.comparison figcaption{padding:0}.after-caption{padding:30px 0 0}.phone{box-shadow:inset 0 0 0 1px #8b8c90,4px 5px 0 -2px #484a4d,5px 6px 0 -2px #a1a2a5,10px 18px 22px -10px #0003,18px 30px 40px -23px #0004}}

/* QA: keep the story aligned on tablet and fit both devices on320px. */
@media(max-width:1000px) and (min-width:761px){.intro{grid-template-columns:1fr;gap:26px;padding-block:64px 44px}.intro-copy{max-width:560px}.intro h1{font-size:clamp(52px,7vw,70px)}}
@media(max-width:380px){:root{--phone-width:clamp(118px,38vw,144px)}.comparison>*{min-width:0}.new-phones{gap:12px}}

/* Keep the supplied menu capture inside the device; omit browser chrome. */
.phone-detail .device-screen>img{clip-path:inset(0 0 7.6% 0)}
