#s09 {
  background: var(--bg-2);
  border-block: 1px solid var(--line);
  --s09-stage-height: clamp(380px, 62svh, 650px);
}

#s09 .mod-head { max-width: 880px; }
#s09 .mod-title { max-width: 830px; }
#s09 .s09-workbench { margin: 0; }
#s09 .s09-steps {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 18px;
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
}
/* Without the enhanced sequence only the final comparison is shown: no steps to follow. */
#s09:not(.is-enhanced) .s09-steps { display: none; }
#s09 .s09-steps li {
  position: relative;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
#s09 .s09-steps li::before {
  content: "";
  position: absolute;
  inset: -1px 0 auto;
  height: 1px;
  background: var(--bronze);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s var(--ease);
}
#s09 .s09-steps li[aria-current="step"] { color: var(--ink); }
#s09 .s09-steps li[aria-current="step"]::before { transform: scaleX(1); }
#s09 .s09-steps li > span {
  margin-right: 10px;
  color: var(--bronze);
  font-size: 11px;
  letter-spacing: .08em;
}
#s09 .s09-stage {
  position: relative;
  isolation: isolate;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 50% 42%, #3b3023 0%, #251d15 42%, #17120e 85%);
}
#s09 .s09-stage::before {
  content: "";
  position: absolute;
  inset: 20px;
  border: 1px solid rgba(241, 231, 214, .045);
  border-radius: 3px;
  pointer-events: none;
}
#s09 .s09-stage-mark {
  position: absolute;
  left: 30px;
  bottom: 23px;
  z-index: 3;
  font-size: 10px;
  letter-spacing: .15em;
  color: var(--muted);
  pointer-events: none;
}
#s09 .s09-stage-mark > span { padding-inline: 9px; color: var(--bronze); }
#s09:not(.is-enhanced) .s09-stage-mark { display: none; }

/* Animated sequence: only once the 3D viewer is ready. */
#s09 .s09-sequence { display: none; }
#s09.is-enhanced .s09-stage { height: var(--s09-stage-height); overflow: hidden; }
#s09.is-enhanced .s09-sequence { display: block; height: 100%; }
/* Pinned desktop scene: the stage fills the screen below the step list. */
#s09.is-enhanced:not(.is-linear) { --s09-stage-height: clamp(420px, calc(100svh - 170px), 780px); }
#s09 .s09-panel { position: absolute; inset: 0; }
#s09 .s09-panel-title { display: none; }
#s09 .s09-technical { display: flex; justify-content: center; align-items: center; padding: 42px 6% 62px; }
/* Sized by height so the landscape sheet never spills out of short stages. */
#s09 .s09-technical-paper {
  height: 100%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 2400 / 1697;
  transform: rotate(-2deg);
  box-shadow: var(--shadow);
}
#s09 .s09-technical-paper img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
#s09 .s09-profile { display: flex; justify-content: center; align-items: center; padding: 26px 20px 42px; }
#s09 .s09-profile-paper {
  --s09-sheet: 1;
  position: relative;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 1040 / 1820;
  background: rgba(255, 255, 255, var(--s09-sheet));
  box-shadow: 0 30px 80px rgba(0, 0, 0, calc(.45 * var(--s09-sheet)));
}
/* Pinned scene: the profile sheet sits above the canvas so its outline overlays the bottle. */
#s09.is-enhanced:not(.is-linear) .s09-profile { z-index: 3; pointer-events: none; }
#s09 .s09-profile-paper img { width: 100%; height: 100%; object-fit: contain; }
#s09 .s09-outline { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#s09 .s09-outline path { stroke: var(--bronze); stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; }
#s09 .s09-punt-line { opacity: .65; }
#s09 .s09-dimension {
  position: absolute;
  right: 12%;
  top: 46%;
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 400;
  color: var(--bronze-soft);
  line-height: 1;
}
#s09 .s09-dimension span { display: block; margin-top: 9px; font-family: var(--sans); font-size: 11px; letter-spacing: .16em; text-align: right; }
#s09 .s09-product { z-index: 2; }
#s09 .s09-viewer { position: absolute; inset: 0; }
#s09 .s09-viewer canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; }
#s09 .s09-viewer canvas:active { cursor: grabbing; }
#s09 .s09-interaction {
  position: absolute;
  z-index: 3;
  right: 25px;
  bottom: 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}
