/* ============================================
   GreenCore Property Group — Case Studies Page
   ============================================ */

/* --- Hero --- */
.cs-hero {
  padding: 140px 24px 80px;
  position: relative;
  overflow: hidden;
  background: var(--green-deep, #1a3d2b);
}

.cs-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 20%, rgba(196, 168, 130, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 40% 40% at 80% 80%, rgba(74, 140, 92, 0.15) 0%, transparent 60%),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
}

.cs-hero-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0;
}

.cs-hero-headline {
  font-family: var(--font-display);
  font-size: clamp(36px, 5.5vw, 64px);
  font-weight: 800;
  color: var(--fg);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  margin-top: 12px;
  max-width: 700px;
}

.cs-hero-sub {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 18px;
  color: var(--fg-muted);
  line-height: 1.65;
  max-width: 540px;
  margin-bottom: 40px;
}

/* Stats Row */
.cs-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
  margin-bottom: 40px;
  border: 1px solid rgba(196, 168, 130, 0.25);
  border-radius: var(--radius);
  background: rgba(14, 31, 22, 0.5);
  backdrop-filter: blur(8px);
  padding: 8px 0;
}

.cs-stat-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 36px;
}

.cs-stat-icon {
  color: var(--accent);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.cs-stat-item > div {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.cs-stat-num {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.cs-stat-label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  color: var(--fg-muted);
  white-space: nowrap;
}

.cs-stat-div {
  width: 1px;
  height: 40px;
  background: rgba(196, 168, 130, 0.2);
}

/* Hero CTA */
.cs-hero-cta {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
}

/* --- Case Studies Section --- */
.cs-studies {
  padding: 80px 24px 100px;
}

.cs-studies-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* Full-width card */
.cs-study-full {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  transition: background 0.2s ease;
}

.cs-study-full:hover { background: var(--bg-card-alt); }

/* Card header */
.cs-study-header {
  display: flex;
  align-items: center;
  gap: 16px;
}

.cs-client-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--bg-card-alt);
  border: 1px solid rgba(196, 168, 130, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  flex-shrink: 0;
}

.cs-client-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cs-client-name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
}

.cs-client-desc {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--fg-muted);
}

/* Card body */
.cs-study-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-left: 72px;
}

.cs-challenge {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cs-challenge-label,
.cs-outcome-label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

.cs-challenge-text,
.cs-outcome-text {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  color: var(--fg-muted);
  line-height: 1.7;
}

.cs-outcome-text strong { color: var(--fg); font-weight: 600; }

/* Metrics bar */
.cs-metrics-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg);
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cs-metric-cell {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
}

.cs-metric-before { background: rgba(196, 100, 80, 0.06); }
.cs-metric-after { background: rgba(74, 140, 92, 0.1); }

.cs-metric-value {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--fg);
}

.cs-metric-before .cs-metric-value { color: #e07060; }
.cs-metric-after .cs-metric-value { color: #6db87a; }

.cs-metric-desc {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  color: var(--fg-muted);
  font-weight: 500;
}

.cs-metric-arrow {
  font-size: 20px;
  color: var(--fg-muted);
  padding: 0 8px;
  flex-shrink: 0;
}

/* Outcome stats */
.cs-outcome-stats {
  display: flex;
  gap: 0;
  border: var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.cs-outcome-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 20px 16px;
  background: var(--bg);
  border-right: var(--border);
}

.cs-outcome-stat:last-child { border-right: none; }

.cs-outcome-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
}

.cs-outcome-lbl {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  color: var(--fg-muted);
  text-align: center;
  font-weight: 500;
}

/* --- 2-Col Grid --- */
.cs-studies-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.cs-study-card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  transition: background 0.2s ease;
}

.cs-study-card:hover { background: var(--bg-card-alt); }

.cs-study-card .cs-study-body {
  padding-left: 0;
}

.cs-study-card .cs-outcome-stats {
  margin-top: 4px;
}

/* --- Results Bar --- */
.cs-results-bar {
  padding: 56px 24px;
  background: var(--green-deep, #1a3d2b);
  border-top: 1px solid rgba(196, 168, 130, 0.2);
  border-bottom: 1px solid rgba(196, 168, 130, 0.2);
}

.cs-results-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.cs-result-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 72px;
}

