@import url("title-geometry.css");

@font-face {
  font-family: Geist;
  src: url("assets/geist-600.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: Inter;
  src: url("assets/inter-700.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: Barlow;
  src: url("assets/barlow-500.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

/* Two measured tracks share one animation clock for each responsive layout. */
.hero h1 {
  width: auto;
  height: auto;
}

.title-window {
  position: relative;
  overflow: hidden;
  vertical-align: top;
}

.title-desktop {
  width: 644px;
  height: 60px;
}

.title-track {
  display: block;
  position: relative;
  will-change: transform;
}

.title-desktop .title-track {
  width: 100%;
  height: 450px;
}

.title-desktop .title-item {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: block;
  max-width: none;
}

.title-mobile .title-track {
  width: 314px;
}

.title-row {
  display: block;
  height: 45px;
  text-align: center;
  font: 700 36px/40px Barlow, sans-serif;
  white-space: nowrap;
}

.action {
  transition: background-color 300ms ease-in-out, gap 300ms ease-in-out;
}

.action:hover,
.action:focus-visible {
  gap: 18px;
  background: rgba(255, 255, 255, .1);
}

.action--primary:hover,
.action--primary:focus-visible {
  background: #5f3597;
}

/* Hover belongs to the image; focusing its article link reveals the same data. */
.case-photo::after {
  transition: background-color 300ms ease-out;
}

.case-logo {
  transition: opacity 300ms ease-out, transform 300ms ease-out;
}

.case-metric {
  position: absolute;
  top: 39.814815%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 13px;
  color: #fff;
  opacity: 0;
  transform: translateY(-40px);
  transition: opacity 300ms ease-out, transform 300ms ease-out;
  pointer-events: none;
}

.case-card--hays .case-metric {
  transform: translateY(-50px);
}

.case-metric strong {
  color: #ff9a45;
  font: 700 80px/1.4 Barlow, sans-serif;
  letter-spacing: -1.6px;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.case-metric > span {
  font: 500 28px/1.4 Barlow, sans-serif;
  letter-spacing: -.56px;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.case-card-link:hover h3,
.cases-more:hover {
  text-decoration: none;
}

.case-read,
.cases-more {
  transition: color 200ms ease-in-out;
}

.read-arrow {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  transition: transform 200ms ease-in-out;
}

.read-arrow img {
  position: absolute;
  transition: opacity 200ms ease-in-out;
}

.read-arrow-hover {
  opacity: 0;
}

.case-read:hover,
.case-card-link:focus-visible .case-read,
.cases-more:hover {
  color: #e06500;
}

.case-read:hover .read-arrow,
.case-card-link:focus-visible .read-arrow,
.cases-more:hover > img {
  transform: translateX(7px);
}

.case-read:hover .read-arrow-rest,
.case-card-link:focus-visible .read-arrow-rest {
  opacity: 0;
}

.case-read:hover .read-arrow-hover,
.case-card-link:focus-visible .read-arrow-hover {
  opacity: 1;
}

.cases-more > img {
  transition: transform 200ms ease-in-out;
}

.case-tags li {
  transition: background-color 300ms ease-out;
}

.case-tags li:hover {
  background: #502d7f;
}

@media (hover: hover) and (pointer: fine) {
  .case-visual:hover .case-photo::after {
    background: rgba(12, 12, 12, .8);
  }

  .case-visual:hover .case-logo {
    opacity: 0;
    transform: translateY(40px);
  }

  .case-visual:hover .case-metric {
    opacity: 1;
    transform: translateY(0);
  }
}

.case-card-link:focus-visible .case-photo::after {
  background: rgba(12, 12, 12, .8);
}

.case-card-link:focus-visible .case-logo {
  opacity: 0;
  transform: translateY(40px);
}

.case-card-link:focus-visible .case-metric {
  opacity: 1;
  transform: translateY(0);
}

/* Full-screen navigation, with a separate composition for mobile. */
.site-menu {
  inset: 0;
  width: 100%;
  max-width: none;
  height: 100dvh;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow: auto;
  scrollbar-width: none;
  background: #000;
  color: #fff;
  font-family: Inter, sans-serif;
}

.site-menu::backdrop {
  background: #000;
}

.menu-shell {
  max-width: 1440px;
  min-height: 880px;
  margin-inline: auto;
}

.menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 96px;
  padding: 32px 48px;
}

.menu-close {
  position: static;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  background: none;
}

.menu-close img {
  display: block;
}

.menu-layout {
  display: grid;
  grid-template-columns: 432px minmax(0, 1fr);
  column-gap: 190px;
  row-gap: 92px;
  padding: 54px 48px 84px;
}

.menu-caption {
  margin: 0 0 16px;
  color: rgba(255, 255, 255, .6);
  font-size: 14px;
  font-weight: 700;
  line-height: 17px;
  text-transform: uppercase;
}

.menu-social {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
}

.menu-social a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 18px;
  font-weight: 500;
  line-height: 18px;
}

.menu-social img {
  display: block;
}

.menu-offices {
  margin-top: 43px;
}

.menu-office + .menu-office {
  margin-top: 22px;
}

.menu-office h2 {
  margin: 0 0 12px;
  font-size: 30px;
  font-weight: 500;
  line-height: 36px;
}

.menu-office > a {
  font-size: 16px;
  font-weight: 300;
  line-height: 19px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-menu .menu-services {
  display: flex;
  flex-direction: column;
  gap: 38px;
  font: 600 56px/46px Geist, sans-serif;
}

.menu-service {
  display: flex;
  align-items: center;
  position: relative;
  min-height: 46px;
  padding-left: 70px;
  white-space: nowrap;
}

.menu-service > span {
  display: block;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.menu-service > img {
  position: absolute;
  left: 10px;
  opacity: 0;
  transform: rotate(45deg);
}

.site-menu .menu-pages {
  display: flex;
  flex-direction: row;
  align-self: end;
  flex-wrap: wrap;
  gap: 40px;
  margin-bottom: 17px;
  padding-left: 76px;
  font: 600 24px/22px Barlow, sans-serif;
}

.site-menu a:hover {
  color: inherit;
}

.menu-benchmark {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 358px;
  max-width: 100%;
}

.benchmark-image {
  position: relative;
  display: grid;
  place-items: center;
  height: 140px;
  overflow: hidden;
  isolation: isolate;
  border: .5px solid rgba(255, 255, 255, .4);
  border-radius: 4px;
  text-align: center;
}

.benchmark-image > img,
.benchmark-image::after {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

.benchmark-image > img {
  object-fit: cover;
}

.benchmark-image::after {
  content: "";
  background: rgba(0, 0, 0, .8);
}

.benchmark-desktop-title {
  font-size: 16px;
  font-weight: 700;
  line-height: 22px;
}

.benchmark-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 16px;
  font-weight: 600;
  line-height: 22px;
  white-space: nowrap;
}

.benchmark-caption > img {
  display: block;
  transform: rotate(45deg);
}

.benchmark-mobile-title,
.site-menu .menu-mobile-nav,
.menu-mobile-footer {
  display: none;
}

@media (min-width: 768px) and (max-width: 1199px) {
  .menu-layout {
    grid-template-columns: 32% minmax(0, 1fr);
    column-gap: 32px;
    padding-inline: 32px;
  }

  .menu-header {
    padding-inline: 32px;
  }

  .site-menu .menu-services {
    font-size: clamp(30px, 3.89vw, 46px);
  }

  .menu-service {
    padding-left: 45px;
  }

  .site-menu .menu-pages {
    padding-left: 0;
    gap: 24px;
  }

  .benchmark-caption {
    font-size: 12px;
    white-space: normal;
  }

  .benchmark-desktop-title {
    font-size: 13px;
  }
}

@media (max-width: 767px) {
  .title-mobile {
    display: block;
    width: 314px;
    height: 40px;
  }

  .title-desktop {
    display: none;
  }

  .site-menu {
    background: #0b0b0b;
  }

  .menu-shell {
    min-height: 844px;
  }

  .menu-header {
    height: 86px;
    padding: 46px 16px 14px;
  }

  .menu-close {
    position: relative;
    width: 24px;
    height: 24px;
  }

  .menu-close img {
    display: none;
  }

  .menu-close::before,
  .menu-close::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 26px;
    height: 2px;
    border-radius: 4px;
    background: #fff;
    transform: translate(-50%, -50%) rotate(45.89deg);
  }

  .menu-close::after {
    transform: translate(-50%, -50%) rotate(-45.89deg);
  }

  .menu-layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 37px 16px 104px;
  }

  .menu-information,
  .site-menu .menu-services,
  .site-menu .menu-pages,
  .benchmark-desktop-title,
  .benchmark-caption {
    display: none;
  }

  .site-menu .menu-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 0;
    font: 600 22px/21px Inter, sans-serif;
  }

  .menu-mobile-nav > a,
  .services-toggle {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 51px;
    padding: 12px 0;
    border: 0;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    background: none;
    text-align: left;
  }

  .services-toggle {
    justify-content: space-between;
    font: inherit;
  }

  .services-toggle > span {
    position: relative;
    display: block;
    width: 18px;
    height: 18px;
    margin-right: 12px;
  }

  .services-toggle > span::before,
  .services-toggle > span::after {
    content: "";
    position: absolute;
    background: #fff;
    border-radius: 4px;
  }

  .services-toggle > span::before {
    left: 0;
    right: 0;
    top: 8px;
    height: 2px;
  }

  .services-toggle > span::after {
    top: 0;
    bottom: 0;
    left: 8px;
    width: 2px;
  }

  .services-toggle[aria-expanded="true"] > span::after {
    display: none;
  }

  .mobile-services {
    height: 0;
    overflow: hidden;
  }

  .mobile-services-inner {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 14px 24px 27px;
  }

  .mobile-services a {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 400;
    line-height: 21px;
  }

  .mobile-services img {
    display: block;
  }

  .menu-benchmark {
    width: 100%;
    margin-top: 56px;
  }

  .benchmark-image {
    border-color: #d96a15;
    box-shadow: 0 0 10px rgba(217, 106, 21, .28);
  }

  .benchmark-mobile-title {
    display: block;
    font-size: 16px;
    font-weight: 600;
    line-height: 22px;
  }

  .menu-mobile-footer {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-top: 44px;
    font-size: 14px;
    line-height: 18px;
  }

  .menu-mobile-footer .menu-social {
    flex-direction: row;
    gap: 30px;
  }

  .menu-mobile-footer .menu-social a {
    font-size: 14px;
    font-weight: 400;
  }

  .menu-mobile-footer p {
    margin: 0;
  }
}

@media (max-width: 360px) {
  .title-mobile,
  .title-mobile .title-track {
    width: 288px;
  }

  .title-row {
    font-size: 32px;
  }

  .menu-mobile-footer .menu-social {
    gap: 18px;
  }

  .benchmark-mobile-title {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .title-track {
    will-change: auto;
  }

  .action,
  .case-photo::after,
  .case-logo,
  .case-metric,
  .case-read,
  .cases-more,
  .read-arrow,
  .read-arrow img,
  .cases-more > img,
  .case-tags li {
    transition: none;
  }
}
