/* Product motion. The unenhanced HTML remains the readable default. */
:root {
  --motion-ease: cubic-bezier(.22, 1, .36, 1);
  --motion-nav-height: 68px;
}
.site-scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  height: 3px;
  z-index: 80;
  pointer-events: none;
  background: transparent;
}
.site-scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: var(--accent, var(--orange, #315b78));
  transform: scaleX(var(--page-progress, 0));
  transform-origin: left;
}
.site-motion-control {
  position: fixed;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 60;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--ink);
  box-shadow: 0 4px 24px #20334412;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.site-motion-control svg { width: 14px; height: 14px; fill: currentColor; }
.site-motion-control .motion-play-icon { display: none; }
.motion-paused .site-motion-control .motion-play-icon { display: block; }
.motion-paused .site-motion-control .motion-pause-icon { display: none; }
[data-motion-page] .project-hero { perspective: 1400px; }
[data-motion-page].product-body .project-hero--split {
  min-height: min(780px, 76svh);
  padding-block: clamp(44px, 7svh, 88px);
}
[data-motion-page].product-body .project-hero h1 {
  font-size: clamp(48px, 6.3vw, 88px);
  line-height: 1.12;
  letter-spacing: -.055em;
}
[data-motion-page].product-body .project-catch { font-size: clamp(22px, 2.2vw, 28px); }
[data-motion-page].product-body .project-hero-media { border-radius: 24px; }
[data-motion-page].product-body .project-hero-media > img {
  max-height: 440px;
  border-radius: 10px;
  filter: drop-shadow(0 18px 18px #20334418);
}
[data-motion-page] .project-hero-media { transform-style: preserve-3d; }
[data-motion-page] .motion-depth { transform: translate3d(0, var(--motion-depth-y, 0px), 0); }
[data-motion-page] .project-subnav {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--bg);
  transition: box-shadow .35s ease, background .35s ease;
}
[data-motion-page] .project-subnav.is-stuck {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
  box-shadow: 0 12px 24px -20px #20334455;
}
[data-motion-page] section[id] { scroll-margin-top: calc(var(--motion-nav-height) + 28px); }
[data-motion-page] .site-footer { padding-bottom: var(--footer-bottom-space, 90px); }

/* Static story: the original three screens stay available without JavaScript. */
.motion-story-stage { display: none; }
.motion-story-steps { display: contents; }
.motion-story-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin: 0 0 36px;
}
.motion-story-nav a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  transition: color .3s ease;
}
.motion-story-nav a span { font-size: 11px; font-variant-numeric: tabular-nums; }
.motion-story-nav a[aria-current="step"] { color: var(--ink); }
.motion-story-nav a::after {
  content: "";
  width: 20px;
  height: 2px;
  background: currentColor;
  transform: scaleX(.3);
  transform-origin: left;
  opacity: .35;
  transition: transform .5s var(--motion-ease), opacity .5s ease;
}
.motion-story-nav a[aria-current="step"]::after { transform: scaleX(1); opacity: 1; }
.motion-story-note { margin-top: 28px; }
.motion-story [data-story-step] { scroll-margin-top: calc(var(--motion-nav-height) + 28px); }

