:root {
  --color-ink: #111111;
  --color-paper: #ffffff;
  --color-fog: #8a8a8a;
  --color-cyan: #39f6f3;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-reveal: cubic-bezier(0.25, 1, 0.5, 1);
  --duration-headline: 720ms;
  --duration-reveal: 550ms;
  --delay-service-1: 440ms;
  --delay-service-2: 610ms;
  --delay-service-3: 750ms;
  --duration-underline: 220ms;
  --duration-status: 160ms;
}

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

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--color-ink);
}

body {
  min-height: 100%;
  margin: 0;
  color: var(--color-paper);
  background: var(--color-ink);
  font-family: "Archivo", sans-serif;
}

button,
a {
  font: inherit;
}

.page-shell {
  position: relative;
  display: flex;
  min-height: 100svh;
  padding: 64px 96px;
  flex-direction: column;
  gap: 132px;
  overflow: hidden;
  isolation: isolate;
  background: var(--color-ink);
}

.artwork {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: 0;
  width: 900px;
  height: 690px;
  max-width: none;
  object-fit: cover;
  opacity: 0.8;
  mix-blend-mode: lighten;
  pointer-events: none;
  user-select: none;
}

.site-header {
  display: flex;
  align-items: flex-start;
}

.brand-lockup {
  display: block;
  width: 215.484px;
  height: 40px;
}

.homepage-main {
  display: flex;
  width: min(800px, 100%);
  flex-direction: column;
  align-items: flex-start;
  gap: 48px;
}

h1 {
  width: 100%;
  margin: 0;
  font-size: 48px;
  font-variation-settings: "wdth" 125, "wght" 400;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  text-wrap: pretty;
}

.service-list {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.service-item {
  position: relative;
  display: flex;
  min-height: 58px;
  margin: 0;
  padding: 0;
  align-items: baseline;
  gap: 14px;
  border: 0;
  color: var(--color-fog);
  background: transparent;
  text-align: left;
  text-decoration: none;
  cursor: default;
}

.service-name {
  position: relative;
  display: block;
  flex: 0 0 auto;
  font-size: 48px;
  font-variation-settings: "wdth" 125, "wght" 300;
  font-weight: 300;
  line-height: 1.2;
  white-space: nowrap;
}

.service-name::after {
  position: absolute;
  right: 0;
  bottom: 2px;
  left: 0;
  height: 2px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
}

.service-item--active {
  color: var(--color-cyan);
  cursor: pointer;
}

.coming-soon {
  color: var(--color-paper);
  font-size: 16px;
  font-variation-settings: "wdth" 125, "wght" 300;
  font-weight: 300;
  line-height: 1.2;
  opacity: 0;
  white-space: nowrap;
}

.service-item:focus-visible {
  outline: 2px solid var(--color-paper);
  outline-offset: 4px;
}

.reveal {
  --reveal-distance: 12px;
  animation: reveal-content var(--duration-reveal) var(--ease-reveal) backwards;
}

.reveal--headline {
  --reveal-distance: 20px;
  animation-duration: var(--duration-headline);
}

.reveal--service-1 {
  animation-delay: var(--delay-service-1);
}

.reveal--service-2 {
  animation-delay: var(--delay-service-2);
}

.reveal--service-3 {
  animation-delay: var(--delay-service-3);
}

.service-list:focus-within .reveal {
  /* Show focused navigation immediately while the entrance timeline finishes. */
  opacity: 1 !important;
  transform: none !important;
}

@keyframes reveal-content {
  from {
    opacity: 0;
    transform: translateY(var(--reveal-distance));
  }
}

.service-item:focus-visible .service-name::after {
  transform: scaleX(1);
}

@media (hover: hover) and (pointer: fine) {
  .service-item:not(:focus-visible) .service-name::after {
    transition: transform var(--duration-underline) var(--ease-out);
  }

  .service-item:hover .service-name::after {
    transform: scaleX(1);
  }
}

@media (width > 600px) {
  .service-list {
    /* Fit the longest hover row between the 96px insets and 14px gap. */
    --service-text-size: min(48px, calc((100vw - 206px) * 0.0597));
    width: max-content;
  }

  .service-name,
  .coming-soon {
    font-size: var(--service-text-size);
  }

  .service-item--coming-soon .service-name {
    color: color-mix(in srgb, var(--color-fog) 76%, transparent);
  }

  .service-item--coming-soon .service-name::after {
    background: var(--color-paper);
  }

  .coming-soon {
    color: color-mix(in srgb, var(--color-paper) 76%, transparent);
    visibility: hidden;
  }

  .service-item--coming-soon:focus-visible .service-name {
    color: color-mix(in srgb, var(--color-paper) 76%, transparent);
  }

  .service-item--coming-soon:focus-visible .coming-soon {
    visibility: visible;
    opacity: 1;
  }

  @media (hover: hover) and (pointer: fine) {
    .service-item--coming-soon:not(:focus-visible) .coming-soon {
      transition:
        opacity var(--duration-status) var(--ease-out),
        visibility 0ms var(--duration-status);
    }

    .service-item--coming-soon:hover .service-name {
      color: color-mix(in srgb, var(--color-paper) 76%, transparent);
    }

    .service-item--coming-soon:hover .coming-soon {
      visibility: visible;
      opacity: 1;
      transition-delay: 0ms;
    }
  }
}

@media (max-width: 600px) {
  .page-shell {
    min-height: 780px;
    padding: 40px 24px;
    gap: 98px;
  }

  .artwork {
    width: 520px;
    height: 398.667px;
  }

  .brand-lockup {
    width: 172.387px;
    height: 32px;
  }

  .homepage-main {
    gap: 40px;
  }

  h1 {
    max-width: 342px;
    font-size: 28px;
    line-height: 1.05;
    letter-spacing: 0;
    text-wrap: wrap;
  }

  .service-list {
    gap: 4px;
  }

  .service-item {
    min-height: 44px;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .service-item--coming-soon {
    min-height: 64px;
  }

  .service-name {
    font-size: 29px;
    line-height: 36px;
  }

  .service-name::after {
    bottom: 0;
  }

  .coming-soon {
    font-size: 16px;
    line-height: 20px;
    opacity: 0.7;
  }

  .coming-soon__arrow {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    animation-name: reveal-opacity;
    animation-duration: 160ms;
    animation-delay: 0ms;
  }

  .service-item:not(:focus-visible) .service-name::after,
  .service-item--coming-soon:not(:focus-visible) .coming-soon,
  .service-item--coming-soon:hover .coming-soon {
    transition: none;
  }
}

@keyframes reveal-opacity {
  from {
    opacity: 0;
  }
}
