/* Case studies in the alt style (index.html, about.html): a centered 1040px
   column, 200px label column + 40px gap + 800px main, Redaction and Inter
   on paper. The case-study content keeps its original proj-* markup; this file
   restyles it. Pairs with case-alt.js. */
:root {
  --paper: #FFFFFF;   /* white */
  --ink: #111111;
  --muted: #767676;
  --body: #444;
  --tile: #EDEFF2;
  --tile-line: #E0E3E7;
  --display: "redaction", Georgia, "Times New Roman", serif;
  --serif: "redaction", Georgia, "Times New Roman", serif;          /* longer serif text */
  --sans: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --left: max(20px, calc((100vw - 1040px) / 2));
  --radius: 16px;
  /* names the page-specific stylesheets (pipeline.css, someone-interesting.css) read */
  --black: var(--ink); --white: #fff; --line: var(--tile-line); --mid: #525252; --mid-500: #7A7A7A;
  --media-radius: var(--radius); --mono: var(--sans);
  --hot: #FF4A1C;   /* a bright red-orange, for link hovers and arrows */
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper); color: var(--ink);
  font-family: var(--sans); font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
p, h1, h2, h3, h4, dl, dd, ol, ul, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 4px; }
button { font: inherit; color: inherit; }
img { max-width: 100%; }
code { font-size: .92em; }

