/* Scroll through real app screens inside one persistent device. */
.duo-link { color: #eadcff; border: 1px solid #ad80ee70; }
.duo-link::after { content: ' ↗'; margin-left: 8px; }
.device-story { --scene-top: 61px; --story-progress: 0; scroll-margin-top: 60px; }
.device-story.features { display: block; padding: 0; max-width: none; overflow: visible; }
.story-duo { background: linear-gradient(180deg, #1a1238, #221848 50%, #1a1238); }
.story-phone { background: #100a26; }
.story-intro { padding: 105px var(--gutter) 55px; margin: auto; max-width: 1150px; text-align: center; }
.story-product { font-size: 15px; font-weight: 500; color: #d6bdff; margin-bottom: 20px; }
.story-intro h2 { font: 700 clamp(44px,7vw,96px)/1.03 var(--serif); letter-spacing: -.045em; text-wrap: balance; }
.story-intro-copy { max-width: 670px; font-size: clamp(17px,1.6vw,21px); color: var(--text-soft); line-height: 1.5; margin: 26px auto 0; text-wrap: balance; }
.story-runway { position: relative; height: 440svh; }
.story-sticky { position: sticky; top: var(--scene-top); height: calc(100svh - var(--scene-top)); min-height: 580px; padding: 28px var(--gutter) 16px; display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 1600px; margin: auto; }
.story-layout { display: grid; grid-template-columns: minmax(260px,.8fr) minmax(0,1.6fr); gap: clamp(30px,5vw,76px); align-items: center; flex: 1; min-height: 0; }
.story-copy { max-width: 425px; }
.story-step { color: #d6bdff; font-size: 12px; font-variant-numeric: tabular-nums; margin-bottom: 18px; }
.story-panel h3 { font: 700 clamp(30px,3.1vw,45px)/1.1 var(--serif); letter-spacing: -.025em; margin-bottom: 22px; text-wrap: balance; }
.story-description { font-size: clamp(14px,1.25vw,17px); line-height: 1.65; color: var(--text-soft); }
.story-device-area { min-width: 0; display: flex; align-items: center; justify-content: center; height: 100%; min-height: 0; perspective: 1600px; }
.story-device { width: min(100%, calc((100svh - 235px) * 1.4215)); aspect-ratio: 2853 / 2007; background: #0d0916; border: 7px solid #0d0916; border-radius: 26px; box-shadow: 0 0 0 1px #ad94c84d, 0 3px 0 2px #51435d, 0 30px 65px #0006; overflow: hidden; position: relative; }
.story-screen { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 18px; background: #1c1752; }
.story-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transform: translateX(calc(var(--slide-direction, 1) * 8%)); transition: opacity .38s ease, transform .55s cubic-bezier(.22,.61,.36,1); }
.story-image.is-active { opacity: 1; transform: translateX(0); z-index: 1; }
.story-duo .story-device::after { content: ''; position: absolute; z-index: 2; top: 0; bottom: 0; left: 50%; width: 3px; background: linear-gradient(90deg, transparent, #0002, #ffffff0a); pointer-events: none; }
/* Solid rounded shells: the outer display is on the back of the LEFT leaf.
   It closes over the stationary right leaf and opens to the left like a book. */
.story-duo .story-device-area { perspective: 2200px; perspective-origin: 50% 42%; }
.story-duo .duo-model {
  --duo-fold: 180deg;
  --duo-yaw: -10deg;
  --duo-pitch: 7deg;
  --duo-shift: -25%;
  --duo-shade: 0;
  --duo-depth: 20px;
  --duo-radius: 48px;
  --duo-bezel: 6px;
  --duo-gap: 2px;
  width: min(94%, calc((100svh - 275px) * 1.3973));
  aspect-ratio: 164.6 / 117.8;
  border: 0;
  border-radius: 0;
  overflow: visible;
  background: transparent;
  box-shadow: none;
  transform-style: preserve-3d;
  transform: translateX(var(--duo-shift)) rotateX(var(--duo-pitch)) rotateY(var(--duo-yaw));
  will-change: transform;
}
.story-duo .duo-model::after { display: none; }
.duo-leaf { position: absolute; width: 50%; height: 100%; top: 0; transform-style: preserve-3d; }
.duo-leaf-left { left: 0; --shell-radius: var(--duo-radius) 4px 4px var(--duo-radius); transform-origin: right center; transform: translateZ(var(--duo-gap)) rotateY(var(--duo-fold)); will-change: transform; }
.duo-leaf-right { left: 50%; --shell-radius: 4px var(--duo-radius) var(--duo-radius) 4px; }
.duo-shell-layer { position: absolute; inset: 0; border-radius: var(--shell-radius); background: linear-gradient(120deg, #a9a6ae, #4e4b55 25%, #77727f 65%, #b4aebb); border: 1px solid #d6d0dc55; transform: translateZ(calc(var(--duo-depth) * var(--layer-depth))); }
.duo-shell-layer:first-child { box-shadow: 0 22px 38px #0005; background: #25232d; }
.duo-face { position: absolute; inset: 0; padding: var(--duo-bezel); border: 1px solid #b4afbe; background: #090910; backface-visibility: hidden; -webkit-backface-visibility: hidden; overflow: hidden; }
.duo-inner { border-radius: var(--shell-radius); transform: translateZ(1px); }
.duo-leaf-left .duo-inner { padding-right: 0; border-right: 0; border-radius: var(--duo-radius) 0 0 var(--duo-radius); }
.duo-leaf-right .duo-inner { padding-left: 0; border-left: 0; border-radius: 0 var(--duo-radius) var(--duo-radius) 0; }
.story-duo .duo-inner .story-screen { border-radius: calc(var(--duo-radius) - var(--duo-bezel)) 0 0 calc(var(--duo-radius) - var(--duo-bezel)); }
.story-duo .duo-leaf-right .story-screen { border-radius: 0 calc(var(--duo-radius) - var(--duo-bezel)) calc(var(--duo-radius) - var(--duo-bezel)) 0; }
.duo-inner .story-image { top: 5.5%; bottom: auto; width: 200%; height: 94.5%; max-width: none; object-fit: contain; }
.duo-leaf-right .story-image { left: -100%; }
.duo-cover { border-radius: 4px var(--duo-radius) var(--duo-radius) 4px; transform: rotateY(180deg) translateZ(calc(var(--duo-depth) + 1px)); }
.duo-cover img { padding-top: 7.5%; display: block; width: 100%; height: 100%; object-fit: contain; background: #1c1752; border-radius: 2px calc(var(--duo-radius) - var(--duo-bezel)) calc(var(--duo-radius) - var(--duo-bezel)) 2px; }
.duo-cover::after { content: ''; position: absolute; width: 5.5%; aspect-ratio: 1; top: 5%; right: 8%; border-radius: 50%; background: radial-gradient(circle at 40% 40%, #243144 0, #090b14 30%, #020207 58%); box-shadow: 0 0 0 2px #12121c; }
.duo-inner::after { content: ''; position: absolute; inset: 0; pointer-events: none; opacity: var(--duo-shade); background: linear-gradient(90deg, #fff2, transparent 55%, #000); }
.duo-leaf-right .duo-inner::after { background: linear-gradient(90deg, #000, transparent 45%, #ffffff18); }
.duo-side-button { position: absolute; right: -2px; top: 22%; height: 11%; width: calc(var(--duo-depth) * .6); border: 1px solid #b2acbc; border-radius: 3px; background: linear-gradient(90deg, #3d3947, #9993a2, #514c5d); transform-origin: right center; transform: translateZ(calc(var(--duo-depth) * -.2)) rotateY(90deg); }
.duo-posture { color: #d6bdff; font-size: 12px; margin-bottom: 14px; }
.story-phone .story-layout { grid-template-columns: 1fr 1fr; gap: clamp(40px,8vw,150px); max-width: 1000px; width: 100%; margin: auto; }
.story-phone .story-device { width: auto; height: min(100%, 570px); max-width: 100%; aspect-ratio: 1320 / 2868; border: 6px solid #0d0916; border-radius: 37px; }
.story-phone .story-screen { border-radius: 30px; }
.story-tabs { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid var(--rule); border-radius: 40px; padding: 6px; width: min(100%, 820px); margin-inline: auto; background: #ffffff06; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.story-tabs::-webkit-scrollbar { display: none; }
.story-tab { color: var(--text-soft); background: transparent; border: 0; border-radius: 30px; font-size: 13px; line-height: 1.35; white-space: nowrap; padding: 12px 20px; min-height: 44px; flex: 1 0 auto; transition: background .2s, color .2s; }
.story-tab[aria-selected='true'] { background: white; color: var(--bg); }
.story-tab:hover:not([aria-selected='true']) { background: #ffffff0d; color: white; }
.story-tab:focus-visible { outline-offset: -3px; }
.story-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; color: var(--text-muted); font-size: 11px; width: min(100%, 820px); margin-inline: auto; flex-shrink: 0; }
.story-hint::before { content: '↓'; margin-right: 8px; }
.story-skip { padding: 5px 0; color: var(--text-soft); }
.story-skip::after { content: ' ↓'; margin-left: 6px; }
.story-sticky::after { content: ''; position: absolute; bottom: 0; height: 2px; left: var(--gutter); right: var(--gutter); background: #bb8bff; transform: scaleX(var(--story-progress)); transform-origin: left; }
@media (max-width: 900px) {
  .story-sticky { gap: 18px; padding-inline: 30px; }
  .story-layout { grid-template-columns: minmax(230px,.9fr) minmax(0,1.2fr); gap: 30px; }
  .story-panel h3 { font-size: 31px; }
  .story-description { font-size: 15px; }
  .story-tab { padding-inline: 15px; }
}
@media (max-width: 700px) {
  .story-intro { padding: 75px 24px 35px; }
  .story-intro h2 { font-size: clamp(43px,10vw,68px); }
  .story-runway { height: 410svh; }
  .story-sticky { min-height: 0; gap: 12px; padding: 16px 22px 12px; }
  .story-layout, .story-phone .story-layout { display: flex; flex-direction: column-reverse; justify-content: center; gap: 20px; }
  .story-copy { width: 100%; max-width: 500px; flex-shrink: 0; }
  .story-step { font-size: 10px; margin-bottom: 8px; }
  .story-panel h3 { font-size: clamp(22px,5.6vw,30px); margin-bottom: 10px; }
  .story-description { font-size: 13px; line-height: 1.5; }
  .story-device-area { width: 100%; flex: 1; }
  .story-duo .duo-model { width: min(92%, calc((100svh - 410px) * 1.3973)); }
  .duo-posture { font-size: 10px; margin-bottom: 8px; }
  .story-phone .story-device { max-height: 40svh; border-width: 4px; border-radius: 25px; }
  .story-phone .story-screen { border-radius: 20px; }
  .story-tabs { gap: 3px; padding: 4px; justify-content: start; border-radius: 24px; }
  .story-tab { flex: 0 0 auto; font-size: 12px; padding: 10px 16px; min-height: 38px; }
  .story-footer { font-size: 10px; gap: 12px; }
}
/* Small landscape windows use the same complete manual navigator without pinning. */
@media (max-height: 600px) {
  .story-runway { height: auto; }
  .story-sticky { position: relative; top: 0; height: auto; min-height: 0; padding-block: 35px; }
  .story-layout { min-height: 360px; }
  .story-device { width: 100%; }
  .story-phone .story-device { height: 330px; max-height: none; }
  .story-hint, .story-sticky::after { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) {
  .story-runway { height: auto; }
  .story-sticky { position: relative; top: 0; height: auto; min-height: 0; padding-block: 35px; }
  .story-layout { min-height: 500px; }
  .story-phone .story-device { height: 450px; }
  .story-image { transform: none; transition: none; }
  .story-hint, .story-sticky::after { visibility: hidden; }
}
@media (prefers-reduced-motion: reduce) and (max-width: 700px) {
  .story-layout { min-height: 0; }
  .story-duo .story-device { width: 100%; }
  .story-phone .story-device { height: 330px; }
}
