@view-transition { navigation: auto; }

@keyframes leave-page {
  to { opacity: 0; transform: translateY(-.6rem); }
}
@keyframes enter-page {
  from { opacity: 0; transform: translateY(.85rem); }
}
::view-transition { pointer-events: none; }
::view-transition-old(root) { animation: 180ms ease-in both leave-page; }
::view-transition-new(root) { animation: 360ms cubic-bezier(.2,.65,.3,1) both enter-page; }
::view-transition-group(site-nav) { animation-duration: 280ms; }
.header { view-transition-name: site-nav; }

.story-jump {
  position: absolute;
  inset: auto 50% 1.05rem auto;
  transform: translateX(50%);
  padding: .28rem .65rem;
  white-space: nowrap;
  color: white;
  background: #241619d9;
  border-radius: .18rem;
  font-size: .79rem;
  font-weight: 700;
  text-decoration: none;
}
.story-jump:hover { color: var(--accent); }
.story-jump span { margin-left: .28rem; }
.system-story {
  background: var(--dark);
  color: var(--cream);
  overflow: clip;
}
.story-contact { background: #351c22; }
.system-story .lede { color: #f2e2e4; }
.system-story :focus-visible { outline-color: var(--accent); }
.story-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.28fr) minmax(0, .72fr);
  gap: clamp(1.5rem, 6vw, 5.3rem);
  align-items: start;
  text-align: left;
}
.story-figure { position: sticky; top: 8vh; align-self: start; }
.three-stage {
  display: grid;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.three-stage canvas, .three-stage img { grid-area: 1 / 1; width: 100%; height: 100%; }
.three-stage canvas { display: block; visibility: hidden; position: absolute; inset: 0; }
.three-stage[data-rendered] canvas { visibility: visible; }
.three-stage[data-rendered] img { visibility: hidden; }
.three-stage img { aspect-ratio: auto; }
.story-stage {
  aspect-ratio: 4 / 3;
  max-height: 56svh;
  margin-inline: auto;
  background: radial-gradient(ellipse at 50% 36%, #63333d, #321b21 78%);
}
.story-figure figcaption { color: #efdbdd; text-align: center; }
.story-step {
  padding: clamp(1.25rem, 3vw, 2.15rem) 0 clamp(2.1rem, 6vw, 5.7rem);
}
.story-step:last-child { padding-bottom: 1.5rem; }
.step-index {
  display: block;
  margin-bottom: .65rem;
  color: var(--accent);
  font-size: .86rem;
  font-weight: 750;
  letter-spacing: .12em;
  font-variant-numeric: tabular-nums;
}
.story-step h3 { text-wrap: pretty; }
.story-step p { color: #f1e0e2; margin: .65rem 0; max-width: 38ch; }
.story-step a { text-underline-offset: .25em; font-weight: 700; font-size: .9rem; }
.motion-ready .story-step[data-current] h3 { color: var(--accent); }
.market-lens {
  display: grid;
  grid-template-columns: minmax(11.5rem, .7fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 3rem);
  background: var(--dark);
  color: var(--cream);
  margin-top: 1.1rem;
  padding: clamp(.85rem, 2.6vw, 1.6rem);
}
.market-stage { aspect-ratio: 2 / 1; background: radial-gradient(ellipse at center, #683642, #341c23); }
.market-lens h2 { font-size: clamp(1.7rem, 3.4vw, 2.9rem); }
.market-lens p { max-width: 42ch; margin: .65rem auto; color: #f2e2e4; }
.motion-footer {
  text-align: center;
  background: #241619;
  padding: 0;
}
.footer-top {
  position: relative;
  display: grid;
  align-items: center;
  isolation: isolate;
  min-height: clamp(19rem, 34vw, 27rem);
}
.footer-lead { padding: clamp(2.6rem, 6vw, 5rem) 1rem; }
.footer-lead h2 { margin: .95rem auto 1.4rem; max-width: 19ch; }
.footer-scene {
  position: absolute;
  z-index: -1;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: min(33%, 23rem);
  aspect-ratio: 1;
  opacity: .8;
  pointer-events: none;
}
.footer-mid, .footer-bottom { border-top: 1px solid #d5aeb250; }
.footer-mid { padding: 1.3rem 0 1.2rem; }
.footer-mid .footer-nav { margin: 0; }
.footer-mid address { margin-top: .65rem; color: #efdde0; font-style: normal; font-size: .92rem; }
.footer-bottom {
  min-height: 4.05rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
  padding-block: .65rem;
  font-size: .83rem;
  color: #efdde0;
}
html[data-motion="reduced"] { scroll-behavior: auto; }
html[data-motion="reduced"]::view-transition-old(root),
html[data-motion="reduced"]::view-transition-new(root),
html[data-motion="reduced"]::view-transition-group(site-nav) { animation: none; }

@media (max-width: 53rem) {
  .footer-scene { width: 31%; opacity: .36; }
}
@media (max-width: 43rem) {
  .hero .intro-scene, .page-intro .intro-scene { width: 4.5rem; right: .5rem; bottom: 2.9rem; opacity: .45; z-index: -1; }
  .page-intro { isolation: isolate; }
  .page-intro .intro-scene { bottom: .6rem; opacity: .3; }
  .footer-scene { width: 38%; opacity: .38; }
  .story-jump {
    position: static;
    transform: none;
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin: 1rem auto .85rem;
  }
  .story-layout { display: block; text-align: center; }
  .story-figure { position: static; margin-bottom: 1rem; }
  .story-stage { aspect-ratio: 16 / 9; max-height: min(26svh, 13rem); margin-inline: auto; }
  .story-step p { margin-inline: auto; }
  .motion-ready .story-stage { max-height: min(23svh, 11rem); }
  .story-step { padding-block: 1rem 1.3rem; }
  .story-step a { display: inline-flex; align-items: center; min-height: 44px; }
  .market-lens { grid-template-columns: 1fr; gap: .8rem; padding: .95rem; }
  .market-stage { max-height: 8rem; }
  .market-lens p { margin: .4rem auto 0; }
  .footer-top { min-height: 0; }
  .footer-lead { padding: 2.4rem 0; }
  .footer-bottom { justify-content: center; column-gap: 1.2rem; }
  .footer-bottom > span { flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root), ::view-transition-group(site-nav) { animation: none; }
}

.hero, .page-intro { position: relative; }
.intro-scene {
  position: absolute;
  inset: auto clamp(.75rem, 5vw, 4.5rem) 1.45rem auto;
  width: clamp(5rem, 12vw, 11rem);
  aspect-ratio: 1;
  opacity: .72;
  pointer-events: none;
}
.page-intro .intro-scene { inset-block-end: .6rem; }

.motion-window { overflow: hidden; background: var(--pale); }
.motion-window img { display: block; }
.service-grid { max-width: 69rem; margin-inline: auto; }
.service-section .section-head { max-width: 50rem; }
.service-card .motion-window { border-bottom: 1px solid var(--line); }
.service-card .feature-copy { padding-block: clamp(1.15rem, 2.7vw, 1.75rem); }
.hero { overflow: hidden; }
.story-figure figcaption {
  margin-top: .68rem;
  display: grid;
  min-height: 1.4rem;
}
.story-step { scroll-margin-top: 40vh; }
.footer-services { margin: -0.65rem auto 1.45rem; max-width: 30rem; }
@media (max-width: 43rem) {
  .story-step { scroll-margin-top: 1rem; }
  .story-figure figcaption { margin-top: .35rem; min-height: 0; }
}

@media (max-width: 43rem) and (min-height: 36rem) {
  .motion-ready .story-figure {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-block: .45rem;
    background: var(--dark);
  }
  .motion-ready .story-contact .story-figure { background: #351c22; }
  .motion-ready .story-step { scroll-margin-top: calc(min(23svh, 11rem) + 4.5rem); }
}
