/* ══════════════════════════════════════════
   CASE STUDY — DESIGN SYSTEM
   Fonts: Syne (display) · Manrope (body)
   Inherits tokens from style.css
══════════════════════════════════════════ */

/* ── Layout ─────────────────────────────── */
.cs-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

.cs-two-col {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 72px;
  align-items: start;
}
@media (max-width: 768px) {
  .cs-two-col { grid-template-columns: 1fr; gap: 28px; }
}

.cs-sticky-left {
  position: sticky;
  top: calc(var(--nav-h) + 36px);
}
.cs-sticky-left .section-tag { margin-bottom: 10px; }
.cs-sticky-left .cs-section-title {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.25;
}

/* ── Section ─────────────────────────────── */
.cs-section { padding: 88px 0; }

.cs-section-alt {
  background: var(--bg1);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cs-section-header { margin-bottom: 48px; }
.cs-section-header .cs-section-title { margin-top: 8px; }

.cs-section-title {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.025em;
  margin-top: 10px;
}

/* ── Hero ─────────────────────────────────── */
.cs-hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 0;
  background: var(--bg);
  position: relative;
}
.cs-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 70% 60% at 20% 50%, rgba(124,58,237,.08) 0%, transparent 70%);
  pointer-events: none;
}
.cs-hero-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px 60px;
  position: relative;
  z-index: 1;
}

/* Breadcrumb */
.cs-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 28px;
}
.cs-breadcrumb a {
  color: var(--accent);
  transition: opacity .2s;
}
.cs-breadcrumb a:hover { opacity: .7; }
.cs-breadcrumb-sep { opacity: .4; }

/* Tags */
.cs-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 22px;
}
.cs-tag {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.2);
  border-radius: 100px;
  padding: 4px 14px;
}

/* Hero title */
.cs-hero-title {
  font-family: "Syne", sans-serif;
  font-size: clamp(1.9rem, 4.5vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  letter-spacing: -.03em;
  margin-bottom: 40px;
  max-width: 800px;
}

/* Meta row */
.cs-meta-row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 0;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
}
.cs-meta-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 28px;
}
.cs-meta-label {
  font-family: "Manrope", sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cs-meta-value {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.cs-meta-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
  align-self: stretch;
}
@media (max-width: 600px) {
  .cs-meta-row { width: 100%; }
  .cs-meta-item { flex: 1 1 calc(50% - 1px); }
  .cs-meta-divider:nth-of-type(2) { display: none; }
}

/* ── Hero image ───────────────────────────── */
.cs-hero-img-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}
.cs-hero-img {
  width: 100%;
  border-radius: 16px 16px 0 0;
  border: 1px solid var(--border);
  border-bottom: none;
  display: block;
}

/* Placeholder fallback */
.img-placeholder {
  min-height: 340px;
  background: var(--bg2);
  border: 2px dashed rgba(168,85,247,.25);
  border-radius: 12px;
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cs-hero-placeholder-label,
.cs-img-placeholder-label { display: none; }
.img-placeholder .cs-hero-placeholder-label,
.img-placeholder .cs-img-placeholder-label {
  display: flex !important;
  align-items: center;
  justify-content: center;
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  opacity: .6;
  position: absolute;
  inset: 0;
}

/* ── Full-width image ─────────────────────── */
.cs-full-img-wrap {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 64px 24px;
  position: relative;
}
.cs-full-img-wrap img {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--border);
  display: block;
}
.cs-img-caption {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  margin-top: 14px;
  font-style: italic;
}

/* Image pair */
.cs-img-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 64px 0;
}
@media (max-width: 700px) { .cs-img-pair { grid-template-columns: 1fr; } }
.cs-img-item img {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--border);
  display: block;
}
.cs-img-wide { grid-column: 1 / -1; }

/* ── Prose ─────────────────────────────────── */
.cs-prose p {
  font-family: "Manrope", sans-serif;
  font-size: 17px;
  color: #8e8eaa;
  line-height: 1.85;
  margin-bottom: 22px;
}
.cs-prose p:last-child { margin-bottom: 0; }

.cs-highlight-box {
  display: flex;
  gap: 16px;
  background: rgba(168,85,247,.07);
  border: 1px solid rgba(168,85,247,.18);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 22px 24px;
  margin-top: 32px;
}
.cs-highlight-icon { font-size: 22px; flex-shrink: 0; line-height: 1.55; }
.cs-highlight-box p {
  font-family: "Manrope", sans-serif;
  font-size: 15.5px !important;
  font-weight: 600;
  color: #c8c8e8 !important;
  line-height: 1.7;
  margin: 0 !important;
}

.cs-sub-heading {
  font-family: "Syne", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin: 36px 0 14px;
}

.cs-findings-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.cs-findings-list li {
  display: flex;
  gap: 12px;
  font-family: "Manrope", sans-serif;
  font-size: 16px;
  color: #8888a8;
  line-height: 1.7;
}
.cs-findings-list li::before {
  content: '→';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ── Stat row ──────────────────────────────── */
.cs-stat-row {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  margin: 32px 0;
  padding: 28px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.cs-inline-stat { display: flex; flex-direction: column; gap: 4px; }
.cs-inline-num {
  font-family: "Syne", sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.cs-inline-label {
  font-family: "Manrope", sans-serif;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

/* ── Problem grid ──────────────────────────── */
.cs-problem-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 48px;
}
@media (max-width: 640px) { .cs-problem-grid { grid-template-columns: 1fr; } }

.cs-problem-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px 24px;
  position: relative;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.cs-problem-card::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168,85,247,.4), transparent);
  border-radius: 1px;
}
.cs-problem-card:hover {
  border-color: rgba(168,85,247,.28);
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}
.cs-problem-num {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.cs-problem-card h3 {
  font-family: "Syne", sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}
.cs-problem-card p {
  font-family: "Manrope", sans-serif;
  font-size: 14.5px;
  color: #7070a0;
  line-height: 1.72;
  margin: 0;
}

/* ── System grid ───────────────────────────── */
.cs-system-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .cs-system-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .cs-system-grid { grid-template-columns: 1fr; } }

