/* ============================================================
   KAZI — ORIENT YARN CASE STUDY
   Accent canvas, cream text. Shares the case-study language of
   the RAB page (hero, reels, services, outro) plus Orient's own
   collage and white-framed gallery. Geometry from the Figma frame.
   ============================================================ */
.case-page { background: var(--color-accent); color: var(--color-bg); overflow-x: clip; }

/* ---------------- Hero (shared element with the work-page card) ---------------- */
.cs__hero { position: relative; height: min(27vw, 56vh); min-height: 240px; overflow: hidden; background: var(--color-dark); }
.cs__hero img { width: 100%; height: 100%; object-fit: cover; }
.cs__hero-title {
  position: absolute; right: clamp(20px, 2.8vw, 44px); bottom: clamp(16px, 2.2vw, 34px);
  text-align: right; color: var(--color-bg);
}
.cs__hero-title h1 {
  font-family: var(--font-body); font-weight: 700; letter-spacing: 0.01em;
  text-transform: uppercase; line-height: 1;
  font-size: clamp(18px, 2.1vw, 32px);
}
.cs__hero-title p { font-size: clamp(12px, 0.95vw, 15px); margin-top: 6px; opacity: 0.9; }

/* ---------------- Intro ---------------- */
.cs__intro { padding: clamp(44px, 5.5vw, 88px) clamp(28px, 5.5vw, 80px) clamp(24px, 3vw, 48px); }
.cs__logo {
  width: clamp(72px, 8.6vw, 124px); aspect-ratio: 1; background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.cs__logo img { width: 100%; height: 100%; object-fit: cover; }
.cs__intro-h {
  margin-top: clamp(36px, 5vw, 80px);
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; line-height: 1;
  font-size: clamp(22px, 2.7vw, 42px); color: var(--color-dark);
}
.cs__intro-p {
  margin-top: clamp(18px, 2.2vw, 34px); max-width: 46ch;
  font-size: clamp(15px, 1.65vw, 25px); line-height: 1.18;
}

/* ---------------- Behind the Fabric (collage) ----------------
   Staggered scatter matching the Figma. Every card is the SAME size
   (27vw wide, 4:5 portrait); positions/offsets measured from the export.
   The heading sits centred in the open gap, over no card. */
.cs__collage { position: relative; height: 102vw; }
.cs__col-img {
  position: absolute; width: 27vw; aspect-ratio: 4 / 5; object-fit: cover;
}
.cs__col--blue   { left: 71%; top: 2vw; }
.cs__col--teal   { left: 35%; top: 6vw; }
.cs__col--yellow { left: 3%;  top: 20vw; }
.cs__col--saree  { left: 69%; top: 43vw; }
.cs__col--dress  { left: 16%; top: 65vw; }
.cs__collage-h {
  position: absolute; left: 0; right: 0; top: 57vw;
  text-align: center;
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.01em; font-size: clamp(24px, 3vw, 46px); color: var(--color-bg);
}

/* ---------------- Statement ---------------- */
.cs__statement { padding: clamp(64px, 9vw, 150px) var(--pad) clamp(40px, 5vw, 80px); text-align: center; }
.cs__statement p {
  margin: 0 auto; max-width: 62ch;
  font-size: clamp(15px, 1.65vw, 25px); line-height: 1.25;
}

/* ---------------- Reels (slideable strips) ---------------- */
.cs__reels { padding: clamp(40px, 5vw, 80px) 0 clamp(46px, 6vw, 96px); }
.cs__reels-label {
  text-align: center; font-size: 13px; font-weight: 500;
  letter-spacing: 0.18em; text-transform: uppercase;
  margin-bottom: clamp(24px, 3.2vw, 52px);
}
.cs__reels-row {
  display: flex; align-items: center; width: max-content;
  gap: clamp(10px, 1.25vw, 18px);
  will-change: transform; cursor: grab; touch-action: pan-y;
}
.cs__reels-row.is-grabbing { cursor: grabbing; }
.cs__reel {
  flex: 0 0 auto; width: 22.7vw; height: 33.2vw; overflow: hidden; position: relative;
  transition: width 0.55s ease, height 0.55s ease, box-shadow 0.55s ease;
}
.cs__reel video {
  width: 100%; height: 100%; object-fit: cover; pointer-events: none;
  transform: translateZ(0);
  backface-visibility: hidden;
  transition: filter 0.55s ease, transform 0.55s ease;
}
/* Safari rasterises a blurred layer in tiles and leaves a hairline seam where
   two tiles meet — the black line that showed across the side reels. Blurring
   the video itself rather than its clipping container, on its own compositing
   layer, avoids that; the slight scale keeps the blur's soft edge outside the
   frame. Chromium never showed the seam, so this is invisible there. */
.cs__reel--near video { filter: blur(3px) brightness(0.85); transform: translateZ(0) scale(1.04); }
.cs__reel--far video  { filter: blur(6px) brightness(0.72); transform: translateZ(0) scale(1.07); }
.cs__reel--center {
  width: 23.4vw; height: 41.6vw; z-index: 2;
  box-shadow: 0 24px 60px rgba(17, 17, 17, 0.45);
}

/* Pause / play indicator on the active reel */
.cs__reel-state {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px;
  transform: translate(-50%, -50%); border-radius: 50%;
  background: var(--color-bg); color: var(--color-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; line-height: 1; letter-spacing: 0.08em;
  opacity: 0; transition: opacity 0.25s ease; pointer-events: none;
}
.cs__reel-state::after { content: '\275A\275A'; /* ❚❚ */ }
.cs__reel--center.is-paused .cs__reel-state::after { content: '\25B6'; padding-left: 4px; /* ▶ */ }
.cs__reel--center.is-paused .cs__reel-state { opacity: 1; }
/* Hover only where a pointer can leave again. On a touchscreen :hover sticks
   after a tap, so the badge stayed lit over a reel that had already resumed. */
@media (hover: hover) {
  .cs__reel--center:hover .cs__reel-state { opacity: 1; }
}

/* ---------------- Services / Impact ---------------- */
.cs__services { padding-top: clamp(40px, 5vw, 80px); }
.cs__shead, .cs__srow {
  display: flex; justify-content: space-between; align-items: center;
  padding: clamp(18px, 2.4vw, 40px) clamp(28px, 5.5vw, 80px);
}
.cs__shead h2 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.03em; line-height: 0.85;
  font-size: clamp(28px, 3.6vw, 54px); color: var(--color-dark);
}
.cs__srow + .cs__srow { border-top: 1px solid rgba(255, 255, 240, 0.55); }
.cs__srow h3 {
  font-family: var(--font-display); font-weight: 800; text-transform: uppercase;
  letter-spacing: -0.03em; line-height: 0.9;
  font-size: clamp(26px, 3.6vw, 54px); color: var(--color-bg);
}
.cs__snum { text-align: right; }
.cs__snum span {
  display: block; font-family: var(--font-display); font-weight: 700;
  font-size: clamp(24px, 3.2vw, 48px); line-height: 1; color: var(--color-bg);
}
.cs__snum small {
  display: block; font-family: var(--font-display); font-weight: 500;
  font-size: clamp(11px, 0.95vw, 15px); margin-top: 6px; opacity: 0.9;
}

/* ---------------- Gallery (white-framed cards) ---------------- */
.cs__gallery {
  padding: clamp(40px, 5vw, 80px) clamp(14px, 1.6vw, 24px) 0;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(14px, 2vw, 30px);
}
.cs__frame { background: #fff; padding: clamp(24px, 4.6vw, 68px); }
.cs__frame img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------------- Outro ---------------- */
.cs__outro { text-align: center; padding: clamp(90px, 13vw, 210px) var(--pad) clamp(56px, 7vw, 120px); }
.cs__outro p {
  font-family: var(--font-display); font-weight: 700; text-transform: uppercase;
  font-size: clamp(17px, 2.36vw, 36px); line-height: 1.25; letter-spacing: -0.01em;
  color: var(--color-bg);
}
.cs__end-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-top: clamp(64px, 9vw, 150px);
  margin-left: calc(-1 * var(--pad) + clamp(20px, 3vw, 44px));
  margin-right: calc(-1 * var(--pad) + clamp(20px, 3vw, 44px));
}
.cs__end-link {
  font-size: clamp(12px, 0.95vw, 15px); letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--color-bg); transition: opacity 0.2s ease;
}
.cs__end-link:hover { opacity: 0.7; }

