/* Case study pages. Light only, on purpose: assets/style.css carries four
   appended override layers where a rule can depend on something three
   blocks up, plus a dark theme these pages are not meant to have.
   Deliberately separate from it until that file is consolidated. */

:root {
  --bg:        #F7F6F3;
  --surface:   #FFFFFF;
  --rule:      #E4E0DA;
  --rule-soft: #EDEAE4;
  --ink:       #141518;   /* 16.9:1 */
  --body:      #43464B;   /* 8.8:1  */
  --soft:      #5C6066;   /* 6.1:1  */
  --label:     #6A6E75;   /* 4.6:1  */
  --accent:    #1E4C6B;   /* 8.4:1  */

  --sans: "Figtree", ui-sans-serif, "Segoe UI", system-ui, sans-serif;
  /* Was 34em, about 68 characters. 42em is roughly 84, which is past the
     60 to 75 that reads most comfortably, but it is the width asked for.
     This is the one knob: drop it to 38em if lines feel long. */
  --measure: 42em;
  --gap: clamp(64px, 7vw, 104px);
  --pad: clamp(20px, 5vw, 72px);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

::selection { background: rgba(20,21,24,.10); }

.wrap { max-width: 1400px; margin: 0 auto; padding: 0 var(--pad); }

/* --- Top bar ----------------------------------------------------------- */

.top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 24px;
  padding: 28px 0 0;
  font-size: 14px;
  color: var(--label);
}

.top a { text-decoration: none; transition: color .18s ease; }
.top a:hover, .top a:focus-visible { color: var(--ink); }
.top__links { display: flex; gap: 22px; }

/* --- Masthead ---------------------------------------------------------- */

.head { padding: clamp(56px, 9vw, 104px) 0 0; }

.eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 20px;
}

h1 {
  margin: 0;
  max-width: 17ch;
  font-size: clamp(34px, 5.2vw, 60px);
  font-weight: 800;
  line-height: 1.06;
  letter-spacing: -.032em;
  color: var(--ink);
  text-wrap: balance;
}

.standfirst {
  margin: 28px 0 0;
  max-width: 44ch;
  font-size: clamp(18px, 1.9vw, 21px);
  line-height: 1.6;
  color: var(--soft);
}

/* --- Two columns ------------------------------------------------------- */

.layout { display: block; padding-bottom: clamp(80px, 10vw, 140px); }

.col { max-width: var(--measure); }

@media (min-width: 1100px) {
  .layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 176px;
    gap: clamp(56px, 6vw, 96px);
    align-items: start;
  }
}

/* --- The one detail rail, kept to the bare necessity ------------------- */

.rail {
  margin: var(--gap) 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.5;
}

.rail__label {
  margin: 0 0 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--label);
}

.rail ol { list-style: none; margin: 0; padding: 0; }
.rail li + li { margin-top: 9px; }

.rail a {
  display: flex;
  gap: 10px;
  text-decoration: none;
  color: var(--soft);
  transition: color .18s ease;
}

.rail a:hover, .rail a:focus-visible { color: var(--ink); }
.rail a.is-active { color: var(--ink); font-weight: 600; }
.rail .n { flex: none; color: var(--label); font-variant-numeric: tabular-nums; }

@media (min-width: 1100px) {
  .rail { position: sticky; top: 48px; margin-top: calc(var(--gap) + 8px); }
}

/* --- Sections ---------------------------------------------------------- */

section { padding-top: var(--gap); }

