/* Concept 02: split hero. A client list on the left drives the card stack on the right. */

.hero {
  --top: calc(var(--nav-h) + clamp(24px, 8.5vh, 77px));
  --card-w: clamp(232px, min(24.4vw, 41vh), 352px);
  --card-h: calc(var(--card-w) * var(--card-ratio));
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  padding: var(--top) var(--gutter) 72px;
}

.hero-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  max-width: 800px;
  animation: rise 1.1s var(--ease) backwards;
}

.hero-copy .display {
  font-size: clamp(44px, 6.67vw, 96px);
}

.hero-copy .lede {
  max-width: 30em;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
}

/* ---------- client list ---------- */
.lately {
  width: min(360px, 100%);
  margin-top: clamp(40px, 7.5vh, 68px);
  animation: rise 1.1s 0.15s var(--ease) backwards;
}

.lately ul {
  margin-top: 14px;
}

.lately li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 56px;
  border-top: 1px solid var(--line);
  opacity: 0.55;
  cursor: pointer;
  transition: opacity 0.5s var(--ease), border-color 0.5s var(--ease);
}

.lately li.is-active,
.lately li:hover {
  opacity: 1;
}

.lately li.is-active {
  border-top-color: var(--ink);
}

.lately small {
  font-family: var(--ui);
  font-size: 12px;
  color: var(--mute);
  white-space: nowrap;
}

.lately small::after {
  content: '→';
  display: inline-block;
  width: 0;
  margin-left: 0;
  opacity: 0;
  overflow: hidden;
  vertical-align: bottom;
  transition: width 0.5s var(--ease), margin 0.5s var(--ease), opacity 0.5s var(--ease);
}

.lately li.is-active small::after {
  width: 1em;
  margin-left: 0.6em;
  opacity: 1;
}

/* ---------- stack: cards are placed from the centre point by concept.js ---------- */
.stack-wrap {
  position: absolute;
  right: var(--gutter);
  top: calc(var(--top) + 84px);
  width: calc(var(--card-w) * 1.46);
  height: calc(var(--card-h) * 1.22);
}

.stack {
  position: absolute;
  left: 50%;
  top: 56%;
  width: 0;
  height: 0;
}

.stack .glow {
  --glow: calc(var(--card-w) * 0.84);
}

.stack .card {
  position: absolute;
  left: 0;
  top: 0;
  margin: calc(var(--card-h) / -2) 0 0 calc(var(--card-w) / -2);
  will-change: transform, opacity;
  -webkit-user-select: none;
  user-select: none;
}

/* ---------- more work ---------- */
.more {
  padding: 0 var(--gutter) clamp(72px, 9vw, 128px);
}

.more-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.more-all {
  display: block;
  margin-top: 32px;
  text-align: right;
}

@media (max-width: 1100px) {
  .more-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 860px) {
  .hero {
    --card-w: min(280px, 62vw);
    display: flex;
    flex-direction: column;
    padding-bottom: 56px;
  }

  .stack-wrap {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    margin-top: 28px;
  }

  .lately {
    order: 3;
    width: 100%;
    margin-top: 28px;
  }
}

@media (max-width: 640px) {
  .more-grid {
    display: flex;
    gap: 16px;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 var(--gutter) 28px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }

  .more-grid .card {
    flex: none;
    --card-w: 72vw;
    scroll-snap-align: center;
  }
}
