/* buffkit landing page
   Milky ground, white cards, near-black ink; the game footage supplies the color.
   Motion is layered on by js/main.js and every state below has a visible resting form. */

:root {
  --ground: #F4F1E8;
  --surface: #FFFFFF;
  --ink: #141414;
  --ink-2: #55595F;
  --line: rgba(20, 20, 20, 0.1);
  --night: #141414;
  --glass: rgba(255, 255, 255, 0.94);
  --smoke: rgba(20, 20, 20, 0.72);

  --display: 'Bricolage Grotesque', 'Arial Narrow', Arial, sans-serif;
  --body: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 64px);
  --max: 1320px;
  --r-xl: 32px;
  --r-lg: 28px;
  --r-md: 22px;
  --r-sm: 16px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.65, 0, 0.35, 1);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

img, video, svg { display: block; }
img, video { max-width: 100%; }
p, h1, h2, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }
button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
/* controls that sit on footage get a two-tone ring so it shows on any frame */
.stage :focus-visible, .viewer :focus-visible, .cta :focus-visible {
  outline: 2px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px rgba(20, 20, 20, 0.85);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--ink); color: var(--ground);
  font-weight: 600; text-decoration: none; transition: top 0.2s ease;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------------------------------------------------------------- nav --- */
.nav {
  position: sticky; top: 0; z-index: 50;
  padding: 10px max(4px, calc(var(--gutter) - 16px));
}
.nav__bar {
  max-width: 1224px; margin: 0 auto; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-radius: 999px; border: 1px solid transparent;
  transition: background-color 0.5s var(--ease), border-color 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.nav.is-stuck .nav__bar {
  background: rgba(244, 241, 232, 0.82);
  border-color: var(--line);
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
  box-shadow: 0 14px 34px -22px rgba(20, 20, 20, 0.45);
}
.brand {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-family: var(--display); font-size: 1.5625rem; font-weight: 700; letter-spacing: -0.035em;
  text-decoration: none;
}
.brand__mark { width: 28px; height: 32px; flex: none; }
.brand--sm { font-size: 1.25rem; }
.brand--sm .brand__mark { width: 22px; height: 25px; }
.nav__links { display: flex; gap: 4px 28px; font-size: 1rem; font-weight: 500; }
.nav__links a, .foot__links a {
  position: relative; display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
}
.nav__links a::after, .foot__links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 9px; height: 1.5px; background: currentColor;
  transform: scaleX(0); transform-origin: 100% 50%; transition: transform 0.5s var(--ease);
}
.nav__links a:hover::after, .nav__links a:focus-visible::after,
.foot__links a:hover::after, .foot__links a:focus-visible::after { transform: scaleX(1); transform-origin: 0 50%; }
@media (max-width: 740px) { .nav__links { display: none; } }

/* ------------------------------------------------------------ buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 1px solid transparent;
  font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease), background-color 0.3s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); transition-duration: 0.1s; }
.btn--sm { min-height: 44px; padding: 0 20px; font-size: 1rem; }
.btn--dark { background: var(--ink); color: var(--ground); }
.btn--dark:hover { box-shadow: 0 16px 30px -16px rgba(20, 20, 20, 0.7); }
.btn--light { background: var(--surface); border-color: var(--line); }
.btn--light:hover { box-shadow: 0 16px 30px -20px rgba(20, 20, 20, 0.45); }
.btn--white { background: #fff; color: var(--ink); }
.btn--white:hover { box-shadow: 0 18px 36px -16px rgba(0, 0, 0, 0.7); }

/* --------------------------------------------------------------- hero --- */
.hero { padding-top: clamp(28px, 5vw, 64px); }
.hero__copy {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: clamp(18px, 2.2vw, 28px);
}
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 15px;
  border-radius: 999px; background: var(--surface); border: 1px solid var(--line);
  font-size: 0.875rem; font-weight: 500;
}
.pill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.display {
  max-width: 9.8em;
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2.9rem, 7.4vw, 6.75rem); line-height: 0.94; letter-spacing: -0.045em;
  text-wrap: balance;
}
.display--sm { max-width: 11em; font-size: clamp(2.25rem, 5.4vw, 4.75rem); line-height: 0.96; letter-spacing: -0.04em; }
.lede { max-width: 42rem; font-size: clamp(1.0625rem, 1.5vw, 1.25rem); line-height: 1.5; color: var(--ink-2); text-wrap: pretty; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

.stage-wrap { margin-top: clamp(32px, 4.5vw, 56px); }
.stage {
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; isolation: isolate;
  border-radius: var(--r-lg); background: var(--night);
  transform: scale(var(--grow, 1)); transform-origin: 50% 50%;
}
.stage__poster, .stage__video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
/* slow fade back to the finished still, quick fade in so the point cloud is seen */
.stage__video { opacity: 0; transition: opacity 0.7s ease; }
.stage.is-playing .stage__video { opacity: 1; transition-duration: 0.25s; }

.receipt {
  position: absolute; top: clamp(12px, 1.8vw, 22px); right: clamp(12px, 1.8vw, 22px);
  width: min(264px, 62%); padding: 16px 16px 14px; border-radius: var(--r-sm);
  display: flex; flex-direction: column; gap: 8px;
  background: var(--glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.6);
  font-size: 0.875rem; line-height: 1.4;
}
.receipt__title { font-weight: 600; }
.receipt__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--ink-2); }
.receipt__row--sum { padding-top: 8px; border-top: 1px solid var(--line); color: var(--ink); font-weight: 600; }

