/* ═══════════════════════════════════════════════════════════════════════════
   Case Study — Address-to-Business Enrichment
   Uses Salmon design tokens from main.css
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Page Layout ─────────────────────────────────────────────────────────── */
.cs {
  max-width: 56rem;
  margin: 0 auto;
  padding: 3rem 2.5rem 4rem;
}

/* ── Scroll Animations ───────────────────────────────────────────────────── */
.fade-in {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Top Bar ─────────────────────────────────────────────────────────────── */
.cs-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3.5rem;
}
.cs-topbar svg.cs-logo {
  height: 1.5rem;
  width: auto;
  opacity: 0.8;
}
.cs-topbar-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.25rem;
}
.cs-topbar-badge {
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--salmon);
  background: var(--salmon-dim);
  border: 1px solid var(--salmon-bdr);
  border-radius: 0.375rem;
  padding: 0.2rem 0.625rem;
}
.cs-topbar-url {
  font-size: 0.75rem;
  color: var(--charcoal);
  letter-spacing: 0.08em;
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.cs-hero {
  margin-bottom: 3.5rem;
}
.cs-hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  font-weight: 300;
  line-height: 1.2;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.cs-hero h1 em {
  color: var(--salmon);
  font-style: normal;
}
.cs-hero-subtitle {
  font-size: 1.25rem;
  color: var(--grey);
  line-height: 1.5;
  font-weight: 300;
  margin-bottom: 1.25rem;
  max-width: 42rem;
}
.cs-hero p {
  font-size: 1rem;
  color: var(--charcoal);
  line-height: 1.7;
  max-width: 42rem;
}

/* ── Divider ─────────────────────────────────────────────────────────────── */
.cs-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ── Section ─────────────────────────────────────────────────────────────── */
.cs-section {
  margin-bottom: 3rem;
}
.cs-section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--salmon);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}
.cs-section h2 {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 1rem;
}
.cs-section-intro {
  font-size: 1rem;
  color: var(--grey);
  line-height: 1.7;
  max-width: 42rem;
  margin-bottom: 1.5rem;
}

/* ── Stats Row ───────────────────────────────────────────────────────────── */
.cs-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1.25rem;
  margin-bottom: 3rem;
}
.cs-stat {
  text-align: center;
  padding: 1.25rem 1rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  transition: border-color 0.25s ease;
}
.cs-stat:hover {
  border-color: rgba(252, 120, 105, 0.3);
}
.cs-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--salmon);
  display: block;
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}
.cs-stat-label {
  font-size: 0.75rem;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Challenge Cards ─────────────────────────────────────────────────────── */
.cs-challenges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}
.cs-challenge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.cs-challenge:hover {
  border-color: rgba(252, 120, 105, 0.3);
  transform: translateY(-2px);
}
.cs-challenge h3 {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--salmon);
  margin-bottom: 0.5rem;
}
.cs-challenge p {
  font-size: 0.875rem;
  color: var(--charcoal);
  line-height: 1.6;
}

/* ── Approach Steps ──────────────────────────────────────────────────────── */
.cs-approach-steps {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  margin-top: 1.25rem;
}
.cs-approach-step {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.9375rem;
  color: var(--grey);
  line-height: 1.6;
}
.cs-approach-step strong {
  color: var(--white);
}
.cs-approach-step-num {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--salmon);
  flex-shrink: 0;
  min-width: 1.5rem;
}

/* ── Transformation Diagram (adapted from suit-up) ───────────────────────── */
.cs-transform {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

/* Left: steps */
.cs-transform-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-bottom: 4rem;
}
.cs-transform-step {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 1.5rem;
  border-radius: 0.375rem;
  border: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
  min-height: 6.5rem;
}
.cs-transform-step.is-active {
  border-color: var(--border);
  background: var(--surface);
}
.cs-transform-step-num {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--border-2);
  flex-shrink: 0;
  min-width: 2rem;
  line-height: 1.2;
  transition: color 0.3s ease;
}
.cs-transform-step.is-active .cs-transform-step-num {
  color: var(--salmon);
}
.cs-transform-step-body h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.375rem;
}
.cs-transform-step-body p {
  font-size: 0.875rem;
  color: var(--charcoal);
  line-height: 1.6;
}