h2 {
  margin: 0 0 28px;
  max-width: 24ch;
  font-size: clamp(24px, 2.9vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.024em;
  color: var(--ink);
  text-wrap: balance;
}

h3 {
  margin: 0 0 16px;
  max-width: 28ch;
  font-size: clamp(19px, 2.1vw, 23px);
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -.018em;
  color: var(--ink);
}

p { margin: 0 0 20px; }
p:last-child { margin-bottom: 0; }

.lead-note {
  margin: 36px 0 0;
  padding: 26px 0 0;
  border-top: 1px solid var(--rule);
  max-width: 40ch;
  font-size: clamp(19px, 2.1vw, 23px);
  line-height: 1.45;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.012em;
}

.hmw, .claim {
  margin: 36px 0 0;
  padding: 28px 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  max-width: 34ch;
  font-size: clamp(20px, 2.3vw, 26px);
  line-height: 1.34;
  font-weight: 500;
  letter-spacing: -.015em;
  color: var(--ink);
}

/* --- Lists ------------------------------------------------------------- */

ul.plain, ol.steps { margin: 0; padding: 0; list-style: none; }

ul.plain li, ol.steps li {
  position: relative;
  --mark-top: 16px;                 /* the markers below are placed from this */
  padding: var(--mark-top) 0 16px 34px;
  border-top: 1px solid var(--rule-soft);
}

ul.plain li:first-child, ol.steps li:first-child { border-top: 0; --mark-top: 0px; }

/* On the middle of the first line: top padding plus half a line box. */
ul.plain li::before {
  content: "";
  position: absolute;
  left: 8px;
  top: calc(var(--mark-top) + var(--lh-body, 1.6) * 0.5em - 0.5px);
  width: 6px;
  height: 1px;
  background: var(--label);
}

ol.steps { counter-reset: s; }
ol.steps li { counter-increment: s; }
ol.steps li::before {
  content: counter(s);
  position: absolute;
  left: 0;
  top: calc(var(--mark-top) + var(--lh-body, 1.6) * 0.5 * var(--t-body, 16px) - 7.2px);
  top: calc(var(--mark-top) + var(--lh-body, 1.6) * 0.5 * var(--t-body, 16px) - 0.5lh);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.principles li b { color: var(--ink); font-weight: 600; }

/* --- Tables ------------------------------------------------------------ */

.meta { width: 100%; border-collapse: collapse; margin-top: 40px; }

.meta th, .meta td {
  text-align: left;
  vertical-align: top;
  padding: 15px 0;
  border-top: 1px solid var(--rule);
  font-weight: 400;
}

.meta tr:first-child th, .meta tr:first-child td { border-top: 1px solid var(--ink); }

.meta th {
  width: 150px;
  padding-right: 28px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--label);
  line-height: 1.9;
}

.meta td { font-size: 15px; line-height: 1.65; color: var(--body); }

.compare { width: 100%; border-collapse: collapse; margin-top: 8px; }

.compare th {
  text-align: left;
  padding: 0 24px 12px 0;
  border-bottom: 1px solid var(--ink);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
}

.compare td {
  vertical-align: top;
  padding: 16px 24px 16px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: 15px;
  line-height: 1.6;
}

.compare th:last-child, .compare td:last-child { padding-right: 0; }

@media (max-width: 700px) {
  .meta th { display: block; width: auto; padding: 0 0 2px; border-top: 0; }
  .meta td { display: block; padding: 0 0 18px; border-top: 0; }
  .meta tr { display: block; padding-top: 16px; border-top: 1px solid var(--rule); }
  .meta tr:first-child { border-top: 1px solid var(--ink); }
  .meta tr:first-child th, .meta tr:first-child td { border-top: 0; }

  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare td { display: block; width: 100%; }
  .compare tr { padding: 18px 0; border-bottom: 1px solid var(--rule-soft); }
  .compare td { padding: 0; border: 0; }
  .compare td + td { margin-top: 10px; }
  .compare td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--label);
  }
}

/* --- Pipeline ---------------------------------------------------------- */

.flow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0 0 28px;
  padding: 24px 0;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}

.flow span {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}

.flow i { font-style: normal; color: var(--label); font-size: 13px; }

/* --- Decisions --------------------------------------------------------- */

.decision { padding-top: clamp(48px, 5.5vw, 72px); }
.decision:first-of-type { padding-top: 8px; }

.decision__n {
  display: block;
  margin-bottom: 14px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .1em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.why {
  margin: 24px 0 0;
  padding: 22px 26px;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.68;
}

.why b {
  color: var(--ink);
  font-weight: 600;
}

/* --- Image space ------------------------------------------------------- */

figure { margin: clamp(36px, 4vw, 56px) 0 0; }
figure + p, figure + h3 { margin-top: clamp(36px, 4vw, 56px); }

/* Two white cards 40px apart read as one stack, so a figure following a
   .why card is pushed further off it. */
.why + figure { margin-top: clamp(44px, 4.5vw, 64px); }

figcaption {
  margin-top: 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--label);
  max-width: 52ch;
}

@media (max-width: 700px) {
  figure { margin-top: 32px; }
  figcaption { margin-top: 12px; }
}

.shot {
  display: grid;
  place-items: center;
  padding: 28px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed #CFCABF;
  border-radius: 12px;
  color: #8E939A;
  font-size: 12px;
  line-height: 1.55;
  letter-spacing: .01em;
  min-height: 300px;
}

.shot--tall { min-height: 440px; }
.shot--wide { min-height: 360px; }

@media (max-width: 700px) {
  .shot { min-height: 200px; padding: 22px; }
  .shot--tall, .shot--wide { min-height: 240px; }
}

/* Full-measure images are allowed to breathe past the text column, but
   only as far as the grid column actually runs. Column 1 measures 748,
   916 and 1090px at these three widths. */
@media (min-width: 1100px) { figure.bleed { width: calc(100% + 34px); } }
@media (min-width: 1300px) { figure.bleed { width: calc(100% + 120px); } }
@media (min-width: 1500px) { figure.bleed { width: calc(100% + 180px); } }

