/* Dedicated pages: work list, project pages, about, contact, 404.
   One idea per screen, a readable measure (~66ch) and the same family tokens as the bench. */

/* Page heads (work, about, contact, 404) */
.page-head { padding: clamp(28px, 5vw, 64px) 0 clamp(22px, 3.4vw, 40px); }
.page-head h1 { font: 700 var(--text-2xl)/1.05 var(--serif); letter-spacing: -.03em; margin-top: 10px; max-width: 22ch; text-wrap: balance; }
.page-intro { margin-top: 16px; max-width: 60ch; font-size: var(--text-l); line-height: 1.55; color: var(--ink-2); }
.text-arrow { display: inline-flex; align-items: center; gap: .4em; min-height: 44px; font-weight: 600; color: var(--accent-ink); }
.text-arrow:hover { color: var(--accent-hover); }

/* Breadcrumb */
.breadcrumb { padding-top: 14px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; align-items: center; margin: 0; padding: 0; list-style: none; font: 500 var(--text-xs)/1.4 var(--mono); letter-spacing: .04em; color: var(--ink-3); }
.breadcrumb li { display: inline-flex; align-items: center; }
.breadcrumb li + li::before { content: "/"; margin: 0 .7em; color: var(--line-strong); }
.breadcrumb a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink-2); }
.breadcrumb [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ project page */
.project-head { padding: clamp(8px, 2vw, 20px) 0 clamp(28px, 4vw, 48px); }
.project-head-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.project-head .eyebrow { color: var(--fam-ink); }
.project-head h1 { font: 700 var(--text-2xl)/1.06 var(--serif); letter-spacing: -.03em; margin-top: 10px; max-width: 20ch; text-wrap: balance; }
.project-lede { margin-top: 14px; max-width: 44ch; font: 400 var(--text-xl)/1.35 var(--serif); color: var(--ink-2); text-wrap: pretty; }
.project-head .chips { margin-top: 18px; }
.project-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.play-glyph { display: inline-block; width: 0; height: 0; border-left: 9px solid currentColor; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }

/* The project's object sits in a recessed tray, like its compartment on the bench. */
.project-head-art { display: grid; place-items: center; aspect-ratio: 4 / 3; padding: clamp(16px, 3vw, 34px); border-radius: var(--radius-l);
  background: radial-gradient(70% 60% at 50% 40%, color-mix(in srgb, var(--fam-tint) 70%, transparent), transparent 75%), linear-gradient(180deg, #e3d8c4, #ebe2d2 38%, #efe8dc);
  box-shadow: inset 0 4px 10px rgb(90 70 40 / 20%), inset 0 -1px 0 rgb(255 255 255 / 70%), 0 1px 0 rgb(255 255 255 / 80%); }
.project-head-art svg { width: 100%; height: 100%; max-height: 340px; filter: drop-shadow(0 10px 12px rgb(70 52 28 / 20%)); }

/* Case study + "at a glance" */
.project-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: clamp(28px, 5vw, 72px); align-items: start; padding: clamp(28px, 4vw, 48px) 0 clamp(40px, 6vw, 72px); border-top: 1px solid var(--line); }
.project-main { display: grid; gap: clamp(32px, 4.4vw, 48px); max-width: 68ch; }
.case-section h2 { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; font: 700 var(--text-xl)/1.2 var(--serif); letter-spacing: -.015em; color: var(--ink); }
.case-section h2:focus { outline: none; box-shadow: none; } /* focused only as a target when leaving the model */
.case-section h2::before { content: ""; flex: none; width: 6px; height: 1.05em; border-radius: 3px; background: var(--fam-accent); }
.case-section > p { font-size: var(--text-l); line-height: 1.65; color: var(--ink-2); }

.contrib-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.contrib-list li { position: relative; padding-left: 28px; font-size: var(--text-m); line-height: 1.65; color: var(--ink-2); }
.contrib-list li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 3px; background: var(--fam-tint); border: 2px solid var(--fam-ink); }

.decision-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: decision; }
.decision { counter-increment: decision; position: relative; padding: 18px 18px 18px 20px; border-radius: var(--radius-m); background: var(--porcelain); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.decision::before { content: counter(decision, decimal-leading-zero); display: block; margin-bottom: 8px; font: 700 var(--text-xs)/1.4 var(--mono); letter-spacing: .1em; color: var(--fam-ink); }
.decision h3 { font: 700 var(--text-m)/1.35 var(--serif); color: var(--ink); }
.decision p { margin-top: 6px; font-size: var(--text-s); line-height: 1.6; color: var(--ink-2); }

.project-main .boundary { position: relative; padding: 16px 18px 16px 50px; font-size: var(--text-m); line-height: 1.65; color: var(--ink-2); }
.project-main .boundary::before { content: "i"; position: absolute; left: 16px; top: 16px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--ink-3); font: 700 var(--text-xs)/1 var(--serif); font-style: italic; color: var(--ink-3); }

