:root {
  color-scheme: light;
  --ink: #202124;
  --soft-ink: #555b61;
  --paper: #f8f9f8;
  --line: rgba(255, 255, 255, 0.92);
  --shadow: rgba(32, 33, 36, 0.18);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(118, 118, 118, 0.78) 0%, rgba(226, 226, 226, 0.9) 42%, #ffffff 51%, rgba(226, 226, 226, 0.92) 60%, rgba(132, 132, 132, 0.84) 100%);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-shadow: 3px -2px #9a9cbb, -2px 0 #fff, 0 2px #fff, 0 -2px #fff, 1px 1px #fff, -1px -1px #fff, 1px -1px #fff, -1px 1px #fff;
}

body::before,
body::after {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  content: "";
}

body::before {
  background:
    radial-gradient(ellipse at 50% 50%, rgba(255, 255, 255, 0.96) 0 9%, rgba(255, 255, 255, 0.58) 18%, rgba(255, 255, 255, 0) 40%),
    linear-gradient(90deg, rgba(248, 249, 248, 0.18), rgba(248, 249, 248, 0) 18% 82%, rgba(248, 249, 248, 0.2));
}

body::after {
  border: 1px solid rgba(32, 33, 36, 0.28);
  border-radius: 0.75rem;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.46);
}

.grid-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.site-shell {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
}

.home-view {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: clamp(1.5rem, 4vw, 4rem);
}

.brand-lockup {
  width: min(100%, 46rem);
  padding: clamp(1rem, 4vw, 2rem);
  display: grid;
  justify-items: center;
  gap: clamp(0.7rem, 1.8vw, 1.05rem);
  text-align: center;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.78)) drop-shadow(0 1rem 2.5rem rgba(32, 33, 36, 0.18));
  transition:
    opacity 420ms var(--ease-in-out),
    transform 650ms var(--ease-out),
    filter 500ms ease;
}

