.case-study-page { background: var(--paper); }
.case-study-page .site-header { color: var(--ink); }
.case-study-page .brand-mark { filter: invert(1); }
.case-study-page .brand-copy strong { color: var(--ink); }
.case-study-page .brand-copy small { color: #676964; }
.case-study-page .main-nav,
.case-study-page .header-cta { color: #555650; }
.case-study-page .main-nav a:hover,
.case-study-page .header-cta:hover { color: var(--ink); }

.case-hero { padding: 76px 0 50px; }
.case-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(430px, 1.12fr);
  gap: 72px;
  align-items: center;
}
.case-hero-copy .eyebrow { margin-bottom: 26px; }
.case-title {
  max-width: 780px;
  margin-bottom: 28px;
  font-family: var(--serif);
  font-size: clamp(62px, 7vw, 108px);
  font-weight: 400;
  line-height: 0.9;
  letter-spacing: -0.065em;
}
.case-lede { max-width: 680px; margin-bottom: 28px; color: #4f504b; font-size: clamp(18px, 1.8vw, 24px); line-height: 1.55; }
.case-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.case-tags span { padding: 8px 13px; border: 1px solid #d2d0c8; border-radius: 999px; color: #5f5f59; font-size: 11px; font-weight: 720; }
.case-hero-media {
  display: grid;
  place-items: center;
  min-height: 550px;
  overflow: hidden;
  padding: 36px;
  border-radius: 30px;
  background: #232a30;
  box-shadow: 0 28px 60px rgba(23,23,22,0.13);
}
.case-hero-media img { width: 100%; max-height: 485px; object-fit: contain; }
.case-hero-media.case-blue { background: #5d91df; }
.case-hero-media.case-sky { background: #e8edf0; }
.case-hero-media.case-purple { background: #292731; }
.case-hero-media.case-security { background: #dfe7ec; }

.case-facts { padding: 28px 0 82px; }
.case-facts-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
}
.case-fact { min-height: 146px; padding: 26px; border-right: 1px solid var(--line); }
.case-fact:last-child { border-right: 0; background: var(--lime); }
.case-fact strong { display: block; margin-bottom: 35px; font-size: 10px; font-weight: 830; letter-spacing: 0.13em; text-transform: uppercase; }
.case-fact span { display: block; max-width: 245px; color: #5f5f59; font-size: 14px; line-height: 1.45; }

.case-section { padding: 100px 0; }
.case-section-warm { background: var(--paper-warm); }
.case-section-dark { color: white; background: var(--ink); }
.case-section-grid {
  display: grid;
  grid-template-columns: minmax(190px, 0.35fr) minmax(0, 0.65fr);
  gap: 80px;
}
.case-section-label { color: #71716a; font-size: 11px; font-weight: 830; letter-spacing: 0.14em; text-transform: uppercase; }
.case-section-dark .case-section-label { color: rgba(255,255,255,0.48); }
.case-copy { max-width: 870px; }
.case-copy h2 {
  margin-bottom: 28px;
  font-family: var(--serif);
  font-size: clamp(48px, 5.3vw, 78px);
  font-weight: 400;
  line-height: 0.98;
  letter-spacing: -0.05em;
}
.case-copy h3 { margin: 44px 0 14px; font-family: var(--serif); font-size: 31px; font-weight: 400; line-height: 1.1; }
.case-copy p, .case-copy li { color: var(--muted); font-size: 17px; line-height: 1.75; }
.case-section-dark .case-copy p, .case-section-dark .case-copy li { color: rgba(255,255,255,0.64); }
.case-copy ul { display: grid; gap: 12px; margin: 28px 0 0; padding-left: 20px; }
.case-callout {
  margin-top: 38px;
  padding: 28px;
  border-left: 5px solid var(--lime);
  border-radius: 0 18px 18px 0;
  background: rgba(210,230,75,0.12);
}
.case-callout p { margin: 0; color: var(--ink); font-family: var(--serif); font-size: 26px; line-height: 1.35; }
.case-section-dark .case-callout p { color: white; }

.case-media-shell { padding: 78px 0; background: #ece9e1; }
.case-media {
  overflow: hidden;
  margin: 0;
  padding: 28px;
  border-radius: 28px;
  background: #262625;
  box-shadow: 0 24px 50px rgba(23,23,22,0.11);
}
.case-media-light { background: #eef2f2; }
.case-media img { width: 100%; max-height: 760px; object-fit: contain; }
.case-media figcaption { margin-top: 18px; color: rgba(255,255,255,0.52); font-size: 11px; line-height: 1.5; }
.case-media-light figcaption { color: #696963; }
.case-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
.case-gallery .case-media { display: flex; flex-direction: column; min-height: 420px; }
.case-gallery .case-media img { flex: 1; }

.case-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 42px; }
.case-stat { min-height: 190px; padding: 26px; border: 1px solid rgba(255,255,255,0.13); border-radius: 20px; background: #222220; }
.case-stat:nth-child(2) { color: var(--ink); background: var(--lime); }
.case-stat strong { display: block; margin-bottom: 56px; font-family: var(--serif); font-size: 46px; font-weight: 400; line-height: 1; }
.case-stat span { color: rgba(255,255,255,0.56); font-size: 12px; line-height: 1.45; }
.case-stat:nth-child(2) span { color: rgba(23,23,22,0.64); }

.case-next { padding: 78px 0 46px; }
.case-next-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 54px;
  border-radius: 28px;
  color: white;
  background: var(--ink);
}
.case-next-card small { display: block; margin-bottom: 18px; color: rgba(255,255,255,0.48); font-size: 10px; font-weight: 820; letter-spacing: 0.14em; text-transform: uppercase; }
.case-next-card strong { display: block; max-width: 720px; font-family: var(--serif); font-size: clamp(42px, 5vw, 72px); font-weight: 400; line-height: 0.98; }
.case-next-card > span:first-child { color: white; white-space: normal; }
.case-next-card > span:last-child { color: var(--lime); font-size: 13px; font-weight: 820; white-space: nowrap; }

@media (max-width: 1000px) {
  .case-hero-grid { grid-template-columns: 1fr; }
  .case-hero-media { min-height: 450px; }
  .case-section-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (max-width: 760px) {
  .case-hero { padding-top: 48px; }
  .case-title { font-size: clamp(56px, 18vw, 78px); }
  .case-hero-media { min-height: 310px; padding: 18px; }
  .case-facts-grid { grid-template-columns: repeat(2, 1fr); }
  .case-fact:nth-child(2) { border-right: 0; }
  .case-fact:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .case-section { padding: 76px 0; }
  .case-gallery, .case-stats { grid-template-columns: 1fr; }
  .case-gallery .case-media { min-height: 300px; }
  .case-next-card { align-items: flex-start; flex-direction: column; padding: 34px; }
}
