/* =========================================================
   CASE STUDY — case-study.css
   Extends style.css. All four project subpages use this.
   Tokens, fonts, and base styles inherited from style.css.
   ========================================================= */

/* =========================================================
   CASE STUDY HERO
   ========================================================= */
.cs-hero {
  padding-top: calc(var(--nav-h) + var(--space-9));
  padding-bottom: 0;
  border-bottom: 1px solid rgba(26,24,20,0.10);
  overflow: hidden;
  position: relative;
}

/* Per-project hero accent colours */
.cs-hero--horizon  { background: #EDF2F7; }
.cs-hero--colorado { background: #EEF4EE; }
.cs-hero--bewell   { background: #F0EAF5; }
.cs-hero--bloom    { background: #F5EEEA; }

.cs-hero-inner {
  padding-bottom: var(--space-9);
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  position: relative;
  z-index: 1;
}

.cs-hero-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  flex-wrap: wrap;
}

.cs-back-link {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color var(--dur-fast) var(--ease);
  white-space: nowrap;
}
.cs-back-link:hover { color: var(--ink); }

.cs-tags { display: flex; flex-wrap: wrap; gap: var(--space-2); }

.cs-hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  line-height: 1.0;
  letter-spacing: -0.03em;
  font-weight: 400;
  color: var(--ink);
  max-width: 100%;
}

.cs-hero-subtitle {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-muted);
  max-width: 100%;
}

.cs-hero-lead {
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  font-weight: 300;
  line-height: 1.7;
  color: var(--ink-muted);
  max-width: 60ch;
}

/* Impact stats in hero (Horizon only) */
.cs-hero-stats {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: var(--space-5) var(--space-6);
  background: rgba(26,24,20,0.04);
  border-radius: var(--radius-lg);
  margin-top: var(--space-3);
  width: fit-content;
}
.cs-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.cs-stat strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--green);
}
.cs-stat span {
  font-size: 0.75rem;
  color: var(--ink-muted);
  line-height: 1.4;
  max-width: 18ch;
}

/* Hero image */
.cs-hero-image-wrap {
  position: relative;
  margin-top: var(--space-7);
  overflow: hidden;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  max-height: 520px;
}
.cs-hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

/* =========================================================
   MAIN LAYOUT
   ========================================================= */
.cs-main {
  padding-block: var(--space-10);
}

.cs-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-10);
  align-items: start;
}

/* =========================================================
   BODY CONTENT
   ========================================================= */
.cs-body {
  display: flex;
  flex-direction: column;
}

.cs-section {
  margin-bottom: var(--space-7);
}

.cs-section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  font-weight: 400;
  color: var(--ink);
  margin-bottom: var(--space-5);
}

.cs-text {
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--ink-muted);
  font-weight: 300;
  max-width: 62ch;
  margin-bottom: var(--space-4);
}
.cs-text:last-child { margin-bottom: 0; }

/* Callout / pull quote */
.cs-callout {
  border-left: 3px solid var(--green);
  padding: var(--space-5) var(--space-6);
  background: var(--green-muted);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin-block: var(--space-6);
}
.cs-callout-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(1rem, 1.5vw, 1.1875rem);
  line-height: 1.6;
  color: var(--green);
  max-width: 54ch;
}

/* Images */
.cs-image {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-xl);
  margin-block: var(--space-6);
  object-fit: cover;
}

/* Role grid */
.cs-role-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
}
.cs-role-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  border: 1px solid rgba(26,24,20,0.08);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.5);
  transition: border-color var(--dur-base) var(--ease), box-shadow var(--dur-base) var(--ease);
}
.cs-role-item:hover {
  border-color: rgba(26,24,20,0.16);
  box-shadow: var(--shadow-sm);
}
.cs-role-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.cs-role-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 300;
  max-width: 100%;
}

/* Methods grid (Colorado) */
.cs-methods-grid {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}
.cs-method-item {
  display: flex;
  gap: var(--space-5);
  align-items: flex-start;
  padding: var(--space-5);
  border: 1px solid rgba(26,24,20,0.08);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,0.5);
}
.cs-method-num {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  flex-shrink: 0;
  padding-top: 2px;
}

/* Highlights (Bewell, Bloom) */
.cs-highlight-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  margin-bottom: var(--space-6);
}
.cs-highlight-list li {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-5);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(26,24,20,0.08);
  background: rgba(255,255,255,0.5);
  transition: border-color var(--dur-base) var(--ease);
}
.cs-highlight-list li:hover { border-color: rgba(26,24,20,0.16); }
.cs-highlight-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}
.cs-highlight-label::before {
  content: '→';
  color: var(--green);
  font-size: 0.8125rem;
}
.cs-highlight-desc {
  font-size: 0.875rem;
  line-height: 1.65;
  color: var(--ink-muted);
  font-weight: 300;
  max-width: 100%;
  padding-left: calc(var(--space-2) + 0.8125rem + var(--space-2));
}

