/* Phone story (#features): headline halves ride hairlines in from opposite sides, outline chapter numerals,
   wavy-edge screen changes, scroll-linked phone tilt and a vertical progress ruler.
   features-motion.js adds .fm-live; without it the copy reads as a plain stacked list. */
#features .fm-split{display:block}
#features .fm-row{display:block;position:relative;padding-bottom:.08em;margin-bottom:.1em}
#features .fm-row:after{content:'';position:absolute;left:0;right:0;bottom:0;height:1px;background:rgba(233,223,205,.18);transform-origin:left;transform:scaleX(var(--fm-rule,1))}
#features .fm-row+.fm-row:after{transform-origin:right}
#features .fm-ride{display:inline-block;white-space:nowrap;will-change:transform}
#features .fm-row+.fm-row{text-align:right}
#features .fm-numerals,#features .fm-hud,#features .fm-progress{display:none}

/* ── Live ── */
#features.fm-live .story-stage{position:sticky;isolation:isolate}
#features.fm-live .feature-copy{height:clamp(330px,46svh,420px);z-index:2}
#features.fm-live .feature-copy article{visibility:var(--fm-vis,hidden);opacity:var(--fm-o,0);transition:none;justify-content:center}
#features.fm-live .feature-copy article.is-active{pointer-events:auto}
#features.fm-live .feature-copy h2{max-width:none;width:100%;margin-bottom:22px}
#features.fm-live .feature-copy p,#features.fm-live .feature-copy article>a{opacity:var(--fm-p,1);transform:translateY(calc((1 - var(--fm-p,1))*16px))}

/* Outline chapter numerals behind the copy, one window, stacked vertically. */
#features.fm-live .fm-numerals{display:block;position:absolute;left:-.04em;top:50%;height:1em;margin-top:-.62em;overflow:hidden;z-index:0;pointer-events:none;font:400 clamp(180px,24vw,380px)/1 Anton,sans-serif;letter-spacing:-.01em}
#features .fm-numerals>div{will-change:transform}
#features .fm-numerals span{display:block;height:1em;color:transparent;-webkit-text-stroke:1px rgba(233,223,205,.17)}

/* Mono HUD and vertical progress ruler. */
#features.fm-live .fm-hud{display:flex;position:absolute;left:0;right:0;top:22px;z-index:3}
#features.fm-live .fm-progress{display:block;position:absolute;top:18%;bottom:18%;left:calc(50% + 4px);width:30px;z-index:1;pointer-events:none}
#features .fm-progress:before{content:'';position:absolute;left:0;top:0;bottom:0;width:14px;background:repeating-linear-gradient(180deg,rgba(233,223,205,.12) 0 1px,transparent 1px 12px)}
#features .fm-progress:after{content:'';position:absolute;left:0;top:0;bottom:0;width:1px;background:rgba(233,223,205,.16)}
#features .fm-progress i{position:absolute;left:0;top:0;width:1px;height:100%;background:var(--ink,#F4EFE7);transform-origin:top;transform:scaleY(var(--fm-progress,0));z-index:1}
#features .fm-progress b{position:absolute;left:20px;font:500 10px/1 var(--body),sans-serif;letter-spacing:.14em;color:rgba(233,223,205,.35);transform:translateY(-50%);transition:color .3s}
#features .fm-progress b.is-on{color:var(--ink,#F4EFE7)}
#features .fm-progress b:nth-of-type(1){top:0}#features .fm-progress b:nth-of-type(2){top:50%}#features .fm-progress b:nth-of-type(3){top:100%}

/* Phone: screens stack; the incoming one rises behind a wave (clip-path set by JS). */
#features.fm-live .phone-wrap{perspective:1400px;z-index:2}
#features.fm-live .phone{transform-style:flat;will-change:transform}
#features.fm-live .screen{display:block!important;will-change:clip-path}
#features.fm-live .screen>img{transform-origin:50% 40%;will-change:transform}

