/* Every page except Home, built from Home's own parts: the sky, the gradient cards, the serif numerals and the orange pills. */

/* ---------- The opening: Home's sky with the page title in it (page-sky.js) ---------- */
.psky {
  position: relative;
  height: 190vh;
  background: #f4ede0;
}

.psky.is-still {
  height: 100lvh;
}

@media (scripting: none) {
  .psky {
    height: 100lvh;
  }
}

.psky__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  overflow: hidden;
  isolation: isolate;
  color: #f4ede0;
  background: linear-gradient(180deg, #14213d 0 46%, #294073 62%, #bd784d 76%, #e6ad61 88%, #f4ede0 100%);
}

.psky.has-gl .psky__stage {
  background: #14213d;
}

.psky.is-cream .psky__stage {
  background: #f4ede0;
}

.psky__gl {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.psky.is-still .psky__gl {
  display: none;
}

.psky__copy {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  padding: 0 var(--gutter);
  text-align: center;
}

.psky__title {
  margin: 0;
  padding: 0.1em 0.2em 0.2em;
  color: transparent;
  background-image: linear-gradient(353deg, #14213d calc(var(--cross, -20%) - 9%), #f4ede0 calc(var(--cross, -20%) + 9%));
  -webkit-background-clip: text;
  background-clip: text;
  font-family: var(--serif);
  font-size: clamp(46px, min(9.4vw, 13vh, 24px + 5vw), 118px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.psky__gold {
  background-image: linear-gradient(353deg, #14213d calc(var(--cross, -20%) * 2 - 18%), #edb96f calc(var(--cross, -20%) * 2 + 18%));
  -webkit-background-clip: text;
  background-clip: text;
}

.psky__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  color: rgba(244, 237, 224, 0.74);
  font: 500 16px/1.4 var(--sans);
  letter-spacing: -0.01em;
  list-style: none;
}

.psky__tags li + li::before {
  content: "\00b7";
  margin: 0 0.5em;
}

.psky + .ed-page {
  position: relative;
  z-index: 1;
  margin-top: -24vh;
  padding-top: 0;
}

.psky.is-still + .ed-page {
  margin-top: 40px;
}

@media (max-width: 1023px) {
  .psky + .ed-page {
    z-index: auto;
  }
}

body.sky-dark .progressive-blur.top-blur::after {
  opacity: 0;
}

/* ---------- The overview reads like the first section on Home ---------- */
.pg .ed-main #overview {
  display: flex;
  flex-direction: column;
  padding-top: 0;
  scroll-margin-top: 110px;
}

.pg #overview > .ed-label { order: 1; }
.pg #overview > .ed-overview { order: 2; }
.pg #overview > .ed-facts { order: 3; }
.pg #overview > .ed-actions { order: 4; }
.pg #overview > .ed-media { order: 5; }

.pg .ed-overview {
  margin: 0 0 34px;
  max-width: 900px;
  font-size: clamp(30px, 3.1vw, 50px);
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.05em;
}

.pg .ed-overview a {
  color: inherit;
  text-decoration: underline 2px #d99757;
  text-underline-offset: 0.12em;
}

.pg #overview > .ed-facts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 8px 0 26px;
}

.pg #overview > .ed-media {
  margin-top: 40px;
}

.pg .ed-media--hero img {
  width: 100%;
  height: auto;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
}

/* ---------- Buttons: the orange pill everywhere, as on Home ---------- */
.pg .ed-main a.ed-btn,
.pg .ed-main .ed-rows .ed-btn {
  color: #14213d;
  height: 44px;
  padding: 0 22px;
  background: #d99757;
  border-radius: 999px;
}

.pg .ed-main a.ed-btn:hover,
.pg .ed-main .ed-rows .ed-btn:hover {
  background: #cd8847;
}

.pg .ed-chip {
  height: 44px;
  padding: 0 18px;
  background: transparent;
  border: 1px solid rgba(20, 33, 61, 0.26);
  border-radius: 999px;
}

.pg .ed-chip:hover {
  background: rgba(20, 33, 61, 0.06);
}

.pg .ed-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
}

