/* SLV Club case study. The layout (sidebar, slides, grid) is shared: case.css and
   case.js. This file holds each slide's backdrop (.stage) and the pieces of SLV's
   UI laid out on it: images cut from 2x exports of the Figma files, plus the few
   live numbers. */

:root {
  --slv-gradient: linear-gradient(-58deg, #f3e500 26%, #fecc00 100%);
  --slv-bg: #fcfcfc; /* the screens' own background: crops with shadows blend into it */
  --lift: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.12)) drop-shadow(0 6px 10px rgba(0, 0, 0, 0.06));
  --lift-yellow: drop-shadow(0 30px 40px rgba(107, 95, 27, 0.3)) drop-shadow(0 6px 12px rgba(107, 95, 27, 0.14));
  --lato: Lato, var(--font-sans);
  --pad: clamp(20px, 5vw, 64px);
}

img {
  -webkit-user-drag: none;
}

/* ── Stages ─────────────────────────────────────────────── */

.stage {
  position: relative;
  overflow: hidden;
  padding: var(--pad);
}

.stage-yellow { background: var(--slv-gradient); }
.stage-screen { background: var(--slv-bg); }
.stage-dark { background: #1a171b; }
.stage-cream { background: #fff9e0; }
.stage-white { background: #fff; }

/* ── Dashboard ──────────────────────────────────────────── */

.hero {
  padding-bottom: 0;
  perspective: 1400px;
}

.hero-mark {
  position: absolute;
  top: -10%;
  right: -12%;
  width: 58%;
  opacity: 0.3;
  filter: brightness(0) invert(1);
}

.hero-screen {
  position: relative;
  z-index: 1;
  width: 88%;
  margin: 0 auto;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(107, 95, 27, 0.35), 0 6px 18px rgba(107, 95, 27, 0.18);
  transform-origin: 50% 0;
}

.hero-screen img {
  width: 100%;
}

.float {
  position: absolute;
  z-index: 3;
  filter: var(--lift-yellow);
}

.float-tier { top: 26%; left: 2%; width: 23%; }
.float-wallet { top: 64%; right: 2%; width: 34%; }
.float-pill { top: 12%; right: 10%; width: 8.5%; }

/* ── Partner levels ─────────────────────────────────────── */

.levels-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.6vw, 22px);
  padding-top: 16px;
}

.tier {
  position: relative;
  display: grid;
}

.tier > img {
  grid-area: 1 / 1;
  width: 100%;
}

.tier .on {
  opacity: 0;
}

.tier.is-active .on {
  opacity: 1;
}

/* the active level lifts off the page */
.tier {
  transition: filter 0.4s;
}

/* above its neighbours and the coin bar, so its shadow falls over them */
.levels-row {
  position: relative;
  z-index: 1;
}

.tier.is-active {
  z-index: 1;
  filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.06)) drop-shadow(0 50px 60px rgba(0, 0, 0, 0.06));
}

.meter {
  position: relative;
  margin-top: clamp(28px, 4vw, 48px);
  padding-bottom: 40px;
}

.meter img {
  width: 100%;
}

.meter-full {
  position: absolute;
  top: 0;
  left: 0;
  clip-path: inset(0 31.49% 0 0); /* 2300 coins; the script moves it */
}

/* the pin rides the end of the fill (the bar image is 1448 × 62 design px) */
.meter .meter-pin {
  position: absolute;
  left: 68.51%;
  top: calc(35 / 62 * (100% - 40px));
  width: calc(16 / 1448 * 100%);
  height: auto;
  translate: -50% 0;
}

.meter-value {
  position: absolute;
  left: 68.51%;
  top: calc(100% - 36px);
  translate: -50% 0;
  font-family: var(--lato);
  font-size: clamp(14px, 1.4vw, 18px);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: #1a171b;
  font-variant-numeric: tabular-nums;
}

/* ── Inspiration ────────────────────────────────────────── */

/* The shapes are set on the slide, not its backdrop: the backdrop is a flex item
   that stretches to fill the slide, and Firefox drops an aspect ratio there. */
.shot-feed {
  width: 100%; /* so a set height doesn't turn the ratio into a width */
  aspect-ratio: 16 / 10;
}

.feed {
  padding: 0;
}

.feed-cols {
  position: absolute;
  inset: auto var(--pad);
  top: -50%;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 1.4vw, 18px);
  transform: rotate(-4deg);
}

.feed-col {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1.4vw, 18px);
}

.photo {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.photo > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo .heart {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
}

.photo .heart img {
  grid-area: 1 / 1;
  width: 17px;
  height: 17px;
}

.photo .heart .on {
  scale: 0;
}

/* ── Sign-up roles ──────────────────────────────────────── */

#roles {
  padding-block: clamp(40px, 8vw, 96px);
}

.roles-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(8px, 2vw, 28px);
}

.roles-row {
  position: relative;
}

/* each card stacks its two states: white, and yellow when picked */
.role {
  display: grid;
  filter: var(--lift);
}

