/* Self-hosted fonts: Source Serif 4 and Hanken Grotesk, SIL Open Font License. */
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-display: swap; src: url("fonts/source-serif-4-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 400; font-style: italic; font-display: swap; src: url("fonts/source-serif-4-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-weight: 500; font-display: swap; src: url("fonts/source-serif-4-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 400; font-display: swap; src: url("fonts/hanken-grotesk-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 500; font-display: swap; src: url("fonts/hanken-grotesk-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Hanken Grotesk"; font-weight: 600; font-display: swap; src: url("fonts/hanken-grotesk-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light;
  --ground: #FAF9F5;
  --ink: #141413;
  --muted: #5E5D59;
  --panel: #F0EEE6;
  --line: #DEDCD1;
  --del: #A8462A;
  --link: #2C5F8A;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Hanken Grotesk", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

h1, h2, h3 { font-family: var(--serif); font-weight: 400; }
p { margin: 0 0 12px; }
p:last-child { margin-bottom: 0; }
figure { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 10px 14px;
  background: var(--ink);
  color: var(--ground);
}
.skip:focus { top: 8px; color: var(--ground); }

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.wrap--case { max-width: 880px; }
@media (min-width: 720px) { .wrap { padding: 0 32px; } }

.site-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 32px;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
}
.site-name {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.375rem;
  font-weight: 500;
  text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 0 24px; font-size: 0.9375rem; }
.site-nav a { padding: 10px 0; color: var(--ink); text-decoration: none; }
.site-nav a:hover { text-decoration: underline; }

/* Hero with a floating gallery. Motion pauses on hover, with the control, and for reduced motion. */
.hero { overflow-x: clip; display: flex; flex-wrap: wrap; align-items: center; gap: 32px 56px; padding: 24px 0 64px; }
.hero__text { flex: 1 1 400px; min-width: 0; }
.hero h1 {
  margin: 0;
  font-size: clamp(2rem, 1.5rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
/* The payoff words in the headline: italic and a size up, so they stick. */
.hero h1 em { font-style: italic; font-size: 1.22em; line-height: 1; letter-spacing: -0.02em; }
.hero p { max-width: 480px; margin: 20px 0 0; color: var(--muted); font-size: 1.1875rem; }
.pause { display: inline-flex; gap: 8px; align-items: center; margin-top: 24px; padding: 8px 0; color: var(--muted); font-size: 0.875rem; cursor: pointer; }
.pause input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); }

.board { position: relative; flex: 1.15 1 440px; min-width: 0; aspect-ratio: 540 / 900; }
/* Each snippet comes into focus large, one at a time. Then they all zoom out to a still collage.
   Captions show on each slide, hide once the collage settles, and come back on hover or tap. */
.float {
  position: absolute;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(20, 20, 19, 0.06), 0 10px 24px rgba(20, 20, 19, 0.1);
  animation:
    focus-in 0.3s cubic-bezier(0.2, 0.8, 0.2, 1) var(--in) both,
    focus-out 0.25s ease-in calc(var(--in) + 0.5s) forwards,
    settle 1.1s cubic-bezier(0.22, 1, 0.36, 1) 10.0s forwards;
}
.float img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.float figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  margin: 0;
  padding: 28px 12px 10px;
  background: linear-gradient(to top, color-mix(in srgb, var(--ink) 88%, transparent) 0%, color-mix(in srgb, var(--ink) 80%, transparent) calc(100% - 28px), transparent 100%);
  color: var(--ground);
  line-height: 1.3;
  animation: cap-hide 0.01s linear 10.0s forwards;
}
.float .meta { display: block; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; }
.float .ttl { display: block; margin-top: 2px; font-family: var(--serif); font-size: 0.875rem; }
@keyframes cap-hide { from, to { opacity: 0; } }
.float:hover { z-index: 3; }
.float:hover img { transform: scale(1.05); }
.float:hover figcaption { opacity: 1 !important; }
.hero:has(.pause input:checked) .float,
.hero:has(.pause input:checked) .float figcaption { animation-play-state: paused; }
@keyframes focus-in {
  from { opacity: 0; filter: blur(14px); transform: translate(var(--cx), var(--cy)) scale(calc(var(--s) * 1.08)); }
  to { opacity: 1; filter: blur(0); transform: translate(var(--cx), var(--cy)) scale(var(--s)); }
}
@keyframes focus-out {
  from { opacity: 1; filter: blur(0); transform: translate(var(--cx), var(--cy)) scale(var(--s)); }
  to { opacity: 0; filter: blur(10px); transform: translate(var(--cx), var(--cy)) scale(calc(var(--s) * 0.96)); }
}
@keyframes settle {
  from { opacity: 0; filter: blur(0); transform: translate(var(--cx), var(--cy)) scale(var(--s)); }
  to { opacity: 1; filter: blur(0); transform: none; }
}
@media (max-width: 600px) {
  .float figcaption { padding: 22px 8px 6px; }
  .float .meta { font-size: 0.5625rem; }
  .float .ttl { font-size: 0.75rem; }
}
@media (prefers-reduced-motion: reduce) {
  .float, .float figcaption { animation: none; }
  .float figcaption { opacity: 0; }
  .float img { transition: none; }
  .pause { display: none; }
}
.f1 { left: 0.0%; top: 16.7%; width: 31.9%; height: 18.7%; --cx: 107.0%; --cy: 128.6%; --s: 2.6; --in: 0.20s; }
.f1 img { object-position: center 35%; }
.f2 { left: 33.7%; top: 0.0%; width: 38.5%; height: 15.6%; --cx: -7.7%; --cy: 271.4%; --s: 2.18; --in: 0.95s; }
.f2 img { object-position: top left; }
.f3 { left: 34.1%; top: 17.1%; width: 35.9%; height: 16.7%; --cx: -5.7%; --cy: 147.3%; --s: 2.34; --in: 1.70s; }
.f3 img { object-position: center 30%; }
.f4 { left: 0.0%; top: 56.0%; width: 27.8%; height: 22.2%; --cx: 130.0%; --cy: -77.0%; --s: 2.52; --in: 2.45s; }
.f4 img { object-position: center 60%; }
.f5 { left: 71.5%; top: 17.8%; width: 28.5%; height: 18.9%; --cx: -125.3%; --cy: 120.6%; --s: 2.6; --in: 3.20s; }
.f5 img { object-position: center; }
.f6 { left: 0.0%; top: 36.7%; width: 43.7%; height: 17.6%; --cx: 64.4%; --cy: 25.9%; --s: 1.92; --in: 3.95s; }
.f6 img { object-position: center 30%; }
.f7 { left: 30.0%; top: 56.7%; width: 31.1%; height: 20.2%; --cx: 14.3%; --cy: -83.0%; --s: 2.6; --in: 4.70s; }
.f7 img { object-position: center 40%; }
.f8 { left: 73.7%; top: 0.7%; width: 26.3%; height: 15.6%; --cx: -140.1%; --cy: 267.1%; --s: 2.6; --in: 5.45s; }
.f8 img { object-position: center; }
.f9 { left: 51.9%; top: 80.4%; width: 48.1%; height: 18.4%; --cx: -53.8%; --cy: -215.1%; --s: 1.74; --in: 6.20s; }
.f9 img { object-position: top left; }
.f10 { left: 63.3%; top: 56.0%; width: 36.7%; height: 22.0%; --cx: -86.4%; --cy: -77.3%; --s: 2.29; --in: 6.95s; }
.f10 img { object-position: center 40%; }
.f11 { left: 45.9%; top: 36.0%; width: 54.1%; height: 18.4%; --cx: -42.5%; --cy: 25.9%; --s: 1.55; --in: 7.70s; }
.f11 img { object-position: center 30%; }
.f12 { left: 0.0%; top: 79.8%; width: 49.6%; height: 18.9%; --cx: 50.7%; --cy: -207.6%; --s: 1.69; --in: 8.45s; }
.f12 img { object-position: center 40%; }
.f13 { left: 0.0%; top: 0.0%; width: 31.9%; height: 15.6%; --cx: 107.0%; --cy: 271.4%; --s: 2.6; --in: 9.20s; }
.f13 img { object-position: center 35%; }

/* Homepage sections: a strong rule, the section name on the left, the content on the right. */
.sec {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 48px;
  padding: 24px 0 64px;
  border-top: 2px solid var(--ink);
}
.sec--last { padding-bottom: 48px; }
.sec__label {
  flex: 1 1 100%;
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.4;
}
.sec__body { flex: 999 1 620px; min-width: 0; }
.sec__body article + article { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line); }
.sec__text p { max-width: 640px; }
.sec h3 { margin: 0 0 10px; font-size: 1.75rem; line-height: 1.2; }
.sec h3 a { color: var(--ink); text-decoration: none; }
.sec h3 a:hover { text-decoration: underline; }
@media (min-width: 760px) {
  .sec { padding: 32px 0 88px; }
  .sec--last { padding-bottom: 56px; }
  .sec__label {
    flex: 1 1 180px;
    margin: 0;
    color: var(--ink);
    font-family: var(--serif);
    font-size: 1.625rem;
    font-weight: 400;
    line-height: 1.25;
  }
  .sec h3 { font-size: 2rem; }
}

.summary { max-width: 640px; margin-bottom: 28px; }
.shot { width: 100%; border-radius: 10px; }
.shot--line { border: 1px solid var(--line); }
.more { margin: 16px 0 0; }
.more a { display: inline-block; padding: 8px 0; font-weight: 600; }

.flow {
  margin: 0;
  padding: 16px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  list-style: none;
  font-size: 1rem;
  line-height: 1.9;
}
.flow li { display: inline; }
.flow li:not(:last-child)::after { content: " \2192 " / ""; }
.flow b { font-weight: 600; }

.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 0.875rem; }

