/* ============================================================
   CASE STUDY PAGE STYLES — EDITORIAL NARRATIVE SYSTEM
   - Inspired by Andrea Da Silva Case Study Rhythm
   - Zero Repetitive Boxy Cards
   - Content Lives Directly on the Page
   - Large Standalone Visuals (75-90% width)
   - Generous Vertical Whitespace (120-180px)
   ============================================================ */

.case-page {
  background-color: #f7f7f5;
  color: #161515;
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  padding-bottom: 140px;
  position: relative;
}

/* ── Top Bar Container for Back Button & Sticky Nav ───────── */
.case-top-bar {
  position: sticky;
  top: 24px;
  z-index: 500;
  width: calc(100% - 120px);
  max-width: 1480px;
  margin-inline: auto;
  padding-inline: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.case-back-btn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #161515;
  color: #ffffff;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.2s ease, box-shadow 0.2s ease;
}

.case-back-btn:hover {
  background: #0151fe;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 12px 28px rgba(1, 81, 254, 0.3);
}

/* ── Sticky Top Section Navigation Pill ───────────────────── */
.case-pill-nav {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #161515;
  padding: 6px;
  border-radius: 100px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(12px);
  margin-inline: auto;
}

.case-nav-link {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.65);
  padding: 7px 16px;
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  white-space: nowrap;
}

.case-nav-link:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}

.case-nav-link.active {
  color: #161515;
  background: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.case-top-spacer {
  width: 44px;
  height: 44px;
}

/* ── Large Short Horizontal Hero Panel ───────────────────── */
.case-hero-card {
  background: #ebebeb;
  border-radius: 40px;
  width: calc(100% - 120px);
  max-width: 1480px;
  min-height: 330px;
  margin-inline: auto;
  margin-top: 52px;
  margin-bottom: 64px;
  padding: 48px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

/* ── Product Showcase Video Section ───────────────────────── */
.case-showcase-section {
  width: 100%;
  margin-top: 0;
  margin-bottom: 80px;
}

.showcase-video-wrapper {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  border: none;
  outline: none;
  background: #161515;
  line-height: 0;
  position: relative;
}

.showcase-video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
  object-fit: contain;
  border: none;
  outline: none;
}

.showcase-video--active {
  display: block !important;
}

.case-hero-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: #161515;
  margin: 0;
}

.case-hero-year {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: #777777;
  position: absolute;
  top: 48px;
  right: 48px;
}

.case-meta-grid {
  position: absolute;
  left: 48px;
  bottom: 42px;
  display: flex;
  gap: 48px;
  border: none;
  margin: 0;
  padding: 0;
}

.case-meta-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.case-meta-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #777777;
}

.case-meta-val {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #161515;
}

/* ── Interactive Hero Photo Stack ─────────────────────────── */
.hero-photo-stack {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 680px;
  height: 260px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.photo-frame {
  position: absolute;
  pointer-events: auto;
  cursor: default;
  width: 310px;
  border-radius: 14px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.photo-frame img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  pointer-events: none;
}

.photo-frame.photo-1 {
  right: 340px;
  bottom: -50px;
  transform: rotate(-6deg) scale(1);
  z-index: 1;
}

.photo-frame.photo-2 {
  right: 205px;
  bottom: -40px;
  transform: rotate(2deg) scale(1);
  z-index: 3;
}

.photo-frame.photo-3 {
  right: 70px;
  bottom: -55px;
  transform: rotate(6deg) scale(1);
  z-index: 2;
}

/* ── Intel Hero Balance Correction (Anchored to Bottom like A8) ── */
.hero-photo-stack--intel {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 680px;
  height: 280px;
  pointer-events: none;
  z-index: 10;
  overflow: visible;
}

.hero-photo-stack--intel .photo-frame {
  position: absolute;
  pointer-events: auto;
  cursor: default;
  border-radius: 14px;
  background: #ffffff;
  padding: 8px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.12);
}

.hero-photo-stack--intel .photo-frame img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  pointer-events: none;
}

/* Photo 1 (Single Hero Image: Attract screen - portrait, balanced on bottom right) */
.hero-photo-stack--intel .photo-frame.photo-1 {
  width: 250px;
  right: 64px;
  bottom: -40px;
  transform: rotate(-3deg) scale(1);
  z-index: 1;
}

/* Photo 2 (Center Foreground: Kiosk photo - landscape, unchanged) */
.hero-photo-stack--intel .photo-frame.photo-2 {
  width: 300px;
  right: 185px;
  bottom: -35px;
  transform: rotate(2deg) scale(1);
  z-index: 3;
}

/* Photo 3 (Right: Explore screen - portrait, pushed down to match A8 top whitespace) */
.hero-photo-stack--intel .photo-frame.photo-3 {
  width: 270px;
  right: 50px;
  bottom: -290px;
  transform: rotate(6deg) scale(1);
  z-index: 2;
}

/* ── Main Case Content Container Below Hero ───────────────── */
.case-container {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--section-pad-x, 24px);
}

/* ── EDITORIAL SECTION STYLING (NO BOXED CARDS) ───────────── */
.case-section {
  padding-block: 130px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  scroll-margin-top: 100px;
}

.case-section-header {
  margin-bottom: 56px;
}

.case-section-eyebrow {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #888888;
  margin-bottom: 12px;
  display: block;
}

.case-section-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 48px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #161515;
  line-height: 1.1;
}

