/* Chase / JPMC case study — Figma "Chase 2026" */

/* "clip" hides sideways overflow without turning the page into its own
   scroll box. With "hidden", the first scroll on Chase/Google/Gone Astray
   went into that inner box and the page seemed stuck. */
body:has(.case-page) {
  overflow-x: hidden;
  overflow-x: clip;
}

.case-page {
  min-width: 0;
  overflow-x: hidden;
  overflow-x: clip;
  background: #f3f3f3;
  color: #262626;
  font-family: "Ubuntu Sans", "Ubuntu", sans-serif;
}

.case-banner {
  position: relative;
  width: 100%;
  height: 610px;
  background: #f3f3f3;
  overflow: hidden;
}

.case-banner-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 33px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  z-index: 2;
  box-sizing: border-box;
}

.case-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 18px;
  border-radius: 50px;
  background: #fcfcfc;
  box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.25);
  font-family: "Ubuntu", sans-serif;
  font-weight: 500;
  font-size: 18px;
  color: #262626;
  text-decoration: none;
}

.case-back-arrow {
  display: inline-block;
  transform: rotate(-90deg) scaleY(-1);
  font-size: 18px;
  line-height: 1;
}

.case-back:hover,
.case-back:focus-visible {
  opacity: 0.75;
}

.case-banner-flower {
  display: block;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  animation: brand-flower-spin 8s linear infinite;
}

.case-banner-flower img {
  width: 100%;
  height: 100%;
}

.case-banner-flower:hover,
.case-banner-flower:focus-visible {
  animation-duration: 1.2s;
}

.case-banner-logo {
  position: absolute;
  left: 50%;
  top: 221px;
  width: 360px;
  height: 168px;
  transform: translateX(-50%);
}

.case-banner-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 120px 24px;
  box-sizing: border-box;
}

/* Scoped under .case-page so homepage .case-card aspect-ratio does not stretch these. */
.case-page .case-card {
  width: 100%;
  max-width: 1200px;
  height: auto;
  aspect-ratio: auto;
  flex-shrink: 0;
  background: #fff;
  border-radius: 24px;
  padding: 36px 48px 28px;
  box-sizing: border-box;
}