@media (min-width: 761px) and (min-height: 650px) {
  .motion-ready:not(.motion-reduced) .motion-story {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(40px, 7vw, 100px);
    align-items: start;
    position: relative;
  }
  .motion-ready:not(.motion-reduced) .motion-story-stage {
    position: sticky;
    top: calc(var(--motion-nav-height) + 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 32px;
    height: calc(100svh - var(--motion-nav-height) - 48px);
    max-height: 860px;
    isolation: isolate;
  }
  .motion-story-stage::before {
    content: "";
    position: absolute;
    inset: 8% -12%;
    z-index: -1;
    background: radial-gradient(ellipse, var(--canvas) 10%, transparent 68%);
  }
  .motion-screen-stack {
    position: relative;
    width: min(100%, 340px, calc(66svh * 802 / 1398));
    aspect-ratio: 802 / 1398;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 28px 70px -35px #20334466, 0 8px 24px -15px #20334433;
    overflow: hidden;
  }
  .motion-screen-stack img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    opacity: 0;
    transform: translateY(26px) scale(.95);
    transition: opacity .7s ease, transform .95s var(--motion-ease);
  }
  .motion-screen-stack img.is-active { opacity: 1; transform: none; }
  .motion-story-track { width: 160px; height: 2px; background: var(--line); overflow: hidden; }
  .motion-story-track span {
    display: block;
    height: 100%;
    background: var(--ink);
    transform: scaleX(var(--story-progress, .3333));
    transform-origin: left;
    transition: transform .7s var(--motion-ease);
  }
  .motion-ready:not(.motion-reduced) .motion-story-steps { display: block; }
  .motion-ready:not(.motion-reduced) .motion-story [data-story-step] {
    min-height: 72svh;
    justify-content: center;
    padding: 64px 0;
    scroll-margin-top: calc(var(--motion-nav-height) + 90px);
  }
  .motion-ready:not(.motion-reduced) .motion-story [data-story-step] > img {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .motion-ready:not(.motion-reduced) .motion-story [data-story-step] figcaption {
    gap: 20px;
    transform: translateY(12px);
    transition: transform .8s var(--motion-ease);
  }
  .motion-ready:not(.motion-reduced) .motion-story [data-story-step].is-active figcaption {
    transform: none;
  }
  .motion-ready:not(.motion-reduced) .motion-story figcaption strong {
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.55;
    letter-spacing: -.035em;
    color: var(--muted);
    transition: color .6s ease;
  }
  .motion-ready:not(.motion-reduced) .motion-story .is-active figcaption strong { color: var(--ink); }
  .motion-ready:not(.motion-reduced) .motion-story figcaption span { font-size: 17px; line-height: 1.9; }
}
@media (max-width: 760px), (max-height: 649px) {
  .motion-ready:not(.motion-reduced) .motion-story { display: block; }
  .motion-ready:not(.motion-reduced) .motion-story-steps {
    display: flex;
    gap: 22px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-behavior: smooth;
    scroll-padding-inline: 0;
    padding: 4px 4px 22px;
  }
  .motion-ready:not(.motion-reduced) .motion-story [data-story-step] {
    flex: 0 0 87%;
    scroll-snap-align: start;
  }
  .motion-ready:not(.motion-reduced) .motion-story [data-story-step] > img {
    width: 100%;
    height: min(420px, 58svh);
    padding: 20px;
    border-radius: 16px;
  }
  .motion-story-nav { gap: 6px 18px; margin-bottom: 22px; }
  .motion-story-nav a { gap: 7px; font-size: 12px; }
  .motion-story-nav a::after { width: 12px; }
  [data-motion-page] .project-subnav { gap: 4px 16px; padding-block: 10px; }
  [data-motion-page] .project-subnav a { min-height: 36px; font-size: 12px; }
  .site-motion-control { right: 12px; bottom: max(12px, env(safe-area-inset-bottom)); padding: 9px 13px; }
  [data-motion-page].product-body .project-hero--split { min-height: auto; padding-block: 40px; }
  [data-motion-page].product-body .project-hero-media > img { max-height: 340px; }
}
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .motion-ready:not(.motion-paused):not(.motion-reduced) [data-motion-page] .button {
    transition: transform .35s var(--motion-ease), box-shadow .35s ease, background-color .25s ease;
  }
  .motion-ready:not(.motion-paused):not(.motion-reduced) [data-motion-page] .button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px -12px #20334480;
  }
  .motion-ready:not(.motion-paused):not(.motion-reduced) [data-motion-page] .button:active { transform: scale(.975); }
  .motion-ready:not(.motion-paused):not(.motion-reduced) [data-motion-page] .for-series-card {
    transition: transform .45s var(--motion-ease), border-color .3s ease;
  }
  .motion-ready:not(.motion-paused):not(.motion-reduced) [data-motion-page] .for-series-card:hover { transform: translateY(-7px); }
  .motion-ready:not(.motion-paused):not(.motion-reduced) [data-motion-page] .product-screen-group a {
    transition: transform .65s var(--motion-ease);
  }
  .motion-ready:not(.motion-paused):not(.motion-reduced) [data-motion-page] .product-screen-group a:hover { transform: translateY(-12px) rotate(-2deg); }
}
.motion-ready [data-category-name] { display: inline-block; min-width: 9ch; }
.motion-paused { scroll-behavior: auto !important; }
.motion-paused [data-motion-page] *, .motion-paused [data-motion-page] *::before,
.motion-paused [data-motion-page] *::after { transition: none !important; scroll-behavior: auto !important; }
.motion-paused .motion-story *, .motion-reduced .motion-story * { transition: none !important; }
.motion-paused .motion-depth, .motion-reduced .motion-depth { transform: none !important; }
.motion-reduced .site-motion-control { display: none; }
@media (prefers-reduced-motion: reduce) {
  [data-motion-page] *, [data-motion-page] *::before, [data-motion-page] *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
  .site-motion-control { display: none; }
}
