/* ===== Case Study Page ===== */

/* ── Hero ── */
.cs-hero {
  padding-top: calc(var(--gnb-height) + var(--gnb-top) + 48px);
  padding-bottom: 0;
}

.cs-hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.cs-hero__title {
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.1;
  color: var(--color-text);
  margin-bottom: 20px;
  max-width: 800px;
}

.cs-hero__tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.cs-hero__summary {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-muted);
  line-height: 1.75;
  max-width: 640px;
}

/* ── Cover image ── */
.cs-cover-wrap {
  margin-bottom: 56px;
}

.cs-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 28px;
  overflow: hidden;
  background: var(--color-surface);
}

.cs-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Meta strip ── */
.cs-meta {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 40px;
}

.cs-meta__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  column-gap: 16px;
  background: #F9FAFB;
  border-radius: 16px;
  padding: 24px;
  margin: 56px 0 72px;
}

.cs-meta__item {
  padding: 0;
}

.cs-meta__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--color-muted-2);
  margin-bottom: 8px;
}

.cs-meta__value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  line-height: 1.6;
}

/* ── Body ── */
.cs-body {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px 120px;
}

/* ── Section (vertical: label → content) ── */
.cs-section {
  padding: 64px 0;
}

.cs-section:first-child {
  padding-top: 0;
}

.cs-section__label {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #a4a8ac;
  margin-bottom: 8px;
}



.cs-section__title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: var(--color-text);
  margin-bottom: 16px;
  line-height: 1.3;
  max-width: 760px;
}

.cs-section__text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-muted);
  line-height: 1.75;
  max-width: 760px;
}

.cs-section__text + .cs-section__text {
  margin-top: 16px;
}

/* ── Image blocks ── */
.cs-image {
  margin-top: 40px;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}

.cs-image img {
  width: 100%;
  display: block;
}

.cs-image--placeholder {
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-image--placeholder span {
  font-size: 0.82rem;
  color: var(--color-muted-2);
  font-weight: 500;
}

/* ── Stat callouts ── */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 32px;
}

.cs-stat {
  background: #F9FAFB;
  border-radius: 16px;
  padding: 20px 24px;
}

.cs-stat__num {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: var(--color-text);
  line-height: 1;
  margin-bottom: 8px;
}

.cs-stat__label {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--color-muted);
  line-height: 1.5;
}

/* ── Hypothesis blocks ── */
.cs-hypo {
  margin-top: 48px;
  padding-top: 40px;
  border-top: 1.5px solid var(--color-border);
}

.cs-hypo__label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #a4a8ac;
  margin-bottom: 10px;
}

.cs-hypo__headline {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  letter-spacing: -0.3px;
  line-height: 1.4;
  max-width: 680px;
}

.cs-hypo__result {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-text);
  background: #F9FAFB;
  border-radius: 999px;
  padding: 5px 14px;
  margin-bottom: 14px;
}

.cs-hypo__text {
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-muted);
  line-height: 1.75;
  max-width: 680px;
}

/* ── Highlight quote ── */
.cs-quote {
  border-left: 3px solid var(--color-border);
  padding: 2px 0 2px 20px;
  margin: 20px 0;
  font-style: italic;
  color: var(--color-muted);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.7;
  max-width: 640px;
}

/* ── Image caption ── */
.cs-caption {
  font-size: 0.78rem;
  font-weight: 500;
  color: #a4a8ac;
  margin-top: 10px;
  line-height: 1.5;
}

/* ── Scroll reveal ── */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Section scroll reveal: blocks rise in as they enter (tagged by script.js) ── */
.sr {
  opacity: 0;
  transform: translateY(56px);
  transition:
    opacity 1.3s cubic-bezier(0.22, 1, 0.36, 1) var(--sr-delay, 0s),
    transform 1.5s cubic-bezier(0.22, 1, 0.36, 1) var(--sr-delay, 0s);
  will-change: opacity, transform;
}
.sr.sr--card { transform: translateY(36px); }
.sr.in { opacity: 1; transform: none; will-change: auto; }
@media (prefers-reduced-motion: reduce) {
  .sr, .sr.sr--card { opacity: 1; transform: none; transition: none; }
}

/* ── Slot-machine numbers for result / impact figures (reels built by script.js) ── */
.slot {
  position: relative;
  display: inline-block;
  clip-path: inset(0 -0.5em);            /* clip vertically only; keeps the text baseline */
}
.slot__ghost { visibility: hidden; }     /* sizes the slot to the final digit */
.slot__reel {
  position: absolute;
  left: 50%;
  top: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: translate3d(-50%, 0, 0);
  will-change: transform;
}
.slot__reel > span { display: block; }
.slot-sign { display: inline-block; opacity: 0; }

.slot-group.is-rolling .slot__reel {
  animation: slot-roll var(--roll-dur, 1.4s) cubic-bezier(0.2, 0.8, 0.3, 1.1) var(--roll-delay, 0s) both;
}
.slot-group.is-rolling .slot-sign {
  animation: slot-sign 0.45s cubic-bezier(0.34, 1.45, 0.64, 1) var(--roll-delay, 0s) both;
}

@keyframes slot-roll {
  from { transform: translate3d(-50%, 0, 0); }
  to   { transform: translate3d(-50%, var(--roll-to), 0); }
}
@keyframes slot-sign {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .slot-sign { opacity: 1; }
  .slot-group .slot__reel, .slot-group .slot-sign { animation: none !important; }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .cs-meta__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 0;
  }

  .cs-meta__item:nth-child(3n + 1) {
    padding-left: 0;
    border-left: none;
  }
}

@media (max-width: 768px) {
  .cs-hero__inner,
  .cs-cover-wrap,
  .cs-body { padding: 0 16px; }

  .cs-meta { padding: 0 16px; }

  .cs-hero { padding-bottom: 40px; }
  .cs-hero__title { letter-spacing: -1px; }
  .cs-back { margin-bottom: 32px; }

  .cs-cover { border-radius: 20px; }

  .cs-meta__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
    margin: 32px 0 48px;
    padding: 16px;
  }

  .cs-meta__item {
    padding: 0;
    border-left: none !important;
  }

  .cs-section {
    padding: 48px 0;
  }

  .cs-body { padding-bottom: 80px; }
}

/* Laptop widths (769–1679px): scale the case-study body to 87.5% so the 1920-wide Figma
   layouts keep similar side margins. GNB, footer and the custom cursor stay at 100%. */
@media (min-width: 769px) and (max-width: 1679px) {
  body > section,
  body > .cs-meta,
  body > .cs-body { zoom: 0.875; }
}
