:root {
  --case-black: #050505;
  --case-cream: #fff8f5;
  --case-white: #ffffff;
  --case-ink: #101014;
  --case-muted: #5f6068;
  --case-line: rgba(5, 5, 5, 0.18);
  --case-cyan: #00e5cc;
  --case-violet: #9b59ff;
  --case-blue: #55aaff;
  --case-display: "Barlow Condensed", Impact, sans-serif;
  --case-body: "DM Sans", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--case-cream);
  color: var(--case-ink);
  font-family: var(--case-body);
}
body.case-study-page { padding-top: 112px; }
a { color: inherit; }
img { max-width: 100%; }
.case-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 112px;
  border-bottom: 1px solid rgba(255,255,255,0.16);
  background: rgba(5,5,5,0.96);
  color: var(--case-white);
}
.case-nav-inner { width: min(1180px, calc(100% - 56px)); height: 100%; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.case-nav-logo img { display: block; width: auto; height: 88px; }
.case-nav-links { display: flex; align-items: center; gap: 24px; }
.case-nav-links a { font-family: var(--case-display); font-size: 15px; font-weight: 800; letter-spacing: 0.08em; text-decoration: none; text-transform: uppercase; }
.case-nav-links a:hover { color: var(--case-cyan); }
.case-lang { border: 1px solid rgba(255,255,255,0.35); padding: 9px 12px; }
.case-wrap { width: min(1180px, calc(100% - 56px)); margin: 0 auto; }
.case-eyebrow {
  margin: 0 0 16px;
  color: var(--case-cyan);
  font-family: var(--case-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.case-title,
.case-heading {
  margin: 0;
  font-family: var(--case-display);
  font-style: italic;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 0.9;
  text-transform: uppercase;
}
.case-title { font-size: clamp(64px, 9vw, 132px); max-width: 950px; }
.case-heading { font-size: clamp(48px, 6.5vw, 88px); }
.case-lead {
  max-width: 790px;
  margin: 28px 0 0;
  color: rgba(255,255,255,0.74);
  font-size: clamp(19px, 2vw, 25px);
  line-height: 1.58;
}
.case-copy { color: var(--case-muted); font-size: 18px; line-height: 1.75; }
.case-copy p { margin: 0 0 20px; }
.case-hero { background: var(--case-black); color: var(--case-white); padding: 92px 0 76px; }
.case-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }
.case-button {
  display: inline-flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 2px solid currentColor;
  padding: 14px 22px;
  font-family: var(--case-display);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}
.case-button.primary { border-color: transparent; background: linear-gradient(90deg, var(--case-cyan), var(--case-violet)); color: var(--case-black); }
.case-proof-strip { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 2px solid var(--case-black); background: var(--case-white); }
.case-proof-strip > div { padding: 25px 22px; border-right: 1px solid var(--case-line); text-align: center; }
.case-proof-strip > div:last-child { border-right: 0; }
.case-proof-strip strong { display: block; font-family: var(--case-display); font-size: 28px; font-style: italic; text-transform: uppercase; }
.case-proof-strip span { color: var(--case-muted); font-size: 13px; }
.case-section { padding: 92px 0; }
.case-section.dark { background: #0b0b0e; color: var(--case-white); }
.case-section.white { background: var(--case-white); }
.case-intro-grid,
.case-split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 70px; align-items: start; }
.case-facts { display: grid; grid-template-columns: repeat(2, 1fr); border: 1px solid var(--case-line); background: var(--case-white); }
.case-facts > div { min-height: 144px; padding: 26px; border-right: 1px solid var(--case-line); border-bottom: 1px solid var(--case-line); }
.case-facts > div:nth-child(2n) { border-right: 0; }
.case-facts > div:nth-last-child(-n+2) { border-bottom: 0; }
.case-facts strong { display: block; margin-bottom: 10px; font-family: var(--case-display); font-size: 26px; font-style: italic; text-transform: uppercase; }
.case-facts span { color: var(--case-muted); line-height: 1.55; }
.case-facts .verified strong { color: #087d70; }
.case-facts .boundary strong { color: #6d3dc4; }
.case-system-grid { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 52px; border: 1px solid rgba(255,255,255,0.2); }
.case-system-grid article { min-height: 250px; padding: 30px; border-right: 1px solid rgba(255,255,255,0.2); border-bottom: 1px solid rgba(255,255,255,0.2); }
.case-system-grid article:nth-child(3n) { border-right: 0; }
.case-system-grid article:nth-last-child(-n+3) { border-bottom: 0; }
.case-system-grid b { color: var(--case-cyan); font-family: var(--case-display); font-size: 16px; letter-spacing: 0.12em; }
.case-system-grid h3 { margin: 18px 0 12px; font-family: var(--case-display); font-size: 34px; font-style: italic; line-height: 1; text-transform: uppercase; }
.case-system-grid p { margin: 0; color: rgba(255,255,255,0.67); line-height: 1.65; }
.case-visual { margin: 0; }
.case-visual img { display: block; width: 100%; border: 2px solid var(--case-black); background: #eaf6fb; }
.case-visual figcaption { padding: 14px 0 0; color: var(--case-muted); font-size: 14px; line-height: 1.55; }
.case-gallery { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 28px; margin-top: 46px; align-items: start; }
.case-gallery .case-visual:first-child { grid-row: span 2; }
.case-gallery .case-visual:first-child img { aspect-ratio: 4 / 5; object-fit: cover; object-position: top; }
.case-gallery .case-visual:not(:first-child) img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.case-workflow { margin-top: 52px; border-top: 2px solid var(--case-black); }
.case-step { display: grid; grid-template-columns: 90px 0.7fr 1.3fr; gap: 28px; padding: 28px 0; border-bottom: 1px solid var(--case-line); align-items: start; }
.case-step span { font-family: var(--case-display); font-size: 46px; font-style: italic; font-weight: 800; color: #087d70; }
.case-step h3 { margin: 4px 0 0; font-family: var(--case-display); font-size: 29px; font-style: italic; line-height: 1; text-transform: uppercase; }
.case-step p { margin: 0; color: var(--case-muted); font-size: 17px; line-height: 1.65; }
.case-results { display: grid; grid-template-columns: repeat(2, 1fr); margin-top: 48px; border: 1px solid rgba(255,255,255,0.22); }
.case-results > div { min-height: 190px; padding: 30px; border-right: 1px solid rgba(255,255,255,0.22); border-bottom: 1px solid rgba(255,255,255,0.22); }
.case-results > div:nth-child(2n) { border-right: 0; }
.case-results > div:nth-last-child(-n+2) { border-bottom: 0; }
.case-results strong { display: block; margin-bottom: 10px; color: var(--case-cyan); font-family: var(--case-display); font-size: 32px; font-style: italic; text-transform: uppercase; }
.case-results p { margin: 0; color: rgba(255,255,255,0.7); line-height: 1.65; }
.case-note { margin-top: 32px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,0.2); color: rgba(255,255,255,0.58); font-size: 14px; line-height: 1.6; }
.case-faq details { border-top: 1px solid var(--case-line); }
.case-faq details:last-child { border-bottom: 1px solid var(--case-line); }
.case-faq summary { cursor: pointer; padding: 24px 0; font-family: var(--case-display); font-size: 28px; font-style: italic; font-weight: 800; text-transform: uppercase; }
.case-faq details p { max-width: 850px; margin: 0; padding: 0 0 24px; color: var(--case-muted); line-height: 1.7; }
.case-cta { background: linear-gradient(105deg, var(--case-cyan), #dffdf8 48%, var(--case-blue)); padding: 82px 0; }
.case-cta .case-split { align-items: end; }
.case-cta .case-copy { color: #18222a; }
.case-cta .case-button { color: var(--case-black); }
.case-footer { background: var(--case-black); color: var(--case-white); padding: 42px 0; }
.case-footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.case-footer img { display: block; width: auto; height: 68px; }
.case-footer p { margin: 0; color: rgba(255,255,255,0.58); font-size: 14px; }
.case-footer a { color: var(--case-cyan); text-decoration: none; }

@media (max-width: 900px) {
  body.case-study-page { padding-top: 88px; }
  .case-nav { height: 88px; }
  .case-nav-logo img { height: 70px; }
  .case-nav-links a:not(.case-lang) { display: none; }
  .case-intro-grid,
  .case-split,
  .case-gallery { grid-template-columns: 1fr; gap: 42px; }
  .case-proof-strip { grid-template-columns: repeat(2, 1fr); }
  .case-proof-strip > div:nth-child(2n) { border-right: 0; }
  .case-proof-strip > div:nth-child(-n+2) { border-bottom: 1px solid var(--case-line); }
  .case-system-grid { grid-template-columns: 1fr; }
  .case-system-grid article { border-right: 0; }
  .case-system-grid article:nth-last-child(-n+3) { border-bottom: 1px solid rgba(255,255,255,0.2); }
  .case-system-grid article:last-child { border-bottom: 0; }
  .case-gallery .case-visual:first-child { grid-row: auto; }
  .case-gallery .case-visual:first-child img { aspect-ratio: 16 / 10; }
}

@media (max-width: 640px) {
  .case-nav-inner { width: min(100% - 34px, 520px); }
  .case-nav-logo img { height: 62px; }
  .case-wrap { width: min(100% - 34px, 520px); }
  .case-hero { padding: 62px 0 56px; }
  .case-title { font-size: clamp(52px, 17vw, 76px); }
  .case-section { padding: 68px 0; }
  .case-actions .case-button { width: 100%; }
  .case-facts,
  .case-results { grid-template-columns: 1fr; }
  .case-facts > div,
  .case-results > div { border-right: 0; border-bottom: 1px solid var(--case-line); }
  .case-facts > div:nth-last-child(-n+2),
  .case-results > div:nth-last-child(-n+2) { border-bottom: 1px solid var(--case-line); }
  .case-facts > div:last-child,
  .case-results > div:last-child { border-bottom: 0; }
  .case-step { grid-template-columns: 54px 1fr; gap: 18px; }
  .case-step p { grid-column: 2; }
  .case-step span { font-size: 38px; }
  .case-gallery .case-visual:first-child img,
  .case-gallery .case-visual:not(:first-child) img { aspect-ratio: 4 / 3; }
  .case-footer-inner { align-items: flex-start; flex-direction: column; }
}
