/* Delivered gallery (public/gallery/index.html) — styles.
   Every colour and font comes from the gallery's Theme (applyTheme in
   gallery.js sets these variables); the defaults below are "cinema", the
   film-studio look: near-black page, cream photo card, Cormorant Garamond
   headings over Jost. Text laid over photos (hero, panels, lock screen) is
   always white on a darkened image, whatever the theme. */

* { box-sizing: border-box; }

:root {
  --bg: #0c0b0a;
  --card: #efe9df;          /* the panel the photos sit on */
  --card-ink: #1d1a16;
  --ink: #f2ede5;
  --muted: #8f887e;
  --rule: rgba(242, 237, 229, 0.14);
  --accent: #f2ede5;
  --display: "Cormorant Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --display-weight: 400;
  --display-style: normal;
  --display-case: none;
  --display-tracking: normal;
  --body: "Jost", "Montserrat", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --heart: #d9475a;
  --bar-h: 58px;
  --ease: cubic-bezier(0.22, 0.61, 0.2, 1);
  /* A surface a step off the page (the films list), in any theme. */
  --surface: rgba(127, 127, 127, 0.08);
  --surface: color-mix(in srgb, var(--ink) 5%, var(--bg));
  --card-rule: rgba(0, 0, 0, 0.1);
  --card-rule: color-mix(in srgb, var(--card-ink) 12%, transparent);
}