/* Right: sticky card */
.cs-card-wrap {
  position: sticky;
  top: 3rem;
  align-self: start;
}
.cs-card-heading {
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  font-weight: 500;
  color: var(--white);
  line-height: 1.3;
  margin-bottom: 1.5rem;
}
.cs-card {
  border-radius: 0.375rem;
  padding: 1.5rem 1.75rem;
  font-family: var(--f-mono);
  font-size: 0.8125rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  transition: border-color 0.4s ease, background 0.4s ease;
}
.cs-card.is-complete {
  border-color: rgba(252, 120, 105, 0.3);
  background: rgba(252, 120, 105, 0.04);
}

/* Record shared styles (reused from sales-overview pattern) */
.cs-record-label {
  font-family: var(--f);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 1rem;
  color: var(--charcoal);
  transition: color 0.4s ease;
}
.cs-card.is-complete .cs-record-label {
  color: var(--salmon);
}
.cs-record-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.cs-record-row {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1.4;
}
.cs-record-key {
  color: var(--charcoal);
  min-width: 5.5rem;
  flex-shrink: 0;
  font-size: 0.6875rem;
}
.cs-record-val {
  color: var(--grey);
  flex: 1;
  min-width: 0;
  transition: color 0.3s ease;
}
.cs-record-val--stale {
  color: var(--red);
  text-decoration: line-through;
  opacity: 0.7;
}
.cs-record-val--missing {
  color: var(--charcoal);
  opacity: 0.35;
}
.cs-record-val--verified {
  color: var(--white);
}
.cs-record-val--new {
  color: var(--salmon-light);
}
.cs-record-confidence {
  font-family: var(--f);
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--salmon);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.cs-record-confidence.is-visible {
  opacity: 0.8;
}

/* ── Callout Box ─────────────────────────────────────────────────────────── */
.cs-callout {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border: 1px solid rgba(252, 120, 105, 0.3);
  border-radius: 0.375rem;
  background: rgba(252, 120, 105, 0.04);
  margin-top: 1.5rem;
}
.cs-callout svg {
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.cs-callout p {
  font-size: 0.875rem;
  color: var(--grey);
  line-height: 1.6;
}
.cs-callout strong {
  color: var(--white);
}

/* ── Your Data Section (IQFiber angle) ───────────────────────────────────── */
.cs-your-data {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  padding: 2rem 2.5rem;
  margin-top: 1.5rem;
}
.cs-your-data h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.75rem;
}
.cs-your-data p {
  font-size: 0.9375rem;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}
.cs-your-data p:last-child {
  margin-bottom: 0;
}
.cs-your-data-list {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin: 1rem 0;
}
.cs-your-data-list li {
  font-size: 0.875rem;
  color: var(--grey);
  line-height: 1.5;
  padding-left: 1.25rem;
  position: relative;
}
.cs-your-data-list li::before {
  content: '+';
  position: absolute;
  left: 0;
  color: var(--salmon);
  font-weight: 600;
}

