/* case.css: the case pages and the cases index, in the homepage's language. A case page's left panel is the
   homepage's own (panel.css + panel.js: the live print in that project's pattern, the title and the facts); the
   paper on the right carries the story. */
:root { --paper: #F3F0E8; --ink: #3255A4; --accent: #E9573F; --body: 'Geist', sans-serif;
        --panel: #305095;   /* the homepage panel as it prints (ink multiplied over paper), so the print stills sit seamlessly */
        --tint: color-mix(in srgb, var(--ink) 9%, var(--paper));
        --gutR: clamp(18px, 3.4vw, 56px); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--paper); color: var(--ink); overflow-x: clip; }
body { font-family: var(--body); font-size: var(--fs-body); line-height: var(--lh-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }


/* right: the story */
.story { padding: clamp(80px, 14vh, 150px) var(--gutR) clamp(80px, 12vh, 140px); max-width: 980px; }
.story .lead { font-weight: 500; font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline); text-wrap: balance; max-width: 20ch; }
.story .sub { font-size: var(--fs-lead); line-height: var(--lh-lead); letter-spacing: var(--ls-lead); max-width: 44ch; margin-top: clamp(22px, 3vh, 32px); }
section { margin-top: clamp(56px, 9vh, 96px); padding-top: 20px; border-top: 1px solid var(--ink); }
.story .lab { display: flex; gap: 14px; font-size: var(--fs-label); font-weight: 500; color: var(--accent); margin-bottom: 8px; }
section h2 { font-weight: 500; font-size: var(--fs-heading); line-height: var(--lh-heading); letter-spacing: var(--ls-heading); margin-bottom: 18px; text-wrap: balance; }
section p { max-width: 60ch; }
section p + p { margin-top: 14px; }
section h3 { font-weight: 600; font-size: var(--fs-lead); line-height: var(--lh-lead); letter-spacing: var(--ls-lead); margin: 32px 0 8px; }
ul.impact { list-style: none; display: grid; gap: 12px; max-width: 60ch; }
ul.impact li { display: grid; grid-template-columns: 14px 1fr; gap: 12px; }
ul.impact li::before { content: ''; width: 7px; height: 7px; background: var(--accent); margin-top: .62em; }

figure { margin-top: 28px; background: var(--tint); padding: clamp(18px, 3vw, 40px); }
figcaption { font-size: var(--fs-label); font-weight: 500; margin-top: 14px; }
/* a space waiting for one of Victor's images */
.slot { aspect-ratio: 16 / 9; border: 2px dashed color-mix(in srgb, var(--ink) 40%, transparent); display: grid; place-items: center;
        text-align: center; font-size: var(--fs-label); font-weight: 500; padding: 20px; opacity: .8; }
.todo { border-left: 2px solid var(--accent); padding-left: 14px; opacity: .7; }

.next { margin-top: clamp(64px, 10vh, 110px); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
        padding-top: 20px; border-top: 1px solid var(--ink); font-weight: 600; }
.next a { text-decoration: none; }
.next a:hover { color: var(--accent); }

@media (max-width: 860px) { .story { padding-top: 48px; } }
/* under the top band (desktop): the story in one centred column; the figures may run wider than the text */
@media (min-width: 861px) {
  .stage[data-layout="top"] + .story { --col: 880px; --wide: min(1080px, 100vw - 2 * var(--gutR)); max-width: calc(var(--col) + 2 * var(--gutR)); margin: 0 auto;
                                       padding-top: clamp(56px, 9vh, 104px); }
  .stage[data-layout="top"] + .story figure { width: var(--wide); margin-left: calc((100% - var(--wide)) / 2); }
  .stage[data-layout="top"] + .story :is(.sub, section p, ul.impact) { max-width: none; }   /* the text fills the column (his call: wider) */
}

/* the cases index, full width (his call 2026-10-13): no panel. The top row is the shared one (panel.js), in ink on the paper */
.full { padding: calc(var(--head) + clamp(28px, 6vh, 64px)) var(--gutR) clamp(64px, 10vh, 120px); }
.full > .top { position: fixed; left: 0; right: 0; top: 0; z-index: 4; padding: var(--head-y) var(--gutR) 16px; color: var(--ink); }
.full > .top nav { position: static; }   /* in the row with the name, on its baseline */
.full > .top nav a[href$=".pdf"] { color: var(--ink); border-color: color-mix(in srgb, var(--ink) 35%, transparent); }
.full > .top nav a[href$=".pdf"]:hover { border-color: var(--ink); }
.full > .top nav a[data-nav="contact"]:hover { border-color: var(--ink); }
@media (max-width: 860px) { .full { padding-top: 0; } .full > .top { position: relative; padding: var(--head-y) 0 16px; } }

/* the title: the size of a case page's headline, the line beside it */
.intro { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px clamp(20px, 2.6vw, 40px); padding-bottom: 20px; border-bottom: 1px solid var(--ink); }
.intro h1 { font-weight: 600; font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline); }
.intro .lead { font-weight: 500; font-size: var(--fs-lead); line-height: var(--lh-lead); letter-spacing: var(--ls-lead); }
@media (max-width: 860px) { .intro { margin-top: 24px; } }

/* the cases: an index (his pick 2026-10-14). One row per case: a small picture, the case's own line as the big type */
.grid { list-style: none; margin-top: clamp(28px, 5vh, 56px); }
.grid li { border-bottom: 1px solid var(--ink); }
.grid a { display: grid; grid-template-columns: clamp(96px, 10vw, 150px) 1fr; gap: clamp(20px, 3vw, 48px); padding: clamp(24px, 4vh, 40px) 0; text-decoration: none; }
.grid .tile { display: block; position: relative; overflow: hidden; background: var(--panel); aspect-ratio: 4 / 5; }
.grid .tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.7,.2,1); }
.grid a:hover .tile img { transform: scale(1.08); }
.grid .text { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 40px; align-items: start; }
.grid h2 { grid-column: 1; grid-row: 1; align-self: baseline; font-weight: 600; font-size: var(--fs-body); line-height: 1; }
.grid .meta { grid-column: 2; grid-row: 1; align-self: baseline; font-size: var(--fs-label); font-weight: 500; }
.grid .meta span:first-child { display: none; }   /* the kind of project; the name is the h2 */
.grid p { grid-column: 1; grid-row: 2; font-weight: 500; font-size: var(--fs-headline); line-height: var(--lh-headline); letter-spacing: var(--ls-headline); max-width: 22ch; margin-top: 8px; text-wrap: balance; }
.grid .go { grid-column: 2; grid-row: 2; align-self: end; display: inline-flex; gap: 8px; padding: 8px 14px; background: var(--accent); color: var(--paper); font-weight: 600; font-size: var(--fs-body); transition: background .2s; }
.grid a:hover .go { background: var(--ink); }
@media (max-width: 860px) {
  .grid a { grid-template-columns: 72px 1fr; }
  .grid .text { grid-template-columns: 1fr; }
  .grid .meta { grid-column: 1; grid-row: 2; margin-top: 4px; }
  .grid p { grid-row: 3; }
  .grid .go { grid-column: 1; grid-row: 4; justify-self: start; margin-top: 16px; }
}

/* case figures: two screens side by side */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 2vw, 24px); align-items: start; }
figure img.gap { margin-top: clamp(18px, 3vw, 40px); }
@media (max-width: 600px) { .pair { grid-template-columns: 1fr; } figure { padding: 10px; } figcaption { padding: 0 6px 4px; } }
.nw { white-space: nowrap; }
