@keyframes home-enter {
  from { opacity: .58; transform: translateY(var(--home-entry-distance, 1rem)); }
  to { opacity: 1; transform: none; }
}

@keyframes home-photo-drift {
  from { transform: translateY(-1.1%) scale(1.032); }
  to { transform: translateY(1.1%) scale(1.032); }
}

@keyframes home-product-reflection {
  0% { opacity: 0; transform: translateX(-90%); }
  30%, 65% { opacity: .55; }
  100% { opacity: 0; transform: translateX(90%); }
}

.home-startup { display: none; }

.home-proof-case > a > span::after {
  display: inline-block;
  margin-inline-start: .45rem;
  content: '→';
}

:is(.home-proof-case, .home-editorial-card) > a:focus-visible {
  --home-case-arrow-shift: .27rem;
  --home-editorial-image-scale: 1.055;
  border-color: #7d9bb9;
}

.home-editorial-card > a:focus-visible h3 {
  text-decoration: underline;
  text-underline-offset: .2em;
}

@media (hover: hover) and (pointer: fine) {
  :is(.home-proof-case, .home-editorial-card) > a:hover {
    --home-case-arrow-shift: .27rem;
    --home-editorial-image-scale: 1.055;
    border-color: #7d9bb9;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-proof-case > a { transition: none; }
}

.hero-intro.hero-services {
  position: relative;
  width: min(100%, 40rem);
  max-width: none;
  margin-top: clamp(1.15rem, 2.4vw, 2.6rem);
  color: var(--white);
  font-size: clamp(1.25rem, 2.4vw, 2.65rem);
  font-weight: 690;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -.045em;
}
.hero-service-list {
  display: flex;
  flex-wrap: wrap;
  gap: .6em 1.45em;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: .58em;
  font-style: normal;
  letter-spacing: 0;
}
.hero-services.is-ready .hero-service-list {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.hero-service-window {
  min-width: 0;
  min-height: 2.22em;
  display: grid;
  align-items: center;
  overflow: hidden;
}
.hero-service-window span { grid-area: 1 / 1; padding-block: .11em; overflow-wrap: anywhere; }
[data-hero-service-next] { opacity: 0; }
.hero-projects .client-logo--journal { width: clamp(8.5rem, 12vw, 10.75rem); }

@media (max-width: 980px) {
  .hero-projects > span { grid-column: 1 / -1; }
  .hero-projects .client-logo--journal { grid-column: span 2; width: min(100%, 10.75rem); }
}

@media (max-width: 820px) {
  .hero-intro.hero-services { margin-top: .85rem; font-size: clamp(1.12rem, 5.45vw, 2rem); }
}

@media (max-width: 480px) {
  .hero-projects .client-logo--journal { grid-column: auto; width: 100%; }
}

@media (prefers-reduced-motion: no-preference) {
  .home-proof-case > a > span::after {
    transform: translateX(var(--home-case-arrow-shift, 0));
    transition: transform .22s ease-out;
  }

  .home-editorial-image img {
    transform: scale(var(--home-editorial-image-scale, 1));
    transition: transform .36s cubic-bezier(.22, 1, .36, 1);
  }

  .home-startup {
    position: fixed;
    z-index: 10;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 1.4rem;
    background: #080808;
    color: var(--white);
    transition: opacity .25s ease;
  }

  .home-startup.is-leaving {
    opacity: 0;
    pointer-events: none;
  }

  .home-startup-content {
    display: grid;
    justify-items: center;
    gap: clamp(1.2rem, 4vw, 2.15rem);
    padding-bottom: 2vh;
  }

  .home-startup-content img {
    width: clamp(3.7rem, 8vw, 6.4rem);
    height: auto;
  }

  .home-startup-wordmark {
    display: grid;
    justify-items: center;
    gap: .33em;
    font-size: clamp(2.55rem, 8.7vw, 6.35rem);
    line-height: .98;
  }

  .home-startup-line {
    position: relative;
    white-space: nowrap;
    font-weight: 740;
    letter-spacing: -.065em;
  }

  .home-startup-line + .home-startup-line {
    color: #bbc8d7;
    font-size: .42em;
    font-weight: 550;
    letter-spacing: .055em;
  }

  .home-startup-label { visibility: hidden; }
  .home-startup-typed { position: absolute; inset: 0; }
  .home-startup-typed.has-caret::after {
    display: inline-block;
    width: .045em;
    height: .78em;
    margin-inline-start: .11em;
    vertical-align: -.04em;
    border-radius: 1px;
    background: #9bceff;
    box-shadow: 0 0 .6rem #65adff99;
    content: '';
  }

  .hero-copy > :is(h1, .hero-intro) {
    animation: home-enter .72s cubic-bezier(.22, 1, .36, 1) backwards;
  }

  body:has(.home-startup:not([hidden], .is-leaving)) .hero-copy > :is(h1, .hero-intro) {
    animation-play-state: paused;
  }

  .hero-copy > .hero-intro { animation-delay: .09s; }

  [data-home-reveal]:not(:focus-within).is-entering {
    animation: home-enter .56s cubic-bezier(.22, 1, .36, 1);
  }

  @supports (animation-timeline: view()) and (animation-range: entry 0% entry 65%) {
    [data-home-reveal]:not(:focus-within) {
      animation: home-enter auto cubic-bezier(.2, .65, .35, 1) both;
      animation-timeline: view();
      animation-range: entry 0% entry 65%;
    }

    @media (min-width: 701px) {
      :is(.service-card, .home-editorial-card) { --home-entry-distance: 1.7rem; }
      .service-art--photo { view-timeline-name: --service-photo; }

      .service-art--photo img {
        animation: home-photo-drift auto linear both;
        animation-timeline: --service-photo;
      }
    }
  }

  .service-art--photo { position: relative; }
  .service-art--photo::after {
    position: absolute;
    inset: 0;
    box-shadow: inset 0 0 0 1px #8ec5fc80, inset 0 0 1.25rem #3f77c735;
    content: '';
    opacity: 0;
    pointer-events: none;
    transition: opacity .26s ease-out;
  }

  .home-product-media::after {
    position: absolute;
    inset: 0;
    background: linear-gradient(112deg, transparent 38%, #b0c9f730 49%, #b7b3ed25 53%, transparent 64%);
    content: '';
    opacity: 0;
    pointer-events: none;
  }

  .home-product-link span { transition: transform .24s ease; }
  .home-product-link:focus-visible span { transform: translateX(.3rem); }
  .service-card:focus-within .service-art--photo::after { opacity: 1; }
  .home-product-feature:has(:focus-visible) .home-product-media::after { animation: home-product-reflection .9s ease-out; }

  @media (hover: hover) and (pointer: fine) {
    .home-product-link:hover span { transform: translateX(.3rem); }
    .service-card:hover .service-art--photo::after { opacity: 1; }
    .home-product-feature:hover .home-product-media::after { animation: home-product-reflection .9s ease-out; }
  }
}
