/* ═══════════════════════════════════════
   CASE STUDY PAGE — shared styles
   Builds on top of styles.css
═══════════════════════════════════════ */

/* ─── Nav on dark hero ─── */
.nav--on-dark:not(.nav--scrolled) .nav__logo,
.nav--on-dark:not(.nav--scrolled) .nav__links a {
  color: rgba(255,255,255,.8);
}
.nav--on-dark:not(.nav--scrolled) .nav__links a:hover {
  color: #fff;
  background: rgba(255,255,255,.08);
}
.nav--on-dark:not(.nav--scrolled) .btn-pill-arrow--nav {
  border-color: rgba(255,255,255,.25);
  color: rgba(255,255,255,.85);
}
.nav--on-dark:not(.nav--scrolled) .btn-pill-arrow__label {
  color: rgba(255,255,255,.85);
}
.nav--on-dark:not(.nav--scrolled) .btn-pill-arrow__circle {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* ─── Back link ─── */
.cs-back {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.6);
  transition: color .2s;
  margin-bottom: 2.5rem;
}

.cs-back:hover { color: #fff; }

/* ─── Hero ─── */
.cs-hero {
  background: #111;
  background-image: radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 22px 22px;
  padding: 6rem 3rem 4rem;
  position: relative;
  overflow: hidden;
}

.cs-hero__inner {
  max-width: 1160px;
  margin: 0 auto;
}

.cs-hero__eyebrow {
  display: flex;
  align-items: center;
  gap: .8rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.cs-hero__num {
  font-size: .8rem;
  font-weight: 700;
  color: rgba(255,255,255,.35);
  letter-spacing: .1em;
}

.cs-hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.08;
  margin-bottom: 1rem;
  letter-spacing: -.02em;
}

.cs-hero__subtitle {
  font-size: 1.1rem;
  color: rgba(255,255,255,.55);
  margin-bottom: 2rem;
  max-width: 640px;
  line-height: 1.6;
}

.cs-hero__meta {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
}

.cs-hero__meta-item {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.cs-hero__meta-label {
  font-size: .7rem;
  font-weight: 600;
  color: rgba(255,255,255,.35);
  letter-spacing: .1em;
  text-transform: uppercase;
}

.cs-hero__meta-value {
  font-size: .9rem;
  font-weight: 600;
  color: rgba(255,255,255,.85);
}

.cs-hero__tags {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.cs-hero__tags .tag {
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.7);
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .78rem;
  font-weight: 500;
}

/* Live badge */
.cs-hero__live-badge {
  background: rgba(200,255,180,.08);
  color: #c8e549;
  border-radius: 999px;
  padding: .3rem .85rem;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .06em;
}

/* ─── Split hero layout ─── */
.cs-hero--split {
  padding-bottom: 0;
  overflow: visible;
}

.cs-hero--split .cs-hero__inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 2rem;
  align-items: center;
  padding-bottom: 4rem;
}

.cs-hero__content {
  display: flex;
  flex-direction: column;
}

.cs-hero__visual {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 100%;
  min-height: 400px;
}

.cs-hero__phone {
  width: 100%;
  max-width: 380px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 40px 80px rgba(0,0,0,.6));
  mix-blend-mode: screen;
}

/* Meta strip — full-bleed bottom bar */
.cs-hero__meta-strip {
  border-top: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.04);
  margin-left: -3rem;
  margin-right: -3rem;
}

.cs-hero__meta-strip-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 1.5rem 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  flex-wrap: wrap;
}

/* Store badges in meta strip */
.cs-hero__meta-stores {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
}

.cs-store-badge-link img {
  display: block;
  height: 34px;
  width: auto;
  opacity: .85;
  transition: opacity .2s;
}

.cs-store-badge-link:hover img { opacity: 1; }

.cs-hero__meta-strip .cs-hero__meta-item {
  flex: 1;
  min-width: 120px;
}

