/* ========================================
   CASE STUDY STYLES — LIGHT THEME
   ======================================== */

/* ----------------------------------------
   CSS VARIABLES FOR CASE STUDIES
   ---------------------------------------- */
:root {
  --cs-bg-white: #ffffff;
  --cs-bg-light: #f0f2f6;
  --cs-bg-blue-tint: #e8eaf0;
  --cs-text-dark: #272b3d;
  --cs-text-muted: #5a5f72;
  --cs-text-light: #8a8f9f;
  --cs-accent: #d94334;
  --cs-border: rgba(39, 43, 61, 0.1);
}

/* ----------------------------------------
   BASE OVERRIDES FOR CASE STUDY PAGES
   ---------------------------------------- */
body.case-study-page {
  background-color: var(--cs-bg-white);
  color: var(--cs-text-dark);
}

/* ----------------------------------------
   HERO SECTION — Full-bleed background
   ---------------------------------------- */
.cs-hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 8rem 3rem 3rem 3rem;
  overflow: hidden;
}

.cs-hero-background {
  position: absolute;
  inset: 0;
  z-index: 1;
  background-color: var(--cs-text-dark);
}

/* Shimmer placeholder while hero image loads */
.cs-hero-background::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    90deg,
    var(--cs-text-dark) 0%,
    #323750 50%,
    var(--cs-text-dark) 100%
  );
  background-size: 200% 100%;
  animation: heroShimmer 1.5s ease-in-out infinite;
}

@keyframes heroShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.cs-hero-background img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cs-hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(39, 43, 61, 0.5);
  z-index: 2;
}

/* Top-left: Title */
.cs-hero-title-wrapper {
  position: relative;
  z-index: 3;
  padding-top: clamp(40px, 5vh, 80px); /* Minimal breathing room - title sits in upper portion */
}

/* Hero eyebrow: small label above title (visible on dark overlay) */
.cs-hero-eyebrow,
.cs-hero-title-wrapper .cs-eyebrow {
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 0.75rem 0;
}

.cs-hero-title-wrapper .cs-hero-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem);
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.5;
  margin: 1rem 0 0 0;
}

.cs-hero-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.05;
  margin: 0;
  letter-spacing: -0.02em;
  max-width: 66%;
}

/* Hero title responsive widths + tablet padding */
@media (max-width: 1024px) {
  .cs-hero-title {
    max-width: 80%;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .cs-hero {
    padding-left: 4em;
    padding-right: 4em;
  }
}

/* Bottom row: arrow left, description right */
.cs-hero-bottom {
  position: relative;
  z-index: 3;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
}

/* Bottom-left: Scroll arrow */
.cs-scroll-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  transition: border-color 0.3s ease, background-color 0.3s ease;
  flex-shrink: 0;
}

.cs-scroll-button:hover {
  border-color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
}

.cs-scroll-button svg {
  width: 28px;
  height: 28px;
  stroke: currentColor;
}

/* Bottom-right: Description */
.cs-hero-description {
  max-width: 420px;
  text-align: right;
}

.cs-hero-description p {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  margin: 0;
}

.cs-hero-subtitle {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1rem, 2vw, 1.35rem); /* Match homepage hero tagline */
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
  line-height: 1.6;
  margin: 0;
}

/* Remove old styles we don't need (do not include .cs-hero-label - used in hero title wrapper) */
.cs-hero-grid,
.cs-hero-content,
.cs-hero-image-wrapper,
.cs-hero-image,
.cs-scroll-indicator {
  /* These are replaced by new structure */
}

/* Hero Responsive — tablet and below */
@media (max-width: 768px) {
  .cs-hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: 6rem 6vw 2rem 6vw;
  }

  .cs-hero-title {
    font-size: clamp(2.5rem, 12vw, 4rem);
    max-width: 100%;
  }

  .cs-hero-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }

  .cs-hero-description {
    text-align: left;
    max-width: 100%;
  }

  .cs-scroll-button {
    width: 60px;
    height: 60px;
  }

  .cs-scroll-button svg {
    width: 20px;
    height: 20px;
  }
}

