/* Vegamuze 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 laid out
   on it: images cut from 2x exports of the Figma files, the menu scribbles as
   the designs' own vector paths, and Kevin's original home animation. */

:root {
  /* the brand's colour pairs: a pastel and its accent */
  --radijs: #ffe6f5;
  --spinazie: #469b28;
  --perzik: #ffebcd;
  --aubergine: #7d37f0;
  --banaan: #fff0a5;
  --bosbes: #413ceb;
  --selder: #dcffc8;
  --rabarber: #ff3c69;
  --zeewier: #e1ffff;
  --wortel: #ff6400;
  --peper: #222;
  --pad: clamp(20px, 5vw, 64px);
}

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

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

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

/* each slide takes the dominant background of the visual it shows */
.stage-zeewier { background: var(--zeewier); }
.stage-selder { background: var(--selder); }
.stage-perzik { background: var(--perzik); }

/* ── Screens hanging off the bottom edge ────────────────── */

.shot > .stage.hero {
  justify-content: flex-end;
  padding-bottom: 0;
  perspective: 1400px;
}

.hero-screen {
  width: 88%;
  margin: 0 auto;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 80, 90, 0.2), 0 6px 18px rgba(0, 80, 90, 0.1);
  transform-origin: 50% 0;
}

/* the workshops page, in its square: a 1920 × 1600 window, framed like the other
   pages there; the script scrolls the whole page through it */
.ws-screen {
  width: 100%;
  aspect-ratio: 1920 / 1600;
  border-radius: 5px;
  overflow: hidden;
  box-shadow: 0 24px 50px rgba(40, 90, 10, 0.16), 0 5px 12px rgba(40, 90, 10, 0.08);
}

.ws-screen img {
  display: block;
  width: 100%;
  height: auto;
}

/* the original home animation, 1920 × 1350 */
.hero-screen video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1600 / 1126;
}

/* ── Menu scribbles ─────────────────────────────────────── */

.nav-stage {
  align-items: center;
  padding: clamp(40px, 8vw, 110px) clamp(12px, 3vw, 40px);
}

/* the five pages' menus in one cell; the script shows one at a time */
.nav {
  position: relative;
  display: grid;
  width: 100%;
  max-width: 1040px;
}

.nav > img:not(.nav-cursor) {
  grid-area: 1 / 1;
  width: 100%;
}

.nav > img:not(:first-child, .nav-cursor) {
  opacity: 0;
}

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

.scribble path {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* the pointer that clicks the next menu item; the script moves it, and shifts it
   left by a third of its width so the fingertip, not the corner, is the point
   (with xPercent: GSAP misreads a CSS translate in % next to its own transform) */
.nav-cursor {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(18px, 2.4vw, 28px);
  height: auto;
  opacity: 0;
  pointer-events: none;
}

/* without the script only the first page's scribble shows */
.scribble + .scribble {
  opacity: 0;
}

/* ── Add to cart ────────────────────────────────────────── */

#buy {
  align-items: center;
}

/* the original button animation, 760 × 318; its button sits at 668, 235 and is 92 × 83 */
.buy {
  position: relative;
  width: min(100%, 760px);
}

.buy video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1520 / 636;
  border-radius: 4px;
  box-shadow: 0 30px 70px rgba(130, 80, 20, 0.22), 0 6px 16px rgba(130, 80, 20, 0.12);
}

/* the fingertip, not the corner of the image, is the point: it rests below and
   right of the button's centre, so the tick stays in sight */
.buy-cursor {
  position: absolute;
  top: 92%;
  left: 96.5%;
  width: clamp(20px, 2.8vw, 30px);
  height: auto;
  translate: -32% 0;
  opacity: 0;
}

/* ── Rows of two: business cards and workshops, the film and the stickers ── */

/* the first row: both square (on the slide, not the stage, for Firefox); case.js
   rounds them to the nearest 20 px line */
.shot-square {
  width: 100%;
  aspect-ratio: 1 / 1;
}

.stage-white { background: #fff; }

/* the row with the rebrand film: both slides in the film's own 5:4 shape (on the
   slide, not the stage, for Firefox); the film's first colour behind it while it
   loads */
.shot-wide {
  width: 100%;
  aspect-ratio: 1350 / 1080;
}

.shot-film {
  background: var(--radijs);
}

/* the business cards photo fills its slide */
.print-photo {
  object-fit: cover;
}

/* the whole stickers photo, the bag standing on the bottom edge; the photo is
   white, so the slide's extra width and height are white around it */
.shot-wide > img {
  object-fit: contain;
  object-position: 50% 100%;
  background: #fff;
}

/* the workshops page, centred in its square */
.shot-square > .stage {
  display: grid;
  place-items: center;
  align-items: center;
  padding: 9%;
}

/* ── Brand guidelines ───────────────────────────────────── */

.stage-banaan { background: var(--banaan); }

/* nine pages of the guide on a sheet */
#sheet {
  align-items: center;
}

.sheet {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(10px, 2.6vw, 30px);
  width: 100%;
  max-width: 980px;
}

.sheet img {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 10px 24px rgba(110, 90, 0, 0.16), 0 2px 6px rgba(110, 90, 0, 0.1);
}

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

@media (max-width: 699px) {
  .hero-screen { width: 94%; }
  /* the menu at a readable size: its middle, where the scribbles are */
  .nav { width: 125%; max-width: none; margin-left: -12.5%; }
}
