/* Factory North
   Breakpoints (media queries can't use custom properties):
   huge <= 1280px, desktop <= 880px, ipad <= 760px, mobile <= 620px, tiny <= 400px */

:root {
  --black: #33394b;
  --white: #fff;
  --gold: #88712f;
  --gold-dark: #5f4f21;
  --grey1: #f5f5f5;
  --grey1-dark: #f0f0f0;
  --sans: "proxima-nova", "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  --serif: "ff-tisa-web-pro", Georgia, Times, "Times New Roman", serif;
  --header-height: 80px;
  --gutter: 30px;
  --wrap: 1170px;
  --ease-out-quad: cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --ease-in-out-sine: cubic-bezier(0.445, 0.05, 0.55, 0.95);

  @media (width <= 620px) {
    --gutter: 15px;
  }
}

/* Reset ------------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
}

body {
  margin: 0;
  padding-top: var(--header-height);
  background: var(--white);
  font-family: var(--sans);
  font-size: 1em;
  font-weight: 300;
  line-height: 1.5;
  color: var(--black);
  -webkit-text-size-adjust: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;

  &.nav-active {
    overflow: hidden;
  }
}

main {
  display: block;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0 0 15px;
  font-family: var(--sans);
  font-weight: normal;
  line-height: 1.25;
  text-rendering: optimizeLegibility;
  color: var(--black);
}

h1 { font-size: 3.25em; }
h2 { font-size: 2.75em; }
h3 { font-size: 2em; }

p {
  margin: 0 0 30px;
  font-size: 1.125em;

  @media (width <= 620px) {
    font-size: 1em;
  }
}

a {
  transition: color 0.1s linear;
  color: var(--gold);
  text-decoration: none;

  &:active,
  &:focus {
    outline: none;
  }
}

b, strong { font-weight: bold; }

blockquote { margin: 0; }

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

img {
  display: block;
  max-width: 100%;
  margin: 0;
  border: 0;
}

svg:not(:root) {
  overflow: hidden;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

/* Shared ----------------------------------------------------------------- */

.wrap,
.basic_page,
.callout-container,
.categories-container,
.client_list,
.contact,
.credits-container,
.grid_wrap,
.header-container,
.header-nav-container,
.page_header,
.next_project-container {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 30px;

  @media (width <= 620px) {
    padding: 0 15px;
  }
}

.heading--line,
.client_list h1,
.page_header h1 {
  font-family: var(--serif);
  font-size: 2.25em;
  font-style: italic;
  letter-spacing: 0.1em;
  color: var(--gold);

  @media (width <= 880px) {
    font-size: 1.875em;
  }
}

.callout-link_text,
.next_project-view_all {
  transition: color 0.2s ease-in-out, padding 0.2s ease-in-out;
  position: relative;
  display: inline-block;
  margin: 0;
  font-size: 0.875em;
  font-weight: bold;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--black);

  .hover_arrow {
    transition: opacity 0.2s ease-in-out;
    position: absolute;
    top: 50%;
    right: 0;
    margin-top: -8.5px;
    opacity: 0;

    svg {
      display: block;
    }

    polygon {
      transition: fill 0.2s ease-in-out;
      fill: var(--black);
    }
  }
}

/* Header + navigation ---------------------------------------------------- */

.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 500;
  background: var(--white);

  .nav-active & {
    z-index: 600;
  }
}

.header-container {
  position: relative;
  height: var(--header-height);
}

.header-home {
  transition: color 0.3s ease-in-out;
  display: inline-block;
  text-transform: uppercase;
  color: var(--black);

  h1,
  p {
    margin: 0;
    font-size: 1.125em;
    font-weight: 900;
    letter-spacing: 0.1em;
    line-height: var(--header-height);
    color: inherit;
  }
}

