/* ARTVERSE · work.css · /work only (loaded after site.css)

   Patterns used only here:
   .work-hero      giant thin WORK on Studio Mist, a framed photo standing in front of it, chapter index
   .w-chapter      one gallery chapter (section-head + gallery + .w-foot)
   .w-fig          a gallery figure; .w-zoom is the link that opens it in the lightbox (work.js)
   .jrow           justified row: every figure in a row gets the same height. Each figure carries its
                   aspect ratio as --r (classes .r-11 .r-23 .r-34 .r-45 .r-32 .r-916 .r-169) and its width
                   grows in proportion to it. Below 640px rows wrap, two portraits to a line.
   .w-lightbox     the <dialog> work.js builds (theme-dark). */

.page-work {
  --w-gap: clamp(12px, 1.6vw, 24px);
  --w-row-gap: clamp(1.75rem, 3vw, 2.75rem);
}
.grain > .wrap { position: relative; z-index: 2; }

/* Hero ------------------------------------------------------------------------- */
.work-hero {
  --wh-giant: clamp(6.25rem, 22vw, 25rem);
  padding-bottom: clamp(3rem, 5vw, 4.5rem);
  background:
    radial-gradient(60% 55% at 50% 62%, rgba(244, 244, 243, .9) 0%, rgba(244, 244, 243, 0) 70%),
    linear-gradient(180deg, rgba(139, 142, 146, 0) 0, rgba(139, 142, 146, .1) 80px, rgba(139, 142, 146, .34) 24%, rgba(139, 142, 146, .12) 45%, rgba(139, 142, 146, 0) 64%),
    var(--mist);
}
.work-hero__giant {
  font-size: var(--wh-giant);
  line-height: .8;
  letter-spacing: .08em;
  margin: 0 -.08em 0 0;
  text-shadow: 0 0 .03em rgba(255, 255, 255, .95), 0 0 .12em rgba(255, 255, 255, .7), 0 0 .3em rgba(255, 255, 255, .45);
}
.work-hero__inner {
  --wh-media: clamp(15rem, 25.5vw, 24rem);
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--wh-media) minmax(0, 1.12fr);
  gap: 2.5rem clamp(2rem, 4.5vw, 5rem);
  align-items: end;
}
.work-hero__copy { grid-column: 1; grid-row: 1; display: grid; gap: 1.5rem; justify-items: start; padding-bottom: 2.6rem; }
.work-hero__copy .lede { color: var(--graphite); max-width: 34ch; }
.work-hero__media {
  grid-column: 2;
  grid-row: 1;
  margin-top: calc(-.3 * var(--wh-giant));
  --offset: 14px;
}
.work-hero__media .frame img { object-position: 50% 30%; }
.work-hero__media figcaption { margin-top: calc(var(--offset) + .2rem); color: var(--graphite); }
.work-index { grid-column: 3; grid-row: 1; padding-bottom: 2.6rem; }

.work-index__list { border-top: 1px solid var(--black); }
.work-index__list a {
  position: relative;
  display: grid;
  gap: .1rem;
  padding: .7rem 2rem .75rem 0;
  border-bottom: 1px solid var(--rule-on-light);
  text-decoration: none;
  transition: padding .4s var(--ease);
}
.work-index__list a::after {
  content: "";
  position: absolute;
  right: .25rem;
  top: 50%;
  width: .7rem;
  height: 1.5rem;
  margin-top: -.75rem;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 28' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M5 0v27M.5 22.5 5 27l4.5-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 28' fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M5 0v27M.5 22.5 5 27l4.5-4.5'/%3E%3C/svg%3E") center / contain no-repeat;
  opacity: .55;
  transition: transform .4s var(--ease), opacity .4s var(--ease);
}
.work-index__list a:hover { padding-left: .6rem; }
.work-index__list a:hover::after { transform: translateY(4px); opacity: 1; }
.work-index__name { font-family: var(--f-display); font-size: clamp(1.0625rem, 1.3vw, 1.3125rem); line-height: 1.2; }
.work-index__cn { font-size: .875rem; line-height: 1.5; color: var(--graphite); letter-spacing: .06em; }

@media (min-width: 900px) and (max-width: 1199.98px) {
  .work-hero__inner { grid-template-columns: minmax(0, 1fr) var(--wh-media); }
  .work-hero__copy { padding-bottom: 0; }
  .work-index { grid-column: 1 / -1; grid-row: 2; padding-bottom: 0; }
  .work-index__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--w-gap); }
}
@media (max-width: 899.98px) {
  .work-hero { --wh-giant: clamp(5.75rem, 26vw, 12rem); }
  .work-hero__giant { margin-bottom: calc(-.16 * var(--wh-giant)); }
  .work-hero__inner { grid-template-columns: 1fr; gap: 2.75rem; }
  .work-hero__inner > * { grid-column: 1; grid-row: auto; padding-bottom: 0; }
  .work-hero__media {
    order: -1;
    justify-self: center;
    width: min(100% - 28px, 15.5rem);
    margin-top: 0;
    margin-right: 14px;
  }
  .work-hero__copy .lede { max-width: 40ch; }
}
@media (min-width: 560px) and (max-width: 899.98px) {
  .work-index__list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--w-gap); }
}