.role > img {
  grid-area: 1 / 1;
  width: 100%;
}

.role .on {
  opacity: 0;
}

.role.is-picked .on {
  opacity: 1;
}

.role.is-picked {
  filter: var(--lift-yellow);
}

/* the script moves it from card to card; without motion it stays hidden */
.role-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: clamp(20px, 2.2vw, 30px);
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  pointer-events: none;
}

/* ── Product cards ──────────────────────────────────────── */

.shelf {
  padding-inline: 0;
  padding-bottom: clamp(56px, 8vw, 100px);
}

.shelf-row {
  --h: clamp(200px, 25vw, 330px); /* card height */
  display: flex;
  align-items: center;
  gap: clamp(14px, 2vw, 28px);
  width: max-content;
  will-change: transform;
}

.shelf-row + .shelf-row {
  margin-top: clamp(14px, 2vw, 28px);
}

/* Shadows are baked into the images, with room around the card: 0.1 of the
   card height above, 0.2 at the sides and 0.32 below, taken back here. */
.shelf-row img {
  height: calc(var(--h) * 1.42);
  width: auto;
  margin: calc(var(--h) * -0.1) calc(var(--h) * -0.2) calc(var(--h) * -0.32);
}

/* ── Screens, each on a tile ────────────────────────────── */

.shot-tile {
  width: 100%;
  aspect-ratio: 4 / 3;
}

.shots .stage {
  display: grid;
  place-items: center;
  padding: 9%;
}

