/* One cinematic library: category → carousel → selectable filmstrip. */
.work-library { --card-height: clamp(230px, 38svh, 420px); --card-width: calc(var(--card-height) * 9 / 16); --card-step: clamp(170px, 16vw, 285px); --landscape-width: min(680px, 60vw, calc(var(--card-height) * 16 / 9)); background: #080e1a; }
.work-library.section-pad { padding-top: 48px; padding-bottom: 48px; }
.work-library .section-intro { margin-top: 24px; margin-bottom: 22px; }
.work-library .section-intro h2 { font-size: clamp(34px, 3.8vw, 60px); }
.work-library .filter-bar { margin-bottom: 15px; }
.work-library .showcase-stage { position: relative; isolation: isolate; min-height: 0; height: auto; border: 0; border-radius: 0; background: transparent; overflow: hidden; }
.work-library .showcase-backdrop { inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(35px) saturate(.7); opacity: .32; transform: scale(1.1); mask-image: linear-gradient(transparent, #000 15%, #000 65%, transparent); }
.work-library .showcase-wash { background: linear-gradient(0deg, #080e1a 1%, #080e1a20 45%, #080e1a55), radial-gradient(ellipse at 50% 42%, transparent, #080e1a 80%); }
.work-library .scene-cards { height: calc(var(--card-height) + 24px); perspective: 1500px; }
.work-library .scene-card { width: var(--card-width); height: var(--card-height); top: 10px; border-radius: 11px; }
.work-library .scene-card[data-slot="0"] { transform: translateX(-50%) translateZ(30px); border-color: #779cff; box-shadow: 0 0 0 2px #6995ff20, 0 0 30px #446fda28, 0 25px 60px #0008; }
.work-library .scene-card[data-slot="-1"] { transform: translateX(calc(-50% - var(--card-step))) rotateY(17deg) translateZ(-80px) scale(.89); opacity: .9; }
.work-library .scene-card[data-slot="1"] { transform: translateX(calc(-50% + var(--card-step))) rotateY(-17deg) translateZ(-80px) scale(.89); opacity: .9; }
.work-library .scene-card[data-slot="-2"] { transform: translateX(calc(-50% - var(--card-step) * 1.84)) rotateY(29deg) translateZ(-150px) scale(.78); opacity: .57; }
.work-library .scene-card[data-slot="2"] { transform: translateX(calc(-50% + var(--card-step) * 1.84)) rotateY(-29deg) translateZ(-150px) scale(.78); opacity: .57; }
.work-library .scene-card.side-card > img { object-fit: contain; }
.work-library .side-card-label { display: none; }
.work-library .scene-card.side-card:after { background: linear-gradient(transparent 70%, #070e1a50); }
.work-library .side-card-label small { font-size: 7px; }
.work-library .scene-card.landscape { width: var(--landscape-width); height: auto; aspect-ratio: 16 / 9; top: 10px; }
.work-library .is-landscape .scene-cards { height: calc(var(--landscape-width) * 9 / 16 + 24px); }
.work-library .is-landscape .stage-arrow { top: calc(10px + var(--landscape-width) * 9 / 32); }
.work-library .is-landscape .side-card { opacity: .32; }
.work-library .stage-arrow { position: absolute; z-index: 8; top: calc(10px + var(--card-height) / 2); transform: translateY(-50%); width: 56px; height: 56px; background: #0c1835df; border-color: #6d99fa; font: 300 40px/1 var(--body); box-shadow: 0 0 24px #315dad25; display: grid; place-items: center; padding: 0 0 6px; }
.work-library .stage-prev { left: 3px; }
.work-library .stage-next { right: 3px; }
.work-library .stage-arrow:hover { background: #234881; }
.work-library .showcase-caption { position: relative; left: 4px; right: auto; width: min(65%, 780px); bottom: auto; margin-top: 5px; padding-bottom: 16px; }
.work-library .showcase-caption h3 { font-size: clamp(25px, 2.5vw, 38px); margin-top: 8px; line-height: 1.13; overflow-wrap: anywhere; }
.work-library .showcase-caption p { font-size: 13px; line-height: 1.55; max-width: 650px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }
.work-library .showcase-caption small { font-size: 10px; line-height: 1.4; margin-top: 6px; }
.showcase-actions { position: absolute; z-index: 6; right: 4px; bottom: 17px; display: flex; align-items: center; gap: 22px; }
.showcase-actions > span { font-size: 11px; letter-spacing: .14em; color: #b3cdf7; padding-right: 22px; border-right: 1px solid #556c94; }
#showcase-watch { display: flex; align-items: center; gap: 12px; border: 1px solid #6995ed; border-radius: 50px; background: linear-gradient(135deg, #2d66cb, #143266); color: #eef4ff; font: 600 13px var(--body); padding: 16px 23px; white-space: nowrap; }
#showcase-watch:hover { background: #315fae; }
.filmstrip-toolbar { display: flex; align-items: center; gap: 18px; margin-top: 10px; margin-bottom: 18px; }
.filmstrip-toolbar h3 { font: 500 18px var(--heading); margin: 0 auto 0 0; letter-spacing: -.03em; }
.filmstrip-toolbar .work-status { font-size: 10px; letter-spacing: .02em; text-transform: none; margin: 0; color: #9fb7da; }
.filmstrip-navigation { display: flex; gap: 9px; }
.filmstrip-navigation .round-control { width: 28px; height: 28px; font-size: 14px; background: transparent; }
.video-filmstrip { position: relative; display: flex; align-items: stretch; gap: 14px; overflow-x: auto; overscroll-behavior-x: contain; padding: 3px 3px 12px; scroll-snap-type: x proximity; scrollbar-width: auto; scrollbar-color: #648be5 #131f34; }
.video-filmstrip::-webkit-scrollbar { height: 9px; }
.video-filmstrip::-webkit-scrollbar-track { background: #131f34; border-radius: 10px; }
.video-filmstrip::-webkit-scrollbar-thumb { background: #648be5; border-radius: 10px; }
.video-thumbnail { flex: 0 0 clamp(96px, 8.5vw, 128px); width: clamp(96px, 8.5vw, 128px); padding: 0; border: 0; background: transparent; color: #eaf1ff; text-align: left; scroll-snap-align: start; }
.thumbnail-image { display: block; position: relative; width: 100%; height: clamp(56px, 8svh, 84px); background: linear-gradient(135deg, #13233c, #091321); border: 1px solid #2e435f; border-radius: 5px; overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.thumbnail-image img { width: 100%; height: 100%; display: block; object-fit: contain; }
.thumbnail-duration { position: absolute; right: 5px; bottom: 5px; padding: 3px 5px; background: #061020dd; border-radius: 3px; color: #eef5ff; font-size: 9px; }
.thumbnail-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 11px; line-height: 1.35; margin-top: 6px; min-height: 30px; }
.video-thumbnail[aria-pressed="true"] .thumbnail-image { border-color: #84a7ff; box-shadow: 0 0 0 2px #5f8ef2; }
.video-thumbnail[aria-pressed="true"] .thumbnail-title { color: #b7ccff; }
.video-thumbnail:hover .thumbnail-image { border-color: #85a9ec; }
.video-thumbnail:focus-visible { outline: 2px solid #b7d2ff; outline-offset: 4px; border-radius: 4px; }
.library-hint { font-size: 10px; color: #829bbb; line-height: 1.5; margin: 16px 0 0; }
@media (max-width: 1100px) { .work-library { --card-step: clamp(170px, 19vw, 210px); } .work-library .stage-arrow { width: 48px; height: 48px; font-size: 36px; } .showcase-actions { gap: 12px; } .showcase-actions > span { padding-right: 12px; } #showcase-watch { padding: 13px 17px; font-size: 11px; } .work-library .showcase-caption { width: 64%; } }
@media (min-width: 761px) and (max-width: 900px) and (min-height: 861px) {
  .work-library { --card-height: clamp(250px, 35svh, 360px); }
  .work-library .section-intro { flex-direction: row; align-items: center; gap: 24px; }
  .work-library .section-intro p { width: 42%; font-size: 12px; line-height: 1.55; }
}
/* Height matters as much as width on laptops and landscape tablets. */
@media (min-width: 761px) and (max-height: 860px) {
  .work-library { --card-height: clamp(175px, calc(100svh - 460px), 360px); }
  .work-library.section-pad { padding-top: 20px; padding-bottom: 20px; }
  .work-library .section-kicker { padding-bottom: 4px; font-size: 8px; }
  .work-library .section-intro { display: flex; flex-direction: row; align-items: center; gap: 24px; margin: 16px 0; }
  .work-library .section-intro h2 { font-size: clamp(26px, 2.6vw, 42px); line-height: 1.08; max-width: 72%; }
  .work-library .section-intro h2 br { display: none; }
  .work-library .section-intro p { width: 260px; max-width: 28%; font-size: 10px; line-height: 1.4; margin: 0; }
  .work-library .filter-bar { gap: 8px; margin-bottom: 8px; }
  .work-library .filter { font-size: 9px; padding: 9px 12px; line-height: 1.2; }
  .work-library .showcase-caption h3 { font-size: 25px; margin: 6px 0 5px; }
  .work-library .showcase-caption p { font-size: 11px; }
  .work-library .showcase-caption small { font-size: 9px; margin-top: 4px; }
  .work-library #showcase-role, .work-library #showcase-credit { display: none; }
  .filmstrip-toolbar { margin: 6px 0 10px; }
  .filmstrip-toolbar h3 { font-size: 15px; }
  .work-library .thumbnail-image { height: 52px; }
  .work-library .thumbnail-title { -webkit-line-clamp: 1; min-height: 15px; font-size: 10px; }
  .work-library .video-filmstrip { padding-bottom: 6px; }
  .library-hint { display: none; }
}
@media (max-width: 760px) {
  .work-library { --card-height: clamp(215px, 39svh, 330px); --card-step: clamp(135px, 36vw, 200px); --landscape-width: min(560px, calc(100vw - 104px)); }
  .work-library.section-pad { padding-top: 32px; padding-bottom: 32px; }
  .work-library .section-intro { margin: 20px 0; }
  .work-library .section-intro h2 { font-size: clamp(30px, 7vw, 42px); }
  .work-library .section-intro p { font-size: 12px; line-height: 1.6; margin-top: 14px; }
  .work-library .showcase-stage { margin: 0 -10px; }
  .work-library .scene-cards { height: calc(var(--card-height) + 24px); }
  .work-library .scene-card[data-slot="0"] { transform: translateX(-50%); }
  .work-library .scene-card[data-slot="-2"], .work-library .scene-card[data-slot="2"] { display: none; }
  .work-library .stage-arrow { width: 44px; height: 44px; font-size: 32px; padding-bottom: 4px; }
  .work-library .stage-prev { left: 0; } .work-library .stage-next { right: 0; }
  .work-library .showcase-caption { left: 10px; right: auto; width: calc(100% - 20px); bottom: auto; padding-bottom: 48px; }
  .work-library .showcase-caption h3 { font-size: 23px; margin-bottom: 7px; }
  .work-library .showcase-caption p { font-size: 12px; }
  .work-library .showcase-caption small { font-size: 9px; margin-top: 5px; }
  .work-library #showcase-role, .work-library #showcase-credit { display: none; }
  .showcase-actions { left: 10px; right: 10px; bottom: 9px; justify-content: space-between; }
  .showcase-actions > span { border: 0; padding: 0; }
  #showcase-watch { padding: 9px 16px; font-size: 11px; }
  .filmstrip-toolbar { flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; }
  .filmstrip-toolbar h3 { font-size: 16px; }
  .filmstrip-toolbar .work-status { order: 3; width: 100%; font-size: 9px; }
  .work-library.has-projects .work-status { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .filmstrip-navigation .round-control { width: 36px; height: 36px; }
  .video-filmstrip { gap: 10px; padding-bottom: 12px; }
  .video-thumbnail { flex-basis: 90px; width: 90px; }
  .thumbnail-image { height: 56px; }
  .thumbnail-title { font-size: 10px; margin-top: 5px; min-height: 27px; }
  .work-library .side-card-label { font-size: 11px; }
}
@media (max-width: 360px) { .work-library { --card-height: clamp(205px, 36svh, 280px); --card-step: 130px; } .work-library .showcase-caption h3 { font-size: 21px; } }
@media (max-width: 760px) and (max-height: 520px) {
  .work-library { --card-height: clamp(110px, 31svh, 155px); --card-step: clamp(125px, 25vw, 190px); --landscape-width: min(430px, calc(var(--card-height) * 16 / 9)); }
  .work-library .showcase-caption { width: 60%; padding-bottom: 12px; }
  .work-library .showcase-caption h3 { font-size: 19px; }
  .work-library .showcase-caption p { font-size: 10px; line-height: 1.4; }
  .showcase-actions { left: auto; right: 10px; bottom: 12px; gap: 10px; }
  .showcase-actions > span { font-size: 9px; }
  .work-library .thumbnail-image { height: 44px; }
  .work-library .thumbnail-title { -webkit-line-clamp: 1; min-height: 14px; }
  .work-library .video-filmstrip { padding-bottom: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .work-library .scene-card[data-slot="0"] { transform: translateX(-50%); }
  .work-library .scene-card[data-slot="-1"] { transform: translateX(calc(-50% - var(--card-step))) scale(.85); }
  .work-library .scene-card[data-slot="1"] { transform: translateX(calc(-50% + var(--card-step))) scale(.85); }
  .work-library .scene-card[data-slot="-2"] { transform: translateX(calc(-50% - var(--card-step) * 1.84)) scale(.7); }
  .work-library .scene-card[data-slot="2"] { transform: translateX(calc(-50% + var(--card-step) * 1.84)) scale(.7); }
}
