/* Shared case study styles - minimalist editorial */

:root {
  --bg: #fafaf7;
  --ink: #141414;
  --ink-soft: #4a4a4a;
  --ink-faint: #6b6b6b;
  --line: #e8e6e0;
  --accent: #b54d1a;
  --placeholder: #ece9e2;
  --placeholder-dark: #d8d4cb;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Nav */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  padding: 24px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(250, 250, 247, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
nav.scrolled { border-bottom-color: var(--line); }

nav .logo {
  font-family: 'Fraunces', serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--ink);
}
nav .logo em { font-style: italic; color: var(--accent); }

nav ul { list-style: none; display: flex; gap: 36px; }
nav ul a {
  color: var(--ink);
  text-decoration: none;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  padding: 4px 0;
  transition: color 0.2s;
}
nav ul a:hover { color: var(--accent); }
nav ul a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.3s ease;
}
nav ul a:hover::after { width: 100%; }

/* Case study hero */
.case-hero {
  padding: 160px 40px 100px;
  max-width: 1280px;
  margin: 0 auto;
}

.case-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-decoration: none;
  margin-bottom: 64px;
  transition: color 0.2s;
}
.case-back:hover { color: var(--accent); }
.case-back::before { content: '←'; font-size: 14px; }

.case-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.case-eyebrow::before {
  content: '';
  width: 32px; height: 1px;
  background: var(--ink-faint);
}

.case-hero h1 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(44px, 7vw, 96px);
  line-height: 1;
  letter-spacing: -0.035em;
  margin-bottom: 40px;
  max-width: 16ch;
}
.case-hero h1 em { font-style: italic; font-weight: 400; color: var(--accent); }

.case-lede {
  max-width: 60ch;
  font-size: 21px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 300;
}

.case-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  padding: 48px 0 0;
  margin-top: 72px;
  border-top: 1px solid var(--line);
  max-width: 1280px;
}
.case-meta div .mono { display: block; margin-bottom: 8px; }
.case-meta div .val {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  color: var(--ink);
  line-height: 1.4;
}

/* Hero image placeholder */
.case-hero-image {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
}
.placeholder {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--placeholder);
  overflow: hidden;
}
.placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%),
    repeating-linear-gradient(45deg, var(--placeholder) 0 20px, var(--placeholder-dark) 20px 22px);
  opacity: 0.7;
}
.placeholder .ph-label {
  position: absolute;
  top: 20px; left: 20px;
  z-index: 2;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-faint);
  background: var(--bg);
  padding: 4px 8px;
}
.placeholder .ph-num {
  position: absolute;
  bottom: 20px; right: 24px;
  z-index: 2;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 64px;
  color: var(--ink);
  opacity: 0.15;
  line-height: 1;
}
.placeholder.sq { aspect-ratio: 1 / 1; }
.placeholder.tall { aspect-ratio: 3 / 4; }
.placeholder.wide { aspect-ratio: 16 / 9; }
.placeholder.ultra-wide { aspect-ratio: 21 / 9; }

/* Chapter sections */
.chapter {
  padding: 120px 40px;
  border-top: 1px solid var(--line);
}
.chapter-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 96px;
  align-items: start;
}

.chapter-label {
  position: sticky;
  top: 120px;
}
.chapter-label .mono { display: block; margin-bottom: 12px; }
.chapter-label h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: italic;
  font-size: 22px;
  color: var(--ink-soft);
  line-height: 1.3;
}

.chapter-body h2 {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(28px, 3.5vw, 40px);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 32px;
  max-width: 24ch;
}
.chapter-body h2 em { font-style: italic; color: var(--accent); }

.chapter-body p {
  font-size: 19px;
  line-height: 1.6;
  margin-bottom: 24px;
  color: var(--ink);
  font-weight: 300;
  max-width: 62ch;
}
.chapter-body p:last-child { margin-bottom: 0; }
.chapter-body p em { font-style: italic; color: var(--accent); }

.chapter-body blockquote {
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 300;
  font-size: 26px;
  line-height: 1.4;
  color: var(--ink);
  border-left: 2px solid var(--accent);
  padding-left: 28px;
  margin: 40px 0;
  max-width: 36ch;
}

.chapter-body ul {
  list-style: none;
  margin: 16px 0 24px;
}
.chapter-body ul li {
  font-size: 18px;
  line-height: 1.55;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 16px;
}
.chapter-body ul li::before {
  content: '—';
  color: var(--accent);
  flex-shrink: 0;
}

/* Image galleries */
.gallery {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px 120px;
}
.gallery-grid {
  display: grid;
  gap: 16px;
}
.gallery-grid.g-2 { grid-template-columns: 1fr 1fr; }
.gallery-grid.g-3 { grid-template-columns: 1fr 1fr 1fr; }
.gallery-grid.g-asym { grid-template-columns: 2fr 1fr; }
.gallery-grid.g-asym-rev { grid-template-columns: 1fr 2fr; }

.gallery-full {
  max-width: 1280px;
  margin: 0 auto 16px;
  padding: 0 40px;
}

.caption {
  margin-top: 14px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

/* Outcome / stats */
.outcome-grid {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 0 40px;
}
.outcome-card {
  padding: 40px 32px;
  background: #fff;
  border: 1px solid var(--line);
}
.outcome-card .mono { margin-bottom: 16px; display: block; }
.outcome-card .big {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 56px;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}
.outcome-card .big em { font-style: italic; color: var(--accent); }
.outcome-card p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-soft);
}

/* Next project */
.next-project {
  border-top: 1px solid var(--line);
  padding: 140px 40px;
  text-align: center;
}
.next-project .mono { margin-bottom: 24px; display: block; }
.next-project a {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: clamp(40px, 6vw, 80px);
  letter-spacing: -0.03em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
  position: relative;
  line-height: 1.05;
  transition: color 0.2s;
}
.next-project a em { font-style: italic; color: var(--accent); }
.next-project a::after {
  content: ' →';
  display: inline-block;
  transition: transform 0.3s ease;
}
.next-project a:hover { color: var(--accent); }
.next-project a:hover::after { transform: translateX(8px); }

/* Footer */
footer {
  border-top: 1px solid var(--line);
  padding: 32px 40px;
  display: flex;
  justify-content: space-between;
  max-width: 1280px;
  margin: 0 auto;
}
footer p {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-faint);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.2, 0.9, 0.3, 1), transform 0.9s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 900px) {
  nav, .case-hero, .case-hero-image, .chapter, .gallery, .gallery-full, .outcome-grid, .next-project, footer {
    padding-left: 24px;
    padding-right: 24px;
  }
  nav ul { gap: 20px; }
  nav ul a:nth-child(n+4) { display: none; }
  .case-meta { grid-template-columns: repeat(2, 1fr); gap: 24px; }
  .chapter-inner { grid-template-columns: 1fr; gap: 32px; }
  .chapter-label { position: static; }
  .gallery-grid.g-2, .gallery-grid.g-3, .gallery-grid.g-asym, .gallery-grid.g-asym-rev { grid-template-columns: 1fr; }
  .outcome-grid { grid-template-columns: 1fr; }
}