/* Chapters ------------------------------------------------------------------------ */
.w-fig { min-width: 0; }
.w-fig figcaption { padding-top: .1rem; }
.w-zoom { display: block; color: inherit; }
.w-zoom > img { transition: opacity .5s var(--ease); }
.w-zoom::after {
  /* the brand's corner expand mark: shows this frame opens larger */
  content: "";
  position: absolute;
  z-index: 1;
  right: 12px;
  bottom: 12px;
  width: 18px;
  height: 18px;
  background: var(--white);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M2 2l6 6M20 2l-6 6M2 20l6-6M20 20l-6-6M2 2h5M2 2v5M20 2h-5M20 2v5M2 20h5M2 20v-5M20 20h-5M20 20v-5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 22' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M2 2l6 6M20 2l-6 6M2 20l6-6M20 20l-6-6M2 2h5M2 2v5M20 2h-5M20 2v5M2 20h5M2 20v-5M20 20h-5M20 20v-5'/%3E%3C/svg%3E") center / contain no-repeat;
  filter: drop-shadow(0 0 2px rgba(17, 17, 18, .6));
  opacity: 0;
  transform: scale(.8);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.w-zoom:hover > img { opacity: .9; }
.w-zoom:hover::after, .w-zoom:focus-visible::after { opacity: 1; transform: none; }
@media (hover: none) { .w-zoom::after { opacity: .85; transform: none; } }

.w-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem 2.5rem;
  margin-top: clamp(2.75rem, 5vw, 4.5rem);
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.w-foot p { max-width: 56ch; color: var(--fg-muted); }
.w-foot__lockup { --lockup-size: clamp(1.375rem, 1.9vw, 1.625rem); }
.w-foot__division { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2.5rem; }
.w-foot__division p { max-width: 44ch; font-size: .9688rem; }
.w-foot__links { --cluster-gap: .5rem 2.25rem; }

/* Justified rows */
.r-11 { --r: 1; }
.r-23 { --r: .6667; }
.r-34 { --r: .75; }
.r-45 { --r: .8; }
.r-32 { --r: 1.5; }
.r-916 { --r: .5625; }
.r-169 { --r: 1.7778; }
.jrow {
  --jh: 6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--w-row-gap) var(--w-gap);
}
.jrow > .w-fig { flex: var(--r) 1 calc(var(--r) * var(--jh)); }
.jrow .frame { aspect-ratio: var(--r); }
.w-rows { display: grid; gap: var(--w-row-gap); }
@media (max-width: 639.98px) {
  /* Two portraits share a line, a landscape takes a line, and a portrait left on its own
     spans the full width, so no row ends with an empty column. */
  .jrow { --jh: calc((100vw - 2 * var(--gutter)) * .55); --w-gap: 12px; }
}

/* 01 Classes: the walk-class clip runs the full height of two rows */
.w-classes {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--w-row-gap) var(--w-gap);
  align-items: start;
}
.w-classes > * { grid-column: span 4; }
.w-classes__clip { grid-column: 1 / span 4; grid-row: 1 / span 2; align-self: stretch; grid-template-rows: minmax(0, 1fr) auto; }
.frame--fill { min-height: 0; }
.frame--fill > video, .frame--fill > img { position: absolute; inset: 0; }
@media (max-width: 639.98px) {
  .w-classes { grid-template-columns: repeat(2, minmax(0, 1fr)); --w-gap: 12px; }
  .w-classes > * { grid-column: span 1; }
  .w-classes__clip { grid-column: 1; grid-row: 1 / span 2; }
  .w-classes > :nth-child(n+4) { grid-column: 1 / -1; }
}

/* 02 Pageant note */
.w-note { display: flex; align-items: center; gap: 1.25rem 1.75rem; max-width: 46rem; }
.w-note p { color: var(--graphite); }
.w-note__ring { flex: none; --ring-size: 5.25rem; --ring-color: var(--black); font-size: .875rem; }
@media (max-width: 559.98px) {
  .w-note { flex-direction: column; align-items: flex-start; }
}

