/* ════════════════════════════════
   CASE STUDY PAGE — single project detail
   Mix: madeinevolve editorial structure + designbyrobin image rhythm
════════════════════════════════ */

.page-case {
  background: var(--color-bg);
  color: var(--color-white);
  position: relative;
  z-index: 2;
}

/* ────────────────────────────────
   1. CASE HERO — title + meta + cover image
   madeinevolve pattern: big title, year, "Live Site" link, service tags
──────────────────────────────── */

.case-hero {
  padding: clamp(160px, 18vw, 260px) clamp(20px, 3.5vw, 50px) clamp(40px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 80px);
}

/* Top row: title (left) + meta (right) */
.case-hero__top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
}

.case-hero__title-wrap {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 1vw, 16px);
}

.case-hero__year {
  font-family: var(--font-mono);
  font-size: clamp(12px, 0.9vw, 14px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.case-hero__title {
  font-family: var(--font-display);
  font-size: clamp(56px, 11vw, 200px);
  font-weight: var(--weight-medium);
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--color-white);
  margin: 0;
  text-transform: none;
  visibility: hidden;
}

.case-hero__live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: clamp(12px, 0.9vw, 14px);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-white);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: transparent;
  transition: background 0.3s ease, color 0.3s ease;
  white-space: nowrap;
}
.case-hero__live:hover {
  background: var(--color-accent);
  color: var(--color-black);
  border-color: var(--color-accent);
}
.case-hero__live svg { width: 12px; height: 12px; }

/* Service tags row (alphabetized markers a., b., c., …) */
.case-hero__services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: clamp(8px, 1vw, 16px) clamp(20px, 3vw, 48px);
  padding-top: clamp(24px, 3vw, 40px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.case-hero__service {
  display: flex;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1vw, 15px);
  color: var(--color-white);
  letter-spacing: 0;
  line-height: 1.4;
}

.case-hero__service-marker {
  color: var(--color-text-muted);
  flex-shrink: 0;
  font-style: italic;
}

/* Cover image — full bleed, large */
.case-hero__cover {
  width: 100%;
  height: clamp(420px, 70vh, 800px);
  overflow: hidden;
  background: var(--color-bg);
  clip-path: inset(0 100% 0 0);
}

.case-hero__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.12);
}

/* ────────────────────────────────
   2. OVERVIEW — small label + headline + paragraph
   madeinevolve pattern: section markers + brief intro
──────────────────────────────── */

.case-section {
  padding: clamp(80px, 10vw, 160px) clamp(20px, 3.5vw, 50px);
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 5vw, 80px);
}

.case-section__head {
  display: grid;
  grid-template-columns: minmax(120px, 18%) 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
}

.case-section__label {
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.85vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-muted);
  padding-top: 0.4em;
  display: flex;
  gap: 8px;
}
.case-section__label-marker {
  font-style: italic;
}

.case-section__heading {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 84px);
  font-weight: var(--weight-medium);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--color-white);
  margin: 0;
  text-transform: none;
}

.case-section__copy {
  display: grid;
  grid-template-columns: minmax(120px, 18%) 1fr;
  gap: clamp(24px, 4vw, 64px);
}

.case-section__paragraph {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.3vw, 22px);
  line-height: 1.45;
  color: var(--color-white);
  margin: 0;
  max-width: 60ch;
  grid-column: 2;
}

/* ────────────────────────────────
   3. KPI STATS — 3 numbers in a row
   madeinevolve pattern (signature for CRO brand)
──────────────────────────────── */

.case-stats {
  padding: clamp(60px, 8vw, 120px) clamp(20px, 3.5vw, 50px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(40px, 5vw, 80px);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.case-stat {
  display: flex;
  flex-direction: column;
  gap: clamp(12px, 1.4vw, 22px);
}

.case-stat__marker {
  font-family: var(--font-mono);
  font-size: clamp(11px, 0.85vw, 13px);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  font-style: italic;
}

.case-stat__num {
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 144px);
  font-weight: var(--weight-medium);
  line-height: 0.9;
  letter-spacing: -0.04em;
  color: var(--color-accent);
  margin: 0;
}

.case-stat__label {
  font-family: var(--font-mono);
  font-size: clamp(12px, 0.95vw, 15px);
  color: var(--color-white);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  line-height: 1.4;
  margin: 0;
}

@media (max-width: 768px) {
  .case-stats {
    grid-template-columns: 1fr;
    gap: clamp(32px, 6vw, 60px);
  }
}

/* ────────────────────────────────
   4. IMAGE ESSAY — designbyrobin rhythm
   Pattern: large → pair → large → pair → large
──────────────────────────────── */

.case-essay {
  padding: clamp(80px, 10vw, 160px) clamp(20px, 3.5vw, 50px);
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 3vw, 48px);
}

/* Full-bleed large image (hero shot) */
.case-essay__large {
  width: 100%;
  height: clamp(420px, 65vh, 720px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.case-essay__large img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Side-by-side pair */
.case-essay__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2vw, 32px);
}

.case-essay__pair > div {
  width: 100%;
  height: clamp(320px, 45vh, 520px);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
}
.case-essay__pair img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (max-width: 768px) {
  .case-essay__pair {
    grid-template-columns: 1fr;
  }
  .case-essay__pair > div {
    height: clamp(280px, 50vw, 380px);
  }
}

/* ────────────────────────────────
   5. SCROLL TO NEXT PAGE (Osmo Supply pattern)
   Replaces traditional footer + next-case card. Sticky scroll-driven
   reveal with circular SVG progress ring. Auto-triggers link click
   (Barba intercepts → OSMO wipe transition to next case page).
──────────────────────────────── */

.scroll-next {
  min-height: 200vh;          /* gives user scroll room to "feel" the interaction */
  position: relative;
  background: var(--color-bg);
}

.scroll-next__inner {
  width: 100%;
  height: 100dvh;
  color: inherit;
  justify-content: center;
  align-items: center;
  text-decoration: none;
  display: flex;
  position: sticky;
  top: 0;
}

.scroll-next__bg {
  z-index: 0;
  position: absolute;
  inset: 0%;
  overflow: hidden;
}

.scroll-next__bg-img {
  object-fit: cover;
  width: 100%;
  height: 100%;
  display: block;
  will-change: transform;
}

.scroll-next__bg-overlay {
  z-index: 2;
  opacity: 0.5;
  background-color: var(--color-bg);
  position: absolute;
  inset: 0%;
  will-change: opacity;
}

.scroll-next__center {
  z-index: 2;
  color: var(--color-white);
  flex-flow: column;
  justify-content: center;
  align-items: center;
  padding-bottom: 1em;
  display: flex;
  position: relative;
  gap: 0;
}

.scroll-next__sub {
  opacity: 0.6;
  letter-spacing: -0.05em;
  font-family: var(--font-display);
  font-size: clamp(14px, 1.4vw, 22px);
  font-weight: 400;
  line-height: 1;
}

.scroll-next__h {
  letter-spacing: -0.04em;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(56px, 9vw, 160px);
  font-weight: var(--weight-medium);
  line-height: 1;
}

.scroll-next__progres {
  z-index: 1;
  color: var(--color-accent);
  width: clamp(280px, 28vw, 440px);
  position: absolute;
}

.scroll-next__progres-svg {
  justify-content: center;
  align-items: center;
  width: 100%;
  display: flex;
  transform: rotate(-90deg);
  overflow: visible !important;
}

/* ────────────────────────────────
   REDUCED MOTION
──────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .case-hero__live { transition: none; }
}
