/* What the home page's scrolling scenes share, and the smaller ones: the dunk
   and the last word (story.js). The opening is in beef.css, the demo in demo.css. */

.brand span { white-space: nowrap; }

.scene { position: relative; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }

/* MARK: The still first screen (while the animated opening is switched off) */

.hero-still { display: grid; place-items: center; min-height: calc(100svh - 64px); padding: 40px 0 72px; text-align: center; }
.hero-icon { display: block; width: 132px; height: 132px; margin: 0 auto; border-radius: 22.5%; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 20px 44px -18px rgba(0, 0, 0, 0.4); }
.hero-name { margin: 12px 0 28px; font-size: 15px; font-weight: 600; }
.hero-still h1 { font-size: clamp(36px, 5.6vw, 66px); }
.hero-still .aside { margin: 10px 0 0; font: 600 clamp(17px, 1.9vw, 22px)/1.3 var(--display); letter-spacing: -0.015em; color: var(--muted); }
.hero-still .actions { margin-top: 28px; }

/* MARK: The dunk */

.dunk { height: 660vh; }
.dunk .stage { display: grid; place-items: center; padding-top: 56px; box-sizing: border-box; }
.dunk-lines { max-width: 980px; }
.dunk-lines p {
  margin: 0 0 0.42em;
  font: 800 clamp(22px, 3.4vw, 42px)/1.08 var(--display);
  letter-spacing: -0.035em;
  opacity: 0.12;
}
.dunk-lines p:last-child { margin-bottom: 0; }

#features { padding-top: clamp(40px, 6vw, 80px); }
/* The FAQ ends the page now, after the last word. */
#faq { padding-bottom: clamp(80px, 10vw, 128px); }

/* MARK: The last word */

