/* Mishap — the onboarding's photos and motion (the layout is in app.css).
   Photos are printed-photo cards (.ob-photo) that pop in, float, fan out or
   burst; pictures inside frames zoom slowly. The entrance plays when a slide
   is first painted (.ob-enter), not again when a tap repaints the same slide.
   Motion uses the individual translate / scale / rotate properties, so it adds
   to the transforms app.css already sets. */

.ob{position:relative;overflow-x:clip}
.ob .ob-mid{justify-content:space-evenly;gap:clamp(12px,2.4svh,28px)}
.ob .ob-fan{height:clamp(200px,32svh,340px);margin-bottom:0}
.ob .ob-fan .ob-photo{width:clamp(124px,min(40vw,23svh),200px)}
.ob .steps{flex:1;display:flex;flex-direction:column;justify-content:space-evenly}
.ob .choices.two{flex:1;align-content:stretch;grid-auto-rows:minmax(48px,1fr)}
.ob .choices.two + .spacer{flex:0}
.ob .choice{transition:background .25s,transform .25s cubic-bezier(.2,.8,.2,1)}
.ob .choice:active{transform:scale(.96)}
.ob .ob-bells{flex:1;align-content:center;gap:clamp(12px,2.4svh,26px)}
.ob .ob-bells li{padding:clamp(14px,2.8svh,26px) 16px}
.ob[data-ob-step="6"] .ob-banner{flex:1;min-height:110px;max-height:30svh}
.ob-back{margin-left:-8px}
.ob .dots{justify-content:center}
.ob > *:not(.aa-confetti){position:relative;z-index:1}