.header-nav,
.header-desktop_nav {
  a {
    font-size: 1.5625em;
    font-weight: 400;
    letter-spacing: 0.15625em;
    text-transform: uppercase;
    color: var(--black);

    @media (width <= 620px) {
      font-size: 1.25em;
    }

    &:hover,
    &:focus {
      color: var(--gold);
    }
  }

  .active a {
    color: var(--gold);
  }
}

.header-desktop_nav {
  transition: opacity 0.3s var(--ease-in-out-sine);
  position: absolute;
  inset: 0 30px 0 auto;
  opacity: 0;
  pointer-events: none;

  @media (width <= 760px) {
    display: none;
  }

  .is-scrolled &,
  .page-contact & {
    transition-delay: 0.15s;
    opacity: 1;
    pointer-events: auto;
  }

  li {
    display: inline-block;
    margin: 0 0 0 20px;
    line-height: var(--header-height);
  }

  a {
    font-size: 0.875em;
    font-weight: 700;
    letter-spacing: 0.2em;
  }
}

.header-nav_toggle {
  transition: opacity 0.3s var(--ease-in-out-sine) 0.15s;
  position: absolute;
  top: 50%;
  right: 20px;
  margin-top: -15px;
  padding: 10px;
  opacity: 1;

  @media (width > 760px) {
    .is-scrolled &,
    .page-contact & {
      transition-delay: 0s;
      opacity: 0;
      pointer-events: none;
    }
  }

  overflow: hidden;
  text-indent: -9999px;

  @media (width <= 620px) {
    right: 5px;
  }

  span {
    position: relative;
    display: block;
    width: 17px;
    height: 10px;

    &::before,
    &::after {
      content: "";
      position: absolute;
      left: 0;
      display: block;
      width: 17px;
      height: 2px;
      background: var(--black);
      transform-origin: center;
      transition-duration: 0.3s, 0.3s;
      transition-delay: 0.3s, 0s;

      .nav-active & {
        transition-delay: 0s, 0.3s;
      }
    }

    &::before {
      transition-property: top, transform;
      top: 0;

      .nav-active & {
        top: 4px;
        transform: rotate(45deg);
      }
    }

    &::after {
      transition-property: bottom, transform;
      bottom: 0;

      .nav-active & {
        bottom: 4px;
        transform: rotate(-45deg);
      }
    }
  }
}

.header-nav {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 500;
  display: none;
  background: rgb(255 255 255 / 0.97);
  text-align: center;
  overflow-y: auto;

  .nav-active & {
    display: block;
  }

  ul {
    transition: transform 0.6s var(--ease-in-out-sine);
    transform: translateY(10px);
    margin: 0 auto;
    padding: 85px 0;

    .nav-animate & {
      transform: translateY(0);
    }

    @media (width <= 620px) {
      padding: 35px 0;
    }

    @media (width <= 400px) {
      padding: 0;
      text-align: right;
    }

    @media (height <= 500px) {
      padding: 0;
    }
  }

  li {
    transition: opacity 0.35s ease-in-out, transform 0.35s var(--ease-in-out-sine);
    transform: translateY(10px);
    padding: 18px 0;
    opacity: 0;

    &:nth-child(2) { transition-delay: 0.08s; }
    &:nth-child(3) { transition-delay: 0.16s; }
    &:nth-child(4) { transition-delay: 0.24s; }
    &:nth-child(5) { transition-delay: 0.32s; }

    .nav-animate & {
      transform: translateY(0);
      opacity: 1;
    }

    @media (height <= 500px) {
      padding: 10px 0;
    }
  }
}

/* Page header ------------------------------------------------------------ */

.page_header-container {
  width: 100%;
}

.page_header-center {
  display: table-cell;
  vertical-align: middle;
}

.page_header-content {
  padding: 80px 0;

  .page_header--columns & {
    position: relative;
    display: flow-root;
  }
}

.page_header--columns h1 {
  position: absolute;
  left: 0;
  max-width: 340px;
  letter-spacing: 0;

  @media (width <= 880px) {
    position: relative;
    max-width: 100%;
    margin-bottom: 35px;
  }
}