.tile-cream { background: #fff9e0; }
.tile-yellow { background: var(--slv-gradient); }
.tile-dark { background: #1a171b; }
.tile-grey { background: #ececec; }

.shots .stage img {
  width: 100%;
  border-radius: 5px;
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.14), 0 5px 12px rgba(0, 0, 0, 0.06);
}

/* ── Clubshop ───────────────────────────────────────────── */

#shop {
  padding-bottom: clamp(90px, 12vw, 130px);
}

.shop-items {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(10px, 3vw, 36px);
}

.shop-card {
  flex: 0 1 27%;
  min-width: 0;
  will-change: transform;
}

/* the image carries its own shadow: 189 px each side, 94 above, 302 below a 800 × 945 card */
.shop-card img {
  display: block;
  width: calc(1178 / 800 * 100%);
  max-width: none;
  margin: calc(-94 / 800 * 100%) 0 calc(-302 / 800 * 100%) calc(-189 / 800 * 100%);
}

.shop-card:nth-child(1) { rotate: -7deg; margin-top: 8%; }
.shop-card:nth-child(2) { flex-basis: 31%; }
.shop-card:nth-child(3) { rotate: 6deg; margin-top: 12%; }

.wallet {
  position: absolute;
  left: var(--pad);
  bottom: calc(var(--pad) * 0.6);
  z-index: 2;
}

/* ── Design system in use ───────────────────────────────── */

.stage-grey { background: #ececec; }

/* The scene is the sign-up form's frame (1920 × 1290). The form is one layer the
   script pushes in and fades; every component is a full-scene layer with its
   vector placed in the middle at the size it is used at, and so is the cursor.
   Without motion only the form shows. */
.ds-scene {
  position: relative;
  width: 100%;
  aspect-ratio: 1920 / 1290;
  container-type: inline-size;
}

.ds-form,
.ds-item,
.ds-cursor {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.ds-form img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.1), 0 6px 14px rgba(0, 0, 0, 0.05);
}

/* The e-mail field and the button on the form are the vectors themselves, so
   they can lift out and land without a seam; these empty their places in the
   screenshot. */
.ds-patch {
  position: absolute;
  background: var(--slv-bg);
}

/* without motion the two rest in their places on the form (the script takes over) */
.ds-item,
.ds-cursor {
  opacity: 0;
}

.ds-item[data-k="input"] {
  opacity: 1;
  transform-origin: 50% 51.938%;
  transform: translate(0, 5.5039%) scale(0.41667);
}

.ds-item[data-k="button"] {
  opacity: 1;
  transform-origin: 50% 51.938%;
  transform: translate(0, 41.2016%) scale(0.29412);
}

.ds-item > svg,
.ds-cursor > svg {
  position: absolute;
  display: block;
  height: auto;
  overflow: visible;
}

.ds-cursor {
  z-index: 4;
}

.ds-cursor > svg + svg {
  opacity: 0;
}

/* The foundations, three steps of their own, laid out as on the kit's pages: a
   selection of colours, type styles and icons. Each sheet is a box of --w by
   --h scene units around the scene's middle (--u is one of the scene's 1920). */
.ds-sheet {
  --u: calc(100cqw / 1920);
  position: absolute;
  left: calc(50% - var(--w) * var(--u) / 2);
  top: calc(51.938% - var(--h) * var(--u) / 2);
  width: calc(var(--w) * var(--u));
  height: calc(var(--h) * var(--u));
  font-family: var(--lato);
  color: #1a171b;
}

.ds-colors {
  display: grid;
  grid-template-columns: repeat(5, calc(150 * var(--u)));
  gap: calc(36 * var(--u)) calc(40 * var(--u));
  align-content: start;
}

.ds-color {
  display: block;
  white-space: nowrap;
}

.ds-color i {
  display: block;
  height: calc(150 * var(--u));
  margin-bottom: calc(14 * var(--u));
}

.ds-color i.is-light {
  box-shadow: inset 0 0 0 1px #d0d0d0;
}

.ds-color b,
.ds-color em {
  display: block;
  font-style: normal;
  font-weight: 400;
}

.ds-color b {
  font-size: calc(24 * var(--u));
  line-height: 1;
}

.ds-color em {
  margin-top: calc(8 * var(--u));
  font-size: calc(19 * var(--u));
  line-height: 1;
  color: #929292;
}

.ds-typography {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ds-type {
  margin: 0;
  white-space: nowrap;
  color: #4b4b4d;
}

.ds-type span {
  display: block;
}

/* the kit's styles, 2.6 times their size */
.ds-h1 { font-size: calc(93.6 * var(--u)); font-weight: 300; line-height: 1.1; letter-spacing: -0.02em; }
.ds-h3 { font-size: calc(57.2 * var(--u)); font-weight: 400; line-height: 1.3; }
.ds-h6 { font-size: calc(39 * var(--u)); font-weight: 700; line-height: 1.4; letter-spacing: 0.05em; text-transform: uppercase; }
.ds-body { font-size: calc(41.6 * var(--u)); font-weight: 400; line-height: 1.4; }

.ds-type small {
  display: block;
  margin-top: calc(6 * var(--u));
  font-size: calc(21 * var(--u));
  line-height: 1;
  color: #929292;
}

.ds-type small b {
  margin-right: 0.8em;
  font-weight: 400;
  color: #1a171b;
}

.ds-icon-row {
  display: grid;
  grid-template-columns: repeat(6, calc(72 * var(--u)));
  gap: calc(60 * var(--u));
}

.ds-status-row {
  display: flex;
  justify-content: center;
  gap: calc(60 * var(--u));
  margin-top: calc(80 * var(--u));
}

.ds-icons svg {
  display: block;
  width: 100%;
  height: auto;
}

.ds-status-row svg {
  width: calc(120 * var(--u));
}

/* the component's frame, as Figma draws one: a dashed violet outline (drawn on
   by a mask the script moves) with the component icon and name above it */
.ds-set {
  position: absolute;
  z-index: 3;
  opacity: 0;
  pointer-events: none;
}

.ds-name {
  position: absolute;
  bottom: 100%;
  left: 0;
  display: flex;
  align-items: center;
  gap: 0.4em;
  margin-bottom: 0.55em;
  font-family: var(--font-sans);
  font-size: max(10px, 1.1cqw);
  font-weight: 500;
  line-height: 1;
  color: #9747ff;
  white-space: nowrap;
}

.ds-name svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.ds-outline {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.ds-outline rect {
  x: 0.75px;
  y: 0.75px;
  width: calc(100% - 1.5px);
  height: calc(100% - 1.5px);
  rx: 12px;
  fill: none;
}

.ds-dash {
  stroke: #9747ff;
  stroke-width: clamp(1px, 0.15cqw, 1.5px);
  stroke-dasharray: 5 4;
}

.ds-pen {
  stroke: #fff;
  stroke-width: 8px;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
}

/* ── Small screens ──────────────────────────────────────── */

@media (max-width: 699px) {
  .float-wallet { display: none; }
  .float-tier { top: auto; bottom: 8%; left: 3%; width: 34%; }
  .levels-row,
  .roles-row { grid-template-columns: repeat(2, 1fr); row-gap: 24px; }
  .shot-feed { aspect-ratio: 3 / 4; }
  .feed-cols { inset: auto 12px; top: -50%; grid-template-columns: repeat(2, 1fr); }
  .feed-col:nth-child(n + 3) { display: none; }
  .shop-items { flex-direction: column; align-items: center; gap: 20px; }
  .shop-card { flex: none; width: 70%; margin: 0; }
  .shop-card:nth-child(n) { margin-top: 0; }
  .wallet { width: 60%; }
}

/* ── Slides: what the shared layout (case.css) leaves to this page ── */

/* the dashboard hangs off the bottom edge, so extra height goes above it */
.shot > .stage.hero {
  justify-content: flex-end;
}

.shots .shot > .stage {
  align-items: center;
}

/* The wallet card: the coin balance in SLV's own type. */
.wallet-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 24px;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.08), 0 18px 22px rgba(0, 0, 0, 0.08), 0 60px 100px rgba(0, 0, 0, 0.06);
  font-family: var(--lato);
  font-size: clamp(22px, 2.4vw, 34px);
  line-height: 1.2;
  color: #4b4b4d;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wallet-card img {
  width: 1em;
  height: 1em;
}

.wallet-card small {
  display: block;
  font-size: 13px;
  color: #929292;
}

.float-wallet {
  width: auto;
  filter: none;
}
