/* Shared motion direction: a quiet entrance, then depth tied to native scrolling. */
:root { --story-ease: cubic-bezier(.16,1,.3,1); }
.project-image { border-radius: 10px; }
.project-info { position: relative; z-index: 1; }
[data-reveal].is-awaiting { opacity: 0; transform: translate3d(0,20px,0); }
[data-reveal="media"].is-awaiting { clip-path: inset(0 0 10% 0 round 10px); }
[data-reveal].is-revealing { animation: story-arrive .95s var(--story-ease) var(--reveal-delay,0s) backwards; }
[data-reveal="media"].is-revealing { animation-name: story-media-arrive; animation-duration: 1.1s; }
[data-reveal]:focus-within { opacity: 1; transform: none; clip-path: none; }
@keyframes story-arrive { from { opacity: 0; transform: translate3d(0,20px,0); } to { opacity: 1; transform: none; } }
@keyframes story-media-arrive { from { opacity: 0; transform: translate3d(0,24px,0); clip-path: inset(0 0 10% 0 round 10px); } to { opacity: 1; transform: none; clip-path: inset(0 round 10px); } }
[data-depth] { --media-y: 0px; --media-scale: 1; }
.project-image[data-depth] > img,
.case-image [data-depth] > img,
.about-photo[data-depth] > img,
.next-project [data-depth] > img {
  transform: translate3d(0,var(--media-y),0) scale(var(--media-scale));
  transform-origin: 50% 50%;
  transition: none;
}
.project:hover .project-image[data-depth] > img { transform: translate3d(0,var(--media-y),0) scale(var(--media-scale)); }
.case-image .inspect-image { border-radius: 10px; overflow: hidden; }