.page_header-text {
  width: 100%;
  max-width: 750px;

  p {
    margin-bottom: 1em;
    font-size: 1.25em;
    line-height: 1.5em;

    &:last-child {
      margin-bottom: 0;
    }

    @media (width <= 620px) {
      font-size: 1em;
    }
  }

  a {
    color: var(--gold);

    &:hover,
    &:focus {
      color: var(--gold-dark);
    }
  }

  .page_header--columns & {
    float: right;
    max-width: 880px;
    padding-top: 14px;
    padding-left: 370px;

    @media (width <= 880px) {
      float: none;
      max-width: 100%;
      padding: 0;
    }

    p {
      font-size: 1.375em;
      line-height: 1.625em;

      @media (width <= 880px) {
        font-size: 1.25em;
      }

      @media (width <= 620px) {
        font-size: 1.125em;
      }

      @media (width <= 400px) {
        font-size: 1em;
      }

      &.page_header-categories {
        font-family: var(--serif);
        font-size: 1em;
        font-style: italic;
        color: var(--gold);
      }
    }
  }
}

/* Category filters ------------------------------------------------------- */

.categories {
  margin-bottom: calc(var(--gutter) / 2);
  background: var(--grey1);

  @media (width > 880px) {
    position: sticky;
    top: var(--header-height);
    z-index: 50;
  }
}

.categories-anchor {
  position: relative;
  top: calc(-1 * var(--header-height));
  height: 0;
}

.categories-container {
  padding: 36px 15px 32px;
  font-size: 0;
  text-align: center;

  @media (width > 880px) {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  li {
    display: inline-block;
    padding: 0 15px;
    font-size: 16px;
    line-height: 2em;

    @media (width <= 880px) {
      display: inline;
    }

    @media (620px < width <= 880px) {
      &:nth-child(4)::after {
        content: "\A";
        white-space: pre;
      }
    }

    @media (width <= 620px) {
      padding: 0 8px;

      &:nth-child(3)::after,
      &:nth-child(5)::after {
        content: "\A";
        white-space: pre;
      }
    }

    @media (width <= 400px) {
      display: inline-block;
    }
  }

  a {
    padding: 2px 0;
    font-size: 1em;
    font-weight: bold;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--black);

    &:hover,
    &:focus {
      color: var(--gold);
    }
  }

  .current_category a {
    border-bottom: 2px solid var(--gold);
    color: var(--gold);
  }
}

/* Grid ------------------------------------------------------------------- */

.grid_wrap {
  padding: 0 15px;

  @media (width <= 620px) {
    padding: 0 7.5px;
  }
}

.grid {
  position: relative;
  display: flow-root;

  @media (width <= 760px) {
    height: auto !important;
  }
}

.grid-sizer {
  width: 25%;
}

/* Without JS (or before layout) the masonry items simply float */
.js-grid > .js-grid-item {
  float: left;
}

