/* Compact portfolio, sized to its content rather than the viewport. */
.section--works { padding: 72px 0 64px; }
main > .section--works { scroll-margin-top: 16px; }
.works-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 30px; }
.works-heading .h2 { margin-top: 10px; font-size: clamp(30px, 3.2vw, 44px); }
.works-heading__note { margin-bottom: 5px; color: var(--soft); font-size: 15px; }
.work-feature { display: grid; grid-template-columns: 264px minmax(0, 1fr); background: rgba(22, 18, 16, .93); border: 1px solid var(--line); text-shadow: none; }
.work-feature__poster { position: relative; display: block; overflow: hidden; background: #170b08; }
.work-feature__poster picture, .work-feature__poster img { display: block; width: 100%; height: 100%; }
.work-feature__poster img { object-fit: contain; aspect-ratio: 3 / 4; transition: filter .3s ease; }
.work-feature__poster:hover img { filter: brightness(1.08); }
.work-feature__poster-play { position: absolute; inset: auto 0 0; display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 60px; background: linear-gradient(transparent, rgba(0, 0, 0, .88)); color: #fff3e7; font-size: 14px; padding: 22px 12px 14px; }
.play-icon { display: inline-block; flex-shrink: 0; width: 0; height: 0; border-top: 6px solid transparent; border-bottom: 6px solid transparent; border-left: 9px solid currentColor; }
.work-feature__body { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 30px clamp(28px, 4.8vw, 72px); }
.work-feature__eyebrow { display: flex; align-items: center; gap: 16px; font-family: var(--font-mono); font-size: 11px; letter-spacing: .13em; color: var(--muted); }
.work-feature__number { color: var(--accent); border-right: 1px solid var(--line); padding-right: 16px; }
.work-feature__title { margin-top: 16px; color: var(--title); font-size: clamp(30px, 3.4vw, 48px); font-weight: 600; line-height: 1.25; letter-spacing: .04em; }
.work-feature__meta { display: flex; flex-wrap: wrap; gap: 10px 0; margin-top: 14px; color: var(--soft); font-size: 13px; line-height: 1.3; }
.work-feature__meta li + li { border-left: 1px solid var(--line); margin-left: 14px; padding-left: 14px; }
.work-feature__quote { margin-top: 24px; color: var(--text); font-size: clamp(16px, 1.5vw, 20px); line-height: 1.7; letter-spacing: .08em; }
.work-feature__watch { margin-top: 24px; gap: 12px; }
.work-feature__poster:focus-visible { outline: 3px solid var(--accent); outline-offset: -4px; }

body.trailer-open { overflow: hidden; }
.trailer-dialog { position: fixed; inset: 0; width: min(1000px, calc(100% - 40px)); max-width: none; max-height: calc(100vh - 40px); max-height: calc(100dvh - 40px); margin: auto; padding: 0; color: var(--text); background: #12100f; border: 1px solid var(--line); box-shadow: 0 28px 100px rgba(0, 0, 0, .7); overflow: auto; text-shadow: none; }
.trailer-dialog:not([open]) { display: none; }
.trailer-dialog::backdrop { background: rgba(0, 0, 0, .86); backdrop-filter: blur(8px); }
.trailer-dialog__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 12px 8px 24px; }
.trailer-dialog__head h2 { color: var(--title); font-size: 18px; line-height: 1.5; font-weight: 600; }
.trailer-dialog__head h2 span { margin-left: 12px; color: var(--muted); font-size: 13px; font-weight: 400; }
.trailer-dialog__close { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; color: var(--text); background: transparent; border: 1px solid transparent; cursor: pointer; font-size: 30px; line-height: 1; }
.trailer-dialog__close:hover { background: var(--card-head); border-color: var(--line); }
.trailer-dialog__video { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: calc(100vh - 180px); max-height: calc(100dvh - 180px); background: #000; object-fit: contain; }
.trailer-dialog__foot { display: flex; justify-content: space-between; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px 24px; font-size: 12px; color: var(--muted); }
.trailer-dialog__foot > span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; }
.trailer-dialog__foot a { text-decoration: underline; text-underline-offset: 4px; }
.trailer-dialog__error { padding: 16px 24px 0; font-size: 14px; line-height: 1.8; }
.trailer-dialog__error a { text-decoration: underline; }

@media (min-width: 820px) and (max-width: 1099px) {
  .site-header__inner { gap: 12px; padding-inline: 24px; }
  .site-menu { gap: 12px; }
  .nav-link { font-size: 13px; padding-inline: 7px; letter-spacing: 0; white-space: nowrap; }
  .nav-cta { padding-inline: 12px; white-space: nowrap; }
  .brand img { height: 21px; }
}
@media (max-width: 819px) {
  .workflows-grid { grid-template-columns: 1fr; gap: 44px; margin-top: 64px; }
  .workflow .h3 { font-size: 27px; }
  .workflow .steps { margin-top: 24px; }
  .workflow .step { padding: 18px 0; }
  .work-feature { grid-template-columns: 220px minmax(0, 1fr); }
  .work-feature__body { padding: 24px; }
  .work-feature__title { font-size: 30px; }
  .work-feature__quote { margin-top: 20px; }
  .work-feature__watch { margin-top: 20px; }
}
@media (max-width: 560px) {
  .section--works { padding: 48px 0; }
  .works-heading { align-items: flex-start; gap: 12px; margin-bottom: 24px; }
  .works-heading__note { max-width: 8em; font-size: 12px; line-height: 1.8; margin-top: 28px; }
  .work-feature { grid-template-columns: minmax(0, 1fr); }
  .work-feature__poster { width: min(100%, 264px); margin: 24px auto 0; }
  .work-feature__body { padding: 28px 24px; }
  .work-feature__title { font-size: 32px; }
  .work-feature__quote br { display: none; }
  .work-feature__quote { font-size: 15px; letter-spacing: .02em; }
  .work-feature__watch { width: 100%; justify-content: center; }
  .trailer-dialog { width: calc(100% - 24px); max-height: calc(100dvh - 24px); }
  .trailer-dialog__head { padding-left: 16px; }
  .trailer-dialog__head h2 { font-size: 16px; }
  .trailer-dialog__head h2 span { margin-left: 6px; font-size: 12px; }
  .trailer-dialog__foot { padding: 14px 16px; }
}
@media (prefers-reduced-motion: reduce) { .work-feature__poster img { transition: none; } }