/* Hero — tighter phones: ensure at least 6vw horizontal padding */
@media (max-width: 480px) {
  .cs-hero {
    padding: 6rem 6vw 2rem 6vw;
  }
}

/* ----------------------------------------
   DETAILS SECTION (Meta + Overview)
   ---------------------------------------- */
.cs-details {
  background-color: var(--cs-bg-white);
  padding: 5rem 0;
  border-top: 1px solid var(--cs-border);
}

.cs-details-grid {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 4rem;
}

/* Meta Sidebar */
.cs-meta {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cs-meta-item {
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--cs-border);
}

.cs-meta-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.cs-meta-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cs-text-light);
  margin-bottom: 0.5rem;
}

.cs-meta-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--cs-text-dark);
}

.cs-meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-meta-list li {
  font-size: 0.9375rem;
  color: var(--cs-text-dark);
  margin-bottom: 0.375rem;
  line-height: 1.5;
}

.cs-meta-list li:last-child {
  margin-bottom: 0;
}

.cs-meta-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.cs-meta-tags li {
  font-size: 0.8125rem;
  color: var(--cs-text-muted);
  background: var(--cs-bg-light);
  padding: 0.25rem 0.75rem;
  border-radius: 2rem;
}

/* Links in meta section (team members, external links) */
.cs-meta-link {
  color: var(--cs-accent);
  text-decoration: underline;
  text-decoration-color: var(--cs-accent);
  text-underline-offset: 3px;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.cs-meta-link:hover {
  color: var(--cs-text-dark);
  text-decoration-color: var(--cs-text-dark);
}

/* Links section in meta */
.cs-meta-item.cs-meta-links p.cs-meta-label {
  margin-bottom: 0.75rem;
}

.cs-meta-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cs-meta-links-list li {
  margin-bottom: 0.5rem;
}

.cs-meta-links-list a {
  color: var(--cs-accent);
  text-decoration: underline;
  text-decoration-color: var(--cs-accent);
  text-underline-offset: 3px;
  font-size: 0.9375rem;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

.cs-meta-links-list a:hover {
  color: var(--cs-text-dark);
  text-decoration-color: var(--cs-text-dark);
}

/* Overview */
.cs-overview {
  max-width: 900px;
}

.cs-overview-label {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--cs-text-light);
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--cs-border);
  display: inline-block;
}

.cs-overview-text {
  font-size: 1.0625rem;
  line-height: 1.9;
  color: var(--cs-text-dark);
}

.cs-overview-text p {
  margin-bottom: 1.5rem;
}

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

/* ----------------------------------------
   SECTION TITLES (Manrope, no underline)
   ---------------------------------------- */
.cs-section-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--cs-text-dark);
  margin-bottom: 2rem;
  text-decoration: none;
  border-bottom: none;
}

/* ----------------------------------------
   SECTION EYEBROW
   ---------------------------------------- */
.cs-eyebrow {
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(39, 43, 61, 0.5);  /* Muted version of dark text */
  margin-bottom: 1.5rem;
}

/* Eyebrow on dark backgrounds */
.cs-content--dark .cs-eyebrow,
.cs-results .cs-eyebrow {
  color: rgba(255, 255, 255, 0.5);
}

/* Eyebrow + Title combo */
.cs-section-header {
  margin-bottom: 2rem;
}

.cs-section-header .cs-section-title {
  margin-top: 0;
}

/* Subsection titles within content blocks — more breathing room */
.cs-content .cs-section-title ~ .cs-section-title {
  margin-top: 3.5rem;
}

.cs-content p + .cs-section-title,
.cs-content .cs-overview-text + .cs-section-title,
.cs-content .cs-bullet-list + .cs-section-title,
.cs-content .cs-content-grid + .cs-section-title,
.cs-content .cs-highlight + .cs-section-title,
.cs-content .cs-figure + .cs-section-title {
  margin-top: 3.5rem;
}