/* ---------- Steps: Home's serif numerals on ruled rows ---------- */
.pg .ed-list li {
  grid-template-columns: clamp(76px, 8vw, 128px) minmax(0, 0.9fr) minmax(0, 1.3fr);
  align-items: baseline;
  gap: 8px 24px;
  padding: 26px 0 30px;
}

.pg .ed-list__n {
  font: 400 clamp(46px, 4.6vw, 72px)/0.86 var(--serif);
  letter-spacing: -0.03em;
}

.pg .ed-list h3 {
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.pg .ed-list p {
  font-size: 17px;
}

/* ---------- Service cards: one of Home's gradient cards each ---------- */
.pg-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.pg-svc.ed-section {
  padding-top: 0;
  margin-top: 22px;
  scroll-margin-top: 96px;
}

#overview + .pg-svc.ed-section {
  margin-top: 96px;
}

.pg-svc + .ed-section:not(.pg-svc) {
  padding-top: 150px;
}

/* The Offerings cards are Home's cards, with room for the detail. */
.pg-deck {
  margin-top: 0;
}

.pg-card.hw-card {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  min-height: 540px;
  scroll-margin-top: 120px;
}

.pg-card h2 {
  margin: auto 0 12px;
  padding-top: 40px;
  font-size: clamp(30px, 2.9vw, 44px);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.05em;
}

.pg-card .hw-card__copy > p:not(.pg-sr) {
  max-width: 36ch;
  margin: 0 0 20px;
  color: var(--soft);
  font-size: 17px;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

.pg-card__facts {
  display: grid;
  gap: 14px;
  width: 100%;
  margin: 0;
  padding-top: 16px;
  font-size: 15px;
  line-height: 1.32;
  letter-spacing: -0.015em;
  border-top: 1px solid color-mix(in srgb, var(--fg) 26%, transparent);
}

.pg-card__facts dt {
  margin-bottom: 3px;
  color: var(--soft);
}

.pg-card__facts dd {
  margin: 0;
  font-weight: 600;
}

.pg-card__facts dd span {
  display: block;
}

/* Tablets keep Home's side-by-side card, with the scene as tall as the detail. */
@media (min-width: 720px) and (max-width: 1023px) {
  .pg .pg-card.hw-card {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }

  .pg .pg-card .hw-card__show {
    min-height: 360px;
  }

  .pg .pg-card__facts {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ---------- Careers: the six crafts in one card ---------- */
.pg-words.hw-card {
  position: relative;
  top: auto;
  display: block;
  min-height: 0;
  margin: 8px 0 0;
  padding: clamp(24px, 3vw, 44px);
  box-shadow: none;
  will-change: auto;
}

.pg-words ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 38px) 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.pg-words li {
  font: 400 clamp(36px, 3.9vw, 60px)/1 var(--serif);
  letter-spacing: -0.03em;
}

/* ---------- The client map, on the navy ---------- */
.pg .ed-media--map {
  padding: clamp(10px, 2vw, 28px);
  background: #14213d;
  border-radius: 24px;
}

.pg .ed-media--map .client-map__image {
  filter: brightness(0) invert(0.92) sepia(0.2);
  mix-blend-mode: normal;
}

.pg .client-map__feather {
  display: none;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 1023px) {
  .pg .ed-main #overview {
    scroll-margin-top: 140px;
  }

  .pg-card.hw-card {
    grid-template-columns: minmax(0, 1fr);
    min-height: 0;
  }

  .pg-card h2 {
    margin-top: 0;
    padding-top: 28px;
    font-size: 28px;
  }

  .pg-card__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pg-svc.ed-section {
    margin-top: 14px;
    scroll-margin-top: 130px;
  }

  #overview + .pg-svc.ed-section {
    margin-top: 64px;
  }

  .pg-svc + .ed-section:not(.pg-svc) {
    padding-top: 96px;
  }
}

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

  .pg #overview > .ed-facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .pg .ed-list li {
    grid-template-columns: 60px minmax(0, 1fr);
    padding: 20px 0 24px;
  }

  .pg .ed-list__n {
    grid-row: span 2;
    font-size: 42px;
  }

  .pg .ed-list p {
    grid-column: 2;
    font-size: 16px;
  }

  .pg-card__facts {
    grid-template-columns: minmax(0, 1fr);
  }

  .pg-words ul {
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .pg-words li {
    font-size: 38px;
  }
}