.grid-item {
  position: relative;

  .js :is(.page-project-entry, .page-studio) & {
    transition: transform 1s var(--ease-out-quad), opacity 0.75s var(--ease-out-quad);
    transform: translateY(25px);
    opacity: 0.5;

    &.is-visible {
      transform: translateY(0);
      opacity: 1;
    }
  }

  .grid-item {
    opacity: 1 !important;
  }

  @media (width <= 760px) {
    position: relative !important;
    inset: auto !important;
    display: block;
    width: 100% !important;

    &:where(.grid-item--text) {
      margin: 0;
      padding-inline: 15px;

      .grid-item-pusher {
        padding-bottom: 0 !important;
      }
    }

    picture {
      height: auto !important;
      padding: 0 !important;
    }

    .bio & {
      width: 100% !important;
      padding: 0 15px;
    }

    .bio-content-square {
      margin-top: -15px;
      margin-bottom: 15px;
    }
  }

  @media (width <= 620px) {
    &.bio-content {
      margin-top: -7.5px;
      padding: 7.5px;
    }

    .bio-content-square {
      margin-bottom: 0;
    }
  }

  &.ratio-1x1 { width: 25%; --ratio: 100%; }
  &.ratio-1x2 { width: 25%; --ratio: 200%; }
  &.ratio-2x1 { width: 50%; --ratio: 50%; }
  &.ratio-2x2 { width: 50%; --ratio: 100%; }
  &.ratio-2x4 { width: 50%; --ratio: 200%; }
  &.ratio-3x1 { width: 75%; --ratio: 33.3333%; }
  &.ratio-3x2 { width: 75%; --ratio: 66.6666%; }
  &.ratio-4x2 { width: 100%; --ratio: 50%; }

  &.grid-item--image.has_alternate {
    @media (width <= 760px) {
      width: 100%;
      padding: 15px;

      .grid-item-pusher {
        padding: 0 !important;
      }
    }

    @media (width <= 620px) {
      padding: 7.5px;
    }
  }

  img {
    width: 100%;
  }
}

.grid-item-pusher {
  width: 100%;
  padding-bottom: var(--ratio, 0);
}

.grid-item--third {
  float: left;
  width: 33.33%;
  --ratio: 100%;

  @media (width <= 880px) {
    width: 50%;
  }
}

.grid-item--full_image,
.grid-item--full_text {
  width: 100%;
  padding: 15px;

  @media (width <= 620px) {
    padding: 7.5px;
  }
}

.grid-item--full_text {
  padding-block: 11%;
}

.grid-item--linked {
  @media (hover: hover) {
    &:hover .grid-item-center-inner {
      transition-delay: 0.1s;
      opacity: 1;
      color: var(--gold) !important;

      em,
      span {
        transform: translateY(0);
        transition-delay: 0.1s;
      }
    }
  }

  &.is-in_view .grid-item-center-inner {
    transition-delay: 0.5s;
    opacity: 1;
    color: var(--gold) !important;

    em,
    span {
      transform: translateY(0);
      transition-delay: 0.5s;
    }
  }
}

.grid-item-container {
  position: absolute;
  inset: 15px;
  overflow: hidden;

  @media (width <= 620px) {
    inset: 7.5px;
  }

  .feature-image & {
    inset: 0;
  }

  .feature--left .feature-product & {
    right: 0;
  }

  .feature--right .feature-product & {
    left: 0;
  }

  @media (width <= 760px) {
    .grid-item--text &,
    .grid-item--image.has_alternate & {
      position: relative;
      inset: 0;
    }
  }

  img {
    position: absolute;
    inset: 0;

    &.is_vertical {
      @media (width > 760px) {
        height: 100%;
      }
    }

    .has_alternate & {
      @media (width <= 760px) {
        position: relative;
        display: block;
        width: 100%;
      }
    }

    .feature & {
      width: 100%;
    }
  }
}

.grid-item-center {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: table;
  width: 100%;
  height: 100%;
  padding: 30px 0;

  .ratio-1x2 & {
    padding: 0 0 90px;

    @media (width <= 760px) {
      padding: 0;
    }
  }

  .grid-item--linked & {
    padding: 10px;
  }

  .grid-item--text & {
    position: relative;
    padding: 0;
  }

  :is(.ratio-2x2, .ratio-2x4, .ratio-3x2, .grid-item--third, .grid-item--full_image).grid-item--linked & {
    inset: 50% auto auto 50%;
    width: 256px;
    height: 256px;
    margin: -128px 0 0 -128px;
  }

  @media (width <= 760px) {
    .grid-item--image & {
      inset: 50% auto auto 50%;
      width: 256px;
      height: 256px;
      margin: -128px 0 0 -128px;
    }
  }
}