.cs-result-div {
  width: 1px;
  height: 56px;
  background: rgba(196, 168, 130, 0.2);
}

.cs-result-num {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.cs-result-label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--fg-muted);
  font-weight: 500;
  white-space: nowrap;
}

/* --- CTA Block --- */
.cs-cta {
  padding: 100px 24px;
  position: relative;
  overflow: hidden;
}

.cs-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 50% 100%, rgba(196, 168, 130, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.cs-cta-inner { max-width: var(--max-w); margin: 0 auto; }

.cs-cta-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.cs-cta-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 800;
  color: var(--fg);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.cs-cta-sub {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 17px;
  color: var(--fg-muted);
  line-height: 1.65;
  margin-bottom: 36px;
}

.cs-cta-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.cs-cta-secondary {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--fg-muted);
}

.cs-cta-secondary a {
  color: var(--accent);
  text-decoration: none;
}

.cs-cta-secondary a:hover { text-decoration: underline; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .cs-studies-grid {
    grid-template-columns: 1fr;
  }

  .cs-index-grid {
    grid-template-columns: 1fr 1fr;
  }

  .cs-stat-item {
    padding: 10px 20px;
  }

  .cs-result-item {
    padding: 8px 40px;
  }

  .cs-result-div {
    display: none;
  }

  .cs-study-full {
    padding: 32px 28px;
  }

  .cs-study-body {
    padding-left: 0;
  }

  .cs-study-card {
    padding: 32px 28px;
  }

  .cs-outcome-stats {
    flex-wrap: wrap;
  }

  .cs-outcome-stat {
    min-width: 120px;
    border-right: none;
    border-bottom: var(--border);
  }

  .cs-outcome-stat:last-child { border-bottom: none; }
}

@media (max-width: 600px) {
  .cs-hero { padding-top: 100px; padding-bottom: 60px; }

  .cs-index-grid {
    grid-template-columns: 1fr;
  }

  .cs-stats-row {
    flex-direction: column;
    gap: 0;
    padding: 4px 0;
  }

  .cs-stat-div { display: none; }

  .cs-stat-item {
    width: 100%;
    padding: 12px 24px;
    justify-content: center;
  }

  .cs-stat-item > div {
    align-items: center;
  }

  .cs-results-bar { padding: 48px 24px; }

  .cs-result-item { padding: 12px 24px; }

  .cs-result-num { font-size: 32px; }

  .cs-metrics-bar { flex-direction: column; }

  .cs-metric-cell { width: 100%; }

  .cs-metric-arrow {
    transform: rotate(90deg);
    padding: 4px 0;
  }

  .cs-outcome-stats { flex-direction: column; }

  .cs-outcome-stat { border-right: none; border-bottom: var(--border); }
  .cs-outcome-stat:last-child { border-bottom: none; }

  .cs-study-full,
  .cs-study-card {
    padding: 28px 20px;
  }
}

.cs-testimonial-tag {
  display: inline-block;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4a882;
  border: 1px solid rgba(196, 168, 130, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 12px;
}

/* --- Index Card Grid (replaces cs-study-full + cs-study-card on index) --- */
.cs-index-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.cs-index-card {
  background: var(--bg-card);
  border: var(--border);
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cs-index-card:hover { background: var(--bg-card-alt); transform: translateY(-2px); }

.cs-index-card-thumb {
  aspect-ratio: 16 / 9;
  background: rgba(74, 140, 92, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: var(--border);
}

.cs-index-card-body {
  padding: 24px 24px 28px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.cs-index-card-tag {
  display: inline-block;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #c4a882;
  border: 1px solid rgba(196, 168, 130, 0.4);
  border-radius: 999px;
  padding: 4px 10px;
  align-self: flex-start;
}

.cs-index-card-title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.01em;
  margin: 0;
}

.cs-index-card-outcome {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--fg-muted);
  line-height: 1.6;
  margin: 0;
}

.cs-index-card-cta {
  margin-top: 8px;
  align-self: flex-start;
}

/* --- View-all CTA Block --- */
.cs-viewall {
  padding: 64px 24px 96px;
  text-align: center;
  border-top: var(--border);
  margin-top: 32px;
}
.cs-viewall-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}
.cs-viewall-sub {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 16px;
  color: var(--fg-muted);
  max-width: 520px;
  margin: 0 auto 28px;
  line-height: 1.6;
}