/* Entry: content below the hero fades up once (hero itself stays put so
   the card-to-hero transition reads as one continuous move) */
.cs--enter .cs__intro, .cs--enter .cs__collage, .cs--enter .cs__statement,
.cs--enter .cs__reels, .cs--enter .cs__services, .cs--enter .cs__gallery, .cs--enter .cs__outro {
  opacity: 0; transform: translateY(22px);
}
.cs--enter-play .cs__intro, .cs--enter-play .cs__collage, .cs--enter-play .cs__statement,
.cs--enter-play .cs__reels, .cs--enter-play .cs__services, .cs--enter-play .cs__gallery, .cs--enter-play .cs__outro {
  opacity: 1; transform: translateY(0);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 768px) {
  .cs__hero { height: min(72vw, 60vh); }
  .cs__intro-p { max-width: none; }
  .cs__collage {
    height: auto; display: grid; grid-template-columns: 1fr 1fr;
    gap: 14px; padding: 24px 16px 0;
  }
  .cs__col-img { position: static; width: 100%; aspect-ratio: 4 / 5; }
  .cs__collage-h { position: static; grid-column: 1 / -1; text-align: center; padding: 18px 0; }
  .cs__reel { width: 34vw; height: 50vw; }
  .cs__reel--center { width: 56vw; height: 99.5vw; }
  .cs__reel-state { width: 46px; height: 46px; font-size: 13px; }
  .cs__srow h3, .cs__shead h2 { font-size: clamp(22px, 6.4vw, 30px); }
  .cs__snum span { font-size: clamp(20px, 5.6vw, 28px); }
  .cs__gallery { grid-template-columns: 1fr; }
  .cs__frame { padding: 20px; }
}
