/* ── CASE STUDY PAGES ── */

/* Nav override for case study pages */
.cs-back {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 0 20px 0 0;
  border-right: 1.5px solid var(--border);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--gray);
  transition: color 0.2s;
  margin-right: 20px;
  flex-shrink: 0;
  position: relative;
}
.cs-back::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 20px;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}
.cs-back:hover { color: var(--black); }
.cs-back:hover::after { transform: scaleX(1); }

/* ── HERO ── */
.cs-hero {
  padding: 48px 40px 0;
  border-bottom: 1.5px solid var(--border);
}
.cs-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray);
  margin-bottom: 24px;
}
.cs-number { color: var(--orange); font-weight: 600; }
.cs-tag {
  border: none;
  box-shadow: inset 0 0 0 1.5px rgba(255,79,26,0.5);
  filter: drop-shadow(0 0 0.5px rgba(255,79,26,0.55));
  padding: 3px 10px 3px 7px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(225deg,transparent 2.83px,rgba(255,79,26,0.45) 2.83px,rgba(255,79,26,0.45) 4.33px,transparent 4.33px) top right/4px 4px no-repeat,rgba(255,79,26,0.04);
  clip-path: polygon(0 0,calc(100% - 4px) 0,100% 4px,100% 100%,0 100%);
}
.cs-tag::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--orange);
  flex-shrink: 0;
  display: inline-block;
}
.cs-title {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 5.5vw, 72px);
  line-height: 0.95;
  letter-spacing: 0.02em;
  color: var(--black);
  margin-bottom: 8px;
}
.cs-subtitle {
  font-size: 16px;
  color: #666;
  margin-bottom: 40px;
  line-height: 1.6;
}
.cs-hero-img {
  width: 100%;
  border-top: 1.5px solid var(--border);
  overflow: hidden;
  position: relative;
}
.cs-hero-img img {
  width: 100%;
  height: auto;
  display: block;
}
.cs-hero-img::before,.cs-hero-img::after {
  content: '';
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--orange);
  border-style: solid;
  z-index: 2;
}
.cs-hero-img::before { top: 16px; left: 16px; border-width:1.5px 0 0 1.5px; }
.cs-hero-img::after  { bottom: 16px; right: 16px; border-width:0 1.5px 1.5px 0; }

/* ── OVERVIEW ── */
.cs-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1.5px solid var(--border);
}
.cs-impact {
  padding: 40px;
  font-size: 17px;
  line-height: 1.65;
  color: var(--black);
  border-right: 1.5px solid var(--border);
  font-family: 'Figtree', sans-serif;
  font-weight: 400;
}
.cs-details {
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.cs-detail {
  display: flex;
  gap: 0;
  font-size: 11px;
}
.cs-detail-key {
  width: 88px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'DM Mono', monospace;
  flex-shrink: 0;
  /* dt inside .cs-detail */
}
/* dt / dd inside .cs-detail wrapper */
.cs-detail dt {
  width: 88px;
  color: var(--gray);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-family: 'DM Mono', monospace;
  font-weight: 400;
  flex-shrink: 0;
}
.cs-detail dd {
  color: var(--black);
  line-height: 1.5;
  margin: 0;
}
.cs-detail-val { color: var(--black); line-height: 1.5; }

/* ── BODY ── */
.cs-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 64px 40px;
}
.cs-section { margin-bottom: 52px; }

.cs-section h2 {
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.cs-section h2::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--orange);
  flex-shrink: 0;
}
.cs-section p {
  font-size: 16px;
  line-height: 1.85;
  color: #444;
}