.steps {
  position: absolute; left: 50%; bottom: clamp(12px, 1.8vw, 22px); transform: translateX(-50%);
  display: flex; gap: 4px; padding: 5px; border-radius: 999px; white-space: nowrap; background: var(--smoke);
}
.steps li {
  padding: 7px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600; color: rgba(255, 255, 255, 0.92);
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.steps li.is-on { background: #fff; color: var(--ink); }

.stage__toggle {
  position: absolute; left: clamp(12px, 1.8vw, 22px); top: clamp(12px, 1.8vw, 22px);
  width: 44px; height: 44px; display: grid; place-items: center; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--smoke); color: #fff;
  transition: background-color 0.3s ease, transform 0.5s var(--ease);
}
.stage__toggle:hover { background: rgba(20, 20, 20, 0.88); transform: scale(1.06); }
.icon-play { display: none; }
.motion-paused .icon-pause { display: none; }
.motion-paused .icon-play { display: block; }

/* short laptop screens: pull the clip above the fold */
@media (min-width: 900px) and (max-height: 880px) {
  .hero { padding-top: 16px; }
  .hero__copy { gap: 16px; }
  .display { font-size: clamp(2.9rem, min(7.4vw, 11.5vh), 6.75rem); }
  .stage-wrap { margin-top: 28px; }
}
@media (max-width: 640px) {
  .stage { aspect-ratio: 4 / 5; border-radius: var(--r-md); }
  .receipt { width: min(208px, 58%); padding: 12px 12px 10px; gap: 6px; font-size: 0.8125rem; border-radius: 14px; }
  .receipt__row--sum { padding-top: 6px; }
}
@media (max-width: 350px) {
  .receipt { width: min(208px, 70%); }
  .seg button { padding: 0 4px; font-size: 0.8125rem; }
}

/* -------------------------------------------------------------- strip --- */
.strip { padding-top: clamp(18px, 2.4vw, 28px); }
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
/* with no script, or with motion stopped, the strip is scrolled by hand */
.no-js .marquee, .motion-paused .marquee { overflow-x: auto; scrollbar-width: none; }
.no-js .marquee::-webkit-scrollbar, .motion-paused .marquee::-webkit-scrollbar { display: none; }
.marquee__track { display: flex; gap: 16px; width: max-content; padding: 0 var(--gutter); will-change: transform; }
.marquee.is-live .marquee__track { padding: 0; }
.marquee__track li { flex: none; }
.marquee__track img {
  width: clamp(220px, 22vw, 320px); height: auto; aspect-ratio: 16 / 9; object-fit: cover;
  border-radius: var(--r-sm); background: var(--night);
}

/* ------------------------------------------------------------- offers --- */
.offers {
  max-width: var(--max); margin: 0 auto;
  padding: clamp(56px, 8vw, 112px) var(--gutter) 0;
  display: flex; flex-direction: column; gap: clamp(16px, 2vw, 24px);
}
.offer {
  background: var(--surface); border-radius: var(--r-xl); padding: clamp(20px, 3.4vw, 48px);
  box-shadow: 0 1px 0 rgba(20, 20, 20, 0.04), 0 32px 64px -52px rgba(20, 20, 20, 0.3);
}
.offer__grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(28px, 4.5vw, 64px); align-items: center;
}
.offer__text { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.offer__text > p { max-width: 32rem; }
.offer__text > p:not(.eyebrow):not(.fine) { color: var(--ink-2); }
.eyebrow { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.title {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 3.6vw, 3.125rem); line-height: 1; letter-spacing: -0.035em;
  text-wrap: balance;
}
.fine { font-size: 0.875rem; line-height: 1.6; color: var(--ink-2); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.875rem; font-weight: 500; }
.tags li { padding: 7px 12px; border-radius: 999px; background: var(--ground); }

/* media frames */
.viewer, .media {
  position: relative; aspect-ratio: 5 / 4; overflow: hidden; isolation: isolate;
  border-radius: var(--r-md); background: var(--night);
}
/* the two cards with the image on the left: text first in the source, image as tall as the text */
@media (min-width: 861px) {
  .offer--flip .offer__grid { align-items: stretch; }
  .offer--flip .offer__text { order: 2; align-self: center; }
  .offer--flip .media { aspect-ratio: auto; }
  .offer--flip .media::after { content: ""; display: block; padding-top: var(--floor, 80%); }
}
@media (min-width: 861px) and (max-width: 1100px) {
  .offer--flip .media { --floor: 125%; }
}
@media (max-width: 860px) {
  .offer__grid { grid-template-columns: minmax(0, 1fr); }
  .viewer, .media { aspect-ratio: 16 / 9; }
}
@media (max-width: 520px) {
  .viewer { aspect-ratio: 5 / 4; }
  .media { aspect-ratio: 4 / 5; }
}

/* stage viewer: mesh, material, in the game */
.viewer__frame {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease-io);
}
.viewer__frame.is-prev { clip-path: inset(0 0 0 0); z-index: 1; }
.viewer__frame.is-on { clip-path: inset(0 0 0 0); z-index: 2; }
.viewer__tabs {
  position: absolute; left: 12px; bottom: 12px; z-index: 3; max-width: calc(100% - 24px);
  display: flex; gap: 4px; padding: 5px; border-radius: 999px; background: var(--smoke);
}
.viewer__tab {
  position: relative; min-height: 44px; padding: 0 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: transparent; color: rgba(255, 255, 255, 0.92); font-size: 0.875rem; font-weight: 600; white-space: nowrap;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}