.ob-photo{position:absolute;display:block;overflow:hidden;border:5px solid #fff;border-radius:14px;background:#fff;
  box-shadow:0 16px 32px #00000040;rotate:var(--r,0deg)}
.ob-photo img{display:block;width:100%;height:100%;object-fit:cover}

/* entrance */
.ob-enter .ob-in{animation:obIn .65s cubic-bezier(.2,.8,.2,1) both;animation-delay:var(--d,0s)}
.d1{--d:.1s}.d2{--d:.2s}.d3{--d:.32s}.d4{--d:.44s}.d5{--d:.56s}
@keyframes obIn{from{opacity:0;translate:0 22px}to{opacity:1;translate:0 0}}
@keyframes obPop{from{opacity:0;scale:.35}to{opacity:1;scale:1}}
@keyframes obFloat{0%,100%{translate:0 0}50%{translate:0 -10px}}
@keyframes obWobble{0%,100%{rotate:var(--r)}50%{rotate:calc(var(--r) + 4deg)}}
@keyframes obKen{from{scale:1}to{scale:1.15}}
@keyframes obTwinkle{0%,100%{scale:1;opacity:1}50%{scale:1.4;opacity:.55}}

/* 1 — welcome: photos floating round the logo */
/* two photos above the logo, two below, so none of them sits behind it */
/* it takes the height there is, so Let's go and the link below it stay on screen on short phones */
.ob-welcome{position:relative;flex:1;display:flex;flex-direction:column;justify-content:center;min-height:min(420px,58vh);max-height:680px}
.ob-float{position:absolute;inset:0;pointer-events:none}
.ob-float .ob-photo{width:clamp(88px,min(29vw,15.5vh),150px);aspect-ratio:4/5;
  animation:obPop .7s cubic-bezier(.3,1.45,.5,1) both,obFloat 6s ease-in-out infinite;
  animation-delay:var(--d),calc(var(--d) + .7s)}
.f1{left:4%;top:0;--r:-10deg;--d:.05s}
.f2{right:6%;top:3%;--r:8deg;--d:.18s}
.f3{left:8%;bottom:2%;--r:7deg;--d:.3s}
.f4{right:3%;bottom:0;--r:-8deg;--d:.42s}
.ob-welcome .ob-center{position:relative;z-index:2;animation:obPop .8s cubic-bezier(.3,1.5,.5,1) .5s both}
.ob-welcome .lockup{width:clamp(250px,68vw,390px)}
.ob-mark{display:block;width:36px;height:auto}
.ob-welcome .lockup{animation:obBob 4s ease-in-out 1.4s infinite}
@keyframes obBob{0%,100%{rotate:0deg;translate:0 0}50%{rotate:-3deg;translate:0 -6px}}

/* 2 — what is Mishap: a fan of photos dealt from the deck */
.ob-fan{position:relative;height:clamp(190px,28vh,260px);margin-bottom:clamp(14px,3vh,30px)}
.ob-fan .ob-photo{top:8px;left:50%;width:clamp(124px,36vw,172px);aspect-ratio:4/5;margin-left:calc(clamp(124px,36vw,172px) / -2);
  animation:obDeal .85s cubic-bezier(.2,.9,.3,1.2) both,obSway 5s ease-in-out infinite;animation-delay:var(--d),calc(var(--d) + .85s)}
.k1{--r:-14deg;--x:-56%;--d:.1s}
.k2{--r:2deg;--x:0%;--d:.24s;z-index:2}
.k3{--r:14deg;--x:56%;--d:.38s}
@keyframes obDeal{from{opacity:0;translate:0 50px;rotate:0deg}to{opacity:1;translate:var(--x) 0;rotate:var(--r)}}
@keyframes obSway{0%,100%{translate:var(--x) 0}50%{translate:var(--x) -8px}}
.ob-enter .rule{animation:obRule .6s cubic-bezier(.2,.8,.2,1) .4s both}
@keyframes obRule{from{width:0}}

/* 3 — inspiration: the collage with real photos */
.ob-collage .shot-card{overflow:hidden;border:5px solid #fff;background:#fff;
  animation:obFly .9s cubic-bezier(.2,.9,.3,1.15) both,obFloat 7s ease-in-out infinite;animation-delay:var(--d),calc(var(--d) + .9s)}
.ob-collage .shot-card img{width:100%;height:100%;object-fit:cover;animation:obKen 12s ease-in-out infinite alternate}
.ob-collage .c1{--d:.05s}
.ob-collage .c2{--d:.4s;z-index:2}
.ob-collage .c3{--d:.22s}
@keyframes obFly{from{opacity:0;translate:0 70px;scale:.8}to{opacity:1;translate:0 0;scale:1}}

/* 4 — how it works: a photo per step, and a reel */
.ob .step{align-items:center}
.step-pic{position:relative;flex:none;width:clamp(66px,18vw,80px);aspect-ratio:1}
.step-pic img{display:block;width:100%;height:100%;border-radius:18px;object-fit:cover;box-shadow:0 10px 24px #00000059}
.step-pic .step-ico{position:absolute;right:-8px;bottom:-8px;width:32px;height:32px;padding:6px;border-radius:50%;
  background:var(--orange);color:#fff;box-shadow:0 4px 10px #00000040}
.ob-enter .step{animation:obSlide .6s cubic-bezier(.2,.8,.2,1) both;animation-delay:var(--d)}
@keyframes obSlide{from{opacity:0;translate:-28px 0}to{opacity:1;translate:0 0}}

.ob-reel{margin:clamp(22px,4vh,40px) calc(-1 * var(--pad)) 0;padding:8px 0;overflow:hidden;
  -webkit-mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent);
  mask-image:linear-gradient(90deg,transparent,#000 12%,#000 88%,transparent)}
.ob-reel-track{display:flex;gap:12px;width:max-content;animation:obReel 26s linear infinite}
.ob-reel img{width:clamp(86px,24vw,112px);aspect-ratio:3/4;border:4px solid #fff;border-radius:12px;object-fit:cover;
  box-shadow:0 8px 18px #00000047}
.ob-reel img:nth-child(odd){rotate:-3deg}
.ob-reel img:nth-child(even){rotate:3deg;translate:0 6px}
@keyframes obReel{to{transform:translateX(calc(-50% - 6px))}}

/* 5 — use cases: tiles pop in, pictures drift. The tiles take the room there is
   (up to their usual size), so Next stays where it is on every other slide. */
.ob .tiles{flex:100 1 0;min-height:0;max-height:calc(min(100cqi, var(--content)) * 1.4);grid-template-rows:repeat(3,minmax(0,1fr))}
.ob .tile{aspect-ratio:auto;min-height:0}
.ob-enter .tile{animation:obPop .6s cubic-bezier(.3,1.4,.5,1) both;animation-delay:calc(var(--i) * 80ms + .1s)}
.tile img{animation:obKen 10s ease-in-out infinite alternate}
.tile:nth-child(even) img{animation-direction:alternate-reverse}
.tile figcaption{font-size:clamp(12px,1.3vmin,14px)}

/* 10 — notifications: the three of them, and the one tap that asks */
.ob-bells{display:grid;gap:10px;margin:22px 0 0;padding:0;list-style:none;text-align:left}
.ob-bells li{display:flex;align-items:center;gap:12px;border-radius:16px;background:var(--fill);padding:12px 14px}
.ob-bells i{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;
  background:var(--surface);color:var(--orange)}
.ob-bells i svg{width:18px;height:18px}
.ob-bells b{display:block;font:700 14px var(--display)}
.ob-bells span span{font-size:12.5px;color:var(--ink-60)}
.ob-bells-on{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 12px;
  font:600 14px var(--display);color:var(--ok, #1F7A3A)}
.ob-bells-on svg{width:17px;height:17px}

/* 6 — interests: the ten categories in two columns, each with its picture */
.ob .choices.two{grid-template-columns:1fr 1fr;gap:8px}
.ob .choices.two .choice{gap:9px;padding:7px 10px 7px 7px;font-size:clamp(12.5px,3.5vw,14px);line-height:1.15;text-align:left}
.choice-pic{position:relative;display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;
  font-style:normal;box-shadow:0 0 0 2px #ffffff26}
.choice-pic img{width:74%;height:74%;object-fit:contain}
.choice.on .choice-pic{box-shadow:0 0 0 2px var(--orange)}
.choice-pic .check{position:absolute;right:-5px;bottom:-4px;width:17px;height:17px;border:0;background:var(--orange);
  color:#fff;font-size:10px}
.ob-enter .choice{animation:obIn .5s cubic-bezier(.2,.8,.2,1) both;animation-delay:calc(var(--i) * 60ms + .15s)}

/* 8 — account: no dots; the reel takes the middle of the screen, bigger */
.ob-account-mid{flex:1;display:flex;flex-direction:column;justify-content:center;min-height:0}
.ob-account-mid .ob-reel{margin-top:0}
.ob-account-mid .ob-reel img{width:clamp(130px,min(43vw,25vh),220px)}

/* 7 and 8 — a banner photo */
.ob-banner{height:clamp(110px,17vh,170px);margin-top:14px;border-radius:20px;overflow:hidden;box-shadow:0 12px 26px #15151529}
.ob-banner img{display:block;width:100%;height:100%;object-fit:cover;animation:obKen 10s ease-in-out infinite alternate}
.ob-enter .ob-banner{animation:obPop .7s cubic-bezier(.3,1.3,.5,1) .15s both}

/* 9 — pass: the Store's three passes as rows, in its tints (store.css) */
.ob-passes{display:grid;gap:10px;margin-top:clamp(16px,2.4vmin,26px)}
.ob-pass{display:grid;gap:9px;width:100%;border-radius:18px;padding:clamp(12px,1.4vmin,16px) 16px;text-align:left;transition:.18s}
.ob-pass-top{display:flex;align-items:center;gap:12px}
.ob-pass.host{background:var(--st-peach);color:var(--st-peach-ink)}
.ob-pass.ranked{background:var(--st-lilac);color:var(--st-lilac-ink)}
.ob-pass.guest{background:var(--st-sage);color:var(--st-sage-ink)}
.ob-pass.on{box-shadow:inset 0 0 0 2px currentColor}
.ob-pass:hover{transform:translateY(-2px)}
.ob-pass-ico{display:grid;place-items:center;width:34px;height:34px;flex:none;border-radius:50%;background:var(--st-wash)}
.ob-pass-ico svg{width:19px;height:19px}
.ob-pass-name b{display:block;font:700 clamp(14px,1.9vmin,16px) var(--display)}
.ob-pass-name span{font-size:clamp(11px,1.6vmin,12.5px);opacity:.75}
.ob-pass-price{font:700 clamp(14px,1.9vmin,16px) var(--display);font-style:normal}
.ob-pass-price small{font-size:10.5px;font-weight:500;opacity:.7}
.ob-pass-check{display:grid;place-items:center;width:22px;height:22px;flex:none;border-radius:50%;
  background:currentColor}
.ob-pass-check svg{width:14px;height:14px;color:var(--paper);stroke-width:2.6}
.ob-pass-perks{display:grid;gap:5px;font-size:clamp(11px,1.6vmin,12.5px)}
.ob-pass-perks span{display:flex;align-items:center;gap:7px}
.ob-pass-perks svg{width:13px;height:13px;flex:none;stroke-width:2.6}

/* 10 — ready: the photo, the bubble over it, sparkles */
.ob-ready-pic{height:clamp(190px,32vh,300px);border:6px solid #fff;border-radius:26px;overflow:hidden;rotate:-2deg;
  box-shadow:0 20px 40px #15151533}
.ob-ready-pic img{display:block;width:100%;height:100%;object-fit:cover;animation:obKen 9s ease-in-out infinite alternate}
.ob-enter .ob-ready-pic{animation:obPop .8s cubic-bezier(.3,1.35,.5,1) both}
.ob-ready .bubble{margin:-40px 10px 0;background:var(--paper);rotate:1.5deg}
.ob-enter .ob-ready .bubble{animation:obIn .7s cubic-bezier(.2,.8,.2,1) .35s both}
.ob .sparkle{display:inline-block;animation:obTwinkle 2.4s ease-in-out infinite}
.ob .sparkle.s2{animation-delay:1.2s}

/* 11 — let's go: photos burst out behind the words, confetti falls */
.ob-burst{position:relative;height:clamp(150px,22vh,210px)}
.ob-burst .ob-photo{left:50%;top:50%;width:clamp(96px,28vw,132px);aspect-ratio:4/5;
  margin:calc(clamp(96px,28vw,132px) * -.625) 0 0 calc(clamp(96px,28vw,132px) / -2);
  animation:obBurst .9s cubic-bezier(.2,1.3,.4,1) both,obWobble 5s ease-in-out infinite;animation-delay:var(--d),calc(var(--d) + .9s)}
.b1{--x:-62%;--y:-6%;--r:-12deg;--d:.05s}
.b2{--x:0%;--y:-14%;--r:3deg;--d:.18s;z-index:2}
.b3{--x:62%;--y:-2%;--r:11deg;--d:.3s}
@keyframes obBurst{from{opacity:0;translate:0 0;scale:.2;rotate:0deg}to{opacity:1;translate:var(--x) var(--y);scale:1;rotate:var(--r)}}
.ob-burst .ob-photo{translate:var(--x) var(--y)}

@media (prefers-reduced-motion:reduce){
  .ob *{animation:none !important}
  .ob .aa-confetti{display:none}
}
