/* Work With Nebula */
.page-work-with {
  background: var(--bg);
  overflow-x: clip;
}

.work-with-hero {
  padding:
    calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(3rem, 10vh, 6rem))
    max(var(--pad), env(safe-area-inset-left, 0px))
    clamp(3rem, 8vh, 5rem)
    max(var(--pad), env(safe-area-inset-right, 0px));
  border-bottom: 1px solid var(--line);
  max-width: 48rem;
}

.work-with-hero__title {
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.92;
  text-transform: uppercase;
  margin: 0.85rem 0 1.5rem;
}

.work-with-hero__title em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
}

.work-with-hero__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.work-with-hero__sub {
  font-size: 0.975rem;
  line-height: 1.6;
  color: var(--fg-muted);
  max-width: 36ch;
}

.work-with-grid {
  padding: clamp(3rem, 8vh, 5rem) max(var(--pad), env(safe-area-inset-right, 0px)) clamp(2rem, 6vh, 3.5rem) max(var(--pad), env(safe-area-inset-left, 0px));
  display: grid;
  gap: 0;
}

.work-with-card {
  padding: clamp(2rem, 5vh, 3rem) 0;
  border-top: 1px solid var(--line);
  max-width: 40rem;
}

.work-with-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.work-with-card__label {
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-dim);
  margin-bottom: 0.85rem;
}

.work-with-card__title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin-bottom: 1.15rem;
}

.work-with-card__body {
  font-size: 0.975rem;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 42ch;
  margin-bottom: 0.95rem;
}

.work-with-card__body:last-of-type {
  margin-bottom: 1.75rem;
}

.work-with-card__btn {
  display: inline-flex;
  align-items: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.25rem;
  border: 1px solid var(--line-strong);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg);
  text-decoration: none;
  transition: background 0.35s var(--ease-out), color 0.35s, border-color 0.35s;
}

.work-with-card__btn:hover {
  background: var(--fg);
  color: var(--bg);
  border-color: var(--fg);
}

.work-with-else {
  padding: clamp(3rem, 8vh, 5rem) max(var(--pad), env(safe-area-inset-right, 0px)) calc(3rem + env(safe-area-inset-bottom, 0px)) max(var(--pad), env(safe-area-inset-left, 0px));
  border-top: 1px solid var(--line);
  max-width: 40rem;
}

.work-with-else__lead {
  font-family: var(--font-serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.25;
  margin-bottom: 0.85rem;
}

.work-with-else__body {
  font-size: 0.975rem;
  line-height: 1.65;
  color: var(--fg-muted);
  max-width: 38ch;
  margin-bottom: 1.75rem;
}

.work-with-else__back {
  display: inline-block;
  margin-top: 1.25rem;
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--fg-muted);
  text-decoration: none;
  transition: color 0.3s var(--ease-out);
}

.work-with-else__back:hover {
  color: var(--fg);
}

@media (max-width: 900px) {
  .work-with-hero {
    padding-top: calc(var(--nav-h) + env(safe-area-inset-top, 0px) + clamp(1.75rem, 5vh, 2.75rem));
    padding-bottom: clamp(2rem, 5vh, 3rem);
    padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
    padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
    max-width: none;
  }

  .work-with-hero__title {
    font-size: clamp(2.15rem, 10vw, 3.5rem);
    margin: 0.65rem 0 1rem;
  }

  .work-with-hero__lead {
    font-size: clamp(1.15rem, 5vw, 1.55rem);
  }

  .work-with-hero__sub {
    max-width: none;
  }

  .work-with-grid {
    padding: clamp(2rem, 5vh, 3rem) max(var(--pad), env(safe-area-inset-right, 0px)) clamp(1.5rem, 4vh, 2.5rem) max(var(--pad), env(safe-area-inset-left, 0px));
  }

  .work-with-card {
    max-width: none;
    padding: clamp(1.5rem, 4vh, 2.25rem) 0;
  }

  .work-with-card__title {
    font-size: clamp(1.45rem, 6.5vw, 2rem);
  }

  .work-with-card__body {
    max-width: none;
  }

  .work-with-else {
    padding: clamp(2rem, 5vh, 3rem) max(var(--pad), env(safe-area-inset-right, 0px)) calc(2rem + env(safe-area-inset-bottom, 0px)) max(var(--pad), env(safe-area-inset-left, 0px));
    max-width: none;
  }

  .work-with-else__body {
    max-width: none;
  }

  .work-with-card__btn {
    width: 100%;
    justify-content: center;
  }
}
