/* The Lumi film: a live, scripted 27-second film the real Lumi acts in. */
.fm { display: flex; flex-direction: column; gap: 12px; }
.fm-stage {
  --fx: 50%; --fy: 50%; --fgl: 0;
  position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px; background: #070707; border: 1px solid var(--line);
  container-type: inline-size; isolation: isolate; cursor: default;
}
.fm-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(circle 46cqw at var(--fx) var(--fy), rgb(255 189 94 / calc(var(--fgl) * 0.22)), rgb(255 189 94 / calc(var(--fgl) * 0.06)) 45%, transparent 75%); }
.fm-night { position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 90% at 50% 100%, #0d0d14, #030305); }
.fm-night i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: 0.5; }
[data-in] { will-change: opacity, transform; }

/* Captions */
.fm-cap { position: absolute; z-index: 3; left: 6%; top: 13%; width: 42%; margin: 0; font-size: clamp(20px, 4.1cqw, 58px); line-height: 1.05; letter-spacing: -0.045em; font-weight: 600; color: var(--fg); }
.fm-cap span { display: block; color: #8f8f8f; }
.fm-cap--c { left: 10%; right: 10%; width: auto; top: auto; bottom: 12%; text-align: center; }

/* The phone */
.fm-phone { position: absolute; z-index: 2; right: 5%; top: 7%; bottom: 7%; width: 37%; display: flex; flex-direction: column; border-radius: 3cqw; background: #141414; border: 1px solid var(--line-2); overflow: hidden; box-shadow: 0 4cqw 10cqw -4cqw #000; }
.fm-ph-head { display: flex; align-items: center; gap: 1cqw; padding: 1.4cqw 1.8cqw; border-bottom: 1px solid var(--line); font-size: clamp(11px, 1.3cqw, 17px); }
.fm-ph-head b { font-weight: 600; }
.fm-ph-head span { color: var(--dim); }
.fm-dot { flex: none; display: block; width: 2.6cqw; height: 2.6cqw; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 40% 35%, #fffdf6, #f4d9aa); box-shadow: 0 0 1.4cqw rgb(255 189 94 / 0.6); }
.fm-ph-body { position: relative; flex: 1; padding: 1.6cqw; font-size: clamp(11px, 1.3cqw, 17px); line-height: 1.4; }
.fm-sc { position: absolute; inset: 1.6cqw; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.9cqw; }
.fm-t { align-self: center; color: var(--dim); font-size: 0.9em; }
.fm-m { max-width: 88%; padding: 0.9cqw 1.2cqw; border-radius: 1.3cqw; }
.fm-m p { margin: 0; }
.fm-m p + p { margin-top: 0.5cqw; }
.fm-me { align-self: flex-end; background: var(--fg); color: var(--bg); border-bottom-right-radius: 0.4cqw; }
.fm-lu { align-self: flex-start; background: #222; border: 1px solid var(--line); border-bottom-left-radius: 0.4cqw; }
.fm-lu small { display: block; color: var(--dim); font-size: 0.85em; margin-bottom: 0.3cqw; }
.fm-row { display: flex; justify-content: space-between; gap: 1cqw; padding-top: 0.5cqw; margin-top: 0.5cqw; border-top: 1px solid var(--line); }
.fm-row span:last-child { color: var(--mid); font-variant-numeric: tabular-nums; }
.fm-btns { display: flex; gap: 0.6cqw; margin-top: 0.8cqw; }
.fm-btns i { font-style: normal; padding: 0.5cqw 1.2cqw; border-radius: 0.6cqw; box-shadow: inset 0 0 0 1px var(--line-2); font-size: 0.92em; transition: transform 120ms; }
.fm-btns i.yes { background: var(--fg); color: var(--bg); box-shadow: none; }
.fm-btns i.press { transform: scale(0.92); }
.fm-stamp { color: var(--fg); font-weight: 600; }
.fm-stamp::before { content: "✓ "; color: var(--lumi-glow); }
.fm-wave { display: flex; align-items: center; gap: 0.25cqw; height: 2.4cqw; }
.fm-wave i { width: 0.3cqw; min-width: 2px; border-radius: 1px; background: currentColor; height: 30%; }
.fm-typing { display: flex; gap: 0.4cqw; padding: 1.1cqw 1.3cqw; }
.fm-typing i { width: 0.6cqw; height: 0.6cqw; border-radius: 50%; background: var(--mid); }

/* Lumi in the film */
.fm-lumi { position: absolute; z-index: 4; left: 0; top: 0; width: 18%; aspect-ratio: 1; transform: translate(-50%, -50%); }
.fm-lumi .lumi { width: 100%; height: 100%; overflow: visible; transform-origin: 50% 58%; transition: transform 520ms cubic-bezier(0.34, 1.56, 0.64, 1), opacity 160ms; }
.fm-lumi.is-gone .lumi { transform: scale(0); opacity: 0; transition: transform 260ms cubic-bezier(0.5, 0, 0.75, 0), opacity 200ms 90ms; }
.fm-lumi.is-gone { pointer-events: none; }
.fm-stage .poof { z-index: 5; }

/* The tap */
.fm-tap { position: absolute; z-index: 6; left: 0; top: 0; width: 3.2cqw; height: 3.2cqw; margin: -1.6cqw 0 0 -1.6cqw; border-radius: 50%; background: rgb(255 255 255 / 0.85); box-shadow: 0 0 0 0.6cqw rgb(255 255 255 / 0.2); pointer-events: none; opacity: 0; }

/* End card */
.fm-end { position: absolute; inset: 0; z-index: 7; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2cqw; text-align: center; background: radial-gradient(circle at 50% 45%, rgb(255 189 94 / 0.1), transparent 60%); }
.fm-end p { margin: 0; font-size: clamp(22px, 4.4cqw, 60px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.04; }
.fm-end p span { display: block; color: #8f8f8f; }
.fm-end .row { justify-content: center; }

/* Big play */
.fm-play { position: absolute; z-index: 8; inset: 0; margin: auto; width: 9cqw; height: 9cqw; min-width: 64px; min-height: 64px; border-radius: 50%; border: 0; background: var(--fg); color: var(--bg); cursor: pointer; display: grid; place-items: center; box-shadow: 0 0 0 1.2cqw rgb(255 255 255 / 0.08); transition: transform 200ms var(--ease); }
.fm-play:hover { transform: scale(1.05); }
.fm-play svg { width: 34%; height: 34%; margin-left: 8%; }
.fm-play[hidden] { display: none; }

/* Controls */
.fm-bar { display: flex; align-items: center; gap: 14px; }
.fm-bar button { min-width: 44px; min-height: 44px; border-radius: 8px; border: 0; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.fm-bar button:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
.fm-time { font-size: 14px; color: var(--mid); font-variant-numeric: tabular-nums; min-width: 92px; }
.fm-scrub { flex: 1; accent-color: var(--lumi-body); height: 28px; }

/* Portrait film on narrow screens */
@container (max-width: 620px) {
  .fm-cap { left: 7%; right: 7%; width: auto; top: 6%; font-size: clamp(18px, 6.6cqw, 34px); }
  .fm-cap--c { top: auto; bottom: 10%; }
  .fm-phone { left: 6%; right: 6%; width: auto; top: 31%; bottom: 4%; border-radius: 4cqw; }
  .fm-ph-head, .fm-ph-body { font-size: clamp(11px, 3.4cqw, 15px); }
  .fm-dot { width: 5.6cqw; height: 5.6cqw; }
  .fm-sc { inset: 3cqw; gap: 2cqw; }
  .fm-m { padding: 2cqw 2.6cqw; border-radius: 3cqw; }
  .fm-btns i { padding: 1.2cqw 2.4cqw; border-radius: 1.4cqw; }
  .fm-wave { height: 5cqw; gap: 0.6cqw; }
  .fm-tap { width: 7cqw; height: 7cqw; margin: -3.5cqw 0 0 -3.5cqw; }
  .fm-end p { font-size: clamp(22px, 8cqw, 40px); }
}
@media (max-width: 640px) { .fm-stage { aspect-ratio: 4 / 5; } }
@media (prefers-reduced-motion: reduce) { .fm-lumi .lumi, .fm-lumi.is-gone .lumi { transform: none; transition: opacity 200ms; } }

.fm-dot svg { display: block; width: 100%; height: 100%; }
