/* ══════════════════════════════════════════════════════════
   CASE STUDY COMPONENTS — Shared across all pages
   Browser chrome frame + phone frame side by side.
   Import: <link rel="stylesheet" href="/css/case-studies.css">

   Approved layout (April 2026):
   - Browser frame: red/yellow/green dots + URL bar
   - Phone frame: notch, 24px radius, bottom home bar, 4px border
   - Devices side by side, phone 160px wide, centered vertically
   - Alternate phone left/right between cards
   - Dark background (#111)
   ══════════════════════════════════════════════════════════ */

.case-studies {
  display: flex;
  flex-direction: column;
  gap: 32px;
  margin-top: 36px;
}

.case-card {
  border: 1px solid #333;
  overflow: hidden;
}

.case-card-body {
  padding: 24px;
}

.case-card-body h3 {
  font-family: 'DM Sans', sans-serif;
  font-style: normal;
  font-weight: 600;
  font-size: 17px;
  color: #F5F0EB;
  margin-bottom: 4px;
}

.case-card-body .case-type {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(245, 240, 235, 0.55);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

.case-card-body p {
  font-size: 14px;
  color: rgba(245, 240, 235, 0.75);
  line-height: 1.7;
  margin-bottom: 12px;
}

/* Score badges */
.case-score {
  display: flex;
  align-items: center;
  gap: 12px;
}

.score-badge {
  font-family: 'DM Mono', monospace;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 2px;
}

.score-before {
  background: rgba(196, 74, 63, 0.15);
  color: #c44a3f;
}

.score-after {
  background: rgba(62, 207, 110, 0.15);
  color: #3ecf6e;
}

.score-arrow {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: #C5A572;
  font-size: 18px;
}

/* ── Screenshot pair container ──
   2026-04-22: dropped the #111 background + heavy dark device frames.
   2026-04-22b: swapped flex side-by-side for an absolute composition that
   mirrors the dashboard hero mockup — desktop centered, phone overlapping
   the lower-right corner with a slight tilt. Casey: 'i like how you
   mocked the phone a little sideways on this'. */
.case-screenshots {
  display: block;
  padding: 56px 56px 72px;
  background: transparent;
  position: relative;
  overflow: visible;
  min-height: 380px;
}

/* ── Browser frame — light, thin, just enough to read as "a browser" ── */
.case-browser {
  width: 80%;
  position: relative;
  border-radius: 8px;
  border: 1px solid rgba(29, 27, 22, 0.08);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 60px -30px rgba(29, 27, 22, 0.32);
  z-index: 1;
}

.case-browser-bar {
  background: #f5f0e8;
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid rgba(29, 27, 22, 0.06);
}

.case-browser-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.85;
}

.case-browser-dot.r { background: #ff5f57; }
.case-browser-dot.y { background: #febc2e; }
.case-browser-dot.g { background: #28c840; }

.case-browser-url {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  color: rgba(29, 27, 22, 0.5);
  margin-left: 12px;
}

.case-browser img {
  width: 100%;
  display: block;
}

/* ── Phone frame — overlaps the desktop's lower-right with a slight tilt ── */
.case-phone {
  width: 19%;
  position: absolute;
  right: 6%;
  bottom: 6%;
  border-radius: 22px;
  border: 1px solid rgba(29, 27, 22, 0.1);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 22px 48px -18px rgba(29, 27, 22, 0.42);
  z-index: 3;
  transform: rotate(6deg);
  transform-origin: bottom right;
}

.case-phone-notch,
.case-phone-bottom { display: none; }

.case-phone img {
  width: 100%;
  display: block;
}

/* Alternate layout: even cards mirror — phone on the lower-LEFT, opposite tilt */
.dl-cases .case-card:nth-child(even) .case-screenshots { flex-direction: row; }
.dl-cases .case-card:nth-child(even) .case-browser {
  margin-left: auto;
}
.dl-cases .case-card:nth-child(even) .case-phone {
  right: auto;
  left: 6%;
  transform: rotate(-6deg);
  transform-origin: bottom left;
}

/* ── Responsive ── */
@media (max-width: 700px) {
  .case-screenshots {
    padding: 28px 18px 88px;
    min-height: 0;
  }
  .case-browser { width: 92%; margin: 0 auto; }
  .case-phone {
    width: 28%;
    right: 4%;
    bottom: 4%;
    transform: rotate(5deg);
  }
  .dl-cases .case-card:nth-child(even) .case-phone {
    transform: rotate(-5deg);
  }
  .case-browser-bar { padding: 7px 10px; }
  .case-browser-dot { width: 7px; height: 7px; }
  .case-browser-url { font-size: 9px; }
}
