/* ─── CASE STUDY HERO ────────────────────────────────────────── */
.cs-hero {
  padding-top: calc(var(--nav-h) + 80px);
  padding-bottom: 80px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.cs-hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
@media(max-width:900px) {
  .cs-hero .container { grid-template-columns: 1fr; gap: 40px; }
}

.cs-back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
  text-decoration: none; margin-bottom: 32px;
  transition: color .2s; letter-spacing: -0.01em;
}
.cs-back:hover { color: var(--ink); }

.cs-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; background: var(--accent-light);
  border-radius: 99px; font-size: 11px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}

.cs-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400; line-height: 1.15;
  letter-spacing: -0.02em; color: var(--ink);
  margin-bottom: 20px;
}
.cs-hero h1 em { font-style: italic; }

.cs-hero-desc {
  font-size: 16px; line-height: 1.75;
  color: var(--mid); max-width: 480px; margin-bottom: 36px;
}

.cs-meta-row { display: flex; gap: 32px; flex-wrap: wrap; }
.cs-meta-label {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 4px;
}
.cs-meta-value { font-size: 14px; font-weight: 600; color: var(--ink); }

.cs-hero-visual {
  border-radius: 16px; aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.cs-hero-visual::after {
  content: ''; position: absolute; inset: 0;
  pointer-events: none;
}
.cs-hero-visual-inner {
  position: relative; z-index: 2;
  text-align: center; padding: 40px;
}
.cs-hero-visual-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: rgba(255,255,255,0.4);
}
.cs-hero-title-overlay {
  font-family: var(--serif); font-size: 1.4rem;
  font-style: italic; color: rgba(255,255,255,0.8);
  margin-top: 12px;
}

/* ─── STATS BAR ──────────────────────────────────────────────── */
.stats-bar {
  background: var(--surface);
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}
.stats-bar .container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0;
}
@media(max-width:768px) {
  .stats-bar .container { grid-template-columns: 1fr 1fr; }
}
.stat-item {
  text-align: center;
  padding: 8px 32px;
  border-right: 1px solid var(--border);
}
.stat-item:last-child { border-right: none; }
@media(max-width:768px) {
  .stat-item {
    padding: 16px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .stat-item:last-child { border-bottom: none; }
}
.stat-number {
  font-family: var(--serif); font-size: 2.2rem;
  font-weight: 400; color: var(--ink);
  display: block; line-height: 1;
  margin-bottom: 6px; letter-spacing: -0.02em;
}
.stat-label {
  font-size: 11px; font-weight: 600;
  color: var(--muted); letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── CASE STUDY SECTIONS ────────────────────────────────────── */
.cs-section { padding: 100px 0; }
.cs-section + .cs-section { border-top: 1px solid var(--border); }

.cs-section-inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 80px;
}
@media(max-width:900px) {
  .cs-section-inner { grid-template-columns: 1fr; gap: 32px; }
}

.cs-section-label .eyebrow { margin-bottom: 12px; }
.cs-section-label h2 {
  font-family: var(--serif); font-size: 1.75rem;
  font-weight: 400; line-height: 1.2; letter-spacing: -0.02em;
  color: var(--ink);
}

.cs-section-content {
  font-size: 15.5px; line-height: 1.8; color: var(--mid);
}
.cs-section-content p { margin-bottom: 20px; }
.cs-section-content p:last-child { margin-bottom: 0; }
.cs-section-content br + br { display: block; margin-top: 16px; }

/* ─── FEATURES GRID ──────────────────────────────────────────── */
.features-grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 20px; margin-top: 40px;
}
@media(max-width:640px) { .features-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 24px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover { border-color: var(--border-dark); transform: translateY(-2px); }

.feature-title { font-size: 14px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.feature-desc { font-size: 13.5px; color: var(--muted); line-height: 1.65; }

/* ─── RESULT BOX ─────────────────────────────────────────────── */
.result-box {
  background: var(--accent-light); border: 1px solid var(--accent-soft);
  border-radius: 12px; padding: 32px 36px;
  display: flex; align-items: flex-start; gap: 20px; margin-top: 40px;
}
.result-box-icon {
  width: 44px; height: 44px; background: var(--accent);
  border-radius: 10px; display: grid; place-items: center; flex-shrink: 0;
}
.result-box-text h3 { font-size: 15px; font-weight: 700; color: var(--accent); margin-bottom: 6px; }
.result-box-text p { font-size: 14.5px; color: var(--mid); line-height: 1.7; }

/* ─── CLIENT QUOTE ────────────────────────────────────────────── */
.cs-quote {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 10px 10px 0; padding: 28px 32px;
  margin-top: 0;
}
.cs-quote-text {
  font-family: var(--serif); font-size: 1.2rem;
  font-style: italic; color: var(--ink);
  line-height: 1.6; margin-bottom: 16px;
}
.cs-quote-author {
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}

/* ─── NEXT PROJECT ───────────────────────────────────────────── */
.next-project {
  background: var(--surface); border-top: 1px solid var(--border);
  padding: 60px 0;
}
.next-inner {
  display: flex; align-items: center;
  justify-content: space-between; gap: 32px; flex-wrap: wrap;
}
.next-label {
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 8px;
}
.next-title {
  font-family: var(--serif); font-size: 1.5rem;
  font-weight: 400; color: var(--ink);
}

/* ─── GALLERY CAROUSEL ───────────────────────────────────────── */
.cs-carousel {
  position: relative;
  border-radius: 16px;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--surface-2, #f0f1f3);
  border: 1px solid var(--border);
}

.cs-carousel-track {
  display: flex;
  height: 100%;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.cs-carousel-slide {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.cs-carousel-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
  transition: transform 0.3s ease;
}
.cs-carousel-img:hover { transform: scale(1.02); }

/* Prev / Next arrows */
.cs-carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(0,0,0,0.35);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  backdrop-filter: blur(4px);
}
.cs-carousel-btn:hover {
  background: rgba(0,0,0,0.6);
  border-color: rgba(255,255,255,0.5);
}
.cs-carousel-prev { left: 12px; }
.cs-carousel-next { right: 12px; }

/* Dots */
.cs-carousel-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}
.cs-carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  border: none;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  padding: 0;
}
.cs-carousel-dot.active,
.cs-carousel-dot:hover {
  background: #fff;
  transform: scale(1.3);
}