.cs-hero__meta-strip .cs-hero__meta-value a {
  color: rgba(255,255,255,.85);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cs-hero__meta-divider {
  width: 1px;
  height: 2rem;
  background: rgba(255,255,255,.12);
  margin: 0 1.5rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .cs-hero--split .cs-hero__inner {
    grid-template-columns: 1fr;
  }
  .cs-hero__visual { display: none; }
  .cs-hero__meta-divider { display: none; }
  .cs-hero__meta-strip-inner { gap: 1.25rem; }
  .cs-hero__meta-strip .cs-hero__meta-item { flex: 0 0 auto; }
}

/* ─── Cover image ─── */
.cs-cover {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
}

/* ─── Body layout ─── */
.cs-body {
  max-width: 920px;
  margin: 0 auto;
  padding: 3.5rem 2rem 5rem;
}

.cs-section {
  margin-bottom: 2.75rem;
}

.cs-section__label {
  font-size: .72rem;
  font-weight: 700;
  color: #aaa;
  letter-spacing: .12em;
  text-transform: uppercase;
  margin-bottom: .8rem;
}

.cs-section__heading {
  font-size: 1.6rem;
  font-weight: 800;
  color: #111;
  margin-bottom: 1.2rem;
  letter-spacing: -.02em;
}

.cs-section__body {
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
}

.cs-section__body p + p {
  margin-top: .75rem;
}

/* ─── Sub-sections (How I approached it) ─── */
.cs-sub {
  margin-top: 3rem;
}

.cs-sub__heading {
  font-size: 1.15rem;
  font-weight: 700;
  color: #111;
  margin-bottom: .8rem;
}

.cs-sub__body {
  font-size: .95rem;
  color: #444;
  line-height: 1.8;
}

.cs-sub__body p + p { margin-top: .8rem; }

/* ─── Screenshot placeholder ─── */
.cs-screenshot {
  background: #f0efeb;
  border: 1px solid #e0ddd8;
  border-radius: 12px;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 1.5rem 0;
  color: #aaa;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  font-style: italic;
}

/* ─── Metrics callout ─── */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.cs-metric {
  background: #f0efeb;
  border-radius: 14px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}

.cs-metric__value {
  font-size: 1.8rem;
  font-weight: 800;
  color: #111;
  line-height: 1;
}

.cs-metric__label {
  font-size: .78rem;
  color: #666;
  line-height: 1.4;
}

/* ─── Blockquote ─── */
.cs-quote {
  border-left: 3px solid #c8e549;
  padding: 1.2rem 1.5rem;
  margin: 2rem 0;
  background: #f9f9f7;
  border-radius: 0 10px 10px 0;
}

.cs-quote p {
  font-size: 1rem;
  font-style: italic;
  color: #333;
  line-height: 1.75;
}

/* ─── Testimonial block ─── */
.cs-testimonial {
  background: #111;
  border-radius: 20px;
  padding: 2.5rem;
  margin: 3rem 0;
}

.cs-testimonial__quote {
  font-size: 1.05rem;
  color: rgba(255,255,255,.85);
  font-style: italic;
  line-height: 1.75;
  margin-bottom: 1.5rem;
}

.cs-testimonial__author {
  display: flex;
  align-items: center;
  gap: .8rem;
}

.cs-testimonial__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: rgba(255,255,255,.75);
}

.cs-testimonial__author strong {
  display: block;
  color: #fff;
  font-size: .9rem;
}

.cs-testimonial__author span {
  font-size: .78rem;
  color: rgba(255,255,255,.45);
}

/* ─── Horizontal rule ─── */
.cs-divider {
  border: none;
  border-top: 1px solid #e8e6e1;
  margin: 3rem 0;
}

/* ─── Status badge in body ─── */
.cs-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  font-weight: 600;
  padding: .35rem .9rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.cs-status--live     { background: #d4edda; color: #155724; }
.cs-status--progress { background: #d1e4f5; color: #0c3a5e; }
.cs-status--done     { background: #e8e8e8; color: #444; }

/* ─── Footer nav ─── */
.cs-footer-nav {
  background: #f0efeb;
  padding: 3rem;
}

.cs-footer-nav__inner {
  max-width: 1160px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.cs-footer-nav__back {
  font-size: .9rem;
  font-weight: 600;
  color: #555;
  transition: color .2s;
}

.cs-footer-nav__back:hover { color: #111; }

.cs-footer-nav__next {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .2rem;
}

.cs-footer-nav__next-label {
  font-size: .72rem;
  color: #aaa;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.cs-footer-nav__next-title {
  font-size: 1rem;
  font-weight: 700;
  color: #111;
  transition: color .2s;
}

.cs-footer-nav__next-title:hover { color: #555; }

/* ─── Lightbox ─── */
.lb-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10,10,10,.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lb-overlay.lb-open {
  opacity: 1;
  pointer-events: all;
}
.lb-img {
  max-width: 100%;
  max-height: calc(100vh - 8rem);
  border-radius: 10px;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  object-fit: contain;
  transform: scale(.96);
  transition: opacity .14s ease, transform .14s ease;
}
.lb-overlay.lb-open .lb-img {
  transform: scale(1);
}
.lb-caption {
  margin-top: 1rem;
  font-size: .8rem;
  color: rgba(255,255,255,.45);
  font-weight: 500;
  letter-spacing: .04em;
  text-align: center;
  max-width: 640px;
}
.lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.7);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
}
.lb-close:hover {
  background: rgba(255,255,255,.2);
  color: #fff;
}
/* Prev / Next nav buttons */
.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.15);
  color: rgba(255,255,255,.8);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s, transform .15s;
  z-index: 10;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.lb-prev { left: 1.25rem; }
.lb-next { right: 1.25rem; }
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255,255,255,.22);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
}
.lb-prev[disabled],
.lb-next[disabled] {
  opacity: 0;
  pointer-events: none;
}
/* Tighter padding so image doesn't hide behind buttons on small screens */
@media (max-width: 600px) {
  .lb-prev { left: .5rem; }
  .lb-next { right: .5rem; }
  .lb-img  { max-width: calc(100% - 6rem); }
}
.cs-gallery__img {
  cursor: zoom-in;
}

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .cs-hero { padding: 5rem 1.5rem 2.5rem; }
  .cs-body  { padding: 3rem 1.5rem 4rem; }
  .cs-hero__meta { gap: 1.5rem; }
  .cs-metrics { grid-template-columns: repeat(2, 1fr); }
  .cs-footer-nav { padding: 2rem 1.5rem; }
  .cs-cover { height: 240px; }
}