/* A supplied asset that is only 740px wide. Letting it fill a 1090px column
   would stretch it soft, so it keeps its own measure and sits left. */
figure.narrow .media { max-width: 740px; }

/* The wider column gives the placeholders more to work with. */
@media (min-width: 1200px) {
  .shot { min-height: 360px; }
  .shot--tall { min-height: 520px; }
  .shot--wide { min-height: 420px; }
}

/* --- Results ----------------------------------------------------------- */

.results { margin: 0 0 28px; padding: 0; list-style: none; }

.results li {
  padding: 18px 0;
  border-top: 1px solid var(--rule);
  font-size: clamp(17px, 1.8vw, 19px);
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}

.results li:last-child { border-bottom: 1px solid var(--rule); }

/* --- Foot -------------------------------------------------------------- */

.foot {
  margin-top: var(--gap);
  padding: 32px 0 64px;
  border-top: 1px solid var(--rule);
  font-size: 14px;
  color: var(--label);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.foot a { text-decoration: none; transition: color .18s ease; }
.foot a:hover, .foot a:focus-visible { color: var(--ink); }

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

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

html { scroll-behavior: smooth; }

/* --- A client quote ----------------------------------------------------
   Only used where a real, attributed one exists. */

.quote {
  margin: 40px 0 0;
  padding: 28px 0 0;
  border-top: 2px solid var(--ink);
  max-width: 38ch;
}

.quote__text {
  margin: 0;
  font-size: clamp(19px, 2.1vw, 24px);
  line-height: 1.4;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--ink);
}

.quote__who {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--label);
}

/* ======================================================================
   MOBILE PASS
   ====================================================================== */

/* --- The rail, on a phone ---------------------------------------------
   .layout is a grid at 1100 and up, where .rail is a sticky column on the
   right and does its job: it tells you the shape of the argument and marks
   where you are in it. Below 1100 the grid collapses to display: block and
   the rail, being the last child, falls to the bottom of the page. It is
   the only child there, so nothing looked broken, and that is why it went
   unnoticed: a table of contents sitting underneath the contents.

   On a phone these pages run from 6,900px to 12,900px, which is eight to
   fifteen screens. Produsa is fifteen screens with no map at all, because
   the only map is at the end. Flex plus order moves it above the read
   without touching the markup, so it arrives where a contents list is
   worth something: after the lede has said what this is, before the
   fifteen screens start.

   To put it back, delete this block. Nothing else depends on it. */
@media (max-width: 1099px) {
  .layout { display: flex; flex-direction: column; }
  .rail { order: -1; }

  /* It is the first thing after the lede now, not a footnote, so it gets
     the spacing of an opening block rather than of a trailing one. */
  .rail {
    margin: clamp(40px, 7vw, 64px) 0 0;
    padding: 18px 0 0;
    border-top: 1px solid var(--rule);
  }

  /* Two columns of short labels rather than one tall list, so five or six
     decisions cost about 90px instead of 180px at the top of the page. */
  .rail ol {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 20px;
  }

  .rail li + li { margin-top: 0; }

  /* The marker is meaningless here: the list is off screen by the time you
     are reading a decision, so a bolded item is just noise that was last
     correct several screens ago. */
  .rail a.is-active { color: var(--soft); font-weight: 400; }
}

/* One column is better than two cramped ones once the labels wrap to three
   lines each, which is where they land below about 380px. */
@media (max-width: 379px) {
  .rail ol { grid-template-columns: minmax(0, 1fr); gap: 9px; }
}

/* --- Back to the work -------------------------------------------------
   The top bar carries a Work link already, but on a page this long a
   reader wants an explicit way out at the point they decide to leave,
   not a nav item that looks like a section jump. */

.back {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 34px;
  font-size: 14px;
  color: var(--label);
  text-decoration: none;
  transition: color .18s ease, gap .18s ease;
}

.back:hover, .back:focus-visible { color: var(--ink); gap: 13px; }

.back svg { width: 15px; height: 11px; flex: none; }

@media (prefers-reduced-motion: reduce) {
  .back { transition: color .18s ease; }
  .back:hover, .back:focus-visible { gap: 9px; }
}


/* ======================================================================
   REAL MEDIA
   Added 2026-10-15, when the first screenshots and screen recordings
   landed. Every asset is a near-black product UI and the page is warm
   paper, so an unmatted asset reads as a hole punched in the sheet
   rather than as a picture. Each one gets a white mat, which is the
   language .shot and .why already speak on this page.
   ====================================================================== */