/* Only body paints the background, so overscroll matches too. */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body { margin: 0; overflow-x: hidden; }
@supports (overflow-x: clip) { html, body { overflow-x: clip; } }
body {
  background: var(--bg); color: var(--ink);
  font-family: var(--body); font-weight: 400; font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color 0.4s ease, color 0.4s ease;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---- Type ---------------------------------------------------------------- */
.display {
  font-family: var(--display); font-weight: var(--display-weight);
  font-style: var(--display-style); text-transform: var(--display-case);
  letter-spacing: var(--display-tracking); line-height: 1.05; margin: 0;
  overflow-wrap: anywhere;
}
/* The "&" in the couple's names, a touch of italic. */
.amp { font-style: italic; font-weight: inherit; padding: 0 0.08em; }
/* Small widely-tracked capitals ("FOUR FILMS", "14 AUGUST 2026"). */
.caps {
  font-family: var(--body); font-size: 11px; font-weight: 400;
  text-transform: uppercase; letter-spacing: 0.34em; line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

/* ---- Boot ---------------------------------------------------------------- */
.boot { position: fixed; inset: 0; display: grid; place-items: center; z-index: 5; transition: opacity 0.5s ease; }
.boot span { width: 64px; height: 1px; background: var(--ink); opacity: 0.4; animation: g-breathe 1.8s ease-in-out infinite; }
html:not(.booting) .boot { opacity: 0; pointer-events: none; }
@keyframes g-breathe { 0%, 100% { opacity: 0.12; transform: scaleX(0.6); } 50% { opacity: 0.5; transform: scaleX(1); } }

/* ---- Top bar ------------------------------------------------------------- */
.bar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  height: calc(var(--bar-h) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) max(20px, env(safe-area-inset-right)) 0 max(20px, env(safe-area-inset-left));
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(16px) saturate(1.2); backdrop-filter: blur(16px) saturate(1.2);
  border-bottom: 1px solid var(--rule);
  transition: transform 0.45s var(--ease), opacity 0.45s var(--ease);
}
.bar.away { transform: translateY(-100%); opacity: 0; pointer-events: none; }
.bar-names { font-size: 21px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar nav { display: flex; gap: 26px; flex-shrink: 0; }
.bar nav a { text-decoration: none; opacity: 0.6; padding: 6px 0; border-bottom: 1px solid transparent; transition: opacity 0.2s, border-color 0.2s; }
.bar nav a:hover { opacity: 1; }
.bar nav a.on { opacity: 1; border-bottom-color: currentColor; }
@media (max-width: 420px) { .bar-names { font-size: 18px; } .bar nav { gap: 18px; } .bar nav a { letter-spacing: 0.26em; } }

/* ---- Views --------------------------------------------------------------- */
.view.enter { animation: g-view-in 0.6s var(--ease) both; }
@keyframes g-view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Photo backdrops (hero, panels, lock screen): fades and settles in. */
.bg-img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transform: scale(1.06);
  transition: opacity 1.2s ease, transform 2.6s var(--ease);
}
.bg-img.in { opacity: 1; transform: none; }

/* ---- Landing: hero ------------------------------------------------------- */
.hero {
  position: relative; height: 100vh; height: 100svh; min-height: 520px;
  display: flex; align-items: center; justify-content: center; text-align: center;
  color: #fff; background: #111; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,0.32) 0%, rgba(0,0,0,0.12) 38%, rgba(0,0,0,0.18) 62%, rgba(0,0,0,0.55) 100%);
}
.hero-inner { position: relative; z-index: 1; padding: 0 28px; max-width: 1100px; }
.hero-title { font-size: clamp(46px, 9.5vw, 128px); line-height: 0.98; text-shadow: 0 2px 30px rgba(0,0,0,0.25); }
.hero-sub { margin: 26px 0 0; font-size: 13px; letter-spacing: 0.46em; padding-left: 0.46em; text-shadow: 0 1px 14px rgba(0,0,0,0.55); }
.hero-company { position: absolute; z-index: 1; top: calc(28px + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; opacity: 0.85; }
.hero-company img { max-height: 34px; max-width: 160px; margin: 0 auto; filter: brightness(0) invert(1); opacity: 0.9; }
.scroll-cue {
  position: absolute; z-index: 1; bottom: calc(26px + env(safe-area-inset-bottom)); left: 50%;
  width: 1px; height: 56px; margin-left: -0.5px; overflow: hidden; background: rgba(255,255,255,0.25);
}
.scroll-cue::after { content: ""; position: absolute; left: 0; top: -100%; width: 1px; height: 100%; background: #fff; animation: g-cue 2.4s var(--ease) infinite; }
@keyframes g-cue { 0% { top: -100%; } 60%, 100% { top: 100%; } }
/* Hero text rises in once the cover is up. */
.hero .rise { opacity: 0; transform: translateY(14px); transition: opacity 1.1s ease, transform 1.4s var(--ease); }
.hero.ready .rise { opacity: 1; transform: none; }
.hero.ready .hero-sub.rise { transition-delay: 0.25s; }

/* The gallery's note, between the hero and the panels. */
.note { padding: clamp(72px, 12vw, 140px) 28px; text-align: center; }
.note p { max-width: 640px; margin: 0 auto; font-size: clamp(21px, 2.6vw, 28px); line-height: 1.5; font-style: italic; white-space: pre-line; }
.note .rule { width: 1px; height: 44px; background: var(--rule); margin: 0 auto 34px; }

/* ---- Landing: section panels --------------------------------------------- */
.panel {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  height: 88vh; height: 88svh; min-height: 460px; max-height: 1000px;
  color: #fff; text-decoration: none; text-align: center; overflow: hidden; background: #111;
}
.panel + .panel { border-top: 1px solid rgba(0,0,0,0.6); }
.panel::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.38); transition: background 0.6s ease; }
.panel:hover::after { background: rgba(0,0,0,0.3); }
.panel .bg-img.in { transition: opacity 1.2s ease, transform 6s var(--ease); }
.panel:hover .bg-img.in { transform: scale(1.03); }
html[data-theme="cinema"] .panel.mono .bg-img { filter: grayscale(1) contrast(1.06); }
.panel-inner { position: relative; z-index: 1; padding: 0 24px; }
.panel h2 { font-size: clamp(52px, 8.5vw, 104px); }
.panel .caps { display: block; margin: 16px 0 38px; font-size: 11px; letter-spacing: 0.42em; padding-left: 0.42em; }
.btn-outline {
  display: inline-block; border: 1px solid rgba(255,255,255,0.85); padding: 16px 36px 16px calc(36px + 0.38em);
  font-family: var(--body); font-size: 11px; text-transform: uppercase; letter-spacing: 0.38em;
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.panel:hover .btn-outline, .panel:focus-visible .btn-outline { background: #fff; color: #111; border-color: #fff; }
/* Panel text rises in as it scrolls into view. */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 1s ease, transform 1.2s var(--ease); }
.reveal.shown { opacity: 1; transform: none; }

/* ---- Films --------------------------------------------------------------- */
.films-view { padding-top: calc(var(--bar-h) + env(safe-area-inset-top)); }
.player-wrap { max-width: 1240px; margin: 0 auto; }
.player { position: relative; padding-top: 56.25%; background: #000; overflow: hidden; }
.player video, .player .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #000; }
.player .poster { object-fit: cover; transition: opacity 0.5s ease; }
.player::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 40%, rgba(0,0,0,0.35)); pointer-events: none; transition: opacity 0.5s; }
.player.playing .poster, .player.playing::after { opacity: 0; pointer-events: none; }
.play {
  position: absolute; z-index: 2; left: 50%; top: 50%; width: 84px; height: 84px; margin: -42px 0 0 -42px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,0.8); color: #fff;
  display: grid; place-items: center;
  background: rgba(0,0,0,0.28); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform 0.4s var(--ease), background 0.3s, opacity 0.4s;
}
.play svg { width: 22px; height: 22px; margin-left: 4px; }
.play:hover { transform: scale(1.06); background: rgba(255,255,255,0.14); }
.player.playing .play { opacity: 0; pointer-events: none; }
@media (max-width: 600px) { .play { width: 66px; height: 66px; margin: -33px 0 0 -33px; } .play svg { width: 18px; height: 18px; } }
@media (min-width: 900px) {
  .player-wrap { padding: 32px 40px 0; }
  .player { border-radius: 4px; box-shadow: 0 30px 80px -30px rgba(0,0,0,0.6); }
  html[data-dark="false"] .player { box-shadow: 0 24px 60px -36px rgba(0,0,0,0.45); }
}