.project-aside { position: sticky; top: 88px; }
.glance { display: grid; gap: 16px; padding: 20px 22px 22px; border-radius: var(--radius-m); background: var(--porcelain); border: 1px solid var(--line); box-shadow: var(--shadow-1), inset 0 4px 0 var(--fam-accent); }
.glance-title { font: 600 var(--text-xs)/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.glance-list { display: grid; gap: 14px; margin: 0; }
.glance-list > div { display: grid; gap: 4px; }
.glance-list > div + div { padding-top: 14px; border-top: 1px dashed var(--line); }
.glance-list dt { font: 600 var(--text-xs)/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--fam-ink); }
.glance-list dd { margin: 0; font-size: var(--text-s); line-height: 1.55; color: var(--ink); }
.glance-list .plain-list { display: grid; gap: 2px; margin: 0; }
.glance-play { display: grid; gap: 10px; padding-top: 16px; border-top: 1px solid var(--line); }
.glance-hint { font: italic 400 var(--text-m)/1.45 var(--serif); color: var(--ink-2); }
.glance-play .button { justify-self: start; }
.glance-note { font: 600 var(--text-xs)/1.4 var(--mono); letter-spacing: .04em; color: var(--accent-ink); }

/* Previous / all / next */
.pager { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: stretch; padding: 28px 0 clamp(48px, 7vw, 88px); border-top: 1px solid var(--line); }
.pager-card { display: grid; gap: 4px; align-content: center; min-height: 84px; padding: 14px 18px; border-radius: var(--radius-m); background: var(--porcelain); border: 1px solid var(--line); text-decoration: none; transition: transform .2s var(--ease), border-color .2s, box-shadow .2s; }
.pager-card:hover { text-decoration: none; transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.pager-next { text-align: right; }
.pager-label { font: 600 var(--text-xs)/1.4 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.pager-prev .pager-label::before { content: "← "; }
.pager-next .pager-label::after { content: " →"; }
.pager-title { font: 700 var(--text-m)/1.3 var(--serif); color: var(--ink); }
.pager-title .object-no { margin-right: .3em; vertical-align: .1em; }
.pager-next .pager-title .object-no { flex-direction: row-reverse; }
.pager-all { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; align-self: center; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--paper); font-size: var(--text-s); font-weight: 600; color: var(--ink); text-decoration: none; }
.pager-all:hover { background: var(--paper-deep); text-decoration: none; }

/* ------------------------------------------------------------------ work list */
.work-list-section { padding-bottom: clamp(48px, 7vw, 88px); }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(14px, 1.8vw, 22px); margin: 0; padding: 0; list-style: none; }
.work-grid > li { display: flex; min-width: 0; }
.work-card { display: grid; grid-template-rows: auto 1fr; width: 100%; border-radius: var(--radius-m); background: var(--porcelain); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--ink); text-decoration: none; overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s, border-color .2s; }
.work-card:hover { text-decoration: none; transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-2); }
.work-card:focus-visible { outline-offset: 4px; }
.work-card-art { display: grid; place-items: center; height: 168px; padding: 16px 20px; background: radial-gradient(70% 70% at 50% 45%, color-mix(in srgb, var(--fam-tint) 75%, transparent), transparent 80%), linear-gradient(180deg, #e7ddcb, #efe8dc); box-shadow: inset 0 -1px 0 var(--line); }
.work-card-art svg { width: 100%; height: 100%; filter: drop-shadow(0 7px 8px rgb(70 52 28 / 18%)); transition: transform .3s var(--ease); }
.work-card:hover .work-card-art svg, .work-card:focus-visible .work-card-art svg { transform: translateY(-3px) rotate(-1deg); }
.work-card-text { display: grid; align-content: start; gap: 6px; padding: 16px 18px 18px; }
.work-card-title { font: 700 var(--text-l)/1.25 var(--serif); letter-spacing: -.01em; color: var(--ink); text-wrap: balance; }
.work-card-title .object-sub { font-size: var(--text-s); }
.work-card-lede { font-size: var(--text-s); line-height: 1.55; color: var(--ink-2); }
.work-card-status { justify-self: start; display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--fam-tint); color: var(--fam-ink); font: 600 var(--text-xs)/1.4 var(--mono); letter-spacing: .03em; }
.work-card-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
/* 01 is the centrepiece: a full-width card, so the other twelve fill even rows. */
.work-grid > li:first-child { grid-column: 1 / -1; }
.work-grid > li:first-child .work-card { grid-template-rows: auto; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); }
.work-grid > li:first-child .work-card-art { height: 280px; padding: 22px; box-shadow: inset -1px 0 0 var(--line); }
.work-grid > li:first-child .work-card-text { align-content: center; padding: clamp(20px, 3vw, 36px); }
.work-grid > li:first-child .work-card-title { font-size: var(--text-xl); }
.work-grid > li:first-child .work-card-lede { font-size: var(--text-m); max-width: 46ch; }
.work-note { margin-top: 26px; font-size: var(--text-s); color: var(--ink-2); }