.final { margin-top: clamp(96px, 13vw, 168px); padding: clamp(64px, 9vw, 120px) 0; text-align: center; background: #0d0d0f; color: #fff; overflow: hidden; }
.final-pre { margin: 0 auto 6px; max-width: 760px; font: 650 clamp(20px, 2.6vw, 30px)/1.25 var(--display); letter-spacing: -0.02em; color: rgba(255, 255, 255, 0.7); opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.final-pre + .final-pre { transition-delay: 0.35s; }
.final-word {
  display: inline-flex;
  align-items: center;
  gap: 0.18em;
  margin: 0.3em 0 0.32em;
  font-size: clamp(60px, 13vw, 176px);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1;
  opacity: 0;
  transform: scale(0.82);
  transition: opacity 0.6s ease 0.8s, transform 0.9s cubic-bezier(0.2, 1.4, 0.3, 1) 0.8s;
}
.final-word img { width: 0.82em; height: 0.82em; border-radius: 22.5%; }
.final .button { background: #fff; color: #0d0d0f; height: 56px; padding: 0 34px; font-size: 18px; opacity: 0; transition: opacity 0.6s ease 1.3s; }
.final .fine { color: rgba(255, 255, 255, 0.5); opacity: 0; transition: opacity 0.6s ease 1.5s; }
.final.in .final-pre, .final.in .final-word, .final.in .button, .final.in .fine { opacity: 1; transform: none; }
.final + footer, main + footer { margin-top: 0; }

/* MARK: The -50% check (story.js): over everything until its button is pressed */

.gate { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; background: rgba(12, 12, 18, 0.34); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.35s ease; }
.gate[hidden] { display: none; }
.gate.in { opacity: 1; }
.gated, .gated body { overflow: hidden; }
.gate-card { width: min(460px, 100%); padding: 30px 28px 28px; border-radius: 26px; text-align: center; background: rgba(255, 255, 255, 0.7); -webkit-backdrop-filter: blur(22px) saturate(1.5); backdrop-filter: blur(22px) saturate(1.5); box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.6) inset, 0 30px 80px -20px rgba(0, 0, 0, 0.45); transform: translateY(14px) scale(0.96); transition: transform 0.5s cubic-bezier(0.2, 1.25, 0.3, 1); }
.gate.in .gate-card { transform: none; }
.gate-icon { display: block; margin: 0 auto; width: 64px; height: 64px; border-radius: 22.5%; box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.35); }
.gate h2 { margin: 16px 0 8px; font: 800 clamp(24px, 4vw, 30px)/1.15 var(--display); letter-spacing: -0.03em; }
.gate p { margin: 0 0 22px; font-size: 16px; line-height: 1.45; color: #3a3a3c; }
.gate p b { background: linear-gradient(90deg, #4f9eff, #8c6bff, #ed6bcc, #ff9959); -webkit-background-clip: text; background-clip: text; color: transparent; }
/* The button: dark, with the app's rainbow turning round its edge and glowing
   behind it; faster while it checks, brighter once it's done. */
@property --deal-spin { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
@keyframes deal-spin { to { --deal-spin: 360deg; } }
.deal-check { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; width: 100%; min-height: 54px; padding: 12px 20px; border: 0; border-radius: 27px; background: linear-gradient(180deg, #2a2a2e, #0c0c0e); color: #fff; font: 700 16px/1.25 var(--body); text-align: center; cursor: pointer; box-shadow: 0 1px 0 rgba(255, 255, 255, 0.14) inset; transition: background 0.2s ease; }
.deal-check:focus { outline: none; }
.deal-check:hover { background: linear-gradient(180deg, #35353a, #141416); }
.deal-check::before, .deal-check::after { content: ""; position: absolute; inset: -2.5px; z-index: -1; border-radius: 30px; background: conic-gradient(from var(--deal-spin), #4f9eff, #8c6bff, #ed6bcc, #ff9959, #ffd166, #4f9eff); animation: deal-spin 3.2s linear infinite; }
.deal-check::after { inset: -4px; filter: blur(16px); opacity: 0.75; animation: deal-spin 3.2s linear infinite, deal-breathe 2.2s ease-in-out infinite; }
@keyframes deal-breathe { 0%, 100% { opacity: 0.55; } 50% { opacity: 0.95; } }
.deal-check.deal-checking { cursor: progress; }
.deal-check.deal-checking::before, .deal-check.deal-checking::after { animation-duration: 1s, 0.8s; }
.deal-check.deal-checking::after { filter: blur(22px); opacity: 1; }
.deal-check.deal-done { cursor: default; }
.deal-check.deal-done::after { inset: -6px; filter: blur(24px); opacity: 1; animation: deal-spin 2.4s linear infinite; }
.deal-spin { display: none; flex: none; width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, 0.35); border-top-color: #fff; border-radius: 50%; animation: deal-turn 0.7s linear infinite; }
.deal-check.deal-checking .deal-spin { display: inline-block; }
@keyframes deal-turn { to { transform: rotate(360deg); } }
.confetti { position: fixed; inset: 0; z-index: 100; pointer-events: none; overflow: hidden; }
.confetti i { position: absolute; width: 8px; height: 13px; border-radius: 2px; }
@media (max-width: 720px) {
  .gate-card { padding: 26px 20px 22px; }
  .deal-check { font-size: 15px; }
}

/* MARK: The clip in the corner (story.js) */

.clip {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: min(420px, 40vw);
  overflow: hidden;
  border-radius: 14px;
  background: #000;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 22px 50px -14px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(18px) scale(0.96);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.2, 1.25, 0.3, 1);
}
.clip[hidden] { display: none; }
.clip.in { opacity: 1; transform: none; }
.clip video { display: block; width: 100%; aspect-ratio: 960 / 394; background: #000; cursor: pointer; }
.clip button { position: absolute; display: grid; place-items: center; padding: 0; border: 0; color: #fff; background: rgba(0, 0, 0, 0.55); cursor: pointer; transition: background 0.2s ease, opacity 0.2s ease; }
.clip button:hover { background: rgba(0, 0, 0, 0.75); }
.clip svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.clip-sound { left: 8px; bottom: 8px; display: inline-flex !important; align-items: center; gap: 6px; height: 28px; padding: 0 10px 0 8px !important; border-radius: 14px; font: 600 12px/1 var(--body); }
.clip-sound .on, .clip.muted .clip-sound .off { display: inline; }
.clip-sound .off, .clip.muted .clip-sound .on, .clip:not(.muted) .clip-sound { display: none !important; }
.clip-play { inset: 0; margin: auto; width: 54px; height: 54px; border-radius: 50%; opacity: 0; pointer-events: none; }
.clip-play svg { width: 22px; height: 22px; margin-left: 3px; fill: currentColor; stroke: none; }
.clip.stopped .clip-play { opacity: 1; pointer-events: auto; }
@media (max-width: 720px) {
  .clip { right: 12px; bottom: 12px; width: 64vw; border-radius: 12px; }
}

/* MARK: Less motion: the end of each scene, still */

.reduced .scene { height: auto !important; }
.reduced .stage { position: relative; height: auto; min-height: 100svh; }
.reduced .beef .stage { min-height: 760px; }
.reduced .demo .stage { height: 100svh; }
.reduced .dunk-lines p { opacity: 1; }
.reduced .clip, .reduced .gate, .reduced .gate-card { transition: none; }
.reduced .final-pre, .reduced .final-word, .reduced .final .button, .reduced .final .fine { opacity: 1; transform: none; transition: none; }
