/* ==========================================================================
   Universes: readable, editorial territory. Motion is reduced here on
   purpose: this is where the viewer inspects the work.
   ========================================================================== */

.universe {
  position: relative;
  z-index: 1;
  background: var(--paper);
  color: var(--ink);
}

/* --- Universe head ----------------------------------------------------- */

.universe-head {
  padding-top: clamp(72px, 13vh, 160px);
  padding-bottom: clamp(56px, 9vh, 112px);
  row-gap: 28px;
  align-items: start;
}
.universe-head .label { grid-column: 1 / span 3; color: var(--grey); }
.universe-title {
  grid-column: 1 / -1;
  font-size: var(--fs-h2);
  font-weight: 600;
  font-stretch: 62%;
  line-height: 0.8;
  text-transform: uppercase;
}
.is-cinematic .universe-title {
  position: absolute !important;
  width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%);
}
.universe-lede {
  grid-column: 5 / span 7;
  font-size: var(--fs-lead);
  line-height: 1.18;
  letter-spacing: -0.015em;
  font-stretch: 94%;
}
.universe-toc {
  grid-column: 5 / span 8;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: var(--fs-small);
}
.universe-toc a { display: inline-flex; gap: 8px; }
.universe-toc a span { color: var(--grey); font-size: var(--fs-label); letter-spacing: 0.08em; }
.universe-toc a:hover { color: var(--klein); }

/* --- Constellation: marks existing in depth ---------------------------- */

.constellation { position: relative; height: 230vh; }

.constellation__viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  overflow: hidden;
  perspective: 1000px;
  perspective-origin: 50% 46%;
}

.constellation__space {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transform: translate3d(0, 0, var(--cz, -900px));
  will-change: transform;
}

.star {
  position: absolute;
  left: calc(50% + var(--x));
  top: calc(50% + var(--y));
  width: var(--w, 180px);
  transform: translate(-50%, -50%) translateZ(var(--z));
  opacity: var(--o, 1);
}
.star img { width: 100%; height: auto; }
.star--photo img { box-shadow: 0 30px 60px -30px rgb(19 19 18 / 0.35); }
.star figcaption {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--grey);
}