/* 04 On set & on the runway (dark) */
.w-onset__grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: 2rem clamp(1.5rem, 4vw, 4rem);
  align-items: end;
}
.w-onset__aside { display: grid; gap: 2rem; justify-items: start; align-self: stretch; align-content: space-between; }
.w-onset__word { font-size: clamp(3.5rem, 6.5vw, 6.5rem); letter-spacing: .14em; }
.w-onset__row { align-items: flex-start; }
.w-onset .frame { outline: 1px solid var(--rule-on-dark); }
.w-onset .tag-pair__en b { color: var(--white); } /* the RUNWAY spine is this section's Ember */
.w-onset .figure figcaption { font-size: .9375rem; } /* Concrete text stays at 15px or larger */
@media (min-width: 640px) {
  .w-onset__mid { margin-top: clamp(2rem, 6vw, 5rem); }
  .w-onset__row > :not(.w-onset__mid) { margin-bottom: clamp(2rem, 6vw, 5rem); }
}
@media (max-width: 899.98px) {
  .w-onset__grid { grid-template-columns: 1fr; }
  .w-onset__aside { order: 2; grid-template-columns: auto minmax(0, 1fr); align-items: end; }
  .w-onset__word { font-size: 3.25rem; }
}
@media (max-width: 639.98px) {
  /* Two columns: the two clips, then the directing still beside the RUNWAY spine. */
  .w-onset__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--w-row-gap) 12px; align-items: start; }
  .w-onset__row { display: contents; }
  .w-onset__row > .w-fig { max-width: none; }
  .w-onset__aside { order: 0; grid-column: 2; grid-row: 2; grid-template-columns: 1fr; align-self: stretch; align-content: space-between; gap: 1.5rem; }
  .w-onset__word { font-size: 2.75rem; }
}

/* 05 KLFW: giant thin 2026 glowing behind two frames */
.w-klfw__stage { position: relative; }
.w-klfw__giant {
  --kg: clamp(6.5rem, 27vw, 26rem);
  position: relative;
  z-index: 0;
  margin: 0 0 calc(-.42 * var(--kg));
  font-size: var(--kg);
  line-height: .8;
  letter-spacing: .1em;
  text-align: center;
  color: var(--white);
  text-shadow: 0 0 .03em rgba(255, 255, 255, .95), 0 0 .12em rgba(255, 255, 255, .7), 0 0 .3em rgba(255, 255, 255, .45);
  user-select: none;
  pointer-events: none;
  margin-right: -.1em;
}
.w-klfw__figs {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--w-gap);
  align-items: start;
}
.w-klfw__wall { grid-column: 2 / span 5; }
.w-klfw__klcc { grid-column: 8 / span 4; margin-top: clamp(4rem, 12vw, 11rem); }
.w-klfw figcaption { color: var(--graphite); }
@media (max-width: 639.98px) {
  .w-klfw__giant { margin-bottom: calc(-.3 * var(--kg)); }
  .w-klfw__figs { --w-gap: 12px; }
  .w-klfw__wall { grid-column: 1 / span 7; grid-row: 1; }
  .w-klfw__klcc { grid-column: 8 / span 5; grid-row: 1; margin-top: 7rem; }
}

/* 06 Founder campaign */
.w-series + .w-series { margin-top: clamp(3rem, 6vw, 5rem); }
.w-series > .jrow + .jrow { margin-top: var(--w-row-gap); }
.w-series__head {
  display: flex;
  align-items: baseline;
  gap: .4rem 1rem;
  margin-bottom: 1.25rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--rule-strong);
}
.w-series__head .eyebrow { font-size: .8125rem; }
.w-series__cn { font-size: 1rem; letter-spacing: .1em; color: var(--graphite); }
.w-campaign .frame { background: var(--gallery); outline: 1px solid var(--rule); outline-offset: -1px; }
/* The hairlines above are outlines too: restore the full focus ring on keyboard focus. */
.w-campaign .frame:focus-visible, .w-onset .frame:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Closing band: a framed editorial portrait (shared .cta-band--framed) */
.work-cta .cta-band__frame { max-width: 25rem; }
.work-cta .frame img { object-position: 50% 30%; }

