/* Shared styles for the case-study pages (vimeo, strive, volkswagen) and the
   about/resume pages. Extracted so a layout fix lands on every page at once. */

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

:root {
  --bg: #FBFBFC;
  --black: #111214;
  --gray: #74777D;
  --warm-gray: #44474C;
  /* Monochrome by design: the work supplies the colour, the page doesn't compete. */
  --accent: #111214;
  --cream: #F1F2F4;
  --border: #E3E5E9;
}

html { scroll-behavior: smooth; }
body {
  font-family: 'Archivo', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--black);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* One family, four jobs — display, headings, body, labels — separated by weight,
   width and tracking rather than by bringing in another typeface. */
.display {
  font-weight: 700;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 0.94;
}
.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gray);
}

/* ===== BACK BAR ===== */
.backbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex; align-items: center; gap: 10px;
  padding: 18px var(--pad, 64px);
  background: rgba(251, 251, 252, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-block-end: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--gray);
  text-decoration: none;
  transform: translateY(-100%);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s;
}
.backbar.show { transform: translateY(0); }
.backbar:hover { color: var(--black); }
.backbar span { transition: transform 0.25s ease; display: inline-block; }
.backbar:hover span { transform: translateX(-3px); }

/* ===== HERO ===== */
.case-hero {
  padding: 72px 64px 0;
  max-width: 1200px;
  margin: 0 auto;
}
.case-hero .back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--gray); text-decoration: none;
  margin-bottom: 48px;
  transition: gap 0.3s, color 0.2s;
}
.case-hero .back:hover { gap: 12px; color: var(--black); }
.case-hero .meta {
  display: flex; flex-wrap: wrap; gap: 24px 48px;
  margin-bottom: 32px;
}
.case-hero .meta-item .meta-label {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 4px;
}
.case-hero .meta-item .meta-value { font-size: 15px; color: var(--black); }
.case-hero h1 {
  font-weight: 700;
  font-stretch: 112%;
  font-size: clamp(40px, 7vw, 84px);
  line-height: 0.94;
  letter-spacing: -0.035em;
  margin-bottom: 24px;
  text-wrap: balance;
  opacity: 0; transform: translateY(30px);
  animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.case-hero .lede {
  font-size: clamp(18px, 2.2vw, 24px);
  font-weight: 300;
  line-height: 1.5;
  color: var(--gray);
  max-width: 720px;
  margin-bottom: 56px;
  opacity: 0;
  animation: slideUp 0.9s 0.12s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.case-hero .lede em {
  font-style: normal; font-weight: 600; color: var(--black);
}

.cover {
  width: 100%;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 80px;
  opacity: 0;
  animation: fadeIn 0.8s 0.25s ease forwards;
}
.cover img { width: 100%; display: block; object-fit: cover; }

/* ===== CONTENT ===== */
.case-content { max-width: 1200px; margin: 0 auto; padding: 0 64px; }

.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  margin-bottom: 80px;
}
.intro-grid h2 {
  font-weight: 700;
  font-stretch: 108%;
  font-size: 36px; line-height: 1.15; letter-spacing: -0.02em;
  text-wrap: balance;
}
.intro-grid p { font-size: 17px; font-weight: 300; line-height: 1.7; color: var(--warm-gray); }
.intro-grid p + p { margin-top: 20px; }
.intro-grid p em { font-style: normal; font-weight: 400; color: var(--black); }

.divider { width: 100%; height: 1px; background: var(--border); margin: 0 0 80px; }

.section-block { margin-bottom: 80px; }
.section-block .section-label {
  font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 20px;
}
.section-block h2 {
  font-weight: 700;
  font-stretch: 108%;
  font-size: 36px; line-height: 1.15; letter-spacing: -0.02em;
  margin-bottom: 24px; text-wrap: balance;
}
.section-block p {
  font-size: 17px; font-weight: 300; line-height: 1.7;
  color: var(--warm-gray); max-width: 680px;
}
.section-block p + p { margin-top: 20px; }
.section-block p em { font-style: normal; font-weight: 400; color: var(--black); }

.section-block ul {
  margin-top: 20px;
  padding-left: 20px;
  max-width: 680px;
  color: var(--warm-gray);
  font-size: 17px; font-weight: 300; line-height: 1.7;
}
.section-block li + li { margin-top: 8px; }

.case-img { width: 100%; border-radius: 16px; overflow: hidden; margin-bottom: 80px; }
.case-img img { width: 100%; display: block; object-fit: cover; }
.case-img figcaption {
  font-size: 13px; color: var(--gray);
  padding: 12px 4px 0;
}

.img-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 80px; }
.img-pair .case-img { margin-bottom: 0; }