.cs-system-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 26px 22px;
  transition: border-color .3s, transform .3s;
}
.cs-system-card:hover {
  border-color: rgba(168,85,247,.28);
  transform: translateY(-3px);
}
.cs-system-icon { font-size: 26px; margin-bottom: 14px; display: block; }
.cs-system-card h3 {
  font-family: "Syne", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
}
.cs-system-card p {
  font-family: "Manrope", sans-serif;
  font-size: 14px;
  color: #7070a0;
  line-height: 1.7;
  margin: 0;
}

/* ── Process / Design Decision steps ──────── */
.cs-process-steps {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border);
  padding-left: 32px;
  margin-left: 4px;
}
.cs-step {
  position: relative;
  padding: 0 0 40px 0;
  cursor: default;
}
.cs-step:last-child { padding-bottom: 0; }
.cs-step::before {
  content: '';
  position: absolute;
  left: -40px;
  top: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
  transition: background .25s, box-shadow .25s;
}
.cs-step:hover::before {
  background: var(--accent);
  box-shadow: 0 0 12px rgba(168,85,247,.5);
}
.cs-step-num {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.cs-step-content h3 {
  font-family: "Syne", sans-serif;
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  line-height: 1.3;
}
.cs-step-content p {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  color: #7e7ea0;
  line-height: 1.78;
  margin: 0;
}

/* ── Outcomes grid ──────────────────────────── */
.cs-outcomes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 900px) { .cs-outcomes-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .cs-outcomes-grid { grid-template-columns: 1fr; } }

.cs-outcome-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 30px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .3s, transform .3s, box-shadow .3s;
}
.cs-outcome-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--pink));
}
.cs-outcome-card:hover {
  border-color: rgba(168,85,247,.3);
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0,0,0,.4);
}
.cs-outcome-num {
  font-family: "Syne", sans-serif;
  font-size: 2.4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff 30%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.05;
  margin-bottom: 8px;
  display: block;
}
.cs-outcome-label {
  font-family: "Manrope", sans-serif;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  display: block;
  letter-spacing: .01em;
}
.cs-outcome-card p {
  font-family: "Manrope", sans-serif;
  font-size: 13.5px;
  color: #7070a0;
  line-height: 1.68;
  margin: 0;
}

/* ── Screen cards (feature showcase) ────── */
.dc-screens-grid {
  display: flex;
  flex-direction: column;
  gap: 40px;
}
.dc-screen-card {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 40px;
  align-items: center;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .3s, box-shadow .3s;
}
.dc-screen-card:hover {
  border-color: rgba(168,85,247,.25);
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.dc-screen-card:nth-child(even) {
  grid-template-columns: 360px 1fr;
}
.dc-screen-card:nth-child(even) img { order: -1; }
.dc-screen-card img {
  width: 100%;
  display: block;
  border-radius: 0;
  height: 260px;
  object-fit: cover;
  object-position: top;
}
.dc-screen-info {
  padding: 0 36px 0 0;
}
.dc-screen-card:nth-child(even) .dc-screen-info {
  padding: 0 0 0 36px;
}
.dc-screen-info h3 {
  font-family: "Syne", sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  line-height: 1.3;
}
.dc-screen-info p {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  color: #8080a4;
  line-height: 1.78;
  margin: 0;
}
@media (max-width: 768px) {
  .dc-screen-card,
  .dc-screen-card:nth-child(even) { grid-template-columns: 1fr; }
  .dc-screen-card img { height: 200px; order: 0 !important; }
  .dc-screen-info,
  .dc-screen-card:nth-child(even) .dc-screen-info { padding: 24px 24px; }
}

/* Loading row (hero sub-layout) */
.dc-loading-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 48px;
}
@media (max-width: 768px) { .dc-loading-row { grid-template-columns: 1fr; } }
.dc-loading-img img { width: 100%; border-radius: 12px; border: 1px solid var(--border); display: block; }
.dc-loading-note h4 {
  font-family: "Syne", sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.dc-loading-note p {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  color: #8080a4;
  line-height: 1.78;
  margin: 0;
}

/* ── Next project CTA ──────────────────────── */
.cs-next {
  padding: 96px 24px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cs-next::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 60% 80% at 50% 100%, rgba(124,58,237,.1) 0%, transparent 70%);
  pointer-events: none;
}
.cs-next-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}
.cs-next-label {
  font-family: "Manrope", sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
  display: block;
}
.cs-next-link {
  display: flex;
  align-items: center;
  gap: 16px;
  font-family: "Syne", sans-serif;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -.03em;
  line-height: 1;
  margin-bottom: 18px;
  transition: color .25s;
}
.cs-next-link:hover { color: var(--accent); }
.cs-next-arr {
  display: inline-block;
  transition: transform .3s;
}
.cs-next-link:hover .cs-next-arr { transform: translate(6px, -4px); }
.cs-next-sub {
  font-family: "Manrope", sans-serif;
  font-size: 15px;
  color: var(--muted);
}