/* ── CTA ─────────────────────────────────────────────────────────────────── */
.cs-cta {
  text-align: center;
  padding: 3rem 2rem;
  border: 1px solid var(--border);
  border-radius: 0.375rem;
  background: var(--surface);
  margin-top: 3rem;
}
.cs-cta h2 {
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--salmon);
  margin-bottom: 0.75rem;
}
.cs-cta p {
  font-size: 1rem;
  color: var(--charcoal);
  margin-bottom: 1.5rem;
}
.cs-cta .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.cs-cta-url {
  font-size: 0.75rem;
  color: var(--charcoal);
  margin-top: 1rem !important;
  margin-bottom: 0 !important;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.cs-footer {
  text-align: center;
  padding-top: 2rem;
  margin-top: 2rem;
  border-top: 1px solid var(--border);
}
.cs-footer p {
  font-size: 0.75rem;
  color: var(--charcoal);
}
.cs-footer a {
  color: var(--salmon);
  text-decoration: none;
}
.cs-footer a:hover {
  text-decoration: underline;
}

/* ── Print Button ────────────────────────────────────────────────────────── */
.cs-print-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 100;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .cs {
    padding: 2rem 1.5rem 3rem;
  }
  .cs-hero h1 {
    font-size: 1.75rem;
  }
  .cs-challenges {
    grid-template-columns: 1fr;
  }
  .cs-stats {
    grid-template-columns: 1fr;
  }
  .cs-transform {
    grid-template-columns: 1fr;
  }
  .cs-card-wrap {
    position: relative;
    top: 0;
    order: -1;
  }
  .cs-your-data {
    padding: 1.5rem;
  }
}

