/* The library shares the homepage's painting, original logo and cloud artwork. */
* { box-sizing: border-box; }
:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, sans-serif;
  color: #293e40;
  background: #b6c9ce;
  --ink: #293e40;
  --ochre: #a55c30;
  --paper: #faf2dc;
}
body { margin: 0; min-width: 280px; isolation: isolate; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid #355f69; outline-offset: 5px; }
[hidden] { display: none !important; }
.skip-link { position: fixed; z-index: 20; top: 10px; left: 10px; padding: 12px 18px; background: var(--paper); transform: translateY(-160%); border-radius: 6px; }
.skip-link:focus { transform: none; }

/* A single responsive WebP keeps the painted backdrop inexpensive to display. */
.library-landscape { position: fixed; z-index: -2; inset: 0; pointer-events: none; background: #b6c9ce; }
.library-landscape picture, .library-landscape img { display: block; width: 100%; height: 100%; }
.library-landscape img { object-fit: fill; }
.library-landscape::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #fff3ce08 30%, #4d39282b 100%); }
.site-header { position: relative; padding: 24px 20px 0; text-align: center; }
.home-brand { display: block; width: clamp(250px, 28vw, 380px); margin-inline: auto; text-decoration: none; }
.home-brand img { width: 100%; height: auto; display: block; }
.home-brand > span { display: block; margin-top: 10px; font-size: clamp(12px, 1.1vw, 15px); line-height: 1.6; letter-spacing: .035em; text-shadow: 0 1px 8px #fff4d7; }
.cloud-link {
  position: absolute; top: 28px; width: clamp(190px, 24vw, 370px); aspect-ratio: 16 / 7;
  display: grid; place-items: center; isolation: isolate; text-decoration: none;
  color: #273e4c; font: italic 700 clamp(23px, 2.5vw, 34px) Georgia, serif;
  transition: transform 180ms ease;
}
.cloud-link::before { content: ''; position: absolute; z-index: -1; inset: 0; background: url('navigation-cloud.webp') center / 100% 100% no-repeat; transform: scaleX(var(--cloud-facing, 1)); filter: drop-shadow(0 4px 7px #35495920); }
.cloud-link span { margin-top: 7%; text-shadow: 0 1px 4px #fff7e8b3; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.cloud-home { left: max(12px, env(safe-area-inset-left)); }
.cloud-projects { right: max(12px, env(safe-area-inset-right)); --cloud-facing: -1; }
.cloud-link:focus-visible { border-radius: 48%; outline-style: dashed; outline-width: 2px; }
.cloud-link:active { transform: translateY(1px) scale(.98); }
.library-content, .site-footer { width: min(1200px, calc(100% - 72px)); margin-inline: auto; }
.library-intro { text-align: center; padding: 15px 12px 25px; text-shadow: 0 2px 14px #fff2cd9c; }
h1 { margin: 0 0 10px; font: 500 clamp(44px, 4.5vw, 60px)/1.1 Georgia, serif; letter-spacing: -.035em; color: var(--ink); }
.library-intro > p { max-width: 40em; margin: 0 auto; font-size: 15px; line-height: 1.6; text-wrap: balance; }

/* Warm, lightly mottled paper leaves the landscape visible around the collection. */
.collection-paper {
  position: relative; padding: clamp(22px, 2.4vw, 34px);
  border: 1px solid #ffefcaa6; border-radius: 26px 31px 27px 24px;
  background: radial-gradient(ellipse at 4% 3%, #fffbedc9, transparent 45%), radial-gradient(ellipse at 96% 80%, #dca76d26, transparent 55%), #f8efd9f5;
  box-shadow: 0 15px 60px #3b322738, inset 0 0 42px #b97b3320;
}
.collection-paper::before { content: ''; position: absolute; inset: 8px; border: 1px solid #b18b4f38; border-radius: 21px 25px 22px 19px; pointer-events: none; }
.collection-heading { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 0 0 26px; padding-bottom: 23px; border-bottom: 1px solid #a7783e3b; }
.eyebrow { margin: 0 0 8px; text-transform: uppercase; letter-spacing: .19em; color: #8c5732; font-weight: 650; font-size: 10px; }
.collection-heading h2 { font: 500 clamp(26px, 2.6vw, 35px)/1.15 Georgia, serif; margin: 0; }
#filmCount { flex-shrink: 0; padding: 8px 14px; border: 1px solid #b990543d; border-radius: 50%; color: #765333; background: #e6cb922e; font-size: 12px; }
.film-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 27px 25px; }
.film-card {
  display: flex; flex-direction: column; min-width: 0; padding: 7px 7px 0; overflow: hidden;
  text-align: left; font: inherit; color: var(--ink); cursor: pointer;
  border: 1px solid #b899653f; border-radius: 13px 16px 14px 12px;
  background: linear-gradient(135deg, #fffcf0, #f2e5c8);
  box-shadow: 0 4px 9px #76512714;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.film-card[aria-pressed="true"] { outline: 3px solid #a55c30; outline-offset: 3px; }
.film-poster { position: relative; display: block; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 7px 10px 6px 8px; background: radial-gradient(ellipse at 30% 20%, #91a8a4, #355456); }
.film-poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.film-poster img.placeholder { object-fit: contain; padding: 24px 68px 24px 30px; filter: drop-shadow(0 7px 8px #162e4659); }
.play-icon {
  position: absolute; right: 14px; bottom: 12px; width: 42px; height: 42px;
  padding-left: 3px; border-radius: 50%; display: grid; place-items: center;
  font-size: 15px; color: #4c442c; background: #f4dc9bea;
  border: 1px solid #fff4d7; box-shadow: 0 3px 12px #243e4054;
  transition: background 180ms ease, transform 180ms ease;
}
.film-caption { display: flex; align-items: baseline; gap: 11px; padding: 18px 11px 19px; font: 600 19px/1.3 Georgia, serif; }
.film-number { flex-shrink: 0; font: 500 10px/1.4 system-ui, sans-serif; letter-spacing: .05em; color: #956a3f; }
.video-player { position: relative; padding: 24px; border-radius: 16px; background: #293e40; border: 1px solid #6f7c67; color: #fff5df; margin: 0 0 36px; scroll-margin-top: 20px; box-shadow: 0 12px 28px #4a3c2726; }
.player-heading { display: flex; gap: 16px; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.player-heading h2 { margin: 0; font: 500 clamp(20px, 2.5vw, 28px)/1.25 Georgia, serif; }
.player-heading h2:focus { outline: none; }
#stopVideo { flex-shrink: 0; cursor: pointer; border: 1px solid #f2d9a552; border-radius: 7px; padding: 10px 13px; background: #f3dda914; font: inherit; font-size: 13px; color: #fff5df; }
#stopVideo span { margin-left: 8px; }
.video-screen { aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #142327; }
.video-screen iframe, .video-screen video { display: block; width: 100%; height: 100%; border: 0; }
.source-link { display: inline-block; margin-top: 16px; color: #f5d7a0; font-size: 13px; text-underline-offset: 4px; }
.video-player a:focus-visible, .video-player button:focus-visible { outline-color: #f5d7a0; }
.site-footer { padding: 26px 30px; margin-block: 22px; border: 1px solid #efd9ab85; border-radius: 18px; background: #faf0d9eb; display: flex; justify-content: space-between; align-items: baseline; gap: 20px; font-size: 12px; color: #4f5b4e; }
.site-footer p { margin: 0; }
.site-footer a { text-underline-offset: 4px; }
@media (hover: hover) {
  .cloud-link:hover { transform: translateY(-3px); }
  .cloud-link:hover span { text-decoration: underline; }
  .film-card:hover { transform: translateY(-4px); border-color: #b77b438c; box-shadow: 0 12px 22px #76512729; }
  .film-card:hover .play-icon { background: #ffe8a9; transform: scale(1.08); }
  #stopVideo:hover { background: #f3dda92a; }
}
@media (max-width: 1000px) {
  .film-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .library-content, .site-footer { width: calc(100% - 44px); }
}
@media (max-width: 700px) {
  .site-header { padding-top: calc(max(10px, env(safe-area-inset-top)) + 100px); }
  .home-brand { width: min(330px, 82vw); }
  .home-brand > span { margin-top: 10px; font-size: 12px; letter-spacing: .025em; }
  .cloud-link { top: max(10px, env(safe-area-inset-top)); width: clamp(140px, 45vw, 204px); font-size: clamp(20px, 5.4vw, 25px); }
  .cloud-home { left: max(6px, env(safe-area-inset-left)); }
  .cloud-projects { right: max(6px, env(safe-area-inset-right)); --cloud-facing: -1; }
  .library-intro { padding: 26px 12px 29px; }
  .library-intro > p { max-width: 27em; font-size: 13px; }
  .library-content, .site-footer { width: calc(100% - 24px); }
  .collection-paper { padding: 24px 16px; border-radius: 20px 24px 20px 19px; }
  .collection-paper::before { inset: 5px; border-radius: 16px 20px 16px 15px; }
  .collection-heading { gap: 14px; margin-bottom: 20px; padding-bottom: 20px; }
  .eyebrow { font-size: 9px; letter-spacing: .15em; }
  #filmCount { font-size: 11px; padding: 8px 10px; }
  .film-grid { gap: 15px 12px; }
  .film-card { padding: 4px 4px 0; border-radius: 9px 12px 10px 8px; }
  .film-caption { font-size: 16px; padding: 13px 6px 15px; gap: 6px; }
  .film-number { font-size: 9px; }
  .film-poster img.placeholder { padding: 14px 35px 14px 12px; }
  .play-icon { width: 30px; height: 30px; right: 8px; bottom: 8px; font-size: 11px; }
  .video-player { padding: 13px; margin-bottom: 26px; scroll-margin-top: 12px; }
  .player-heading { flex-wrap: wrap; margin-bottom: 14px; }
  #stopVideo { font-size: 12px; }
  .site-footer { padding: 23px; flex-direction: column; align-items: center; text-align: center; gap: 12px; font-size: 11px; }
}
@media (max-width: 350px) {
  .film-caption { font-size: 15px; }
  .film-number { display: none; }
  .collection-paper { padding-inline: 13px; }
}
@media (prefers-reduced-motion: reduce) { .film-card, .play-icon, .cloud-link { transition: none; } }