/* Section titles used from homepage styles (Gallery, Other projects) */
.case-study-page .section-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 400;
  color: var(--cs-text-dark);
  margin-bottom: 2rem;
  text-decoration: none;
  border-bottom: none;
}

/* ----------------------------------------
   FULL-WIDTH IMAGE
   ---------------------------------------- */
.cs-full-image {
  background-color: var(--cs-bg-light);
  padding: 0;
}

.cs-feature-image {
  width: 100%;
  height: auto;
  display: block;
}

.cs-image-caption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--cs-text-light);
  padding: 1.5rem 2rem;
  font-style: italic;
  background-color: var(--cs-bg-light);
}

/* ----------------------------------------
   CONTENT SECTIONS
   ---------------------------------------- */
/* Ensure all content sections have solid backgrounds to cover sticky reveals */
.cs-content {
  background-color: #ffffff;
  padding: 5rem 0;
  position: relative;
  z-index: 2;
}

.cs-content--alt {
  background-color: #f0f2f6;
  position: relative;
  z-index: 2;
}

.cs-content--blue {
  background-color: var(--cs-bg-blue-tint);
}

/* Content with bullet points */
.cs-bullet-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0 0 0;
}

.cs-bullet-list li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--cs-text-dark);
}

.cs-bullet-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6rem;
  width: 8px;
  height: 8px;
  background-color: var(--cs-accent);
  border-radius: 50%;
}

/* Numbered list (e.g., flow steps) */
.cs-numbered-list {
  padding: 0 0 0 1.75rem;
  margin: 2rem 0;
}

.cs-numbered-list li {
  margin-bottom: 0.5rem;
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--cs-text-dark);
}

.cs-numbered-list li::marker {
  color: var(--cs-accent);
  font-weight: 600;
}

.cs-numbered-list ul {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0 0.5rem;
}

.cs-numbered-list ul li {
  padding-left: 1.25rem;
  position: relative;
  margin-bottom: 0.25rem;
  font-size: 0.9375rem;
  color: var(--cs-text-muted);
}

.cs-numbered-list ul li::before {
  content: '↳';
  position: absolute;
  left: 0;
}

/* Nested bullets */
.cs-bullet-list ul {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0 1rem;
}

.cs-bullet-list ul li {
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.cs-bullet-list ul li::before {
  width: 6px;
  height: 6px;
  top: 0.55rem;
}

/* Content Grid for cards */
.cs-content-grid {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

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

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

.cs-content-card {
  background: var(--cs-bg-white);
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  padding: 2rem;
}

.cs-content-card h3 {
  font-family: 'Manrope', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--cs-text-dark);
  margin-bottom: 1rem;
}

.cs-content-card p {
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--cs-text-muted);
  margin: 0;
}

/* Highlight question/insight box */
.cs-highlight {
  background-color: var(--cs-bg-light);
  border-left: 3px solid var(--cs-accent);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  font-style: italic;
  color: var(--cs-text-dark);
}

/* Pullquote — large insight/takeaway callout */
.cs-pullquote {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 600;
  line-height: 1.4;
  color: var(--cs-text-dark);
  margin: 2.5rem 0;
  padding: 0;
  max-width: 42em;
}

.cs-pullquote .cs-pullquote-icon {
  display: inline;
  margin-right: 0.15em;
}

@media (max-width: 768px) {
  .cs-pullquote {
    font-size: 1.2rem;
  }
}

/* Inline links within content sections */
.cs-content a:not(.cs-scroll-button),
.cs-results a,
.cs-overview-text a,
.cs-inline-link {
  color: var(--cs-text-dark);
  text-decoration: none;
  border-bottom: 1.5px solid var(--cs-accent);
  padding-bottom: 1px;
  transition: border-color 0.2s ease;
}

.cs-content a:not(.cs-scroll-button):hover,
.cs-results a:hover,
.cs-overview-text a:hover,
.cs-inline-link:hover {
  border-bottom-color: var(--cs-text-dark);
}