/* A project's lead image and supporting detail move independently. */
.project-stage {
  --scene-p: .5;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 360px;
  padding: clamp(38px,6vw,90px) 12% clamp(70px,8vw,120px) 5%;
  background: radial-gradient(ellipse at 65% 35%,#ddac7312,transparent 60%),#10120f;
  border-block: 1px solid #ffffff12;
}
.project-stage-main { position: relative; width: 94%; z-index: 2; }
.project-stage-main .inspect-image { display: block; }
.case-hero .project-stage-main img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 68svh;
  object-fit: contain;
  background: transparent;
  border-radius: 9px;
  box-shadow: 0 24px 65px #0007;
}
.project-stage-detail {
  position: absolute;
  z-index: 3;
  right: 5%;
  bottom: 28px;
  width: clamp(125px,17vw,230px);
  padding: 6px;
  border: 1px solid #ffffff24;
  border-radius: 9px;
  background: #1a1c18;
  box-shadow: 0 18px 48px #0009;
  pointer-events: none;
}
.case-hero .project-stage-detail img { width: 100%; height: auto; max-height: 240px; object-fit: contain; background: #efede7; border-radius: 5px; box-shadow: none; }
.project-stage-detail > span { display: block; font-size: 9px; line-height: 1.4; padding: 9px 5px 4px; color: #c9bfb0; letter-spacing: .65px; }
.project-stage-detail.detail-landscape { width: clamp(150px,22vw,295px); }
.case-hero .project-stage-detail.detail-landscape img { max-height: 210px; background: #080a08; }
.case-hero .project-stage-detail.detail-badge img { aspect-ratio: .68; max-height: 260px; object-fit: cover; object-position: 82% 50%; }
.project-stage-light { position: absolute; inset: -40%; z-index: 4; pointer-events: none; background: linear-gradient(110deg,transparent 42%,#fff2ce06 49%,transparent 56%); }
.scene-active .project-stage-main { transform: translate3d(0,calc((.5 - var(--scene-p)) * 24px),0) rotate(calc((var(--scene-p) - .5) * .7deg)); }
.scene-active .project-stage-detail { transform: translate3d(0,calc((var(--scene-p) - .5) * 46px),0) rotate(calc(-4deg + var(--scene-p) * 6deg)); }
.scene-active .project-stage-light { transform: translate3d(calc((var(--scene-p) - .5) * 16%),0,0); }

/* The existing print-minded statement becomes a three-part visual story. */
.design-story {
  position: relative;
  isolation: isolate;
  border-block: 1px solid #ffffff12;
  background: radial-gradient(ellipse at 76% 32%,#c77b3d0d,transparent 60%),#121410;
}
.story-sticky { max-width: 1680px; margin: auto; padding: 64px 5%; }
.story-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 30px; padding-bottom: 38px; border-bottom: 1px solid #ffffff14; }
.story-heading > .eyebrow { color: #d09573; padding-top: 9px; }
.story-heading h2 { font-size: clamp(30px,3vw,45px); line-height: 1.12; letter-spacing: -.035em; }
.story-heading em { color: #dfb18d; }
.story-panel { display: grid; grid-template-columns: .8fr 1.2fr; gap: 6%; align-items: center; padding: 54px 0; }
.story-panel + .story-panel { border-top: 1px solid #ffffff12; }
.story-copy > .eyebrow { color: #c8aa91; font-size: 10px; letter-spacing: 1.5px; }
.story-copy h3 { font-size: clamp(36px,4.1vw,62px); line-height: 1.04; letter-spacing: -.045em; margin: 20px 0; max-width: 9ch; }
.story-copy p { color: #c1bcb2; font-size: 17px; line-height: 1.65; max-width: 30ch; }
.story-label { display: inline-block; color: #d89a74; font-size: 11px; letter-spacing: .7px; border-top: 1px solid #ffffff20; margin-top: 32px; padding-top: 15px; }
.story-visual { position: relative; isolation: isolate; padding: 20px 10% 60px 0; }
.story-primary { position: relative; z-index: 1; width: 100%; aspect-ratio: 1.65; background: #1e211d; border-radius: 10px; overflow: hidden; border: 1px solid #ffffff24; box-shadow: 0 24px 60px #0008; }
.story-primary img { width: 100%; height: 100%; object-fit: contain; }
.story-detail { position: absolute; z-index: 2; right: 0; bottom: 12px; width: 23%; padding: 4px; border-radius: 7px; background: #282a24; border: 1px solid #ffffff24; box-shadow: 0 15px 35px #0008; }
.story-detail img { display: block; width: 100%; height: auto; max-height: 185px; object-fit: contain; border-radius: 3px; background: #111; }
.story-halo { position: absolute; inset: -30%; z-index: -1; background: radial-gradient(ellipse,#e8ba8710,transparent 65%); pointer-events: none; }
.story-progress { display: none; }
.design-story.story-enhanced { height: 190svh; max-height: 1900px; min-height: 1140px; }
.story-enhanced .story-sticky { position: sticky; top: 0; height: min(100svh,920px); min-height: 580px; display: flex; flex-direction: column; justify-content: center; padding-block: 40px; }
.story-enhanced .story-panels { position: relative; flex: 1 1 auto; min-height: 330px; max-height: 520px; }
.story-enhanced .story-panel { position: absolute; inset: 0; padding: 30px 0; border: 0; opacity: var(--chapter-opacity,0); pointer-events: none; transform: translate3d(0,var(--chapter-y,0px),0); }
.story-enhanced .story-panel:first-child { --chapter-opacity: 1; }
.story-enhanced .story-visual { transform: translate3d(var(--chapter-x,0px),0,0); }
.story-enhanced .story-detail { transform: translate3d(0,var(--detail-y,0px),0) rotate(var(--detail-rotate,0deg)); }
.story-enhanced .story-progress { display: flex; gap: 8px; padding-top: 14px; }
.story-progress > span { width: 52px; height: 2px; background: #ffffff20; position: relative; }
.story-progress > span::after { content: ""; position: absolute; inset: 0; background: #dc926a; transform: scaleX(var(--step-fill,0)); transform-origin: left; }

@media (max-width: 760px) {
  [data-reveal].is-awaiting { transform: translate3d(0,14px,0); }
  .story-sticky { padding: 40px 5% 10px; }
  .story-heading { display: block; padding-bottom: 26px; }
  .story-heading h2 { font-size: 31px; margin-top: 20px; }
  .story-panel { grid-template-columns: 1fr; gap: 22px; padding: 36px 0 44px; }
  .story-copy h3 { max-width: none; font-size: 38px; margin: 15px 0; }
  .story-copy p { font-size: 16px; max-width: 34ch; }
  .story-label { margin-top: 18px; padding-top: 12px; }
  .story-visual { padding-top: 0; padding-bottom: 42px; }
  .story-detail { width: 24%; bottom: 0; }
  .project-stage { min-height: 0; padding: 30px 8% 74px 5%; }
  .project-stage-main { width: 100%; }
  .project-stage-detail { width: 26%; right: 5%; bottom: 15px; padding: 3px; }
  .project-stage-detail.detail-landscape { width: 34%; }
  .case-hero .project-stage-detail img { max-height: 125px; }
  .case-hero .project-stage-detail.detail-badge img { max-height: 125px; }
  .project-stage-detail > span { font-size: 7px; padding: 5px 2px 2px; }
  .scene-active .project-stage-main { transform: translate3d(0,calc((.5 - var(--scene-p)) * 10px),0); }
  .scene-active .project-stage-detail { transform: translate3d(0,calc((var(--scene-p) - .5) * 18px),0) rotate(calc(-2deg + var(--scene-p) * 3deg)); }
}
@media (prefers-reduced-motion: reduce), print {
  [data-reveal].is-awaiting, [data-reveal].is-revealing { opacity: 1 !important; transform: none !important; clip-path: none !important; animation: none !important; }
  [data-depth] img, .scene-active .project-stage-main, .scene-active .project-stage-detail, .scene-active .project-stage-light { transform: none !important; }
}
