/* ═══════════════════════════════════════════════
   Case Study — Shared Styles
═══════════════════════════════════════════════ */

/* ── CASE HERO ── */
.cs-hero {
  min-height: 100svh;
  padding: var(--nav-h) var(--pad-x) 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  position: relative;
  overflow: hidden;
}

.cs-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--ease-out);
  filter: brightness(0.5) saturate(0.7);
  z-index: 0;
}

.cs-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.cs-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top,
    rgba(8,8,8,1) 0%,
    rgba(8,8,8,0.7) 40%,
    rgba(8,8,8,0.2) 100%);
  z-index: 1;
}

.cs-hero-content {
  position: relative;
  z-index: 2;
  padding-bottom: 5rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2rem;
  align-items: end;
}

.cs-back {
  position: absolute;
  top: calc(var(--nav-h) + 1.5rem);
  left: var(--pad-x);
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.2s;
}

.cs-back:hover { color: var(--accent); }

.cs-hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.cs-hero-num {
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-style: italic;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.cs-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 6vw, 5.5rem);
  font-weight: 900;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--text);
  max-width: 14ch;
}

.cs-hero-title em {
  font-style: italic;
  color: var(--accent);
}

.cs-hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1rem;
}

.cs-hero-stat {
  text-align: right;
}

.cs-hero-stat-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  font-weight: 700;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.cs-hero-stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ── OVERVIEW STRIP ── */
.cs-overview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}

.cs-overview-item {
  padding: 2rem 2.5rem;
  border-right: 1px solid var(--border);
}

.cs-overview-item:last-child { border-right: none; }

.cs-overview-label {
  font-size: 0.6875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  display: block;
}

.cs-overview-value {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* ── SECTION TEMPLATE ── */
.cs-section {
  padding: 6rem var(--pad-x);
}

.cs-section + .cs-section {
  padding-top: 0;
}

.cs-section-label {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.cs-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.cs-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.cs-section-title em {
  font-style: italic;
  color: var(--accent);
}

.cs-body {
  font-size: 20px !important;
  line-height: 1.75;
  color: var(--text-muted);
  max-width: 68ch;
}

.cs-body strong { color: var(--text); font-weight: 500; }

/* ── TWO-COL LAYOUT ── */
.cs-two-col {
  display: grid;
  grid-template-columns: 5fr 4fr;
  gap: 6rem;
  align-items: start;
}

.cs-two-col.reverse { grid-template-columns: 4fr 5fr; }

/* ── CHALLENGE ── */
.cs-challenge {
  padding: 6rem var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 5rem;
  align-items: start;
  border-top: 1px solid var(--border);
}

.cs-challenge-label { margin-bottom: 1.5rem; }

.cs-challenge-pull {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.25rem);
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  color: var(--text);
  margin-bottom: 2rem;
}

.cs-challenge-pull em { color: var(--accent); }

/* ── PROCESS STEPS ── */
.cs-process {
  padding: 6rem var(--pad-x);
  background: var(--surface);
}

.cs-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 3px;
  margin-top: 3rem;
}

.cs-step {
  background: var(--surface-2);
  padding: 2rem 1.75rem;
  position: relative;
  transition: background 0.3s;
}

.cs-step:hover { background: var(--surface-3); }

.cs-step-num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 900;
  font-style: italic;
  color: var(--text-dim);
  line-height: 1;
  margin-bottom: 1rem;
}

.cs-step-name {
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.cs-step-desc {
  font-size: 20px !important;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ── IMAGE PLACEHOLDER ── */
.cs-image {
  width: 100%;
  aspect-ratio: 16/10;
  background: var(--surface-2);
  overflow: hidden;
  position: relative;
}

.cs-image img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}

.cs-image-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cs-image-placeholder-text {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 7rem);
  font-weight: 900;
  font-style: italic;
  color: rgba(255,255,255,0.05);
  text-align: center;
  user-select: none;
}

/* ── INSIGHTS / PULLQUOTES ── */
.cs-insight {
  padding: 5rem var(--pad-x);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2rem;
  align-items: start;
  border-top: 1px solid var(--border);
}

.cs-insight-bar {
  width: 3px;
  height: 100%;
  min-height: 80px;
  background: var(--accent);
  flex-shrink: 0;
}

