/* ---- case-study-specific ---- */
.cs-hero {
  padding: 150px var(--pad) 0;
}
.cs-kicker {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 40px;
}
.cs-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(64px, 12vw, 190px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
.cs-sub {
  font-size: clamp(18px, 1.9vw, 24px);
  color: var(--ink-2);
  max-width: 640px;
  margin-top: 20px;
  text-wrap: pretty;
}
.cs-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: clamp(64px, 10vh, 112px);
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.cs-meta dt {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 6px;
}
.cs-meta dd { font-size: 14.5px; font-weight: 500; }
.cs-hero-media {
  margin-top: 120px;
  background: var(--accent-soft);
  border-radius: 4px;
  overflow: hidden;
  padding: clamp(28px, 5vw, 80px) clamp(28px, 7vw, 120px) 0;
}
.cs-hero-media .mock { border-radius: 10px 10px 0 0; }

.cs-body {
  max-width: 1100px;
  margin: 0 auto;
}
.cs-section { padding: clamp(72px, 11vh, 140px) var(--pad) 0; }
.cs-label-row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: clamp(24px, 4vw, 64px);
}
.cs-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding-top: 8px;
}
.cs-label em { font-style: normal; color: var(--accent); margin-right: 8px; }
.cs-prose h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(28px, 3.4vw, 48px);
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin-bottom: 22px;
}
.cs-prose p {
  font-size: clamp(16.5px, 1.5vw, 19px);
  color: var(--ink-2);
  margin-bottom: 18px;
  max-width: 640px;
  text-wrap: pretty;
}
.cs-prose p strong { color: var(--ink); font-weight: 600; }

.problem-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 36px;
}
.problem-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 24px;
  background: var(--surface);
  transition: transform 0.4s var(--ease-out), border-color 0.3s ease;
}
.problem-card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.problem-card .pc-num {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  color: var(--accent);
  display: block;
  margin-bottom: 32px;
}
.problem-card h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; letter-spacing: -0.01em; }
.problem-card p { font-size: 14px; color: var(--ink-2); margin: 0; }

.artifact-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.artifact {
  border-radius: 4px;
  padding: 22px 22px 52px;
  aspect-ratio: 4 / 3;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
}
.artifact .a-label {
  position: absolute;
  bottom: 14px; left: 18px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* full-bleed landscape carousel (desktop screenshots) */
.cs-carousel-wrap {
  width: 100%;
  overflow: hidden;
  padding: 40px 0;
  margin-top: clamp(40px, 6vh, 72px);
}
.cs-carousel-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
  pointer-events: none;
  right: 0;
  background: none;
}
.cs-carousel-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marquee 55s linear infinite;
}
.cs-carousel-wrap:hover .cs-carousel-track { animation-play-state: paused; }
.cs-carousel-item {
  flex: none;
  width: 680px;
  height: 420px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.cs-carousel-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.metric-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 40px;
}
.metric { padding: 28px 28px 0 0; }
.metric + .metric { padding-left: 28px; border-left: 1px solid var(--line); }
.metric .num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 6vw, 84px);
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--accent);
}
.metric .lbl {
  font-size: 13px;
  color: var(--ink-2);
  margin-top: 12px;
  max-width: 220px;
}

.cs-quote {
  margin-top: clamp(64px, 10vh, 120px);
  padding: 0 var(--pad);
  text-align: center;
}
.cs-quote blockquote {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(24px, 3.2vw, 44px);
  letter-spacing: -0.015em;
  line-height: 1.2;
  max-width: 880px;
  margin: 0 auto;
  text-wrap: balance;
}
.cs-quote cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-top: 24px;
}

.next-project {
  margin-top: clamp(80px, 13vh, 160px);
  border-top: 1px solid var(--line);
  padding: clamp(48px, 8vh, 90px) var(--pad);
  display: block;
  text-align: center;
}
.next-project .np-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-bottom: 18px;
}
.next-project .np-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 10vw, 150px);
  letter-spacing: -0.025em;
  line-height: 1;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--ink);
  transition: color 0.45s ease;
  display: inline-block;
}
.next-project:hover .np-title { color: var(--ink); }

