/* The homepage on a phone: everything here applies under the `phone` class that index.html's
   head puts on <html> at phone width. phone.js builds the sections these rules style; the
   desktop hero, story and apps step aside only while the script is running (`js`), so a page
   whose script failed falls back to the plain layout. */

html.phone { --bar: calc(68px + env(safe-area-inset-bottom, 0px)); scroll-padding-top: 60px; }
.phone.js :is(#story, #apps) { display: none; }

/* ---------- 1. The hero: the film, framed for a phone ---------- */
/* film.js pans a window narrower than the film across it, following the hand, so the wheel stays
   big; its caption is said under the frame, at a size a phone can read. */
.phone .hero { height: auto; min-height: 0; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: calc(62px + env(safe-area-inset-top, 0px)) 16px 22px !important; overflow: visible; cursor: auto; }
.phone .hero-copy { padding: 0; text-align: center; }
.phone .hero .headline { font-size: clamp(36px, 11.4vw, 52px); letter-spacing: -.055em; line-height: 1; white-space: nowrap; margin: 0; }
.phone .hero .lead { font-size: 16px; line-height: 1.4; color: #e6e4f3; margin: 8px auto 0; max-width: 30ch; animation: none; }
.phone .film-slot { width: 100%; max-height: none; container-type: normal; display: flex; flex-direction: column; gap: 10px; }
.phone .film, .phone .scenes { --fw: 100%; width: 100%; }
.phone .film { aspect-ratio: 1 / .94; border-radius: 22px; }
.phone .film-say { align-self: stretch; display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px 8px 8px; border-radius: 18px; background: rgba(10, 9, 20, .6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); opacity: 0; } /* film.js fades it frame by frame: no CSS transition (iOS Safari stalls one that restarts every frame) */
.phone .film-say > i { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: linear-gradient(140deg, #8d7dff, #5a5fe8); }
.phone .film-say > i svg { width: 20px; height: 20px; }
.phone .film-say b { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 700; color: #fff; }
.phone .film-say kbd { padding: 3px 7px; border-radius: 7px; font: 600 13px/1 ui-monospace, "SF Mono", Menlo, monospace; color: #f0edff; background: rgba(255, 255, 255, .14); }
.phone .film-say small { display: flex; flex-wrap: wrap; gap: 3px 10px; margin-top: 3px; font-size: 13px; color: #cdcae2; }
.phone .film-say small span { display: flex; align-items: center; gap: 5px; opacity: .4; }
.phone .film-say small span.on { opacity: 1; }
.phone .film-say small kbd { font-size: 11px; padding: 2px 5px; }
/* The strip says which scene is playing: on a phone just its bars, the caption names it. */
.phone .scenes { height: 6px; gap: 6px; order: -1; }
.phone .scenes button { padding: 0; }
.phone .scenes button span { display: none; }
.phone .scenes button::before, .phone .scenes i { top: 0; }
/* The buy bar carries the button and the price. */
.phone .hero-foot { display: none; }

/* ---------- The top bar: slim, and the buy bar carries the button ---------- */
.phone .topbar { padding-top: env(safe-area-inset-top, 0px); }
.phone .topbar .nav { padding: 4px 0; gap: 12px; }
.phone .topbar .brand { font-size: 19px; }
.phone .topbar #nav-account { font-size: 15px; font-weight: 550; color: #dcdbe8; min-height: 44px; display: inline-flex; align-items: center; padding: 0 2px 0 14px; }
.phone.live .topbar .btn { display: none; }

/* ---------- Headings at phone size (the feature tiles size their own) ---------- */
.phone :is(.p-apps, #download, .faq) h2.big { font-size: clamp(32px, 9.4vw, 40px); letter-spacing: -.042em; line-height: 1.02; margin: 10px 0 12px; }
.phone .last h2.giant { font-size: clamp(38px, 11vw, 48px); }
.phone :is(.p-apps, #download) .sub { font-size: 16px; margin: 0; }

/* The small receipt the step cards show (phone.js: steps). */
.p-mini { display: flex; align-items: center; gap: 10px; padding: 11px 18px 11px 12px; border-radius: 999px; background: rgba(10, 9, 20, .74); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 18px 50px rgba(0, 0, 0, .5); backdrop-filter: blur(18px) saturate(1.6); -webkit-backdrop-filter: blur(18px) saturate(1.6); font-size: 16px; white-space: nowrap; pointer-events: none; }
.p-mini b { font-weight: 650; }
:is(.p-mini, .p-app-line) kbd { font: 600 13px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; padding: 5px 8px; border-radius: 7px; background: rgba(255, 255, 255, .12); color: #f0edff; }
.p-mini .ok { width: 20px; height: 20px; }

/* ---------- 2. How it works: cards swiped sideways ---------- */
.phone .p-steps { padding: 56px 0 0; }
.p-cards { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 20px 6px; scroll-padding: 0 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.p-cards::-webkit-scrollbar, .p-chips::-webkit-scrollbar { display: none; }
.p-card { flex: 0 0 84%; scroll-snap-align: start; scroll-snap-stop: always; padding: 0 22px 24px; border-radius: 26px; background: linear-gradient(170deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1), inset 0 1px 0 rgba(255, 255, 255, .12); backdrop-filter: blur(22px) saturate(1.4); -webkit-backdrop-filter: blur(22px) saturate(1.4); transition: opacity .4s, transform .5s var(--ease); }
.p-card:not(.on) { opacity: .55; transform: scale(.97); }
/* The steps are the three words, said big, as on the desktop page. */
.phone .p-card h2 { font-size: clamp(44px, 13vw, 54px); letter-spacing: -.055em; line-height: .95; margin: 6px 0 12px; }
.p-card p b { color: #fff; font-weight: 650; }
.p-card p { margin: 0; color: #c2c0d6; font-size: 15px; line-height: 1.5; text-wrap: pretty; }
.p-art { position: relative; height: 196px; margin: 0 -22px 6px; display: grid; place-items: center; overflow: hidden; border-radius: 26px 26px 0 0; }
.p-art::before { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(closest-side, rgba(140, 120, 255, .28), transparent 75%); }
.p-art > * { grid-area: 1 / 1; }
.p-art .orb-host { position: relative; }
.p-art-0 .orb-center { opacity: 0 !important; }
.p-press { width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .92); box-shadow: 0 0 0 9px rgba(190, 175, 255, .3), 0 6px 20px rgba(0, 0, 0, .5); opacity: 0; transform: scale(1.5); z-index: 3; }
.p-card.on .p-press { animation: p-press 2.6s var(--ease) .1s both; }
@keyframes p-press { 0% { opacity: 0; transform: scale(1.5); } 18% { opacity: .95; transform: scale(1); } 30% { box-shadow: 0 0 0 16px rgba(190, 175, 255, .22), 0 6px 20px rgba(0, 0, 0, .5); } 100% { opacity: .9; transform: scale(.72); box-shadow: 0 0 0 12px rgba(190, 175, 255, .2), 0 6px 20px rgba(0, 0, 0, .5); } }
.p-rings { width: 150px; height: 150px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14); opacity: 0; }
.p-card.on .p-rings { animation: p-ring 1.1s var(--ease) .55s both; }
@keyframes p-ring { from { opacity: .9; transform: scale(.7); box-shadow: inset 0 0 0 2px rgba(200, 185, 255, .7); } to { opacity: 1; transform: scale(1.08); } }
.p-mini { z-index: 3; font-size: 17px; padding: 13px 20px 13px 13px; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .45s var(--spring); }
.p-mini.on { opacity: 1; transform: none; }
.p-dots { display: flex; justify-content: center; margin-top: 4px; }
.p-dots button { width: 32px; height: 44px; border: 0; background: none; padding: 0; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.p-dots i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255, 255, 255, .25); transition: width .35s var(--ease), background .3s; }
.p-dots .on i { width: 22px; background: #cfc8ff; box-shadow: 0 0 10px rgba(185, 168, 255, .6); }

/* ---------- 3. Apps: each app's own wheel ---------- */
/* Only the wheel itself takes the finger; everywhere else the page scrolls as usual. */
.p-touch { touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; cursor: pointer; border-radius: 50%; }
.p-touch .orb { pointer-events: none; }
.phone .p-apps { padding: 56px 0 0; --app: #4c8df6; }
.phone .p-apps .wrap > * { margin-left: 4px; margin-right: 4px; }
.p-chips { position: relative; display: flex; gap: 8px; overflow-x: auto; padding: 20px 20px 6px; scroll-padding: 0 20px; scrollbar-width: none; scroll-snap-type: x proximity; }
.p-chips button { flex: none; scroll-snap-align: start; min-height: 44px; font: 600 15px var(--font); color: #c6c4da; background: rgba(255, 255, 255, .055); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .1); border: 0; padding: 0 17px 0 13px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: color .2s, background .25s, box-shadow .25s; }
.p-chips button i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }
.p-chips button.on { color: #fff; background: color-mix(in srgb, var(--c) 30%, rgba(10, 10, 20, .5)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 75%, transparent), 0 10px 30px -10px var(--c); }
.p-app-stage { position: relative; display: grid; place-items: center; padding: 24px 0 8px; }
.p-app-stage::before { content: ""; position: absolute; width: calc(var(--A, 280px) + 60px); height: calc(var(--A, 280px) + 60px); border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--app) 30%, transparent), transparent 75%); transition: background .6s; }
.p-app-stage .orb-host { position: relative; width: var(--A, 280px); height: var(--A, 280px); }
.p-app-line { margin: 6px 20px 0; min-height: 48px; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; text-align: center; font-size: 15px; color: #c2c0d6; }
.p-app-line b { color: #fff; font-weight: 650; }
.p-app-line .app-n { color: color-mix(in srgb, var(--app) 65%, #fff); font-weight: 650; }
.p-app-line.flash { animation: p-flash .5s ease-out; }
@keyframes p-flash { from { transform: scale(1.06); } }
.phone .p-apps .marquee { margin-top: 30px; gap: 8px; }
.phone .p-apps .marquee .row span { font-size: 13px; padding: 7px 13px; }

/* ---------- The rest of the page, closer together ---------- */
.phone #pricing { padding: 64px 0 0; }
.phone .price-card { padding: 28px 24px 24px; gap: 20px; }
.phone .amount { font-size: 132px; margin: 18px 0 18px -.04em; }
.phone .price-main p { font-size: 15.5px; }
.phone .price-side { gap: 22px; }
.phone .price-side .ticks { gap: 10px; font-size: 15.5px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .09); }
.phone .price-side .btn { min-height: 52px; font-size: 16.5px; }
.phone #download { padding: 64px 0 0; }
.phone #download .sub { margin-bottom: 18px; }
.phone .on-phone { margin: 0 0 18px; }
.phone .grid2 { gap: 12px; }
.phone .faq { padding: 64px 0 0; }
.phone .faq details { padding: 16px 0; }
.phone .faq summary { font-size: 15.5px; }
.phone .faq p { font-size: 15px; }
.phone .last { padding: 72px 0 64px !important; }
.phone .last h2 { margin-bottom: 26px; }
.phone .last .cta { flex-direction: column; align-items: stretch; gap: 10px; }
.phone .last .cta .btn { min-height: 50px; font-size: 15.5px; }
/* Room below the footer for the buy bar, so it never sits over the links. */
.phone.js footer { padding-bottom: calc(var(--bar) + 20px); }

/* ---------- The buy bar: fixed to the bottom, within the thumb's reach ---------- */
.p-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(20px, env(safe-area-inset-left, 0px)); background: rgba(8, 8, 14, .6); backdrop-filter: blur(24px) saturate(1.7); -webkit-backdrop-filter: blur(24px) saturate(1.7); border-top: 1px solid rgba(255, 255, 255, .08); animation: p-bar .8s var(--ease) 1s backwards; transition: transform .45s var(--ease), opacity .3s; }
.p-buy.away { transform: translateY(110%); opacity: 0; pointer-events: none; }
@keyframes p-bar { from { transform: translateY(100%); } }
.p-price { font-size: 14.5px; color: #b9b8cc; white-space: nowrap; }
.p-price b { color: #fff; font-weight: 650; }
.p-buy .btn { min-height: 44px; padding: 0 22px; font-size: 15px; }
@media (max-width: 359px) { .p-price { font-size: 13px; } }

/* ---------- Reduce motion: no demonstration and nothing loops; everything still works ---------- */
@media (prefers-reduced-motion: reduce) {
  .p-buy, .p-press, .p-rings, .p-app-line.flash { animation: none !important; }
  .p-card.on .p-press, .p-card.on .p-rings { opacity: .9; transform: none; }
  .p-card, .p-receipt, .p-mini, .p-buy { transition: opacity .2s; }
}

/* ---------- Download on a phone: send the link to a computer instead of two download buttons ---------- */
.phone.js #download .grid2 { display: none; }
.p-send { display: grid; gap: 10px; justify-items: start; }
.p-send .btn { padding: 15px 24px; font-size: 16px; }
.p-sent { margin: 0; color: #c9c7dc; font-size: 14.5px; }
.p-sent:empty { display: none; }
.phone .marquee-note { margin: 34px 16px 12px; font-size: 14px; }
