/* =========================================================
   Selected Work — final editorial (2 projects)
   ========================================================= */

.selected-work-final {
  --swf-paper: #f4f2ed;
  --swf-ink: #141311;
  --swf-mute: rgba(20, 19, 17, 0.42);
  --swf-line: rgba(20, 19, 17, 0.12);
  --swf-ease: cubic-bezier(0.22, 1, 0.36, 1);
  background: var(--swf-paper);
  color: var(--swf-ink);
  overflow: hidden;
}

.swf-shell {
  width: min(1480px, calc(100% - 2 * clamp(1.25rem, 4vw, 3.5rem)));
  margin: 0 auto;
  padding: clamp(4.5rem, 10vh, 7rem) 0 clamp(2rem, 5vh, 3.5rem);
}

.swf-head {
  margin-bottom: clamp(3rem, 8vh, 5rem);
}

.swf-kicker {
  margin: 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--swf-mute);
}

.swf-sub {
  margin: 0.55rem 0 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(20, 19, 17, 0.32);
}

.swf-num {
  margin: 0 0 1rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--swf-mute);
}

.swf-title {
  margin: 0;
  font-size: clamp(1.75rem, 2.8vw, 2.45rem);
  font-weight: 560;
  letter-spacing: -0.02em;
  line-height: 1.18;
}

.swf-type {
  margin: 0.65rem 0 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--swf-mute);
}

.swf-desc {
  margin: 1.25rem 0 0;
  max-width: 16em;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.55;
  color: rgba(20, 19, 17, 0.82);
}

.swf-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 1rem;
  margin: 1.15rem 0 0;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.65rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--swf-mute);
}

.swf-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.65rem;
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--swf-ink);
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.12rem;
  transition: opacity 450ms var(--swf-ease);
}

.swf-cta:hover {
  opacity: 0.62;
}

/* ——— Chaoling ——— */
.swf-project--chaoling {
  display: grid;
  grid-template-columns: minmax(0, 0.3fr) minmax(0, 0.7fr);
  gap: clamp(1.25rem, 3.5vw, 2.75rem);
  align-items: center;
  min-height: 0;
  padding-bottom: clamp(1.5rem, 3vh, 2.5rem);
}

.swf-copy {
  position: sticky;
  top: clamp(5.5rem, 14vh, 7.5rem);
  padding-top: 0.25rem;
}

.swf-project--chaoling .swf-cta {
  display: inline-flex;
  margin-top: 0.35rem;
  padding: 0.7rem 0;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  border-bottom-width: 1.5px;
}

.swf-stage--chaoling {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10.6;
  min-height: 0;
  margin-top: 0;
  transform: scale(1.1);
  transform-origin: left center;
}

.swf-shot {
  margin: 0;
  position: absolute;
  overflow: hidden;
  background: #ebe8e2;
  opacity: 0;
  transform: translateY(24px);
  will-change: transform, opacity;
  border-radius: 8px;
  box-shadow: 0 16px 42px rgba(14, 13, 12, 0.1), 0 2px 8px rgba(14, 13, 12, 0.04);
  transition:
    opacity 900ms var(--swf-ease),
    transform 900ms var(--swf-ease);
}

.swf-project.is-in .swf-shot {
  opacity: 1;
  transform: translate3d(0, var(--swf-y, 0px), 0);
}

.swf-shot img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
}

.swf-shot--web {
  width: 78%;
  left: 0;
  top: 8%;
  z-index: 2;
  border-radius: 8px;
  transition-delay: 0ms;
}

.swf-shot--city {
  width: 26%;
  right: 1%;
  bottom: 2%;
  top: auto;
  border-radius: 6px;
  z-index: 1;
  opacity: 0;
  box-shadow: 0 8px 24px rgba(14, 13, 12, 0.07);
  transition-delay: 80ms;
}

.swf-project.is-in .swf-shot--city {
  opacity: 0.42;
}