/* ─── Header (same as the home and About pages) ─── */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 10;
  display: flex; justify-content: space-between; align-items: center;
  --head-x: min(64px, var(--left));
  padding: 24px var(--head-x); color: #fff; mix-blend-mode: difference;
  font-size: 14px; font-weight: 500; letter-spacing: -0.01em;
}
.top nav { display: flex; gap: 24px; align-items: center; }
body::before {
  content: ""; position: fixed; inset: 0 0 auto 0; height: 84px; z-index: 9; pointer-events: none;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(#000 55%, transparent); mask-image: linear-gradient(#000 55%, transparent);
}
.top .sound, .top > a, .top nav > a { position: relative; z-index: 2; }
.top .sound::after, .top > a::after, .top nav > a::after { content: ""; position: absolute; inset: -12px; }
.sound { display: none; align-items: center; padding: 0; border: 0; background: none; cursor: pointer; width: 18px; height: 18px; }
.sound svg { width: 18px; height: 18px; }

/* ─── Strings: the header's, and one above each section. shared.js plays them. ─── */
.string-zone { height: 40px; display: flex; align-items: center; cursor: pointer; }
.string-svg { width: 100%; height: 36px; display: block; overflow: visible; }
.string-path { stroke: var(--ink); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; transition: stroke .15s; }
.string-path.played { stroke: #236860; }
.string-path.played-muted { stroke: #c0392b; }
.top .head-string { position: absolute; top: 38px; left: var(--head-x); right: var(--head-x); }
.top .string-path { stroke: #fff; }
.top .string-path.played { stroke: #D28D95; }
.top .string-path.played-muted { stroke: #35BCCA; }
.divider { padding: 0 var(--left); margin: 160px 0 56px; }
/* hidden until the header string is strummed, then they fade in top to bottom */
.divider .string-zone { opacity: 0; pointer-events: none; transition: opacity .9s ease; }
body.strings-on .divider .string-zone { opacity: 1; pointer-events: auto; }
.head-string .string-svg { opacity: .15; transition: opacity .9s ease; }
body.strings-on .head-string .string-svg { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .divider .string-zone, .head-string .string-svg { transition: none; } }
#img-lightbox { display: none; }

/* ─── Layout ─── */
.grid {
  display: grid; grid-template-columns: 200px minmax(0, 800px); column-gap: 40px;
  padding: 0 var(--left);
}
.label { margin: 0; color: var(--muted); font-size: 16px; font-weight: 400; line-height: 1.5; }

/* Intro: the org tile in the label column, the title and description beside it (as on home) */
.intro { padding-top: 200px; }
.org { display: flex; align-items: flex-start; padding-top: 8px; }
.tile { width: 56px; height: 56px; border-radius: 12px; background: #fff; border: 1px solid var(--tile-line); display: grid; place-items: center; overflow: hidden; transition: opacity .15s; }
.tile:hover { opacity: .7; text-decoration: none; }
.mark { display: block; width: 32px; height: 32px; }
.tile-fill .mark { width: 100%; height: 100%; object-fit: cover; }
.mark-ni { border-radius: 50%; background: radial-gradient(circle, #3CFF14 0 48%, rgba(60, 255, 20, .55) 62%, rgba(60, 255, 20, 0) 72%); }
.title { font-family: var(--display); font-weight: 400; font-size: 56px; line-height: 1.5; letter-spacing: -0.02em; margin: 0; text-wrap: balance; overflow-wrap: break-word; }
.desc { margin: 2px 0 0; }

/* Lead image: the full 1040px column, like About's photo */
.lead { margin: 56px var(--left) 0; border-radius: var(--radius); overflow: hidden; background: var(--tile); border: 1px solid var(--tile-line); }
.lead img { display: block; width: 100%; height: auto; }
.lead.si-lead { background: #fff; }

/* Overview: the facts in one row across the full column, under the lead image,
   then the summary in the content column */
.overview { margin-top: 48px; }
.meta { grid-column: 1 / -1; margin: 0 0 64px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 40px; }
.meta div { display: flex; flex-direction: column; }
.meta dt { color: var(--muted); margin-bottom: 2px; }
.meta dd { margin: 0; }
.overview-copy { grid-column: 2; }
.overview-copy > p { max-width: 640px; color: var(--body); }
.overview-copy > p + p { margin-top: 16px; }
.overview-copy > p:first-child { font-family: var(--serif); font-size: 22px; line-height: 1.5; letter-spacing: -0.01em; color: var(--ink); max-width: none; margin-bottom: 24px; text-wrap: pretty; }
.more a:hover, .links a:hover, .fine a:hover, .proj-row-cta a:hover, .next-card:hover .next-name { color: var(--hot); }
.more { margin-top: 24px; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; display: flex; flex-wrap: wrap; gap: 12px 24px; }
.note { color: var(--muted); }

/* ─── Sections: a string above, the name in the label column (as on About) ─── */
.sec { scroll-margin-top: 100px; }
.sec-title { padding-top: 4px; }
.sec-body { min-width: 0; }
.sec-body > * + * { margin-top: 80px; }
.sec-body > .proj-railhead + *, .sec-body > .proj-prose + .proj-prose { margin-top: 40px; }
.sec-body > .proj-ph + .pl-ph-pair, .sec-body > .proj-prose + figure, .sec-body > .proj-prose + .pl-ph-pair,
.sec-body > .proj-railhead + figure { margin-top: 40px; }

/* Copy: About's scale. 26px serif for a section's key line, 22px serif for
   subheadings, 16px for everything else. */
.proj-row-copy, .proj-prose, .proj-railhead { max-width: 640px; }
.proj-row-copy p, .proj-prose p, .proj-figblock-lede, .proj-prose li { color: var(--body); }
.proj-row-copy > * + *, .proj-prose > * + *, .proj-railhead > * + * { margin-top: 16px; }
.proj-thesis { font-family: var(--serif); font-size: 22px; line-height: 1.5; letter-spacing: -0.01em; font-weight: 400; color: var(--ink) !important; text-wrap: pretty; }
.proj-figblock-title { font-family: var(--display); font-size: 22px; line-height: 1.5; letter-spacing: -0.01em; font-weight: 400; text-wrap: pretty; }
.proj-demo-name { font-size: 16px; font-weight: 500; letter-spacing: -0.01em; }
.proj-row-cta { font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.proj-row-cta a { color: var(--ink); }
.proj-row-copy a:not(.proj-row-cta a), .proj-prose a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* A row is its copy, then its media below across the content column */
.proj-row { display: flex; flex-direction: column; gap: 32px; }

/* Figures: full width; two images sit side by side */
.proj-row-media > img, .proj-row-media > video {
  display: block; width: 100%; height: auto; border-radius: var(--radius);
  border: 1px solid var(--tile-line); background: var(--tile);
}
.proj-row-media:has(> img + img) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.proj-row-media:has(> img + img) > figcaption { grid-column: 1 / -1; margin-top: 0; }
.proj-row-media:has(> img + img) > img { aspect-ratio: 4 / 3; object-fit: cover; }
figcaption, .si-artifact-note { margin-top: 12px; font-size: 13px; line-height: 1.45; color: var(--muted); letter-spacing: normal; text-transform: none; }

/* Lists */
.proj-list { list-style: none; padding: 0; counter-reset: item; border-top: 1px solid var(--tile-line); }
.proj-list li { counter-increment: item; display: grid; grid-template-columns: 40px minmax(0, 1fr); padding: 18px 0; border-bottom: 1px solid var(--tile-line); color: var(--body); }
.proj-list li::before { content: counter(item, decimal-leading-zero); font-family: var(--serif); color: var(--muted); font-size: 15px; }
.proj-list li strong { color: var(--ink); font-weight: 500; }

/* What I did */
.proj-contrib { max-width: 800px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 40px; margin: 0; }
.proj-contrib dt { font-weight: 500; margin-bottom: 6px; }
.proj-contrib dd { margin: 0; font-size: 16px; }

/* Integration options */
.proj-ladder { max-width: 800px; background: #fff; border: 1px solid var(--tile-line); border-radius: var(--radius); padding: 0 24px; }
.proj-ladder-tier { padding: 22px 0; border-bottom: 1px solid var(--tile-line); }
.proj-ladder-tier:last-child { border-bottom: 0; }
.proj-ladder-head { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 0 12px; align-items: start; }
.proj-ladder-n { font-family: var(--serif); color: var(--muted); font-size: 15px; padding-top: 3px; }
.proj-ladder-name { font-family: var(--display); font-weight: 400; font-size: 22px; line-height: 1.3; letter-spacing: -0.01em; }
.proj-ladder-kind { display: block; margin-top: 4px; font-family: var(--sans); font-size: 14px; letter-spacing: 0; color: var(--muted); }
.proj-ladder-dots { display: inline-flex; gap: 5px; padding-top: 9px; }
.proj-ladder-dots i { width: 8px; height: 8px; border-radius: 50%; border: 1px solid #BDBDBD; }
.proj-ladder-dots i.on { background: var(--ink); border-color: var(--ink); }
.proj-ladder-desc, .proj-ladder-control { margin: 12px 0 0 48px !important; font-size: 15px; color: var(--body); }
.proj-ladder-control { color: #7A7A7A; }
.proj-ladder-control b { font-weight: 500; color: var(--ink); }

/* Live demos */
.proj-embed-bar { display: flex; justify-content: space-between; gap: 16px; padding: 12px 16px; background: var(--ink); color: #F5F5F5; font-size: 13px; border-radius: var(--radius) var(--radius) 0 0; }
.proj-embed-state { opacity: .7; }
.proj-embed-dot { display: inline-block; width: 7px; height: 7px; margin-right: 9px; border-radius: 50%; background: #3CFF14; vertical-align: middle; }
.proj-embed-frame, .proj-demo-frame { position: relative; width: 100%; overflow: hidden; background: var(--tile); border: 1px solid var(--tile-line); }
.proj-embed-frame { height: clamp(560px, 50vw, 760px); border-radius: 0 0 var(--radius) var(--radius); border-top: 0; }
.proj-demo-frame { height: var(--frame-h, clamp(400px, 36vw, 520px)); border-radius: var(--radius); }
.proj-embed-frame iframe, .proj-demo-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }
.proj-video { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--ink); }
.proj-video iframe { display: block; width: 100%; height: 100%; border: 0; }

/* Outcome numbers */
.proj-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; border-top: 1px solid var(--tile-line); padding-top: 24px; }
.proj-stat-n { font-family: var(--display); font-size: 40px; line-height: 1.2; letter-spacing: -0.02em; }
.proj-stat-d { margin-top: 10px; font-size: 14px; color: #7A7A7A; }

/* Customer marks: run under the whole column */
.proj-logos-fig { margin-top: 96px; }
.proj-logos-title { margin: 0 0 24px; color: var(--muted); font-size: 16px; }
.proj-logos-marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.proj-logos { --logo-gap: 64px; list-style: none; margin: 0; display: flex; align-items: center; gap: var(--logo-gap); width: max-content; padding: 8px var(--logo-gap) 8px 0; animation: logoRun 60s linear infinite; }
.proj-logos li { flex: none; display: flex; align-items: center; }
.proj-logos img { display: block; height: calc(var(--logo-h, 26px) * 1.3); width: auto; filter: grayscale(1); opacity: .75; }
.proj-logos-marquee:hover .proj-logos { animation-play-state: paused; }
@keyframes logoRun { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .proj-logos { animation: none; } .proj-logos-marquee { overflow-x: auto; } }

/* Video tiles (thesis) */
.proj-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 24px; }
.proj-tile { margin: 0; }
.proj-vid { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tile); border: 1px solid var(--tile-line); border-radius: 12px; cursor: pointer; }
.proj-vid video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vid-btn { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; border: 0; background: rgba(0, 0, 0, .12); cursor: pointer; transition: opacity .2s, background .2s; }
.vid-btn svg { width: 40px; height: 40px; fill: #fff; filter: drop-shadow(0 1px 6px rgba(0, 0, 0, .35)); }
.vid-btn .icon-pause { display: none; }
.proj-vid.vid-playing .vid-btn { opacity: 0; background: transparent; }
.proj-vid.vid-playing:hover .vid-btn { opacity: 1; }
.proj-vid.vid-playing .icon-play { display: none; }
.proj-vid.vid-playing .icon-pause { display: block; }
.proj-tile figcaption { margin-top: 14px; }
/* screen recordings (16:10) and phone-shaped clips (9:16), four across */
.proj-tiles--wide .proj-vid { aspect-ratio: 16 / 10; }
.proj-tiles--portrait { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px 16px; }
.proj-tiles--portrait .proj-vid { aspect-ratio: 9 / 16; background: #fff; }
.proj-tiles--portrait .vid-btn svg { width: 32px; height: 32px; }
.proj-clips > figcaption { margin-top: 24px; }
.proj-tile-name { display: block; color: var(--ink); font-weight: 500; font-size: 15px; margin-bottom: 4px; }
.proj-tile-num { font-family: var(--serif); font-weight: 400; color: var(--muted); margin-right: 8px; }
.proj-tile-note { display: block; font-size: 14px; line-height: 1.5; color: #7A7A7A; }

/* Placeholders (Pipeline) */
.proj-ph-box { display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: clamp(20px, 3vw, 40px); border: 1px dashed #BDBDBD; border-radius: var(--radius); background: rgba(0, 0, 0, .025); min-height: 200px; }
.proj-ph-kind { font-size: 12px; color: var(--muted); }
.proj-ph-title { font-family: var(--display); font-size: 20px; letter-spacing: -0.01em; }
.proj-ph-desc { font-size: 14px; color: #7A7A7A; max-width: 34rem; }
.lead.proj-ph { background: none; border: 0; }
.lead.proj-ph .proj-ph-box { aspect-ratio: 16 / 9; }

/* ─── Next project and footer ─── */
.next { margin-top: 200px; }
.next-card { display: block; color: inherit; text-decoration: none; }
.next-media { display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: var(--radius); background: var(--tile); border: 1px solid var(--tile-line); }
.next-media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.next-card:hover .next-media img, .next-card:focus-visible .next-media img { transform: scale(1.025); }
.next-name { display: block; margin-top: 24px; font-family: var(--display); font-size: 26px; line-height: 1.4; letter-spacing: -0.02em; color: var(--ink); }
.next-desc { display: block; margin-top: 4px; font-size: 16px; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .next-media img { transition: none; } }
footer { padding: 240px var(--left) 64px; }
footer .grid { padding: 0; }
.say { font-family: var(--display); font-size: 56px; letter-spacing: -0.02em; line-height: 1.5; margin: 0 0 12px; font-weight: 400; }
.links { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; font-weight: 500; letter-spacing: -0.01em; }
.fine { margin-top: 160px; display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }

/* ─── Phone ─── */
/* Image tiles: storyboards and light studies, two across */
.proj-tiles--img .proj-tile > img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: contain; border-radius: 12px; border: 1px solid var(--tile-line); background: #000; }
.lead video { display: block; width: 100%; height: auto; }

/* Two figures side by side (before and after, considered and chosen) */
.proj-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; align-items: start; }
.sec-body > .proj-prose + .proj-pair, .sec-body > .proj-ph + .proj-pair, .sec-body > .proj-prose + .proj-table-fig,
.sec-body > .proj-table-fig + .proj-prose { margin-top: 40px; }

/* Two-column comparison: what we heard and what it meant */
.proj-table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.5; }
.proj-table th { text-align: left; font-weight: 400; font-size: 14px; color: var(--muted); padding: 0 24px 12px 0; border-bottom: 1px solid var(--tile-line); }
.proj-table td { vertical-align: top; padding: 18px 24px 18px 0; border-bottom: 1px solid var(--tile-line); color: var(--body); width: 50%; }
.proj-table td:first-child { color: var(--ink); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 760px) {
  .proj-pair { grid-template-columns: minmax(0, 1fr); }
  .proj-table thead { display: none; }
  .proj-table tr { display: block; padding: 16px 0; border-bottom: 1px solid var(--tile-line); }
  .proj-table td { display: block; width: auto; padding: 0; border: 0; }
  .proj-table td + td { margin-top: 6px; }
  .proj-table tbody { border-top: 1px solid var(--tile-line); display: block; }
  .top { padding: 18px 20px; }
  .top .head-string { top: 30px; left: 20px; right: 20px; }
  .grid { grid-template-columns: minmax(0, 1fr); row-gap: 8px; }
  .intro { padding-top: 112px; }
  .org { padding-top: 0; }
  /* the logo sits beside the title, smaller, instead of on its own row */
  .intro.grid { grid-template-columns: 40px minmax(0, 1fr); column-gap: 14px; align-items: start; }
  .org .tile { width: 40px; height: 40px; border-radius: 10px; }
  .org .mark:not(.tile-fill .mark) { width: 24px; height: 24px; }
  .title, .say { font-size: 30px; }
  .lead { margin-top: 28px; }
  .overview { margin-top: 28px; }
  .meta { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 24px; margin-bottom: 32px; font-size: 15px; }
  .overview-copy { grid-column: 1; }
  .overview-copy > p:first-child, .proj-thesis { font-size: 18px; }
  .proj-figblock-title { font-size: 19px; }
  .divider { margin: 72px 0 24px; }
  .sec-title { padding-top: 0; margin-bottom: 12px; }
  .sec-body > * + * { margin-top: 48px; }
  .sec-body > .proj-prose + .proj-prose, .sec-body > .proj-prose + figure, .sec-body > .proj-prose + .proj-pair,
  .sec-body > .proj-prose + .proj-table-fig, .sec-body > .proj-table-fig + .proj-prose { margin-top: 28px; }
  /* numbered lists: the number above each item, so the text gets the full width */
  .proj-list li { display: block; padding: 16px 0; }
  .proj-list li::before { display: block; margin-bottom: 4px; font-size: 14px; }
  /* tall, phone-shaped figures stay two across */
  .proj-pair--tall { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .proj-ph-box { min-height: 160px; padding: 20px; }
  .proj-ph-title { font-size: 17px; }
  .next-name { font-size: 21px; margin-top: 16px; }
  .proj-contrib, .proj-stats { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .proj-tiles { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .proj-tiles--portrait { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 12px; }
  .proj-ladder { padding: 0 16px; }
  .proj-ladder-desc, .proj-ladder-control { margin-left: 0 !important; }
  .proj-embed-frame { height: 560px; }
  .proj-logos { --logo-gap: 40px; }
  .next { margin-top: 96px; }
  footer { padding-top: 112px; }
}

/* Key moments run the full 1040px column, out across the label column: the live
   calling demo and the clip grids. The text around them stays in the content column. */
@media (min-width: 761px) {
  .sec-body > .proj-embed,
  .sec-body > .proj-tiles--video,
  .sec-body > .proj-logos-fig,
  .proj-clips {
    margin-left: -240px; width: calc(100% + 240px);
  }
}
