/* Dental customer success case study — landing-page embed + standalone page.
   Uses theme tokens from theme.css. Mirrors the conventions in
   public/css/comparison.css. */

/* ─── Landing-page embed (wraps the partial in a full-width section) ─── */
.case-study-section {
  padding: 5rem 1.25rem 4rem;
  background: var(--bg);
}

.case-study-section .section-inner .case-study-headline,
.case-study-section .case-study-headline {
  margin-bottom: 0.75rem;
}

/* ─── Standalone page shell ──────────────────────────────────────────── */
.case-study-page {
  background: var(--bg);
  min-height: 100vh;
  padding: 5rem 1.25rem 4rem;
}

.case-study-shell {
  max-width: 920px;
  margin: 0 auto;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 2.5rem 3rem;
}

/* ─── Headline elements (used in both contexts) ──────────────────────── */
.case-study-kicker {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 1rem;
}

.case-study-headline {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: var(--cream);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.case-study-sub {
  font-size: 1rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 640px;
}

/* ─── Dollar figure callout (standalone page only) ───────────────────── */
.case-study-figure {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3rem);
  color: var(--amber);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

/* ─── Before / after metrics table ───────────────────────────────────── */
.case-study-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2.5rem;
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--cream-2);
}

.case-study-table th,
.case-study-table td {
  padding: 0.95rem 1.1rem;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--border);
  line-height: 1.55;
}

.case-study-table thead th {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cream);
  border-bottom: 1.5px solid var(--border);
  background: var(--bg);
}

.case-study-table tbody th {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.01em;
  color: var(--cream);
  width: 42%;
}

.case-study-table td.is-after {
  background: var(--amber-dim);
  color: var(--cream);
  font-weight: 600;
  border-left: 1px solid var(--amber);
  border-right: 1px solid var(--amber);
}

.case-study-table tbody tr:last-child th,
.case-study-table tbody tr:last-child td {
  border-bottom: none;
}

/* ─── Pull-quote ─────────────────────────────────────────────────────── */
.case-study-quote {
  margin: 0 0 2.5rem;
  padding: 1.25rem 1.5rem;
  border-left: 3px solid var(--amber);
  background: var(--bg);
  border-radius: 0 8px 8px 0;
}

.case-study-quote p {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--cream-2);
  line-height: 1.65;
  margin-bottom: 0.6rem;
}

.case-study-quote cite {
  display: block;
  font-style: normal;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

/* ─── Recap bullets ──────────────────────────────────────────────────── */
.case-study-recap {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-bottom: 2.25rem;
}

.case-study-recap li {
  font-size: 0.92rem;
  color: var(--cream-2);
  line-height: 1.65;
  padding-left: 1.1rem;
  position: relative;
}

.case-study-recap li::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--amber);
  border-radius: 50%;
  position: absolute;
  left: 0;
  top: 0.55rem;
}

/* ─── CTA ────────────────────────────────────────────────────────────── */
.case-study-cta {
  display: block;
  width: 100%;
  text-align: center;
  margin-top: 0.25rem;
}

.case-study-section .case-study-cta {
  display: inline-flex;
  width: auto;
  text-align: center;
}

.case-study-fineprint {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.55;
  font-style: italic;
}

/* ─── Responsive: stack the metrics table on small screens ───────────── */
@media (max-width: 720px) {
  .case-study-page { padding: 3rem 1rem 2rem; }
  .case-study-shell { padding: 1.75rem 1.25rem; }
  .case-study-section { padding: 3.5rem 1rem 3rem; }

  .case-study-figure { font-size: 1.75rem; margin-bottom: 2rem; padding-bottom: 1.5rem; }

  .case-study-table,
  .case-study-table thead,
  .case-study-table tbody,
  .case-study-table th,
  .case-study-table td,
  .case-study-table tr {
    display: block;
    width: 100%;
  }

  .case-study-table thead { display: none; }

  .case-study-table tbody tr {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    margin-bottom: 0.85rem;
    background: var(--bg);
  }

  .case-study-table tbody th {
    width: auto;
    border-bottom: 1px solid var(--border);
    padding: 0 0 0.55rem;
    margin-bottom: 0.55rem;
    font-size: 0.95rem;
  }

  .case-study-table td {
    border: none;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
  }

  .case-study-table td::before {
    content: attr(data-label);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
  }

  .case-study-table td.is-after {
    background: transparent;
    border-left: none;
    border-right: none;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    padding: 0.5rem 0;
    margin: 0.4rem 0;
    justify-content: space-between;
  }
}