.film-head { max-width: 760px; margin: 0 auto; padding: 38px 24px 0; text-align: center; }
.film-title { font-size: clamp(34px, 5.4vw, 56px); }
.film-meta { margin-top: 14px; color: var(--muted); display: flex; justify-content: center; align-items: center; gap: 18px; flex-wrap: wrap; }
@media (max-width: 600px) {
  .film-head { padding: 26px 20px 0; }
  .film-meta { margin-top: 10px; }
}
.film-desc { margin: 20px auto 0; max-width: 600px; color: var(--muted); font-size: 15px; line-height: 1.75; white-space: pre-line; }
.text-btn {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink);
  border-bottom: 1px solid var(--rule); padding-bottom: 3px; transition: border-color 0.2s;
}
.text-btn:hover { border-bottom-color: var(--ink); }
.text-btn svg { width: 13px; height: 13px; }

.film-list { max-width: 860px; margin: 52px auto 0; padding: 6px 30px; border-radius: 18px; background: var(--surface); border: 1px solid var(--rule); }
.film-row {
  width: 100%; display: flex; align-items: baseline; gap: 14px; padding: 24px 0; text-align: left;
  border-top: 1px solid var(--rule);
}
.film-row:first-child { border-top: 0; }
.film-row .t { font-family: var(--display); font-weight: var(--display-weight); font-style: var(--display-style);
  text-transform: var(--display-case); letter-spacing: var(--display-tracking);
  font-size: clamp(21px, 2.4vw, 27px); line-height: 1.2; opacity: 0.66; transition: opacity 0.25s; min-width: 0; }
.film-row .lead { flex: 1; min-width: 20px; border-bottom: 1px dotted var(--rule); transform: translateY(-6px); }
.film-row .d { color: var(--muted); flex-shrink: 0; letter-spacing: 0.18em; }
.film-row:hover .t, .film-row.on .t { opacity: 1; }
/* The film in the player: a small mark before its title. */
.film-row .mark { width: 0; margin-right: -14px; overflow: hidden; flex-shrink: 0; align-self: center; transition: width 0.3s var(--ease), margin 0.3s var(--ease); display: inline-flex; }
.film-row .mark svg { width: 9px; height: 9px; }
.film-row.on .mark { width: 16px; margin-right: 0; }
@media (max-width: 600px) { .film-list { margin: 40px 14px 0; padding: 4px 20px; border-radius: 16px; } .film-row { padding: 20px 0; } }

