/* Portfolio gallery (NPE UX parity, Dickey's tokens) */
.lede {
  margin: 18px 0 0;
  max-width: 40rem;
  font-size: clamp(1.06rem, 1.4vw, 1.18rem);
  color: var(--muted);
}
.sec { padding: clamp(64px, 8vw, 104px) 0; }
.sec--sage { background: var(--surface-soft); }
.sec-head { max-width: 46rem; margin-bottom: 44px; }
.sec-head--row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px 40px;
  max-width: none;
}
.sec-head--row > div { max-width: 44rem; }
.btn--outline {
  border-color: currentColor;
  background: transparent;
  color: var(--ink);
}
.btn--outline:hover {
  background: color-mix(in srgb, currentColor 8%, transparent);
  color: var(--ink);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.page-hero {
  padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 6vw, 80px);
  background: var(--surface-soft);
}
.page-hero__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.page-hero--simple .page-hero__grid { grid-template-columns: 1fr; }
.page-hero .lede { margin-bottom: 28px; }
.page-hero figure { margin: 0; }
.page-hero img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
}
.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--muted);
}
.crumbs li + li::before {
  content: "/";
  margin-right: 6px;
  opacity: 0.6;
}
.crumbs a { text-decoration: none; color: inherit; }
.crumbs a:hover { text-decoration: underline; color: var(--brand); }

.gal__count {
  margin: 0 0 18px;
  font-size: 0.92rem;
  color: var(--muted);
}
.gal {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.gal__item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--white);
}
.gal__item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.gal__item--fit {
  background: var(--surface);
}
.gal__item--fit img {
  object-fit: contain;
  background: var(--surface);
}
.gal__item:hover img { transform: scale(1.03); }
.gal__item:focus-visible {
  outline: 3px solid var(--brand);
  outline-offset: 3px;
}
.gal__play {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: var(--brand);
  color: var(--white);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}
.gal__play .icon {
  width: 24px;
  height: 24px;
  margin-left: 4px;
}
.gal__badge {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(15, 15, 15, 0.82);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.gal__cap {
  margin: 8px 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}
@media (prefers-reduced-motion: no-preference) {
  .gal__item img { transition: transform 0.35s var(--ease); }
}

.lb {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--charcoal);
  color: var(--white);
}
.lb[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.lb::backdrop { background: rgba(0, 0, 0, 0.7); }
html:has(.lb[open]) { overflow: hidden; }
.lb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(16px, 1.25rem);
}
.lb__count {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
}
.lb__fig {
  display: grid;
  place-content: center;
  justify-items: center;
  min-height: 0;
  margin: 0;
  padding: 0 84px 28px;
}
.lb__stage {
  display: grid;
  place-items: center;
  min-height: 0;
  touch-action: pan-y;
}
.lb__stage img,
.lb__stage video {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: calc(100vh - 150px);
  max-height: calc(100dvh - 150px);
  border-radius: var(--radius);
  background: #000;
  object-fit: contain;
}
.lb__cap {
  margin-top: 12px;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}
