/* Films page */
.films-banner .banner-art img { object-position: 50% 30%; filter: saturate(.85) blur(1.5px); transform: scale(1.03); }
/* the posters are busy: calm the left side behind the text and the top behind the menu */
.films-banner::after { background: linear-gradient(90deg, rgba(246, 241, 230, .95) 0%, rgba(245, 240, 230, .86) 42%, rgba(245, 240, 230, .4) 68%, transparent 90%); }
.films-banner .banner-scrim { height: 132px; background: linear-gradient(180deg, rgba(243, 239, 228, .96) 0%, rgba(243, 239, 228, .72) 52%, rgba(243, 239, 228, 0) 100%); }
.toolbar { position: sticky; top: 0; z-index: 30; margin: 0 calc(-1 * var(--pad)); padding: 12px var(--pad); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; background: rgba(238, 233, 223, .9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(147, 113, 72, .22); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 16px; border: 1px solid #b8a88e; border-radius: 999px; background: rgba(250, 246, 236, .7); color: #3d3830; font-family: 'DM Sans', sans-serif; font-size: 13px; letter-spacing: .03em; transition: background .2s, color .2s, border-color .2s; }
.chip:hover { background: #fbf8ef; }
.chip[aria-pressed="true"] { background: #2b2822; border-color: #2b2822; color: #f6f1e4; }
.chip small { margin-left: 6px; opacity: .6; font-size: 11px; }
.search { margin-left: auto; position: relative; }
.search input { width: min(300px, 62vw); padding: 7px 4px 7px 26px; border: 0; border-bottom: 1px solid #a99572; outline: none; background: transparent; color: #2a2620; font-family: Georgia, serif; font-size: 15px; }
.search input:focus { border-bottom-color: #4b3d28; }
.search::before { content: '⌕'; position: absolute; left: 2px; top: 3px; font-size: 18px; color: #7a6244; }
.toolbar-count { font-family: 'DM Sans', sans-serif; font-size: 12px; letter-spacing: .08em; color: #7a6244; white-space: nowrap; }

.group { position: relative; margin-top: clamp(42px, 5vw, 76px); }
.group h2 { display: flex; align-items: baseline; gap: 14px; margin: 0 0 28px; font: 400 clamp(30px, 3.1vw, 48px)/1 'Playfair Display', Georgia, serif; letter-spacing: -.01em; }
.group h2 small { font: 500 12px 'DM Sans', sans-serif; letter-spacing: .2em; color: #8a7352; }
.group h2::after { content: ''; flex: 1; height: 1px; align-self: center; background: linear-gradient(90deg, #b8a88e, transparent); order: 3; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(clamp(168px, 14.6vw, 232px), 1fr)); gap: 42px 24px; }

.film { position: relative; min-width: 0; cursor: pointer; border-radius: 6px; outline-offset: 8px; }
.film-art { position: relative; }
.film-cover { position: relative; aspect-ratio: 2 / 3; border-radius: 4px; overflow: hidden; background: #d8d0bd; box-shadow: 0 18px 28px -16px rgba(44, 32, 16, .6), 0 2px 6px rgba(44, 32, 16, .2); transition: transform .35s ease, box-shadow .35s ease; }
.film-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-cover::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); background: linear-gradient(135deg, rgba(255, 245, 220, .1), transparent 40%); }
.film:hover .film-cover, .film:focus-visible .film-cover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 28px 38px -18px rgba(44, 32, 16, .65), 0 3px 8px rgba(44, 32, 16, .22); }
.film-art[data-sprig]::after { content: ''; position: absolute; z-index: 3; pointer-events: none; background: center / contain no-repeat; }
.film-art[data-sprig="a"]::after { right: -22px; top: -26px; width: 116px; height: 86px; background-image: url('/assets/home/sprig-a.webp'); transform: rotate(4deg); }
.film-art[data-sprig="b"]::after { left: -24px; bottom: -22px; width: 118px; height: 80px; background-image: url('/assets/home/sprig-b.webp'); transform: rotate(-3deg); }
.film-title { margin: 15px 0 3px; font: 500 18px/1.2 'Playfair Display', Georgia, serif; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.film-meta { margin: 0; font: 400 12px/1.4 'DM Sans', sans-serif; letter-spacing: .04em; color: #7a6244; }
.film-orig { margin: 2px 0 0; font-size: 13px; font-style: italic; color: #7e766a; }
.film-blurb { margin: 9px 0 0; font-size: 13.5px; line-height: 1.5; color: #4a443a; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.empty { padding: 80px 0; text-align: center; font-size: 20px; font-style: italic; color: #7e766a; }

.film-dialog { border: 0; padding: 0; width: min(900px, calc(100vw - 28px)); max-height: calc(100vh - 36px); overflow: auto; border-radius: 10px; color: var(--ink); background: #f4efe3 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 0 .055'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); box-shadow: 0 40px 90px -20px rgba(20, 14, 6, .65); }
.film-dialog::backdrop { background: rgba(26, 21, 14, .62); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.fd-body { position: relative; display: grid; grid-template-columns: minmax(170px, 300px) 1fr; gap: clamp(20px, 3vw, 40px); padding: clamp(20px, 3vw, 36px); }
.fd-cover { aspect-ratio: 2 / 3; border-radius: 5px; overflow: hidden; background: #d8d0bd; box-shadow: 0 24px 36px -18px rgba(44, 32, 16, .6); }
.fd-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.fd-text { align-self: center; min-width: 0; }
.fd-group { margin: 0 0 12px; font: 500 11px 'DM Sans', sans-serif; letter-spacing: .26em; text-transform: uppercase; color: #8a7352; }
.fd-title { margin: 0; font: 400 clamp(28px, 3.4vw, 46px)/1.08 'Playfair Display', Georgia, serif; letter-spacing: -.02em; }
.fd-orig { margin: 8px 0 0; font-size: 17px; font-style: italic; color: #7e766a; }
.fd-line { display: block; width: 130px; height: 1px; margin: 20px 0; background: var(--gold); }
.fd-meta { margin: 0 0 14px; font: 500 14px 'DM Sans', sans-serif; letter-spacing: .04em; color: #4a3f2e; }
.fd-blurb { margin: 0; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: #302e29; }
.fd-close { position: absolute; top: 10px; right: 12px; z-index: 2; width: 38px; height: 38px; padding: 0; border: 1px solid #b8a88e; border-radius: 50%; background: rgba(255, 252, 244, .7); color: #3d3830; font: 400 24px/1 Georgia, serif; transition: background .2s, transform .2s; }
.fd-close:hover { background: #fff; transform: rotate(90deg); }

@media (max-width: 850px) {
  .toolbar { position: static; gap: 8px 12px; }
  .search { margin-left: 0; width: 100%; }
  .search input { width: 100%; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 34px 16px; }
  .film-art[data-sprig]::after { display: none; }
}
@media (max-width: 600px) {
  .fd-body { grid-template-columns: 1fr; }
  .fd-cover { max-width: 220px; margin: 0 auto; }
  .group h2 small { display: none; }
}
@media (prefers-reduced-motion: reduce) { .film-cover, .fd-close { transition: none; } .film:hover .film-cover { transform: none; } }
