/* Tight, light editorial layout with motion kept progressively enhanced. */
.hero {
  min-height: 100svh;
  align-items: flex-end;
  padding: 90px 6vw 38px;
}

.hero h1 {
  margin: 0;
  display: grid;
  gap: .02em;
  font-size: clamp(62px, 10vw, 158px);
  line-height: .72;
  letter-spacing: -.085em;
}

.hero h1 span,
.hero h1 em { display: block; }

.hero-bottom {
  left: 6vw;
  right: 6vw;
  bottom: 38px;
  align-items: flex-end;
  justify-content: space-between;
}

.hero-bottom p {
  margin: 0;
  margin-left: auto;
  text-align: right;
  color: #171817;
  font-size: clamp(30px, 3.35vw, 58px);
  line-height: .76;
  font-weight: 800;
  letter-spacing: -.08em;
}

.hero-bottom p em { color: var(--hot); }

.ticker { height: auto; min-height: 68px; }
.ticker div { font-size: clamp(13px, 1.3vw, 20px); letter-spacing: .035em; }

.about {
  padding-top: 12vh;
  padding-bottom: 12vh;
}

.work-head {
  min-height: auto;
  padding: clamp(90px, 13vh, 180px) 8vw clamp(75px, 11vh, 140px);
  gap: 24px;
  justify-content: flex-start;
}

.work-head h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(49px, 7.1vw, 120px);
  line-height: .78;
}

.project-list { padding-top: 0 !important; padding-bottom: 10vh !important; }

.project-list .project {
  position: relative !important;
  top: auto !important;
  min-height: clamp(300px, 40vw, 560px);
  margin-bottom: 34px !important;
  transform: none !important;
  opacity: 1 !important;
  will-change: auto;
}

.project-list .project:last-child { margin-bottom: 0 !important; }

.project-title { position: relative; z-index: 3; }
.project-type, .project-number, .project-open { position: relative; z-index: 3; }

