/* Portfolio page — extends styles.css */

.phero { position: relative; background: var(--navy-deep); color: var(--white); overflow: hidden; }
.phero__inner { padding-block: clamp(64px, 9vw, 112px) clamp(36px, 5vw, 56px); max-width: 780px; }
.phero h1 { color: var(--white); font-size: clamp(40px, 5.6vw, 72px); margin-bottom: 20px; }
.phero h1 em { font-style: italic; color: var(--gold-light); }
.phero__text { font-size: 18px; color: rgba(255,255,255,0.84); max-width: 56ch; margin-bottom: 30px; }

/* auto-scrolling strip of poster frames */
.strip { overflow: hidden; padding-bottom: clamp(36px, 5vw, 56px); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.strip__track { display: flex; gap: 10px; width: max-content; }
.strip__track img { width: 118px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; flex: none; opacity: 0.9; }
@media (prefers-reduced-motion: no-preference) {
  .strip__track { animation: strip 70s linear infinite; }
  @keyframes strip { to { transform: translateX(-50%); } }
}

/* filters */
.work__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: clamp(32px, 4vw, 48px); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { border: 1px solid var(--line); background: var(--white); color: var(--navy); font: inherit; font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; transition: all .18s ease; }
.filter span { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.filter:hover { border-color: var(--gold); }
.filter.is-active { background: var(--navy); color: var(--white); border-color: var(--navy); }
.filter.is-active span { color: var(--gold-light); }
.filter:focus-visible { outline: 3px solid var(--gold-light); outline-offset: 2px; }

/* projects */
.projects { display: grid; gap: 18px; }
.project { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 24px; align-items: start; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.project[hidden] { display: none; }
.project__head { position: sticky; top: calc(var(--nav-h) + 16px); }
.project__head h3 { font-size: 28px; margin-bottom: 8px; }
.project__handle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--gold); }
.project__handle .icon { width: 16px; height: 16px; }
.project__handle:hover { color: var(--navy); }
.project__count { display: block; margin-top: 10px; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.project__clips { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; scrollbar-width: thin; }

.clip { margin: 0; flex: none; width: 210px; scroll-snap-align: start; }
.clip--wide { width: 372px; }
.clip[hidden] { display: none; }
.clip__btn { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; border: 0; padding: 0; border-radius: 10px; overflow: hidden; background: var(--navy); cursor: pointer; text-align: left; color: var(--white); }
.clip--wide .clip__btn { aspect-ratio: 16 / 9; align-self: center; }
.clip__btn img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.clip__btn:hover img, .clip__btn:focus-visible img { transform: scale(1.04); }
.clip__btn:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.clip__btn::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,33,58,0) 50%, rgba(20,33,58,0.75) 100%); }
.clip__btn[disabled] { cursor: not-allowed; }
.clip__btn[disabled] .clip__play { opacity: 0.4; }
.clip__play { position: absolute; top: 50%; left: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,0.92); color: var(--navy); display: grid; place-items: center; z-index: 1; transition: transform .2s ease, background .2s ease; }
.clip__play svg { width: 22px; height: 22px; fill: currentColor; margin-left: 3px; }
.clip__btn:hover .clip__play { transform: scale(1.08); background: var(--gold); color: var(--white); }
.clip__meta { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
.clip__kind { padding: 4px 9px; border-radius: 999px; background: rgba(255,255,255,0.16); backdrop-filter: blur(6px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip__kind--drone { background: rgba(176,139,82,0.85); }
.clip__kind--tour { background: rgba(37,211,102,0.75); }
.clip__dur { font-variant-numeric: tabular-nums; opacity: 0.9; }

/* clients wall */
.clients { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 980px; margin-inline: auto; }
.clients li { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--white); font-size: 14px; font-weight: 600; color: var(--navy); }

/* lightbox */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(12, 20, 36, 0.94); display: grid; grid-template-columns: 64px minmax(0, 1fr) 64px; align-items: center; padding: 16px; }
.lightbox__stage { display: grid; justify-items: center; gap: 12px; }
.lightbox video { max-height: min(82vh, 900px); max-width: 100%; border-radius: 10px; background: #000; box-shadow: 0 30px 80px rgba(0,0,0,0.5); }
.lightbox video[data-orient="portrait"] { aspect-ratio: 9 / 16; height: min(82vh, 900px); width: auto; }
.lightbox video[data-orient="landscape"] { width: min(92vw, 1200px); aspect-ratio: 16 / 9; }
.lightbox__caption { color: var(--white); text-align: center; font-size: 14px; }
.lightbox__caption strong { display: block; font-family: var(--font-display); font-size: 22px; font-weight: 600; }
.lightbox__caption span { color: var(--gold-light); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; font-size: 12px; }
.lightbox__close, .lightbox__nav { border: 0; background: rgba(255,255,255,0.1); color: var(--white); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background .18s ease; }
.lightbox__close:hover, .lightbox__nav:hover { background: var(--gold); }
.lightbox__close:focus-visible, .lightbox__nav:focus-visible { outline: 3px solid var(--gold-light); }
.lightbox__close { position: absolute; top: 18px; right: 18px; }
.lightbox__close .icon, .lightbox__nav .icon { width: 22px; height: 22px; }
.lightbox__nav--prev { justify-self: start; }
.lightbox__nav--next { justify-self: end; }
body.lb-open { overflow: hidden; }
.lightbox[hidden] { display: none; }

@media (max-width: 960px) {
  .project { grid-template-columns: 1fr; gap: 16px; padding: 16px; }
  .project__head { position: static; }
  .project__head h3 { font-size: 24px; }
  .clip { width: 170px; }
  .clip--wide { width: 302px; }
  .lightbox { grid-template-columns: 44px minmax(0, 1fr) 44px; padding: 12px 8px; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox video[data-orient="portrait"] { height: min(74vh, 900px); }
}