@media(max-width:900px){
 #features.fm-live .feature-copy{height:clamp(120px,19svh,150px)}
 #features.fm-live .feature-copy h2{margin-bottom:8px}
 #features.fm-live .fm-numerals{left:auto;right:-.02em;top:62%;font-size:clamp(150px,46vw,240px);margin-top:-.5em}
 #features.fm-live .fm-hud{top:12px;font-size:9px;letter-spacing:.14em}
 #features.fm-live .fm-progress{display:none}
 #features .fm-row:after{background:rgba(233,223,205,.14)}
}
@media(max-height:740px) and (min-width:901px){#features.fm-live .feature-copy{height:300px}}
#features{overflow-x:clip}
#features.fm-live .feature-copy{overflow:clip}

/* ── Round 2: system device, calmer layout ── */
/* Device refinements on top of site-system .ns-device (candidates to move into the system):
   brighter titanium rim, concentric bezel, legible buttons, iOS status bar covering the Android capture's own. */
:is(#hero,#features) .ns-device{
 background:linear-gradient(155deg,#9a9ba0 0%,#4a4b50 5%,#232427 22%,#141517 50%,#1f2023 78%,#5c5d62 95%,#a3a4a9 100%);
 box-shadow:inset 0 0 0 1px rgba(255,255,255,.38),inset 0 0 0 calc(var(--w)*.009) #34353a,inset 0 0 0 calc(var(--w)*.014) #08080a,
  0 calc(var(--w)*.12) calc(var(--w)*.22) calc(var(--w)*-.08) rgba(0,0,0,.85),0 calc(var(--w)*.03) calc(var(--w)*.06) rgba(0,0,0,.45)}
:is(#hero,#features) .ns-device:before{inset:calc(var(--w)*.013);border-radius:calc(var(--w)*.158)}
:is(#hero,#features) .ns-btn{width:calc(var(--w)*.014);background:linear-gradient(90deg,#2a2b2e 0%,#8c8d92 45%,#3d3e42 100%);box-shadow:0 0 0 .5px rgba(0,0,0,.6)}
:is(#hero,#features) .ns-btn--action,:is(#hero,#features) .ns-btn--up,:is(#hero,#features) .ns-btn--down{left:calc(var(--w)*-.012);border-radius:3px 0 0 3px}
:is(#hero,#features) .ns-btn--power{right:calc(var(--w)*-.012);border-radius:0 3px 3px 0}
:is(#hero,#features) .ns-screen:before{z-index:10;top:calc(var(--w)*.032);height:calc(var(--w)*.088);width:calc(var(--w)*.31);box-shadow:inset calc(var(--w)*.06) 0 calc(var(--w)*.02) calc(var(--w)*-.05) rgba(40,50,70,.35)}
:is(#hero,#features) .ns-screen:after{z-index:9;background:linear-gradient(120deg,rgba(255,255,255,.09) 0%,rgba(255,255,255,.025) 30%,transparent 46%,transparent 80%,rgba(255,255,255,.035) 100%)}
.ns-status{position:absolute;z-index:8;left:0;right:0;top:0;height:calc(var(--w)*.13);display:flex;align-items:center;justify-content:space-between;padding:calc(var(--w)*.012) calc(var(--w)*.085) 0 calc(var(--w)*.1);
 background:linear-gradient(#0d0f13 62%,rgba(13,15,19,0));color:#fff;font:600 calc(var(--w)*.046)/1 -apple-system,BlinkMacSystemFont,'SF Pro Text',Archivo,sans-serif;letter-spacing:-.01em;pointer-events:none}
.ns-status svg{height:calc(var(--w)*.036);width:auto;display:block}
.ns-status>span:last-child{display:flex;align-items:center;gap:calc(var(--w)*.016)}

/* Features: the phone is a sized container; the device fills it. */
#features .phone{container-type:inline-size;width:min(300px,calc((100svh - 64px - 150px)/2.064));height:auto!important;padding:0;border:0!important;border-radius:0!important;background:none!important;box-shadow:none!important;overflow:visible!important;margin:auto}
#features .phone>.ns-device{--w:100cqw}
#features .ns-screen>.screen{position:absolute!important;inset:0!important;height:auto!important;border:0!important;border-radius:0!important;margin:0!important;padding:0;background:#0d0f13}
#features .ns-screen>.screen>img{width:100%;height:100%;object-fit:cover;object-position:top}
#features:not(.fm-live) .ns-screen>.screen~.screen{display:none!important}
#features .phone-wrap{display:flex;justify-content:center;align-items:center;height:auto}

/* Calm copy column on the system type scale. */
#features .ns-kicker{font-size:var(--ns-kicker)}
#features.fm-live .fm-hud{top:clamp(20px,4svh,40px)}
#features .feature-copy p{font-size:var(--ns-lead);line-height:1.55;font-weight:500;color:var(--ns-mid);max-width:40ch;margin:0}
#features .feature-copy article>a{margin-top:22px;font-size:var(--ns-small);font-weight:700;letter-spacing:.02em}
#features.fm-live .feature-copy h2{margin-bottom:28px}
#features .fm-row:after{background:var(--ns-line)}
/* Progress: a single hairline with a fill and three labels; no tick comb. */
#features .fm-progress:before{display:none}
#features .fm-progress:after{background:var(--ns-line)}
#features .fm-progress b{left:14px;color:var(--ns-dim)}
@media(max-width:900px){
 #features .phone{width:min(240px,calc((100svh - 64px - 270px)/2.064))}
 #features.fm-live .fm-hud{top:14px}
 #features .feature-copy p{font-size:14px}
}