@media (max-width: 920px) {
  .cs-meta { grid-template-columns: repeat(2, 1fr); }
  .cs-label-row { grid-template-columns: 1fr; gap: 16px; }
  .problem-grid, .artifact-strip { grid-template-columns: 1fr; }
  .artifact { aspect-ratio: auto; min-height: 180px; }
  .metric-row { grid-template-columns: 1fr; }
  .metric + .metric { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Forward Air hero — light with truck bg */
.cs-hero {
  background:
    linear-gradient(to bottom, transparent 0%, transparent 55%, var(--bg) 82%),
    url('/assets/fwdair-hero-bg.png') top center / 100% auto no-repeat #FAFAF6;
  color: var(--ink);
}
.cs-hero .eyebrow { color: var(--ink-3); }
.cs-hero .eyebrow::before { background: #4A7FCC; }
.cs-hero .hero-index { color: var(--ink-3); }
.cs-hero .cs-title { color: var(--ink); }
.cs-hero .cs-sub { color: var(--ink-2); }
.cs-hero .cs-meta { border-top-color: rgba(0, 0, 0, 0.15); }
.cs-hero .cs-meta dt { color: var(--ink-3); }
.cs-hero .cs-meta dd { color: var(--ink); }

/* Nav — dark text for light hero */
.nav.scrolled {
  background: rgba(255, 255, 255, 0.40) !important;
  border-bottom-color: rgba(0,0,0,0.08) !important;
}
.nav-links .u-link { color: var(--ink-2) !important; }
.nav-links .u-link:hover { color: var(--ink) !important; }
.nav-cta { color: var(--ink) !important; border-color: var(--line-strong) !important; }
.nav-cta:hover { background: var(--ink) !important; color: #fff !important; border-color: var(--ink) !important; }
.theme-toggle { color: var(--ink-2) !important; }
.theme-toggle:hover { color: var(--ink) !important; background: rgba(0,0,0,0.05) !important; }

.cs-hero .cs-hero-media {
  background: transparent;
  padding: 0;
  width: 80%;
  margin-left: auto;
  margin-right: auto;
}
.cs-hero .cs-hero-media .mock {
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.cs-hero .cs-hero-media .mock img {
  display: block;
  width: 100%;
  height: auto;
  margin: 0;
  vertical-align: top;
}
/* ---- MacBook mockup + carousel ---- */
.mb-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 2vw, 28px);
  max-width: 1240px;
  margin: clamp(40px, 6vh, 72px) auto 0;
  padding: 0 var(--pad);
  position: relative;
  padding-bottom: 36px;
}
.macbook { flex: 1 1 auto; min-width: 0; max-width: 1080px; }
.mb-arrow {
  flex: none;
  width: 48px; height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.16);
  background: rgba(0,0,0,0.04);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #333;
  transition: background .2s, transform .12s, border-color .2s;
  -webkit-tap-highlight-color: transparent;
}
[data-theme="dark"] .mb-arrow {
  border-color: rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.05);
  color: #e9e9ee;
}
.mb-arrow:hover { background: rgba(0,0,0,0.09); border-color: rgba(0,0,0,0.28); }
[data-theme="dark"] .mb-arrow:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.32); }
.mb-arrow:active { transform: scale(0.92); }
.mb-dots {
  position: absolute;
  left: 0; right: 0; bottom: -28px;
  display: flex; justify-content: center; gap: 8px;
}
.mb-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: rgba(0,0,0,0.18);
  border: 0; padding: 0; cursor: pointer;
  transition: background .2s, width .2s;
}
[data-theme="dark"] .mb-dot { background: rgba(255,255,255,0.22); }
.mb-dot.is-active { background: #333; width: 20px; border-radius: 4px; }
[data-theme="dark"] .mb-dot.is-active { background: #e9e9ee; }
.mb-screen {
  position: relative;
  background: linear-gradient(180deg, #4a4a4e 0%, #2c2c30 6%, #2c2c30 94%, #1c1c1f 100%);
  border-radius: 22px 22px 6px 6px;
  padding: 14px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.10) inset, 0 22px 50px -18px rgba(0,0,0,0.6);
}
.mb-bezel {
  position: relative;
  background: #060607;
  border-radius: 8px;
  padding: 12px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.6) inset;
}
.mb-notch {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 150px; height: 12px;
  background: #060607;
  border-radius: 0 0 8px 8px;
  z-index: 2;
}
.mb-display {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  border-radius: 2px;
  overflow: hidden;
  background: #000;
}
.mb-track {
  display: flex;
  width: 100%; height: 100%;
  transition: transform .55s cubic-bezier(.55,.06,.18,1);
  will-change: transform;
}
.mb-slide { flex: 0 0 100%; width: 100%; height: 100%; }
.mb-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mb-base {
  position: relative;
  width: 106%;
  margin: 0 auto;
  margin-left: -3%;
  height: 16px;
  background: linear-gradient(180deg, #d9dadd 0%, #b6b8bd 30%, #8d9095 70%, #6f7176 100%);
  border-radius: 0 0 11px 11px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 14px 22px -12px rgba(0,0,0,0.5);
}
.mb-notch-cut {
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 130px; height: 8px;
  background: linear-gradient(180deg, #5b5d61, #75777c);
  border-radius: 0 0 9px 9px;
}