.grid-item-center-inner {
  transition: opacity 0.4s ease-in-out;
  display: table-cell;
  vertical-align: middle;
  padding: 0 10px;

  .grid-item--linked & {
    opacity: 0;
    background: rgb(255 255 255 / 0.95);
    text-align: center;

    em,
    span {
      transition: all 0.4s ease-in-out;
    }

    em {
      transform: translateY(-5px);
      display: inline-block;
    }

    span {
      transform: translateY(5px);
    }
  }

  img {
    position: relative;
    width: auto !important;
    margin: 0 auto 40px;

    @media (width <= 760px) {
      margin-bottom: 20px;
    }
  }

  .ratio-1x2 & {
    vertical-align: bottom;
  }

  .grid-item--linked & {
    vertical-align: middle;
  }
}

.grid-item-text {
  max-width: 740px;
  margin: 0 auto;
  text-align: center;
  color: var(--black);

  @media (width <= 760px) {
    margin-block: 60px;

    .feature-text--mobile & {
      margin-top: 20px;
    }
  }

  .ratio-1x2 & {
    @media (width > 760px) {
      text-align: left;
    }
  }

  .grid-item--linked & {
    max-width: 100%;
    text-align: center;
  }

  .grid-item--image & {
    @media (width <= 760px) {
      margin-top: -128px;
    }
  }

  :is(.ratio-2x1, .ratio-2x2, .ratio-2x4) & :is(p, blockquote) {
    margin-inline: auto;

    @media (width > 760px) {
      max-width: 420px;
    }
  }

  p {
    margin-bottom: 15px;
    font-size: 1.0625em;

    &.color-gold {
      font-size: 1.125em;
      color: var(--gold);

      @media (760px < width <= 880px) {
        font-size: 1em !important;
      }

      em {
        font-size: 0.875em;
      }
    }

    &:last-child {
      margin-bottom: 0;
    }

    .grid-item--linked & {
      font-family: var(--serif);
      font-size: 1.25em;
      color: var(--gold);

      span {
        display: inline-block;
        margin-top: 15px;
        font-family: var(--sans);
        font-size: 0.5625em;
        font-weight: bold;
        text-transform: uppercase;
        letter-spacing: 0.125em;
        color: var(--black);
      }
    }
  }

  :is(.ratio-1x1, .ratio-1x2, .ratio-2x1) & p {
    font-size: 1em;
  }

  em {
    font-family: var(--serif);
    color: var(--gold);
  }

  blockquote {
    margin: 0 0 1em;
    font-family: var(--serif);
    font-size: 1.125em;
    font-style: italic;
    color: var(--black);

    @media (760px < width <= 880px) {
      margin-bottom: 0.5em !important;
      font-size: 1em !important;
    }
  }
}

.color-gold {
  color: var(--gold);
}

.feature {
  position: relative;
  width: 100%;
  height: 0;
  padding: 0 15px 100%;

  @media (width <= 760px) {
    position: relative !important;
    inset: auto !important;
  }

  @media (width <= 620px) {
    padding: 0 7.5px 100%;
  }
}

.feature-image_container {
  position: absolute;
  inset: 15px 15px auto;

  @media (width <= 620px) {
    inset: 7.5px 7.5px auto;
  }
}

.feature-image {
  position: absolute;
  inset: 0 auto auto 0;
}

.feature-product {
  position: absolute;
  inset: auto auto 0 0;
  z-index: 10;

  .feature--right & {
    inset: auto 0 0 auto;
  }

  @media (width <= 760px) {
    position: relative !important;
    inset: 15px auto auto !important;
    max-width: 50%;
    margin: 0 auto;
  }

  @media (width <= 620px) {
    top: 7.5px !important;
  }
}

.feature-text {
  position: absolute;
  inset: auto 0 0 auto;

  .feature--right & {
    inset: auto auto 0 0;
  }

  @media (width <= 760px) {
    display: none;
  }
}

.feature-text--mobile {
  margin-top: -20px;

  @media (width > 760px) {
    display: none;
  }
}

.break {
  width: 100%;
}

/* Studio bios ------------------------------------------------------------ */