.viewer__tab:hover { color: #fff; }
.viewer__tab.is-on { background: #fff; color: var(--ink); }
.viewer.is-auto .viewer__tab.is-on::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: 9px; height: 2px; border-radius: 2px;
  background: currentColor; transform: scaleX(0); transform-origin: 0 50%;
  animation: tab-progress 3.6s linear forwards;
}
@keyframes tab-progress { to { transform: scaleX(1); } }
@media (max-width: 420px) { .viewer__tab { padding: 0 12px; font-size: 0.8125rem; } }
@media (max-width: 360px) {
  .viewer__tabs { left: 8px; right: 8px; bottom: 8px; max-width: none; }
  .viewer__tab { flex: 1 1 auto; min-width: 0; padding: 0 6px; }
}

/* how a call is billed: listed price + 0% = what you pay */
.sheet { margin-top: clamp(24px, 3.4vw, 44px); padding-top: clamp(20px, 2.6vw, 32px); border-top: 1px solid var(--line); }
.sum {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center; gap: clamp(10px, 1.6vw, 20px);
}
.sum__cell {
  min-width: 0; padding: clamp(16px, 2vw, 24px); border-radius: 18px; background: var(--ground);
  display: flex; flex-direction: column; gap: 6px;
}
.sum__cell--zero { background: var(--ink); color: var(--ground); }
.sum__label { font-size: 0.875rem; font-weight: 600; color: var(--ink-2); }
.sum__cell--zero .sum__label { color: rgba(244, 241, 232, 0.88); }
.sum__value {
  font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.6vw, 2.25rem);
  line-height: 1.05; letter-spacing: -0.03em;
}
.sum__op { font-family: var(--display); font-weight: 700; font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1; color: var(--ink-2); text-align: center; }
.notes {
  margin-top: 24px; display: flex; flex-wrap: wrap; gap: 8px 40px;
  font-size: 0.9375rem; line-height: 1.6; color: var(--ink-2);
}
.notes li { position: relative; padding-left: 18px; }
.notes li::before { content: ""; position: absolute; left: 0; top: 0.66em; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.sheet .fine { margin-top: 16px; }
@media (max-width: 700px) {
  .sum { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

/* an image, sometimes with a floating card */
.media__img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transform: translate3d(0, var(--py, 0%), 0); scale: 1.12;
}
.media__img--drift { object-position: 62% 50%; transform: none; transform-origin: 50% 100%; scale: 1; }
/* landscape phones and small tablets: a taller frame so the car shows under the card */
@media (min-width: 521px) and (max-width: 860px) {
  #pay .media { aspect-ratio: 4 / 3; }
  .media__img--drift { object-position: 92% 50%; }
}
/* wide desktop frame: slide right so the game's whole gauge is in, not half of it */
@media (min-width: 1101px) { .media__img--drift { object-position: 92% 50%; } }
.wallet {
  position: absolute; left: 16px; top: 16px; width: min(330px, calc(100% - 32px)); padding: 12px;
  display: flex; flex-direction: column; gap: 12px; border-radius: 20px;
  background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: 0 22px 44px -24px rgba(0, 0, 0, 0.6);
  font-size: 0.875rem; line-height: 1.4;
}
.seg { position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; border-radius: 999px; background: var(--ground); }
.seg::before {
  content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: calc(50% - 4px); border-radius: 999px;
  background: #fff; box-shadow: 0 2px 8px -2px rgba(20, 20, 20, 0.3); transition: transform 0.55s var(--ease);
}
.seg[data-on="1"]::before { transform: translateX(100%); }
.seg button {
  position: relative; min-height: 44px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; cursor: pointer;
  font-size: 0.875rem; font-weight: 600; white-space: nowrap; color: var(--ink-2); transition: color 0.3s ease;
}
.seg button[aria-pressed="true"] { color: var(--ink); }
/* both panels share one cell so the card keeps its height while they cross-fade */
.wallet__panels { display: grid; }
.wallet__panel {
  grid-area: 1 / 1; display: flex; flex-direction: column; gap: 10px; padding: 2px 6px 6px;
  transition: opacity 0.35s ease 0.12s, transform 0.55s var(--ease) 0.12s, visibility 0s;
}
.wallet__panel[aria-hidden="true"] {
  opacity: 0; visibility: hidden; transform: translate3d(0, 6px, 0);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s 0.25s;
}
.wallet__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 600; }
.wallet__note { color: var(--ink-2); }
.wallet__tag { padding: 3px 10px; border-radius: 999px; background: var(--ground); font-size: 0.8125rem; font-weight: 600; color: var(--ink-2); }
.meter { height: 8px; border-radius: 999px; background: rgba(20, 20, 20, 0.12); overflow: hidden; }
.meter i {
  display: block; height: 100%; border-radius: inherit; background: var(--ink);
  transform-origin: 0 50%; transform: scaleX(0.78); animation: meter 6s ease-in-out infinite alternate;
}
@keyframes meter { from { transform: scaleX(0.32); } to { transform: scaleX(0.8); } }
@media (max-width: 520px) {
  .wallet { left: 12px; top: 12px; width: calc(100% - 24px); }
  .seg__more { display: none; }
  .seg__cap { display: inline-block; }
  .seg__cap::first-letter { text-transform: uppercase; }
}

.chip {
  display: inline-block; padding: 5px 11px; border-radius: 999px;
  background: var(--glass); color: var(--ink); font-size: 0.75rem; font-weight: 600;
}
.platforms { position: absolute; left: 16px; right: 16px; bottom: 16px; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; }
.platforms li { padding: 8px 15px; border-radius: 999px; background: var(--glass); font-size: 0.875rem; font-weight: 600; }
@media (min-width: 861px) and (max-width: 960px) {
  .platforms { gap: 6px; }
  .platforms li { padding: 8px 11px; }
}
@media (max-width: 520px) { .platforms { display: grid; grid-template-columns: repeat(2, max-content); justify-items: start; } }

/* asset tiles */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { position: relative; aspect-ratio: 11 / 9; overflow: hidden; border-radius: 18px; background: #0C0D0C; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.9s var(--ease); }
.tile:hover img { transform: scale(1.05); }
.tile .chip { position: absolute; left: 10px; bottom: 10px; max-width: calc(100% - 20px); white-space: nowrap; }
.tiles__credit { margin-top: 12px; }
@media (min-width: 641px) and (max-width: 860px) {
  .tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1000px) { .chip__more { display: none; } }
@media (max-width: 350px) { .chip { padding: 5px 8px; } }

/* ---------------------------------------------------------------- cta --- */
.cta { max-width: var(--max); margin: 0 auto; padding: clamp(16px, 2vw, 24px) var(--gutter) 0; }
.cta__band {
  --cover: var(--ground);
  position: relative; min-height: clamp(360px, 38vw, 500px); overflow: hidden; isolation: isolate;
  display: grid; place-items: center; border-radius: var(--r-xl); background: var(--night); color: #fff;
}
.cta__band .media__img { opacity: 0.82; }
/* darken only where the words sit */
.cta__band::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background:
    radial-gradient(72% 66% at 50% 50%, rgba(20, 20, 20, 0.68), rgba(20, 20, 20, 0.22) 72%),
    linear-gradient(180deg, rgba(20, 20, 20, 0) 55%, rgba(20, 20, 20, 0.45));
}
.cta__copy {
  position: relative; z-index: 2; padding: 48px 24px;
  display: flex; flex-direction: column; align-items: center; gap: 24px; text-align: center;
}
.cta__copy h2 { text-shadow: 0 2px 30px rgba(0, 0, 0, 0.4); }
@media (max-width: 380px) {
  .display--sm { font-size: 2rem; }
  .cta__copy { padding: 48px 16px; }
}

/* ------------------------------------------------------------- footer --- */
.foot {
  max-width: var(--max); margin: 0 auto; padding: clamp(28px, 4vw, 48px) var(--gutter) 36px;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px;
  font-size: 0.875rem; color: var(--ink-2);
}
.foot::before { content: ""; flex: 0 0 100%; height: 1px; margin-bottom: 12px; background: var(--line); }
.foot .brand { color: var(--ink); }

.foot__links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.foot__links a:hover { color: var(--ink); }

/* ------------------------------------------------------------- motion --- */
.js [data-reveal] {
  opacity: 0; transform: translate3d(0, 28px, 0);
  transition: opacity 0.9s var(--ease), transform 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}
.js [data-reveal="scale"] { transform: translate3d(0, 56px, 0) scale(0.96); transform-origin: 50% 0; }
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js .receipt { opacity: 0; transform: translate3d(18px, -8px, 0); }
.js .stage-wrap.is-in .receipt {
  opacity: 1; transform: none;
  transition: opacity 0.8s var(--ease) 1.2s, transform 1s var(--ease) 1.2s;
}

.js [data-split] { visibility: hidden; }
.js [data-split].is-split { visibility: visible; }
.w { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0.1em 0.05em 0.17em; margin: -0.1em -0.05em -0.17em; }
.w__i {
  display: inline-block; transform: translate3d(0, 118%, 0);
  transition: transform 1.05s var(--ease); transition-delay: calc(120ms + var(--wi, 0) * 55ms);
}
.is-in .w__i { transform: none; }

/* a cover in the card's own color slides off each image while the image settles back.
   (clipping the frame itself would hide it from the IntersectionObserver.) */
.js [data-curtain] { background-color: var(--cover, var(--surface)); }
.js [data-curtain].is-in { background-color: var(--night); transition: background-color 0s 1.3s; }
.js [data-curtain]::before {
  content: ""; position: absolute; inset: -1px; z-index: 6; pointer-events: none;
  background: var(--cover, var(--surface)); transform-origin: 50% 0;
  transition: transform 1.25s var(--ease);
}
.js [data-curtain].is-in::before { transform: scaleY(0); }
.js [data-curtain] .media__img { scale: 1.24; transition: scale 1.8s var(--ease); }
.js [data-curtain].is-in .media__img { scale: 1.12; }
.js [data-curtain] .media__img--drift { scale: 1.1; }
.js [data-curtain].is-in .media__img--drift { scale: 1; }
.js .viewer[data-curtain] .viewer__frame { scale: 1.1; transition: clip-path 1.1s var(--ease-io), scale 1.8s var(--ease); }
.js .viewer[data-curtain].is-in .viewer__frame { scale: 1; }

.js .tile[data-reveal].is-in { transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); }
.js .tile.is-tilting { transition: transform 0.12s linear; transition-delay: 0s; }

.motion-paused .meter i, .motion-paused .viewer__tab.is-on::after { animation-play-state: paused; }

/* without the script: nothing is hidden and nothing pretends to be a control */
.no-js .stage__toggle, .no-js .viewer__tabs, .no-js .seg { display: none; }
.no-js .meter i { animation: none; }

/* everything visible, nothing moving */
.reveal-all [data-reveal], .reveal-all .receipt, .reveal-all .w__i { opacity: 1 !important; transform: none !important; }
.reveal-all [data-split] { visibility: visible !important; }
.reveal-all [data-curtain] { background-color: var(--night) !important; }
.reveal-all [data-curtain]::before { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .js [data-reveal], .js .receipt, .w__i { opacity: 1; transform: none; }
  .js [data-split] { visibility: visible; }
  .js [data-curtain] { background-color: var(--night); }
  .js [data-curtain]::before { display: none; }
  .js [data-curtain] .media__img, .media__img { transform: none; scale: 1; }
  .js .viewer[data-curtain] .viewer__frame { scale: 1; }
  .stage { transform: none; }
  .stage__toggle { display: none; }
}
