/* The film (owner note 44): a film night by the campfire. Campfire Hollow plays behind, dim; when the film starts the
   lights go down, the titles step back and the screen opens up. When it ends, the lights come up again. */
:root { --ink: #EEE8DC; --dim: #C8BFAF; --faint: #8F877B; --gold: #FFC867; --fire: 255 170 90; }
body.film { margin: 0; min-height: 100vh; min-height: 100svh; color: var(--ink); background: #07080F; overflow-x: hidden; }

.bar { position: fixed; z-index: 20; left: 0; right: 0; top: 0; display: flex; justify-content: space-between; align-items: center;
  padding: 18px clamp(18px, 3vw, 48px); transition: opacity .8s; }
.bar .wordmark { font-family: var(--pixel); font-size: 18px; letter-spacing: .08em; color: var(--ink); text-decoration: none; text-shadow: 0 1px 8px rgba(0, 0, 0, .6); }
.bar-links { display: flex; align-items: center; gap: 22px; }
.bar .back { font-family: var(--tiny); font-size: 12px; letter-spacing: .06em; color: var(--ink); text-decoration: none; opacity: .85; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.bar .get, .cta { font-family: var(--tiny); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; color: #1F1915;
  background: var(--gold); padding: 8px 12px; border-radius: 8px; }
a:focus-visible, button:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

/* The campfire behind everything */
.cinema { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; }
.world { position: fixed; inset: 0; z-index: 0; }
.shade { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(80% 70% at 50% 45%, rgba(4, 5, 12, .55), rgba(4, 5, 12, .82) 100%); transition: background-color 1.2s, opacity 1.2s; }
.shade::after { content: ""; position: absolute; inset: 0; background: #030409; opacity: 0; transition: opacity 1.4s var(--ease); }
body.playing .shade::after { opacity: .93; }
body.paused .shade::after { opacity: .6; }
body.playing .bar, body.paused .bar { opacity: 0; pointer-events: none; }
/* Owner note 45: the way out, top right, while the film is playing or paused */
.close { position: fixed; z-index: 30; top: 16px; right: clamp(16px, 3vw, 44px); display: flex; align-items: center; gap: 8px;
  padding: 9px 14px; border: 0; border-radius: 999px; cursor: pointer; color: var(--ink); background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .2); font-family: var(--tiny); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase;
  opacity: 0; pointer-events: none; transition: opacity .6s, background .2s; }
.close:hover { background: rgba(255, 255, 255, .18); }
body.playing .close { opacity: .6; pointer-events: auto; }
body.playing.hud-on .close, body.paused .close, .close:focus-visible { opacity: 1; pointer-events: auto; }

.stagebox { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 150px clamp(16px, 4vw, 48px) 24px; gap: 22px; }
body.playing .stagebox, body.paused .stagebox { padding-top: 24px; }
.frame { position: relative; display: flex; justify-content: center; width: 100%; }
.titles { position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 22px; text-align: center; transition: opacity .8s, transform .8s var(--ease); }
body.playing .titles { opacity: 0; transform: translateY(-8px); }
.kicker { margin: 0 0 8px; font-family: var(--tiny); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
h1 { margin: 0; font-family: var(--pixel); font-weight: 500; font-size: clamp(30px, 3.4vw, 50px); line-height: 1.05; text-shadow: 0 2px 20px rgba(0, 0, 0, .6); }

/* The screen: 16:9, warm firelight on its edge until the film starts */
.screen { position: relative; margin: 0; width: min(74vw, calc((100svh - 300px) * 16 / 9), 1200px); min-width: min(100%, 300px); aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 1px rgba(255, 236, 210, .12), 0 0 60px 6px rgb(var(--fire) / .14), 0 30px 80px rgba(0, 0, 0, .6);
  transition: width 1.1s var(--ease), box-shadow 1.2s, border-radius 1.1s; }
body.playing .screen, body.paused .screen { width: min(94vw, calc((100svh - 120px) * 16 / 9)); border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .05), 0 0 90px 10px rgba(0, 0, 0, .8); }
.screen video { width: 100%; height: 100%; object-fit: cover; display: block; background: #000; }

.play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  border: 0; background: radial-gradient(60% 60% at 50% 50%, rgba(0, 0, 0, .25), rgba(0, 0, 0, .05)); cursor: pointer; color: var(--ink); transition: opacity .5s; }
.play .disc { width: 84px; height: 84px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 200, 103, .94);
  box-shadow: 0 0 0 8px rgba(255, 200, 103, .18), 0 12px 30px rgba(0, 0, 0, .45); transition: transform .3s var(--ease), box-shadow .3s; }
.play .disc svg { width: 34px; height: 34px; fill: #1F1915; margin-left: 4px; }
.play:hover .disc { transform: scale(1.06); box-shadow: 0 0 0 12px rgba(255, 200, 103, .16), 0 12px 30px rgba(0, 0, 0, .45); }
.play .lbl { font-family: var(--tiny); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 1px 8px rgba(0, 0, 0, .8); }
body.playing .play { opacity: 0; pointer-events: none; }

/* A quiet control strip that appears while you move the pointer */
.hud { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 10px; padding: 26px 14px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, .6), rgba(0, 0, 0, 0)); opacity: 0; transition: opacity .4s; pointer-events: none; }
body.playing.hud-on .hud, body.paused .hud { opacity: 1; pointer-events: auto; }
body:not(.playing):not(.paused) .hud { display: none; }
.hud button { width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; cursor: pointer; display: grid; place-items: center; color: var(--ink); }
.hud button:hover { background: rgba(255, 255, 255, .1); }
.hud svg { width: 20px; height: 20px; fill: currentColor; stroke: currentColor; stroke-width: 0; }
#snd svg path, #fs svg path { fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
#snd svg path:first-child { fill: currentColor; stroke-width: 0; }
#pp .i-play { display: none; } body.paused #pp .i-play { display: block; } body.paused #pp .i-pause { display: none; }
#snd .i-off { display: none; } #snd[aria-pressed="true"] .i-off { display: block; } #snd[aria-pressed="true"] .i-on { display: none; }
.track { flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.track span { display: block; height: 100%; width: 0; background: var(--gold); }

.after { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; animation: rise .6s var(--ease); }
.after[hidden] { display: none; }
.after .again, .after .ghost { font-family: var(--tiny); font-size: 11.5px; letter-spacing: .07em; text-transform: uppercase; text-decoration: none; color: var(--ink);
  background: rgba(255, 255, 255, .08); border: 0; padding: 8px 12px; border-radius: 8px; cursor: pointer; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16); }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }

.fine { position: relative; z-index: 2; margin: 0; transition: opacity .8s; padding: 0 clamp(16px, 3vw, 48px) 22px; text-align: center; font-size: 12px; color: var(--faint); transition: opacity .8s; }
body.playing .fine { opacity: 0; }
.draft { opacity: .7; }

@media (max-width: 900px) {
  .bar .back .lbl { display: none; }
  .screen { width: 100%; }
  body.playing .screen, body.paused .screen { width: 100%; }
  .play .disc { width: 66px; height: 66px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