.bio {
  display: flow-root;
}

.bio-image {
  float: right;

  .bio--right & {
    float: left;
  }
}

.bio-content {
  float: left;

  .bio--right & {
    float: right;
  }

  @media (width <= 760px) {
    .grid-item-pusher {
      padding-bottom: 0 !important;
    }
  }
}

.bio-image,
.bio-content {
  @media (width <= 760px) {
    float: none !important;
  }
}

.bio-content-square {
  position: absolute;
  inset: auto 15px 15px auto;
  width: 350px;
  height: 350px;
  background: var(--grey1);
  overflow: initial;

  .bio--right & {
    inset: auto auto 15px 15px;
  }

  @media (width <= 1000px) {
    width: 284px;
    height: 284px;
    font-size: 0.81em;
  }

  @media (width <= 760px) {
    .bio & {
      position: relative;
      inset: 0;
      display: flow-root;
      width: auto;
      height: auto;
    }
  }
}

.bio-content-square-inner {
  transition: opacity 0.3s ease-in-out;
  padding: 26% 18.5% 0;

  .show-details & {
    opacity: 0;
  }

  @media (width <= 1000px) {
    padding-inline: 15.5%;
  }

  @media (width <= 760px) {
    padding-block: 30px 85px;
  }
}

.bio-content-overlay {
  transition: opacity 0.3s ease-in-out;
  position: absolute;
  inset: 0;
  z-index: 10;
  padding: 15.5% 18.5% 0;
  background: var(--gold);
  opacity: 0;
  pointer-events: none;

  @media (width <= 1000px) {
    padding-inline: 15.5%;
  }

  @media (width <= 760px) {
    top: auto;
    padding-block: 30px 85px;
  }

  .show-details & {
    opacity: 1;
    pointer-events: auto;
  }

  :is(h1, h2, h3, h4, h5, h6) {
    margin-bottom: 0.5em;
    font-family: var(--serif);
    font-size: 1.5em;
    font-style: italic;
    color: var(--white);

    @media (width <= 760px) {
      margin-bottom: 0.375em;
    }
  }

  p {
    margin-bottom: 1.25em;
    font-size: 1.1875em;
    font-weight: 400;
    line-height: 1.25em;
    color: var(--white);

    &:last-child {
      margin: 0;
    }
  }

  a {
    color: var(--white);

    &:hover,
    &:focus {
      border-bottom: 1px solid var(--white);
    }
  }
}

.bio-name {
  margin-bottom: 0.375em;
  font-family: var(--serif);
  font-size: 1.5em;
  font-style: italic;
  color: var(--gold);
}

.bio-role {
  margin: 0;
  font-size: 1.1875em;
  color: var(--black);
}

.bio-toggle {
  transition: transform 0.3s ease-in-out;
  position: absolute;
  inset: auto auto 15.5% 18.5%;
  z-index: 20;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  overflow: hidden;

  svg {
    display: block;
  }

  polygon {
    transition: fill 0.3s ease-in-out;
    fill: var(--black);
  }

  @media (width <= 1000px) {
    left: 15.5%;
  }

  @media (width <= 760px) {
    inset: auto auto 40px 15.5%;
  }

  .show-details & {
    transform: rotate(135deg);

    polygon {
      fill: var(--white);
    }
  }
}

/* Callout ---------------------------------------------------------------- */

.callout {
  transition: background-color 0.2s ease-in-out;
  display: block;
  margin-top: calc(var(--gutter) / 2);
  background: var(--grey1);
  text-align: center;

  &:hover,
  &:focus {
    background: var(--grey1-dark);

    .callout-link_text {
      color: var(--gold);
    }
  }

  &:hover .callout-link_text {
    padding-right: 32px;

    .hover_arrow {
      opacity: 1;

      polygon {
        fill: var(--gold);
      }
    }
  }
}

.callout-container {
  display: table;
  width: 100%;
  height: 160px;
}