/* Link with tooltip preview */
.cs-link-preview {
  position: relative;
  text-decoration: underline;
  text-decoration-color: var(--cs-accent);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.cs-link-preview:hover {
  text-decoration-color: var(--cs-text-dark);
}

.cs-link-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--cs-text-dark);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.cs-link-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--cs-text-dark);
}

.cs-link-preview:hover .cs-link-tooltip,
.cs-link-preview:focus-visible .cs-link-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Intro text before content grids */
.cs-intro-text {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--cs-text-dark);
  margin-bottom: 1rem;
}

.cs-intro-text:last-of-type {
  margin-bottom: 2rem;
}

/* ----------------------------------------
   INLINE IMAGE (within content)
   ---------------------------------------- */
.cs-inline-image {
  background-color: var(--cs-bg-white);
  padding: 3rem 0;
}

.cs-figure {
  margin: 0;
  background-color: inherit;
}

.cs-figure img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.cs-content-card .cs-figure img {
  box-shadow: none;
}

.cs-figure figcaption {
  font-size: 0.875rem;
  color: var(--cs-text-light);
  margin-top: 1rem;
  font-style: italic;
  text-align: center;
}

/* ----------------------------------------
   INLINE IMAGE GRID
   2-column image layout within content sections
   ---------------------------------------- */
.cs-image-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.5rem;
}

.cs-image-grid figure {
  margin: 0;
}

.cs-image-grid img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.cs-image-grid img:hover {
  transform: scale(1.01);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.cs-image-grid figcaption {
  font-size: 0.9rem;
  color: var(--cs-text-muted);
  text-align: center;
  margin-top: 0.75rem;
  font-style: italic;
}

/* ----------------------------------------
   DISCOVERY ITEMS — Spaced blocks with smaller titles
   ---------------------------------------- */
.cs-discovery-items {
  margin-top: 3rem;
}

.cs-discovery-item {
  padding: 3rem 0;
  border-top: 1px solid var(--cs-border);
}

.cs-discovery-item:last-child {
  padding-bottom: 0;
}

.cs-discovery-title {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--cs-text-dark);
  margin: 0 0 1rem 0;
}

/* ----------------------------------------
   SCROLL STEPS — Text left, sticky image right
   ---------------------------------------- */
.cs-scroll-steps-layout {
  display: grid;
  grid-template-columns: 1fr 40%;
  gap: 4rem;
  align-items: start;
  margin-top: 3rem;
}

/* Text column */
.cs-scroll-steps-text {
  padding-bottom: 20vh; /* extra scroll room so last step can trigger */
}

.cs-scroll-step {
  min-height: 70vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 0;
  opacity: 0.3;
  transition: opacity 0.4s ease;
}

.cs-scroll-step:first-child {
  min-height: 50vh; /* less top gap before first step */
  justify-content: flex-start;
  padding-top: 2rem;
}

.cs-scroll-step.is-active {
  opacity: 1;
}

