/* ────────────────────────────────────────────────────────────
   UPA ESTUDIO — Case Study Detail Pages
   Inherits variables from styles.css
   ──────────────────────────────────────────────────────────── */

/* ─────────── BACK LINK ─────────── */
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--mute);
  transition: color .25s ease, gap .3s ease;
}
.cs-back:hover { color: var(--ink); gap: 6px; }

/* ─────────── HERO ─────────── */
.cs-hero {
  padding-top: clamp(48px, 7vw, 100px);
}
.cs-hero-inner {
  padding-bottom: clamp(40px, 5vw, 64px);
}
.cs-hero-eyebrow {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: clamp(36px, 5.5vw, 64px);
}
.cs-hero-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-hero-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(60px, 14vw, 210px);
  line-height: .86;
  letter-spacing: -.05em;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  margin-bottom: 18px;
}
.cs-hero-sub {
  font-family: var(--display);
  font-size: clamp(17px, 1.5vw, 22px);
  font-style: italic;
  color: var(--mute);
  font-variation-settings: "opsz" 144, "SOFT" 80;
}
/* Hero art panel — full-width, tall */
.cs-hero-art {
  width: 100%;
  height: clamp(300px, 42vw, 600px);
  position: relative;
  overflow: hidden;
}
/* Reuse per-project art-* classes from styles.css */

/* ─────────── OVERVIEW BAR ─────────── */
.cs-overview {
  background: var(--paper-2);
  border-top: 1px solid rgba(15,15,14,.16);
  border-bottom: 1px solid rgba(15,15,14,.16);
}
.cs-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.cs-overview-item {
  padding: clamp(20px, 3vw, 36px) clamp(16px, 2.5vw, 28px);
  border-right: 1px solid rgba(15,15,14,.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cs-overview-item:last-child { border-right: none; }
.cs-overview-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--mute);
}
.cs-overview-val {
  font-family: var(--display);
  font-size: clamp(15px, 1.3vw, 19px);
  font-weight: 400;
  letter-spacing: -.015em;
  font-variation-settings: "opsz" 72, "SOFT" 20;
}

/* ─────────── SECTION LAYOUT ─────────── */
.cs-section {
  padding: clamp(60px, 9vw, 120px) 0;
  border-bottom: 1px solid rgba(15,15,14,.16);
}
.cs-section--dark {
  background: var(--ink);
  color: var(--paper);
  border-bottom: none;
}
.cs-two-col {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: clamp(32px, 5vw, 80px);
}
.cs-section-label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--vermillion);
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 8px;
}
.cs-section-label::before {
  content: "";
  width: 22px; height: 1px;
  background: var(--vermillion);
  flex-shrink: 0;
}
.cs-lead {
  font-family: var(--display);
  font-size: clamp(22px, 2.6vw, 38px);
  line-height: 1.2;
  letter-spacing: -.025em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  margin-bottom: 24px;
}
.cs-section--dark .cs-lead { color: var(--paper); }
.cs-body {
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.62;
  color: var(--ink-2);
}
.cs-body + .cs-body { margin-top: 14px; }
.cs-section--dark .cs-body { color: rgba(255,255,255,.68); }