.swf-shot--mini {
  width: 19%;
  border-radius: 16px;
  z-index: 4;
  box-shadow: 0 18px 44px rgba(14, 13, 12, 0.14), 0 2px 6px rgba(14, 13, 12, 0.06);
}

.swf-shot--mini-a {
  left: 62%;
  top: 0;
  transition-delay: 160ms;
}

.swf-shot--mini-b {
  left: 78%;
  top: 10%;
  z-index: 5;
  transition-delay: 240ms;
}

.swf-bridge {
  margin: clamp(6vh, 10vh, 14vh) 0 clamp(2.5rem, 5vh, 3.5rem);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--swf-mute);
}

/* ——— DA ——— */
.swf-project--da {
  display: grid;
  grid-template-columns: minmax(0, 0.28fr) minmax(0, 0.72fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  align-items: center;
  padding-bottom: clamp(4rem, 10vh, 7rem);
}

.swf-copy--da {
  position: relative;
  top: auto;
}

.swf-da-hero {
  margin: 0;
  width: min(78vw, 1650px);
  max-width: 100%;
  justify-self: end;
  background: #0a0a0a;
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 950ms var(--swf-ease), transform 950ms var(--swf-ease);
}

.swf-project--da.is-in .swf-da-hero {
  opacity: 1;
  transform: none;
}

.swf-da-hero img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  object-fit: contain;
}

/* Final CTA height */
.cd-next--final {
  min-height: clamp(70svh, 78svh, 82svh);
  display: flex;
  align-items: center;
}

.cd-next--final .cd-next__inner {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 900ms var(--swf-ease), transform 900ms var(--swf-ease);
}

.cd-next--final.is-in .cd-next__inner {
  opacity: 1;
  transform: none;
}

.cd-next--final .cd-next__en {
  transition: opacity 700ms var(--swf-ease);
}

@media (max-width: 1024px) {
  .swf-project--chaoling {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .swf-copy {
    position: static;
  }

  .swf-stage--chaoling {
    position: relative;
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .swf-shot {
    position: relative;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    width: 100% !important;
    transform: none;
  }

  .swf-project.is-in .swf-shot {
    transform: none;
  }

  .swf-shot--mini {
    width: 46% !important;
  }

  .swf-stage--chaoling {
    grid-template-columns: 1fr 1fr;
  }

  .swf-shot--web,
  .swf-shot--city {
    grid-column: 1 / -1;
  }
}

@media (max-width: 768px) {
  .swf-shell {
    padding: clamp(3.5rem, 9vh, 5rem) 0 1.5rem;
  }

  .swf-project--chaoling,
  .swf-project--da {
    grid-template-columns: 1fr;
    gap: 1.35rem;
  }

  .swf-desc {
    max-width: none;
    font-size: 1.05rem;
  }

  .swf-stage--chaoling {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
  }

  .swf-shot--web,
  .swf-shot--city,
  .swf-shot--mini {
    position: relative;
    width: 100% !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.06);
  }

  .swf-project.is-in .swf-shot--city {
    opacity: 1;
  }

  .swf-shot--web {
    border-radius: 8px;
  }

  .swf-shot--city {
    border-radius: 6px;
  }

  .swf-mini-row {
    display: contents;
  }

  .swf-stage--chaoling {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .swf-shot--web,
  .swf-shot--city {
    grid-column: 1 / -1;
  }

  .swf-shot--mini {
    width: 100% !important;
    border-radius: 14px;
  }

  .swf-bridge {
    margin: 12vh 0 2.5rem;
  }

  .swf-da-hero {
    width: 100%;
    justify-self: stretch;
  }

  .swf-da-hero img {
    object-fit: contain;
    width: 100%;
    height: auto;
  }

  .cd-next--final {
    min-height: 72svh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .swf-shot,
  .swf-da-hero,
  .cd-next--final .cd-next__inner {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}
