/* Work archive + before/after + Approach cascade + shared page sections
   (visual page heroes, photo breaths, framed shots, split layouts) */

.work-list {
  display: grid;
  gap: 56px;
  margin-top: 48px;
}

@media (min-width: 900px) {
  .work-list {
    gap: 88px;
  }
}

.work-item {
  display: grid;
  gap: 24px;
  align-items: start;
}

@media (min-width: 900px) {
  .work-item {
    grid-template-columns: 1.35fr 0.85fr;
    gap: 40px;
  }

  .work-item:nth-child(even) {
    grid-template-columns: 0.85fr 1.35fr;
  }

  .work-item:nth-child(even) .work-item__copy {
    order: -1;
  }

  /* Second half of the archive, so the left/right rhythm continues across the break */
  .work-list--flip .work-item {
    grid-template-columns: 0.85fr 1.35fr;
  }

  .work-list--flip .work-item .work-item__copy {
    order: -1;
  }

  .work-list--flip .work-item:nth-child(even) {
    grid-template-columns: 1.35fr 0.85fr;
  }

  .work-list--flip .work-item:nth-child(even) .work-item__copy {
    order: 0;
  }
}

.work-frame {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--void-3);
  overflow: hidden;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42);
  transition:
    border-color 0.25s var(--snap),
    transform 0.25s var(--snap),
    box-shadow 0.25s var(--snap);
}

.work-item:hover .work-frame {
  border-color: rgba(167, 139, 250, 0.45);
  transform: translateY(-3px);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(139, 92, 246, 0.18);
}

.work-frame__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: rgba(0, 0, 0, 0.25);
}

.work-frame__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-2);
}

.work-frame__dot:nth-child(1) {
  background: #ff5f57;
}

.work-frame__dot:nth-child(2) {
  background: #febc2e;
}

.work-frame__dot:nth-child(3) {
  background: #28c840;
}

.work-frame__url {
  margin-left: 8px;
  font-size: 0.75rem;
  color: var(--mute-2);
}

.work-frame__view {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}


/* Before / after */
[data-ba] {
  --ba: 50%;
  cursor: ew-resize;
  touch-action: none;
  user-select: none;
}

[data-ba] .ba__after {
  clip-path: inset(0 0 0 var(--ba));
}

.ba__range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  z-index: 3;
}

.ba__handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--ba);
  width: 2px;
  background: var(--violet-hi);
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(10, 7, 17, 0.45);
}

.ba__handle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(167, 139, 250, 0.6);
  background: rgba(10, 7, 17, 0.78);
  transform: translate(-50%, -50%);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
}

.ba__tag {
  position: absolute;
  top: 12px;
  z-index: 2;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(10, 7, 17, 0.78);
  border: 1px solid var(--line);
  color: var(--bone);
  pointer-events: none;
}

.ba__tag--before {
  left: 12px;
}

.ba__tag--after {
  right: 12px;
}

.work-item__copy .chip {
  display: inline-block;
  margin: 0 6px 10px 0;
  padding: 4px 10px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--violet-hi);
}

/* Whether it replaced something or started from nothing. One fact, stated once, instead of
   a stack of nouns that read like a spec sheet. */
.chip--kind {
  color: var(--mute) !important;
  border-color: var(--line) !important;
}

.band--paper .chip--kind {
  color: var(--paper-mute) !important;
  border-color: rgba(21, 14, 36, 0.18) !important;
}

.work-item__copy h2 {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.work-item__copy .where {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--mute-2);
}

.work-item__copy p {
  margin: 0;
  color: var(--mute);
  max-width: 38ch;
}

.work-item__copy .panel__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 18px;
  color: var(--violet-hi);
  text-decoration: none;
  font-weight: 600;
}

.work-item__copy .panel__link:hover {
  color: var(--violet-hi);
}

/* Approach cascade */
.cascade {
  position: relative;
  padding: clamp(48px, 8vw, 80px) 0;
  overflow: clip;
}

.cascade__track {
  display: grid;
  gap: clamp(48px, 10vw, 96px);
  width: min(100% - var(--gutter) * 2, 720px);
  margin-inline: auto;
}

.cascade__card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(139, 92, 246, 0.1), rgba(10, 7, 17, 0.2) 70%);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.3);
  will-change: transform, opacity;
}

/* Each step carries its own picture. Five identical text cards drifting past was the most
   template-looking stretch on the site, and the step being described is a visual one. */
.cascade__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: var(--void-3);
}