/* Lightbox ------------------------------------------------------------------------- */
.w-lb-open { overflow: hidden; }
.w-lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--black);
  color: var(--white);
  overflow: hidden;
}
.w-lightbox::backdrop { background: rgba(17, 17, 18, .7); }
.w-lightbox[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.w-lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: var(--header-h);
  padding: .75rem var(--gutter);
  border-bottom: 1px solid var(--rule-on-dark);
}
.w-lightbox__count { font-family: var(--f-mono); font-size: .875rem; letter-spacing: .04em; color: var(--mist); }
.w-lightbox__count b { font-weight: 500; color: var(--white); }
.w-lightbox__num { white-space: nowrap; }
.w-lightbox__stage {
  min-height: 0;
  padding: clamp(1rem, 3vh, 2rem) calc(var(--gutter) + 52px + 1.5rem);
}
.w-lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .9rem;
  height: 100%;
  margin: 0;
}
.w-lightbox__img {
  flex: none;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: calc(100% - 2.75rem);
  object-fit: contain;
}
.w-lightbox__caption { font-family: var(--f-mono); font-size: .9375rem; line-height: 1.45; color: var(--mist); text-align: center; max-width: 60ch; }
.w-lightbox__controls {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--header-h);
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--gutter);
  pointer-events: none;
}
.w-lightbox__nav {
  pointer-events: auto;
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 1px solid var(--rule-strong);
  border-radius: 50%;
  background: transparent;
  color: var(--white);
  transition: background-color .3s var(--ease), color .3s var(--ease), border-color .3s var(--ease);
}
.w-lightbox__nav::before {
  content: "";
  width: 22px;
  height: 10px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 10' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M0 5h27M22.5 .5 27 5l-4.5 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 10' fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M0 5h27M22.5 .5 27 5l-4.5 4.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.w-lightbox__prev::before { transform: scaleX(-1); }
.w-lightbox__nav:hover { background: var(--white); color: var(--black); border-color: var(--white); }
.w-lightbox :focus-visible { outline: 2px solid var(--ember); outline-offset: 3px; }
@media (max-width: 639.98px) {
  .w-lightbox[open] { grid-template-rows: auto minmax(0, 1fr) auto; }
  .w-lightbox__stage { padding: 1rem 12px .5rem; }
  .w-lightbox__controls {
    position: static;
    justify-content: center;
    gap: 1.5rem;
    padding: .5rem var(--gutter) max(1rem, env(safe-area-inset-bottom));
  }
}
@media (prefers-reduced-motion: no-preference) {
  .w-lightbox__img.is-in { animation: av-fade-up .45s var(--ease) both; }
}

/* Bilingual copy ------------------------------------------------------------------
   English first, Chinese beside it (.zh-sub / .zh-p / .zh-i from site.css). Chinese measures
   are set in em: `ch` is narrow in the CJK face, so the English ch widths would squeeze it. */
.page-work .lede.zh-p { font-size: calc(var(--fs-lede) * .94); line-height: 1.8; max-width: 34em; }
.section-head__main > .lede.zh-p, .work-hero__copy > .lede.zh-p, .cta-band__copy > .lede.zh-p { margin-top: -.65rem; }
.work-hero__copy > .lede.zh-p { max-width: 24em; }
@media (min-width: 1200px) { .work-hero__copy > .lede.zh-p { max-width: 17em; } }
.work-hero__title .zh-sub { font-size: max(1.125rem, .42em); }
.section-head--center .lede.zh-p { max-width: 30em; margin-inline: auto; }
.cta-band__copy .lede.zh-p { max-width: 26em; }

/* Captions: the Chinese moves to the next line as one piece rather than breaking mid-phrase. */
.page-work .figure figcaption .zh-i, .w-lightbox__caption .zh-i { display: inline-block; margin-left: .1em; }

/* Pageant note: ring on the left, English and Chinese stacked beside it. */
.w-note { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; row-gap: .45rem; }
.w-note__ring { grid-row: 1 / span 2; align-content: center; gap: .35rem; }
.w-note__ring .zh-i { margin: 0; letter-spacing: .04em; }
.w-note > p { grid-column: 2; }
.w-note > .zh-p { margin: 0; max-width: 38em; }
.w-note p > [lang] { white-space: nowrap; }

/* Foot rows that carry a Chinese line */
.w-foot .zh-p { max-width: 32em; font-size: .9375rem; }
.w-foot__division { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: .3rem 2.5rem; }
.w-foot__division > .lockup { grid-row: 1 / span 2; }
.w-foot__division > p { grid-column: 2; margin: 0; }
.w-onset .w-foot { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: .3rem 2.5rem; }
.w-onset .w-foot > p { grid-column: 1; margin: 0; }
.w-onset .w-foot > .link-arrow { grid-column: 2; grid-row: 1 / span 2; }

/* Lightbox counter: chapter name in both languages */
.w-lightbox__cn { display: inline-block; margin-left: .15em; }

@media (max-width: 639.98px) {
  .w-foot__division { grid-template-columns: minmax(0, 1fr); }
  .w-foot__division > .lockup { grid-row: auto; margin-bottom: .45rem; }
  .w-foot__division > p { grid-column: 1; }
  .w-onset .w-foot { grid-template-columns: minmax(0, 1fr); }
  .w-onset .w-foot > .link-arrow { grid-column: 1; grid-row: auto; justify-self: start; margin-top: .9rem; }
}
@media (max-width: 559.98px) {
  .w-note { grid-template-columns: minmax(0, 1fr); }
  .w-note__ring { grid-row: auto; margin-bottom: .8rem; }
  .w-note > p { grid-column: 1; }
}
