/* Our work: two more brands, each card behaving like the brand it shows (work-brands.js). */

.wb-tag {
  color: rgba(255, 255, 255, 0.72);
  font: 500 14px/1.2 var(--sans);
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.wb-visit.ed-link {
  align-self: flex-start;
  color: inherit;
}

/* Beside a button, the link lines up with the middle of it. */
.rh__links .wb-visit.ed-link {
  align-self: center;
}

/* ---------- Rahath: their hero scene. The tower leans with the cursor. ---------- */
.rh {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-height: 600px;
  padding: clamp(24px, 3vw, 44px);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background: #1078e0;
  border-radius: 24px;
}

.rh__scene,
.rh__sky {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.rh__scene {
  z-index: -1;
}

.rh__sky {
  object-fit: cover;
}

.rh__fg {
  position: absolute;
  right: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 100% 100%;
  transform: translate3d(var(--lean-x, 0), var(--lean-y, 0), 0) scale(1.05);
  transform-origin: 50% 100%;
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.rh__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  max-width: min(620px, 60%);
}

.rh__logo {
  display: block;
  width: min(218px, 100%);
  height: auto;
}

.rh__copy .wb-tag {
  margin-top: 12px;
}

.rh h3 {
  margin: auto 0 28px;
  padding-top: 44px;
  font: 400 clamp(44px, 5vw, 78px)/0.98 var(--serif);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.rh__open {
  color: inherit;
}

/* The whole card opens the case study. The link to their own site sits above it. */
.rh__open::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: pointer;
}

.rh__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
}

.rh__cta {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 18px;
  color: #0b2a63;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  background: #fff;
  border-radius: 999px;
  transition: transform 0.35s var(--ease);
}

.rh:hover .rh__cta {
  transform: translateY(-2px);
}

.rh .wb-visit {
  position: relative;
  z-index: 2;
}

.rh__h {
  margin: auto 0 28px;
  padding-top: 44px;
  font: 400 clamp(44px, 5vw, 78px)/0.98 var(--serif);
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.rh__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  margin: 0 0 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.34);
}

.rh__stats div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rh__stats dd {
  order: -1;
  margin: 0;
  font: 400 36px/1 var(--serif);
  letter-spacing: -0.02em;
}

.rh__stats dt {
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  letter-spacing: -0.015em;
}

.rh-facts.ed-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

@media (max-width: 599px) {
  .rh-facts.ed-facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- ParoDrip: the crosshair from their posts, locking onto each colourway ---------- */
.pd {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 44px);
  min-height: 560px;
  padding: clamp(22px, 2.6vw, 36px);
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background: #1e1f1f;
  border-radius: 24px;
}

.pd::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("deck-grain.png") 0 0 / 170px 170px;
  mix-blend-mode: overlay;
  opacity: 0.7;
  pointer-events: none;
}

.pd__art {
  position: relative;
  align-self: center;
  justify-self: center;
  width: min(100%, 470px);
  aspect-ratio: 1600 / 1765;
}

.pd__art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 7%, #000 95%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent), linear-gradient(180deg, transparent, #000 7%, #000 95%, transparent);
  mask-composite: intersect;
}

.pd__veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.pd__spots {
  position: absolute;
  inset: 0;
  z-index: 3;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

.pd__spots li {
  position: absolute;
  left: var(--x);
  top: var(--y);
  padding: 5px 9px;
  color: #fff;
  font: 600 12px/1 var(--sans);
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: #0c0c0c;
  opacity: 0;
  transform: translate(10px, 10px);
  transition: opacity 0.3s ease;
}

.pd__spots li.to-left {
  transform: translate(calc(-100% - 10px), 10px);
}

.pd__spots li.is-on {
  opacity: 1;
  transition-delay: 0.55s;
}

/* Without the script there is no crosshair to point at them, so the names sit as a plain row. */
.pd:not(.is-live) .pd__spots li {
  opacity: 1;
}

.pd__v,
.pd__h {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  display: none;
  background: rgba(255, 255, 255, 0.82);
  pointer-events: none;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.pd.is-live .pd__v,
.pd.is-live .pd__h {
  display: block;
}

.pd__v {
  width: 1px;
  height: 100%;
}

.pd__h {
  width: 100%;
  height: 1px;
}

.pd__copy {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
}

.pd__logo {
  display: block;
  width: min(190px, 100%);
  height: auto;
}

.pd__copy .wb-tag {
  margin-top: 12px;
}

.pd h3 {
  margin: auto 0 12px;
  padding-top: 44px;
  font: 700 clamp(34px, 3.7vw, 58px)/0.96 "Poppins", sans-serif;
  letter-spacing: -0.035em;
  text-transform: uppercase;
}

.pd__copy p {
  margin: 0 0 22px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

/* ---------- Citywalk: evening falls over the flat. The sky turns, the city lights up and the lamp comes on. ---------- */
.cyw {
  position: relative;
  overflow: hidden;
  color: #fff;
  isolation: isolate;
  background: #0b1424;
  border-radius: 24px;
}

.cyw::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: url("deck-grain.png") 0 0 / 170px 170px;
  mix-blend-mode: overlay;
  opacity: 0.32;
  pointer-events: none;
}

.cyw__scene {
  position: relative;
  aspect-ratio: 1672 / 941;
  overflow: hidden;
}

/* The floor runs out into the band that holds the words. */
.cyw__scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 26%;
  background: linear-gradient(180deg, rgba(11, 20, 36, 0), #0b1424);
  pointer-events: none;
}

.cyw__plate {
  position: absolute;
  inset: 0;
}

.cyw__plate img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.cyw__dusk {
  opacity: 0;
}

.cyw__copy {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 6px clamp(22px, 2.6vw, 36px) clamp(22px, 2.6vw, 34px);
}

.cyw h3 {
  margin: 12px 0 0;
  font: 400 clamp(20px, 2.35vw, 34px)/1.16 var(--sans);
  letter-spacing: 0.1em;
  text-wrap: balance;
  text-transform: uppercase;
}

.cyw .wb-visit {
  align-self: flex-end;
  flex: none;
}

.cyw + .ed-facts {
  margin-top: clamp(24px, 3vw, 36px);
}

/* Phones: closer in, on the logo and the window. */
@media (max-width: 599px) {
  .cyw {
    border-radius: 20px;
  }

  .cyw__scene {
    aspect-ratio: 1 / 1;
  }

  .cyw__plate {
    inset: 0 auto 0 -8%;
    width: 177.7%;
  }

  .cyw .wb-visit {
    align-self: flex-start;
  }

  .cyw__copy {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .cyw h3 {
    font-size: 22px;
  }
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1023px) {
  .rh,
  .pd {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
    border-radius: 20px;
  }

  /* Stacked, the words come first and the tower stands in clear sky underneath them. */
  .rh {
    padding-bottom: clamp(300px, 50vw, 400px);
  }

  .rh__copy {
    max-width: none;
  }

  .rh__fg {
    height: clamp(420px, 70vw, 560px);
    object-position: 88% 100%;
  }

  .rh h3,
  .pd h3 {
    margin-top: 0;
    padding-top: 32px;
  }

  .pd__art {
    order: 2;
  }
}

@media (max-width: 599px) {
  .rh__stats dt {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rh__fg,
  .pd__v,
  .pd__h {
    transition: none;
  }
}