/* Absolutely placed so a PORTRAIT source cannot stretch the box: one card was rendering
   979px tall against 426px for its siblings because the tall image won over aspect-ratio. */
.cascade__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.02);
  transition: transform 0.7s var(--soft-out);
}

.cascade__card:hover .cascade__media img {
  transform: scale(1.06);
}

.cascade__body {
  padding: 26px;
}

.cascade__card .n {
  margin: 0 0 14px;
  font-family: var(--display);
  font-size: 1.2rem;
  color: var(--violet-hi);
}

.cascade__card h2 {
  margin: 0 0 12px;
  font-family: var(--display);
  font-size: clamp(1.7rem, 3.2vw, 2.3rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.cascade__card p {
  margin: 0;
  color: var(--mute);
  font-size: 1.02rem;
}

@media (max-width: 819px) {
  .cascade__card {
    transform: none !important;
    opacity: 1 !important;
  }
}

.contact-grid {
  display: grid;
  gap: 36px;
  margin-top: 40px;
}

@media (min-width: 860px) {
  .contact-grid {
    grid-template-columns: 0.95fr 1.05fr;
    gap: 48px;
    align-items: start;
  }
}

.contact-points {
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.contact-points li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--mute);
  font-size: 0.98rem;
}

.contact-points svg {
  flex: 0 0 auto;
  margin-top: 4px;
  color: var(--violet-hi);
}

/* The ask band paints an atmosphere plate and a glow above static content,
   so its shell has to be lifted out from under them. */
.ask .shell {
  position: relative;
  z-index: 2;
}

.ask__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

/* Page hero: atmosphere plate + a real photo dissolving into the void */
.page-hero--visual {
  position: relative;
  isolation: isolate;
  overflow: clip;
  padding: clamp(108px, 15vw, 152px) 0 clamp(56px, 9vw, 92px);
}

.page-hero__atm {
  position: absolute;
  inset: 0;
  z-index: -2;
  pointer-events: none;
}

.page-hero--work .page-hero__atm {
  background:
    linear-gradient(180deg, rgba(10, 7, 17, 0.38) 0%, rgba(10, 7, 17, 0.8) 62%, var(--void) 100%),
    url("/clients/everlane-digital/assets/gen/atm-02.jpg") center / cover no-repeat;
}

.page-hero--approach .page-hero__atm {
  background:
    linear-gradient(180deg, rgba(10, 7, 17, 0.42) 0%, rgba(10, 7, 17, 0.82) 62%, var(--void) 100%),
    url("/clients/everlane-digital/assets/gen/ev-tex-violet-grain.jpg") center / cover no-repeat;
}

.page-hero--contact .page-hero__atm {
  background:
    linear-gradient(180deg, rgba(10, 7, 17, 0.4) 0%, rgba(10, 7, 17, 0.8) 62%, var(--void) 100%),
    url("/clients/everlane-digital/assets/gen/atm-01.jpg") center / cover no-repeat;
}

.page-hero__glow {
  position: absolute;
  left: -18%;
  top: -18%;
  width: 68%;
  height: 72%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.2), transparent 70%);
  pointer-events: none;
}

.page-hero__grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .page-hero__grid {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: 52px;
  }
}

.page-hero__copy .lede {
  margin-top: 18px;
  max-width: 46ch;
}

.page-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
}

.page-hero__foot {
  margin: 18px 0 0;
  font-size: 0.88rem;
  color: var(--mute-2);
  max-width: 40ch;
}

/* Photo with no card edges: it fades out into the surface it sits on */
.dissolve {
  position: relative;
  margin: 0;
  aspect-ratio: 5 / 4;
}

.dissolve img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Daylight photography sits too bright against the void, so it gets pulled down
     before the mask feathers its edges into the page. */
  filter: brightness(0.9) saturate(0.92);
  -webkit-mask-image: radial-gradient(62% 60% at 53% 47%, #000 42%, rgba(0, 0, 0, 0.42) 72%, transparent 100%);
  mask-image: radial-gradient(62% 60% at 53% 47%, #000 42%, rgba(0, 0, 0, 0.42) 72%, transparent 100%);
}

.dissolve--tall {
  aspect-ratio: 4 / 5;
}

@media (max-width: 899px) {
  .dissolve--tall {
    aspect-ratio: 5 / 4;
  }
}

/* Full-bleed photo breath between argument bands */
.breath {
  position: relative;
  overflow: clip;
  height: clamp(240px, 40vw, 460px);
}

.breath img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.breath::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    var(--void) 0%,
    rgba(10, 7, 17, 0.3) 34%,
    rgba(10, 7, 17, 0.55) 70%,
    var(--void) 100%
  );
  pointer-events: none;
}