/* Smaller titles inside scroll steps */
.cs-scroll-step .cs-section-title {
  margin-top: 0;
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Image column — sticky */
.cs-scroll-steps-media {
  position: sticky;
  top: 20vh;
  height: auto;
}

.cs-scroll-steps-phone {
  position: relative;
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  aspect-ratio: 9 / 19.5; /* phone-ish proportion */
}

.cs-scroll-step-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 12px;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.cs-scroll-step-img.is-active {
  opacity: 1;
}

/* Camera step: portrait → rotate → landscape */
.cs-camera-portrait,
.cs-camera-landscape {
  opacity: 0;
  transition: none; /* override default fade, use keyframes instead */
}

.cs-camera-portrait.is-active {
  animation: camera-portrait 2.5s ease forwards;
}

.cs-camera-landscape.is-active {
  animation: camera-landscape 2.5s ease forwards;
}

/* Landscape image: sized to match the rotated portrait's visual width */
.cs-camera-landscape {
  inset: auto;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: calc(100% * 19.5 / 9); /* phone container height as width */
  max-width: none;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0;
}

@keyframes camera-portrait {
  0%   { opacity: 1; transform: rotate(0deg); }
  15%  { opacity: 1; transform: rotate(0deg); }
  40%  { opacity: 0; transform: rotate(-90deg); }
  100% { opacity: 0; transform: rotate(-90deg); }
}

@keyframes camera-landscape {
  0%   { opacity: 0; }
  30%  { opacity: 0; }
  50%  { opacity: 1; }
  100% { opacity: 1; }
}

/* Mobile: stack vertically */
@media (max-width: 768px) {
  .cs-scroll-steps-layout {
    grid-template-columns: 1fr;
    gap: 0;
    margin-top: 2rem;
  }

  .cs-scroll-steps-text {
    padding-bottom: 0;
  }

  .cs-scroll-step,
  .cs-scroll-step:first-child {
    min-height: auto;
    padding: 2rem 0;
    opacity: 1;
    justify-content: center;
  }

  /* Hide the sticky phone column on mobile */
  .cs-scroll-steps-media {
    display: none;
  }
}

/* ----------------------------------------
   STICKY IMAGE REVEAL
   Used before Results section for dramatic reveal
   ---------------------------------------- */
.cs-sticky-reveal {
  position: relative;
  height: 200vh; /* Creates scroll distance */
  margin-bottom: -100vh; /* Pulls next section up to overlap */
}

.cs-sticky-reveal-inner {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
}

.cs-sticky-reveal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* Optional dark overlay for readability */
.cs-sticky-reveal-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3) 100%);
  pointer-events: none;
}

@media (max-width: 768px) {
  .cs-sticky-reveal {
    height: 150vh;
    margin-bottom: -50vh;
  }
}

/* ----------------------------------------
   RESULTS / ROCKET LAUNCHED SECTION
   ---------------------------------------- */
.cs-results {
  background-color: #f0f2f6;
  padding: 5rem 0;
  position: relative;
  z-index: 2;
}

.cs-results-content {
  max-width: 800px;
}

.cs-results-content p {
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--cs-text-dark);
  margin-bottom: 1.5rem;
}

.cs-results-highlight {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--cs-text-dark);
  border-left: 3px solid var(--cs-accent);
  padding-left: 1.5rem;
  margin: 2rem 0;
}

/* Optional metrics grid */
.cs-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 4rem 0 3rem;
}

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

.cs-metric {
  text-align: center;
}

.cs-metric-number {
  font-family: 'Manrope', sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--cs-accent);
  margin-bottom: 1.25rem;
}

.cs-metric-label {
  font-size: 0.9375rem;
  color: var(--cs-text-muted);
  max-width: 100%;
}

/* ----------------------------------------
   GALLERY SECTION
   ---------------------------------------- */
.cs-gallery {
  background-color: var(--cs-bg-white);
  padding: 5rem 0;
}

.cs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.cs-gallery-item {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
}

.cs-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cs-gallery-item:hover img {
  transform: scale(1.05);
}

/* Placeholder circles when no images */
.cs-gallery-placeholder {
  width: 80px;
  height: 80px;
  background-color: var(--cs-bg-light);
  border-radius: 50%;
  margin: 2rem auto;
}

/* ----------------------------------------
   OTHER PROJECTS
   ---------------------------------------- */
.cs-other-projects {
  background-color: #f0f2f6;
  padding: 5rem 0;
  border-top: 1px solid var(--cs-border);
  position: relative;
  z-index: 2;
}

/* Use minimal side padding for wider card display */
.cs-other-projects .container {
  max-width: 100%;
  padding-left: 3%;
  padding-right: 3%;
}

.cs-other-projects .work-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  align-items: stretch;
}