@media (max-width: 479px) {
  .cs-topbar {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Print Styles
   ═══════════════════════════════════════════════════════════════════════════ */
@page {
  size: letter;
  margin: 0.5in 0.75in;
}

@media print {
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    box-sizing: border-box !important;
  }

  html, body {
    background: #fff !important;
    color: #333 !important;
    font-size: 10pt;
    line-height: 1.5;
    width: 100% !important;
    overflow: hidden !important;
  }

  .cs {
    max-width: 6.5in !important;
    width: 6.5in !important;
    padding: 0;
    overflow: hidden !important;
    margin: 0 auto;
  }

  .cs-print-btn {
    display: none !important;
  }

  .fade-in {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .cs-divider--page-break {
    page-break-after: always;
    border: none !important;
    margin: 0 !important;
  }

  /* ── Topbar ── */
  .cs-topbar {
    border-bottom-color: #e0e0e0;
    padding-bottom: 0.35rem;
    margin-bottom: 0.5rem;
  }
  .cs-topbar svg.cs-logo {
    height: 1rem;
    width: auto;
    opacity: 1;
  }
  .cs-topbar .cs-logo-text {
    fill: #1a1a1a !important;
  }
  .cs-topbar .cs-logo-fish {
    fill: #FC7869 !important;
  }
  .cs-topbar-badge {
    font-size: 6pt !important;
    background: #fef0ee !important;
    border-color: #d4503e !important;
    color: #d4503e !important;
  }
  .cs-topbar-url {
    color: #666;
    font-size: 8pt !important;
  }

  /* ── Hero ── */
  .cs-hero {
    margin-bottom: 0.4rem;
  }
  .cs-hero h1 {
    font-size: 20pt !important;
    color: #111 !important;
    margin-bottom: 0.15rem;
  }
  .cs-hero-subtitle {
    font-size: 10pt !important;
    color: #333 !important;
  }
  .cs-hero p {
    font-size: 9pt !important;
    color: #444 !important;
    line-height: 1.5;
  }

  /* ── Dividers ── */
  .cs-divider {
    border-top-color: #e0e0e0;
    margin: 0.35rem 0;
  }

  /* ── Stats ── */
  .cs-stats {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr 1fr !important;
    gap: 0.25rem;
    margin-bottom: 0.35rem;
  }
  .cs-stat {
    padding: 0.25rem;
  }
  .cs-stat-value {
    font-size: 16pt !important;
    color: #d4503e !important;
  }
  .cs-stat-label {
    font-size: 6.5pt !important;
    color: #666 !important;
  }

  /* ── Sections ── */
  .cs-section {
    margin-bottom: 0.35rem;
  }
  .cs-section-label {
    color: #d4503e !important;
    font-size: 7pt !important;
    margin-bottom: 0.15rem;
  }
  .cs-section h2 {
    font-size: 13pt !important;
    color: #111 !important;
    margin-bottom: 0.2rem;
  }
  .cs-section-intro {
    font-size: 9pt !important;
    color: #444 !important;
    margin-bottom: 0.3rem;
  }

  /* ── Challenges ── */
  .cs-challenges {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 0.25rem;
    margin-top: 0.3rem;
  }
  .cs-challenge {
    background: #fafafa !important;
    border-color: #ddd !important;
    padding: 0.35rem 0.5rem;
    transform: none !important;
  }
  .cs-challenge h3 {
    font-size: 8.5pt !important;
    color: #d4503e !important;
    margin-bottom: 0.15rem;
  }
  .cs-challenge p {
    font-size: 7.5pt !important;
    color: #444 !important;
    line-height: 1.4;
  }

  /* ── Transformation ── */
  .cs-transform {
    display: block !important;
    margin-top: 0.35rem;
  }
  .cs-card-wrap {
    display: none !important;
  }
  .cs-transform-steps {
    display: flex !important;
    flex-direction: column;
    gap: 0.1rem;
    padding-bottom: 0 !important;
  }
  .cs-transform-step {
    padding: 0.2rem 0.35rem;
    border: none !important;
    background: transparent !important;
    min-height: 0 !important;
  }
  .cs-transform-step-num {
    font-size: 7pt !important;
    color: #d4503e !important;
    min-width: 1.25rem;
  }
  .cs-transform-step-body h3 {
    font-size: 7.5pt !important;
    color: #111 !important;
    margin-bottom: 0.05rem;
  }
  .cs-transform-step-body p {
    font-size: 6.5pt !important;
    color: #444 !important;
    line-height: 1.3;
  }

  /* ── Approach Steps ── */
  .cs-approach-steps {
    margin-top: 0.25rem;
    gap: 0.15rem;
  }
  .cs-approach-step {
    font-size: 8pt !important;
    color: #333 !important;
  }
  .cs-approach-step strong {
    color: #111 !important;
  }
  .cs-approach-step-num {
    font-size: 7pt !important;
    color: #d4503e !important;
  }

  /* ── Callout ── */
  .cs-callout {
    background: #fef0ee !important;
    border-color: #d4503e !important;
    padding: 0.3rem 0.5rem;
    margin-top: 0.25rem;
  }
  .cs-callout svg {
    stroke: #d4503e !important;
    width: 12px;
    height: 12px;
  }
  .cs-callout p {
    font-size: 7.5pt !important;
    color: #333 !important;
  }
  .cs-callout strong {
    color: #111 !important;
  }

  /* ── Your Data ── */
  .cs-your-data {
    background: #fafafa !important;
    border-color: #ddd !important;
    padding: 0.5rem 0.75rem;
    margin-top: 0.3rem;
  }
  .cs-your-data h3 {
    font-size: 10pt !important;
    color: #111 !important;
    margin-bottom: 0.25rem;
  }
  .cs-your-data p {
    font-size: 8pt !important;
    color: #333 !important;
  }
  .cs-your-data-list li {
    font-size: 7.5pt !important;
    color: #333 !important;
  }
  .cs-your-data-list li::before {
    color: #d4503e !important;
  }

  /* ── CTA ── */
  .cs-cta {
    background: #f8f6f5 !important;
    border-color: #ddd !important;
    padding: 0.5rem 0.75rem;
    margin-top: 0.4rem;
    page-break-inside: avoid;
  }
  .cs-cta h2 {
    font-size: 12pt !important;
    color: #d4503e !important;
    margin-bottom: 0.2rem;
  }
  .cs-cta p {
    font-size: 8pt !important;
    color: #444 !important;
    margin-bottom: 0.35rem;
  }
  .cs-cta .btn {
    background: #d4503e !important;
    color: #fff !important;
    border: none !important;
    padding: 0.3rem 1.25rem !important;
    font-size: 8pt !important;
  }
  .cs-cta-url {
    font-size: 7pt !important;
    color: #888 !important;
  }

  /* ── Footer ── */
  .cs-footer {
    border-top-color: #e0e0e0;
    padding-top: 0.3rem;
    margin-top: 0.35rem;
  }
  .cs-footer p {
    font-size: 7pt !important;
    color: #888 !important;
  }

  /* Suppress URL display */
  a[href]::after { content: none !important; }
}