/* ── PAGINATION — in-flow at bottom of case study ── */
.cs-pagination {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  height: auto;
  padding: 0;
  position: static;
  background: var(--black);
  border-top: 1.5px solid rgba(255,79,26,0.35);
  border-bottom: 1.5px solid rgba(255,79,26,0.35);
}
.cs-pagination a {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 32px 40px;
  text-decoration: none;
  border-right: 1.5px solid var(--border-dk);
  transition: background 0.2s;
  position: relative;
  overflow: hidden;
}
.cs-pagination a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}
.cs-pagination a:last-child::after { transform-origin: right; }
.cs-pagination a:last-child {
  border-right: none;
  align-items: flex-end;
  text-align: right;
}
.cs-pagination a:hover { background: #111; }
.cs-pagination a:hover::after { transform: scaleX(1); }
.cs-pag-dir {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #888;
  transition: color 0.2s;
}
.cs-pagination a:hover .cs-pag-dir { color: var(--orange); }
.cs-pag-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 28px;
  letter-spacing: 0.04em;
  color: #fff;
  line-height: 1;
  transition: color 0.2s;
}
.cs-pagination a:hover .cs-pag-title { color: #fff; }

/* Center — All Work link */
.cs-pagination .cs-pag-center {
  align-items: center;
  text-align: center;
  min-width: 100px;
  border-right: 1.5px solid var(--border-dk);
}
.cs-pagination .cs-pag-center::after { transform-origin: center; }
.cs-pag-center .cs-pag-title {
  font-size: 22px;
  transition: color 0.2s, transform 0.2s;
}
.cs-pag-center:hover .cs-pag-title {
  color: var(--orange);
  letter-spacing: 0.04em;
  transform: translateY(-2px);
}

/* ── BODY ENRICHMENTS ── */
.cs-section h3 {
  font-family: 'Figtree', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  margin: 28px 0 10px;
}
.cs-section ul {
  margin: 12px 0 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cs-section ul li {
  font-size: 16px;
  line-height: 1.75;
  color: #444;
  padding-left: 20px;
  position: relative;
}
.cs-section ul li::before {
  content: '·';
  position: absolute;
  left: 6px;
  color: var(--orange);
  font-size: 18px;
  line-height: 1.4;
}
.cs-section p + p { margin-top: 16px; }

.cs-pullquote {
  border-left: 1.5px solid var(--orange);
  padding: 16px 24px;
  margin: 32px 0;
  background: var(--bg-card);
}
.cs-pullquote p {
  font-family: 'Figtree', sans-serif;
  font-size: 16px;
  font-style: italic;
  line-height: 1.7;
  color: var(--black);
}

/* ── IMAGES ── */
.cs-img {
  margin: 36px 0;
  width: 100%;
}
.cs-img img {
  width: 100%;
  display: block;
  border-radius: 2px;
}
.cs-img-caption {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 10px 0 24px;
  border-bottom: 1.5px solid var(--border);
}
.cs-img-pair {
  margin: 32px 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.cs-img-pair img {
  width: 100%;
  display: block;
  border-radius: 4px;
}
/* ── TESTIMONIAL (clean style) ── */
.cs-testimonial {
  padding: 48px 0 32px;
  margin-top: 16px;
}
.cs-testimonial + .cs-section h2 {
  border-bottom: none;
  padding-bottom: 0;
}
.cs-testimonial blockquote {
  font-family: 'Figtree', sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.75;
  letter-spacing: -0.01em;
  color: var(--black);
  margin: 0 0 28px;
  font-style: italic;
}
.cs-testimonial blockquote::before { content: '\201C'; margin-right: 2px; }
.cs-testimonial blockquote::after  { content: '\201D'; margin-left: 2px; }
.cs-testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cs-testimonial-avatar {
  width: 56px;
  height: 56px;
  background: var(--bg);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gray);
  font-family: 'Rajdhani', sans-serif;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
}
.cs-testimonial-avatar::before,
.cs-testimonial-avatar::after {
  content: '';
  position: absolute;
  width: 10px;
  height: 10px;
  border-color: var(--orange);
  border-style: solid;
  z-index: 2;
}
.cs-testimonial-avatar::before { top: 4px; left: 4px; border-width: 1.5px 0 0 1.5px; }
.cs-testimonial-avatar::after  { bottom: 4px; right: 4px; border-width: 0 1.5px 1.5px 0; }
.cs-testimonial-info {
  border-left: 1.5px solid var(--orange);
  padding-left: 14px;
}
.cs-testimonial-name {
  font-size: 14px;
  font-weight: 500;
  font-family: 'Rajdhani', sans-serif;
  color: var(--black);
  display: block;
  margin-bottom: 2px;
}
.cs-testimonial-role {
  font-size: 14px;
  color: var(--gray);
  font-family: 'Rajdhani', sans-serif;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.cs-testimonial-bar {
  margin-top: 32px;
  height: 1px;
  background: var(--border);
}

/* ── ABOUT PAGE ── */
.about-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-bottom: 1.5px solid var(--border);
}
.about-metric {
  padding: 36px 32px;
  border-right: 1.5px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.about-metric:last-child { border-right: none; }
.about-metric-num {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 56px;
  line-height: 1;
  color: var(--orange);
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.about-metric-lbl {
  font-size: 14px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--black);
  line-height: 1.5;
}
.about-metric-lbl + .about-metric-lbl {
  color: var(--gray);
  margin-top: 2px;
}

.about-principle {
  display: flex;
  align-items: baseline;
  gap: 14px;
  margin: 28px 0 0;
}
.about-principle-num {
  font-family: 'DM Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
  color: var(--orange);
  flex-shrink: 0;
}
.cs-section .about-principle h3 { margin: 0; }

/* ── NDA PAGE ── */
.cs-nda-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 80px 40px;
  text-align: center;
  background: var(--bg-dark);
  border-bottom: 1.5px solid var(--border-dk);
}
.cs-nda-label {
  font-size: 10px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #444;
  margin-bottom: 24px;
  border: 1.5px solid #222;
  padding: 6px 16px;
  display: inline-block;
}
.cs-nda-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(56px, 8vw, 96px);
  line-height: 0.9;
  letter-spacing: 0.04em;
  color: #fff;
  margin-bottom: 8px;
}
.cs-nda-sub {
  font-size: 15px;
  color: #666;
  margin-bottom: 40px;
}
.cs-nda-body {
  max-width: 480px;
  font-size: 16px;
  line-height: 1.8;
  color: #444;
  margin-bottom: 40px;
}
.cs-nda-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--orange);
  color: var(--black);
  text-decoration: none;
  padding: 13px 22px;
  font-family: 'Rajdhani', sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
  transition: background 0.18s ease, filter 0.18s ease;
}
.cs-nda-cta:hover { background: #FF6633; filter: drop-shadow(0 0 12px rgba(255,79,26,0.4)); }
.cs-nda-cta .btn-icon { background: rgba(0,0,0,0.18); }

/* ── EMBEDS (Miro, Figma) ── */
.cs-embed {
  margin: 32px 0;
  width: 100%;
  border: 1.5px solid var(--border);
  border-radius: 4px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.cs-embed iframe {
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}
.cs-embed-caption {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray);
  padding: 12px 0 24px;
}

/* ── READING PROGRESS BAR ── */
.cs-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--orange);
  z-index: 200;
  transition: width 0.08s linear;
  pointer-events: none;
}