/* Tag pills for Other Projects cards */
.cs-other-projects .work-card-tag {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  background-color: var(--cs-bg-light);
  color: var(--cs-text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 50px;
}

@media (max-width: 1024px) {
  .cs-other-projects .work-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .cs-other-projects .work-grid {
    grid-template-columns: 1fr;
  }
}

.cs-projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.cs-project-card {
  display: block;
  text-decoration: none;
  background: var(--cs-bg-white);
  border: 1px solid var(--cs-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.cs-project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
}

.cs-project-image-wrapper {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--cs-bg-light);
}

.cs-project-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cs-project-card:hover .cs-project-image-wrapper img {
  transform: scale(1.05);
}

.cs-project-info {
  padding: 1.5rem;
}

.cs-project-name {
  font-family: 'Manrope', sans-serif;
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--cs-text-dark);
  margin-bottom: 0.5rem;
}

.cs-project-desc {
  font-size: 0.875rem;
  color: var(--cs-text-muted);
  line-height: 1.5;
  margin-bottom: 0.5rem;
}

.cs-project-company {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--cs-text-light);
}

/* ----------------------------------------
   RESPONSIVE
   ---------------------------------------- */
@media (max-width: 1024px) {
  .cs-hero .container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .cs-hero-content {
    max-width: 100%;
  }

  .cs-details-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .cs-meta {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2rem;
  }

  .cs-meta-item {
    flex: 1 1 calc(50% - 1rem);
    min-width: 150px;
    border-bottom: none;
    padding-bottom: 0;
  }

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

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

@media (max-width: 768px) {
  .cs-hero {
    min-height: 100vh;
    min-height: 100svh;
    padding: 6rem 6vw 3rem 6vw;
  }

  .cs-scroll-indicator {
    display: none;
  }

  .cs-details {
    padding: 3rem 0;
  }

  .cs-content {
    padding: 3rem 0;
  }

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

  .cs-metrics-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

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

  .cs-meta {
    flex-direction: column;
    gap: 1.5rem;
  }

  .cs-meta-item {
    flex: none;
    border-bottom: 1px solid var(--cs-border);
    padding-bottom: 1rem;
  }
}

@media (max-width: 480px) {
  .cs-hero-title {
    font-size: clamp(1.75rem, 10vw, 2.5rem);
  }

  .cs-section-title {
    font-size: 1.75rem;
  }

  .cs-content-card {
    padding: 1.5rem;
  }
}

/* ----------------------------------------
   LIGHTBOX - UPGRADED
   ---------------------------------------- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  flex-direction: column;
  padding: 1rem;
}

.lightbox.active {
  display: flex;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  z-index: 10;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 0.7;
}

/* Prev/Next buttons */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-100%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  font-size: 1.5rem;
  padding: 1rem 1.25rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.2s;
  z-index: 10;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

/* Main image area */
.lightbox-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 2rem 4rem;
}

.lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

/* Footer with caption and counter */
.lightbox-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-caption {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.9375rem;
  margin: 0;
  text-align: left;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin: 0;
  white-space: nowrap;
}

/* Thumbnail strip */
.lightbox-thumbnails {
  display: flex;
  gap: 0.5rem;
  padding: 1rem 0;
  overflow-x: auto;
  justify-content: center;
  flex-wrap: nowrap;
}

.lightbox-thumb {
  width: 60px;
  height: 45px;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s, transform 0.2s;
  flex-shrink: 0;
  border: 2px solid transparent;
}

.lightbox-thumb:hover {
  opacity: 0.8;
}

.lightbox-thumb.active {
  opacity: 1;
  border-color: white;
}

.lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Responsive */
@media (max-width: 768px) {
  .lightbox-main {
    padding: 1rem;
  }

  .lightbox-prev,
  .lightbox-next {
    padding: 0.75rem 1rem;
    font-size: 1.25rem;
  }

  .lightbox-thumb {
    width: 50px;
    height: 38px;
  }
}

/* Make gallery items show pointer cursor */
.cs-gallery-item {
  cursor: pointer;
}

/* ----------------------------------------
   FOOTER — Solid background so sticky reveal doesn't show through
   ---------------------------------------- */
.footer {
  background-color: #272b3d;
  position: relative;
  z-index: 2;
}

/* Footer reveal stays behind everything */
.footer-reveal {
  z-index: -1;
}