/* The illustrated sentence on each page: the same large, bold opening line, with small drawings beside it */
.pg #overview > .ix {
  order: 2;
  max-width: 900px;
  margin: 0 0 34px;
  font-size: clamp(30px, 3.1vw, 50px);
  font-weight: 600;
  line-height: 1.16;
  letter-spacing: -0.05em;
}

.pg #overview > .ix .ix-obj {
  font-size: 0.44em;
  vertical-align: -0.3em;
}

.pg #overview > .ix .ix-word {
  background-size: 0% 1.04em;
}

.pg #overview > .ix .ix-word.is-on {
  background-size: 100% 1.04em;
}

@media (max-width: 599px) {
  .pg #overview > .ed-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pg #overview > .ed-facts.ed-facts--row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* ---------- Collaborators: a ruled wall of logos in the brand blue. Hovering floods a cell with the sky. ---------- */
.clb {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.clb__cell {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  padding: 12px;
  overflow: hidden;
  isolation: isolate;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.clb__cell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: url("deck-gradient.webp") 0 0 / 100% 600% no-repeat;
  clip-path: inset(100% 0 0 0);
  transition: clip-path 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.clb__cell img {
  display: block;
  width: var(--w, auto);
  height: auto;
  transition: filter 0.3s ease;
}

.clb__cell--mark {
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: #294073;
  font-size: clamp(14px, 1.35vw, 19px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  transition: color 0.3s ease;
}

.clb__cell--mark img {
  width: auto;
  height: clamp(58px, 6.2vw, 92px);
}

.clb__cell--mark span {
  max-width: 7.5em;
}

.clb__next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #8f561d;
  font-size: clamp(16px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.03em;
  text-decoration: none;
  transition: color 0.3s ease;
}

.clb__next::after {
  content: "→";
}

.clb__next::before {
  content: "";
  position: absolute;
  inset: 0;
}

@media (hover: hover) and (pointer: fine) {
  .clb__cell:hover::before {
    clip-path: inset(0 0 0 0);
  }

  .clb__cell:hover img {
    filter: brightness(0) invert(0.94) sepia(0.14);
  }

  .clb__cell:hover,
  .clb__cell:hover .clb__next {
    color: #f4ede0;
  }
}

.clb-names {
  margin: 30px 0 0;
  color: #294073;
  font: 400 clamp(24px, 2.7vw, 40px)/1.24 var(--serif);
  letter-spacing: -0.02em;
}

.clb-names span {
  white-space: nowrap;
}

.clb-names span:not(:last-child)::after {
  content: " /";
  color: rgba(41, 64, 115, 0.4);
}

@media (max-width: 599px) {
  .clb {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 26px;
  }

  .clb__cell {
    aspect-ratio: 4 / 3;
  }

  .clb__cell--mark {
    grid-auto-flow: row;
    gap: 6px;
    font-size: 12px;
    text-align: center;
  }

  .clb__cell--mark img {
    height: 48px;
  }

  .clb-names span {
    white-space: normal;
  }
}

/* Where a project's story stands: locked at the client's request, or still being gathered. */
.st {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.st svg {
  flex: none;
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.st__dot {
  flex: none;
  width: 7px;
  height: 7px;
  background: #d99757;
  border-radius: 50%;
  animation: st-pulse 1.8s ease-in-out infinite;
}

@keyframes st-pulse {
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .st__dot { animation: none; }
}

/* On the logo wall the status sits along the foot of each cell. */
.clb__cell {
  padding-bottom: 34px;
}

.clb__cell .st {
  position: absolute;
  left: 50%;
  bottom: 11px;
  color: rgba(41, 64, 115, 0.8);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  transform: translateX(-50%);
  transition: color 0.3s ease;
}

.clb__cell .st--link {
  color: #8f561d;
  font-weight: 600;
}

.clb__cell .st--link::after {
  content: "→";
}

@media (hover: hover) and (pointer: fine) {
  .clb__cell:hover .st {
    color: #f4ede0;
  }
}

@media (max-width: 599px) {
  .clb__cell {
    aspect-ratio: 1 / 0.86;
    padding-bottom: 30px;
  }

  .clb__cell .st {
    bottom: 9px;
    font-size: 11.5px;
    gap: 4px;
  }

  .clb__cell .st svg {
    width: 11px;
    height: 11px;
  }
}

@media (max-width: 359px) {
  .clb__cell .st {
    font-size: 10.5px;
    letter-spacing: -0.02em;
  }
}

.clb__cell--mark .st {
  max-width: none;
}

/* A squarer logo is sized by its height, so it carries the same weight as the wide ones. */
.clb__cell--tall img {
  width: auto;
  height: clamp(64px, 6.6vw, 98px);
}

/* The invitation runs the full width, so the wall always ends on a complete row. */
.clb__cell--next {
  grid-column: 1 / -1;
  aspect-ratio: auto;
  padding: clamp(18px, 2vw, 26px) 12px;
}

@media (max-width: 599px) {
  .clb__cell--tall img {
    height: 66px;
  }

  .clb__cell--next {
    aspect-ratio: auto;
    padding: 18px 12px;
  }
}

/* ---------- Audit ---------- */
.pg .ed-main .ed-link:not(.wb-visit) {
  font-weight: 600;
}

/* Offerings card titles follow Home's card titles at every width. */
@media (min-width: 600px) and (max-width: 1023px) {
  .pg-card h2 {
    font-size: clamp(26px, 3.6vw, 34px);
  }
}

@media (max-width: 599px) {
  .clb__cell .st--link {
    font-size: 11px;
    padding-block: 12px;
    margin-block: -12px;
  }
}

@media (max-width: 359px) {
  .pg-card h2 {
    font-size: 24px;
  }
}

/* ---------- Collaborators, reversed: each cell starts in the sky; hovering wipes it away to paper ---------- */
.clb__cell::before {
  clip-path: inset(0 0 0 0);
}

.clb__cell img {
  filter: brightness(0) invert(0.94) sepia(0.14);
}

.clb__cell,
.clb__cell .clb__next,
.clb__cell .st {
  color: #f4ede0;
}

.clb__cell .st--link {
  color: #f2c48a;
}

@media (hover: hover) and (pointer: fine) {
  .clb__cell:hover::before {
    clip-path: inset(0 0 100% 0);
  }

  .clb__cell:hover img {
    filter: none;
  }

  .clb__cell:hover {
    color: #294073;
  }

  .clb__cell:hover .clb__next,
  .clb__cell:hover .st--link {
    color: #8f561d;
  }

  .clb__cell:hover .st {
    color: rgba(41, 64, 115, 0.8);
  }
}

/* The "Your brand next" cell keeps the original: paper at rest, the sky floods in on hover */
.clb__cell--next::before {
  clip-path: inset(100% 0 0 0);
}

.clb__cell--next,
.clb__cell--next .clb__next {
  color: #8f561d;
}

@media (hover: hover) and (pointer: fine) {
  .clb__cell--next:hover::before {
    clip-path: inset(0 0 0 0);
  }

  .clb__cell--next:hover,
  .clb__cell--next:hover .clb__next {
    color: #f4ede0;
  }
}

/* When the overview ends on its sentence, its gap to the next section matches every other section break */
.pg #overview > .ix:last-child {
  margin-bottom: 0;
}
