/* ============================================
   CASE STUDY PAGE — Moloney Contractors
   ============================================ */

/* ---------- Hero ---------- */
.cs-hero {
  position: relative;
  min-height: 75vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.cs-hero-img {
  position: absolute;
  inset: 0;
}

.cs-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
}

.cs-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, var(--bg-0) 0%, rgba(5, 5, 5, 0.6) 40%, rgba(5, 5, 5, 0.25) 100%),
    linear-gradient(to right, rgba(5, 5, 5, 0.4) 0%, transparent 60%);
}

.cs-hero-content {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--pad) 60px;
}

.cs-label {
  display: inline-block;
  color: var(--orange);
  margin-bottom: 12px;
  letter-spacing: 0.15em;
}

.cs-hero .hero-title {
  font-size: clamp(2.2rem, 6vw, 5rem);
  margin-bottom: 16px;
}

.cs-hero .hero-sub {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: var(--ink-soft);
  max-width: 52ch;
  line-height: 1.6;
}

/* ---------- Stats strip ---------- */
.cs-stats {
  padding: 0 var(--pad);
  margin-top: -40px;
  position: relative;
  z-index: 2;
}

.cs-stats-grid {
  max-width: var(--max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1px;
  border-radius: 16px;
  overflow: hidden;
}

.cs-stat {
  padding: 28px 20px;
  text-align: center;
  border-radius: 0;
}

.cs-stat::before {
  border-radius: 0;
}

.cs-stat-value {
  display: block;
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 2.5vw, 2rem);
  color: var(--orange);
  line-height: 1.1;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.cs-stat-label {
  color: var(--ink-mute);
  font-size: 0.65rem;
}

/* ---------- Content sections ---------- */
.cs-section {
  padding: 80px var(--pad);
  position: relative;
}

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

.cs-section-head {
  display: flex;
  align-items: baseline;
  gap: 20px;
  margin-bottom: 28px;
}

.cs-step-num {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  color: var(--orange);
  opacity: 0.3;
  line-height: 1;
  letter-spacing: -0.03em;
}

.cs-section-head h2 {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  letter-spacing: -0.02em;
}

.cs-text {
  max-width: 72ch;
  margin-bottom: 36px;
}

.cs-text p {
  color: var(--ink-soft);
  margin-bottom: 16px;
  line-height: 1.7;
}

.cs-text p:last-child {
  margin-bottom: 0;
}

/* ---------- Image layouts ---------- */
.cs-img-grid {
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
}

.cs-img-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

.cs-img-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.cs-img-card {
  border-radius: 12px;
  overflow: hidden;
  position: relative;
}

.cs-img-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  aspect-ratio: 4 / 3;
  transition: transform 0.6s var(--ease);
}

.cs-img-card:hover img {
  transform: scale(1.04);
}

.cs-img-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 12px 16px;
  background: linear-gradient(to top, rgba(5, 5, 5, 0.85) 0%, transparent 100%);
  color: var(--ink-mute);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
}

.cs-img-single {
  margin-bottom: 16px;
}

.cs-img-single img {
  border-radius: 12px;
  max-width: 680px;
}

.cs-img-single .cs-img-caption {
  position: static;
  background: none;
  padding: 10px 0 0;
  display: block;
}

.cs-img-wide .cs-img-card img {
  aspect-ratio: 16 / 9;
}

.cs-hero-final .cs-img-card img {
  aspect-ratio: 16 / 10;
}

/* ---------- Project summary ---------- */
.cs-summary {
  padding-top: 40px;
}

.cs-summary-card {
  padding: 40px 48px;
  border-radius: 16px;
  max-width: 720px;
}

.cs-summary-card h3 {
  font-family: var(--f-display);
  font-size: 1.4rem;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.cs-summary-list {
  list-style: none;
}

.cs-summary-list li {
  padding: 10px 0;
  border-bottom: 1px solid var(--glass-border);
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.5;
}

.cs-summary-list li:last-child {
  border-bottom: none;
}

.cs-summary-list strong {
  color: var(--ink);
  font-weight: 600;
}

/* ---------- CTA ---------- */
.cs-cta {
  padding: 40px var(--pad) 100px;
}

.cs-cta-inner {
  max-width: 680px;
  margin: 0 auto;
  padding: 52px 48px;
  text-align: center;
  border-radius: 20px;
}

.cs-cta-inner h2 {
  font-family: var(--f-display);
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.cs-cta-inner p {
  color: var(--ink-soft);
  margin-bottom: 28px;
  max-width: 44ch;
  margin-inline: auto;
}

.cs-cta-btns {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease);
  cursor: pointer;
}

.btn-primary {
  background: var(--orange);
  color: var(--bg-0);
}

.btn-primary:hover {
  background: var(--orange-hot);
  transform: translateY(-2px);
}

.btn-outline {
  border: 1px solid var(--glass-border-strong);
  color: var(--ink-soft);
}

.btn-outline:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-2px);
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .cs-hero {
    min-height: 60vh;
  }

  .cs-stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cs-img-grid--3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-img-grid--3 .cs-img-card:last-child {
    grid-column: 1 / -1;
  }

  .cs-img-grid--3 .cs-img-card:last-child img {
    aspect-ratio: 16 / 9;
    max-height: 360px;
  }

  .cs-section {
    padding: 60px var(--pad);
  }

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

  .cs-cta-inner {
    padding: 40px 28px;
  }
}

@media (max-width: 640px) {
  .cs-hero {
    min-height: 55vh;
  }

  .cs-hero-content {
    padding-bottom: 40px;
  }

  .cs-stats {
    margin-top: -24px;
  }

  .cs-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .cs-stat {
    padding: 20px 16px;
  }

  .cs-img-grid--2,
  .cs-img-grid--3 {
    grid-template-columns: 1fr;
  }

  .cs-img-grid--3 .cs-img-card:last-child {
    grid-column: auto;
  }

  .cs-img-grid--3 .cs-img-card:last-child img {
    aspect-ratio: 4 / 3;
    max-height: none;
  }

  .cs-section-head {
    gap: 14px;
  }

  .cs-section {
    padding: 48px var(--pad);
  }

  .cs-cta {
    padding-bottom: 60px;
  }

  .cs-cta-btns {
    flex-direction: column;
    align-items: center;
  }
}