.media {
  margin: 0;
  padding: clamp(7px, 0.7vw, 10px);
  background: var(--surface);
  border: 1px solid var(--v2-card-edge, #E3DFD7);
  border-radius: 10px;
}

/* No shadow on the mat: five lifted cards down one page is heavy. The
   shadow belongs where the dark plate meets the white sheet. */
.media > img,
.media > video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  background: #121316;
  box-shadow: 0 2px 10px -4px rgba(60, 45, 20, .30);
}

/* A picture, not a screen. The mat exists to lift a near-black plate off
   warm paper; an asset that already carries its own ground only needs an
   edge. The hairline is inset on the image rather than a border on the
   wrapper, so there is one radius and the shadow stays where it was. */
.media--bare {
  padding: 0;
  border: 0;
  background: none;
}

.media--bare > img {
  border-radius: 10px;
  background: none;
  box-shadow: 0 2px 10px -4px rgba(60, 45, 20, .30),
              inset 0 0 0 1px rgba(20, 21, 24, .08);
}

:root[data-theme="dark"] .media--bare > img {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07);
}

/* A white plate on warm paper. A white mat around a white screenshot
   merges into one shape, and tinting the mat would give two hairlines
   8px apart with nothing between them. One edge instead, on the image. */
.media--light {
  padding: 0;
  border: 0;
  background: none;
}

.media--light > img {
  border-radius: 10px;
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--rule),
              0 2px 10px -4px rgba(60, 45, 20, .30);
}

/* --- The phone ---------------------------------------------------------
   A white body, not a black one: a near-black bezel around a near-black
   UI is one undifferentiated slab. White keeps the device in the paper
   palette and does the mat's job in the same object, so a phone never
   also sits on a .media card. No notch, no speaker, no side buttons:
   40px of radius over a 10px bezel already reads as a phone, and a
   drawn detail would be a fake drawing on a page that has none. The
   bezel is 6px: enough to read as a device, not enough to become a
   frame around the recording. */

.phone {
  --bezel: 6px;
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0;
  padding: var(--bezel);
  background: var(--surface);
  border: 1px solid var(--v2-card-edge, #E3DFD7);
  border-radius: 30px;
  box-shadow: 0 18px 40px -22px rgba(60, 45, 20, .30);
}

/* No aspect-ratio and no object-fit, 2026-10-23: a forced 9:16 box with
   cover took a slice off a recording that was not exactly 9:16. The video
   fills the width it is given and is as tall as it is. */
.phone video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 24px;
  background: #121316;
}

@media (max-width: 899px) {
  .phone { --bezel: 5px; border-radius: 26px; margin-inline: auto; }
  .phone video { border-radius: 21px; }
}

@media (max-width: 559px) {
  .phone { --bezel: 4px; border-radius: 22px; }
  .phone video { border-radius: 18px; }
}

/* --- Text left, a tall phone right -------------------------------------
   A vertical video beside a paragraph leaves a column of empty paper.
   The fix is not alignment, it is putting more in the left column: the
   .why card moves inside it, which takes the left stack to about the
   height of the device. Centring then absorbs what is left as air at
   top and bottom rather than as a hole at the bottom.
   Splits at 1100px, the same breakpoint the rail changes state at. */

.d-split__media { margin: 0; }

@media (min-width: 1100px) {
  .d-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr) max-content;
    column-gap: clamp(32px, 4vw, 56px);
    align-items: center;
    width: calc(100% + 34px);
  }
  /* The left column carries the measure on its own now, so it takes the
     same rail-safe bleed a figure does. */
  .d-split__text { max-width: none; }
}

@media (min-width: 1300px) { .d-split { width: calc(100% + 120px); } }
@media (min-width: 1500px) { .d-split { width: calc(100% + 180px); } }

@media (max-width: 1099px) {
  .d-split__media { margin-top: clamp(36px, 4vw, 56px); }
  .d-split__media figcaption { text-align: center; max-width: none; }
}

/* --- Dark mode ---------------------------------------------------------
   Inert today: case.css is light only and nothing on these pages sets a
   theme. Written in v2.css's guard pattern so it is right the day one
   arrives. The logic inverts. In light the mat separates a dark asset
   from a light page; in dark the mat has to sit lighter than the ground
   and the separation moves to a hairline on the media itself. */

:root[data-theme="dark"] .media,
:root[data-theme="dark"] .phone { background: #17181B; border-color: #2B2E34; }

:root[data-theme="dark"] .media > img,
:root[data-theme="dark"] .media > video { box-shadow: 0 0 0 1px rgba(255, 255, 255, .07); }

/* No prefers-color-scheme twin for the rules above, unlike v2.css. The
   homepage follows the system; these pages do not. case.css is light only
   and never restyles the ground, so a system-dark reader would have got
   charcoal mats sitting on warm paper. These wait for a real theme. */