.lb__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
  cursor: pointer;
}
.lb__btn:hover { background: rgba(255, 255, 255, 0.18); }
.lb__btn:focus-visible {
  outline: 3px solid var(--brand-on-dark);
  outline-offset: 2px;
}
.lb__btn .icon { width: 22px; height: 22px; }
.lb__prev,
.lb__next {
  position: absolute;
  top: 50%;
  margin-top: -24px;
}
.lb__prev { left: max(16px, 1.25rem); }
.lb__next { right: max(16px, 1.25rem); }
.lb__prev .icon { transform: rotate(90deg); }
.lb__next .icon { transform: rotate(-90deg); }
.lb__status {
  max-width: 40rem;
  padding: 10px 18px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
  text-align: center;
}
.lb__status a { color: var(--brand-on-dark); }
@media (max-width: 980px) {
  .gal { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .gal { gap: 10px; }
  .gal__play {
    width: 48px;
    height: 48px;
    margin: -24px 0 0 -24px;
  }
  .gal__play .icon {
    width: 18px;
    height: 18px;
    margin-left: 3px;
  }
  .gal__badge {
    left: 8px;
    bottom: 8px;
    font-size: 0.7rem;
  }
  .lb__fig { padding: 0 8px 88px; }
  .lb__stage img,
  .lb__stage video {
    max-height: calc(100vh - 200px);
    max-height: calc(100dvh - 200px);
  }
  .lb__prev,
  .lb__next {
    top: auto;
    bottom: calc(20px + env(safe-area-inset-bottom));
    margin: 0;
  }
  .lb__prev { left: calc(50% - 64px); }
  .lb__next { right: calc(50% - 64px); }
}

.portfolio-hero { padding-block: 48px 56px; }
.portfolio-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
}
.portfolio-hero .actions { margin-top: 28px; }
.portfolio-hero__feature {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  text-decoration: none;
}
.portfolio-hero__feature > img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.portfolio-hero__feature > span {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 44px 20px 18px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  color: var(--white);
  font: 600 1.6rem / 1.2 var(--font-display);
}
.portfolio-hero__feature > span > span {
  display: flex;
  align-items: center;
  gap: 8px;
  font: 500 0.9rem / 1.3 var(--font-body);
}
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.portfolio-filters button {
  min-height: 46px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
}
.portfolio-filters button[aria-pressed="true"] {
  background: var(--brand);
  border-color: var(--brand);
  color: var(--white);
}
.portfolio-filters button:hover { border-color: var(--brand); }
.portfolio-count {
  color: var(--muted);
  font-size: 0.92rem;
  margin-top: -16px;
  margin-bottom: 24px;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 44px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.portfolio-card {
  height: 100%;
  border-bottom: 1px solid var(--line);
  padding-bottom: 22px;
}
.portfolio-card__image {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface);
}
.portfolio-card__image img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.portfolio-card__film {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: var(--radius);
  background: rgba(15, 15, 15, 0.94);
  color: var(--white);
  font-size: 0.85rem;
}
.portfolio-card__film .icon { width: 15px; height: 15px; }
.portfolio-card__body { padding-top: 18px; }
.portfolio-card__type,
.project-type {
  /* --brand on --surface-soft is only 4.1:1 at this size; --brand-deep is 5.7:1 */
  color: var(--brand-deep);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.portfolio-card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  line-height: 1.15;
  margin: 0 0 12px;
}
.portfolio-card h2 a {
  text-decoration: none;
  color: var(--ink);
}
.portfolio-card h2 a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
  color: var(--brand-deep);
}
.portfolio-card__body > p:not(.portfolio-card__type) {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 12px;
}
.portfolio-card__count {
  font-size: 0.85rem;
  color: var(--muted);
}
.project-intro { padding-block: 32px 36px; }
.project-intro .crumbs { margin-bottom: 16px; }
.project-intro h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.2rem);
  margin: 0;
}
.project-intro .lede {
  max-width: 52ch;
  margin: 12px 0 0;
  font-size: 1.0625rem;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 16px 0 18px;
}
.project-intro .actions {
  align-items: center;
  gap: 8px 24px;
  margin-top: 0;
}
.project-intro__more {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
  font-size: 0.95rem;
  text-underline-offset: 4px;
}
.project-film-note {
  max-width: 52rem;
  color: var(--muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}
.gal--project { gap: 24px 18px; }
.gal--project > li:first-child:has(.gal__item--video) {
  grid-column: span 2;
  grid-row: span 2;
}
.gal--project > li:first-child .gal__item--video img { aspect-ratio: 16 / 10; }
.gal--project .gal__cap { font-size: 0.85rem; }
.project-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.project-next p {
  color: var(--muted);
  margin: 12px 0 0;
}
.portfolio-home {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  align-items: center;
  gap: 36px;
  margin-bottom: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  background: var(--surface);
}
.portfolio-home > img {
  width: 100%;
  height: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.portfolio-home > div { padding: 24px 32px 24px 0; }
.portfolio-home h3 {
  font-family: var(--font-display);
  font-size: 2.2rem;
  margin: 0 0 16px;
  color: var(--ink);
}
.portfolio-home p { color: var(--muted); margin: 0; }
@media (max-width: 980px) {
  .portfolio-hero__grid { gap: 32px; }
  .portfolio-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .portfolio-home { gap: 24px; }
  .portfolio-home > div { padding-right: 24px; }
}
@media (max-width: 720px) {
  .portfolio-hero { padding-block: 28px 36px; }
  .portfolio-hero__grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .portfolio-hero__feature > img { aspect-ratio: 16 / 9; }
  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .portfolio-count { margin-top: 0; }
  .portfolio-filters { gap: 6px; }
  .portfolio-filters button { padding: 10px 13px; }
  .portfolio-home {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .portfolio-home > div { padding: 24px; }
  .portfolio-home h3 { font-size: 1.9rem; }
  .portfolio-hero__feature > span { font-size: 1.4rem; }
  .portfolio-hero__feature > span > span { font-size: 0.8rem; }
  .gal--project { gap: 18px 10px; }
  .gal--project > li:first-child:has(.gal__item--video) {
    grid-column: 1 / -1;
    grid-row: auto;
  }
  .project-intro { padding-block: 24px 28px; }
  .project-meta {
    display: grid;
    gap: 6px;
  }
  .project-film-note { font-size: 0.85rem; }
  .page-hero__grid { grid-template-columns: 1fr; }
}
.lb__fig {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.lb__stage {
  flex: 1;
  min-height: 0;
  width: 100%;
}
.lb__stage img,
.lb__stage video {
  min-height: 0;
  max-height: 100%;
}
.lb__cap,
.lb__status {
  flex: none;
  max-width: 60rem;
}
@media (max-height: 440px) {
  .lb__bar { padding-block: 6px; }
  .lb__fig { padding-bottom: 64px; }
  .lb__cap,
  .lb__status {
    font-size: 0.8rem;
    line-height: 1.3;
    margin-top: 6px;
  }
  .lb__prev,
  .lb__next {
    top: auto;
    bottom: 8px;
    margin: 0;
  }
  .lb__prev { left: calc(50% - 64px); }
  .lb__next { right: calc(50% - 64px); }
}

