/* =====================================================================
   PREMIERE FILM — styles for the animated hero video (see film.js)
   The film is laid out on a fixed 960×540 canvas and scaled to fit, so
   all sizes below are "canvas pixels". Timings are seconds from the start
   of each scene and must match the cues in film.js.
   Animations only run inside the scene that is on screen (.is-on).
   ===================================================================== */

/* ---------- Host + canvas ---------- */
.film-host { position: relative; overflow: hidden; background: #000; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.film-host > .film-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.film-host:fullscreen { cursor: default; }

.film {
  --fa: var(--gold, #e3a092);
  --fal: var(--gold-light, #f7d2c8);
  --red: #e50914;
  --nl: 7;
  --f-serif: "Playfair Display", Georgia, serif;
  --f-sans: "DM Sans", "Segoe UI", system-ui, sans-serif;
  --f-hand: "Caveat", "Segoe Script", cursive;
  position: absolute; top: 0; left: 0;
  width: 960px; height: 540px;
  overflow: hidden;
  transform-origin: 0 0;
  background: #0c0908;
  color: #fff;
  font-family: var(--f-sans);
  font-size: 14px; font-weight: 400; line-height: 1.4; letter-spacing: 0; text-align: left;
  -webkit-font-smoothing: antialiased;
  user-select: none; -webkit-user-select: none;
  pointer-events: none;
}
.film *, .film *::before, .film *::after { box-sizing: border-box; }
.film img { display: block; max-width: none; }
.film p, .film h4 { margin: 0; }
.film h4 { font-weight: 400; }

.film .sc { position: absolute; inset: 0; overflow: hidden; opacity: 0; visibility: hidden; }
.film .sc.is-on { visibility: visible; }
/* JS sets each animation's time itself, so the browser must not advance them. */
.film.is-driven .sc, .film.is-driven .sc *, .film.is-paused .sc, .film.is-paused .sc * { animation-play-state: paused !important; }

/* ---------- Shared pieces ---------- */
.f-mark { color: var(--red); font-family: var(--f-sans); font-size: 22px; font-weight: 800; line-height: 1; letter-spacing: 0; }
.f-cap { position: absolute; z-index: 8; top: 24px; left: 28px; display: flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: rgba(12,9,8,.78); font-size: 13px; font-weight: 700; white-space: nowrap; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.f-cap b { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--fal); color: #21160e; font-size: 11px; font-weight: 800; }
.is-on .f-cap { animation: f-down .5s cubic-bezier(.2,.8,.2,1) .15s both; }

.f-cur { position: absolute; z-index: 20; top: 0; left: 0; width: 26px; height: 26px; margin: -3px 0 0 -5px; opacity: 0; filter: drop-shadow(0 3px 6px rgba(0,0,0,.55)); }
.f-cur svg { display: block; width: 100%; height: 100%; }
.f-rip { position: absolute; z-index: 19; width: 48px; height: 48px; margin: -24px 0 0 -24px; border: 2px solid #fff; border-radius: 50%; opacity: 0; }
.f-heart { position: absolute; z-index: 6; top: 500px; color: var(--fa); font-size: var(--z, 16px); font-style: normal; line-height: 1; opacity: 0; text-shadow: 0 0 12px rgba(0,0,0,.4); }
.is-on .f-heart { animation: f-float var(--dur, 2.5s) cubic-bezier(.2,.6,.3,1) var(--d, 0s) both; }
.f-caret { display: inline-block; width: 2px; height: 18px; margin-left: 2px; background: var(--fal); vertical-align: -3px; opacity: 0; }

/* ---------- Keyframes ---------- */
@keyframes f-in    { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes f-down  { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes f-fade  { from { opacity: 0; } to { opacity: 1; } }
@keyframes f-hide  { to { opacity: 0; } }
@keyframes f-pop   { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
@keyframes f-press { 0%, 100% { transform: scale(1); } 45% { transform: scale(.92); } }
@keyframes f-rip   { 0% { opacity: 0; transform: scale(.3); } 12% { opacity: .9; } 100% { opacity: 0; transform: scale(1.8); } }
@keyframes f-kb    { from { transform: scale(1.14) translateX(-1.5%); } to { transform: scale(1.02); } }
@keyframes f-float { 0% { opacity: 0; transform: translateY(0) scale(.5) rotate(-10deg); } 15% { opacity: .95; } 100% { opacity: 0; transform: translateY(-300px) scale(1.15) rotate(12deg); } }
@keyframes f-slide { from { opacity: 0; transform: translateX(60px); } to { opacity: 1; transform: none; } }
@keyframes f-drop  { from { opacity: 0; transform: translateY(70px) rotate(-8deg) scale(.75); } to { opacity: 1; transform: none; } }
@keyframes f-bar   { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes f-pulse { 50% { opacity: .25; } }
@keyframes f-msg   { from { opacity: 0; transform: translateY(12px) scale(.85); } to { opacity: 1; transform: none; } }
@keyframes f-dot   { 0%, 100% { opacity: .45; transform: translateY(0); } 50% { opacity: 1; transform: translateY(-3px); } }

/* =====================================================================
   1 · CREATE (5s) — type name + note, press "Create gift", link appears
   ===================================================================== */
.sc-create, .sc-upload {
  background:
    radial-gradient(ellipse 55% 65% at 80% 18%, var(--glow, rgba(186,82,92,.28)), transparent 70%),
    radial-gradient(ellipse 40% 50% at 10% 95%, rgba(255,255,255,.04), transparent 70%),
    linear-gradient(135deg, #1e1512, #0b0807);
}
.cr-card { position: absolute; left: 250px; top: 80px; width: 460px; padding: 26px; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: linear-gradient(170deg, #2b1f1a, #161010); box-shadow: 0 40px 80px rgba(0,0,0,.55); }
.cr-top { display: flex; align-items: center; gap: 9px; height: 24px; margin-bottom: 16px; }
.cr-brand { font-family: var(--f-serif); font-size: 18px; letter-spacing: -.05em; }
.cr-brand i, .fi-brand i { color: var(--fa); font-style: normal; }
.cr-tag { margin-left: auto; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.08); color: #cdbfb2; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.cr-card h4 { margin-bottom: 16px; font-family: var(--f-serif); font-size: 26px; letter-spacing: -.03em; line-height: 1.1; }
.cr-label { margin-bottom: 6px; color: #bcad9f; font-size: 11px; font-weight: 700; letter-spacing: .06em; line-height: 15px; text-transform: uppercase; }
.cr-field { height: 42px; margin-bottom: 14px; padding: 10px 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); border-radius: 10px; background: rgba(255,255,255,.05); font-size: 16px; line-height: 20px; white-space: nowrap; }
.cr-field.is-focus { border-color: var(--fa); box-shadow: 0 0 0 3px rgba(255,255,255,.05); }
.cr-note { height: 62px; font-size: 14px; line-height: 20px; white-space: normal; }
.cr-act { position: relative; height: 46px; margin-top: 4px; }
.cr-btn, .cr-done { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 999px; font-size: 15px; font-weight: 700; }
.cr-btn { background: var(--fal); color: #21160e; }
.cr-done { border: 1px solid rgba(70,211,105,.55); background: rgba(70,211,105,.14); color: #9af3b1; opacity: 0; }
.cr-done b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #46d369; color: #05210d; font-size: 12px; }
.cr-link { position: absolute; left: 290px; top: 456px; width: 380px; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border: 1px dashed var(--fa); border-radius: 999px; background: rgba(12,9,8,.9); color: var(--fal); font-size: 14px; font-weight: 600; opacity: 0; }
.cr-url { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-link b { margin-left: auto; padding: 6px 14px; border-radius: 999px; background: var(--fal); color: #21160e; font-size: 12px; }

.is-on .cr-card { animation: f-in .6s cubic-bezier(.2,.8,.2,1) .1s both; }
.is-on .cr-btn  { animation: f-press .3s ease 3.5s both, f-hide .25s ease 3.85s forwards; }
.is-on .cr-done { animation: f-pop .45s ease 3.85s both; }
.is-on .cr-link { animation: f-in .5s cubic-bezier(.2,.8,.2,1) 4.1s both; }
.sc-create .f-rip { left: 480px; top: 392px; }
.sc-create.is-on .f-rip { animation: f-rip .6s ease-out 3.55s both; }
.sc-create.is-on .f-cur { animation: cur-create 5s linear both; }
@keyframes cur-create {
  0%, 52% { opacity: 0; transform: translate(780px, 480px); }
  56% { opacity: 1; transform: translate(760px, 466px); animation-timing-function: cubic-bezier(.3,.6,.25,1); }
  69% { transform: translate(480px, 392px); }
  71% { transform: translate(480px, 392px) scale(.86); }
  74% { transform: translate(480px, 392px) scale(1); }
  90% { opacity: 1; transform: translate(480px, 392px); }
  100% { opacity: 0; transform: translate(520px, 420px); }
}

/* =====================================================================
   2 · UPLOAD (5s) — photos drop in, progress bars, counter, a friend joins
   ===================================================================== */
.up-card { position: absolute; left: 160px; top: 84px; width: 640px; padding: 24px 30px; border: 1px solid rgba(255,255,255,.12); border-radius: 20px; background: linear-gradient(170deg, #2b1f1a, #161010); box-shadow: 0 40px 80px rgba(0,0,0,.55); }
.up-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.up-head > div { min-width: 0; }
.up-head h4 { overflow: hidden; font-family: var(--f-serif); font-size: 24px; letter-spacing: -.03em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.up-head p { margin-top: 4px; color: #bcad9f; font-size: 12px; }
.up-live { display: flex; flex: none; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: rgba(229,9,20,.16); color: #ff9a9a; font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.up-live i { width: 7px; height: 7px; border-radius: 50%; background: #ff4d4d; }
.up-grid { display: grid; grid-template-columns: repeat(4, 136px); grid-auto-rows: 96px; gap: 12px; }
.up-tile { position: relative; overflow: hidden; border-radius: 10px; background: rgba(255,255,255,.06); opacity: 0; }
.up-tile img { width: 100%; height: 100%; object-fit: cover; }
.up-bar { position: absolute; right: 8px; bottom: 8px; left: 8px; height: 4px; overflow: hidden; border-radius: 2px; background: rgba(0,0,0,.5); }
.up-bar i { display: block; height: 100%; background: var(--fal); transform: scaleX(0); transform-origin: left; }
.up-ok { position: absolute; top: 7px; right: 7px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #46d369; color: #05210d; font-size: 11px; opacity: 0; }
.up-vid { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1.5px solid #fff; border-radius: 50%; background: rgba(0,0,0,.55); font-size: 12px; }
.up-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; color: #d9cabc; font-size: 13px; }
.up-foot b { color: var(--fal); font-size: 16px; }
.up-btn { padding: 8px 14px; border-radius: 999px; background: var(--fal); color: #21160e; font-size: 12px; font-weight: 700; }
.up-toast { position: absolute; z-index: 7; top: 22px; right: 28px; display: flex; align-items: center; gap: 10px; max-width: 420px; padding: 7px 16px 7px 7px; border: 1px solid rgba(255,255,255,.16); border-radius: 999px; background: #241a16; box-shadow: 0 14px 30px rgba(0,0,0,.45); font-size: 13px; white-space: nowrap; opacity: 0; }
.up-av { display: grid; flex: none; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--fa); color: #21160e; font-weight: 800; }

.is-on .up-card { animation: f-in .6s cubic-bezier(.2,.8,.2,1) .1s both; }
.is-on .up-live i { animation: f-pulse 1s ease-in-out infinite; }
.is-on .up-tile { animation: f-drop .6s cubic-bezier(.2,.9,.3,1.25) calc(.45s + var(--i) * .28s) both; }
.is-on .up-bar { animation: f-hide .3s ease calc(1.45s + var(--i) * .28s) forwards; }
.is-on .up-bar i { animation: f-bar .7s ease-out calc(.75s + var(--i) * .28s) both; }
.is-on .up-ok { animation: f-pop .35s ease calc(1.45s + var(--i) * .28s) both; }
.is-on .up-toast { animation: f-slide .5s cubic-bezier(.2,.9,.3,1.2) 3.3s both; }

/* =====================================================================
   3 · MIDNIGHT (5.2s) — 11:59 → 12:00, link sent, "Seen", their reply
   ===================================================================== */
.sc-mid { background: radial-gradient(ellipse 60% 70% at 25% 45%, rgba(88,54,120,.35), transparent 70%), linear-gradient(180deg, #0b0a17, #140b10); }
.mid-stars { position: absolute; inset: 0; opacity: .8; background-image:
  radial-gradient(1.5px 1.5px at 8% 18%, #fff, transparent), radial-gradient(1px 1px at 22% 70%, #fff, transparent),
  radial-gradient(1.5px 1.5px at 35% 12%, #fff, transparent), radial-gradient(1px 1px at 46% 84%, #fff, transparent),
  radial-gradient(1px 1px at 14% 88%, #fff, transparent), radial-gradient(1.5px 1.5px at 52% 30%, #fff, transparent),
  radial-gradient(1px 1px at 4% 45%, #fff, transparent), radial-gradient(1px 1px at 40% 55%, #fff, transparent); }
.mid-clock { position: absolute; top: 150px; left: 84px; width: 440px; }
.mid-kicker { color: var(--fa); font-size: 12px; font-weight: 800; letter-spacing: .24em; text-transform: uppercase; }
.mid-time { position: relative; height: 118px; margin-top: 10px; font-family: var(--f-serif); font-size: 108px; line-height: 1; letter-spacing: -.04em; perspective: 600px; }
.mid-time > span { position: absolute; top: 0; left: 0; white-space: nowrap; }
.mid-time small { margin-left: 12px; color: #bcad9f; font-family: var(--f-sans); font-size: 22px; font-weight: 700; letter-spacing: .06em; }
.mid-time .t2 { color: var(--fal); opacity: 0; }
.mid-burst { position: absolute; top: 40px; left: 150px; }
.mid-burst i { position: absolute; color: var(--fal); font-size: 16px; font-style: normal; opacity: 0; }
.mid-line { margin-top: 18px; color: #efe3d6; font-family: var(--f-serif); font-size: 26px; font-style: italic; opacity: 0; }

.is-on .mid-kicker { animation: f-in .5s ease .2s both; }
.is-on .mid-time .t1 { animation: f-in .5s ease .1s both, mid-out .35s ease-in 1s forwards; }
.is-on .mid-time .t2 { animation: mid-in .45s cubic-bezier(.2,.9,.3,1.2) 1.15s both; }
.is-on .mid-burst i { animation: mid-burst .9s ease-out 1.15s both; }
.is-on .mid-line { animation: f-in .5s ease 1.5s both; }
@keyframes mid-out { to { opacity: 0; transform: translateY(-40px) rotateX(60deg); } }
@keyframes mid-in { from { opacity: 0; transform: translateY(40px) rotateX(-60deg); } to { opacity: 1; transform: none; } }
@keyframes mid-burst { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(1.1); } }

.phone { position: absolute; top: 28px; left: 600px; width: 262px; height: 484px; padding: 10px; border: 2px solid rgba(255,255,255,.2); border-radius: 38px; background: #050404; box-shadow: 0 40px 80px rgba(0,0,0,.6); }
.ph-screen { position: relative; height: 100%; overflow: hidden; border-radius: 29px; background: linear-gradient(180deg, #1c1513, #0f0b0a); }
.ph-status { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px 6px; font-size: 12px; font-weight: 700; }
.ph-sig { display: flex; align-items: flex-end; gap: 2px; }
.ph-sig i { width: 3px; background: #fff; border-radius: 1px; }
.ph-sig i:nth-child(1) { height: 5px; } .ph-sig i:nth-child(2) { height: 7px; } .ph-sig i:nth-child(3) { height: 9px; }
.ph-sig b { width: 18px; height: 9px; margin-left: 5px; border: 1.5px solid #fff; border-radius: 3px; background: linear-gradient(90deg, #fff 70%, transparent 70%); }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 8px 14px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.ph-head img { flex: none; width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.ph-head > div { min-width: 0; }
.ph-head b { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ph-head small { color: #46d369; font-size: 11px; }
.ph-body { position: absolute; right: 0; bottom: 16px; left: 0; display: flex; flex-direction: column; gap: 8px; padding: 0 12px; }
.bub { max-width: 86%; padding: 9px 13px; border-radius: 18px; font-size: 13px; line-height: 1.35; }
.bub.out { align-self: flex-end; border-bottom-right-radius: 5px; background: var(--fa); color: #21160e; font-weight: 600; }
.bub.in { align-self: flex-start; border-bottom-left-radius: 5px; background: #302622; }
.ph-b1 { opacity: 0; transform-origin: right bottom; }
.ph-card { align-self: flex-end; width: 200px; overflow: hidden; border-radius: 16px 16px 5px 16px; background: #2b211d; opacity: 0; transform-origin: right bottom; }
.ph-card img { width: 100%; height: 96px; object-fit: cover; }
.ph-card > div { padding: 8px 11px 10px; }
.ph-card b { display: block; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.ph-card small { color: #bcad9f; font-size: 10.5px; }
.ph-rcpt { position: relative; align-self: flex-end; width: 90px; height: 14px; color: #9d8f84; font-size: 10.5px; }
.ph-rcpt span { position: absolute; top: 0; right: 0; opacity: 0; }
.ph-rcpt .r2 { color: var(--fal); }
.ph-reply { position: relative; align-self: flex-start; min-height: 37px; max-width: 86%; }
.ph-reply .bub { max-width: none; }
.ph-typing { position: absolute; bottom: 0; left: 0; display: flex; gap: 4px; padding: 14px 14px; opacity: 0; }
.ph-typing i { width: 6px; height: 6px; border-radius: 50%; background: #cbbcae; }
.ph-b3 { opacity: 0; transform-origin: left bottom; }

.is-on .phone { animation: f-in .6s cubic-bezier(.2,.8,.2,1) .1s both; }
.is-on .ph-b1 { animation: f-msg .4s cubic-bezier(.2,.9,.3,1.2) 1.6s both; }
.is-on .ph-card { animation: f-msg .4s cubic-bezier(.2,.9,.3,1.2) 2s both; }
.is-on .ph-rcpt .r1 { animation: f-fade .3s ease 2.4s both, f-hide .2s ease 3s forwards; }
.is-on .ph-rcpt .r2 { animation: f-fade .3s ease 3.05s both; }
.is-on .ph-typing { animation: f-fade .2s ease 3.25s both, f-hide .15s ease 4.05s forwards; }
.is-on .ph-typing i { animation: f-dot .9s ease-in-out infinite; }
.is-on .ph-typing i:nth-child(2) { animation-delay: .15s; }
.is-on .ph-typing i:nth-child(3) { animation-delay: .3s; }
.is-on .ph-b3 { animation: f-msg .4s cubic-bezier(.2,.9,.3,1.2) 4.1s both; }

/* =====================================================================
   4 · INTRO (4.6s) — logo builds and bursts, then "Who's watching?"
   ===================================================================== */
.sc-intro { background: #000; }
.in-logo { position: absolute; top: 50%; left: 50%; width: 120px; height: 170px; margin: -85px 0 0 -60px; opacity: 0; }
.in-logo svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 18px rgba(229,9,20,.55)); }
.in-stem { fill: var(--red); transform-box: fill-box; transform-origin: 50% 100%; }
.in-bowl { fill: none; stroke: var(--red); stroke-width: 30; stroke-dasharray: 1; stroke-dashoffset: 1; }
.in-rays { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.in-rays i { flex: none; width: 16px; height: 540px; margin: 0 -2px; background: var(--c); opacity: 0; }
.in-flash { position: absolute; inset: 0; opacity: 0; background: radial-gradient(circle at 50% 50%, rgba(255,226,226,.9), rgba(229,9,20,.35) 30%, transparent 65%); }
.in-prof { position: absolute; inset: 0; }
.in-prof h4 { position: absolute; top: 120px; right: 0; left: 0; font-size: 34px; font-weight: 500; text-align: center; opacity: 0; }
.in-grid { position: absolute; top: 200px; left: 209px; display: flex; gap: 34px; }
.in-p { width: 110px; text-align: center; opacity: 0; }
.in-img { width: 110px; height: 110px; overflow: hidden; border: 3px solid transparent; border-radius: 10px; }
.in-img img { width: 100%; height: 100%; object-fit: cover; }
.in-p span { display: block; margin-top: 10px; overflow: hidden; color: #a9a9a9; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.sc-intro .f-cap { opacity: 0; }

.is-on .in-logo { animation: in-logo 2.2s cubic-bezier(.6,0,.4,1) both; }
.is-on .in-stem { animation: in-grow .5s cubic-bezier(.3,0,.2,1) .2s both; }
.is-on .in-bowl { animation: in-draw .6s cubic-bezier(.4,0,.2,1) .65s both; }
.is-on .in-rays i { animation: in-ray .9s cubic-bezier(.2,.7,.2,1) calc(1.55s + var(--k) * .02s) both; }
.is-on .in-flash { animation: in-flash .7s ease 1.75s both; }
.is-on .in-prof { animation: in-out .5s ease 4.1s forwards; }
.is-on .in-prof h4 { animation: f-in .5s ease 2.25s both; }
.is-on .in-p { animation: f-in .5s ease calc(2.35s + var(--i) * .08s) both; }
.is-on .in-p:first-child .in-img { animation: in-pick .35s ease 3.65s both; }
.is-on .in-p:first-child span { animation: in-pick-t .35s ease 3.65s both; }
.sc-intro.is-on .f-cap { animation: f-down .5s cubic-bezier(.2,.8,.2,1) 2.3s both; }
.sc-intro .f-rip { left: 264px; top: 255px; }
.sc-intro.is-on .f-rip { animation: f-rip .6s ease-out 3.65s both; }
.sc-intro.is-on .f-cur { animation: cur-intro 4.6s linear both; }
@keyframes in-logo { 0% { opacity: 1; transform: scale(.9); } 60% { opacity: 1; transform: scale(1); } 74% { opacity: 1; transform: scale(1.05); } 100% { opacity: 0; transform: scale(9); } }
@keyframes in-grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes in-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes in-ray { 0% { opacity: 0; transform: translateX(0) scaleX(.2); } 25% { opacity: .95; } 100% { opacity: 0; transform: translateX(var(--x)) scaleX(1.8); } }
@keyframes in-flash { 0% { opacity: 0; } 35% { opacity: 1; } 100% { opacity: 0; } }
@keyframes in-pick { to { border-color: #fff; transform: scale(1.08); } }
@keyframes in-pick-t { to { color: #fff; } }
@keyframes in-out { to { opacity: 0; transform: scale(1.25); } }
@keyframes cur-intro {
  0%, 62% { opacity: 0; transform: translate(720px, 440px); }
  65% { opacity: 1; transform: translate(700px, 428px); animation-timing-function: cubic-bezier(.3,.6,.25,1); }
  78% { transform: translate(264px, 255px); }
  80% { transform: translate(264px, 255px) scale(.86); }
  83% { transform: translate(264px, 255px) scale(1); }
  88% { opacity: 1; transform: translate(264px, 255px); }
  94%, 100% { opacity: 0; transform: translate(280px, 270px); }
}

/* =====================================================================
   5 · HOME (5.2s) — their own streaming page, name hand-written, press Play
   ===================================================================== */
.sc-home { background: #000; }
.hm-bg { position: absolute; inset: 0; overflow: hidden; }
.hm-bg img { width: 100%; height: 100%; object-fit: cover; }
.hm-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.9) 0, rgba(0,0,0,.6) 36%, rgba(0,0,0,.08) 70%), linear-gradient(0deg, #000 0, rgba(0,0,0,.65) 22%, transparent 46%); }
.hm-nav { position: absolute; top: 0; right: 0; left: 0; display: flex; align-items: center; gap: 20px; height: 52px; padding: 0 32px; background: linear-gradient(180deg, rgba(0,0,0,.8), transparent); color: #ddd; font-size: 12px; }
.hm-nav .f-mark { margin-right: 8px; font-size: 26px; }
.hm-nav > span:nth-child(2) { color: #fff; font-weight: 700; }
.hm-av { width: 26px; height: 26px; margin-left: auto; overflow: hidden; border-radius: 4px; }
.hm-av img { width: 100%; height: 100%; object-fit: cover; }
.sc-home .f-cap { top: 64px; }
.hm-copy { position: absolute; top: 118px; left: 40px; width: 540px; }
.hm-series { display: flex; align-items: center; gap: 7px; height: 20px; color: #ddd; font-size: 11px; font-weight: 700; letter-spacing: .32em; }
.hm-series .f-mark { font-size: 20px; }
.hm-title { margin-top: 8px; font-family: var(--f-serif); font-size: 48px; line-height: 1; letter-spacing: -.02em; text-shadow: 0 4px 20px rgba(0,0,0,.5); text-transform: uppercase; }
.hm-name { height: 70px; margin-top: 2px; overflow: hidden; color: var(--fal); font-family: var(--f-hand); font-size: min(68px, calc(1150px / var(--nl))); font-weight: 700; line-height: 70px; text-shadow: 0 4px 18px rgba(0,0,0,.6); white-space: nowrap; }
.hm-facts { display: flex; align-items: center; gap: 10px; margin-top: 6px; color: #ddd; font-size: 12px; font-weight: 600; line-height: 16px; }
.hm-facts .m { color: #46d369; }
.hm-facts .b { padding: 0 5px; border: 1px solid rgba(255,255,255,.5); border-radius: 3px; font-size: 10px; }
.hm-desc { display: -webkit-box; max-width: 420px; height: 39px; margin-top: 10px; overflow: hidden; color: #e6e6e6; font-size: 13px; line-height: 19.5px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.hm-btns { display: flex; gap: 10px; margin-top: 14px; }
.hm-play, .hm-more { display: flex; align-items: center; height: 38px; padding: 0 20px; border-radius: 5px; font-size: 14px; font-weight: 700; }
.hm-play { background: #fff; color: #000; }
.hm-more { background: rgba(109,109,110,.7); }
.hm-row { position: absolute; top: 410px; right: 0; left: 40px; }
.hm-row > p { margin-bottom: 8px; font-size: 14px; font-weight: 700; line-height: 16px; }
.hm-thumbs { display: flex; gap: 8px; }
.hm-thumbs > div { position: relative; flex: none; width: 160px; height: 90px; overflow: hidden; border-radius: 5px; }
.hm-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.hm-thumbs em { position: absolute; right: 8px; bottom: 6px; left: 8px; height: 3px; background: rgba(255,255,255,.35); }
.hm-thumbs em i { display: block; width: 62%; height: 100%; background: var(--red); }
.hm-wipe { position: absolute; z-index: 30; inset: 0; background: #000; opacity: 0; }

.is-on .hm-bg img { animation: f-kb 6s ease-out both; }
.is-on .hm-nav { animation: f-fade .5s ease .05s both; }
.is-on .hm-series { animation: f-in .45s ease .3s both; }
.is-on .hm-title { animation: f-in .5s ease .5s both; }
.is-on .hm-facts { animation: f-in .45s ease 2s both; }
.is-on .hm-desc { animation: f-in .45s ease 2.15s both; }
.is-on .hm-btns { animation: f-in .45s ease 2.3s both; }
.is-on .hm-play { animation: f-press .3s ease 4.1s both; }
.is-on .hm-row > p { animation: f-in .4s ease 2.55s both; }
.is-on .hm-thumbs > div { animation: f-slide .5s cubic-bezier(.2,.8,.2,1) calc(2.65s + var(--i) * .07s) both; }
.is-on .hm-wipe { animation: f-fade .45s ease 4.65s both; }
.sc-home .f-rip { left: 84px; top: 346px; }
.sc-home.is-on .f-rip { animation: f-rip .6s ease-out 4.12s both; }
.sc-home.is-on .f-cur { animation: cur-home 5.2s linear both; }
@keyframes cur-home {
  0%, 60% { opacity: 0; transform: translate(660px, 300px); }
  63% { opacity: 1; transform: translate(640px, 300px); animation-timing-function: cubic-bezier(.3,.6,.25,1); }
  77% { transform: translate(84px, 346px); }
  79% { transform: translate(84px, 346px) scale(.86); }
  82% { transform: translate(84px, 346px) scale(1); }
  100% { opacity: 1; transform: translate(84px, 346px); }
}

/* =====================================================================
   6 · FINALE (7s) — the slideshow plays, then credits + call to action
   ===================================================================== */
.sc-finale { background: #000; }
.fi-slide { position: absolute; inset: 0; overflow: hidden; opacity: 0; }
.fi-slide img { width: 100%; height: 100%; object-fit: cover; }
.fi-ui { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.65), transparent 22%, transparent 74%, rgba(0,0,0,.8)); }
.fi-top { position: absolute; top: 18px; right: 28px; left: 28px; display: flex; align-items: center; gap: 16px; font-size: 13px; white-space: nowrap; }
.fi-back { font-size: 20px; }
.fi-title { overflow: hidden; color: #ccc; text-overflow: ellipsis; }
.fi-title b { color: #fff; }
.fi-bar { position: absolute; right: 96px; bottom: 32px; left: 28px; height: 4px; border-radius: 2px; background: rgba(255,255,255,.3); }
.fi-bar i { display: block; height: 100%; border-radius: 2px; background: var(--red); transform: scaleX(.08); transform-origin: left; }
.fi-time { position: absolute; right: 28px; bottom: 26px; color: #ddd; font-size: 12px; }
.fi-black { position: absolute; inset: 0; opacity: 0; background: radial-gradient(ellipse at 50% 38%, #2c1416, #000 70%); }
.fi-credits { position: absolute; top: 60px; right: 0; left: 0; display: flex; flex-direction: column; align-items: center; text-align: center; }
.fi-badge { display: flex; align-items: center; gap: 8px; height: 22px; color: #ddd; font-size: 11px; font-weight: 700; letter-spacing: .32em; opacity: 0; }
.fi-head { margin-top: 14px; font-family: var(--f-serif); font-size: 42px; line-height: 1.08; letter-spacing: -.03em; opacity: 0; }
.fi-head em { display: block; max-width: 900px; overflow: hidden; color: var(--fal); font-size: min(60px, calc(1500px / var(--nl))); font-style: italic; text-overflow: ellipsis; white-space: nowrap; }
.fi-lines { margin-top: 14px; color: #cdbfb2; font-size: 12.5px; letter-spacing: .1em; line-height: 1.9; text-transform: uppercase; }
.fi-lines p { opacity: 0; }
.fi-end { position: absolute; right: 0; bottom: 54px; left: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.fi-brand { font-family: var(--f-serif); font-size: 30px; letter-spacing: -.05em; line-height: 1; opacity: 0; }
.fi-line { color: #cdbfb2; font-size: 14px; opacity: 0; }
.fi-cta { margin-top: 4px; padding: 11px 22px; border-radius: 999px; background: var(--fal); color: #21160e; font-size: 14px; font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.45); opacity: 0; }

.is-on .fi-slide { animation: f-fade .5s ease var(--d) both; }
.is-on .fi-slide img { animation: f-kb 3.2s ease-out var(--d) both; }
.is-on .fi-ui { animation: f-fade .4s ease .2s both; }
.is-on .fi-bar i { animation: fi-prog 2.9s linear both; }
.is-on .fi-black { animation: f-fade .5s ease 2.8s both; }
.is-on .fi-badge { animation: f-in .5s ease 3.1s both; }
.is-on .fi-head { animation: f-in .6s ease 3.3s both; }
.is-on .fi-lines p { animation: f-in .5s ease calc(3.8s + var(--i) * .2s) both; }
.is-on .fi-brand { animation: f-in .5s ease 4.9s both; }
.is-on .fi-line { animation: f-in .5s ease 5.05s both; }
.is-on .fi-cta { animation: f-pop .5s ease 5.25s both; }
.sc-finale .f-cap { top: 52px; }
@keyframes fi-prog { from { transform: scaleX(.08); } to { transform: scaleX(.62); } }

/* =====================================================================
   PLAYER CONTROLS (outside the canvas, real buttons)
   ===================================================================== */
.film-ui { display: flex; align-items: center; gap: 12px; padding: 10px 4px 2px; color: #f5eee5; font: 600 12px/1 "DM Sans", "Segoe UI", system-ui, sans-serif; }
.fu-btn { display: grid; flex: none; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; background: rgba(255,255,255,.06); color: inherit; cursor: pointer; transition: background .2s, border-color .2s; }
.fu-btn:hover { border-color: var(--gold, #d9ab70); background: rgba(255,255,255,.14); }
.fu-btn svg { width: 14px; height: 14px; fill: currentColor; }
.fu-btn svg.i-line { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.fu-play .i-play { display: none; }
.film-ui.is-paused .fu-play .i-play { display: block; }
.film-ui.is-paused .fu-play .i-pause { display: none; }
.fu-segs { display: flex; flex: 1; gap: 4px; min-width: 0; }
.fu-seg { position: relative; min-width: 0; height: 22px; padding: 0; border: 0; background: none; cursor: pointer; }
.fu-seg::before, .fu-seg i { content: ""; position: absolute; top: 9px; right: 0; left: 0; height: 4px; border-radius: 2px; }
.fu-seg::before { background: rgba(255,255,255,.18); transition: background .2s; }
.fu-seg:hover::before { background: rgba(255,255,255,.34); }
.fu-seg i { background: var(--gold-light, #f1d4a9); transform: scaleX(0); transform-origin: left; }
.fu-time { flex: none; color: #bcad9f; font-variant-numeric: tabular-nums; }

.film-big { position: absolute; z-index: 3; top: 50%; left: 50%; display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 10px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: rgba(16,13,12,.85); color: #fff; font: 700 14px/1 "DM Sans", "Segoe UI", system-ui, sans-serif; white-space: nowrap; cursor: pointer; box-shadow: 0 20px 40px rgba(0,0,0,.5); transform: translate(-50%, -50%); transition: transform .2s; }
.film-big:hover { transform: translate(-50%, -50%) scale(1.04); }
.film-big[hidden] { display: none; }
.film-big b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--gold-light, #f1d4a9); color: #21160e; }
.film-big svg { width: 16px; height: 16px; margin-left: 2px; fill: currentColor; }

@media (max-width: 540px) {
  .film-ui { gap: 8px; }
  .fu-btn { width: 32px; height: 32px; }
  .fu-time { font-size: 11px; }
  .film-big { padding: 8px 16px 8px 8px; font-size: 13px; }
  .film-big b { width: 34px; height: 34px; }
}