.callout-inner {
  display: table-cell;
  vertical-align: middle;
}

.callout-heading {
  margin-bottom: 0.75em;
  font-family: var(--serif);
  font-size: 1.875em;
  font-style: italic;
  color: var(--gold);

  @media (width <= 620px) {
    font-size: 1.375em;
  }
}

/* Project credits + next project ----------------------------------------- */

.credits {
  margin-top: 15px;
  background: var(--black);
}

.credits-inner {
  padding: 15% 0;

  @media (width <= 620px) {
    padding: 100px 0;
  }
}

.credits-collaborators {
  position: relative;
  color: var(--white);

  @media (width <= 880px) {
    text-align: center;
  }

  h2 {
    margin-bottom: 30px;
    font-family: var(--serif);
    font-size: 2.25em;
    font-style: italic;
    letter-spacing: 0.05em;
    color: var(--white);

    @media (width <= 880px) {
      font-size: 1.875em;
    }
  }

  ul {
    margin-bottom: 65px;

    @media (width <= 880px) {
      margin-bottom: 40px;
    }
  }

  li {
    display: inline-block;
    vertical-align: text-top;
    width: 220px;
    margin-bottom: 25px;
    padding-right: 30px;
    font-size: 1.1875em;
    font-weight: normal;
    line-height: 1.25em;

    @media (width <= 880px) {
      width: 100%;
      padding: 0;
    }

    @media (width <= 620px) {
      font-size: 1em;
    }

    a {
      color: var(--white);

      &:hover {
        color: var(--gold);
      }
    }

    em {
      font-family: var(--serif);
      font-size: 0.8375em;
    }
  }
}

.credits-callout {
  p {
    margin: 0;
    font-size: 1.9375em;
    line-height: 1.25em;
    letter-spacing: 0.075em;
    color: var(--white);

    @media (width <= 880px) {
      font-size: 1.75em;
      text-align: center;
    }

    @media (width <= 620px) {
      font-size: 1.5em;
    }
  }

  a {
    transition: border-color 0.2s ease-in-out;
    border-bottom: 2px solid var(--gold);
    color: var(--white);

    &:hover,
    &:focus {
      border-color: var(--white);
    }
  }
}

.credits-top {
  transition: box-shadow 0.2s ease-in-out;
  position: absolute;
  inset: 0 0 auto auto;
  display: block;
  width: 40px;
  height: 40px;
  text-indent: -9999px;
  background: url("/images/arrow-up_2x.png") no-repeat center / 18px 11px;
  box-shadow: inset 0 0 0 2px var(--gold);

  @media (width <= 880px) {
    position: relative;
    display: inline-block;
    margin-bottom: 55px;
  }

  &:hover,
  &:focus {
    box-shadow: inset 0 0 0 4px var(--gold);
  }
}

.credits-top_container {
  position: relative;
  padding-right: 60px;

  @media (width <= 880px) {
    padding: 0;
    text-align: center;
  }
}

.next_project {
  background: var(--grey1);
  text-align: center;
}

.next_project-container {
  display: table;
  width: 100%;
  height: 255px;
  padding: 0 20px;
}

.next_project-inner {
  display: table-cell;
  vertical-align: middle;
}

.next_project-link {
  display: inline-block;
  margin-bottom: 10px;
  padding: 10px;

  &:hover .next_project-title::after {
    transform: scaleX(1);
  }
}

.next_project-heading {
  margin-bottom: 0.75em;
  font-size: 1em;
  font-weight: normal;
  line-height: normal;
}

.next_project-title {
  position: relative;
  margin-bottom: 0.5em;
  font-family: var(--serif);
  font-size: 2.25em;
  font-style: italic;
  line-height: 1.25em;
  letter-spacing: 0.05em;
  color: var(--gold);

  @media (width <= 620px) {
    font-size: 1.875em;
  }

  &::after {
    content: "";
    transition: transform 0.2s ease-in-out;
    transform: scaleX(0.0001);
    position: relative;
    top: 5px;
    display: block;
    width: 60px;
    margin: 0 auto;
    border-bottom: 2px solid var(--black);
  }
}