/* Outcome stats */
.outcomes {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 80px;
  padding: 48px;
  background: var(--cream);
  border-radius: 20px;
  border: 1px solid var(--border);
}
.outcome-stat .stat-value {
  font-weight: 700;
  font-stretch: 108%;
  font-size: 48px; line-height: 1; letter-spacing: -0.02em;
  color: var(--black); margin-bottom: 8px;
}
.outcome-stat .stat-label { font-size: 15px; font-weight: 300; color: var(--gray); line-height: 1.4; }

/* Placeholder marker — every unfilled fact on the site uses this.
   Find them all with: grep -rn 'class="ph"' *.html */
.ph {
  font-size: 0.92em;
  font-weight: 500;
  color: var(--gray);
  background: rgba(17, 18, 20, 0.04);
  border: 1px dashed rgba(17, 18, 20, 0.28);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}
.outcome-stat .stat-value .ph { font-size: 20px; white-space: normal; }

/* Next project */
.next-project {
  padding: 64px 0;
  border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 24px;
  justify-content: space-between; align-items: center;
  margin-bottom: 80px;
}
.next-project .next-label {
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--gray); margin-bottom: 8px;
}
.next-project h3 { font-size: 34px; font-weight: 700; font-stretch: 108%; letter-spacing: -0.025em; }
.next-project a {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; letter-spacing: 0.02em;
  color: var(--accent); text-decoration: none;
  transition: gap 0.3s;
}
.next-project a:hover { gap: 14px; }

/* ===== FOOTER ===== */
footer.site-footer {
  display: flex; flex-direction: column; align-items: center;
  padding: 64px; gap: 24px; background: var(--black);
}
footer.site-footer .footer-logo {
  font-size: 16px; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--bg);
}
footer.site-footer .social-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px; }
footer.site-footer .social-links a {
  font-size: 14px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: #AFA7A1; text-decoration: none;
  transition: color 0.2s;
}
footer.site-footer .social-links a:hover { color: var(--bg); }

/* ===== ANIMATIONS ===== */
@keyframes slideUp { to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { to { opacity: 1; } }
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

.cursor-glow {
  position: fixed;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 77, 42, 0.06) 0%, transparent 70%);
  pointer-events: none; z-index: 0;
  transform: translate(-50%, -50%);
  transition: left 0.3s ease, top 0.3s ease;
}

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav { padding: 16px 24px; }
  nav .links { gap: 28px; }
  nav .links a { font-size: 12px; letter-spacing: 0.05em; }
  .case-hero { padding: 56px 20px 0; }
  .backbar { padding: 14px 20px; }
  .case-content { padding: 0 24px; }
  .case-hero .meta { gap: 18px 32px; margin-bottom: 24px; }
  .intro-grid { grid-template-columns: 1fr; gap: 24px; margin-bottom: 56px; }
  .img-pair { grid-template-columns: 1fr; gap: 16px; margin-bottom: 56px; }
  .case-img { margin-bottom: 56px; }
  .cover { margin-bottom: 56px; border-radius: 14px; }
  .divider { margin-bottom: 56px; }
  .section-block { margin-bottom: 56px; }
  .section-block h2, .intro-grid h2 { font-size: 28px; }
  .outcomes {
    grid-template-columns: 1fr;
    gap: 24px; padding: 28px; margin-bottom: 56px;
  }
  .outcome-stat .stat-value { font-size: 38px; }
  .next-project { padding: 40px 0; margin-bottom: 56px; }
  .next-project h3 { font-size: 28px; }
  footer.site-footer { padding: 48px 24px; }
  footer.site-footer .social-links { gap: 20px; }
  .cursor-glow { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .case-hero h1, .case-hero .lede, .cover { opacity: 1; transform: none; }
}

/* Older work, honestly labelled — it is from a previous chapter and shouldn't
   pretend otherwise. */
.archive-flag {
  display: inline-block;
  margin-bottom: 22px;
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--gray);
}

/* Archived case studies keep their original captions and asides. */
.section-block p.quiet { color: var(--gray); font-size: 15px; }

.case-img video { width: 100%; display: block; }