/* NDA note */
.cs-nda-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-5);
  background: var(--cream-dark);
  border-radius: var(--radius-lg);
  color: var(--ink-muted);
  margin-top: var(--space-6);
}
.cs-nda-note svg { flex-shrink: 0; margin-top: 2px; color: var(--ink-faint); }
.cs-nda-note p {
  font-size: 0.875rem;
  line-height: 1.6;
  max-width: 100%;
}
.cs-nda-link {
  color: var(--green);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: transparent;
  transition: text-decoration-color var(--dur-fast) var(--ease);
}
.cs-nda-link:hover { text-decoration-color: var(--green); }

/* =========================================================
   SIDEBAR
   ========================================================= */
.cs-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  position: sticky;
  top: calc(var(--nav-h) + var(--space-5));
}

.cs-sidebar-card {
  padding: var(--space-6);
  border: 1px solid rgba(26,24,20,0.10);
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
}

.cs-aside-heading {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: var(--space-4);
}

.cs-impact-list { display: flex; flex-direction: column; gap: var(--space-5); }
.cs-impact-row { display: flex; flex-direction: column; gap: 2px; }
.cs-impact-num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--green);
}
.cs-impact-desc {
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ink-muted);
  font-weight: 300;
  max-width: 100%;
}

.cs-detail-list { display: flex; flex-direction: column; gap: var(--space-2); }
.cs-detail-list li {
  font-size: 0.875rem;
  color: var(--ink-muted);
  font-weight: 300;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid rgba(26,24,20,0.06);
}
.cs-detail-list li:last-child { border-bottom: none; padding-bottom: 0; }

.cs-sidebar-text {
  font-size: 0.9375rem;
  color: var(--ink-muted);
  font-weight: 300;
  line-height: 1.6;
  max-width: 100%;
}

/* =========================================================
   OTHER PROJECTS RAIL
   ========================================================= */
.cs-other-projects {
  padding-block: var(--space-10);
  background: var(--cream-dark);
  border-top: 1px solid rgba(26,24,20,0.10);
}

.cs-other-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-7);
}
.cs-other-title {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.cs-other-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

.cs-other-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.cs-other-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

/* Per-project card colours — match your existing project-card styles */
.cs-other-card--horizon  { background: linear-gradient(145deg, #DCE8F0 0%, #C4D8E8 100%); }
.cs-other-card--colorado { background: linear-gradient(145deg, #DCF0E0 0%, #C0DCC4 100%); }
.cs-other-card--bewell   { background: linear-gradient(145deg, #E8E0F0 0%, #D4C8E8 100%); }
.cs-other-card--bloom    { background: linear-gradient(145deg, #F0E0D0 0%, #E4C8B4 100%); }

.cs-other-card-inner {
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 260px;
}

.cs-other-num {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
}

.cs-other-tags { display: flex; flex-wrap: wrap; gap: var(--space-1); }

.cs-other-name {
  font-family: var(--font-display);
  font-size: 1.625rem;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 400;
  color: var(--ink);
  margin-top: auto;
}

.cs-other-client {
  font-size: 0.8125rem;
  color: var(--ink-muted);
  font-weight: 500;
}

.cs-other-cta {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
  width: fit-content;
  margin-top: var(--space-2);
  transition: color var(--dur-base) var(--ease-out);
}
.cs-other-card:hover .cs-other-cta { color: var(--green); }

/* =========================================================
   PROJECTS PAGE — link to subpages
   Update the existing .project-link and .project-card-inner
   links to point to the new HTML files
   ========================================================= */

/* =========================================================
   RESPONSIVE — TABLET 960px
   ========================================================= */
@media (max-width: 960px) {
  .cs-layout {
    grid-template-columns: 1fr;
  }

  .cs-sidebar {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
  }

  .cs-hero-image-wrap {
    max-height: 340px;
  }

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

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

  .cs-hero-stats {
    gap: var(--space-5);
  }
}

/* =========================================================
   RESPONSIVE — MOBILE 480px
   ========================================================= */
@media (max-width: 480px) {
  .cs-hero-image-wrap { max-height: 220px; }

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

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

  .cs-hero-stats {
    flex-direction: column;
    gap: var(--space-4);
    width: 100%;
  }

  .cs-hero-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
  }

  .cs-callout { padding: var(--space-4); }
}