/* ---- Photos -------------------------------------------------------------- */
.photos-view { padding: calc(var(--bar-h) + env(safe-area-inset-top) + 12px) max(10px, env(safe-area-inset-right)) 0 max(10px, env(safe-area-inset-left)); }
.photo-card {
  max-width: 1560px; margin: 0 auto; background: var(--card); color: var(--card-ink);
  border-radius: 20px; padding: 20px 14px 14px;
  /* A light theme's card may match the page: a hairline keeps it a card. */
  box-shadow: 0 0 0 1px var(--card-rule);
}
@media (min-width: 700px) { .photos-view { padding-left: 20px; padding-right: 20px; } .photo-card { border-radius: 26px; padding: 30px 30px 30px; } }
@media (min-width: 1200px) { .photo-card { padding: 38px 44px 44px; } }

.tabs-row { display: flex; align-items: flex-end; gap: 18px; border-bottom: 1px solid var(--card-rule); }
.tabs { display: flex; gap: 30px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding: 0 24px 0 2px;
  /* Tabs that run off the edge fade out rather than being cut. */
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 28px), transparent); }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex-shrink: 0; white-space: nowrap; padding: 6px 0 15px; opacity: 0.45; text-decoration: none; border-bottom: 1px solid transparent; margin-bottom: -1px; transition: opacity 0.2s, border-color 0.2s; }
.tab:hover { opacity: 0.8; }
.tab.on { opacity: 1; border-bottom-color: currentColor; }
.fav-link { display: inline-flex; align-items: center; gap: 7px; padding: 6px 2px 15px; text-decoration: none; flex-shrink: 0; opacity: 0.85; }
.fav-link svg { width: 17px; height: 17px; }
.fav-link.has svg { color: var(--heart); }
.fav-link .n { letter-spacing: 0.1em; }
.pop { animation: g-pop 0.4s var(--ease); }
@keyframes g-pop { 40% { transform: scale(1.3); } }

.album-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 20px; margin: 30px 2px 24px; }
.album-title { font-size: clamp(34px, 5vw, 62px); }
.album-head .caps { opacity: 0.6; }
@media (min-width: 700px) { .album-head { margin: 40px 2px 32px; } }

/* Masonry: columns filled shortest-first (gallery.js), so photos read
   roughly left to right and more can be appended without reshuffling. */
.grid { display: flex; align-items: flex-start; gap: 8px; }
.col { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 700px) { .grid, .col { gap: 12px; } }
.tile { position: relative; margin: 0; overflow: hidden; cursor: zoom-in; border-radius: 2px;
  background: rgba(0,0,0,0.06); background: color-mix(in srgb, var(--card-ink) 7%, transparent); }
.tile .pad { display: block; }
.tile img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.7s ease, transform 0.9s var(--ease); }
.tile img.in { opacity: 1; }
.tile-actions { position: absolute; right: 7px; bottom: 7px; display: flex; gap: 6px; z-index: 1; }
.round {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,0.94); color: #141414; box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  transition: opacity 0.25s ease, transform 0.25s var(--ease), background 0.2s;
}
.round svg { width: 14px; height: 14px; }
.round:hover { background: #fff; transform: scale(1.06); }
.round.on { color: var(--heart); }
.round.busy { opacity: 0.6; pointer-events: none; }
/* A computer: the buttons appear on hover (a favourite's heart stays). */
@media (hover: hover) and (pointer: fine) {
  .tile:hover img { transform: scale(1.025); }
  .round { width: 36px; height: 36px; }
  .round svg { width: 16px; height: 16px; }
  .tile-actions { right: 10px; bottom: 10px; gap: 8px; }
  .tile .round { opacity: 0; transform: translateY(4px); }
  .tile:hover .round, .tile:focus-within .round, .tile .round.on { opacity: 1; transform: none; }
}
.empty { text-align: center; padding: 60px 20px 80px; opacity: 0.6; font-size: 15px; }
.sentinel { height: 1px; }

/* ---- Lightbox ------------------------------------------------------------ */
html.lb-open, html.lb-open body { overflow: hidden; }
.lb {
  position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column;
  background: #0a0a0a; color: #f4f1ec;
  animation: g-fade 0.3s ease both;
}
html[data-dark="false"] .lb { background: var(--bg); color: var(--ink); }
@keyframes g-fade { from { opacity: 0; } }
.lb-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
  padding: calc(10px + env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) 10px max(18px, env(safe-area-inset-left));
  transition: opacity 0.3s;
}
.lb-count { opacity: 0.7; letter-spacing: 0.24em; }
.lb-tools { display: flex; gap: 4px; }
.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; transition: background 0.2s, color 0.2s; }
.icon-btn:hover { background: rgba(127,127,127,0.16); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn.on { color: var(--heart); }
.icon-btn.busy { opacity: 0.5; pointer-events: none; }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
  padding: 0 max(12px, env(safe-area-inset-right)) 0 max(12px, env(safe-area-inset-left)); touch-action: pinch-zoom; overflow: hidden; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; will-change: transform; }
