/* Theuma 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
   Theuma's UI laid out on it: images cut from 2x exports of the Figma file. */

:root {
  --theuma-red: linear-gradient(150deg, #ef1f2a 0%, #e30613 45%, #c3000e 100%);
  --blush: #fcf6f7; /* the login and order screens' own background */
  --oak: #f2e6df; /* the "Weergave" pill: the warm tint of the rooms */
  --pad: clamp(20px, 5vw, 64px);
  --lift: 0 30px 70px rgba(70, 20, 20, 0.16), 0 6px 16px rgba(70, 20, 20, 0.08);
}

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

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

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

.stage-red { background: var(--theuma-red); }
.stage-blush { background: var(--blush); }
.stage-oak { background: var(--oak); }
.stage-dark { background: #1e1a19; }

/* A screen that fills its slide edge to edge, like object-fit: cover, with its
   pieces placed in % of the screen. */
.shot-screen { width: 100%; aspect-ratio: 1920 / 1024; }
.stage-photo { padding: 0; container-type: size; background: #dfe3e2; }

.cover {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, calc(100cqh * 1920 / 1024));
  aspect-ratio: 1920 / 1024;
  transform: translate(-50%, -50%);
}

.cover > img:first-child {
  width: 100%;
}

.piece {
  position: absolute;
}

/* ── 1. Configurator ────────────────────────────────────── */

.hero {
  perspective: 1400px;
}

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

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

/* ── 2. The assistant ───────────────────────────────────── */

/* the living room, over the building once the buyers start choosing doors */
.cover > .room {
  position: absolute;
  inset: 0;
  width: 100%;
  opacity: 0;
}

/* the chat column of the panel (design x 968–1896, y 24–918); the thread
   scrolls up inside it as messages arrive */
.chat {
  position: absolute;
  left: 50.4167%;
  top: 2.3438%;
  width: 48.3333%;
  height: 87.3047%;
  overflow: hidden;
}

.thread {
  position: absolute;
  inset: 0;
}

/* messages in % of the chat column, laid out as in the design (8 px apart) */
.msg { position: absolute; left: 4.3103%; width: 71.1207%; }
.msg.later { opacity: 0; }
.chat-avatar { top: 65.1007%; width: 13.7931%; transform-origin: 50% 60%; }
.chat-welkom { top: 83.8926%; width: 33.5129%; }
.chat-wat { top: 89.7092%; width: 21.4440%; }
.chat-hiernaast { top: 95.5257%; width: 34.6983%; }
.chat-theuma { top: 101.3423%; }
.chat-reply-verder { top: 110.2908%; left: 86.7457%; width: 11.5302%; }
.chat-woonproject { top: 116.1074%; }
.chat-reply-verdieping { top: 125.0559%; left: 75.7543%; width: 22.5216%; }
.chat-uitstekend { top: 130.8725%; }
.msg { transform-origin: 0 50%; }
.msg.reply { transform-origin: 100% 50%; }

.footer {
  position: absolute;
  left: 50.4167%;
  top: 89.6484%;
  width: 48.3333%;
}

.footer.later { opacity: 0; }

/* ── 3. Door set steps ──────────────────────────────────── */

.steps {
  position: relative;
  width: min(62%, 560px);
  margin: 0 auto;
}

.steps-panel {
  display: grid;
  filter: drop-shadow(0 30px 40px rgba(90, 30, 30, 0.1)) drop-shadow(0 6px 10px rgba(90, 30, 30, 0.06));
}

/* three bands: the tabs stay, the options push sideways, the footer swaps */
.steps-tabs,
.steps-foot {
  display: grid;
}

.steps-tabs > img,
.steps-foot > img {
  grid-area: 1 / 1;
  width: 100%;
}

.steps-tabs > img + img,
.steps-foot > img + img {
  opacity: 0;
}

.steps-picks {
  display: grid;
  overflow: hidden;
}

.pick {
  display: grid;
  grid-area: 1 / 1;
}

.pick + .pick {
  transform: translateX(100%);
}

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

.pick > .before {
  opacity: 0;
}

.cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: clamp(18px, 2.4vw, 26px);
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
  pointer-events: none;
  transform-origin: 20% 10%;
}

/* ── 4. Overview ────────────────────────────────────────── */

.overview {
  position: relative;
  width: min(62%, 560px);
  margin: 0 auto;
  filter: drop-shadow(0 30px 40px rgba(90, 50, 30, 0.12)) drop-shadow(0 6px 10px rgba(90, 50, 30, 0.06));
}

.overview > img:first-child {
  width: 100%;
}

.ov-row {
  position: absolute;
  left: 0;
  top: var(--t);
  width: 100%;
  height: var(--h);
}

/* ── 5. Phones ──────────────────────────────────────────── */

.phones {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(14px, 3.2vw, 44px);
  width: min(78%, 720px);
  margin: 0 auto;
  padding: 3% 0 6%;
}

.phone {
  width: 100%;
  border-radius: 3.56% / 1.64%; /* the rounding baked into the cut (40 of 1125 px) */
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.phone:nth-child(2) {
  margin-top: 14%;
}

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

@media (max-width: 699px) {
  .steps,
  .overview {
    width: 82%;
  }

  .phones {
    width: 100%;
  }
}
