/* Case-study article pages. Loaded alongside styles.css, which provides the
   shared :root tokens, @font-face declarations, and base reset. */

body {
  background: #fff;
}

/*
  Subtle scroll-in reveal for article images/headings — intentionally more
  restrained than the homepage's spring animations (small offset, no scale,
  no rotate) so it reads as a gentle assist rather than a showpiece.
*/
[data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

.cs-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 40px;
  background: rgb(247, 247, 247);
}

.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: #000;
  transition: box-shadow 0.2s ease;
}
.cs-back:hover,
.cs-back:focus-visible {
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.16);
}
.cs-back svg {
  flex-shrink: 0;
}

.cs-header__icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.cs-header__year {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  color: var(--color-text);
  min-width: 40px;
  text-align: right;
}

.cs-hero {
  padding: 100px 40px 0;
  text-align: center;
}

.cs-hero__intro {
  max-width: 672px;
  margin: 0 auto;
  opacity: 0;
  transform: translateY(50px);
  animation: cs-fade-up 0.8s cubic-bezier(0.44, 0, 0, 1) 0.4s forwards;
}

.cs-hero__title {
  font-family: var(--font-libre-baskerville);
  font-style: italic;
  font-weight: 400;
  font-size: 64px;
  line-height: 1.2em;
  letter-spacing: -2px;
  color: var(--color-text);
  margin: 0 0 80px;
}

.cs-hero__subtitle {
  font-family: var(--font-dm-sans);
  font-size: 20px;
  line-height: 1.3em;
  letter-spacing: -0.2px;
  color: var(--color-text);
  margin: 0 0 16px;
}
.cs-hero__subtitle:last-child {
  margin-bottom: 0;
}
.cs-hero__subtitle strong {
  font-weight: 700;
}

@keyframes cs-fade-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.cs-hero__image {
  max-width: 1115px;
  margin: 80px auto 0;
}
.cs-hero__image img {
  width: 100%;
  height: auto;
  border-radius: 32px;
}
/* Some hero assets are tall composites meant to be cropped into a wide band,
   rather than shown at their full natural height. */
.cs-hero__image--crop {
  aspect-ratio: 1120 / 611;
  overflow: hidden;
}
.cs-hero__image--crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.cs-article {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 40px 120px;
}

.cs-article h3 {
  font-family: var(--font-libre-baskerville);
  font-style: normal;
  font-weight: 700;
  font-size: 40px;
  line-height: 1.4em;
  letter-spacing: -0.4px;
  color: var(--color-text);
  margin: 96px 0 24px;
}
.cs-article h3:first-child {
  margin-top: 0;
}

.cs-article h4 {
  font-family: var(--font-libre-baskerville);
  font-style: italic;
  font-weight: 400;
  font-size: 28px;
  line-height: 1.3em;
  color: var(--color-text);
  margin: 0 0 20px;
}

.cs-article p {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  line-height: 1.3em;
  color: var(--color-muted);
  margin: 0 0 20px;
}
.cs-article p strong {
  font-weight: 700;
  color: var(--color-muted);
}

.cs-article ul,
.cs-article ol {
  margin: 0 0 20px;
  padding-left: 20px;
}
.cs-article li {
  font-family: var(--font-dm-sans);
  font-size: 16px;
  line-height: 1.3em;
  color: var(--color-muted);
  margin-bottom: 12px;
}
.cs-article li strong {
  font-weight: 700;
  color: var(--color-muted);
}

.cs-article figure {
  margin: 40px 0;
}
.cs-article figure img {
  width: 100%;
  height: auto;
  display: block;
}
.cs-article__figure-row {
  display: flex;
  gap: 24px;
  margin: 40px 0;
}
.cs-article__figure-row img {
  height: auto;
}
.cs-article__figure-row .is-narrow {
  width: 33.75%;
}
.cs-article__figure-row .is-wide {
  width: 66.25%;
}
.cs-article__figure-row .is-half {
  width: calc(50% - 12px);
  border-radius: 8px;
}

/* Text alongside a tall media element (e.g. a phone-shaped prototype
   video), used in the Outcome section. */
.cs-outcome-split {
  display: flex;
  gap: 32px;
  align-items: flex-start;
  margin: 40px 0;
}
.cs-outcome-split__text {
  flex: 1;
}
.cs-outcome-split__text p:last-child,
.cs-outcome-split__text ul:last-child {
  margin-bottom: 0;
}
.cs-outcome-split__media {
  flex-shrink: 0;
  width: 28.5%;
}
.cs-outcome-split__media video,
.cs-outcome-split__media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* === Responsive === */
@media (max-width: 1199.98px) {
  .cs-hero__title {
    font-size: 56px;
  }
  .cs-article h3 {
    font-size: 34px;
  }
}

@media (max-width: 809.98px) {
  .cs-header {
    padding: 16px 20px;
  }
  .cs-hero {
    padding: 60px 20px 0;
  }
  .cs-hero__title {
    font-size: 36px;
    letter-spacing: -1px;
    margin-bottom: 40px;
  }
  .cs-hero__subtitle {
    font-size: 17px;
  }
  .cs-hero__image {
    margin-top: 40px;
    padding: 0;
    border-radius: 24px;
    overflow: hidden;
    height: 340px;
    display: flex;
  }
  .cs-hero__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
  }
  .cs-article {
    padding: 60px 20px 80px;
  }
  .cs-article h3 {
    font-size: 28px;
    margin-top: 64px;
  }
  .cs-article h4 {
    font-size: 22px;
  }
  .cs-article__figure-row {
    flex-direction: column;
  }
  .cs-article__figure-row .is-narrow,
  .cs-article__figure-row .is-wide,
  .cs-article__figure-row .is-half {
    width: 100%;
  }
  .cs-outcome-split {
    flex-direction: column;
  }
  .cs-outcome-split__media {
    width: 60%;
    max-width: 260px;
    align-self: center;
  }
}