.redline { margin: 0 0 24px; font-size: 1.1875rem; }
.redline del { color: var(--del); }
.redline ins { color: var(--link); text-decoration: none; }

figcaption { margin-top: 10px; color: var(--muted); font-size: 0.875rem; }

pre {
  margin: 0;
  font: 0.875rem/1.55 var(--mono);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.prompt { margin-bottom: 16px; padding: 16px 18px; border-radius: 12px; background: var(--panel); }

.excerpt { margin-top: 20px; overflow-x: auto; }
.excerpt table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.875rem; line-height: 1.4; }
.excerpt caption { margin-bottom: 8px; color: var(--muted); text-align: left; }
.excerpt th, .excerpt td { padding: 8px 12px 8px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.excerpt thead th { font-weight: 600; }
.excerpt tbody th { font-weight: 400; }
.excerpt tbody tr:last-child th, .excerpt tbody tr:last-child td { border-bottom: 0; }

.work-item { padding: 0 0 22px; }
.work-item:last-child { padding-bottom: 0; }
.work-item p { margin: 0 0 2px; color: var(--muted); font-size: 0.875rem; }
.sec .work-item h3 { margin: 0; font-size: 1.375rem; line-height: 1.3; }
.sec .work-item h3 a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

.contact-links { display: flex; flex-wrap: wrap; gap: 0 24px; }
.contact-links a { padding: 10px 0; font-weight: 600; }

.site-foot { padding: 24px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }


/* Relationships */
.who { display: flex; flex-wrap: wrap; gap: 8px 40px; margin: 0 0 48px; }
.who__group { flex: 1 1 240px; min-width: 0; padding-top: 14px; border-top: 1px solid var(--ink); }
.who h4 { margin: 0 0 6px; font-size: 0.9375rem; font-weight: 600; }
.who ul { margin: 0 0 16px; padding: 0; list-style: none; }
.who li { padding: 8px 0; border-bottom: 1px solid var(--line); line-height: 1.4; }
.who li:last-child { border-bottom: 0; }
.how { margin: 0; }
.how div { display: flex; flex-wrap: wrap; gap: 2px 32px; padding: 14px 0; border-top: 1px solid var(--line); }
.how dt { flex: 1 1 110px; font-weight: 600; }
.how dd { flex: 999 1 400px; max-width: 600px; margin: 0; }

/* Case pages */
.case-head { padding: 40px 0 40px; }
.case-head h1 { margin: 0 0 16px; font-size: clamp(2.125rem, 1.6rem + 2.4vw, 3.25rem); line-height: 1.1; }
.case-head .deck { margin: 0 0 12px; font-size: 1.3125rem; }
.case-head .redline { font-size: 1.3125rem; }
.case-head .tags { margin: 0; color: var(--muted); font-size: 0.875rem; }

.row { display: flex; flex-wrap: wrap; gap: 6px 48px; padding: 28px 0; border-top: 1px solid var(--line); }
.row h2 { flex: 1 1 150px; margin: 0; font-family: var(--sans); font-size: 0.9375rem; font-weight: 600; line-height: 1.6; }
.row__body { flex: 999 1 460px; min-width: 0; }
.row ol { margin: 0 0 16px; padding-left: 22px; }
.row li { margin-bottom: 6px; }
.row figure { margin-bottom: 20px; }
.row figure img { border-radius: 12px; }
.row b { font-weight: 600; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* Skip past the gallery: hidden until it has keyboard focus. */
.hero { position: relative; }
.skip-gallery:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip-gallery:focus { position: absolute; top: 0; right: 0; z-index: 5; padding: 10px 14px; background: var(--ink); color: var(--ground); }

/* High-contrast modes replace site colors, so keep meaning in shape and outline, not color. */
@media (forced-colors: active) {
  .redline ins { text-decoration: underline; }
  .float { outline: 1px solid CanvasText; }
  .float figcaption { border: 1px solid CanvasText; }
  .skip-gallery:focus, .skip:focus { outline: 2px solid CanvasText; }
}