.breath__cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(20px, 4vw, 40px);
  z-index: 1;
}

.breath__cap p {
  margin: 8px 0 0;
  font-family: var(--display);
  font-size: clamp(1.15rem, 2.4vw, 1.7rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
  max-width: 22ch;
}

/* Framed photo, for light bands and column use where a dissolve has nothing to fade into */
.shot {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: var(--void-3);
  aspect-ratio: 3 / 2;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shot--tall {
  aspect-ratio: 4 / 5;
  max-width: 420px;
  margin-inline: auto;
}

.band--paper .shot {
  border-color: rgba(21, 14, 36, 0.12);
  box-shadow: 0 20px 48px rgba(21, 14, 36, 0.16);
}

.split {
  display: grid;
  gap: 32px;
  align-items: center;
}

@media (min-width: 900px) {
  .split {
    grid-template-columns: 1fr 1fr;
    gap: 56px;
  }

  .split--copy-led {
    grid-template-columns: 1.1fr 0.9fr;
  }
}

/* How we start: numbered flow on a faded nebula plate (same idea as .ask),
   not a side card fighting the steps. */
.flow-band {
  overflow: clip;
}

.flow-band__atm {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  /* Left stays readable; right keeps the nebula visible (previous veil was ~opaque). */
  background:
    linear-gradient(
      100deg,
      rgba(18, 12, 30, 0.92) 0%,
      rgba(18, 12, 30, 0.78) 34%,
      rgba(18, 12, 30, 0.28) 62%,
      rgba(18, 12, 30, 0.08) 100%
    ),
    linear-gradient(180deg, rgba(18, 12, 30, 0.2) 0%, rgba(18, 12, 30, 0.55) 100%),
    url("/clients/everlane-digital/assets/gen/ev-atm-nebula.jpg") 72% 15% / cover no-repeat;
  opacity: 0.85;
}

.flow-band__atm::after {
  content: "";
  position: absolute;
  right: -8%;
  top: -20%;
  width: 58%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(139, 92, 246, 0.28), transparent 68%);
  pointer-events: none;
}

.flow-band > .shell {
  position: relative;
  z-index: 1;
}

.flow__head {
  display: grid;
  gap: 18px;
  margin-bottom: clamp(36px, 5vw, 56px);
}

@media (min-width: 900px) {
  .flow__head {
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: end;
  }

  .flow__head .lede {
    max-width: 46ch;
  }
}

.flow {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0;
  max-width: 62ch;
}

.flow__step {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  padding: 0 0 32px;
}

.flow__step:last-child {
  padding-bottom: 0;
}

/* The spine runs between the markers, never past the last one. */
.flow__step:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 21px;
  top: 46px;
  bottom: 6px;
  width: 1px;
  background: linear-gradient(180deg, var(--line-2), transparent);
}

.flow__n {
  display: grid;
  place-items: center;
  width: 43px;
  height: 43px;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: rgba(139, 92, 246, 0.1);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--violet-hi);
}

.flow__body h3 {
  margin: 8px 0 8px;
  font-family: var(--display);
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.flow__body p {
  margin: 0;
  max-width: 58ch;
  color: var(--mute);
  font-size: 1rem;
}

.flow__claim {
  margin: 22px 0 0;
  max-width: 42ch;
  font-size: 0.95rem;
  color: var(--violet-hi);
}

.flow__note {
  display: grid;
  gap: 22px;
  margin-top: clamp(36px, 5vw, 52px);
  padding: clamp(24px, 3.5vw, 32px);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, rgba(139, 92, 246, 0.14), rgba(10, 7, 17, 0.55) 72%);
  backdrop-filter: blur(8px);
}

.flow__note p:not(.label) {
  margin: 12px 0 0;
  max-width: 62ch;
  color: var(--mute);
}

.flow__note .btn {
  justify-self: start;
}

@media (min-width: 900px) {
  .flow__note {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;
  }

  .flow__note .btn {
    justify-self: end;
  }
}

@media (max-width: 899px) {
  /* Phones: softer wash, still visible behind the steps. */
  .flow-band__atm {
    opacity: 0.7;
    background:
      linear-gradient(180deg, rgba(18, 12, 30, 0.72) 0%, rgba(18, 12, 30, 0.45) 40%, rgba(18, 12, 30, 0.82) 100%),
      url("/clients/everlane-digital/assets/gen/ev-atm-nebula.jpg") 55% 8% / cover no-repeat;
  }
}