/* ─────────── APPROACH STEPS ─────────── */
.cs-steps {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: rgba(255,255,255,.08);
  margin-top: clamp(40px, 6vw, 80px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 4px;
  overflow: hidden;
}
.cs-step {
  background: var(--ink);
  padding: clamp(28px, 4vw, 48px);
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 20px;
  transition: background .3s ease;
}
.cs-step:hover { background: var(--ink-2); }
.cs-step-num {
  font-family: var(--display);
  font-size: clamp(38px, 4.5vw, 64px);
  font-style: italic;
  color: var(--vermillion);
  line-height: 1;
  letter-spacing: -.04em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  padding-top: 2px;
}
.cs-step-body h4 {
  font-family: var(--display);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 400;
  letter-spacing: -.022em;
  margin-bottom: 12px;
  font-variation-settings: "opsz" 72, "SOFT" 20;
}
.cs-step-body p {
  color: rgba(255,255,255,.62);
  font-size: 15px;
  line-height: 1.55;
  max-width: 34ch;
}

/* ─────────── VISUAL IDENTITY ─────────── */
.cs-visual {
  padding: clamp(60px, 9vw, 120px) 0;
  border-bottom: 1px solid rgba(15,15,14,.16);
  overflow: hidden;
}
.cs-visual-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: clamp(32px, 5vw, 56px);
  flex-wrap: wrap;
}
.cs-visual-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 72px);
  line-height: .92;
  letter-spacing: -.035em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 20;
}
.cs-visual-title .it {
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
/* Main large panel */
.cs-visual-main {
  height: clamp(320px, 44vw, 620px);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  margin-bottom: 12px;
}
/* 3-up sub-panels */
.cs-visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.cs-visual-panel {
  height: clamp(180px, 22vw, 320px);
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Photo gallery grid */
.cs-gallery {
  margin-top: clamp(40px, 6vw, 80px);
}
.cs-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: clamp(180px, 22vw, 320px);
  gap: 8px;
}
.cs-gallery-item {
  overflow: hidden;
  border-radius: 4px;
  background: var(--paper-2);
}
.cs-gallery-item--wide { grid-column: span 2; }
.cs-gallery-item--tall { grid-row: span 2; }
.cs-gallery-item--full { grid-column: span 3; grid-row-end: span 1; height: clamp(200px, 28vw, 420px); }
.cs-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .7s cubic-bezier(.2,.7,.2,1);
}
.cs-gallery-item:hover img { transform: scale(1.04); }
@media (max-width: 700px) {
  .cs-gallery-grid { grid-template-columns: 1fr 1fr; }
  .cs-gallery-item--wide { grid-column: span 2; }
  .cs-gallery-item--full { grid-column: span 2; }
}
@media (max-width: 420px) {
  .cs-gallery-grid { grid-template-columns: 1fr; }
  .cs-gallery-item--wide, .cs-gallery-item--full { grid-column: span 1; }
}

/* Color palette strip */
.cs-palette {
  display: flex;
  height: 72px;
  margin-top: clamp(20px, 3vw, 40px);
  border-radius: 4px;
  overflow: hidden;
}
.cs-swatch {
  flex: 1;
  position: relative;
  transition: flex .5s cubic-bezier(.7,0,.2,1);
  cursor: default;
}
.cs-swatch:hover { flex: 2.6; }
.cs-swatch-info {
  position: absolute;
  bottom: 10px; left: 14px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity .3s ease .1s;
  white-space: nowrap;
}
.cs-swatch:hover .cs-swatch-info { opacity: 1; }

/* ─────────── RESULTS ─────────── */
.cs-results {
  padding: clamp(60px, 9vw, 120px) 0;
  border-bottom: 1px solid rgba(15,15,14,.16);
}
.cs-results-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.cs-results-title {
  font-family: var(--display);
  font-size: clamp(32px, 4.5vw, 72px);
  line-height: .92;
  letter-spacing: -.035em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 20;
  max-width: 20ch;
}
.cs-results-title em {
  font-style: italic;
  color: var(--vermillion);
  font-weight: 300;
  font-variation-settings: "opsz" 144, "SOFT" 100;
}
.cs-metrics-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid rgba(15,15,14,.16);
  border-radius: 4px;
  overflow: hidden;
}
.cs-metric-cell {
  padding: clamp(32px, 4.5vw, 60px) clamp(24px, 3.5vw, 48px);
  border-right: 1px solid rgba(15,15,14,.12);
  background: var(--paper-2);
  transition: background .35s ease;
}
.cs-metric-cell:last-child { border-right: none; }
.cs-metric-cell:hover { background: var(--paper-3); }
.cs-metric-big {
  font-family: var(--display);
  font-size: clamp(44px, 7vw, 108px);
  line-height: 1;
  letter-spacing: -.05em;
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  margin-bottom: 10px;
}
.cs-metric-big .accent { color: var(--vermillion); font-style: italic; }
.cs-metric-desc {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--mute);
}
.cs-outcome-text {
  margin-top: clamp(40px, 5.5vw, 72px);
  font-family: var(--display);
  font-size: clamp(22px, 2.8vw, 42px);
  line-height: 1.22;
  letter-spacing: -.025em;
  font-weight: 400;
  max-width: 30ch;
  font-variation-settings: "opsz" 144, "SOFT" 40;
}
.cs-outcome-text em { font-style: italic; color: var(--vermillion); font-weight: 300; }