#s09 .s09-hint { margin: 0; color: var(--muted); font-size: 12px; }
#s09 .s09-controls { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 30px; background: rgba(20, 16, 12, .8); }
#s09 .s09-controls button { min-width: 44px; min-height: 44px; border: 0; border-radius: 24px; padding: 6px 12px; background: transparent; cursor: pointer; font-size: 12px; }
#s09 .s09-controls button:hover { background: rgba(241, 231, 214, .09); }
#s09 .s09-controls .s09-turn { font-size: 19px; }
#s09 .s09-controls .s09-play { min-width: 70px; }

/* Steps 4 and 5: white studio light, then the photographs, placed by the script over the 3D bottle. */
#s09 .s09-light { position: absolute; inset: 0; z-index: 4; background: #fff; opacity: 0; pointer-events: none; }
#s09 .s09-photo { position: absolute; left: 0; top: 0; z-index: 5; visibility: hidden; pointer-events: none; transform-origin: 0 0; }
#s09 .s09-photo img { display: block; width: 100%; height: 100%; }
#s09 .s09-photo-scene { box-shadow: var(--shadow); }
#s09 .s09-photo-badge { z-index: 6; left: 24px; bottom: auto; top: 24px; visibility: hidden; }
#s09.is-linear .s09-light,
#s09.is-linear .s09-photo,
#s09.is-linear .s09-photo-badge { display: none; }

/* Step 6: the three images side by side, also the static version of the module. */
#s09 .s09-triptych {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding: 40px 6%;
}
#s09.is-enhanced:not(.is-linear) .s09-triptych {
  position: absolute;
  inset: 0;
  z-index: 7;
  align-content: center;
  padding: 32px 6% 48px;
  visibility: hidden;
}
#s09 .s09-shot { margin: 0; min-width: 0; }
#s09 .s09-shot-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 4px;
  background: #17120e;
  box-shadow: 0 22px 50px rgba(0, 0, 0, .4);
}
#s09 .s09-shot-frame img { display: block; width: 100%; height: 100%; object-fit: cover; }
#s09 .s09-shot figcaption { margin-top: 12px; color: var(--ink); font-size: 13px; }
#s09 .caption { max-width: 750px; }

/* Linear mode also covers short laptop windows and the absence of GSAP. */
#s09.is-linear .s09-stage { height: auto; }
#s09.is-linear .s09-sequence { display: grid; }
#s09.is-linear .s09-panel { position: relative; inset: auto; min-width: 0; }
#s09.is-linear .s09-panel + .s09-panel { border-top: 1px solid var(--line); }
#s09.is-linear .s09-panel-title { display: block; position: absolute; top: 20px; left: 24px; margin: 0; color: var(--bronze-soft); font-size: 12px; letter-spacing: .04em; }
#s09.is-linear .s09-technical { height: clamp(290px, 52vw, 590px); padding: 64px 7% 35px; }
#s09.is-linear .s09-profile { height: clamp(470px, 66svh, 620px); padding: 64px 25px 30px; }
#s09.is-linear .s09-product { height: clamp(500px, 78svh, 680px); }
#s09.is-linear .s09-viewer { inset: 44px 0 112px; }
#s09.is-linear .s09-interaction { right: 0; bottom: 20px; width: 100%; flex-direction: column; gap: 9px; }
#s09.is-linear .s09-stage-mark { display: none; }
#s09.is-linear .s09-triptych { border-top: 1px solid var(--line); }

@media (max-width: 600px) {
  #s09 .s09-steps { grid-template-columns: repeat(3, 1fr); gap: 14px 10px; margin-bottom: 18px; }
  #s09 .s09-steps li { padding-top: 10px; font-size: 11px; line-height: 1.45; }
  #s09 .s09-steps li > span { display: block; margin: 0 0 4px; font-size: 10px; }
  #s09 .s09-dimension { right: 16px; top: auto; bottom: 25px; padding: 8px; border-radius: 3px; background: rgba(20, 16, 12, .84); font-size: 32px; }
  #s09 .s09-dimension span { margin-top: 5px; font-size: 10px; }
  /* Phones: the comparison scrolls sideways, one image per screen. */
  #s09 .s09-triptych {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: 78%;
    gap: 14px;
    padding: 28px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
  }
  #s09 .s09-shot { scroll-snap-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  #s09 .s09-steps li::before { transition: none; }
}
