@charset "utf-8";
/* ════════════════════════════════════════════════════════════════════════════

   case.css — the seven project pages.

   portfolio.css supplies the tokens, the reset, the pills, the masthead and
   the footer. This file is only what a long-form page adds: a two-column
   editorial grid, a measure worth reading at, and a shelf of screens.

   ════════════════════════════════════════════════════════════════════════════ */

/* The mark has nowhere to arrive from on a subpage, so it is simply there. */
.masthead--case .mark { margin-right: 13px; }
.masthead--case .mark__j,
.masthead--case .mark__p { opacity: 1; transform: none; }
.masthead--case .mark__bolt { opacity: 1; transform: none; }

.masthead__crumb {
  grid-column: 3; justify-self: end; align-self: start;
  font: 700 var(--label)/1.22 Montserrat, sans-serif; text-transform: uppercase;
  padding-top: 11px;
}
.masthead__crumb a { position: relative; }
.masthead__crumb a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: 100% 50%;
  transition: transform var(--t-fast) var(--ease);
}
.masthead__crumb a:hover::after { transform: scaleX(1); }

/* ── The page ──────────────────────────────────────────────────────────── */
.case { padding: 0 var(--gutter) clamp(60px, 10vh, 120px); }

/* One editorial grid for the whole page: the heading column, then the column
   the prose actually lives in. Below 900px it collapses to one. */
.case__head, .case__block, .case__screens, .case__next {
  display: grid;
  grid-template-columns: minmax(0, 22%) minmax(0, 1fr);
  gap: clamp(14px, 2.4vw, 44px);
  padding-top: clamp(46px, 7vh, 92px);
}
@media (max-width: 900px) {
  .case__head, .case__block, .case__screens, .case__next { grid-template-columns: 1fr; }
}

.case__head { padding-top: clamp(140px, 22vh, 220px); }
.case__eyebrow {
  grid-column: 1; align-self: start;
  font: 700 var(--label)/1.22 Montserrat, sans-serif; text-transform: uppercase;
  color: var(--mute); padding-top: .7em;
}
.case__title {
  grid-column: 2;
  font-weight: 700; line-height: .96; letter-spacing: -0.035em;
  font-size: clamp(52px, 11vw, 168px);
}
.case__lede {
  grid-column: 2;
  max-width: 24ch;
  font-size: clamp(20px, 2.1vw, 34px); line-height: 1.28; letter-spacing: -0.012em;
  margin-top: clamp(18px, 2.4vw, 34px);
  text-wrap: balance;
}

/* ── Facts ─────────────────────────────────────────────────────────────── */
.facts {
  grid-column: 2;
  margin-top: clamp(30px, 4.4vw, 60px);
  border-top: 1px solid var(--rule);
  max-width: 760px;
}
.facts__row {
  display: grid; grid-template-columns: minmax(0, 130px) minmax(0, 1fr);
  gap: 16px; padding: 11px 0;
  border-bottom: 1px solid var(--rule);
}
.facts dt {
  font: 700 var(--label)/1.5 Montserrat, sans-serif;
  text-transform: uppercase; color: var(--mute);
}
.facts dd { font-size: 14px; line-height: 1.5; font-weight: 500; }
.case__actions { grid-column: 2; margin-top: clamp(24px, 3vw, 38px); }

/* ── Prose ─────────────────────────────────────────────────────────────── */
.case__h {
  grid-column: 1; align-self: start;
  font: 700 var(--label)/1.4 Montserrat, sans-serif; text-transform: uppercase;
  padding-top: .55em;
  position: sticky; top: calc(var(--masthead-h) + 8px);
}
@media (max-width: 900px) { .case__h { position: static; padding-top: 0; } }