/* ─────────── TESTIMONIAL ─────────── */
.cs-testimonial {
  padding: clamp(60px, 9vw, 120px) 0;
  background: var(--paper-3);
  border-bottom: 1px solid rgba(15,15,14,.16);
}
.cs-quote-mark {
  font-family: var(--display);
  font-size: 100px;
  line-height: .36;
  color: var(--vermillion);
  margin-bottom: 32px;
  font-style: italic;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  display: block;
}
.cs-quote-text {
  font-family: var(--display);
  font-size: clamp(24px, 3vw, 44px);
  line-height: 1.22;
  letter-spacing: -.022em;
  font-weight: 400;
  max-width: 26ch;
  margin-bottom: 36px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}
.cs-quote-text em { font-style: italic; color: var(--vermillion); font-weight: 300; }
.cs-quote-who { display: flex; align-items: center; gap: 16px; }
.cs-quote-avatar {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--vermillion), var(--ink));
  display: flex; align-items: center; justify-content: center;
  color: var(--paper);
  font-family: var(--display);
  font-style: italic;
  font-size: 20px;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  flex-shrink: 0;
}
.cs-quote-name { font-family: var(--display); font-size: 17px; font-weight: 500; display: block; }
.cs-quote-role {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--mute);
  margin-top: 3px;
  display: block;
}

/* ─────────── NEXT PROJECT ─────────── */
.cs-next {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  position: relative;
}
.cs-next::before {
  content: "NEXT";
  position: absolute;
  right: -.02em; top: .08em;
  font-family: var(--display);
  font-style: italic;
  font-size: 28vw;
  line-height: 1;
  color: rgba(255,255,255,.032);
  letter-spacing: -.08em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  pointer-events: none;
  white-space: nowrap;
}
.cs-next-link {
  display: block;
  padding: clamp(64px, 10vw, 140px) var(--pad-x);
  max-width: var(--max);
  margin: 0 auto;
  position: relative;
  z-index: 2;
}
.cs-next-eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(255,255,255,.36);
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 10px;
}
.cs-next-eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--vermillion); }
.cs-next-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(48px, 10.5vw, 170px);
  line-height: .86;
  letter-spacing: -.05em;
  font-variation-settings: "opsz" 144, "SOFT" 0;
  transition: letter-spacing .5s cubic-bezier(.7,0,.2,1);
}
.cs-next-link:hover .cs-next-title { letter-spacing: -.03em; }
.cs-next-arrow {
  display: inline-block;
  color: var(--vermillion);
  font-style: italic;
  font-size: .75em;
  font-variation-settings: "opsz" 144, "SOFT" 100;
  transition: transform .5s cubic-bezier(.7,0,.2,1);
}
.cs-next-link:hover .cs-next-arrow { transform: translate(18px, -18px); }

/* ─────────── RESPONSIVE ─────────── */
@media (max-width: 900px) {
  .cs-overview-grid { grid-template-columns: repeat(2, 1fr); }
  .cs-overview-item:nth-child(2) { border-right: none; }
  .cs-two-col { grid-template-columns: 1fr; gap: 20px; }
  .cs-steps { grid-template-columns: 1fr; }
  .cs-metrics-row { grid-template-columns: 1fr; }
  .cs-metric-cell { border-right: none; border-bottom: 1px solid rgba(15,15,14,.12); }
  .cs-metric-cell:last-child { border-bottom: none; }
  .cs-visual-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .cs-overview-grid { grid-template-columns: 1fr 1fr; }
  .cs-overview-item:nth-child(even) { border-right: none; }
  .cs-visual-grid { grid-template-columns: 1fr; }
  .cs-palette { height: 56px; }
}