.wordmark,
.tagline {
  display: block;
  max-width: 100%;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.wordmark {
  width: min(76vw, 44rem);
}

.tagline {
  width: min(44vw, 16rem);
  opacity: 0.9;
}

.spatial-navigation {
  position: fixed;
  top: calc(50% + clamp(6.5rem, 11vw, 9rem));
  left: 50%;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: clamp(1.5rem, 4vw, 3.75rem);
  width: max-content;
  pointer-events: none;
  transform: translateX(-50%);
}

.nav-link {
  --travel-x: 0px;
  --travel-y: 0px;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.3rem 0.15rem;
  color: var(--ink);
  font-size: clamp(0.82rem, 1.15vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  pointer-events: auto;
  transition:
    color 220ms ease,
    opacity 420ms var(--ease-in-out),
    transform 700ms var(--ease-out),
    filter 420ms ease;
}

.nav-link::after {
  position: absolute;
  right: 0.15rem;
  bottom: 0;
  left: 0.15rem;
  height: 1px;
  background: currentColor;
  content: "";
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms var(--ease-out);
}

.nav-link:hover::after,
.nav-link:focus-visible::after {
  transform: scaleX(1);
}

.nav-link:focus-visible,
.back-button:focus-visible,
.page-action:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.45rem;
}

.site-shell.is-transitioning .brand-lockup,
.site-shell.is-page-open .brand-lockup {
  opacity: 0;
  filter: blur(10px);
  transform: scale(0.92);
}

.site-shell.is-transitioning .nav-link:not(.is-selected),
.site-shell.is-page-open .nav-link:not(.is-selected) {
  opacity: 0;
  filter: blur(8px);
  pointer-events: none;
}

.site-shell.is-transitioning .nav-link.is-selected {
  transform: translate3d(var(--travel-x), var(--travel-y), 0) scale(1.08);
}

.site-shell.is-page-open .nav-link.is-selected {
  transform: translate3d(var(--travel-x), var(--travel-y), 0) scale(1.08);
}

.site-shell.is-page-open .nav-link {
  opacity: 0;
  pointer-events: none;
}

.page-view {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  overflow: auto;
  padding: clamp(5rem, 10vw, 8rem) clamp(1.5rem, 8vw, 8rem) clamp(3rem, 7vw, 6rem);
  background: rgba(248, 249, 248, 0.12);
  opacity: 0;
  visibility: hidden;
  transition: opacity 520ms var(--ease-out), visibility 0s linear 520ms;
}

.page-view[hidden] {
  display: grid;
}

.site-shell.is-page-open .page-view {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.back-button {
  position: fixed;
  top: clamp(1.4rem, 4vw, 3rem);
  left: clamp(1.4rem, 4vw, 3rem);
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  border: 0;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0.45rem 0.7rem 0.45rem 0.45rem;
  color: var(--ink);
  background: rgba(248, 249, 248, 0.7);
  backdrop-filter: blur(12px);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 220ms ease, transform 240ms var(--ease-out);
}

.back-button img {
  width: 1.35rem;
  height: 1.35rem;
}

.back-button:hover {
  background: rgba(248, 249, 248, 0.94);
  transform: translateX(-0.18rem);
}

.content-page {
  width: min(100%, 64rem);
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 540ms 100ms var(--ease-out), transform 650ms 100ms var(--ease-out);
}

.content-page:focus {
  outline: none;
}

.content-page.is-active {
  opacity: 1;
  transform: translateY(0);
}

.content-page--apps {
  width: min(100%, 76rem);
}

.content-page--apps h2 {
  font-size: clamp(3.1rem, 7.2vw, 7rem);
}

.page-kicker {
  margin: 0 0 clamp(2rem, 5vw, 4.5rem);
  color: var(--soft-ink);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.content-page h2 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(3.15rem, 8.5vw, 8.5rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.86;
}

.page-intro {
  max-width: 39rem;
  margin: clamp(2rem, 5vw, 4.5rem) 0 0 auto;
  color: #303337;
  font-size: clamp(1.08rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.page-note {
  max-width: 39rem;
  margin: 1.5rem 0 0 auto;
  color: var(--soft-ink);
  font-size: clamp(0.95rem, 1.35vw, 1.12rem);
  line-height: 1.65;
}

.service-list {
  max-width: 39rem;
  margin: clamp(2rem, 4vw, 3.5rem) 0 0 auto;
  border-top: 1px solid rgba(32, 33, 36, 0.42);
}

.service-list p {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  margin: 0;
  padding: 0.9rem 0;
  border-bottom: 1px solid rgba(32, 33, 36, 0.25);
  font-size: clamp(0.96rem, 1.4vw, 1.1rem);
}

.service-list span {
  color: var(--soft-ink);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.8rem, 2vw, 1.5rem);
  margin-top: clamp(2.5rem, 5vw, 4.5rem);
}

.app-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.45rem 0.9rem;
  align-content: start;
  min-width: 0;
  color: var(--ink);
  text-decoration: none;
}

.app-card img {
  grid-column: 1 / -1;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  margin-bottom: 0.65rem;
  object-fit: cover;
  filter: grayscale(1) contrast(1.08);
  transition: filter 420ms ease, transform 520ms var(--ease-out);
}

.app-card:hover img,
.app-card:focus-visible img {
  filter: grayscale(1) contrast(1.15);
  transform: translateY(-0.35rem);
}

.app-card:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.5rem;
}

.app-card__number {
  grid-row: 2 / span 2;
  color: var(--soft-ink);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
}

.app-card__name {
  font-size: clamp(1.05rem, 1.7vw, 1.45rem);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.app-card__type {
  color: var(--soft-ink);
  font-size: 0.78rem;
  line-height: 1.4;
}

.app-detail {
  align-self: start;
  min-width: 0;
  max-width: 100%;
  width: min(100%, 76rem);
  padding: clamp(1rem, 3vw, 2.5rem);
  opacity: 0;
  transform: translateY(2rem);
  transition: opacity 520ms var(--ease-out), transform 620ms var(--ease-out);
}

.app-detail:focus {
  outline: none;
}

.app-detail.is-active {
  opacity: 1;
  transform: translateY(0);
}

.app-detail__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem 3rem;
  margin-bottom: clamp(2rem, 5vw, 4.5rem);
}

.app-detail__header .page-kicker {
  grid-column: 1;
  margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
}

.app-detail__meta {
  grid-column: 2;
  grid-row: 1;
  margin: 0 0 clamp(1.5rem, 3vw, 2.5rem);
  color: var(--soft-ink);
  font-size: 0.7rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-align: right;
  text-transform: uppercase;
}

.app-detail h2 {
  grid-column: 1 / -1;
  margin: 0;
  font-size: clamp(4rem, 10vw, 9.5rem);
  font-weight: 650;
  letter-spacing: -0.075em;
  line-height: 0.82;
}

.app-detail__lede {
  grid-column: 2;
  max-width: 32rem;
  margin: clamp(1.5rem, 3vw, 2.8rem) 0 0;
  color: #303337;
  font-size: clamp(1.1rem, 1.8vw, 1.45rem);
  letter-spacing: -0.02em;
  line-height: 1.45;
}

.app-detail__visual {
  margin: 0;
}

.app-detail__visual img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: contain;
  filter: grayscale(1) contrast(1.08);
}

.app-gallery {
  min-width: 0;
  padding: clamp(4rem, 8vw, 8rem) 0 clamp(3rem, 6vw, 6rem);
}

.app-gallery__header {
  display: grid;
  grid-template-columns: minmax(12rem, 0.8fr) minmax(18rem, 1.2fr);
  gap: clamp(2rem, 6vw, 7rem);
  align-items: end;
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
}

.app-gallery__header .app-detail__eyebrow {
  margin: 0;
}

.app-gallery__header h3 {
  max-width: 15ch;
  margin: 0;
  font-size: clamp(2.4rem, 5vw, 5.4rem);
  font-weight: 650;
  letter-spacing: -0.065em;
  line-height: 0.92;
}

.app-gallery__track {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.5vw, 2.5rem);
}