@media (min-width: 900px) { .lb-stage { padding: 0 96px; } }
.lb-nav { position: absolute; top: 50%; width: 56px; height: 56px; margin-top: -28px; z-index: 2; display: grid; place-items: center; border-radius: 50%; opacity: 0.7; transition: opacity 0.2s, background 0.2s; }
.lb-nav:hover { opacity: 1; background: rgba(127,127,127,0.16); }
.lb-nav svg { width: 26px; height: 26px; }
.lb-prev { left: max(16px, env(safe-area-inset-left)); }
.lb-next { right: max(16px, env(safe-area-inset-right)); }
@media (hover: none), (max-width: 700px) { .lb-nav { display: none; } }
.lb-caption { flex-shrink: 0; min-height: 22px; text-align: center; padding: 12px 24px calc(16px + env(safe-area-inset-bottom)); opacity: 0.7; font-size: 14px; transition: opacity 0.3s; }
/* Tap the photo: the controls step aside. */
.lb.bare .lb-top, .lb.bare .lb-caption, .lb.bare .lb-nav { opacity: 0; pointer-events: none; }

/* ---- Lock & message screens ---------------------------------------------- */
.screen {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; overflow: hidden;
  padding: calc(24px + env(safe-area-inset-top)) 24px calc(24px + env(safe-area-inset-bottom));
  background: var(--bg); color: var(--ink); text-align: center;
  transition: opacity 0.6s ease;
}
.screen.has-cover { background: #0b0b0b; color: #fff; }
.screen.out { opacity: 0; pointer-events: none; }
.screen .blur { position: absolute; inset: -60px; width: calc(100% + 120px); height: calc(100% + 120px); object-fit: cover;
  max-width: none; filter: blur(30px) brightness(0.5) saturate(1.1); transform: scale(1.08); opacity: 0; transition: opacity 1.2s ease; }
.screen .blur.in { opacity: 1; }
.screen-box { position: relative; width: min(440px, 100%); }
.screen h1 { font-size: clamp(42px, 9vw, 76px); }
.screen p { margin: 20px auto 0; max-width: 360px; font-size: 15px; line-height: 1.6; opacity: 0.82; }
.lock-form { margin: 34px auto 0; display: flex; border: 1px solid currentColor; border-color: rgba(127,127,127,0.6); }
.screen.has-cover .lock-form { border-color: rgba(255,255,255,0.6); }
.lock-form:focus-within { border-color: currentColor !important; }
.lock-form input {
  flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: inherit;
  font: inherit; font-size: 16px; /* 16px: iOS doesn't zoom in */ padding: 15px 16px; letter-spacing: 0.04em;
}
.lock-form input::placeholder { color: inherit; opacity: 0.5; }
.lock-form button { padding: 0 22px 0 calc(22px + 0.34em); border-left: 1px solid; border-color: inherit; transition: background 0.3s, color 0.3s; }
.lock-form button:hover { background: rgba(255,255,255,0.12); }
.lock-form button:disabled { opacity: 0.5; }
.lock-msg { min-height: 22px; margin-top: 16px; font-size: 13px; opacity: 0.85; }
.shake { animation: g-shake 0.45s ease; }
@keyframes g-shake { 15%, 55% { transform: translateX(-8px); } 35%, 75% { transform: translateX(8px); } 90% { transform: translateX(-3px); } }
.screen-foot { position: absolute; left: 0; right: 0; bottom: calc(22px + env(safe-area-inset-bottom)); opacity: 0.6; }
.screen .btn-outline { margin-top: 30px; border-color: currentColor; }
.screen .btn-outline:hover { background: var(--ink); color: var(--bg); }

/* ---- Footer & toast ------------------------------------------------------ */
.foot { padding: 80px 24px calc(52px + env(safe-area-inset-bottom)); text-align: center; color: var(--muted); }
.foot img { max-height: 40px; max-width: 160px; margin: 0 auto 16px; opacity: 0.85; }
.foot .company { color: var(--ink); opacity: 0.8; margin-bottom: 10px; }
.foot .by { font-size: 10px; letter-spacing: 0.3em; text-decoration: none; opacity: 0.75; }
.foot .by:hover { opacity: 1; }

.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 120;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: rgba(20,20,20,0.92); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 13px;
  transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Reduced motion ------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .bg-img, .reveal, .hero .rise { transform: none !important; }
  .scroll-cue::after { display: none; }
}

