/* Design portfolio: the home's world (bfs.css) with image-led cards and a full case view. */
.port-hero { padding: 46px var(--pad) 30px; }
.port-hero h1 { margin: 36px 0 34px; font-weight: 700; line-height: .86; text-transform: uppercase; }
.port-hero h1 .row { display: table; white-space: nowrap; font-size: clamp(46px, 9vw, 180px); letter-spacing: -.07em; }
.port-hero h1 .row-2 { color: var(--blue); }
.port-lead { max-width: 38ch; font-size: clamp(20px, 1.8vw, 28px); font-weight: 700; line-height: 1.2; letter-spacing: -.025em; }

.port-work { padding: 34px var(--pad) 104px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; padding: 26px 0 38px; border-top: 1px solid var(--ink); }
.filters button { padding: 10px 18px; background: transparent; border: 1px solid var(--rule); border-radius: 999px; font-size: 14px; color: var(--ink); transition: border-color .2s, background .2s, color .2s; }
.filters button:hover { border-color: var(--ink); }
.filters button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 52px 24px; }
.card[hidden] { display: none; }
.card a { display: block; text-decoration: none; }
.card-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--ground-2); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2, .8, .3, 1); }
.card a:hover .card-img img { transform: scale(1.035); }
.card-meta { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-top: 14px; }
.card-meta strong { font-size: clamp(20px, 1.6vw, 26px); letter-spacing: -.03em; line-height: 1.1; }
.card-meta span { font-size: 14px; color: var(--muted); text-align: right; }
.card-count { display: block; margin-top: 6px; color: var(--muted); }
.card a:hover strong { color: var(--blue); }

.port-others { background: var(--ground-2); }
.port-consult .btn { margin-top: 4px; }

/* The case view: one project, all its images, previous / next / close. */
html.case-open { overflow: hidden; }
.case-dialog { width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: var(--ground); color: var(--ink); overflow: auto; }
.case-dialog::backdrop { background: rgba(16, 16, 16, .55); }
.case-bar { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; justify-content: flex-end; gap: 26px; height: 64px; padding: 0 var(--pad); background: var(--ground); border-bottom: 1px solid var(--rule); }
.case-bar button { padding: 8px 0; background: none; border: 0; font-size: 14px; }
.case-bar button:hover { color: var(--blue); }
.case-close { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; }
.case-close .plus { font-size: 28px; line-height: .7; transform: rotate(45deg); }
.case-body { padding: 48px var(--pad) 104px; }
.case { max-width: 1180px; margin: 0 auto; }
.case-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px 6%; align-items: start; margin-bottom: 44px; }
.case-head h2, .case-summary { text-box: trim-start cap alphabetic; }
.case-head .mono { grid-column: 1 / -1; color: var(--muted); }
.case-head h2 { font-size: clamp(40px, 5.5vw, 88px); }
.case-summary { max-width: 46ch; font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; }
.case-images { display: grid; gap: 24px; }
.case-images img { width: 100%; height: auto; background: var(--ground-2); }
/* The long series: a grid or the sequence, switched from a pill at the bottom of the case */
.case-views { position: fixed; left: 50%; bottom: 20px; z-index: 3; display: none; gap: 4px; padding: 5px; background: var(--ink); border-radius: 999px; transform: translateX(-50%); box-shadow: 0 10px 30px rgba(16, 16, 16, .22); }
.case-dialog.has-views .case-views { display: flex; }
.case-views button { padding: 10px 18px; background: none; border: 0; border-radius: 999px; color: #fff; font-size: 14px; font-weight: 700; }
.case-views button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.case-views button:focus-visible { outline-color: #fff; }
.case-images img { scroll-margin-top: 88px; }
.case-images.is-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.case-images.is-grid img { aspect-ratio: 1; object-fit: cover; cursor: zoom-in; transition: opacity .2s; }
.case-images.is-grid img:hover { opacity: .82; }
/* Branded content: videos, each a poster frame with a play button until it is clicked */
.case-video { margin: 0; }
.case-video a, .case-video iframe { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--ink); }
.case-video img { width: 100%; height: 100%; object-fit: cover; }
.case-video .play { position: absolute; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px; border-radius: 50%; background: var(--blue); transition: transform .25s cubic-bezier(.2, 1.4, .35, 1); }
.case-video .play::after { content: ""; position: absolute; left: 34px; top: 27px; border-left: 24px solid #fff; border-top: 15px solid transparent; border-bottom: 15px solid transparent; }
.case-video a:hover .play, .case-video a:focus-visible .play { transform: scale(1.08); }
.case-video figcaption { margin-top: 12px; max-width: 60ch; font-size: 16px; line-height: 1.5; }

@media (max-width: 1000px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .port-hero { padding-top: 26px; }
  .port-hero h1 .row { display: block; white-space: normal; font-size: 13vw; }
  .port-work { padding-bottom: 72px; }
  .filters { gap: 8px; padding-bottom: 28px; }
  .filters button { padding: 9px 14px; font-size: 13px; }
  .cards { grid-template-columns: 1fr; gap: 40px; }
  .case-bar { gap: 18px; height: 56px; }
  .case-body { padding-top: 32px; }
  .case-head { grid-template-columns: 1fr; margin-bottom: 30px; }
  .case-images { gap: 14px; }
  .case-images.is-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .card-img img { transition: none; }
}