.case {
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Keep the chapter title tight to its video; details live in the photo section below. */
.case-top {
  min-height: 0;
  padding: 92px 7vw 38px;
}

.case-top h3 { margin: 18px 0 0; }

.case-gallery {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(420px, 1.2fr);
  gap: clamp(32px, 6vw, 110px);
  align-items: center;
  padding: clamp(52px, 8vw, 130px) 7vw;
  background: #fbfaf6;
}

.case-top .case-description,
.case-top .case-meta { display: none; }

.gallery-copy { align-self: center; }
.gallery-copy .label { margin: 0 0 24px; }
.gallery-copy p { margin: 0; max-width: 18ch; font-size: clamp(22px, 2.2vw, 38px); line-height: 1.06; font-weight: 600; }
.gallery-copy small { display: block; margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(23,24,23,.2); font: 500 10px/1.5 "DM Mono", monospace; letter-spacing: .1em; color: #171817; }

.gallery-shuffle {
  position: relative;
  min-height: inherit;
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(23,24,23,.2);
  background: #e9e6de;
}

.gallery-shuffle {
  display: grid;
  place-items: center;
  overflow: visible;
  perspective: 1400px;
}

.case-photo-cube {
  --case-cube-size: min(30vw, 410px);
  width: var(--case-cube-size);
  height: var(--case-cube-size);
  position: relative;
  transform: rotateX(-9deg) rotateY(-28deg);
  transform-style: preserve-3d;
}

.case-cube-face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border: 1px solid rgba(239,239,233,.82);
  background: #101011;
  box-shadow: 0 0 0 1px rgba(0,0,0,.24);
  backface-visibility: hidden;
}
.case-cube-face img { width: 100%; height: 100%; display: block; object-fit: cover; }
.case-cube-front { transform: translateZ(calc(var(--case-cube-size) / 2)); }
.case-cube-right { transform: rotateY(90deg) translateZ(calc(var(--case-cube-size) / 2)); }
.case-cube-back { transform: rotateY(180deg) translateZ(calc(var(--case-cube-size) / 2)); }
.case-cube-left { transform: rotateY(-90deg) translateZ(calc(var(--case-cube-size) / 2)); }
.gallery-shuffle.is-rotating .case-photo-cube { animation: case-cube-turn 1s cubic-bezier(.22,.8,.2,1) both; }

@keyframes case-cube-turn {
  from { transform: rotateX(-9deg) rotateY(-28deg); }
  58% { transform: rotateX(7deg) rotateY(-205deg) scale(1.04); }
  to { transform: rotateX(-9deg) rotateY(-388deg); }
}

.gallery-shuffle-head {
  position: absolute;
  z-index: 8;
  top: 18px;
  left: 18px;
  right: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #fbfaf6;
  font: 500 10px/1.2 "DM Mono", monospace;
  letter-spacing: .1em;
  mix-blend-mode: difference;
}

.shuffle-frames {
  border: 1px solid currentColor;
  padding: 9px 10px;
  background: rgba(251,250,246,.1);
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  cursor: pointer;
}

.shuffle-card {
  position: absolute;
  margin: 0 !important;
  grid-column: auto !important;
  aspect-ratio: auto !important;
  width: 68%;
  height: 76%;
  overflow: hidden;
  border: 1px solid rgba(251,250,246,.8);
  background: #171817;
  box-shadow: 18px 20px 0 rgba(23,24,23,.2);
  transition: transform .68s cubic-bezier(.22,.8,.2,1), opacity .45s ease;
  will-change: transform;
}

.gallery-shuffle .shuffle-card:nth-of-type(2) { top: 7%; left: 8%; transform: rotate(-7deg) !important; z-index: 1; }
.gallery-shuffle .shuffle-card:nth-of-type(3) { top: 13%; right: 8%; transform: rotate(6deg) !important; z-index: 2; }
.gallery-shuffle .shuffle-card:nth-of-type(4) { bottom: 6%; left: 15%; transform: rotate(-2deg) !important; z-index: 3; }
.gallery-shuffle .shuffle-card:nth-of-type(5) { top: 5%; right: 15%; transform: rotate(10deg) !important; z-index: 4; }
.shuffle-card img { width: 100%; height: 100%; object-fit: cover; display: block; }

.gallery-shuffle.is-shuffling .shuffle-card:nth-of-type(2) { animation: case-card-one .72s cubic-bezier(.22,.8,.2,1) both; }
.gallery-shuffle.is-shuffling .shuffle-card:nth-of-type(3) { animation: case-card-two .72s .05s cubic-bezier(.22,.8,.2,1) both; }
.gallery-shuffle.is-shuffling .shuffle-card:nth-of-type(4) { animation: case-card-three .72s .1s cubic-bezier(.22,.8,.2,1) both; }
.gallery-shuffle.is-shuffling .shuffle-card:nth-of-type(5) { animation: case-card-four .72s .15s cubic-bezier(.22,.8,.2,1) both; }

@keyframes case-card-one { 45% { transform: translate(72%, 18%) rotate(20deg) scale(1.04); } }
@keyframes case-card-two { 45% { transform: translate(-78%, -8%) rotate(-18deg) scale(1.05); } }
@keyframes case-card-three { 45% { transform: translate(42%, -38%) rotate(12deg) scale(1.06); } }
@keyframes case-card-four { 45% { transform: translate(-32%, 40%) rotate(-17deg) scale(1.04); } }

.case-end { min-height: 42px; height: auto; padding: 12px 7vw; font-size: 10px; letter-spacing: .12em; }

@media (max-width: 700px) {
  .hero { min-height: 100svh; padding: 94px 22px 30px; }
  .hero h1 { font-size: 17vw; }
  .hero-bottom { left: 22px; right: 22px; bottom: 30px; }
  .hero-bottom p { font-size: 38px; }
  .about { padding-top: 80px; padding-bottom: 80px; }
  .work-head { padding: 92px 22px 70px; }
  .work-head h2 { font-size: 14.3vw; }
  .project-list { padding-bottom: 60px !important; }
  .project-list .project { min-height: 390px; margin-bottom: 34px !important; }
  .case-gallery { grid-template-columns: 1fr; gap: 36px; padding: 70px 22px; }
  .gallery-copy p { max-width: 25ch; font-size: 25px; }
  .gallery-shuffle { min-height: 105vw; }
  .case-photo-cube { --case-cube-size: 56vw; }
  .shuffle-card { width: 72%; height: 78%; }
  .case-end { padding: 11px 22px; }
  .case-top { min-height: 0; padding: 82px 28px 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .shuffle-card, .gallery-shuffle.is-shuffling .shuffle-card { animation: none !important; transition: none; }
  .gallery-shuffle.is-rotating .case-photo-cube { animation: none; }
}
