/* ============================================================
   Case-study pages — extends styles.css (shared tokens + header/
   footer/buttons). Load AFTER styles.css on /work/<slug>/ pages.
   ============================================================ */

.case { --case-max: 78rem; }
.case-wrap { max-width: var(--case-max); margin-inline: auto; padding-inline: 4vw; }

/* Breadcrumb / back to work */
.case-breadcrumb { padding-top: 7.5rem; }
.case-breadcrumb a {
  display: inline-flex; align-items: center; gap: 0.55rem;
  color: var(--muted); text-decoration: none;
  font: 800 0.72rem/1 var(--font-label); letter-spacing: 0.12em; text-transform: uppercase;
}
.case-breadcrumb a:hover { color: var(--acid); }

/* Hero */
.case-hero { padding-top: 2.25rem; padding-bottom: clamp(2.5rem, 5vw, 4rem); }
.case-hero .eyebrow { color: var(--acid); margin: 0 0 1.25rem; }
.case-hero h1 {
  margin: 0; font-family: var(--font-display); font-weight: var(--weight-display);
  font-size: clamp(3rem, 8vw, 6.4rem); line-height: 0.98; letter-spacing: var(--track-display);
}
.case-lead {
  margin: 1.4rem 0 0; max-width: 40rem;
  font: 400 clamp(1.45rem, 2.6vw, 2.2rem)/1.28 var(--font-editorial);
  color: #d9dce3;
}

/* Fact strip */
.case-facts {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: clamp(2.5rem, 5vw, 3.75rem) 0 0; padding: 0;
  border-block: 1px solid var(--line);
}
.case-facts > div { padding: 1.4rem 1.7rem; border-right: 1px solid var(--line); }
.case-facts > div:first-child { padding-left: 0; }
.case-facts > div:last-child { border-right: 0; }
.case-facts dt { color: var(--acid); font: 800 0.58rem/1 var(--font-label); letter-spacing: 0.14em; text-transform: uppercase; }
.case-facts dd { margin: 0.7rem 0 0; color: var(--ink); font-size: 0.95rem; line-height: 1.35; }
.case-facts a { color: var(--acid); text-underline-offset: 0.25rem; }

/* Big product shot with a browser chrome bar */
.case-shot {
  margin: clamp(2.5rem, 5vw, 4rem) auto 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 1.35rem; background: #10151a;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.45);
}
.case-shot .bar { display: flex; align-items: center; gap: 0.4rem; height: 2.5rem; padding: 0 1rem; border-bottom: 1px solid var(--line); background: #0d1216; }
.case-shot .bar i { width: 0.55rem; aspect-ratio: 1; border-radius: 50%; background: #3a4048; }
.case-shot .bar b { margin-left: auto; color: var(--muted); font: 750 0.6rem/1 var(--font-label); letter-spacing: 0.06em; }
.case-shot img { display: block; width: 100%; height: auto; }

/* Content body */
.case-body { display: grid; gap: clamp(2.4rem, 4.5vw, 3.4rem); padding-block: clamp(2.75rem, 5vw, 4rem); }
.case-block { max-width: 44rem; }
.case-block .eyebrow { color: var(--acid); margin: 0; }
.case-block h2 { margin: 0.85rem 0 1.2rem; font-family: var(--font-display); font-weight: var(--weight-heading); font-size: clamp(1.95rem, 3.6vw, 3.1rem); line-height: 1.02; letter-spacing: var(--track-display); }
.case-block p { margin: 0 0 1.05rem; color: #b6bbc4; font-size: 1.02rem; line-height: 1.72; }
.case-block p:last-child { margin-bottom: 0; }
.case-block p strong { color: var(--ink); font-weight: 650; }
.case-block em { color: var(--acid); font-style: italic; }

/* Feature trio */
.case-features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.1rem; margin: 0; padding: 0; list-style: none; max-width: none; }
.case-feature { position: relative; padding: 1.6rem; border: 1px solid var(--line); border-radius: 1.1rem; background: rgba(242, 240, 232, 0.02); }
.case-feature::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(210px circle at var(--mx, 50%) var(--my, -30%), var(--acid), rgba(125, 167, 255, 0.25) 22%, transparent 55%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  opacity: 0;
  transition: opacity 260ms ease;
  pointer-events: none;
}
.case-feature:hover::after { opacity: 1; }
.case-feature h3 { margin: 0 0 0.55rem; font-size: 1.18rem; letter-spacing: -0.02em; }
.case-feature p { margin: 0; color: #a6aba4; font-size: 0.9rem; line-height: 1.55; }

/* Compact loop strip */
.case-loop { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; max-width: none; border: 1px solid var(--line); border-radius: 1.1rem; overflow: hidden; }
.case-loop li { list-style: none; padding: 1.4rem 1.3rem; border-right: 1px solid var(--line); }
.case-loop li:last-child { border-right: 0; }
.case-loop b { color: var(--acid); font: 800 0.62rem/1 var(--font-label); }
.case-loop strong { display: block; margin-top: 0.7rem; font-size: 1.02rem; letter-spacing: -0.02em; }
.case-loop small { display: block; margin-top: 0.35rem; color: var(--muted); font-size: 0.8rem; line-height: 1.45; }

/* Outcomes reuse .enterprise-metrics; add a sample-data note */
.case-outcomes { max-width: none; }
.case-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.78rem; font-style: italic; }

/* Who-it-helps callout + proof chips (simple template) */
.case-who { margin: 0.9rem 0 0; padding-left: 0.9rem; border-left: 2px solid var(--acid); color: var(--muted); font-size: 0.92rem; line-height: 1.6; }
.case-who b { color: var(--ink); font-weight: 650; }
.case-proof { display: flex; flex-wrap: wrap; gap: 0.55rem; max-width: none; }
.case-chip { font: 750 0.72rem/1.1 var(--font-label); letter-spacing: 0.02em; padding: 0.5rem 0.72rem; border-radius: 0.5rem; background: rgba(242, 240, 232, 0.03); border: 1px solid var(--line); color: #b6bbc4; }
.case-chip b { color: var(--ink); }

/* CTA */
.case-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; margin-top: clamp(0.5rem, 1.5vw, 1.25rem); padding-top: clamp(1.75rem, 3vw, 2.5rem); border-top: 1px solid var(--line); }
.case-cta p { margin: 0; flex: 1 1 20rem; color: #b6bbc4; font: 400 clamp(1.2rem, 2vw, 1.6rem)/1.35 var(--font-editorial); }

/* Next project */
.case-next { border-top: 1px solid var(--line); }
.case-next a { display: block; padding-block: clamp(2rem, 4vw, 3rem); text-decoration: none; }
.case-next span { color: var(--muted); font: 800 0.7rem/1 var(--font-label); letter-spacing: 0.12em; text-transform: uppercase; }
.case-next strong { display: block; margin-top: 0.7rem; font-family: var(--font-display); font-weight: var(--weight-heading); font-size: clamp(2rem, 4.5vw, 3.6rem); letter-spacing: var(--track-display); color: var(--ink); }
.case-next a:hover strong { color: var(--acid); }

@media (max-width: 860px) {
  .case-facts { grid-template-columns: repeat(2, 1fr); }
  .case-facts > div:nth-child(2n) { border-right: 0; }
  .case-facts > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .case-features { grid-template-columns: 1fr; }
  .case-loop { grid-template-columns: 1fr 1fr; }
  .case-loop li:nth-child(2n) { border-right: 0; }
  .case-loop li:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
