/* The component kit (16 Oct 2026, approved by David on the component sheet: phone menu B, filters B, tags B, Next
   project B, control labels at 12 px). Motion: 150 to 250 ms on cubic-bezier(0.23, 1, 0.32, 1), a 0.96 press on
   buttons, hover only where a fine pointer can hover. Proof of every state: proof/components/. */
:root { --ease-ui: cubic-bezier(0.23, 1, 0.32, 1); --fs-control: 0.75rem; }

/* controls read at 12 px (better-typography: interface text rarely under 12 px); quiet eyebrows stay at 10.5 */
.nav .places a, .nav .places span, .legend a .n, .legend a .t, .wx-filter button, .wx-pause, .spot .meta, .c-open .toc a,
.c-end .label, .foot-meta, .skip, .idx-btn, .sh-source { font-size: var(--fs-control); letter-spacing: 0.12em; }

/* pressed: buttons give a little under the finger; links dim */
:is(.wx-filter button, .wx-pause, .idx-btn) { transition: transform 150ms var(--ease-ui), color 150ms var(--ease-ui), background-color 200ms var(--ease-ui); }
:is(.wx-filter button, .wx-pause, .idx-btn):active { transform: scale(0.96); }
:is(.link, .nav .places a, .foot-link, .next-card):active { opacity: 0.72; }

/* Pause motion: pressed shows a filled dot before the label (the label itself never changes) */
.wx-pause::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.25px currentColor; margin-right: 10px; vertical-align: 1px; }
.wx-pause[aria-pressed="true"] { color: var(--ink); }
.wx-pause[aria-pressed="true"]::before { background: currentColor; }

/* phones: once the top bar has scrolled away, the Index button floats in the corner, so the menu is always one tap away */
@media (max-width: 819px) {
  .nav .idx-btn.is-floating { position: fixed; top: calc(10px + env(safe-area-inset-top, 0px)); right: max(var(--m), env(safe-area-inset-right, 0px)); z-index: 40;
    background: var(--ink); color: var(--paper); border-color: var(--ink); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35); }
}
.idx-menu { scroll-padding-top: 72px; }

/* source tags, B: a credit line. Hollow circle = self-initiated, solid square = client (shape and fill, not colour) */
.src { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; color: var(--ink-2); }
.src::before { content: ''; flex: none; width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.25px currentColor; }
.src-client { color: var(--ink); }
.src-client::before { background: currentColor; border-radius: 1px; box-shadow: none; }
.spot .src, .spot .src-client { border: 0; border-radius: 0; padding: 0; background: none; }
.spot .src-client { color: var(--ink); }

/* work filters, B: editorial tabs with counts, a rule under the row, the selected tab underlined */
.wx-filter { gap: 26px; border-bottom: 1px solid var(--hair); }
.wx-filter button { border: 0; border-radius: 0; padding: 14px 0 12px; color: var(--ink-3); position: relative; }
.wx-filter button sup { font-size: 0.625rem; margin-left: 0.35em; letter-spacing: 0.04em; color: var(--ink-3); }
.wx-filter button[aria-pressed="true"] { background: none; color: var(--ink); }
.wx-filter button[aria-pressed="true"]::after { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }
@media (hover: hover) { .wx-filter button:hover { color: var(--ink); } }

/* Next project, B: a small card of the next project, its own picture from the wall */
.c-end .back { display: grid; gap: 22px; }
.next-card { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: 20px; align-items: end; color: var(--ink); max-width: 34rem; }
.next-card .im { aspect-ratio: 16 / 10; overflow: hidden; background: var(--paper-2); box-shadow: 0 24px 40px -24px rgba(40, 32, 20, 0.6); }
.next-card .im img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease-ui); }
.next-card .nm { display: block; font-family: var(--serif); font-size: clamp(2rem, 3vw, 2.75rem); letter-spacing: -0.045em; line-height: 1; margin-top: 8px; transition: transform 250ms var(--ease-ui); }
@media (hover: hover) { .next-card:hover .im img { transform: scale(1.04); } .next-card:hover .nm { transform: translateX(6px); } }
.next-card:focus-visible .nm { transform: translateX(6px); }
@media (max-width: 519px) { .next-card { grid-template-columns: minmax(0, 1fr); } }


/* the phone menu, B: one Index button opens a full-screen sheet (a modal dialog) */
.idx-btn { display: none; align-items: center; min-height: 44px; padding: 0 16px; border: 1px solid var(--hair); border-radius: 999px; color: var(--ink); }
@media (max-width: 819px) {
  .nav .places, .nav .brief { display: none; }
  .nav .idx-btn { display: inline-flex; }
}
.idx-menu { --paper: #1B1916; --paper-2: #26221E; --ink: #F3ECDF; --ink-2: #E2DACB; --ink-3: #CFC6B6; --hair: rgba(241, 234, 220, 0.24); --focus: #F3ECDF;
  position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(20, 18, 16, 0.97); color: var(--ink); overflow-y: auto; }
.idx-menu::backdrop { background: rgba(10, 9, 8, 0.6); }
.idx-menu .idx-bar { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 0 var(--m);
  position: sticky; top: 0; background: rgba(20, 18, 16, 0.97); z-index: 1; }
.idx-menu .idx-btn { display: inline-flex; background: var(--ink); color: var(--paper); border-color: var(--ink); }
.idx-menu .idx-body { padding: 8px var(--m) 48px; }
.idx-menu .idx-grp { color: var(--ink-3); margin: 24px 0 4px; }
.idx-menu ul { list-style: none; margin: 0; padding: 0; }
.idx-menu li a { display: grid; grid-template-columns: 3em minmax(0, 1fr); column-gap: 10px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--hair); color: var(--ink); }
.idx-menu li a .n { color: var(--ink-3); }
.idx-menu li a .nm { font-family: var(--serif); font-size: 2.1rem; letter-spacing: -0.04em; line-height: 1.05; }
.idx-menu li a .src { grid-column: 2; margin-top: 6px; font-size: var(--fs-control); }
.idx-menu li a[aria-current="page"] .nm { font-style: italic; }
.idx-menu .small-links a { display: block; padding: 14px 0; font-size: 1rem; font-weight: 500; }
@media (prefers-reduced-motion: no-preference) {
  .idx-menu[open] { animation: idx-in 250ms var(--ease-ui); }
  @keyframes idx-in { from { opacity: 0; transform: translate3d(0, 12px, 0); } to { opacity: 1; transform: none; } }
}
html.menu-open { overflow: hidden; }
@media (forced-colors: active) {
  .idx-btn, .idx-menu li a { border-color: CanvasText; }
  .src::before { forced-color-adjust: none; box-shadow: inset 0 0 0 1.25px CanvasText; }
  .src-client::before { background: CanvasText; }
  .wx-filter button[aria-pressed="true"]::after { background: Highlight; }
}