.case-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.case-intro-left {
  width: 330px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-intro-left h1 {
  font-family: "Ubuntu Sans", "Ubuntu", sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: normal;
  color: #262626;
}

.case-intro-left .case-subtitle {
  font-weight: 700;
  font-size: 18px;
  color: rgba(38, 38, 38, 0.8);
}

.case-intro-right {
  display: flex;
  align-items: flex-start;
  gap: 64px;
}

.case-intro-copy {
  width: 480px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.case-intro-copy p {
  font-weight: 700;
  font-size: 16px;
  line-height: 1.4;
  color: #262626;
}

.case-intro-meta {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-self: stretch;
  gap: 14px;
  padding-right: 26px;
  font-family: "Ubuntu Condensed", sans-serif;
  font-size: 18px;
  color: #262626;
}

.case-intro-meta div {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.case-label {
  display: flex;
  align-items: center;
  gap: 4px;
}

.case-label img {
  width: 16px;
  height: 16px;
}

.case-label span {
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.02em;
  color: #262626;
}

.case-card h2 {
  font-weight: 800;
  font-size: 20px;
  line-height: normal;
  color: #262626;
  margin-top: 6px;
}

.case-card-head {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.case-body-text {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #262626;
}

.case-body-text + .case-body-text {
  margin-top: 12px;
}

.case-note {
  font-weight: 500;
  font-style: italic;
  font-size: 15px;
  line-height: 24px;
  color: rgba(38, 38, 38, 0.6);
  margin-top: 12px;
}

.case-impact {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.case-stats {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 0;
}

.case-stats-row {
  display: flex;
  gap: 24px;
}

.case-stat {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 138px;
  padding: 16px 14px 16px 8px;
  border: 3px dashed #262626;
  border-radius: 12px;
}

.case-stat-badge {
  position: relative;
  width: 90px;
  height: 88px;
  flex-shrink: 0;
}

.case-stat-badge img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.case-stat-badge strong {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Ubuntu", sans-serif;
  font-weight: 700;
  font-size: 32px;
  line-height: 1.2;
  color: #262626;
  -webkit-text-stroke: 3px #fff;
  paint-order: stroke fill;
  text-shadow:
    0 0 0 #fff,
    1px 0 0 #fff,
    -1px 0 0 #fff,
    0 1px 0 #fff,
    0 -1px 0 #fff;
}

.case-stat span {
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: #262626;
}

.case-team-art {
  width: 100%;
  max-width: 835px;
  margin: 12px auto 0;
}

.case-team-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.case-takeaways {
  display: flex;
  gap: 24px;
  padding: 8px 0 0;
}

/* Chase: space between the Takeaways text and its boxes (Amplio keeps its own) */
.case-page:not(.amplio-page) .case-takeaways {
  padding-top: 0;
  margin-top: 16px;
}

.case-takebox {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 32px;
  border-radius: 20px;
  background: #f1f9ff;
  text-align: center;
}

.case-takebox img {
  width: 22px;
  height: 22px;
}

.case-takebox h3 {
  font-weight: 600;
  font-size: 18px;
  color: #006eaf;
}

.case-takebox p {
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #006eaf;
}

.case-photos {
  position: relative;
  width: 100%;
  max-width: 1100px;
  /* Tall enough for the rotated photo stack; no dead space under the last photo. */
  height: 460px;
  margin: 0 auto;
}

.case-photos-stage {
  position: absolute;
  left: 50%;
  top: 0;
  width: 1100px;
  height: 460px;
  transform: translateX(-50%);
  transform-origin: top center;
}

.case-photo {
  position: absolute;
  border: 6.75px solid #005eb8;
  border-radius: 16px;
  overflow: hidden;
  background: #ddd;
}

.case-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-photo-1 {
  left: 10px;
  top: 44px;
  width: 231px;
  height: 308px;
  transform: rotate(-4deg);
}

.case-photo-2 {
  left: 306px;
  top: 128px;
  width: 231px;
  height: 308px;
  transform: rotate(4deg);
}

.case-photo-3 {
  left: 569px;
  top: 44px;
  width: 231px;
  height: 308px;
  transform: rotate(-4deg);
}

.case-photo-4 {
  left: 875px;
  top: 128px;
  width: 226px;
  height: 308px;
  transform: rotate(4deg);
}

.case-doodle {
  position: absolute;
  pointer-events: none;
}

.case-doodle-plus {
  left: 257px;
  top: 47px;
  width: 54px;
  height: 54px;
}

.case-doodle-scribble {
  left: 1013px;
  top: 47px;
  width: 57px;
  height: 62px;
}

.case-doodle-sparkle {
  left: 558px;
  top: 415px;
  width: 34px;
  height: 42px;
}

.case-doodle-sparkle-sm {
  left: 584px;
  top: 394px;
  width: 17px;
  height: 21px;
}

.case-doodle-blob {
  left: 16px;
  top: 406px;
  width: 77px;
  height: 35px;
  border: 4.7px solid #306cf1;
  border-radius: 22px 22px 22px 3px;
  box-sizing: border-box;
}

.case-nda {
  margin-top: 12px;
  font-weight: 500;
  font-size: 16px;
  line-height: 24px;
  color: #262626;
}

.case-page .footer {
  margin-top: 0;
  padding: 24px 0 64px;
  background: #f3f3f3;
}

@media (prefers-reduced-motion: reduce) {
  .case-banner-flower {
    animation: none;
  }
}

/* —— Responsive —— */
@media (max-width: 1439px) {
  .google-page .case-banner-shot {
    width: min(1200px, calc(100% - 80px));
  }

  .case-banner {
    height: 480px;
  }

  .case-banner-nav {
    padding: 0 24px;
  }

  .case-banner-logo {
    top: 180px;
    width: min(300px, 56vw);
    height: auto;
    aspect-ratio: 360 / 168;
  }

  .case-column {
    padding: 0 40px 24px;
  }

  .case-page .case-card {
    padding: 28px 32px 24px;
  }

  .case-intro {
    flex-direction: column;
    gap: 28px;
  }

  .case-intro-left {
    width: 100%;
  }

  .case-intro-right {
    width: 100%;
    gap: 40px;
  }

  .case-intro-copy {
    width: auto;
    flex: 1;
    min-width: 0;
  }

  .case-intro-meta {
    padding-right: 0;
    flex-shrink: 0;
  }

  .case-stats-row {
    gap: 16px;
  }

  .case-stat {
    min-height: 120px;
    padding: 12px 10px;
  }

  .case-stat span {
    font-size: 20px;
  }

  .case-photos {
    height: auto;
  }

  .case-photos-stage {
    position: relative;
    left: auto;
    width: 100%;
    height: auto;
    transform: none;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    justify-items: center;
    padding: 24px 0 32px;
  }

  .case-photo {
    position: relative;
    left: auto !important;
    top: auto !important;
    width: 100%;
    max-width: 231px;
    height: auto;
    aspect-ratio: 231 / 308;
  }

  .case-photo-2,
  .case-photo-4 {
    margin-top: 40px;
  }

  .case-doodle {
    display: none;
  }
}

@media (max-width: 800px) {
  .case-banner {
    height: 360px;
  }

  .case-banner-nav {
    top: 20px;
    padding: 0 16px;
  }

  .case-back {
    padding: 8px 14px;
    font-size: 16px;
    gap: 8px;
  }

  .case-banner-flower {
    width: 28px;
    height: 28px;
  }

  .case-banner-logo {
    top: 140px;
    width: min(240px, 64vw);
  }

  .case-column {
    gap: 20px;
    padding: 0 16px 16px;
  }

  .case-page .case-card {
    border-radius: 20px;
    padding: 24px 20px 20px;
  }

  .case-intro-left h1 {
    font-size: 26px;
  }

  .case-intro-right {
    flex-direction: column;
    gap: 24px;
  }

  .case-intro-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 20px 32px;
  }

  .case-stats {
    gap: 16px;
  }

  .case-stats-row {
    flex-direction: column;
  }

  .case-stat {
    min-height: 0;
  }

  .case-stat-badge {
    width: 76px;
    height: 74px;
  }

  .case-stat-badge strong {
    font-size: 24px;
  }

  .case-stat span {
    font-size: 18px;
  }

  .case-takeaways {
    flex-direction: column;
  }

  .case-takebox {
    padding: 28px 24px;
  }

  .case-photos-stage {
    grid-template-columns: 1fr 1fr;
    gap: 16px 12px;
    padding: 8px 0 24px;
  }

  .case-photo {
    max-width: 160px;
    border-width: 5px;
  }

  .case-photo-2,
  .case-photo-4 {
    margin-top: 0;
  }

  .case-photo-1,
  .case-photo-3 {
    transform: rotate(-3deg);
  }

  .case-photo-2,
  .case-photo-4 {
    transform: rotate(3deg);
  }

  .case-nda {
    font-size: 14px;
    line-height: 22px;
  }

  .case-page .footer {
    padding: 16px 0 40px;
  }
}

.google-page .case-banner {
  height: auto;
  padding: 96px 0 0;
}

.google-page .case-banner-shot {
  position: relative;
  width: min(1200px, calc(100% - 240px));
  aspect-ratio: 1440 / 540;
  margin: 0 auto;
  border-radius: 24px 24px 0 0;
  overflow: hidden;
}

.google-page .case-column > .case-card:first-child {
  position: relative;
  z-index: 1;
  margin-top: -24px;
}

.google-page .case-banner-shot img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 46%;
  max-width: none;
}

.google-page .case-label img {
  width: 8.59px;
  height: 8.59px;
}

.google-page .case-stat-badge {
  display: flex;
  align-items: center;
  justify-content: center;
}

.google-page .case-stat-badge img {
  width: 70.21px;
  height: 67.97px;
  object-fit: none;
}

.google-kickoff {
  width: 100%;
  height: 440px;
  margin-top: 12px;
  border-radius: 32px;
  overflow: hidden;
  position: relative;
}

.google-kickoff img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.google-page .case-impact .case-note {
  margin-top: 0;
}

/* Impact's column gap is 24px. Pull the title back so the first paragraph
   sits 12px below it, matching Overview and Closing. */
.case-impact > .case-card-head {
  margin-bottom: -12px;
}

.google-close {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.google-close .case-card-head,
.google-close .case-note {
  margin: 0;
}

.google-photos {
  position: relative;
  width: 100%;
  max-width: 1100px;
  height: 440px;
  margin: 0 auto;
}

.google-photo {
  position: absolute;
  top: 20px;
  width: 429px;
  height: 371px;
  border: 4px solid #ff7e5f;
  border-radius: 16px;
  overflow: hidden;
  background: #ddd;
}

.google-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.google-photo-left {
  left: 57px;
  transform: rotate(-4deg);
}

.google-photo-left img {
  object-position: center 58%;
}

.google-photo-right {
  left: 590px;
  transform: rotate(4deg);
}

.google-photo-right img {
  object-position: center 46%;
}

@media (max-width: 1200px) {
  .google-photos {
    height: auto;
    display: flex;
    justify-content: center;
    gap: 20px;
  }

  .google-photo,
  .google-photo-left,
  .google-photo-right {
    position: relative;
    left: auto;
    top: auto;
    width: min(429px, 46%);
    height: auto;
    aspect-ratio: 429 / 371;
  }
}

@media (max-width: 800px) {
  .google-page .case-banner {
    height: auto;
    padding: 84px 0 0;
  }

  .google-page .case-banner-shot {
    width: calc(100% - 32px);
    border-radius: 24px 24px 0 0;
  }

  .google-kickoff {
    height: 320px;
    border-radius: 20px;
  }

  .google-photos {
    flex-direction: column;
    align-items: center;
  }

  .google-photo,
  .google-photo-left,
  .google-photo-right {
    width: min(429px, 100%);
  }
}

@media (max-width: 480px) {
  .google-page .case-banner {
    height: auto;
    padding: 76px 0 0;
  }
}

@media (max-width: 480px) {
  .case-banner {
    height: 300px;
  }

  .case-banner-logo {
    top: 120px;
    width: min(200px, 70vw);
  }

  .case-intro-left h1 {
    font-size: 22px;
  }

  .case-intro-copy p,
  .case-body-text {
    font-size: 15px;
  }

  .case-photo {
    max-width: 140px;
  }
}

/* Scroll reveal: each section slides up slowly as it enters the screen
   (classes are added by case-motion.js). */
.reveal {
  opacity: 0;
  translate: 0 72px;
  transition:
    opacity 0.9s ease,
    translate 1.2s cubic-bezier(0.16, 0.84, 0.24, 1);
}

/* GPU hint only while a section is still waiting to animate; keeping it on
   every finished section made scrolling heavy on long pages. */
.reveal:not(.is-done) {
  will-change: opacity, translate;
}

.reveal.is-in {
  opacity: 1;
  translate: 0 0;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    translate: none;
    transition: none;
  }
}