.next_project-view_all {
  padding: 10px;

  &:hover {
    padding-right: 32px;

    .hover_arrow {
      opacity: 1;

      polygon {
        fill: var(--gold);
      }
    }
  }
}

/* Basic pages (404) ------------------------------------------------------ */

.basic_page {
  display: table;
  width: 100%;
  height: calc(92vh - var(--header-height));
}

.basic_page-center {
  display: table-cell;
  vertical-align: middle;
}

/* Client list ------------------------------------------------------------ */

.client_list {
  padding-top: 80px;
  padding-bottom: 15px;

  h1 {
    margin-bottom: 20px;
  }

  ul {
    column-count: 4;
    column-gap: 30px;

    @media (width <= 880px) {
      column-count: 3;
    }

    @media (width <= 680px) {
      column-count: 2;
    }

    @media (width <= 400px) {
      column-count: 1;
    }
  }

  li {
    display: inline-block;
    width: 100%;
    margin-bottom: 0.5em;
    font-size: 1.125em;
    line-height: 1.125em;
  }
}

/* Contact ---------------------------------------------------------------- */

.contact {
  .page-contact & {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: calc(100vh - var(--header-height));
  }
}

.contact-header {
  max-width: 60ch;
  margin: 0 0 2em;
  text-align: center;
}

.contact-links {
  padding: 100px 0;

  .page-contact & {
    padding: 0 0 80px;
  }
}

.contact-links-container {
  line-height: 40px;
  text-align: center;
  text-transform: uppercase;

  a {
    transition: box-shadow 0.2s ease-in-out, color 0.2s ease-in-out;
    display: inline-block;
    min-width: 200px;
    height: 40px;
    padding: 0 20px;
    box-shadow: inset 0 0 0 2px var(--black);
    font-size: 1em;
    font-weight: bold;
    letter-spacing: 0.15em;
    color: var(--black);

    @media (width <= 620px) {
      display: block;
      margin: 0 auto;
    }

    &:hover {
      box-shadow: inset 0 0 0 4px var(--black);
    }

    &:focus {
      box-shadow: inset 0 0 0 4px var(--gold);
      color: var(--gold);
    }
  }

  span {
    padding: 0 10px;
    font-family: var(--serif);
    font-size: 1.125em;
    font-style: italic;
    color: var(--gold);
  }
}

.contact-address {
  line-height: 1.25em;
  text-align: center;

  a {
    display: inline-block;
    margin-top: 4px;
    font-family: var(--serif);
    font-size: 0.875em;
    font-style: italic;
    color: var(--gold);

    &:hover,
    &:focus {
      color: var(--gold-dark);
    }
  }
}

.contact-social {
  text-align: center;

  a {
    position: relative;
    display: inline-block;
    width: 25px;
    height: 25px;
    margin: 0 15px;
    text-indent: -9999px;
    background: var(--icon) no-repeat center / var(--icon-size);

    &::after {
      content: "";
      transition: opacity 0.15s ease-in-out;
      position: absolute;
      inset: 0;
      opacity: 0;
      background: var(--icon-hover) no-repeat center / var(--icon-size);
    }

    &:hover::after,
    &:focus::after {
      opacity: 1;
    }
  }
}

.contact-social-twitter {
  --icon: url("/images/twitter_2x.png");
  --icon-hover: url("/images/twitter-hover_2x.png");
  --icon-size: 18px 14px;
}

.contact-social-facebook {
  --icon: url("/images/facebook_2x.png");
  --icon-hover: url("/images/facebook-hover_2x.png");
  --icon-size: 8px 16px;
}

.contact-social-instagram {
  --icon: url("/images/instagram_2x.png");
  --icon-hover: url("/images/instagram-hover_2x.png");
  --icon-size: 15px 15px;
}
