/* The onboarding (Mickey, 1 Nov 2026, after Bleap's welcome screen): a deck of cards that shuffles on
   its own with one headline per card and no buttons. Swipe the cards off either side; after the last
   one the cards line up in a drifting row, Max and Vera come up under it with their names written in
   by hand, and the sign-in buttons appear.
   Everything that moves is moved by onboarding.js with transforms and opacity only. */
@font-face { font-family:'Caveat'; src:url(/fonts/caveat-600-latin.woff2) format('woff2'); font-weight:600; font-display:block; }

#welcome.onb {
  --top:max(10px, env(safe-area-inset-top)); --bot:max(14px, env(safe-area-inset-bottom)); --gut:24px;
  --hs:clamp(32px, 9.2vw, 42px); --head-h:calc(var(--hs) * 3.2);
  position:fixed; inset:0; max-width:none; margin:0; padding:0; display:block; overflow:hidden;
  touch-action:none; -webkit-user-select:none; user-select:none; -webkit-touch-callout:none;
}
.onb button { -webkit-user-select:none; user-select:none; }

/* Top bar: the wordmark and "Skip" on the cards, the back button on the sign-in step (crossfaded) */
.onb-top { position:absolute; top:var(--top); left:0; right:0; margin:0 auto; max-width:480px; height:48px; padding:0 var(--gut); display:flex; align-items:center; z-index:30; }
.onb-mark { font-family:Switzer, system-ui, sans-serif; font-weight:700; font-size:20px; line-height:1; letter-spacing:-.035em; }
.onb-back { position:absolute; left:calc(var(--gut) - 4px); top:4px; width:40px; height:40px; padding:0; border-radius:50%; border:0; background:var(--paper); color:var(--ink);
  box-shadow:0 1px 2px rgba(0,0,0,.06), 0 8px 20px -8px rgba(0,0,0,.28); display:grid; place-items:center; opacity:0; visibility:hidden; }
.onb-alt { margin-left:auto; padding:8px 13px; border-radius:999px; background:var(--ink); color:var(--paper); font-size:14px; font-weight:600; text-decoration:none; }
.onb-alt + .onb-skip { margin-left:4px; }
.onb-skip { margin-left:auto; padding:10px 2px 10px 12px; border:0; background:none; color:var(--ink-2); font:inherit; font-size:15px; font-weight:500; }

/* Headline: one layer per card; the old layer leaves on top of the new one */
/* Under the cards (Mickey 1 Nov 2026), so the picture comes first and the line reads as its caption */
.onb-head { position:absolute; bottom:calc(var(--bot) + 34px); left:0; right:0; margin:0 auto; max-width:480px; height:var(--head-h); padding:0; z-index:5;
  font-family:var(--f-serif); font-weight:400; font-size:var(--hs); line-height:1.04; letter-spacing:-.012em; pointer-events:none; }
.onb-head .hl { position:absolute; top:0; left:var(--gut); right:var(--gut); margin:0; text-wrap:pretty; }
.onb-head .w { display:inline-block; will-change:transform, opacity, filter; }
.onb-head em, .onb-title em { font-style:italic; padding:0 .08em 0 .02em; margin:0 -.08em 0 -.02em;
  color:inherit; }