/* ── SCROLL REVEAL ── */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  filter: blur(3px);
  transition:
    opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.65s cubic-bezier(0.16, 1, 0.3, 1),
    filter 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
  filter: blur(0);
}
[data-reveal-img] {
  opacity: 0;
  transform: scale(0.97);
  transition:
    opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
[data-reveal-img].is-revealed {
  opacity: 1;
  transform: scale(1);
}

/* stagger siblings */
[data-reveal]:nth-child(2) { transition-delay: 0.08s; }
[data-reveal]:nth-child(3) { transition-delay: 0.16s; }
[data-reveal]:nth-child(4) { transition-delay: 0.24s; }

/* prefers-reduced-motion: skip animations */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-reveal-img] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }
  .cs-progress { display: none; }
}

/* ══════════════════════════════════════════════════
   MOBILE RESPONSIVE — CASE STUDY PAGES
   ══════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* ── Nav: case study back link + nav-links ── */
  .cs-back {
    padding: 0 12px 0 0;
    margin-right: 12px;
    font-size: 10px;
  }

  /* ── Hero ── */
  .cs-hero {
    padding: 32px 20px 0;
  }
  .cs-title {
    font-size: clamp(40px, 10vw, 64px);
  }
  .cs-subtitle {
    margin-bottom: 24px;
  }

  /* ── Overview: stack to single column ── */
  .cs-overview {
    grid-template-columns: 1fr;
  }
  .cs-impact {
    border-right: none;
    border-bottom: 1.5px solid var(--border);
    padding: 28px 20px;
    font-size: 15px;
  }
  .cs-details {
    padding: 28px 20px;
    gap: 16px;
  }

  /* ── Body ── */
  .cs-body {
    padding: 40px 20px;
  }

  /* ── Image pairs: stack to single column ── */
  .cs-img-pair {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  /* ── Pagination: compact 3-column on mobile ── */
  .cs-pagination {
    grid-template-columns: 1fr auto 1fr;
  }
  .cs-pagination a {
    padding: 20px 16px;
    border-right: 1.5px solid var(--border-dk);
    border-bottom: none;
  }
  .cs-pagination a:last-child {
    border-bottom: none;
  }
  .cs-pag-title {
    font-size: 14px;
  }
  .cs-pag-dir {
    font-size: 9px;
  }
  .cs-pagination .cs-pag-center {
    min-width: 56px;
    padding: 20px 12px;
  }
  .cs-pag-center .cs-pag-title {
    font-size: 14px;
  }

  /* ── About metrics: 2 columns ── */
  .about-metrics {
    grid-template-columns: 1fr 1fr;
  }
  .about-metric:nth-child(2n) {
    border-right: none;
  }
  .about-metric:nth-child(-n+2) {
    border-bottom: 1.5px solid var(--border);
  }

  /* ── Testimonial section ── */
  .ts-inner {
    grid-template-columns: 1fr;
  }
  .ts-left {
    border-right: none;
    border-bottom: 1.5px solid var(--border);
    padding: 32px 20px;
  }
  .ts-right {
    padding: 32px 20px;
  }

}

@media (max-width: 480px) {

  .cs-hero {
    padding: 24px 16px 0;
  }
  .cs-body {
    padding: 32px 16px;
  }
  .cs-impact {
    padding: 24px 16px;
  }
  .cs-details {
    padding: 24px 16px;
  }
  .cs-section h2 {
    font-size: 10px;
  }

}
