/* =====================================================================
   The Adactiv app, rebuilt in HTML: phone frame, app screens (nutrition,
   training, adaptive volume, coach, onboarding, home, check-in), the fake
   finger and the comment bubbles. Shared by index.html (the app flow) and
   features.html (the full tour). Uses the page's colour tokens.
   Lucide-style icons are fine in here: they mirror the real app UI.
   ===================================================================== */
/* comment bubbles: beside the phone on wide screens, over it on phones */
.notes { position: absolute; inset: 0; z-index: 6; pointer-events: none; }
.note { position: absolute; left: 0; top: 0; width: max-content; max-width: 240px; padding: 11px 14px; border-radius: 16px; background: #f3f3ef; color: #0a0a0c; font-weight: 600; font-size: 14.5px; line-height: 1.3; letter-spacing: -.01em; box-shadow: 0 18px 40px -12px rgba(0,0,0,.75); }
.note::after { content: ""; position: absolute; width: 12px; height: 12px; background: inherit; border-radius: 2px; transform: rotate(45deg); }
.note[data-side="l"]::after { right: -5px; top: calc(var(--t, 50%) - 6px); }
.note[data-side="r"]::after { left: -5px; top: calc(var(--t, 50%) - 6px); }
.note[data-side="b"]::after { bottom: -5px; left: calc(var(--t, 50%) - 6px); }
.note[data-side="t"]::after { top: -5px; left: calc(var(--t, 50%) - 6px); }
@media (max-width: 699px) { .note { font-size: 13px; padding: 9px 12px; border-radius: 14px; } }
.note.note-sm { font-size: 12px; padding: 7px 10px; border-radius: 12px; }

/* the phone */
.phone-wrap { --s: 1; position: relative; width: calc(316px * var(--s)); height: calc(664px * var(--s)); flex: none; }
.phone {
    position: absolute; left: 0; top: 0; width: 316px; height: 664px; transform: scale(var(--s)); transform-origin: 0 0;
    border-radius: 54px; padding: 11px; background: linear-gradient(145deg, #2a2a2f, #121215 40%, #1d1d21);
    box-shadow: 0 0 0 1px rgba(255,255,255,.1), 0 60px 120px -30px rgba(0,0,0,.9), 0 0 140px -40px rgba(30,215,96,.28);
}
.phone::before { content: ""; position: absolute; top: 22px; left: 50%; width: 96px; height: 28px; margin-left: -48px; border-radius: 20px; background: #000; z-index: 30; }
.screen {
    position: relative; width: 294px; height: 642px; border-radius: 44px; overflow: hidden; background: #070708;
    font-family: var(--f-sans); color: #f2f2f2; font-size: 12px; line-height: 1.35; user-select: none; -webkit-user-select: none; isolation: isolate;
}
.sb { position: absolute; top: 0; left: 0; right: 0; height: 48px; padding: 18px 26px 0; display: flex; justify-content: space-between; font-weight: 600; font-size: 13px; z-index: 25; pointer-events: none; }
.sb .bat { width: 22px; height: 11px; border-radius: 3.5px; border: 1.2px solid #f2f2f2; position: relative; margin-top: 3px; }
.sb .bat::after { content: ""; position: absolute; inset: 1.5px 5px 1.5px 1.5px; background: #f2f2f2; border-radius: 1.5px; }
.app-top { position: absolute; top: 48px; left: 0; right: 0; height: 44px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between; z-index: 5; }
.app-top img { width: 24px; }
.app-top .ic { display: flex; gap: 8px; }
.app-top .ic span { width: 28px; height: 28px; border-radius: 50%; background: #1b1b1f; display: grid; place-items: center; font-size: 13px; color: #cfcfd4; }
.app-top .ic span.m { color: var(--mint); }
.views { position: absolute; top: 92px; left: 0; right: 0; bottom: 70px; overflow: hidden; }
.view { position: absolute; inset: 0; padding: 4px 12px 12px; visibility: hidden; }
.view.on { visibility: visible; }
.tabbar { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; padding: 10px 22px 22px; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid rgba(255,255,255,.06); background: #070708; z-index: 20; }
.tab { width: 38px; height: 38px; display: grid; place-items: center; color: #6c6c73; font-size: 18px; position: relative; border-radius: 12px; transition: color .3s; }
.tab.on { color: #fff; }
.tab.on::after { content: ""; position: absolute; bottom: -3px; left: 50%; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: #fff; }
.card { background: #141417; border: 1px solid rgba(255,255,255,.05); border-radius: 18px; }
.pressed { transform: scale(.94) !important; filter: brightness(1.25); }


/* adaptive volume view (the explainer, as an app screen) */
.av-top { display: flex; align-items: center; gap: 10px; margin: 2px 0 10px; }
.av-top .back { width: 26px; height: 26px; border-radius: 50%; background: #1b1b1f; display: grid; place-items: center; font-size: 13px; color: #cfcfd4; }
.av-top b { font-size: 15px; letter-spacing: -.02em; }
.av-top small { margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: .1em; color: var(--mint); }
.av-weeks { position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.av-wk { padding: 7px 6px 6px; border-radius: 12px; background: #111114; border: 1px solid rgba(255,255,255,.05); display: grid; gap: 5px; align-content: start; min-height: 150px; }
.av-wk > small { font-size: 9px; font-weight: 700; color: #8a8a90; margin: 0 0 1px 2px; }
.av-c { display: grid; grid-template-columns: 18px 1fr; column-gap: 5px; align-items: center; padding: 5px; border-radius: 9px; background: #1a1a1e; border: 1px solid rgba(255,255,255,.06); font-size: 9.5px; font-weight: 700; line-height: 1.15; }
.av-c .icon { grid-row: span 2; width: 18px; height: 18px; padding: 3px; border-radius: 6px; background: #0e0e10; color: #cfcfd4; }
.av-c.b .icon { color: var(--mint); }
.av-c em { font-style: normal; font-weight: 500; font-size: 8.5px; color: #8a8a90; }
.av-c.ok { border-color: rgba(30,215,96,.55); }
.av-scan { position: absolute; top: -4px; bottom: -4px; left: 0; width: 2px; background: var(--mint); box-shadow: 0 0 14px 3px rgba(30,215,96,.55); opacity: 0; }
.av-next { margin-top: 10px; padding: 12px 12px 10px; }
.av-nh { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.av-nh b { font-size: 13.5px; letter-spacing: -.02em; }
.av-nh small { font-size: 9px; color: #8a8a90; font-weight: 600; }
.av-row { display: grid; grid-template-columns: 58px 1fr 60px 16px; align-items: center; gap: 7px; height: 30px; font-size: 11px; font-weight: 700; }
.av-tr { position: relative; height: 6px; border-radius: 6px; background: #222226; }
.av-tr i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px; background: #d9d9dc; }
.av-tr em { position: absolute; top: -6px; bottom: -6px; width: 0; border-left: 1.5px dashed #6c6c73; }
.av-row > b { text-align: right; font-size: 10.5px; white-space: nowrap; }
.av-row u { width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; text-decoration: none; font-size: 10px; font-weight: 800; opacity: 0; }
.av-row.up .av-tr i { background: var(--mint); } .av-row.up u { background: var(--mint); color: #03140a; opacity: 1; }
.av-row.hold u { background: #3a3a40; color: #e5e5e5; opacity: 1; }
.av-row.down .av-tr i { background: #fbbf24; } .av-row.down u { background: #fbbf24; color: #1a1300; opacity: 1; }
.av-leg { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 8.5px; color: #6c6c73; }
.av-leg em { height: 10px; border-left: 1.5px dashed #6c6c73; }

/* nutrition view */
.kcal { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 14px; }
.ring { position: relative; width: 96px; height: 96px; }
.ring svg { width: 96px; height: 96px; transform: rotate(-90deg); }
.ring .num { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; text-align: center; }
.ring .num b { font-size: 21px; font-weight: 700; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.ring .num small { font-size: 8px; letter-spacing: .14em; color: #8a8a90; }
.goal { display: flex; justify-content: space-between; font-size: 10.5px; color: #8a8a90; }
.goal b { color: #fff; font-size: 12px; }
.bar { height: 5px; border-radius: 4px; background: #26262b; margin: 7px 0 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 39%; background: #f2f2f2; border-radius: 4px; }
.macros { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; font-size: 9px; color: #8a8a90; line-height: 1.3; }
.macros b { display: block; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.macros .p b { color: var(--prot); } .macros .c b { color: var(--carb); } .macros .f b { color: var(--fat); }
.seg { display: flex; gap: 2px; margin: 10px 0; padding: 4px; border-radius: 14px; background: #141417; font-size: 9.5px; font-weight: 600; letter-spacing: .06em; color: #7c7c83; }
.seg span { flex: 1; display: grid; place-items: center; padding: 7px 0; border-radius: 10px; }
.seg span.on { background: #fff; color: #000; }
.analyst { padding: 18px 14px 14px; text-align: center; }
.analyst .cam-ic { width: 42px; height: 42px; margin: 0 auto 10px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-size: 19px; }
.analyst .ttl { margin: 0; font-size: 14px; font-weight: 700; }
.analyst p { margin: 3px 0 14px; font-size: 10.5px; color: #8a8a90; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tile { height: 64px; border-radius: 14px; background: #1f1f24; display: grid; place-items: center; align-content: center; gap: 6px; font-size: 10.5px; font-weight: 600; transition: transform .2s; }
.tile .icon { font-size: 18px; color: var(--mint); }
.tile.bc .icon { color: #818cf8; }
.recent { margin-top: 10px; padding: 10px 14px; display: flex; align-items: center; gap: 10px; opacity: 0; }
.recent img { width: 34px; height: 34px; border-radius: 10px; object-fit: cover; }
.recent div { flex: 1; font-size: 11px; }
.recent small { display: block; color: #8a8a90; font-size: 9.5px; }
.recent b { color: var(--mint); font-size: 11px; }

.cam { position: absolute; inset: 0; z-index: 22; background: #000; transform: translateY(100%); }
.cam-top { position: absolute; top: 58px; left: 0; right: 0; text-align: center; font-size: 10px; font-weight: 700; letter-spacing: .18em; color: #fbbf24; }
.cam-view { position: absolute; left: 0; right: 0; top: 84px; bottom: 150px; overflow: hidden; }
.cam-view img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.12); }
.cam-grid { position: absolute; inset: 0; background: linear-gradient(90deg, transparent 33.1%, rgba(255,255,255,.18) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.18) 66.7%, transparent 66.9%), linear-gradient(180deg, transparent 33.1%, rgba(255,255,255,.18) 33.3%, transparent 33.5%, transparent 66.5%, rgba(255,255,255,.18) 66.7%, transparent 66.9%); }
.flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 3; }
.cam-bottom { position: absolute; left: 0; right: 0; bottom: 34px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; }
.cam-thumb { width: 42px; height: 42px; border-radius: 8px; background: #1b1b1f url(/assets/demo/meal-prep.webp) center/cover; }
.cam-flip { width: 42px; height: 42px; border-radius: 50%; background: #1b1b1f; }
.shutter { width: 70px; height: 70px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
.shutter::before { content: ""; width: 56px; height: 56px; border-radius: 50%; background: #fff; }
.anl { position: absolute; inset: 0; z-index: 23; background: rgba(0,0,0,.96); display: grid; place-items: center; align-content: center; gap: 18px; text-align: center; opacity: 0; visibility: hidden; }
.anl-ring { position: relative; width: 76px; height: 76px; border-radius: 50%; border: 2px solid rgba(16,185,129,.3); display: grid; place-items: center; }
.anl-ring span { width: 62px; height: 62px; border-radius: 50%; border: 2px solid rgba(16,185,129,.6); display: grid; place-items: center; color: #10b981; font-size: 28px; animation: anlpulse 1.4s ease-in-out infinite; }
.anl-ring i { position: absolute; top: -2px; right: -2px; width: 12px; height: 12px; border-radius: 50%; background: #10b981; animation: anlping 1.2s ease-out infinite; }
@keyframes anlpulse { 50% { opacity: .5; } }
@keyframes anlping { 0% { box-shadow: 0 0 0 0 rgba(16,185,129,.7); } 100% { box-shadow: 0 0 0 10px rgba(16,185,129,0); } }
.anl .ttl5 { font-size: 15px; font-weight: 700; }
.anl p { margin: -12px 0 0; font-size: 11px; color: #71717a; }
.anl-dots { display: flex; gap: 5px; justify-content: center; }
.anl-dots i { width: 7px; height: 7px; border-radius: 50%; background: #10b981; animation: dot 1s infinite; }
.anl-dots i:nth-child(2) { animation-delay: .15s; } .anl-dots i:nth-child(3) { animation-delay: .3s; }
.fmodal { position: absolute; inset: 0; z-index: 24; background: rgba(0,0,0,.8); display: grid; place-items: center; padding: 18px; opacity: 0; visibility: hidden; }
.fcard { width: 100%; padding: 18px; border-radius: 22px; background: #141417; border: 1px solid rgba(255,255,255,.08); }
.fhead { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; }
.fhead img { width: 44px; height: 44px; border-radius: 12px; object-fit: cover; flex: none; }
.fhead .ttl5 { font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: -.02em; }
.fhead small { display: block; margin-top: 3px; font-size: 10.5px; color: #71717a; }
.famt { display: flex; gap: 6px; padding: 6px; border-radius: 12px; background: #000; border: 1px solid #27272a; }
.famt span { flex: 1; display: grid; place-items: center; height: 36px; border-radius: 8px; background: #18181b; font-weight: 700; font-size: 13px; }
.famt span.u { flex: none; width: 96px; font-size: 10.5px; }
.fgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 12px 0 8px; text-align: center; }
.fgrid div { padding: 9px 0; border-radius: 10px; background: #1c1c21; }
.fgrid b { display: block; font-size: 14px; font-variant-numeric: tabular-nums; }
.fgrid small { font-size: 8.5px; letter-spacing: .06em; color: #8a8a90; text-transform: uppercase; }
.fgrid .p { color: var(--prot); } .fgrid .c { color: var(--carb); } .fgrid .f { color: var(--fat); }
.fnote { margin: 0 0 12px; font-size: 9.5px; color: #71717a; line-height: 1.4; }
.fbtns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 8px; }
.fbtns span { display: grid; place-items: center; height: 42px; border-radius: 12px; border: 1px solid #27272a; color: #a1a1aa; font-weight: 600; font-size: 12.5px; }
.add { height: 42px; width: 100%; border-radius: 12px; background: var(--mint); color: var(--mint-ink); font-weight: 700; font-size: 12.5px; display: grid; place-items: center; }
.toast { position: absolute; left: 50%; top: 100px; z-index: 26; transform: translate(-50%, -20px); opacity: 0; padding: 9px 14px; border-radius: 999px; background: #fff; color: #000; font-size: 11px; font-weight: 700; white-space: nowrap; display: flex; gap: 8px; align-items: center; box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.toast .icon { color: #0e8f3f; font-size: 14px; }

/* training view */
.tr-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.tr-top .back { width: 30px; height: 30px; border-radius: 50%; background: #1b1b1f; display: grid; place-items: center; font-size: 14px; }
.tr-top .day { font-size: 10.5px; font-weight: 700; letter-spacing: .16em; }
.tr-top .fin { padding: 7px 12px; border-radius: 999px; background: var(--mint); color: var(--mint-ink); font-size: 10.5px; font-weight: 700; }
.ex { padding: 14px 12px 10px; }
.ex .ttl, .ex2 .ttl { margin: 0; font-size: 14px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; }
.ex .ttl .icon { color: #6c6c73; font-size: 14px; }
.tgtline { margin: 4px 0 10px; font: 500 7.5px/1 var(--f-mono); letter-spacing: .12em; color: #6c6c73; }
.hdr, .set { display: grid; grid-template-columns: 36px 1fr 1fr 1fr 34px; gap: 6px; align-items: center; }
.hdr { font: 500 7.5px/1 var(--f-mono); letter-spacing: .14em; color: #5b5b62; padding: 0 2px 6px; text-align: center; }
.set { margin-bottom: 7px; padding: 6px 4px; border-radius: 12px; background: #1a1a1e; transition: background .4s; }
.set .no { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: #0d0d0f; font-size: 7px; letter-spacing: .1em; color: #7c7c83; line-height: 1.1; text-align: center; }
.set .no b { display: block; font-size: 12px; color: #fff; letter-spacing: 0; }
.fld { height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; transition: color .25s, background .25s; }
.set .fld.rir { color: var(--mint); }
.set.open .fld { color: #4a4a50; background: #111114; }
.set.open .fld.filled { color: #fff; background: #222228; }
.set.open .fld.rir.filled { color: var(--mint); }
.chk { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 15px; position: relative; overflow: hidden; background: #26262b; color: #5b5b62; }
.set.done .chk { background: var(--mint); color: var(--mint-ink); }
.chk .fill { position: absolute; left: 50%; top: 50%; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; background: var(--mint); transform: scale(0); }
.chk .icon { position: relative; z-index: 1; }
.set.just { background: rgba(30, 215, 96, .12); }
.ex2 { margin-top: 10px; padding: 14px 12px; opacity: .6; }
.ex2 .pill { font-size: 8px; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--mint); color: var(--mint); letter-spacing: .08em; }
.rest { position: absolute; inset: 0; z-index: 22; background: rgba(7,7,8,.97); display: grid; place-items: center; align-content: center; gap: 12px; text-align: center; opacity: 0; visibility: hidden; }
.rest .rring { position: relative; width: 170px; height: 170px; }
.rest .rring svg { width: 170px; height: 170px; transform: rotate(-90deg); }
.rest .rring b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 40px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rest .ttl5 { margin: 6px 0 0; font-size: 16px; font-weight: 700; }
.rest p { margin: 0; font-size: 10.5px; color: #8a8a90; }
.rest .rb { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 210px; margin-top: 4px; }
.rest .rb span { height: 34px; border-radius: 10px; background: #26262b; display: grid; place-items: center; font-size: 11px; font-weight: 600; }
.rest .min { width: 210px; height: 38px; border-radius: 11px; background: var(--mint); color: var(--mint-ink); display: grid; place-items: center; font-size: 11.5px; font-weight: 700; }
.prog { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 23; padding: 12px 14px; border-radius: 16px; background: #fff; color: #000; display: flex; gap: 10px; align-items: center; transform: translateY(140%); }
.prog .icon { font-size: 20px; color: #0e8f3f; }
.prog small { display: block; font-size: 8.5px; letter-spacing: .12em; text-transform: uppercase; color: #555; font-weight: 700; }
.prog b { font-size: 12.5px; letter-spacing: -.01em; }

/* coach view */
.chat { position: absolute; inset: 4px 12px 62px; display: flex; flex-direction: column; justify-content: flex-end; gap: 10px; overflow: hidden; }
.msg { display: flex; gap: 8px; align-items: flex-end; flex: none; }
.msg .av { width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #000; display: grid; place-items: center; font-size: 13px; flex: none; }
.bub { max-width: 82%; padding: 10px 12px; border-radius: 16px; font-size: 11.5px; line-height: 1.45; background: #1b1b1f; color: #e4e4e8; }
.msg.me { justify-content: flex-end; }
.msg.me .bub { background: #fff; color: #000; border-bottom-right-radius: 6px; }
.msg.ai .bub { border-bottom-left-radius: 6px; }
.typing { display: inline-flex; gap: 4px; padding: 3px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: #8a8a90; animation: dot 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.composer { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 44px; display: flex; gap: 8px; align-items: center; }
.composer .clip { width: 40px; height: 40px; border-radius: 12px; background: #1b1b1f; display: grid; place-items: center; font-size: 15px; color: #8a8a90; flex: none; }
.composer .inp { flex: 1; min-width: 0; height: 40px; border-radius: 12px; background: #141417; border: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; padding: 0 6px 0 12px; font-size: 11.5px; color: #6c6c73; gap: 6px; text-align: left; }
.composer .inp .t { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer .inp.typed .t { color: #fff; direction: rtl; text-align: left; }
.composer .snd { width: 28px; height: 28px; border-radius: 8px; background: #2a2a30; display: grid; place-items: center; font-size: 13px; color: #8a8a90; flex: none; }
.composer .inp.typed .snd { background: var(--mint); color: var(--mint-ink); }
.caret { display: inline-block; width: 1.5px; height: 13px; background: var(--mint); margin-left: 1px; vertical-align: -2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* finger + ripple */
.finger { position: absolute; left: 0; top: 0; width: 38px; height: 38px; margin: -19px 0 0 -19px; border-radius: 50%; z-index: 40; pointer-events: none; opacity: 0;
    background: radial-gradient(circle, rgba(255,255,255,.6) 0 35%, rgba(255,255,255,.18) 36% 100%); border: 1.5px solid rgba(255,255,255,.75); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.ripple { position: absolute; left: 0; top: 0; width: 60px; height: 60px; margin: -30px 0 0 -30px; border-radius: 50%; border: 2px solid rgba(255,255,255,.85); z-index: 39; pointer-events: none; }

/* ================================================================
   SCROLL TOUR LAYOUT (homepage app flow, features tour). The phone stays
   put while the page scrolls through the title frame and the steps; each
   step starts its part of the film when it's reached and holds the end
   state. --frames on .flow-track = title frame + steps.
   Without html.motion it is a plain stack: the step texts, then the phone.
   ================================================================ */
.flow { position: relative; padding: clamp(24px, 4vh, 48px) 0 clamp(40px, 6vh, 72px); }
/* first frame of the stage: the section title, the phone waiting on its first screen */
.step-intro .h2, .step-intro h1 { margin: 0; }
.step-intro .lead { margin: 16px 0 0; }
.step-intro .cta-row { margin-top: 24px; }
.flow-grid { display: grid; gap: 28px; }
.step h3, .step .st { margin: 0; font-size: clamp(1.9rem, 4vw, 4rem); font-weight: 700; line-height: .98; letter-spacing: -.045em; text-wrap: balance; }
.step p { margin: 12px 0 0; font-size: clamp(1.05rem, 1.5vw, 1.35rem); font-weight: 500; letter-spacing: -.015em; color: var(--ink-2); max-width: 26em; }
.flow-copy { display: grid; gap: 36px; }
.adapt-facts { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.adapt-facts li { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; }
.adapt-facts .icon { color: var(--mint); font-size: 17px; }
.phone-col { position: relative; display: flex; justify-content: center; align-items: center; min-height: 0; }
/* 60svh of scroll per frame: long enough to watch a step, short enough not to feel stuck */
.motion .flow-track { height: calc(var(--frames, 5) * 60svh); }
.motion .flow-stage { position: sticky; top: 0; height: 100svh; }
.motion .flow-stage > .wrap { height: 100%; }
.motion .flow-grid { height: 100%; grid-template-rows: auto minmax(0, 1fr); gap: 14px; padding: 84px 0 14px; }
.motion .flow-copy { position: relative; display: block; min-height: 6.4em; }
/* --drift is set from the scroll position (tour.js / home.js): the active step text
   travels with the scroll, so you can see the page moving while the phone stays put */
.motion .step { position: absolute; left: 0; right: 0; top: 0; opacity: 0; transform: translateY(24px); transition: opacity .35s, transform .35s var(--e-out); }
.motion .step.on { opacity: 1; transform: translateY(var(--drift, 0px)); }
.motion .step h3, .step .st { font-size: clamp(1.6rem, 7vw, 2.4rem); }
.motion .step-intro .h2, .motion .step-intro h1 { font-size: clamp(1.9rem, 8vw, 2.8rem); line-height: .98; }
.motion .step-intro .lead { font-size: 1rem; margin-top: 10px; }
.motion .step-intro .cta-row { display: none; } /* phones: the nav carries "Get the app" */
.motion .step p { font-size: 1rem; margin-top: 8px; }
.motion .step .adapt-facts { display: none; }
@media (min-width: 900px), (min-width: 560px) and (min-aspect-ratio: 4/3) {
    .motion .flow-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: none; align-items: center; gap: clamp(40px, 5vw, 80px); padding: 72px 0 0; }
    .motion .flow-copy { min-height: 0; height: 60%; }
    .motion .step { top: 50%; transform: translateY(calc(-50% + 28px)); }
    .motion .step.on { transform: translateY(calc(-50% + var(--drift, 0px))); }
    .motion .step h3, .step .st { font-size: clamp(2.4rem, 4.2vw, 4.2rem); }
    .motion .step-intro .h2, .motion .step-intro h1 { font-size: clamp(2.8rem, 5vw, 5rem); }
    .motion .step-intro .lead { font-size: clamp(1.05rem, 1.4vw, 1.25rem); margin-top: 18px; }
    .motion .step-intro .cta-row { display: flex; }
    .motion .step p { font-size: clamp(1.1rem, 1.5vw, 1.35rem); margin-top: 14px; }
    .motion .step .adapt-facts { display: flex; }
}
/* short landscape screens: headline and one line only, sized to the height */
@media (max-height: 520px) and (min-aspect-ratio: 4/3) {
    .motion .flow-grid { padding-top: 64px; }
    .motion .step h3, .step .st { font-size: clamp(1.4rem, 7.5vh, 2.4rem); }
    .motion .step-intro .h2, .motion .step-intro h1 { font-size: clamp(1.6rem, 8.5vh, 2.8rem); }
    .motion .step-intro .lead, .motion .step-intro .cta-row { display: none; }
    .motion .step p { font-size: .95rem; margin-top: 8px; }
    .motion .step .adapt-facts { display: none; }
}
.demo-fine { margin: 18px auto 0; padding: 0 var(--gutter); max-width: 36em; text-align: center; font-size: 12.5px; line-height: 1.5; color: var(--mute); }
.demo-fine a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }

/* ================================================================
   More app screens for the features tour, modelled on the real app:
   onboarding ("Choose Your Sport"), home, weekly check-in.
   ================================================================ */
/* onboarding: a full screen above the app chrome, under the status bar */
.ob { position: absolute; inset: 0; z-index: 22; background: #070708; padding: 56px 16px 0; }
.ob-bar { margin: 0 6px; height: 3px; border-radius: 3px; background: #26262b; overflow: hidden; }
.ob-bar i { display: block; width: 33%; height: 100%; background: #fff; }
.ob .ttl { margin: 24px 0 6px; text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.ob > p { margin: 0 0 14px; text-align: center; color: #8a8a90; font-size: 11.5px; }
.ob-list { display: grid; gap: 7px; padding: 10px; border-radius: 22px; background: #101012; border: 1px solid #1f1f23; }
.ob-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 14px; border: 1.5px solid #27272a; background: #000; color: #a1a1aa; transition: background .35s, color .35s, border-color .35s, transform .35s; }
.ob-item > span { width: 32px; height: 32px; border-radius: 10px; background: #18181b; display: grid; place-items: center; color: #71717a; font-size: 15px; flex: none; }
.ob-item b { display: block; font-size: 12.5px; color: #e4e4e7; }
.ob-item small { display: block; font-size: 9.5px; color: #71717a; }
.ob-item.sel { background: var(--mint); border-color: var(--mint); color: #000; transform: scale(1.02); }
.ob-item.sel b { color: #000; }
.ob-item.sel > span { background: rgba(0,0,0,.2); color: #000; }
.ob-item.sel small { color: rgba(0,0,0,.7); }
.ob-next { display: flex; width: max-content; align-items: center; gap: 6px; margin: 12px 4px 0 auto; padding: 10px 16px; border-radius: 12px; background: #fff; color: #000; font-weight: 700; font-size: 12px; }

/* home */
.hm-hi { margin: 4px 2px 0; font-size: 21px; font-weight: 800; letter-spacing: -.02em; }
.hm-sub { margin: 2px 2px 12px; color: #8a8a90; font-size: 11px; }
.sess { padding: 14px; }
.sess small, .hm-stats small { display: block; font: 500 8px/1 var(--f-mono); letter-spacing: .14em; color: #6c6c73; }
.sess .t { margin: 7px 0 2px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.sess .m { color: #8a8a90; font-size: 10.5px; }
.sess .go { margin-top: 12px; height: 36px; border-radius: 12px; background: #fff; color: #000; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.strava { margin-top: 9px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.strava .sv { width: 30px; height: 30px; border-radius: 9px; background: #fc4c02; display: grid; place-items: center; color: #fff; font-size: 15px; flex: none; }
.strava div { flex: 1; min-width: 0; }
.strava b { display: block; font-size: 12px; }
.strava span { display: block; font-size: 9.5px; color: #8a8a90; }
.strava em { font-style: normal; font-weight: 700; font-size: 11px; white-space: nowrap; }
.ckin { margin-top: 9px; padding: 11px 12px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; }
.ckin span { font-size: 9.5px; font-weight: 700; padding: 4px 8px; border-radius: 999px; background: rgba(30,215,96,.15); color: var(--mint); }
.hm-stats { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hm-stats .card { padding: 11px 12px; }
.hm-stats b { display: block; margin-top: 6px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.hm-stats b i { font-style: normal; font-size: 10px; color: #8a8a90; font-weight: 600; margin-left: 2px; }

/* weekly check-in: a sheet over the home screen */
.ck { position: absolute; left: 0; right: 0; bottom: 0; top: 56px; z-index: 24; padding: 18px 16px 16px; border-radius: 26px 26px 0 0; background: #141417; border-top: 1px solid rgba(255,255,255,.08); transform: translateY(105%); }
.ck-h { display: flex; justify-content: space-between; align-items: center; font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.ck-h .icon { color: #8a8a90; font-size: 18px; }
.ck-row { margin-top: 16px; }
.ck-row .l { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; font-weight: 600; }
.ck-row .l b { font-size: 15px; font-variant-numeric: tabular-nums; }
.ck-tr { position: relative; height: 4px; margin: 12px 7px 7px; border-radius: 4px; background: #2a2a2f; }
.ck-tr i { position: absolute; top: 50%; left: var(--v, 50%); width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #fff; }
.ck-row .e { display: flex; justify-content: space-between; font-size: 9.5px; color: #6c6c73; }
.ck-in { margin-top: 16px; }
.ck-in small { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: #f2f2f2; }
.ck-in small .icon { color: #f59e0b; }
.ck-in div { margin-top: 8px; padding: 10px 12px; border-radius: 12px; background: #070708; border: 1px solid rgba(255,255,255,.07); color: #6c6c73; font-size: 11px; }
.ck-in div.typed { color: #f2f2f2; }
.ck-go { margin-top: 18px; height: 42px; border-radius: 12px; background: #fff; color: #000; font-weight: 800; font-size: 12.5px; display: flex; align-items: center; justify-content: center; gap: 8px; }
/* features: the tour is the top of the page, so the stage starts right under the nav */
.flow.tour { padding-top: 0; }