.constellation__statement {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: var(--margin);
  pointer-events: none;
}
.constellation__statement p {
  max-width: 17ch;
  text-align: center;
  font-size: clamp(30px, 4vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.02em;
  font-stretch: 82%;
  font-weight: 500;
}
.constellation__statement em { font-weight: 300; letter-spacing: -0.01em; }

/* --- Case: hero ------------------------------------------------------- */

.case { padding-block: clamp(72px, 12vh, 150px) clamp(40px, 6vh, 80px); }

.case-head { row-gap: 18px; align-items: end; padding-bottom: clamp(40px, 7vh, 88px); }
.case-kicker { grid-column: 1 / -1; display: flex; gap: 16px; color: var(--grey); }
.case-kicker b { font-weight: 500; color: var(--klein); }
.case-title {
  grid-column: 1 / span 8;
  font-size: var(--fs-h3);
  font-weight: 600;
  font-stretch: 68%;
  line-height: 0.84;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
.case-tagline {
  grid-column: 1 / span 7;
  font-size: clamp(26px, 2.8vw, 46px);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.case-meta {
  grid-column: 9 / -1;
  grid-row: 2 / span 2;
  align-self: end;
  display: grid;
  gap: 0;
  font-size: var(--fs-small);
}
.case-meta div {
  display: grid;
  grid-template-columns: 7em 1fr;
  gap: 12px;
  padding-block: 10px;
  border-top: 1px solid var(--line);
}
.case-meta dt { color: var(--grey); }

.case-intro {
  grid-column: 1 / span 5;
  font-size: var(--fs-lead);
  line-height: 1.2;
  letter-spacing: -0.012em;
  font-stretch: 94%;
}

.case-text { row-gap: 32px; padding-block: clamp(48px, 9vh, 120px); }
.case-text > div { grid-column: span 4; }
.case-text > div:first-of-type { grid-column: 5 / span 4; }
.case-text h4 { margin-bottom: 14px; color: var(--grey); }
.case-text p { max-width: 38ch; color: var(--ink-2); }

/* --- Media ------------------------------------------------------------ */

.media {
  position: relative;
  min-width: 0;
}
.media__frame {
  position: relative;
  overflow: hidden;
  background: var(--paper-2);
}
.media img,
.media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.media figcaption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  color: var(--grey);
}

.film { grid-column: 3 / -1; }
.film .media__frame { aspect-ratio: 4 / 3; max-height: 86svh; }
.film-toggle {
  position: absolute;
  right: 14px;
  bottom: 14px;
  padding: 9px 12px;
  background: rgb(238 235 228 / 0.88);
  color: var(--ink);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* --- Gallery ---------------------------------------------------------- */

.gallery {
  row-gap: clamp(20px, 3vw, 44px);
  align-items: end;
}
.gallery-label {
  grid-column: 1 / -1;
  display: flex;
  gap: 20px;
  padding-top: 16px;
  margin-top: clamp(40px, 8vh, 100px);
  border-top: 1px solid var(--line);
  color: var(--grey);
}
.gallery-label:first-child { margin-top: 0; }
.gallery-label b { font-weight: 500; color: var(--ink); }

.g-12 { grid-column: 1 / -1; }
.g-12 .media__frame { max-height: 92svh; }
.g-3 { grid-column: span 3; }
.g-4 { grid-column: span 4; }
.g-8 { grid-column: span 8; }
.g-5 { grid-column: span 5; }
.g-5o { grid-column: 2 / span 5; }
.g-6o { grid-column: 7 / span 6; }
.g-8o { grid-column: 3 / span 8; }

/* --- Supporting projects --------------------------------------------- */

.supporting { padding-block: clamp(64px, 10vh, 130px); }
.supporting > .label { padding-inline: var(--margin); color: var(--grey); margin-bottom: clamp(28px, 4vh, 48px); display: block; }

.support { row-gap: 20px; align-items: end; padding-block: clamp(24px, 4vh, 48px); }
.support .media { grid-column: 1 / span 8; }
.support__text { grid-column: 9 / span 4; padding-bottom: 36px; }
.support--flip .media { grid-column: 5 / span 8; grid-row: 1; }
.support--flip .support__text { grid-column: 1 / span 4; grid-row: 1; }
.support__text .label { color: var(--grey); margin-bottom: 16px; }
.support__text h3 {
  font-size: clamp(34px, 3.6vw, 60px);
  font-weight: 600;
  font-stretch: 70%;
  line-height: 0.9;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.support__text p { color: var(--ink-2); max-width: 34ch; }

/* --- Visual proof ---------------------------------------------------- */

.proof { padding-block: clamp(48px, 8vh, 110px); row-gap: 24px; }
.proof > .label { grid-column: 1 / -1; color: var(--grey); padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.proof-list { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--gutter); }
.proof-list .media__frame { aspect-ratio: 4 / 3; }
.proof-list figcaption { display: block; }
.proof-list figcaption b { display: block; color: var(--ink); font-weight: 500; font-size: var(--fs-small); letter-spacing: 0; text-transform: none; margin-bottom: 2px; }

/* --- Next universe --------------------------------------------------- */

.next-universe {
  margin: clamp(40px, 8vh, 100px) var(--margin) 0;
  padding-block: clamp(40px, 8vh, 96px) clamp(80px, 14vh, 180px);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
.next-universe .label { grid-column: 1 / -1; color: var(--grey); }
.next-universe__title {
  font-size: var(--fs-h3);
  font-weight: 600;
  font-stretch: 62%;
  line-height: 0.82;
  text-transform: uppercase;
  color: var(--paper-3);
}
.next-universe__title span { color: var(--grey); }
.next-universe p { max-width: 28ch; color: var(--grey); font-size: var(--fs-small); }

/* --- Index ----------------------------------------------------------- */

.index { background: var(--paper-2); padding-block: clamp(72px, 12vh, 150px); row-gap: 36px; }
.index h2 {
  grid-column: 1 / span 4;
  font-size: clamp(48px, 6vw, 104px);
  font-weight: 600;
  font-stretch: 62%;
  line-height: 0.8;
  text-transform: uppercase;
}
.index-list { grid-column: 5 / -1; }
.index-row {
  display: grid;
  grid-template-columns: 3em minmax(0, 1.3fr) minmax(0, 2fr);
  gap: var(--gutter);
  padding-block: 18px;
  border-top: 1px solid var(--line);
}
.index-row:last-child { border-bottom: 1px solid var(--line); }
.index-row__num { color: var(--grey); padding-top: 4px; }
.index-row__name { font-size: clamp(22px, 2vw, 32px); font-stretch: 80%; font-weight: 500; line-height: 1; letter-spacing: -0.01em; }
.index-row__name small { display: block; margin-top: 8px; color: var(--grey); }
.index-row__projects { font-size: var(--fs-small); color: var(--ink-2); line-height: 1.6; }
.index-row__projects a { border-bottom: 1px solid var(--line); }
.index-row__projects a:hover { color: var(--klein); border-color: currentColor; }
.index-row[data-state="soon"] .index-row__name { color: var(--grey); }

/* --- About ----------------------------------------------------------- */

.about { padding-block: clamp(80px, 14vh, 170px); row-gap: 32px; }
.about > .label { grid-column: 1 / span 3; color: var(--grey); }
.about__statement {
  grid-column: 4 / span 8;
  font-size: clamp(28px, 3.2vw, 54px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-stretch: 88%;
}
.about__body { grid-column: 4 / span 4; color: var(--ink-2); display: grid; gap: 18px; }
.about__disciplines { grid-column: 9 / span 4; font-size: var(--fs-small); }
.about__disciplines li { padding-block: 10px; border-top: 1px solid var(--line); }

/* --- Contact (the one Klein moment) ---------------------------------- */

.site-footer {
  background: var(--klein);
  color: #f3f1ec;
  padding: clamp(40px, 7vh, 80px) var(--margin) 28px;
}
.site-footer .label { opacity: 0.75; }
.contact-title {
  display: block;
  margin-block: clamp(36px, 7vh, 90px) clamp(40px, 8vh, 100px);
  font-size: clamp(56px, 11vw, 200px);
  font-weight: 600;
  font-stretch: 62%;
  line-height: 0.8;
  text-transform: uppercase;
}
.contact-title em { text-transform: none; font-weight: 300; font-stretch: 100%; }
.contact-title:hover { color: #fff; }
.footer-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px 32px;
  padding-top: 18px;
  border-top: 1px solid rgb(243 241 236 / 0.3);
  font-size: var(--fs-small);
}
.footer-row a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* --- Reveal (JS-enabled only; content is visible without JS) ---------- */

.reveal-ready [data-reveal] {
  transition: opacity 1s var(--ease-out), transform 1.2s var(--ease-out);
}
.reveal-ready [data-reveal]:not(.is-revealed) { opacity: 0; transform: translate3d(0, 28px, 0); }

.reveal-ready .media[data-reveal] { transform: none; opacity: 1; }
.reveal-ready .media[data-reveal] .media__frame {
  clip-path: inset(0 0 0 0);
  transition: clip-path 1.3s var(--ease-out);
}
.reveal-ready .media[data-reveal] .media__frame > :is(img, video) {
  transition: transform 1.6s var(--ease-out);
}
.reveal-ready .media[data-reveal]:not(.is-revealed) .media__frame { clip-path: inset(100% 0 0 0); }
.reveal-ready .media[data-reveal]:not(.is-revealed) .media__frame > :is(img, video) { transform: scale(1.08); }

/* --- Static (reduced motion) ----------------------------------------- */

.is-static .constellation { height: auto; padding-block: 64px; }
.is-static .constellation__viewport { position: relative; height: auto; overflow: visible; perspective: none; }
.is-static .constellation__space {
  position: relative;
  transform: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 40px var(--gutter);
  align-items: center;
  padding-inline: var(--margin);
}
.is-static .star { position: static; transform: none; width: auto; opacity: 1; }
.is-static .constellation__statement { position: relative; padding-bottom: 48px; }
.no-js .constellation { height: auto; }
.no-js .constellation__viewport { position: relative; height: auto; }
.no-js .constellation__space { position: relative; transform: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 40px; padding: var(--margin); }
.no-js .star { position: static; transform: none; width: auto; }
.no-js .constellation__statement { position: relative; }

/* --- Responsive ------------------------------------------------------ */

@media (max-width: 1000px) {
  .universe-lede, .universe-toc { grid-column: 1 / -1; }
  .case-title, .case-tagline, .case-intro { grid-column: 1 / -1; }
  .case-meta { grid-column: 1 / -1; grid-row: auto; }
  .case-text > div, .case-text > div:first-of-type { grid-column: 1 / -1; }
  .film { grid-column: 1 / -1; }
  .g-3 { grid-column: span 6; }
  .g-4 { grid-column: span 6; }
  .g-4:last-child { grid-column: 1 / -1; }
  .g-8, .g-5, .g-5o, .g-6o, .g-8o { grid-column: 1 / -1; }
  .support .media, .support--flip .media { grid-column: 1 / -1; grid-row: auto; }
  .support__text, .support--flip .support__text { grid-column: 1 / -1; grid-row: auto; padding-bottom: 0; }
  .proof-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .index h2, .index-list { grid-column: 1 / -1; }
  .about > .label, .about__statement, .about__body, .about__disciplines { grid-column: 1 / -1; }
  .next-universe { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .index-row { grid-template-columns: 2.2em 1fr; }
  .index-row__projects { grid-column: 2; }
  .constellation { height: 200vh; }
}
