body { padding:0; }

.case-study-page-root {
  overflow-x: hidden;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.case-study-page {
  overflow-x: clip;
  overflow-y: visible;
  margin: 0;
  color: var(--theme-text, #171717);
  background: var(--theme-bg, #fff);
}

.motion-study {
  --ms-accent: var(--color-accent, #fa336f);
  --ms-blue: #2093d0;
  --ms-pale-blue: #e9f7fd;
  --ms-ink: var(--theme-text, #171717);
  --ms-muted: var(--theme-text-muted, #666);
  --ms-divider: var(--theme-divider, #cfcfcf);
  --ms-surface: var(--theme-surface-muted, #f1f1f1);
  --ms-body-width: 65rem;
  display: flex;
  width: 100%;
  flex-direction: column;
}

.motion-study p,
.motion-study li,
.motion-study dd {
  font-weight: 300;
  line-height: 1.55;
}

.motion-study p {
  max-width: 78ch;
}

.motion-study__header {
  display: flex;
  flex-direction: column;
  gap: 0;
}



.motion-study__title {
  width: min(100% - clamp(2rem, 8vw, 8rem), 78rem);
  margin: 0 auto;
  padding: 1.4rem 0 0;
}

.motion-study .section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  margin: 0;
  text-align: center;
}

.motion-study .section-heading .heading-main { font-size: clamp(2.25rem, 5vw, 3.8rem); }
.motion-study .section-heading .heading-accent { font-size: clamp(2.05rem, 4.6vw, 3.5rem); }

.motion-study .cs-eyebrow {
  margin: -0.2rem 0 0;
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-align: center;
  text-transform: uppercase;
  max-width: 100%;
}

.motion-study__tagline {
  margin: 1.3rem auto 0;
  font-size: clamp(1rem, 2vw, 1.35rem);
  text-align: center;
}

/* Main case-study layout */
.motion-study .case-body {
  display: flex;
  width: min(100% - clamp(2rem, 8vw, 8rem), var(--ms-body-width));
  margin: 0 auto;
  flex-direction: column;
  gap: clamp(2.5rem, 6vw, 5rem);
  padding: 0 0 clamp(4rem, 10vw, 8rem);
}

.motion-study .case-section {
  scroll-margin-top: 5rem;
  padding-top: clamp(3.75rem, 8vw, 6.5rem);
}

.motion-study .case-section:not(.case-overview) {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.motion-study .section-header > * {
  margin: 0;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--ms-ink);
  color: var(--ms-ink);
  font: 700 clamp(1.5rem, 3vw, 1.75rem)/1.1 var(--font-sans, Inter, sans-serif);
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

.motion-study .case-overview {
  display: grid;
  grid-template-columns: minmax(0, 584fr) minmax(17rem, 426fr);
  gap: 1.875rem;
}

.motion-study .case-overview > .section-header {
  grid-column: 1 / -1;
}

.motion-study .component-summary {
  align-self: start;
  padding: clamp(1.5rem, 4vw, 2.1rem);
  background: var(--ms-surface);
}

.motion-study .component-summary h3 {
  margin: 0 0 1.5rem;
  font-size: 1.2rem;
  text-align: center;
  text-transform: uppercase;
}

.motion-study .component-summary dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.85rem 1rem;
  margin: 0;
}

.motion-study .component-summary dt { font-weight: 700; }
.motion-study .component-summary dd { margin: 0; }

.motion-study .pattern-intro .intro-layout {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
}

.motion-study .intro-thumb {
  flex: 0 0 12.5rem;
  margin: 0;
}

.motion-study .intro-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.opportunity-signal {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 4 / 3;
  place-items: center;
  overflow: hidden;
  background:
    linear-gradient(rgb(255 255 255 / 12%) 1px, transparent 1px),
    linear-gradient(90deg, rgb(255 255 255 / 12%) 1px, transparent 1px),
    linear-gradient(145deg, #26343b, #10191e);
  background-size: 1.5rem 1.5rem, 1.5rem 1.5rem, auto;
}

.opportunity-signal__image {
  position: absolute;
  left: 13%;
  width: 38%;
  aspect-ratio: 4 / 3;
  border: 2px solid #fff;
  background: linear-gradient(165deg, #88c6df 0 45%, #1e789f 46% 62%, #d1eef5 63%);
  box-shadow: 0.45rem 0.45rem 0 rgb(0 0 0 / 35%);
}

.opportunity-signal__image::before {
  position: absolute;
  right: 10%;
  bottom: 27%;
  width: 52%;
  height: 18%;
  border-radius: 65% 35% 25% 35%;
  background: #f3f5f5;
  box-shadow: -0.4rem 0.25rem 0 #e6003d;
  content: "";
}

.opportunity-signal__image i {
  position: absolute;
  right: 23%;
  bottom: 43%;
  width: 2px;
  height: 22%;
  background: #f3f5f5;
}

.opportunity-signal__route {
  position: absolute;
  left: 52%;
  width: 22%;
  border-top: 2px dashed #75c5e8;
}

.opportunity-signal__route::after {
  position: absolute;
  top: -0.32rem;
  right: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-top: 2px solid #75c5e8;
  border-right: 2px solid #75c5e8;
  content: "";
  transform: rotate(45deg);
}

.opportunity-signal__approval {
  position: absolute;
  right: 10%;
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ms-accent);
  font-weight: 800;
  box-shadow: 0 0 0 0.45rem rgb(250 51 111 / 18%);
}

.motion-study .intro-layout p:first-child { margin-top: 0; }

.motion-study .caption {
  display: block;
  margin-top: 0.5rem;
  color: var(--color-accent);
  font-size: 0.72rem;
  line-height: 1.4;
}

.motion-study .intro-thumb .caption { color: var(--ms-accent); }

.motion-study .lead-question {
  margin-top: 1.5rem;
  padding-left: 1rem;
  border-left: 0.35rem solid var(--ms-accent);
  font-style: italic;
  font-weight: 600;
}

.motion-study .case-section:not(:first-child) {
    padding-top: 0;
}

.opportunity-detail { margin-top: 1.5rem; }
.opportunity-question { font-weight: 700 !important; margin-top: 1.5rem; }
.prose-wide { max-width: 48rem; }

.motion-study .component-blockquote {
  display: grid;
  width: min(52%, 34rem);
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.25rem;
  margin: 0 0 0 auto;
}

.motion-study .component-blockquote p {
  margin: 0;
  padding-left: 1rem;
  border-left: 0.45rem solid var(--ms-accent);
}

.motion-study .result-label {
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
}

.media-copy-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(17rem, 1fr);
  align-items: start;
  gap: 0;
}

.image-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.image-pair figure { margin: 0; }
.image-pair img { display: block; width: 100%; aspect-ratio: 1.15; object-fit: cover; }

.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.8rem;
}

.process-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--ms-divider);
  background: var(--theme-bg, #fff);
}

.process-card__number {
  color: var(--ms-accent);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.process-card h3,
.subsection h3,
.findings-grid h3 {
  margin: 0.35rem 0 0.85rem;
  font-size: 1rem;
  border-bottom: 0;
}

.process-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.process-card img.process-card__figma-image { object-fit: contain; }

.process-card p {
  margin: 1rem 0 0;
  font-size: 0.8rem;
}

.process-card__pair { display: grid; gap: 0.35rem; grid-template-columns: 1fr 1fr; }

.spec-card {
  display: flex;
  aspect-ratio: 4 / 3;
  flex-direction: column;
  justify-content: center;
  gap: 0.55rem;
  padding: 1.1rem;
  color: #e5edf0;
  background: #182229;
}

.spec-card i { height: 0.25rem; background: #5b6c74; }
.spec-card i:nth-child(2) { width: 72%; }
.spec-card i:nth-child(3) { width: 88%; }
.spec-card strong { margin-top: 0.5rem; color: #62bde7; font-size: 0.65rem; letter-spacing: 0.08em; }
.spec-card span { font-size: 0.52rem; }

.state-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.65rem 1rem;
  overflow-x: auto;
  color: var(--ms-muted);
  background: #f3f8f9;
  font-size: 0.78rem;
  white-space: nowrap;
}

.state-flow span:first-child,
.state-flow span:last-child { color: var(--ms-ink); font-weight: 700; }
.state-flow i { width: 1.4rem; height: 1px; background: var(--ms-accent); }

.handoff-grid {
  display: grid;
  grid-template-columns: 1fr minmax(15rem, 0.55fr);
  gap: clamp(2rem, 5vw, 4rem);
}

.handoff-grid p:first-child { margin-top: 0; }

.download-list { display: flex; flex-direction: column; gap: 0.6rem; }
.download-list a {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--ms-divider);
  color: inherit;
  text-decoration: none;
}
.download-list a:hover { border-color: var(--ms-accent); }
.download-list span { color: var(--ms-accent); font-weight: 700; }
.download-list b { font-size: 1.2rem; }

.subsection {
  padding-top: 1.5rem;
  border-top: 0;
}

.walkthrough-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.walkthrough-strip figure { margin: 0; }
.walkthrough-strip img { display: block; width: 100%; border: 1px solid var(--ms-divider); }
.walkthrough-strip figcaption { margin-top: 0.45rem; color: var(--ms-muted); font-size: 0.75rem; text-transform: uppercase; }
.walkthrough-strip > span { color: var(--ms-accent); font-size: 1.6rem; }

[data-module-slot="motion-studio"] { width: 100%; }
.prototype-points { max-width: 43.05rem; margin: 0.25rem 0; }

.principle-callout {
  display: flex;
  width: fit-content;
  margin: 0 auto;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35em;
  padding: 1rem 1.5rem;
  border-left: 0.45rem solid var(--ms-accent);
  font-size: clamp(1.3rem, 3vw, 2rem);
}
.principle-callout span { font-weight: 300; }
.principle-callout strong { font-weight: 800; }
.principle-callout--wide { width: min(100%, 44rem); box-sizing: border-box; }

.findings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.875rem;
}
.findings-grid article { padding: 1.25rem; background: #f3f8f9; }
.findings-grid h3 { padding-bottom: 0.55rem; border-bottom: 0; text-transform: uppercase; }

.motion-study .list { margin: 1rem 0 0; padding-left: 1.1rem; }
.motion-study .list li { padding-bottom: 0.55rem; }

.media-copy-grid--reverse { grid-template-columns: minmax(0, 694fr) minmax(14rem, 298fr); gap: 3rem; }
.media-copy-grid--reverse img { display: block; width: 100%; border: 1px solid var(--ms-divider); }

.reflection-section .pattern-reflection {
  max-width: 43rem;
  margin: 3.125rem auto 0;
}
.reflection-section .pattern-reflection p {
  font-size: clamp(1.3rem, 3vw, 1.8rem);
  font-weight: 300;
  line-height: 1.55;
  text-align: center;
}

.motion-study .case-footer {
  padding: 2rem clamp(1rem, 4vw, 4rem);
  border-top: 1px solid var(--ms-divider);
}
.motion-study .copyright { color: var(--ms-muted); font-size: 0.7rem; text-align: center; text-transform: uppercase; }

@media (max-width: 900px) {
  .process-grid { grid-template-columns: repeat(2, 1fr); }
  .motion-study .case-overview { grid-template-columns: 1fr; }
  .motion-study .component-summary { margin-top: 0; }
}

@media (max-width: 720px) {
  .motion-study .pattern-intro .intro-layout,
  .media-copy-grid,
  .handoff-grid,
  .findings-grid,
  .media-copy-grid--reverse { display: flex; flex-direction: column; }

  .motion-study .intro-thumb { width: 100%; flex-basis: auto; }
  .motion-study .intro-thumb img { aspect-ratio: 16 / 7; }
  .motion-study .component-blockquote { width: 100%; }
  .motion-study .component-summary dl { grid-template-columns: 1fr; }
  .motion-study .component-summary dd { margin-bottom: 0.5rem; }
}

@media (max-width: 520px) {
  .motion-study .section-heading { flex-direction: column; align-items: center; }
  .motion-study .section-heading .heading-accent { margin-top: -0.65rem; }
  .motion-study .section-header > * { text-align: center; }
  .process-grid { grid-template-columns: 1fr; }
  .state-flow { justify-content: flex-start; }
  .walkthrough-strip { display: flex; flex-direction: column; }
  .walkthrough-strip > span { transform: rotate(90deg); }
  .image-pair { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .case-study-page-root { scroll-behavior: auto; }
}