.app-gallery__item {
  min-width: 0;
  margin: 0;
}

.app-gallery__item:nth-child(2) {
  margin-top: clamp(2rem, 6vw, 6rem);
}

.app-gallery__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: cover;
  background: #d9d9d9;
  filter: grayscale(1) contrast(1.08);
}

.app-gallery__item figcaption {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(32, 33, 36, 0.3);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-gallery__item figcaption span {
  color: var(--soft-ink);
  font-size: 0.62rem;
}

.app-detail__body {
  display: grid;
  grid-template-columns: minmax(14rem, 0.85fr) minmax(18rem, 1.15fr);
  gap: clamp(2rem, 6vw, 7rem);
  padding: clamp(3rem, 7vw, 7rem) 0 clamp(2rem, 5vw, 5rem);
}

.app-detail__eyebrow {
  margin: 0 0 1rem;
  color: var(--soft-ink);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.app-detail__body h3 {
  max-width: 13ch;
  margin: 0;
  font-size: clamp(2.4rem, 4.7vw, 4.8rem);
  font-weight: 650;
  letter-spacing: -0.06em;
  line-height: 0.95;
}

.app-detail__copy {
  font-size: clamp(1rem, 1.35vw, 1.15rem);
  line-height: 1.65;
}

.app-detail__copy > p {
  margin: 0 0 2rem;
}

.app-feature-list {
  padding: 0;
  margin: 0 0 2.5rem;
  border-top: 1px solid rgba(32, 33, 36, 0.4);
  list-style: none;
}

.app-feature-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid rgba(32, 33, 36, 0.24);
}

.app-detail__action {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  border-bottom: 1px solid currentColor;
  color: var(--ink);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.app-detail__action:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 0.45rem;
}

.page-action {
  display: table;
  margin: clamp(2.5rem, 5vw, 4.5rem) 0 0 auto;
  border-bottom: 1px solid currentColor;
  padding: 0.25rem 0 0.45rem;
  color: var(--ink);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 650;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 640px) {
  body::after {
    border-radius: 0;
  }

  .brand-lockup {
    padding: 1rem;
  }

  .wordmark {
    width: min(88vw, 24rem);
  }

  .tagline {
    width: min(58vw, 12rem);
  }

  .nav-link {
    font-size: 0.72rem;
    letter-spacing: 0.16em;
  }

  .spatial-navigation {
    top: calc(50% + clamp(5.5rem, 22vw, 7rem));
    gap: clamp(0.85rem, 5vw, 1.5rem);
  }

  .page-view {
    align-items: start;
    padding: 6rem 1rem 3rem;
  }

  .content-page {
    padding: 1rem 0.5rem;
  }

  .content-page h2 {
    font-size: clamp(3rem, 16vw, 5.25rem);
  }

  .page-intro,
  .page-note,
  .service-list,
  .page-action {
    margin-left: 0;
  }

  .back-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .back-button {
    padding: 0.45rem;
  }

  .app-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .app-detail {
    padding: 1rem 0.5rem;
  }

  .app-detail__header {
    display: block;
    margin-bottom: 2.5rem;
  }

  .app-detail__header .page-kicker {
    margin-bottom: 1rem;
  }

  .app-detail__meta {
    margin-bottom: 2rem;
    text-align: left;
  }

  .app-detail h2 {
    font-size: clamp(3.6rem, 18vw, 5.3rem);
    line-height: 0.86;
  }

  .app-detail__lede {
    margin-top: 1.5rem;
  }

  .app-detail__visual {
    margin-right: -0.5rem;
    margin-left: -0.5rem;
  }

  .app-gallery {
    padding: 4rem 0 3rem;
  }

  .app-gallery__header {
    display: block;
    margin-bottom: 2rem;
  }

  .app-gallery__header .app-detail__eyebrow {
    margin-bottom: 1rem;
  }

  .app-gallery__header h3 {
    font-size: clamp(2.6rem, 13vw, 4.2rem);
  }

  .app-gallery__track {
    display: flex;
    width: 100%;
    gap: 0.85rem;
    margin-right: -1rem;
    overflow-x: auto;
    padding-right: 1rem;
    padding-bottom: 1rem;
    scroll-snap-type: x mandatory;
    overscroll-behavior-inline: contain;
  }

  .app-gallery__item,
  .app-gallery__item:nth-child(2) {
    flex: 0 0 78vw;
    margin-top: 0;
    scroll-snap-align: start;
  }

  .app-detail__body {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}