.cs-insight-text {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.5vw, 2rem);
  font-style: italic;
  line-height: 1.45;
  color: var(--text);
}

.cs-insight-text em { color: var(--accent); }

/* ── RESULTS ── */
.cs-results {
  padding: 6rem var(--pad-x);
  background: var(--surface);
}

.cs-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 3px;
  margin-top: 3rem;
}

.cs-result-item {
  background: var(--surface-2);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.cs-result-num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 4vw, 3.75rem);
  font-weight: 700;
  font-style: italic;
  color: var(--accent);
  line-height: 1;
  letter-spacing: -0.02em;
}

.cs-result-label {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ── VIDEO SECTION ── */
.cs-video-section {
  padding: 6rem var(--pad-x);
  border-top: 1px solid var(--border);
}

.cs-video-wrap {
  margin-top: 2.5rem;
  position: relative;
  width: 50%;
  aspect-ratio: 16/9;
  background: var(--surface);
  overflow: hidden;
}

@media (max-width: 768px) {
  .cs-video-wrap { width: 100%; }
}

.cs-video-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  background: var(--surface);
  text-align: center;
  padding: 2rem;
}

.cs-video-placeholder .play-ring {
  width: 72px; height: 72px;
  border-radius: 50%;
  border: 2px solid rgba(201,168,76,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.5rem;
  transition: border-color 0.2s, background 0.2s;
}

.cs-video-placeholder p {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 36ch;
  line-height: 1.6;
}

.cs-video-add-btn {
  padding: 0.6rem 1.25rem;
  border: 1px solid var(--border);
  font-size: 0.8125rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: transparent;
  font-family: var(--font-body);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.cs-video-add-btn:hover {
  color: var(--accent);
  border-color: rgba(201,168,76,0.4);
}

.cs-video-input-row {
  display: none;
  gap: 0.75rem;
  margin-top: 1rem;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 480px;
}

.cs-video-input-row.open { display: flex; }

.cs-video-url-input {
  width: 100%;
  padding: 0.65rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s;
}

.cs-video-url-input:focus { border-color: rgba(201,168,76,0.4); }
.cs-video-url-input::placeholder { color: var(--text-muted); }

.cs-video-submit {
  padding: 0.65rem 1.5rem;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: opacity 0.2s;
  white-space: nowrap;
  align-self: stretch;
}

.cs-video-submit:hover { opacity: 0.85; }

.cs-video-iframe {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.cs-video-native {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ── NEXT PROJECT ── */
.cs-next {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  border-top: 1px solid var(--border);
}

.cs-next-back {
  padding: 4rem var(--pad-x);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  transition: background 0.3s;
  text-decoration: none;
}

.cs-next-back:hover { background: var(--surface-2); }

.cs-next-project {
  padding: 4rem var(--pad-x);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  transition: opacity 0.3s;
}

.cs-next-project:hover { opacity: 0.85; }

.cs-next-label {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.cs-next-title {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
}

.cs-next-arrow {
  font-size: 1.5rem;
  color: var(--accent);
  margin-top: 0.5rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .cs-overview { grid-template-columns: repeat(2, 1fr); }
  .cs-overview-item:nth-child(2) { border-right: none; }
  .cs-overview-item:nth-child(3), .cs-overview-item:nth-child(4) { border-top: 1px solid var(--border); }
  .cs-challenge { grid-template-columns: 1fr; gap: 2rem; }
  .cs-two-col, .cs-two-col.reverse { grid-template-columns: 1fr; gap: 3rem; }
}

@media (max-width: 640px) {
  .cs-overview { grid-template-columns: 1fr 1fr; }
  .cs-overview-item { border-right: none; border-bottom: 1px solid var(--border); }
  .cs-hero-content { grid-template-columns: 1fr; }
  .cs-hero-right { align-items: flex-start; }
  .cs-hero-stat { text-align: left; }
  .cs-steps { grid-template-columns: 1fr; }
  .cs-results-grid { grid-template-columns: 1fr 1fr; }
  .cs-next { grid-template-columns: 1fr; }
  .cs-challenge { grid-template-columns: 1fr; gap: 2rem; }
  .cs-two-col, .cs-two-col.reverse { grid-template-columns: 1fr; gap: 2rem; }
  .cs-video-wrap { width: 100% !important; }
}