.case__block--prose > p, .case__kicker {
  grid-column: 2;
  max-width: 68ch;
  font-size: clamp(16px, 1.28vw, 21px); line-height: 1.62;
}
.case__block--prose > p + p { margin-top: 1.05em; }
.case__kicker {
  font-weight: 700; font-size: clamp(24px, 2.5vw, 40px); line-height: 1.16;
  letter-spacing: -0.02em; max-width: 18ch;
  margin-bottom: .55em;
}
.case em { font-style: italic; }
.case strong { font-weight: 700; }
.case code {
  font: 500 .88em/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--panel); border: 1px solid var(--rule);
  padding: .12em .38em; border-radius: 3px; white-space: nowrap;
}

/* ── Decision cards ────────────────────────────────────────────────────── */
.calls {
  grid-column: 2;
  display: grid; gap: 1px;
  background: var(--rule);           /* the gap IS the rule — one hairline grid */
  border: 1px solid var(--rule);
  counter-reset: call;
}
@media (min-width: 1100px) { .calls { grid-template-columns: 1fr 1fr; } }

.call {
  background: var(--paper);
  padding: clamp(20px, 2vw, 30px);
  display: grid; align-content: start; gap: 9px;
}
.call h3 {
  font-size: clamp(15px, 1.15vw, 19px); font-weight: 700; line-height: 1.28;
  letter-spacing: -0.008em;
}
.call p { font-size: clamp(13.5px, 1vw, 16px); line-height: 1.58; color: #2b2b2b; }
/* A short stagger across each row of cards, from position rather than script. */
.call:nth-child(4n+2) { --i: 1; }
.call:nth-child(4n+3) { --i: 2; }
.call:nth-child(4n+4) { --i: 3; }

.calls--numbered .call h3::before {
  counter-increment: call; content: counter(call) " · ";
  color: var(--mute); font-variant-numeric: tabular-nums;
}

/* ── Screens ───────────────────────────────────────────────────────────── */
.case__screens .shelf {
  grid-column: 2;
  display: flex; gap: clamp(14px, 1.6vw, 26px);
  overflow-x: auto; scrollbar-width: none;
  scroll-snap-type: x proximity;
  margin-inline: calc(var(--gutter) * -1);
  padding-inline: var(--gutter);
  scroll-padding-inline-start: var(--gutter);
}
.case__screens .shelf::-webkit-scrollbar { display: none; }
@media (max-width: 900px) { .case__screens .shelf { margin-inline: calc(var(--gutter) * -1); } }

.shelf__item {
  flex: none; width: min(280px, 62vw);
  scroll-snap-align: start;
  display: grid; gap: 14px; align-content: start;
}
.shelf__item img {
  width: 100%; height: auto;
  background: var(--panel);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgb(0 0 0 / .07), 0 26px 50px -18px rgb(0 0 0 / .30);
}
.shelf__item figcaption {
  font-size: 13px; line-height: 1.5; color: #2b2b2b;
}

/* ── Prev / next ───────────────────────────────────────────────────────── */
.case__next {
  grid-column: 1 / -1;
  grid-template-columns: 1fr 1fr;
  gap: 1px; background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: clamp(60px, 9vh, 110px);
  padding-top: 0;
}
.case__next-link {
  background: var(--paper);
  padding: clamp(26px, 3.4vw, 52px) clamp(20px, 2.4vw, 40px);
  display: grid; gap: 10px; align-content: center;
  transition: background var(--t-med) var(--ease), color var(--t-med) var(--ease);
}
.case__next-link--r { text-align: right; }
.case__next-link:hover { background: var(--ink); color: var(--paper); }
.case__next-label {
  font: 700 var(--label)/1.22 Montserrat, sans-serif; text-transform: uppercase;
  color: var(--mute);
}
.case__next-link:hover .case__next-label { color: inherit; }
.case__next-name {
  font-weight: 700; font-size: clamp(22px, 3vw, 44px); line-height: 1.1;
  letter-spacing: -0.025em;
}

/* Case pages never run the hero, so the boot rules must not hide anything. */
.case-page.boot .masthead > * { opacity: 1; }
