/* Minkee device mockups.
   Screens are laid out at the app's real size (360 x 800 dp) with the app's own tokens and component
   specs (MinkeeProfileCard, MinkeeSwipeActions, MinkeeBottomNav, MinkeeMessageBubble,
   MinkeeMatchCelebration, WelcomeScreen), then scaled into an Android device frame with --s. */

/* ---------- Device frame (Pixel-style: flat sides, centred punch-hole, gesture bar) ---------- */
.device {
  --s: .78;
  --bz: 9px;
  --r: 44px;
  position: relative;
  flex: none;
  width: calc(360px * var(--s) + var(--bz) * 2);
  height: calc(800px * var(--s) + var(--bz) * 2);
  padding: var(--bz);
  border-radius: calc(var(--r) * var(--s) + var(--bz));
  background:
    linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,0) 22%, rgba(255,255,255,0) 78%, rgba(255,255,255,.08)),
    linear-gradient(145deg, #3b343d, #17131a 38%, #221d24 64%, #0e0b0f);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.10),
    inset 0 0 0 3px #0b090c,
    0 50px 90px -30px rgba(33,27,36,.55),
    0 24px 40px -24px rgba(33,27,36,.45);
  isolation: isolate;
}
:root[data-theme="dark"] .device { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 0 0 3px #0b090c, 0 50px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .device { box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), inset 0 0 0 3px #0b090c, 0 50px 90px -30px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.04); } }
.device.lg { --s: .86; }
.device.sm { --s: .64; }
.device.xs { --s: .52; }
/* Side keys: power above volume on the right edge, like Pixel */
.device-key { position: absolute; right: -3px; width: 4px; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #0d0a0e, #3a333c 60%, #1a161b); }
.device-key.power { top: 20%; height: 8%; }
.device-key.volume { top: 32%; height: 14%; }
.device-viewport {
  position: relative; width: calc(360px * var(--s)); height: calc(800px * var(--s));
  border-radius: calc(var(--r) * var(--s)); overflow: hidden; background: var(--background-default);
  transform: translateZ(0); /* clips scaled children cleanly in Safari */
}
.device-viewport::after { /* glass glare */
  content: ""; position: absolute; inset: 0; z-index: 50; pointer-events: none; border-radius: inherit;
  background: linear-gradient(118deg, rgba(255,255,255,.14) 0%, rgba(255,255,255,.04) 26%, transparent 42%);
  mix-blend-mode: screen;
}
.punch-hole { position: absolute; z-index: 40; top: calc(13px * var(--s)); left: 50%; width: calc(14px * var(--s)); height: calc(14px * var(--s));
  transform: translateX(-50%); border-radius: 50%; background: radial-gradient(circle at 35% 35%, #2a2f3a 0 18%, #050506 40%); box-shadow: 0 0 0 calc(2px * var(--s)) rgba(0,0,0,.5); }

/* The app screen, at real dp size */
.scr { position: absolute; inset: 0 auto auto 0; width: 360px; height: 800px; transform: scale(var(--s)); transform-origin: 0 0;
  display: flex; flex-direction: column; overflow: hidden; background: var(--background-default); color: var(--text-primary); font-family: var(--font-body); }
.scr svg { display: block; }

/* Status bar + gesture bar */
.status { position: relative; z-index: 30; flex: none; height: 40px; display: flex; align-items: center; justify-content: space-between; padding: 6px 26px 0 30px;
  font: 600 14px/1 var(--font-display); letter-spacing: .01em; color: var(--text-primary); }
.status-icons { display: flex; align-items: center; gap: 6px; }
.status-icons svg { height: 14px; width: auto; fill: currentColor; }
.on-dark .status, .status.on-dark { color: #fff; }
.gesture { position: absolute; z-index: 30; left: 50%; bottom: 8px; width: 108px; height: 4px; border-radius: 4px; transform: translateX(-50%); background: var(--text-primary); opacity: .8; }
.on-dark .gesture { background: #fff; }

/* ---------- Shared app primitives ---------- */
.ui-topbar { flex: none; height: 56px; display: flex; align-items: center; gap: 4px; padding: 0 8px 0 16px; }
.ui-topbar .ui-title { flex: 1; font: 700 24px/32px var(--font-display); letter-spacing: -0.01em; }
.ui-iconbtn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; color: var(--icon-default); flex: none; }
.ui-iconbtn svg { width: 22px; height: 22px; }
.ui-btn { height: 52px; border-radius: 999px; display: flex; align-items: center; justify-content: center; gap: 10px; font: 600 16px/24px var(--font-display); width: 100%; }
.ui-btn svg { width: 20px; height: 20px; }
.ui-btn.social { background: var(--surface-default); color: var(--text-primary); box-shadow: inset 0 0 0 1.5px var(--border-strong); }
.ui-btn.primary { background: var(--action-primary); color: var(--text-on-primary); box-shadow: var(--shadow-brand); }
.ui-btn.light { background: #fff; color: var(--primary-700); }
.ui-btn.ghost-light { color: #fff; box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.5); }
.ui-avatar { border-radius: 999px; background-size: 180%; background-position: 50% 26%; flex: none; position: relative; }
.ui-presence { position: absolute; right: 0; bottom: 0; width: 12px; height: 12px; border-radius: 999px; background: var(--online); box-shadow: 0 0 0 2.5px var(--background-default); }
.ui-badge { display: inline-flex; align-items: center; gap: 4px; height: 26px; padding: 0 10px; border-radius: 999px; font: 600 12px/16px var(--font-display); letter-spacing: .01em; white-space: nowrap; }
.ui-badge svg { width: 14px; height: 14px; }
.ui-badge.glass { background: rgba(255,255,255,.18); color: #fff; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.ui-badge.success { background: var(--success-subtle); color: var(--success); }
.ui-badge.brand { background: var(--surface-selected); color: var(--text-brand); }
.ui-badge.verified { background: var(--verified-subtle); color: var(--verified); }

/* Bottom navigation (MinkeeBottomNav: 64dp, 24dp icon in a 56x32 slot, 11px label) */
.ui-nav { flex: none; height: 64px; margin-bottom: 20px; display: flex; justify-content: space-around; align-items: center; padding: 0 4px; background: var(--background-default); }
.ui-nav span { position: relative; display: grid; justify-items: center; gap: 2px; font: 600 11px/16px var(--font-display); color: var(--icon-muted); width: 64px; }
.ui-nav i { width: 56px; height: 32px; display: grid; place-items: center; font-style: normal; }
.ui-nav svg { width: 24px; height: 24px; }
.ui-nav .on { color: var(--text-brand); }
.ui-nav .on svg { color: var(--icon-active); }
.ui-nav b { position: absolute; top: -2px; left: 38px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--brand-accent); color: #fff; font: 700 11px/18px var(--font-display); text-align: center; box-shadow: 0 0 0 2px var(--background-default); }

/* ---------- Welcome (WelcomeScreen: video fading into the background, bottom-to-top cascade) ---------- */
.scr-welcome { background: var(--background-default); }
.scr-welcome video, .scr-welcome .w-fallback { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scr-welcome .w-fallback { background: url("../img/welcome-poster.jpg") center / cover; }
.scr-welcome .w-top { position: absolute; inset: 0 0 auto; height: 140px; background: linear-gradient(rgba(21,17,22,.3), transparent); }
.scr-welcome .w-fade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 0%, transparent 34%, color-mix(in srgb, var(--background-default) 85%, transparent) 50%, var(--background-default) 58%); }
.scr-welcome .w-body { position: relative; margin-top: auto; padding: 0 24px 44px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.w-wordmark { font: 800 40px/48px var(--font-display); letter-spacing: -0.02em; color: var(--text-brand); margin-bottom: 16px; }
.w-title { font: 700 28px/36px var(--font-display); letter-spacing: -0.01em; margin-bottom: 8px; }
.w-sub { font: 400 16px/24px var(--font-body); color: var(--text-secondary); margin-bottom: 32px; }
.w-divider { width: 100%; height: 1px; margin: 20px 0; background: linear-gradient(90deg, transparent, var(--border-strong), transparent); }
.w-legal { margin-top: 24px; font: 400 13px/20px var(--font-body); color: var(--text-tertiary); }
.w-legal u { color: var(--text-brand); text-decoration: none; font-weight: 600; }
.g-mark { width: 20px; height: 20px; }

/* ---------- Swipes (MinkeeProfileCard deck + MinkeeSwipeActions) ---------- */
.deck { position: relative; flex: 1; margin: 4px 16px 30px; }
.pcard { position: absolute; inset: 0; border-radius: 24px; overflow: hidden; color: #fff; background: #222 center / cover; box-shadow: var(--shadow-md);
  transform-origin: 50% 110%; will-change: transform, opacity; }
.pcard .bars { position: absolute; z-index: 2; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; }
.pcard .bars i { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.4); }
.pcard .bars i:first-child { background: #fff; }
.pcard .info { position: absolute; inset: auto 0 0; padding: 96px 20px 20px; background: linear-gradient(180deg, transparent, var(--overlay-image) 55%); display: grid; gap: 8px; }
.pcard .name { display: flex; align-items: center; gap: 8px; font: 800 28px/36px var(--font-display); letter-spacing: -0.01em; }
.pcard .name small { font: 500 26px/36px var(--font-display); opacity: .92; }
.pcard .name svg { width: 24px; height: 24px; color: var(--blue-300); }
.pcard .meta { display: flex; align-items: center; gap: 6px; font: 500 14px/22px var(--font-body); color: rgba(255,255,255,.9); }
.pcard .meta svg { width: 14px; height: 14px; }
.pcard .chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; }
.stamp { position: absolute; z-index: 3; top: 40px; padding: 4px 12px; border-radius: 12px; border: 3px solid; background: var(--overlay-image);
  font: 800 28px/36px var(--font-display); letter-spacing: .08em; opacity: 0; }
.stamp.like { left: 24px; color: var(--primary-300); transform: rotate(-14deg); }
.stamp.nope { right: 24px; color: #fff; transform: rotate(14deg); }
.stamp.super { left: 50%; top: auto; bottom: 46%; color: var(--blue-300); transform: translateX(-50%); }
.swipe-row { flex: none; height: 92px; display: flex; align-items: center; justify-content: center; gap: 20px; }
.sbtn { border-radius: 999px; display: grid; place-items: center; background: var(--surface-default); box-shadow: var(--shadow-sm), inset 0 0 0 1px var(--border-subtle); }
.sbtn.pass { width: 64px; height: 64px; color: var(--icon-default); }
.sbtn.pass svg { width: 30px; height: 30px; }
.sbtn.super { width: 56px; height: 56px; color: var(--verified); }
.sbtn.super svg { width: 26px; height: 26px; }
.sbtn.like { width: 72px; height: 72px; background: var(--action-primary); color: var(--text-on-primary); box-shadow: var(--shadow-brand); }
.sbtn.like svg { width: 32px; height: 32px; fill: currentColor; }

/* Static stack order (used when motion is reduced) */
.pcard:nth-child(1) { z-index: 3; }
.pcard:nth-child(2) { z-index: 2; transform: translateY(14px) scale(.95); }
.pcard:nth-child(3) { z-index: 1; transform: translateY(28px) scale(.9); }

/* Animated deck: three cards share one 9s cycle, each a third out of phase.
   top → swipe out (like / nope / super) → back of stack → middle → top. */
@keyframes deck {
  0%, 22% { transform: none; opacity: 1; z-index: 3; }
  33% { transform: var(--exit); opacity: 0; z-index: 3; }
  34% { transform: translateY(28px) scale(.9); opacity: 0; z-index: 1; }
  44%, 55% { transform: translateY(28px) scale(.9); opacity: 1; z-index: 1; }
  66%, 88% { transform: translateY(14px) scale(.95); opacity: 1; z-index: 2; }
  100% { transform: none; opacity: 1; z-index: 3; }
}
@keyframes stamp-in { 0%, 21% { opacity: 0; } 26%, 31% { opacity: 1; } 33%, 100% { opacity: 0; } }
@keyframes press { 0%, 100% { transform: none; } 30% { transform: scale(.88); } 60% { transform: scale(1.08); } }
.motion .deck .pcard { animation: deck 9s var(--ease-standard) infinite both; }
.motion .deck .pcard:nth-child(1) { --exit: translate(130%, -4%) rotate(22deg); }
.motion .deck .pcard:nth-child(2) { --exit: translate(-130%, -4%) rotate(-22deg); animation-delay: -6s; }
.motion .deck .pcard:nth-child(3) { --exit: translateY(-120%) scale(.96); animation-delay: -3s; }
.motion .deck .pcard .stamp { animation: stamp-in 9s linear infinite both; animation-delay: inherit; }
.motion .sbtn.like { animation: press-like 9s var(--ease-pop) infinite; }
.motion .sbtn.pass { animation: press-pass 9s var(--ease-pop) infinite; }
.motion .sbtn.super { animation: press-super 9s var(--ease-pop) infinite; }
@keyframes press-like { 0%, 20%, 30%, 100% { transform: none; } 23% { transform: scale(.86); } 27% { transform: scale(1.1); } }
@keyframes press-pass { 0%, 53%, 63%, 100% { transform: none; } 56% { transform: scale(.86); } 60% { transform: scale(1.1); } }
@keyframes press-super { 0%, 86%, 96%, 100% { transform: none; } 89% { transform: scale(.86); } 93% { transform: scale(1.1); } }

/* ---------- Chat (MinkeeMessageBubble 16/24, 10x16 padding, max 280) ---------- */
.chat-top { flex: none; height: 64px; display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.chat-top .who { flex: 1; display: grid; }
.chat-top .who b { display: flex; align-items: center; gap: 4px; font: 600 18px/24px var(--font-display); }
.chat-top .who b svg { width: 18px; height: 18px; color: var(--verified); }
.chat-top .who small { font: 500 12px/18px var(--font-body); color: var(--success); }
.chat-feed { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 6px; padding: 8px 16px 12px; overflow: hidden; }
.chat-feed > * { flex: none; }
.chat-day { align-self: center; font: 500 12px/18px var(--font-body); color: var(--text-tertiary); margin: 4px 0; }
.chat-pill { align-self: center; }
.ice { padding: 14px 16px; border-radius: 20px; background: var(--surface-blush); display: grid; gap: 4px; margin: 4px 0 6px; }
.ice small { display: flex; align-items: center; gap: 6px; font: 700 11px/16px var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text-brand); }
.ice small svg { width: 14px; height: 14px; }
.ice span { font: 500 16px/24px var(--font-body); }
.bub { max-width: 280px; padding: 10px 16px; border-radius: 20px; font: 400 16px/24px var(--font-body); }
.bub.them { align-self: flex-start; background: var(--surface-secondary); border-bottom-left-radius: 6px; }
.bub.me { align-self: flex-end; background: var(--action-primary); color: var(--text-on-primary); border-bottom-right-radius: 6px; }
.bub-meta { align-self: flex-end; display: flex; align-items: center; gap: 4px; font: 500 11px/16px var(--font-body); color: var(--text-tertiary); margin-top: -2px; }
.bub-meta svg { width: 14px; height: 14px; color: var(--icon-active); }
.react { align-self: flex-start; margin: -12px 0 0 14px; height: 24px; padding: 0 8px; border-radius: 999px; background: var(--background-elevated); box-shadow: var(--shadow-sm); display: flex; align-items: center; color: var(--brand-accent); }
.react svg { width: 14px; height: 14px; fill: currentColor; }
.typing-ind { align-self: flex-start; display: flex; gap: 5px; padding: 14px 16px; border-radius: 20px; border-bottom-left-radius: 6px; background: var(--surface-secondary); }
.typing-ind i { width: 8px; height: 8px; border-radius: 999px; background: var(--icon-muted); animation: dot 1.2s var(--ease-standard) infinite; }
.typing-ind i:nth-child(2) { animation-delay: .15s; } .typing-ind i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 60%, 100% { transform: none; opacity: .45; } 30% { transform: translateY(-4px); opacity: 1; } }
.composer-bar { flex: none; display: flex; align-items: center; gap: 8px; padding: 8px 12px 36px; }
.composer-field { flex: 1; min-height: 48px; display: flex; align-items: center; padding: 0 18px; border-radius: 999px; background: var(--surface-secondary); font: 400 16px/24px var(--font-body); color: var(--text-tertiary); white-space: nowrap; overflow: hidden; }
.composer-field.typing { color: var(--text-primary); }
.composer-field.typing::after { content: ""; width: 2px; height: 20px; margin-left: 1px; background: var(--brand-accent); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.send { width: 48px; height: 48px; border-radius: 999px; display: grid; place-items: center; background: var(--action-primary); color: var(--text-on-primary); flex: none; transition: transform var(--duration-fast) var(--ease-pop); }
.send svg { width: 20px; height: 20px; }
.send.pulse { transform: scale(.86); }
/* Chat script: JS reveals each [data-step] in turn; without JS everything is visible */
.js .motion [data-step] { display: none; }
.js .motion [data-step].shown { display: flex; animation: msg-in var(--duration-base) var(--ease-emphasized) both; }
.js .motion .bub[data-step].shown, .js .motion .ice[data-step].shown { display: block; }
.js .motion .ice[data-step].shown { display: grid; }
@keyframes msg-in { from { opacity: 0; transform: translateY(12px) scale(.96); } }
.bub.me { transform-origin: 100% 100%; } .bub.them { transform-origin: 0 100%; }

/* ---------- Match celebration (MinkeeMatchCelebration: 128 pair, slide 96, heart 48, halo 4) ---------- */
.scr-match { background: radial-gradient(90% 60% at 50% 34%, var(--primary-400), var(--primary-600) 46%, var(--primary-900) 100%); color: #fff; align-items: center; text-align: center; }
.scr-match .body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 0 28px 24px; }
.pair { position: relative; display: flex; height: 128px; margin-bottom: 4px; }
.pair .ui-avatar { width: 128px; height: 128px; box-shadow: 0 0 0 4px #fff, var(--shadow-lg); }
.pair .ui-avatar + .ui-avatar { margin-left: -16px; }
.pair .heart { position: absolute; left: 50%; bottom: -20px; width: 48px; height: 48px; margin-left: -24px; border-radius: 999px; background: #fff; color: var(--primary-600); display: grid; place-items: center; box-shadow: var(--shadow-md); z-index: 2; }
.pair .heart svg { width: 24px; height: 24px; fill: currentColor; }
.scr-match .ui-headline { margin-top: 44px; font: 800 40px/48px var(--font-display); letter-spacing: -0.02em; }
.scr-match p { margin: 8px 0 32px; font: 400 16px/24px var(--font-body); color: rgba(255,255,255,.9); }
.scr-match .ui-btn + .ui-btn { margin-top: 12px; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; bottom: -30px; width: 18px; height: 18px; color: rgba(255,255,255,.75); }
.confetti i svg { width: 100%; height: 100%; fill: currentColor; }
.motion .confetti i { animation: rise 6s linear infinite; }
@keyframes rise { from { transform: translateY(0) rotate(0); opacity: 0; } 10% { opacity: 1; } to { transform: translateY(-860px) rotate(40deg); opacity: 0; } }
.motion .pair .ui-avatar:first-child { animation: from-left 7s var(--ease-emphasized) infinite both; }
.motion .pair .ui-avatar:nth-child(2) { animation: from-right 7s var(--ease-emphasized) infinite both; }
.motion .pair .heart { animation: heart-pop 7s var(--ease-pop) infinite both; }
.motion .scr-match .reveal-seq { animation: seq-in 7s var(--ease-emphasized) infinite both; }
.motion .scr-match .reveal-seq:nth-of-type(2) { animation-delay: .08s; }
@keyframes from-left { 0% { transform: translateX(-96px); opacity: 0; } 12%, 88% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes from-right { 0% { transform: translateX(96px); opacity: 0; } 12%, 88% { transform: none; opacity: 1; } 100% { opacity: 0; } }
@keyframes heart-pop { 0%, 12% { transform: scale(0); } 18% { transform: scale(1.25); } 22%, 88% { transform: scale(1); } 100% { transform: scale(0); } }
@keyframes seq-in { 0%, 16% { transform: translateY(16px); opacity: 0; } 26%, 88% { transform: none; opacity: 1; } 100% { opacity: 0; } }

/* ---------- Full profile (auto-scrolling) ---------- */
.scr-profile .scroll { flex: 1; overflow: hidden; position: relative; }
.scr-profile .track { padding: 0 16px 120px; display: grid; gap: 16px; }
.motion .scr-profile .track { animation: autoscroll 16s var(--ease-standard) infinite alternate; }
@keyframes autoscroll { 0%, 12% { transform: none; } 88%, 100% { transform: translateY(-640px); } }
.pf-photo { position: relative; aspect-ratio: 3 / 4; border-radius: 24px; background: center / cover; overflow: hidden; }
.pf-photo .info { position: absolute; inset: auto 0 0; padding: 72px 18px 18px; background: linear-gradient(transparent, var(--overlay-image) 60%); color: #fff; }
.pf-photo .name { display: flex; align-items: center; gap: 8px; font: 800 28px/36px var(--font-display); }
.pf-photo .name svg { width: 24px; height: 24px; color: var(--blue-300); }
.pf-photo .meta { font: 500 14px/22px var(--font-body); opacity: .9; }
.pf-card { padding: 18px; border-radius: 20px; background: var(--surface-default); box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-xs); display: grid; gap: 10px; }
.pf-card.blush { background: var(--surface-blush); box-shadow: none; }
.pf-label { font: 700 11px/16px var(--font-display); letter-spacing: .06em; text-transform: uppercase; color: var(--text-brand); }
.pf-card p { font: 400 16px/24px var(--font-body); }
.pf-card .prompt { font: 600 20px/28px var(--font-display); letter-spacing: -0.005em; }
.pf-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--border-default); font: 600 14px/20px var(--font-display); }
.pf-chip svg { width: 16px; height: 16px; color: var(--icon-muted); }
.pf-row { display: flex; align-items: center; gap: 12px; font: 400 16px/24px var(--font-body); }
.pf-row svg { width: 20px; height: 20px; color: var(--icon-muted); }
.pf-actions { position: absolute; z-index: 5; left: 0; right: 0; bottom: 28px; display: flex; justify-content: center; gap: 20px; }

/* ---------- Device stage ---------- */
.stage { position: relative; display: grid; place-items: center; min-height: 600px; isolation: isolate; perspective: 1400px; }
.stage::before { content: ""; position: absolute; inset: 6% 4%; z-index: -1; border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--brand-accent) 26%, transparent), transparent 70%); filter: blur(20px); }
.stage-tilt { position: relative; display: grid; place-items: center; transform-style: preserve-3d;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform var(--duration-slow) var(--ease-standard); }
.stage .device.side-l, .stage .device.side-r { position: absolute; z-index: -1; }
.stage .device.side-l { transform: translate(-60%, 7%) rotate(-8deg); }
.stage .device.side-r { transform: translate(60%, 7%) rotate(8deg); }
.motion .stage .device.side-l { animation: bob-l 7s ease-in-out infinite; }
.motion .stage .device.side-r { animation: bob-r 8s ease-in-out infinite .4s; }
.motion .stage .device.center { animation: bob-c 6s ease-in-out infinite; }
@keyframes bob-l { 50% { transform: translate(-60%, 5%) rotate(-7deg); } }
@keyframes bob-r { 50% { transform: translate(60%, 5%) rotate(7deg); } }
@keyframes bob-c { 50% { transform: translateY(-10px); } }
@media (max-width: 1100px) { .stage .device.side-l { transform: translate(-48%, 7%) rotate(-8deg); } .stage .device.side-r { transform: translate(48%, 7%) rotate(8deg); }
  @keyframes bob-l { 50% { transform: translate(-48%, 5%) rotate(-7deg); } } @keyframes bob-r { 50% { transform: translate(48%, 5%) rotate(7deg); } } }
@media (max-width: 760px) { .stage .device.side-l, .stage .device.side-r { display: none; } .stage { min-height: 0; } }
@media (max-width: 420px) { .device.lg, .device { --s: .72; } }

/* Hero entrance */
.js .stage.enter .device { opacity: 0; }
.js .stage.enter.in .device { opacity: 1; transition: opacity .7s var(--ease-emphasized); }
.js .stage.enter.in .device.center { animation: rise-in .9s var(--ease-emphasized) both, bob-c 6s ease-in-out .9s infinite; }
.js .stage.enter.in .device.side-l { animation: side-in-l 1s var(--ease-emphasized) .18s both, bob-l 7s ease-in-out 1.2s infinite; }
.js .stage.enter.in .device.side-r { animation: side-in-r 1s var(--ease-emphasized) .3s both, bob-r 8s ease-in-out 1.3s infinite; }
@keyframes rise-in { from { opacity: 0; transform: translateY(60px) scale(.96); } }
@keyframes side-in-l { from { opacity: 0; transform: translate(-30%, 12%) rotate(0deg) scale(.9); } }
@keyframes side-in-r { from { opacity: 0; transform: translate(30%, 12%) rotate(0deg) scale(.9); } }

/* Welcome cascade: legal line first, wordmark last (staggeredEntrance BottomToTop) */
.js .motion .w-body > * { opacity: 0; transform: translateY(24px); }
.js .motion.playing .w-body > *, .js .motion.played .w-body > * { opacity: 1; transform: none; transition: opacity .5s var(--ease-emphasized), transform .5s var(--ease-emphasized); }
.js .motion .w-body > :nth-last-child(1) { transition-delay: .1s; }
.js .motion .w-body > :nth-last-child(2) { transition-delay: .18s; }
.js .motion .w-body > :nth-last-child(3) { transition-delay: .26s; }
.js .motion .w-body > :nth-last-child(4) { transition-delay: .34s; }
.js .motion .w-body > :nth-last-child(5) { transition-delay: .42s; }
.js .motion .w-body > :nth-last-child(6) { transition-delay: .5s; }
.js .motion .w-body > :nth-last-child(7) { transition-delay: .58s; }

/* Pause everything that's off screen */
.js .motion:not(.playing) *, .js .motion:not(.playing) { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .motion .deck .pcard, .motion .deck .pcard .stamp { animation: none !important; }
  .js .motion [data-step] { display: flex; }
  .js .motion .bub[data-step] { display: block; }
  .js .motion .ice[data-step] { display: grid; }
  .js .motion [data-step].typing-ind { display: none; }
  .js .motion .w-body > * { opacity: 1; transform: none; }
  .js .stage.enter .device { opacity: 1; }
  .stage-tilt { transform: none !important; }
}

/* Fixes: status bar always spans the screen; profile action bar sits on a fade like the app */
.scr > .status { align-self: stretch; }
.pf-actions { padding-top: 40px; bottom: 0; padding-bottom: 32px; background: linear-gradient(transparent, var(--background-default) 45%); }
.scr-match .ui-headline { color: #fff; }
.w-wordmark .w-logo { height: 52px; width: auto; display: block; }