/* Click-to-zoom hint */
.cs-carousel-hint {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  display: flex; align-items: center; gap: 5px;
  font-size: 10px; font-weight: 600;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.55);
  background: rgba(0,0,0,0.3);
  padding: 4px 8px;
  border-radius: 99px;
  backdrop-filter: blur(4px);
  pointer-events: none;
  user-select: none;
}

/* ─── LIGHTBOX ───────────────────────────────────────────────── */
.cs-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(9, 14, 22, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
  cursor: zoom-out;
}

.cs-lightbox-inner {
  position: relative;
  width: min(1100px, 94vw);
  height: min(82vh, 780px);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: default;
}

.cs-lb-img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-lb-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6);
  display: block;
  object-fit: contain;
  transition: opacity 0.22s ease;
}
.cs-lb-img.is-fading {
  opacity: 0;
}

/* Close button — minimalist fixed top-right */
.cs-lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 32px; height: 32px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.5);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
  z-index: 9020;
}
.cs-lb-close:hover {
  color: #fff;
  transform: scale(1.15);
}

/* Lightbox nav buttons — minimalist, consistent with close */
.cs-lb-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9010;
  width: 36px; height: 36px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.45);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: color 0.2s, transform 0.2s;
}
.cs-lb-nav:hover {
  color: #fff;
  transform: translateY(-50%) scale(1.15);
}
.cs-lb-prev { left: 16px; }
.cs-lb-next { right: 16px; }

/* Counter */
.cs-lb-counter {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.1em;
  white-space: nowrap;
  z-index: 9010;
}

@media(max-width: 640px) {
  .cs-carousel-btn { width: 30px; height: 30px; }

  /* Move nav + counter to a bottom bar: ← 1/3 → */
  .cs-lb-nav {
    position: fixed;
    top: auto;
    bottom: 16px;
    transform: none;
    width: 44px; height: 44px;
  }
  .cs-lb-nav:hover { transform: scale(1.1); }
  .cs-lb-prev { left: calc(50% - 72px); }
  .cs-lb-next { right: calc(50% - 72px); }

  .cs-lb-counter {
    bottom: 26px;
  }

  .cs-lb-close { top: 12px; right: 12px; }

  .cs-lightbox { padding: 16px; }
  .cs-lightbox-inner {
    width: 100vw;
    height: calc(100vh - 120px);
    margin-top: 48px;
  }
}