/* The deck fills the space under the headline; cards are sized and placed by onboarding.js */
.onb-deck { position:absolute; left:0; right:0; top:calc(var(--top) + 58px); bottom:calc(var(--bot) + 34px + var(--head-h) + 10px); z-index:10; translate:0 calc(-1 * var(--lift, 0px)); }
.onb-card { position:absolute; left:50%; top:50%; border-radius:26px; overflow:hidden; transform-origin:50% 82%; opacity:0;
  will-change:transform, opacity; backface-visibility:hidden; -webkit-backface-visibility:hidden; contain:layout paint;
  background:#fff; color:var(--ink); box-shadow:0 1px 2px rgba(20,10,40,.06), 0 24px 46px -20px rgba(60,30,110,.38); }
.onb-card img { display:block; pointer-events:none; -webkit-user-drag:none; }
/* The illustration fills the card; the show's piece sits on a soft white fade at the bottom */
.cc-illu { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 30%; }
.cc-body { position:absolute; left:0; right:0; bottom:0; padding:44px 14px 14px; display:flex; flex-direction:column; gap:8px;
  background:linear-gradient(rgba(255,255,255,0), rgba(255,255,255,.88) 38%, #fff 70%); }

/* The building blocks, the same on every card */
.cc-label { align-self:flex-start; display:inline-flex; align-items:center; gap:7px; font-size:12.5px; font-weight:600; color:var(--ink); background:rgba(255,255,255,.9);
  border-radius:999px; padding:5px 11px; box-shadow:0 4px 14px -6px rgba(60,30,110,.35); }
.cc-label .live { width:7px; height:7px; border-radius:50%; background:#ff5a5f; animation:ccLive 1.6s ease-in-out infinite; }
@keyframes ccLive { 50% { opacity:.35; } }
.cc-line { margin:0; font-family:var(--f-serif); font-size:clamp(21px, 6vw, 25px); line-height:1.06; }
.cc-line em, .cc-host em { font-style:italic; color:inherit; padding-right:.06em; }
.cc-pill { align-self:flex-start; display:inline-flex; align-items:center; gap:7px; font-size:13px; font-weight:600; border-radius:999px; padding:6px 12px 6px 8px; background:var(--ink); color:#fff; }
.cc-pill.bad i { width:16px; height:16px; border-radius:50%; display:grid; place-items:center; background:var(--bad); }
/* A host speaks: white bubble with a soft shadow */
.cc-host { align-self:flex-start; max-width:94%; background:#fff; color:var(--ink); border-radius:6px 18px 18px 18px; padding:9px 13px 10px; font-size:14px; font-weight:600; line-height:1.25;
  box-shadow:0 8px 22px -10px rgba(60,30,110,.45); }
.cc-host b { display:block; font-size:12.5px; font-weight:600; color:var(--mute); }
/* You speak: the gradient bubble */
.cc-you { align-self:flex-end; display:inline-flex; align-items:center; gap:8px; color:#fff; border-radius:18px 6px 18px 18px; padding:9px 14px; font-size:15px; font-weight:600;
  background:linear-gradient(120deg, #f050a0, #8c6eff 60%, #3fa0ff); box-shadow:0 10px 24px -10px rgba(140,110,255,.8); }
.cc-you .cc-wave b { background:#fff; }
/* Your answer up in the corner, so Max's face stays in view below it */
.cc-you.top { position:absolute; top:14px; right:12px; }
.cc-rounds { list-style:none; margin:0; padding:0; display:flex; align-items:center; gap:6px; }
.cc-rounds i { width:28px; height:28px; border-radius:9px; display:grid; place-items:center; font-style:normal; font-size:13px; font-weight:700; background:var(--o1); box-shadow:inset 0 -2px 0 var(--o1-rim); }
.cc-rounds li:nth-child(2) i { background:var(--o2); box-shadow:inset 0 -2px 0 var(--o2-rim); }
.cc-rounds li:nth-child(3) i { background:var(--o3); box-shadow:inset 0 -2px 0 var(--o3-rim); }
.cc-rounds li:nth-child(4) i { background:var(--o4); box-shadow:inset 0 -2px 0 var(--o4-rim); }
.cc-rounds li:nth-child(5) i { background:var(--ink); color:#fff; box-shadow:none; }
.cc-rounds .cc-streak { margin-left:auto; display:inline-flex; align-items:center; gap:4px; font-size:13px; font-weight:600; background:var(--ash); border-radius:999px; padding:5px 10px 5px 7px; }
.cc-chips { display:flex; flex-wrap:wrap; gap:6px; }
.cc-chips b { font-size:13px; font-weight:600; background:var(--ash); border-radius:999px; padding:6px 11px; }
.cc-vs { align-self:center; display:flex; align-items:center; gap:12px; background:#fff; border-radius:999px; padding:5px 8px; box-shadow:0 8px 22px -10px rgba(60,30,110,.45); }
.cc-vs > span { display:flex; align-items:center; gap:8px; }
.cc-vs i { width:34px; height:34px; border-radius:50%; display:grid; place-items:center; font-style:normal; font-size:15px; font-weight:600; color:#fff; background:#ef7a3c; }
.cc-vs i.me { background:#111; }
.cc-vs b { font-family:var(--f-serif); font-weight:400; font-size:32px; line-height:1; }
.cc-vs em { font-family:var(--f-serif); font-size:18px; color:var(--mute); }
.cc-host.voice { align-self:stretch; max-width:none; display:flex; align-items:center; gap:9px; border-radius:999px; padding:7px 14px 7px 7px; font-size:13.5px; }
.cc-host.voice .play { flex:none; width:26px; height:26px; border-radius:50%; display:grid; place-items:center; background:var(--ink); color:#fff; }

/* The top card builds itself as it arrives, in step with the headline: the picture settles, then the pieces */
.onb-card .cc-illu { transform:scale(1.06); transition:transform 1.4s cubic-bezier(.23, 1, .32, 1); }
.onb-card.live .cc-illu { transform:none; }
.onb-card .a1, .onb-card .a2, .onb-card .a3 { opacity:0; transform:translate3d(0, 10px, 0) scale(.97); }
.onb-card.live .a1, .onb-card.live .a2, .onb-card.live .a3 { animation:ccIn .55s cubic-bezier(.23, 1, .32, 1) forwards; }
.onb-card.live .a1 { animation-delay:.32s; } .onb-card.live .a2 { animation-delay:.62s; } .onb-card.live .a3 { animation-delay:.92s; }
@keyframes ccIn { to { opacity:1; transform:none; } }
/* Cards that have been seen keep their pieces (behind the top card, in the row) */
.onb-card.seen .a1, .onb-card.seen .a2, .onb-card.seen .a3 { opacity:1; transform:none; }
.onb-card.seen .cc-illu { transform:none; }

/* The little live waveform */
.cc-wave { display:inline-flex; align-items:center; gap:2.5px; height:18px; }
.cc-wave b { width:3.5px; height:16px; border-radius:3px; background:linear-gradient(#f050a0, #8c6eff); transform:scaleY(.3); animation:ccWave .62s ease-in-out infinite alternate; }
.cc-wave b:nth-child(2) { animation-duration:.48s; animation-delay:-.2s; }
.cc-wave b:nth-child(3) { animation-duration:.74s; animation-delay:-.4s; }
.cc-wave b:nth-child(4) { animation-duration:.55s; animation-delay:-.1s; }
@keyframes ccWave { to { transform:scaleY(1); } }

/* Progress: one pill per card; the active one fills while the deck waits to shuffle */
/* "Swipe": a finger that glides off to the left until the first touch (onboarding.js swipeHint) */
.onb-hint { position:absolute; left:50%; z-index:45; display:flex; align-items:center; gap:7px; padding:9px 15px 9px 12px; border-radius:999px; opacity:0;
  background:rgba(11,11,12,.78); color:#fff; font-size:15px; font-weight:600; letter-spacing:.01em; pointer-events:none;
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); box-shadow:0 10px 24px -10px rgba(0,0,0,.45); }
.onb-dots { position:absolute; left:0; right:0; bottom:calc(var(--bot) + 14px); display:flex; justify-content:center; gap:6px; z-index:12; pointer-events:none; }
.onb-dots span { position:relative; width:6px; height:6px; border-radius:3px; background:rgba(11,11,12,.16); overflow:hidden; transition:width .5s var(--ease-out), background-color .3s; }
.onb-dots span.on { width:22px; }
.onb-dots span i { position:absolute; inset:0; background:var(--ink); transform-origin:0 50%; transform:scaleX(0); }
.onb-dots span.on i { transform:scaleX(1); }
.onb-dots span.on.timing i { animation:dotFill var(--dwell, 2.8s) linear both; }
@keyframes dotFill { from { transform:scaleX(0); } to { transform:scaleX(1); } }

/* The sign-in buttons on the last step */
.onb-foot { position:absolute; left:0; right:0; bottom:0; margin:0 auto; max-width:480px; padding:0 var(--gut) var(--bot); display:flex; flex-direction:column; z-index:20; }
.onb-signin { gap:9px; visibility:hidden; }
.onb-title { margin:0; text-align:center; font-family:var(--f-serif); font-weight:400; font-size:clamp(32px, 9vw, 38px); line-height:1.04; letter-spacing:-.01em; }
.onb-sub { margin:0 0 8px; text-align:center; color:var(--ink-2); font-size:16px; }
.onb-signin .cta { display:flex; align-items:center; justify-content:center; gap:10px; }
.onb-signin .cta svg { flex:none; }
.onb-signin .cta.fb { background:#1877f2; color:#fff; }
.signin-pair { display:grid; grid-template-columns:1fr 1fr; gap:9px; }
.signin-pair .cta { padding-left:12px; padding-right:12px; }
.onb-signin .linkbtn { padding:8px; text-decoration:none; color:var(--ink-2); }
.onb-signin .fine { margin:0 0 4px; }
.onb-signin .invite { margin-bottom:4px; }

/* Max and Vera between the row of cards and the buttons, their names written in either side
   (the band's top and the box's width come from onboarding.js) */
.onb-hosts { position:absolute; left:0; right:0; top:var(--hosts-top, 40%); bottom:var(--signin-h, 55%); display:grid; place-items:center; pointer-events:none; z-index:11; }
.onb-hostbox { position:relative; width:min(60vw, 330px); aspect-ratio:720 / 424; opacity:0; will-change:transform, opacity; }
.onb-ink { position:absolute; inset:0; }
.onb-hostbox video { position:absolute; inset:0; width:100%; height:100%; display:block; clip-path:inset(4px); object-fit:contain; }
.onb-name { position:absolute; opacity:.86; font-family:'Caveat', 'Bradley Hand', cursive; font-weight:600; font-size:clamp(23px, 6.4vw, 31px); line-height:1; color:var(--ink); white-space:nowrap; }
.onb-name.max { right:calc(100% + 2px); top:20%; rotate:-8deg; }
.onb-name.vera { left:calc(100% + 2px); top:36%; rotate:7deg; }
.onb-name i { font-style:normal; display:inline-block; clip-path:inset(-30% 100% -30% -25%); }
.onb-arrows { position:absolute; inset:0; width:100%; height:100%; overflow:visible; fill:none; stroke:var(--ink-2); stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.onb-arrows path { vector-effect:non-scaling-stroke; stroke-dasharray:1 1; stroke-dashoffset:1; }

@media (max-height:700px) {
  #welcome.onb { --hs:clamp(28px, 8vw, 34px); }
  .onb-sub, .onb-signin .fine { display:none; }
  .onb-signin .cta { padding-top:14px; padding-bottom:14px; }
}
@media (prefers-reduced-motion:reduce) {
  .cc-wave b { animation:none; transform:scaleY(.7); }
  .onb-card .a1, .onb-card .a2, .onb-card .a3 { opacity:1; transform:none; animation:none !important; }
  .onb-card .cc-illu { transform:none; transition:none; }
}
/* Card 3: Max sits low in his picture; lift it so his face clears the bubbles */
.onb-card:nth-child(3) .cc-illu { inset:auto; top:-14%; left:0; width:100%; height:100%; }