/* ---- Film player controls (buildControls) ----------------------------- */
.player .vc { position: absolute; inset: 0; z-index: 3; opacity: 0; pointer-events: none; transition: opacity 0.35s ease; }
.player.playing .vc { opacity: 1; pointer-events: auto; }
.player.playing.idle .vc { opacity: 0; }
.player.playing.idle { cursor: none; }
.vc-hit { position: absolute; inset: 0; }
.vc-bar { position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 12px; background: linear-gradient(to top, rgba(0,0,0,0.62), rgba(0,0,0,0.28) 55%, transparent); }
.vc-row { display: flex; align-items: center; gap: 4px; margin-top: 2px; }
.vc-gap { flex: 1; }
.vc-btn { width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center; border: 0; padding: 0; background: none; color: #fff; cursor: pointer; border-radius: 50%; opacity: 0.92; transition: opacity 0.2s, background 0.2s, transform 0.15s; -webkit-tap-highlight-color: transparent; }
.vc-btn:hover { opacity: 1; background: rgba(255,255,255,0.1); }
.vc-btn:active { transform: scale(0.92); }
.vc-btn svg { width: 22px; height: 22px; }
.vc-pp svg { width: 20px; height: 20px; }
.vc-btn[hidden] { display: none; }
/* Volume: the slider slides out beside the speaker on hover / focus. */
.vc-vol { display: inline-flex; align-items: center; }
.vc-vol-range { -webkit-appearance: none; appearance: none; width: 0; height: 22px; margin: 0; padding: 0; opacity: 0; background: none; cursor: pointer; outline: none; transition: width 0.25s var(--ease, ease), opacity 0.2s, margin 0.25s; }
.vc-vol:hover .vc-vol-range, .vc-vol:focus-within .vc-vol-range, .vc-vol-range:active { width: 84px; margin: 0 8px 0 2px; opacity: 1; }
.vc-vol-range::-webkit-slider-runnable-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, #fff var(--v, 100%), rgba(255,255,255,0.28) var(--v, 100%)); }
.vc-vol-range::-moz-range-track { height: 3px; border-radius: 3px; background: linear-gradient(to right, #fff var(--v, 100%), rgba(255,255,255,0.28) var(--v, 100%)); }
.vc-vol-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.4); }
.vc-vol-range::-moz-range-thumb { width: 12px; height: 12px; border: 0; border-radius: 50%; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,0.4); }
.vc-vol-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 3px rgba(255,255,255,0.35); }
@media (hover: none) { .vc-vol-range { display: none; } }
.vc-time { margin-left: 6px; font-family: var(--body-font, inherit); font-size: 12px; letter-spacing: 0.06em; color: rgba(255,255,255,0.82); font-variant-numeric: tabular-nums; white-space: nowrap; }
.vc-scrub { position: relative; height: 22px; display: flex; align-items: center; cursor: pointer; touch-action: none; outline: none; }
.vc-track { position: relative; width: 100%; height: 3px; border-radius: 3px; background: rgba(255,255,255,0.22); transition: height 0.18s ease; }
.vc-scrub:hover .vc-track, .player.scrubbing .vc-track, .vc-scrub:focus-visible .vc-track { height: 5px; }
.vc-buf, .vc-fill { position: absolute; inset: 0; border-radius: inherit; transform-origin: left center; transform: scaleX(0); will-change: transform; }
.vc-buf { background: rgba(255,255,255,0.32); }
.vc-fill { background: #fff; }
.vc-knob { position: absolute; top: 50%; left: 0; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: #fff; box-shadow: 0 1px 6px rgba(0,0,0,0.4); transform: scale(0); transition: transform 0.18s ease; will-change: left; }
.vc-scrub:hover .vc-knob, .player.scrubbing .vc-knob, .vc-scrub:focus-visible .vc-knob { transform: scale(1); }
.vc-tip { position: absolute; bottom: 26px; left: 0; width: 160px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; pointer-events: none; opacity: 0; transition: opacity 0.15s; }
.vc-scrub.hover .vc-tip, .player.scrubbing .vc-tip { opacity: 1; }
.vc-thumb { width: 160px; height: 90px; border-radius: 6px; background-color: #000; background-repeat: no-repeat; box-shadow: 0 10px 30px rgba(0,0,0,0.5); border: 1px solid rgba(255,255,255,0.18); }
.vc-thumb[hidden] { display: none; }
.vc-tip-time { font-size: 12px; letter-spacing: 0.06em; color: #fff; font-variant-numeric: tabular-nums; text-shadow: 0 1px 4px rgba(0,0,0,0.6); }
.vc-flash { position: absolute; top: 50%; left: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: rgba(0,0,0,0.38); color: #fff; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.vc-flash svg { width: 28px; height: 28px; }
.vc-flash.go { animation: vc-flash 0.6s ease; }
@keyframes vc-flash { 0% { opacity: 0.95; transform: scale(0.85); } 100% { opacity: 0; transform: scale(1.25); } }
.player.on-tv video { opacity: 0.15; }
.player:fullscreen, .player:-webkit-full-screen { padding-top: 0; width: 100%; height: 100%; border-radius: 0; }
.player:fullscreen .vc-bar { padding: 60px 32px 22px; }
.player { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
/* Phones: a tall, cropped frame instead of a thin full-width strip (tapping
   plays full screen, where the whole film shows). */
@media (max-width: 600px) {
  .player { padding-top: 0; height: min(125vw, 68vh); height: min(125vw, 68svh); }
  .player video { object-fit: cover; }
  .player:fullscreen { height: 100%; }
  .player:fullscreen video { object-fit: contain; }
}
@media (max-width: 640px) {
  .vc-bar { padding: 30px 10px 6px; }
  .vc-btn { width: 38px; height: 38px; }
  .vc-time { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .player .vc, .vc-track, .vc-knob, .vc-tip { transition: none; }
  .vc-flash.go { animation: none; }
}

/* ---- Download all / Play all ------------------------------------------- */
.hero-dl { display: inline-flex; align-items: center; gap: 8px; margin-top: 26px; padding: 11px 22px; border: 1px solid rgba(255,255,255,0.55); color: #fff; text-decoration: none; font-size: 11px; transition: background 0.25s, border-color 0.25s; }
.hero-dl:hover { background: rgba(255,255,255,0.12); border-color: #fff; }
.hero-dl svg, .bar-dl svg, .btn-line svg, .album-dl svg { width: 15px; height: 15px; }
.bar-dl { display: inline-flex; align-items: center; gap: 7px; margin-left: 8px; padding-left: 22px; border-left: 1px solid var(--rule); }
@media (max-width: 600px) { .bar-dl .lbl { display: none; } .bar-dl { padding-left: 14px; margin-left: 2px; } }
.film-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn-line { display: inline-flex; align-items: center; gap: 9px; height: 44px; padding: 0 22px; border: 1px solid color-mix(in srgb, var(--ink) 45%, transparent); background: none; color: var(--ink); font-size: 11px; text-decoration: none; cursor: pointer; transition: background 0.25s, border-color 0.25s; }
.btn-line:hover { border-color: var(--ink); background: color-mix(in srgb, var(--ink) 8%, transparent); }
.btn-line svg { width: 13px; height: 13px; }
@media (max-width: 600px) { .film-actions { margin-top: 20px; } .film-list { margin-top: 30px; } }
/* Download (more than one film): this video or all of them. */
.dl-pick { position: relative; display: inline-flex; }
.dl-toggle { background: none; border-top: 0; border-left: 0; border-right: 0; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; }
.dl-menu { position: absolute; top: calc(100% + 10px); left: 50%; z-index: 20; min-width: 190px; padding: 6px; border-radius: 12px;
  background: linear-gradient(var(--surface), var(--surface)), var(--bg); border: 1px solid var(--rule); box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  display: flex; flex-direction: column; opacity: 0; pointer-events: none; transform: translate(-50%, -6px); transition: opacity 0.2s, transform 0.2s; }
.dl-pick.open .dl-menu { opacity: 1; pointer-events: auto; transform: translate(-50%, 0); }
.dl-item { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; white-space: nowrap; }
.dl-item:hover, .dl-item:focus-visible { background: color-mix(in srgb, var(--ink) 8%, transparent); }
.dl-item svg { width: 14px; height: 14px; }
@media (prefers-reduced-motion: reduce) { .dl-menu { transition: none; } }
.album-head .album-dl { margin-left: auto; align-self: center; }
.album-dl .text-btn { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: inherit; opacity: 0.75; font-size: 11px; }
.album-dl .text-btn:hover { opacity: 1; }
.g-toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); padding: 12px 20px; border-radius: 999px; background: rgba(20,17,14,0.92); color: #f3eee6; font-size: 13px; letter-spacing: 0.02em; opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s; z-index: 60; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.g-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Up next (the last 5 seconds) ---------------------------------------- */
.upnext { position: absolute; right: 18px; bottom: 74px; z-index: 4; display: flex; align-items: center; gap: 14px; padding: 10px 12px 10px 10px; border-radius: 12px; background: rgba(12,10,8,0.78); color: #fff; box-shadow: 0 18px 40px rgba(0,0,0,0.45); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); opacity: 0; transform: translateY(14px) scale(0.98); pointer-events: none; transition: opacity 0.35s ease, transform 0.35s ease; max-width: min(380px, calc(100% - 36px)); }
.upnext.on { opacity: 1; transform: none; pointer-events: auto; }
.un-thumb { position: relative; flex: none; width: 128px; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: #000; }
.un-poster { width: 100%; height: 100%; object-fit: cover; display: block; }
.un-go { position: absolute; inset: 0; border: 0; padding: 0; background: rgba(0,0,0,0.28); display: flex; align-items: center; justify-content: center; cursor: pointer; color: #fff; }
.un-ring { position: relative; width: 48px; height: 48px; display: flex; align-items: center; justify-content: center; }
.un-ring svg:first-child { position: absolute; inset: 0; width: 48px; height: 48px; transform: rotate(-90deg); }
.un-ring circle { fill: none; stroke-width: 2.5; }
.un-ring .bg { stroke: rgba(255,255,255,0.28); }
.un-ring .fg { stroke: #fff; stroke-linecap: round; transition: stroke-dashoffset 0.12s linear; }
.un-ring > svg:last-child { width: 18px; height: 18px; margin-left: 2px; }
.un-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.un-label { font-size: 10px; color: rgba(255,255,255,0.7); }
.un-title { font-size: 21px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.un-close { flex: none; align-self: flex-start; width: 28px; height: 28px; border: 0; border-radius: 50%; background: none; color: rgba(255,255,255,0.7); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.un-close:hover { color: #fff; background: rgba(255,255,255,0.12); }
.un-close svg { width: 15px; height: 15px; }
.player.playing.idle .upnext.on { opacity: 1; }
@media (max-width: 640px) {
  .upnext { right: 10px; bottom: 62px; gap: 10px; padding: 8px; }
  .un-thumb { width: 92px; }
  .un-title { font-size: 17px; }
  .un-ring, .un-ring svg:first-child { width: 38px; height: 38px; }
}
@media (prefers-reduced-motion: reduce) { .upnext, .g-toast { transition: none; } }

/* A vendor's sample gallery (/testgallery/<name>): always says so. */
.g-test-ribbon { position: fixed; left: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 45; max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: 12px; background: #f2a981; color: #1b1410; font: 500 12.5px/1.4 system-ui, -apple-system, sans-serif;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35); pointer-events: none; }
.g-test-ribbon b { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 11.5px; }
