/* ── Legacy case study styles ──
   Mirrors src/index.css, src/components/Nav.css and src/pages/CaseStudy.css
   so archived work matches the current site. Self-contained: no Bootstrap. */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --white: #ffffff;
  --black: #0a0a0a;
  --gray-100: #efefef;
  /* 4.61:1 on white. #b8b8b8 was 1.98:1 and failed WCAG AA. */
  --gray-300: #757575;
  --gray-500: #616161;

  font-family: 'Barlow', system-ui, sans-serif;
  font-size: 16px;
  color: var(--black);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100vh;
  background: var(--white);
}

/* ── Page transition ── */
@keyframes page-enter {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: translateY(0);    filter: blur(0px); }
}

.page-transition {
  animation: page-enter 0.6s ease forwards;
}

/* ── Nav ── */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 36px 64px;
}

.nav-name {
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--black);
  text-decoration: none;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 40px;
}

.nav-links a {
  font-family: 'Barlow', sans-serif;
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--black);
}

/* ── Case study shell ── */
.case-study {
  max-width: 1000px;
  margin: 0 auto;
  padding: 64px 64px 120px;
}

/* ── Back link ── */
.case-study-back {
  display: inline-block;
  font-family: 'Barlow', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-300);
  text-decoration: none;
  margin-bottom: 48px;
  transition: color 0.2s;
}

.case-study-back:hover {
  color: var(--black);
}

/* ── Header ── */
.case-study-header {
  margin-bottom: 80px;
}

.case-study-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  color: var(--black);
  margin-bottom: 16px;
}

.case-study-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  font-family: 'Barlow', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-300);
  margin-top: 16px;
}

/* ── Hero ── */
.case-study-hero {
  margin-bottom: 80px;
}

.case-study-hero img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

/* ── Body sections ── */
.case-study-body {
  display: flex;
  flex-direction: column;
  gap: 64px;
}

.cs-section {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 40px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-100);
}

.cs-label {
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-300);
  padding-top: 4px;
}

.cs-body {
  font-family: 'Barlow', sans-serif;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--gray-500);
}

.cs-body + .cs-body {
  margin-top: 20px;
}

/* Lead paragraph, matching the React case studies: the first paragraph of the
   first section is larger and darker, so a skimmer still gets the premise. */
.case-study-body > .cs-section:first-child .cs-body:first-of-type {
  font-size: 1.35rem;
  line-height: 1.55;
  color: var(--black);
}

/* ── Deliverables list ── */
.cs-list {
  list-style: none;
  margin-top: 32px;
  counter-reset: cs-counter;
}

.cs-list-item {
  counter-increment: cs-counter;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 16px;
  align-items: baseline;
  padding: 10px 0;
  font-family: 'Barlow', sans-serif;
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--black);
}

.cs-list-item::before {
  content: counter(cs-counter, decimal-leading-zero);
  font-family: 'Barlow', sans-serif;
  font-size: 0.75rem;
  color: var(--gray-300);
  letter-spacing: 0.04em;
  padding-top: 4px;
}

/* ── Section visuals ── */
.cs-visual {
  margin-top: 40px;
}

.cs-visual img {
  width: 100%;
  display: block;
  border-radius: 2px;
}

/* ── Prev / next pager ── */
.cs-pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--gray-100);
}

.cs-pager-slot--next {
  text-align: right;
}

.cs-pager-link {
  display: inline-flex;
  flex-direction: column;
  gap: 10px;
  max-width: 100%;
  text-decoration: none;
}

.cs-pager-label {
  font-family: 'Barlow', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gray-300);
  transition: color 0.2s;
}

.cs-pager-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.6rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--black);
  transition: color 0.2s;
}

.cs-pager-link:hover .cs-pager-label {
  color: var(--black);
}

.cs-pager-link:hover .cs-pager-title {
  color: var(--gray-500);
}

/* ── Footer ── */
.case-study-footer {
  padding: 48px 64px;
  border-top: 1px solid var(--gray-100);
  display: flex;
  justify-content: flex-end;
}

.case-study-footer a {
  font-family: 'Barlow', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gray-300);
  text-decoration: none;
  transition: color 0.2s;
}

.case-study-footer a:hover {
  color: var(--black);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav {
    padding: 28px 32px;
  }

  .nav-links {
    gap: 24px;
  }

  .case-study {
    padding: 48px 32px 80px;
  }

  .cs-section {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .case-study-footer {
    padding: 40px 32px;
  }

  .cs-pager {
    grid-template-columns: 1fr;
    gap: 32px;
    margin-top: 64px;
  }

  .cs-pager-slot--next {
    text-align: left;
  }
}