/* ------------------------------------------------------------------ home */
.home-band { padding: clamp(48px, 7vw, 88px) 0; background: var(--porcelain); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.home-band-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px clamp(24px, 5vw, 72px); align-items: start; }
.home-band h2 { font: 700 var(--text-2xl)/1.05 var(--serif); letter-spacing: -.03em; margin-top: 10px; max-width: 18ch; text-wrap: balance; }
.home-band-copy p { max-width: 54ch; font-size: var(--text-l); line-height: 1.6; color: var(--ink-2); }
.home-band-copy p + p { margin-top: 12px; }
.contact-compact .contact-copy p + p { margin-top: 8px; }

/* ------------------------------------------------------------------ about */
.about-page { padding-bottom: clamp(48px, 7vw, 88px); }
.panel-title { margin-bottom: 14px; font: 600 var(--text-xs)/1.5 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }

/* ------------------------------------------------------------------ contact */
.contact-page { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: clamp(24px, 5vw, 64px); align-items: start; padding-bottom: clamp(48px, 7vw, 88px); }
.contact-page-links, .hello-inline { padding: clamp(20px, 3vw, 30px); border-radius: var(--radius-l); background: var(--porcelain); border: 1px solid var(--line); box-shadow: var(--shadow-1); }
.hello-inline { display: grid; gap: 10px; }
.hello-inline .panel-title { margin-bottom: 0; }
.hello-lead { font-size: var(--text-s); line-height: 1.55; color: var(--ink-2); }
.hello-inline label { margin-top: 8px; font-weight: 600; font-size: var(--text-s); color: var(--ink-2); }
.hello-inline select, .hello-inline textarea { width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid #8c877b; background: #fff; font-size: 1rem; line-height: 1.5; }
.hello-inline select { min-height: 44px; }
.hello-inline textarea { resize: vertical; min-height: 170px; }
.hello-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.hello-status, .hello-swap { font-size: var(--text-s); color: var(--ink-3); }
.link-button { border: 0; padding: 0; background: none; color: var(--accent-ink); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; min-height: 44px; }

/* ------------------------------------------------------------------ 404 */
.page-404 { padding-bottom: clamp(64px, 10vw, 140px); }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .project-head-grid { grid-template-columns: minmax(0, 1fr); }
  .project-head-art { order: -1; max-width: 520px; aspect-ratio: 16 / 9; }
  .project-layout { grid-template-columns: minmax(0, 1fr); }
  .project-aside { position: static; order: -1; }
  .glance-play { display: none; } /* the header's Play button is just above */
  .home-band-grid, .contact-page { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 720px) {
  .project-head-art { aspect-ratio: auto; height: 150px; padding: 12px; }
  .project-head-art svg { max-height: 124px; }
  .project-lede { font-size: var(--text-l); }
  .project-actions .button { flex: 1 1 auto; }
  .case-section > p { font-size: var(--text-m); }
  .pager { grid-template-columns: minmax(0, 1fr); }
  .pager-next { text-align: left; }
  .pager-spacer { display: none; }
  .pager-all { order: 3; justify-self: start; }
  .work-card { grid-template-rows: auto; grid-template-columns: 104px minmax(0, 1fr); }
  .work-card-art { height: auto; min-height: 100%; padding: 10px; box-shadow: inset -1px 0 0 var(--line); }
  .work-card-text { padding: 14px 14px 16px; }
  .work-card-lede { display: none; }
  .work-grid > li:first-child .work-card { grid-template-columns: 104px minmax(0, 1fr); }
  .work-grid > li:first-child .work-card-art { height: auto; padding: 10px; }
  .work-grid > li:first-child .work-card-text { padding: 14px 14px 16px; }
  .work-grid > li:first-child .work-card-title { font-size: var(--text-l); }
}

@media (prefers-reduced-motion: reduce) {
  .work-card:hover, .pager-card:hover, .work-card:hover .work-card-art svg, .work-card:focus-visible .work-card-art svg { transform: none; }
}
@media (forced-colors: active) {
  .work-card, .pager-card, .glance, .decision, .hello-inline, .contact-page-links { border: 1px solid CanvasText; }
  .case-section h2::before { background: CanvasText; }
}
@media print {
  .project-actions, .glance-play, .pager, .breadcrumb, .project-head-art { display: none !important; }
  .project-layout { grid-template-columns: minmax(0, 1fr); }
  .project-aside { position: static; }
}
