/* Filters — moved from work.css unchanged. */
.filters { display: flex; gap: 8px; margin-bottom: 40px; flex-wrap: wrap; }
.filter {
  font: inherit; font-size: 10px; letter-spacing: .04em; text-transform: uppercase;
  padding: 10px 16px; border: 1px solid var(--line-light); background: transparent;
  color: var(--ink); cursor: pointer; border-radius: 999px; transition: .18s;
}
.filter span { opacity: .45; margin-left: 6px; }
.filter.is-active { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.filter:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.route-note { font-size: 10px; color: #8a5a1a; margin-bottom: 16px; min-height: 14px; }
.route-note:empty { min-height: 0; margin-bottom: 0; }

/* .more-card sets display:flex, which beats the UA [hidden]
   default at equal specificity — this compound selector is more specific,
   so a filtered-out featured card actually disappears. */
.more-card[hidden] { display: none; }

/* Uniform grid for the remaining eight — same border/typography language as
   the featured cards, laid out with the auto-fill pattern moved from
   work.css's .gallery/.gcard. */
.more-grid {
  display: grid; gap: 1px; background: var(--line-light);
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  border: 1px solid var(--line-light); margin-top: 40px;
}
/* Card is a flex column (visual, then copy) so .more-copy can flex-fill the
   row's stretched height and pin its arrow to the bottom — without this,
   cards with a short blurb sit in the same grid row as a long one and their
   arrow floats high, well above the shared bottom border. */
.more-card { background: var(--paper); color: var(--ink); display: flex; flex-direction: column; min-width: 0; transition: background .2s; }
.more-card:hover { background: #e9e7e0; }
.more-card:focus-visible { outline: 2px solid var(--signal); outline-offset: -2px; }
.more-visual { position: relative; height: 240px; flex: none; overflow: hidden; background: #dedcd4; }
.more-copy { padding: 20px 18px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.more-copy .mono { font-size: 9px; }
.more-copy h3 { margin: 2px 0 0; font-size: 38px; line-height: 1; text-transform: uppercase; overflow-wrap: anywhere; }
.more-copy p { font-size: 14px; line-height: 1.35; margin: 0 0 4px; overflow-wrap: anywhere; }
.more-copy .case-arrow { margin-top: auto; }

/* Preview thumbnails, used inside every .more-visual. Each
   parent box has a fixed height (set above / in styles.css); the image just
   covers it, cropping instead of distorting. */
.visual-thumb { object-fit: cover; width: 100%; height: 100%; display: block; }
.embed-hint {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(10,10,10,.55); color: var(--paper); font-size: 11px;
  opacity: 0; transition: opacity .2s ease;
}
.more-card:hover .embed-hint, .more-card:focus-visible .embed-hint { opacity: 1; }

/* Full-screen viewer — replaces the old work.html detail pane. Opens on top
   of the page instead of navigating to it. */
.viewer[hidden] { display: none; }
.viewer {
  position: fixed; inset: 0; z-index: 60; background: var(--paper);
  display: flex; flex-direction: column;
}
.viewer-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px var(--pad); border-bottom: 1px solid var(--line-light); flex: none;
}
.viewer-bar p { margin: 0; color: var(--ink); font-size: 12px; overflow-wrap: anywhere; }
.viewer-close {
  font: inherit; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  background: var(--ink); color: var(--paper); border: 0; padding: 10px 18px;
  cursor: pointer; border-radius: 999px; flex: none;
}
.viewer-close:hover { background: var(--signal); color: var(--ink); }
.viewer-close:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; }
.viewer-body { flex: 1; min-height: 0; overflow-y: auto; color: var(--ink); }
.viewer-body.has-iframe { overflow: hidden; }
.viewer-iframe { width: 100%; height: 100%; border: 0; display: block; }
.viewer-prose { max-width: 760px; margin: 0 auto; padding: 40px var(--pad) 80px; }
.viewer-tag { font-size: 10px; opacity: .5; }
.viewer-blurb { font-size: 18px; line-height: 1.55; margin: 8px 0 32px; }
.viewer-fragment { font-size: 15px; line-height: 1.7; }
.viewer-fragment h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin: 32px 0 8px; }
.viewer-media { margin: 0 0 32px; }
.viewer-media video { width: 100%; display: block; background: #dedcd4; }
.viewer-media figcaption { font-size: 9px; opacity: .5; margin-top: 8px; }
.launch { display: inline-block; margin: 32px 0 0; padding: 14px 22px; background: var(--ink); color: var(--paper); text-decoration: none; font-size: 12px; }
.launch:hover { background: var(--signal); color: var(--ink); }
.viewer-stack { font-size: 10px; opacity: .5; margin-top: 24px; }

@media (max-width: 900px) {
  .more-visual { height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .embed-hint { transition: none; }
  .filter { transition: none; }
  .more-card { transition: none; }
}

/* The shared .section-head bottom margin (up to 150px) is tuned for a heading
   sitting directly above body content. Here it sits above a compact filter row,
   where that much air reads as a gap someone forgot to close. More specific
   selector, not a redefinition. */
.work .section-head { margin-bottom: clamp(32px, 4vw, 56px); }

/* Featured three: same card component as the grid below, in three columns so
   they read bigger. A 4/3 visual keeps them close to square at any width. */
.featured-grid {
  display: grid; gap: 1px; background: var(--line-light);
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line-light);
}
.featured-grid .more-visual { height: auto; aspect-ratio: 4 / 3; }

@media (max-width: 900px) {
  .featured-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
  .featured-grid .more-visual { height: 240px; aspect-ratio: auto; }
}
