:root {
  font-family: Manrope, -apple-system, BlinkMacSystemFont, sans-serif;
  color: #171717;
  background: #f8f7f4;
  --gutter: clamp(20px, 5vw, 76px);
}

* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .22em; }
:focus-visible { outline: 2px solid #6c8def; outline-offset: 4px; }
[id] { scroll-margin-top: calc(var(--header-height) + 12px); }

/* Reserve the fixed header's space above the article. */
.header + main { border-top: var(--header-height) solid #000; }
.detail-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: end;
  min-height: clamp(450px, 55vw, 740px);
  background: #101010;
  color: #fff;
}

.detail-cover, .detail-hero::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.detail-cover { z-index: -2; object-fit: cover; object-position: center 48%; }
.detail-hero::before {
  content: "";
  z-index: -1;
  background: linear-gradient(180deg, #10101008 18%, #10101040 43%, #101010e8 100%);
}

.detail-hero-title {
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 100px) var(--gutter) clamp(32px, 6vw, 80px);
}

.detail-client { margin: 0 0 12px; color: #fff; font-size: clamp(15px, 1.55vw, 21px); }
.detail-hero h1 {
  max-width: 22ch;
  margin: 0;
  font-size: clamp(37px, 5.9vw, 86px);
  font-weight: 520;
  line-height: 1.02;
  letter-spacing: -.06em;
  text-wrap: balance;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(0, 3.25fr);
  gap: clamp(34px, 7vw, 112px);
  align-items: start;
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(40px, 6.5vw, 96px) var(--gutter) 0;
}

.detail-toc { position: sticky; top: calc(var(--header-height) + 24px); min-width: 0; }
.detail-toc h2 { margin: 0 0 14px; font-size: 15px; font-weight: 700; }
.detail-toc ul { margin: 0; padding: 0; border-top: 1px solid #dedbd3; list-style: none; }
.detail-toc a {
  display: block;
  padding: 11px 0;
  border-bottom: 1px solid #dedbd3;
  color: #56534d;
  font-size: 14px;
  line-height: 1.4;
  text-decoration: none;
}
.detail-toc a:is(:hover, :focus-visible) { color: #171717; text-decoration: underline; }
.detail-story { min-width: 0; }
.detail-intro { padding-bottom: clamp(27px, 4vw, 56px); border-bottom: 1px solid #dedbd3; }
.detail-lead { max-width: 58ch; margin: 0; font-size: clamp(17px, 2vw, 27px); line-height: 1.45; }
.detail-brief { margin: 0 0 clamp(24px, 3vw, 40px); }
.detail-brief > div { display: grid; grid-template-columns: 5em minmax(0, 1fr); gap: 16px; padding: 12px 0; border-bottom: 1px solid #dedbd3; }
.detail-brief dt { color: #56534d; }
.detail-brief dd { margin: 0; line-height: 1.5; }
.detail-context { max-width: 66ch; margin: 16px 0 0; line-height: 1.65; }
.detail-project { margin-top: 20px; }
.detail-action { justify-self: start; max-width: 100%; }

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 32px 0 0;
}

.detail-metrics > div {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
  padding: 14px clamp(11px, 2vw, 24px);
  border: 1px solid #dedbd3;
  border-radius: 8px;
}

.detail-metrics dt { color: #56534d; font-size: 13px; line-height: 1.3; }
.detail-metrics dd { margin: 0; font-size: clamp(24px, 4vw, 52px); line-height: 1; letter-spacing: -.045em; }

.detail-section {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  padding: clamp(30px, 5vw, 70px) 0;
  border-bottom: 1px solid #dedbd3;
}

.detail-section h2 { margin: 0; font-size: clamp(25px, 3vw, 45px); line-height: 1.09; letter-spacing: -.045em; }
.detail-section p { margin: 14px 0 0; max-width: 66ch; line-height: 1.65; }
.detail-screen { min-width: 0; margin: 0; }
.detail-screen img { display: block; width: 100%; border: 1px solid #dedbd3; border-radius: 8px; background: #fff; }
.project-brief {
  max-width: 1440px;
  margin-inline: auto;
  padding: clamp(36px, 5vw, 72px) var(--gutter);
}
.project-brief .detail-project { text-transform: none; }
.detail-screen figcaption { margin-top: 8px; color: #56534d; font-size: 13px; }

.detail-footer {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px var(--gutter) 42px;
  font-size: 14px;
  font-weight: 650;
}

@media (max-width: 760px) {
  .detail-hero { min-height: clamp(360px, 86vw, 510px); }
  .detail-hero h1 { font-size: clamp(32px, 7vw, 52px); }
  .detail-layout { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .detail-toc { position: static; }
  .detail-footer { flex-wrap: wrap; }
}
