.spatial-home {
  position: relative;
}

.spatial-home > .studio-header {
  position: absolute;
}

.spatial-portfolio {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  clip-path: inset(0);
}

.spatial-portfolio > :is(.spatial-screen, .spatial-content) {
  grid-area: 1 / 1;
}

.spatial-portfolio > .spatial-screen {
  align-self: start;
  height: 100vh;
  height: 100svh;
  margin-bottom: 0;
}

.spatial-chapter {
  overflow: hidden;
}

.spatial-opening .spatial-copy h1 {
  margin-inline: auto;
  max-width: 13ch;
  font-size: clamp(76px, 11.1vw, 174px);
  letter-spacing: -.038em;
  line-height: .9;
}

.spatial-opening {
  padding-block: clamp(112px, 15.2svh, 160px) 33px;
}

.spatial-opening .spatial-copy h1 em {
  color: #c5e5d9;
  font-weight: inherit;
}

.spatial-opening-cta {
  margin-top: 21px;
  min-height: 46px;
  padding-inline: 20px;
  border-radius: 3px;
  font-family: system-ui, sans-serif;
  gap: 11px;
}

.spatial-opening-cta:hover {
  background: radial-gradient(circle at var(--spot, 50%) 50%, #f3fffc, #c9eade 75%);
  box-shadow: 0 0 24px #a3fff45e;
}

.spatial-opening-cta span { display: inline-block; transition: transform 220ms ease; }
.spatial-opening-cta:hover span { transform: translateX(var(--magnet, 2px)); }

.spatial-opening > .spatial-hero-workflow {
  width: min(1020px, calc(100% - 36px));
  margin: 7px auto 0;
}

.spatial-route-window {
  position: relative;
  height: clamp(159px, 29svh, 294px);
  display: grid;
  align-items: center;
  isolation: isolate;
}

.spatial-route-window--service {
  height: clamp(177px, 31svh, 314px);
}

.spatial-route-window[data-orbit-ready] {
  touch-action: pan-y;
  cursor: grab;
}
.spatial-route-window[data-orbit-dragging] { cursor: grabbing; }

.spatial-orbit-hint {
  display: none;
  position: absolute;
  right: 8px;
  bottom: 8px;
  color: #cae0e7;
  font: 550 .69rem/1.35 system-ui, sans-serif;
  text-shadow: 0 2px 8px #08101b;
}
.spatial-route-window[data-orbit-ready] .spatial-orbit-hint { display: block; }

.spatial-route-still {
  position: relative;
  width: min(64%, 310px);
  justify-self: center;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(90deg, transparent,#b2dfeb80,transparent) center/100% 1px no-repeat;
}
.spatial-route-still i {
  display: block;
  width: 30px;
  aspect-ratio: 4/5;
  border: 1px solid #7fbbc6;
  border-radius: 3px;
  background: repeating-linear-gradient(0deg,#49718056 0 1px,#152530 1px 8px);
  transform: skewY(-11deg);
}
.spatial-route-still i:nth-child(2) { transform: translateY(13px) skewY(9deg); }
.spatial-route-still i:nth-child(3) { transform: translateY(-10px) skewY(-9deg); }
.spatial-portfolio[data-hero-graphics] .spatial-route-still { visibility: hidden; }

.spatial-route-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 5px 15px;
}
.spatial-route-controls[hidden] { display: none; }
.spatial-route-controls ol {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  column-gap: 14px;
  row-gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.spatial-route-controls li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #c1d3dd;
  font: 550 .73rem/1.3 system-ui, sans-serif;
}
.spatial-route-controls li::before {
  content: "";
  width: 5px;
  height: 5px;
  border: 1px solid #a2c5d1;
  border-radius: 50%;
}
.spatial-route-controls li[data-passed] { color: #d6fff8; }
.spatial-route-controls li[data-passed]::before { background: #98ffed; }
.spatial-route-controls li[aria-current="step"]::before { box-shadow: 0 0 9px #82f5ea; }
.spatial-run {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 10px;
  padding: 5px 11px;
  border: 1px solid #84acb9a1;
  border-radius: 3px;
  background: #111e2be8;
  color: #e6f8fa;
  font: 630 .82rem/1.3 system-ui, sans-serif;
  cursor: pointer;
}
.spatial-run:is(:hover,:focus-visible) {
  border-color: #b2fff1;
  background: #25424c;
}
.spatial-run span { color: #a8ebde; }
.spatial-run[hidden] { display: none; }
.spatial-run:focus-visible,
.spatial-route-window:focus-visible {
  outline: 2px solid #b8e8f2;
  outline-offset: 4px;
}
.spatial-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
  white-space: nowrap;
}

.spatial-opening .spatial-copy > p:not(.spatial-kicker) {
  font-family: system-ui, sans-serif;
}

.spatial-opening > .spatial-opening-links {
  position: relative;
  margin-block: clamp(22px, 5svh, 47px) 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid #bdded86e;
}

.spatial-opening-links .spatial-scroll {
  position: static;
  display: inline-flex;
  gap: 10px;
  padding: 10px 0;
  font-family: system-ui, sans-serif;
  letter-spacing: .08em;
}

.spatial-screen {
  background: radial-gradient(ellipse at 51% 47%, #192934 0, #0c141e 58%, #090e16 93%);
}

.spatial-screen[data-rendering="webgl"] + .spatial-content .spatial-opening > .spatial-fallback-photo {
  opacity: .20;
  mask-image: linear-gradient(0deg, transparent, #000 35% 82%, transparent);
}

.spatial-opening::after {
  background: radial-gradient(ellipse at 50% 27%, #090e15b8, transparent 60%);
}

.spatial-services-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(0, .55fr);
  align-items: end;
  gap: 22px clamp(28px, 8vw, 120px);
  padding-block: clamp(70px, 12svh, 138px) clamp(26px, 5svh, 54px);
}

.spatial-services-intro h2,
.spatial-module h3 {
  margin: 0;
  color: #edf4f3;
  font: 400 clamp(50px, 7.75vw, 122px)/.94 var(--studio-display);
  letter-spacing: -.04em;
  text-wrap: balance;
}

.spatial-services-intro > p {
  margin: 0 0 4px;
  color: #c6d9dd;
  font: 510 clamp(.94rem, 1.3vw, 1.15rem)/1.52 system-ui, sans-serif;
  max-width: 40ch;
}

.spatial-module {
  --flow-accent: #a9f4ef;
  --path-progress: 0;
  min-height: min(690px, 78svh);
  padding-block: clamp(52px, 9svh, 99px);
  align-content: center;
}

.spatial-module[data-offer="job-system-migration"] { --flow-accent: #b2c8ff; }
.spatial-module[data-offer="job-to-invoice"] { --flow-accent: #b0edca; }
.spatial-module[data-offer="ai-intake"] { --flow-accent: #d9ccff; }
.spatial-module[data-offer="workflow-support"] { --flow-accent: #a9e8dd; }

.spatial-module::after {
  background:
    radial-gradient(ellipse at 79% 49%, color-mix(in srgb, var(--flow-accent) 13%, transparent), transparent 58%),
    linear-gradient(90deg, #0a111be3, #0c16256b 37%, transparent 65%);
  opacity: .62;
}

.spatial-module[data-route-active]::after { opacity: .95; }

.spatial-module::before {
  content: "";
  position: absolute;
  inset: 0 clamp(18px, 5vw, 92px) auto;
  height: 1px;
  z-index: 1;
  background: linear-gradient(90deg, #91b0ba35 4%, #91b0ba75 56%, #91b0ba26 96%);
}

.spatial-module:is([data-route-active], [data-route-linked])::before {
  background: linear-gradient(90deg, #91b0ba35, var(--flow-accent) 48%, #91b0ba26 95%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--flow-accent) 29%, transparent);
}

.spatial-module-layout {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  align-items: center;
  gap: clamp(32px, 6vw, 98px);
}

.spatial-module-copy { text-shadow: 0 1px 17px #0a111b; }
.spatial-module .spatial-kicker { color: var(--flow-accent); }

.spatial-module h3 {
  font-size: clamp(40px, 5.25vw, 82px);
  text-wrap: pretty;
}

.spatial-module .spatial-module-copy > p:not(.spatial-kicker) {
  color: #d2e4ea;
  font: 470 clamp(1rem, 1.29vw, 1.16rem)/1.58 system-ui, sans-serif;
  margin-top: 19px;
}

.spatial-module-path {
  min-width: 0;
  font-family: system-ui, sans-serif;
}

.spatial-flow-chain {
  --step-gap: 12px;
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--step-gap);
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  background: linear-gradient(90deg, #789eac5c, #789eac83, #789eac38) left 6px / 100% 1px no-repeat;
}

.spatial-flow-chain::after {
  content: "";
  position: absolute;
  inset: 6px auto auto 0;
  width: calc(var(--flow-position, var(--path-progress)) * (100% + var(--step-gap)) / 1.5);
  height: 1px;
  background: linear-gradient(90deg, #a1d9e64c, var(--flow-accent) 92%, white);
  box-shadow: 0 0 11px color-mix(in srgb, var(--flow-accent) 74%, transparent);
  pointer-events: none;
}

.spatial-module[data-route-state="1"] { --path-progress: .5; }
.spatial-module[data-route-state="2"] { --path-progress: 1; }

.spatial-flow-chain li {
  position: relative;
  min-width: 0;
  padding-top: 20px;
  text-shadow: 0 1px 10px #060d14;
}

.spatial-flow-chain li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  z-index: 1;
  border: 1px solid #b2cbd5;
  background: #192c3c;
}

.spatial-flow-chain li[data-passed]::before {
  background-color: var(--flow-accent);
  border-color: var(--flow-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--flow-accent) 70%, transparent);
}

.spatial-flow-chain li[aria-current="step"]::before { box-shadow: 0 0 10px var(--flow-accent), 0 0 2px 3px #1e4051; }

.spatial-flow-chain li > span {
  display: block;
  color: var(--flow-accent);
  font: 580 .69rem/1.35 system-ui, sans-serif;
  text-transform: uppercase;
  letter-spacing: .105em;
}

.spatial-flow-chain li > strong {
  display: block;
  margin-top: 6px;
  color: #eff8f9;
  font: 560 clamp(.84rem, 1.35vw, 1.15rem)/1.38 system-ui, sans-serif;
  overflow-wrap: break-word;
}

.spatial-flow-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: 14px;
  gap: 9px;
  color: var(--flow-accent);
  font: 650 .9rem/1.35 system-ui, sans-serif;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.spatial-flow-link:is(:hover, :focus-visible) { color: #fff; }
.spatial-module .spatial-run { background: #11232de8; }
.spatial-module .spatial-run:is(:hover, :focus-visible) {
  background: radial-gradient(circle at var(--spot, 50%) 50%, #204855, #11232d);
  border-color: var(--flow-accent);
}
.spatial-module .spatial-run span { color: var(--flow-accent); }

@media (min-width: 900px) {
  .spatial-module:nth-of-type(even) .spatial-module-layout {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
  }
  .spatial-module:nth-of-type(even) .spatial-module-path { grid-area: 1 / 1; }
  .spatial-module:nth-of-type(even) .spatial-module-copy { grid-area: 1 / 2; }
  .spatial-module:nth-of-type(even)::after {
    background:
      radial-gradient(ellipse at 19% 49%, color-mix(in srgb, var(--flow-accent) 13%, transparent), transparent 57%),
      linear-gradient(270deg, #0a111be0, #0c16256a 35%, transparent 66%);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .spatial-portfolio[data-opening-ready] .spatial-opening .spatial-copy > * {
    animation: workflow-reveal 720ms cubic-bezier(.18,.63,.27,1) both;
  }
  .spatial-portfolio[data-opening-ready] .spatial-opening h1 { animation-delay: 60ms; }
  .spatial-portfolio[data-opening-ready] .spatial-opening .spatial-copy > p:nth-of-type(2) { animation-delay: 150ms; }
  .spatial-portfolio[data-opening-ready] .spatial-opening-cta { animation-delay: 225ms; }
  .spatial-module-path,
  .spatial-run,
  .spatial-run span,
  .spatial-flow-link span {
    transition: transform 320ms cubic-bezier(.25,1.49,.43,1), background-color 200ms ease, box-shadow 200ms ease;
  }
  .spatial-module[data-route-active] .spatial-module-path { transform: translateY(-4px); }
  .spatial-module::after { transition: opacity 540ms ease; }
  .spatial-run:hover { transform: translateY(-2px); box-shadow: 0 0 19px #6ed9e747; }
  .spatial-run:active { transform: translateY(1px); }
  .spatial-run:hover span { transform: translateX(var(--magnet, 3px)); }
  .spatial-flow-link:is(:hover, :focus-visible) span { transform: translate(2px, -2px); }
  @keyframes workflow-reveal {
    from { opacity: .46; transform: translateY(13px); }
    to { opacity: 1; transform: none; }
  }
}

.spatial-project .spatial-copy {
  text-shadow: 0 2px 20px #08121ebe;
}

.spatial-project .spatial-action {
  text-shadow: none;
}

@media (min-width: 900px) {
  .spatial-project:nth-child(2) .spatial-copy {
    max-width: min(55%, 730px);
    margin-inline-start: auto;
  }

  .spatial-project:nth-child(2)::after {
    background: linear-gradient(0deg, #0c1522, #0d1723dc 19%, #121e2d39 57%, transparent 82%),
      linear-gradient(270deg, #0d1723bd, transparent 66%);
  }
}

.home-content {
  position: relative;
  z-index: 2;
  isolation: isolate;
  background: var(--studio-paper);
}

.home-content > :is(#industries, #contact) {
  scroll-margin-top: 0;
}

.spatial-home .home-content .editorial-contact {
  background: radial-gradient(ellipse at 100% 100%, #2d5047, transparent 70%) #20332f;
}

.spatial-home .editorial-contact h2 {
  max-width: 16ch;
  font: 400 clamp(44px, 6.2vw, 89px)/.98 var(--studio-display);
  letter-spacing: -.026em;
}

.home-content .editorial-industry {
  padding-block: clamp(52px, 8vw, 118px);
  background: radial-gradient(ellipse at 5% 0%, #dfeae3, transparent 53%) #f1f3eb;
  border-top: 1px solid #a6bbb0;
  color: #22342d;
  font-family: system-ui, "Segoe UI", sans-serif;
}

.home-content .editorial-industry > .wrap {
  display: grid;
  grid-template-columns: minmax(0, .58fr) minmax(0, 1.42fr);
  gap: clamp(22px, 5.7vw, 94px);
  align-items: start;
}

.home-content .editorial-industry .clear-section-title {
  display: grid;
  justify-items: start;
  gap: 17px;
  margin: 0;
  padding-block: 14px;
}

.home-content .editorial-industry h2 {
  margin: 0;
  font-size: clamp(54px, 7.55vw, 103px);
  line-height: 1.03;
  color: #22342d;
}

.home-content .editorial-industry .clear-text-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding-inline: 16px;
  border: 1px solid #819c8d;
  border-radius: 24px;
  background: #edf5ee;
  color: #214436;
  font: 650 .9rem/1.4 system-ui, "Segoe UI", sans-serif;
  text-decoration: none;
}

.home-content .editorial-industry .clear-text-link:hover {
  background: #d8e9df;
}

.home-content .editorial-industry .clear-text-link::after,
.home-content .editorial-industry .industry-links > a::after {
  content: "→" / "";
  color: #376753;
}

.home-content .editorial-industry .industry-links {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: clamp(20px, 3.4vw, 48px);
}

.home-content .editorial-industry .industry-links > a {
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 5px;
  padding: 18px 3px 17px;
  border-color: #acbdb1;
  min-width: 0;
}

.home-content .editorial-industry .industry-links > a:nth-last-child(-n + 2) {
  border-bottom: 1px solid #acbdb1;
}

.home-content .editorial-industry .industry-links > a::after {
  grid-area: 1 / 2 / span 2;
  align-self: center;
  font-size: 1.24rem;
}

.home-content .editorial-industry .industry-links > a:hover {
  background: #e3ede3;
}

.home-content .editorial-industry .industry-links strong {
  color: #223e32;
  font: 650 clamp(19px, 1.7vw, 23px)/1.3 system-ui, "Segoe UI", sans-serif;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}

.home-content .editorial-industry .industry-links span {
  color: #364a3f;
  font-size: 1rem;
  font-weight: 450;
  line-height: 1.5;
  overflow-wrap: break-word;
}

@media (max-width: 940px) {
  .home-content .editorial-industry > .wrap {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-content .editorial-industry .clear-section-title {
    padding: 0;
  }
}

@media (max-width: 899px) {
  .spatial-module-layout { gap: 16px clamp(25px, 5vw, 61px); }
}

@media (max-width: 735px) {
  .spatial-services-intro,
  .spatial-module-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .spatial-services-intro { gap: 13px; }
  .spatial-module { min-height: 0; }
  .spatial-module::after {
    background: radial-gradient(ellipse at 47% 62%, color-mix(in srgb, var(--flow-accent) 12%, transparent), transparent 66%);
  }
  .spatial-module h3 { max-width: 17ch; font-size: clamp(42px, 8.8vw, 60px); }
  .spatial-module .spatial-module-copy > p:not(.spatial-kicker) { margin-top: 13px; }
  .spatial-flow-chain { --step-gap: 8px; }
  .spatial-module .spatial-flow-link { margin-top: 7px; }
}

@media (max-width: 560px) {
  .spatial-opening { padding-block: 113px 19px; }
  .spatial-route-window--hero { height: clamp(136px, 22svh, 192px); }
  .spatial-route-controls { row-gap: 7px; }
  .spatial-route-controls ol { column-gap: 9px; }
  .spatial-route-controls li { font-size: .67rem; }
  .spatial-orbit-hint { bottom: 4px; }
  .spatial-opening .spatial-copy h1 {
    font-size: clamp(67px, 18vw, 100px);
    max-width: 8ch;
  }

  .home-content .editorial-industry .industry-links {
    grid-template-columns: minmax(0, 1fr);
  }

  .home-content .editorial-industry .industry-links > a:nth-last-child(2) {
    border-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .spatial-portfolio .spatial-screen canvas { opacity: 0; }
  .spatial-portfolio[data-hero-graphics] .spatial-route-still { visibility: visible; }
  .spatial-portfolio .spatial-orbit-hint { visibility: hidden; }
  .spatial-portfolio .spatial-screen[data-rendering="webgl"] + .spatial-content .spatial-chapter > .spatial-fallback-photo {
    opacity: .67;
    mask-image: none;
  }
  .spatial-opening-cta span { transition: none; }
  .spatial-opening-cta:hover span { transform: none; }
}