.case-section-lead {
  font-family: 'DM Sans', sans-serif;
  font-size: 20px;
  line-height: 1.55;
  color: #555555;
  max-width: 820px;
  margin-top: 16px;
}

/* ── 1. Overview Section: Asymmetric 2-Column Editorial ───── */
.case-overview-editorial {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 64px;
  align-items: center;
}

.overview-editorial-text {
  font-family: 'DM Sans', sans-serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.6;
  color: #333333;
}

.overview-editorial-img {
  width: 100%;
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: block;
}

/* ── 2. Challenge Section: Vertical Editorial List ───────── */
.case-challenge-list {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.challenge-editorial-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.challenge-editorial-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.ch-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  font-weight: 800;
  color: #0151fe;
  letter-spacing: 0.08em;
}

.ch-content h3 {
  font-family: 'DM Sans', sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #161515;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.ch-content p {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #555555;
  max-width: 800px;
}

/* ── 3. Strategy / Approach Section: Loose Asymmetric Blocks ─ */
.case-approach-editorial {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px;
}

.approach-editorial-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-top: 24px;
  border-top: 2px solid #161515;
}

.ap-num {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  color: #0151fe;
  letter-spacing: 0.1em;
}

.ap-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 24px;
  font-weight: 800;
  color: #161515;
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.ap-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #555555;
}

/* ── 4. Workflow Section: Large Standalone Image Showcase ─── */
.workflow-editorial-stack {
  display: flex;
  flex-direction: column;
  gap: 120px;
}

/* ── Intel 2-Column Side-by-Side Workflow Grid ───────────── */
.workflow-editorial-stack--2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 64px 36px;
  align-items: start;
}

.workflow-editorial-stack--intel {
  display: flex;
  flex-direction: column;
  gap: 56px;
}

.workflow-editorial-stack--2col .workflow-stage-editorial {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.workflow-editorial-stack--2col .stage-editorial-header {
  max-width: 100%;
}

.workflow-stage-editorial {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.stage-editorial-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 760px;
}

.stage-editorial-tag {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 800;
  color: #0151fe;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-editorial-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 32px;
  font-weight: 800;
  color: #161515;
  letter-spacing: -0.02em;
}

.stage-editorial-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #555555;
}

/* Standalone Large Screenshot (Spans 85-90% width) */
.stage-standalone-visual {
  width: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #ffffff;
}

.stage-standalone-visual img {
  width: 100%;
  height: auto;
  display: block;
}

/* ── FoxFinds Workflow Image Sizing & Controlled 2-Column Crop ── */
.workflow-editorial-stack--foxfinds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
  align-items: stretch;
}

.stage-standalone-visual--foxfinds {
  width: 100%;
  aspect-ratio: 4 / 5;
  max-height: 640px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #f95506;
  position: relative;
}

.stage-standalone-visual--foxfinds img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── Intel Single Workflow Image Controlled Crop ───────────── */
.stage-standalone-visual--intel-single {
  width: 100%;
  max-width: 520px;
  aspect-ratio: 4 / 5;
  max-height: 600px;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
  background: #0071c5;
  position: relative;
  margin-top: 16px;
}

.stage-standalone-visual--intel-single img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* ── 5. Outcome Section: Editorial Typography Statements ──── */
.case-outcome-editorial {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.outcome-statement-item {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  align-items: flex-start;
}

.outcome-statement-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.out-statement-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #161515;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.out-statement-desc {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: #555555;
}

/* ── 6. Deliverables List: Clean Editorial Grid ───────────── */
.case-deliverables-editorial {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px 64px;
}

.deliverable-editorial-item {
  font-family: 'DM Sans', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: #161515;
  padding-block: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 16px;
}

.deliverable-bullet {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0151fe;
}

/* ── 7. More Work Section: Editorial Links ────────────────── */
.more-work-editorial-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.more-work-editorial-link {
  text-decoration: none;
  color: #161515;
  padding-top: 24px;
  border-top: 2px solid #161515;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  transition: transform 0.25s ease;
}

.more-work-editorial-link:hover {
  transform: translateY(-4px);
}

.more-work-editorial-title {
  font-family: 'DM Sans', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: #161515;
  line-height: 1.15;
}

.more-work-editorial-meta {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: #888888;
  margin-top: 6px;
}

.more-work-editorial-arrow {
  font-size: 28px;
  color: #161515;
  transition: transform 0.2s ease, color 0.2s ease;
}

.more-work-editorial-link:hover .more-work-editorial-arrow {
  transform: translateX(6px);
  color: #0151fe;
}

/* ── Responsive Styling ──────────────────────────────────── */
@media (max-width: 900px) {
  .case-top-bar,
  .case-hero-card {
    width: calc(100% - 32px);
  }
  .case-hero-card {
    padding: 32px 24px;
    min-height: auto;
  }
  .case-hero-title {
    font-size: 32px;
  }
  .hero-photo-stack {
    display: none;
  }
  .case-meta-grid {
    position: static;
    flex-direction: column;
    gap: 16px;
    margin-top: 24px;
  }
  .case-overview-editorial,
  .case-approach-editorial,
  .workflow-editorial-stack--2col,
  .workflow-editorial-stack--foxfinds,
  .outcome-statement-item,
  .case-deliverables-editorial,
  .more-work-editorial-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .challenge-editorial-item {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .case-top-bar {
    padding-inline: 16px;
  }
  .case-pill-nav {
    overflow-x: auto;
    max-width: calc(100vw - 80px);
  }
}
