/* The short films (mytam.app/film/). Every picture is drawn here from shapes and type, sized from the width of the
   stage, so it is sharp on a phone and on a projector. Each element's resting style is how it looks at the end of
   its scene; the animation only brings it there, so with "reduce motion" the scenes are still pictures. */

.film-page h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.4rem); margin-top: clamp(20px, 4vw, 48px); }
.film { margin: clamp(18px, 3vw, 36px) 0 0; }
.stage { position: relative; aspect-ratio: 16 / 9; container-type: inline-size; overflow: hidden; border-radius: 18px; color: #fff;
  background: radial-gradient(120% 100% at 18% 0%, #2a48a6 0%, #172447 52%, #0b1123 100%); box-shadow: 0 34px 80px -36px rgba(11, 17, 35, 0.75); }
.stage.paused * { animation-play-state: paused !important; }
.scene { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.05cqw; line-height: 1.25; opacity: 0; visibility: hidden; transition: opacity 0.5s ease, visibility 0.5s; }
.scene.on { opacity: 1; visibility: visible; }
.scene:not(.on) * { animation: none !important; }
.film:not(.started) .scene.on > * { filter: blur(0.25em) brightness(0.6); }

@keyframes f-in { from { opacity: 0; transform: translateY(1.2em); } }
@keyframes f-left { from { opacity: 0; transform: translateX(-2.4em); } }
@keyframes f-pop { from { opacity: 0; transform: scale(0.3); } 70% { transform: scale(1.12); } }
@keyframes f-type { from { max-width: 0; } }
@keyframes f-grow { from { transform: scaleY(0); } }
@keyframes f-ring { from { stroke-dashoffset: 252; } 33% { stroke-dashoffset: 168; } 40% { stroke-dashoffset: 168; } 66% { stroke-dashoffset: 84; } 73% { stroke-dashoffset: 84; } }
@keyframes f-grey { from { background: #ffb547; transform: translate(0, 0); opacity: 1; } }
@keyframes f-fly { from { opacity: 1; transform: translate(var(--fx), var(--fy)) rotate(var(--fr)) scale(1); } 80% { opacity: 1; } }
@keyframes f-burst { from { opacity: 1; transform: translate(0, 0) scale(0.4); } 70% { opacity: 1; } }
@keyframes f-pulse { 50% { transform: scale(1.08); box-shadow: 0 0 0 0.6em rgba(255, 181, 71, 0.25); } }
@keyframes f-flip { from { transform: rotateX(-90deg); opacity: 0; } }
@keyframes f-swap { from { opacity: 1; } 45% { opacity: 1; } 55% { opacity: 0; } to { opacity: 0; } }

.scene.on .in { animation: f-in 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene.on .left { animation: f-left 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.scene.on .pop { animation: f-pop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both; }
.scene.on .type { animation: f-type 1.5s steps(34) both; }
.scene .d1 { animation-delay: 0.35s !important; } .scene .d2 { animation-delay: 0.7s !important; } .scene .d3 { animation-delay: 1.05s !important; }
.scene .d4 { animation-delay: 1.4s !important; } .scene .d5 { animation-delay: 1.9s !important; } .scene .d6 { animation-delay: 2.4s !important; }
.scene .d7 { animation-delay: 3s !important; } .scene .d8 { animation-delay: 3.6s !important; } .scene .d9 { animation-delay: 4.4s !important; }

.scene h2 { font: 700 3em/1.02 var(--display); letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.scene .amber { color: #ffb547; }
.scene .small { font-size: 0.95em; color: rgba(255, 255, 255, 0.78); }
.col { display: grid; gap: 1.1em; justify-items: center; text-align: center; padding: 0 6%; }
.split { display: grid; grid-template-columns: 1fr 1.15fr; gap: 4%; align-items: center; width: 88%; }
.split h2 { font-size: 2.5em; }
.type { display: inline-block; max-width: 100%; overflow: hidden; white-space: nowrap; vertical-align: bottom; }

/* People as dots around "you". */
.dots { position: absolute; inset: 0; }
.dot { position: absolute; width: 1.5em; height: 1.5em; border-radius: 50%; background: #ffb547; box-shadow: 0 0 0 0.35em rgba(255, 181, 71, 0.16); }
.dot:nth-child(1) { left: 9%; top: 18%; } .dot:nth-child(2) { left: 21%; top: 62%; } .dot:nth-child(3) { left: 14%; top: 82%; } .dot:nth-child(4) { left: 31%; top: 14%; }
.dot:nth-child(5) { left: 43%; top: 78%; } .dot:nth-child(6) { left: 58%; top: 12%; } .dot:nth-child(7) { left: 69%; top: 80%; } .dot:nth-child(8) { left: 79%; top: 22%; }
.dot:nth-child(9) { left: 88%; top: 58%; } .dot:nth-child(10) { left: 92%; top: 14%; } .dot:nth-child(11) { left: 5%; top: 46%; } .dot:nth-child(12) { left: 82%; top: 86%; }
.dot:nth-child(3n) { width: 1em; height: 1em; } .dot:nth-child(4n) { width: 2em; height: 2em; }
.scene.on .dot { animation: f-pop 0.6s cubic-bezier(0.3, 1.4, 0.5, 1) both; animation-delay: calc(var(--n, 0) * 0.12s); }
.dot:nth-child(2) { --n: 1; } .dot:nth-child(3) { --n: 2; } .dot:nth-child(4) { --n: 3; } .dot:nth-child(5) { --n: 4; } .dot:nth-child(6) { --n: 5; } .dot:nth-child(7) { --n: 6; }
.dot:nth-child(8) { --n: 7; } .dot:nth-child(9) { --n: 8; } .dot:nth-child(10) { --n: 9; } .dot:nth-child(11) { --n: 10; } .dot:nth-child(12) { --n: 11; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7em; }
.chip { padding: 0.45em 1em; border-radius: 99em; background: rgba(255, 255, 255, 0.12); border: 1px solid rgba(255, 255, 255, 0.22); font-weight: 600; white-space: nowrap; }
.chip b { color: #ffb547; font-weight: 600; }
/* The same people, drifting away and going grey. */
.s-fade .dot { background: #56607a; box-shadow: none; opacity: 0.55; transform: translate(var(--dx, 1.5em), var(--dy, 1em)); }
.s-fade .dot:nth-child(odd) { --dx: -1.8em; --dy: 1.4em; } .s-fade .dot:nth-child(3n) { --dx: 2.2em; --dy: -1.2em; }
.scene.on.s-fade .dot { animation: f-grey 4s ease-out both; }
.leaf { display: inline-grid; place-items: center; width: 5.2em; height: 5.6em; border-radius: 0.6em; background: #fff; color: #172447; font: 700 2.4em/1 var(--display); box-shadow: 0 0.4em 1.4em rgba(0, 0, 0, 0.35); position: relative; overflow: hidden; }
.leaf::before { content: ''; position: absolute; inset: 0 0 auto; height: 1.1em; background: #e5484d; }
.leaf small { position: absolute; top: 0.28em; font: 600 0.32em/1 var(--font); color: #fff; letter-spacing: 0.08em; }
.leaf span { grid-area: 1 / 1; padding-top: 0.5em; }
.scene.on .leaf span:nth-of-type(1) { animation: f-swap 1.6s both; } .leaf span:nth-of-type(1) { opacity: 0; }
.scene.on .leaf span:nth-of-type(2) { animation: f-flip 0.5s 1.5s both; }

/* The mark and the files that go into it. */
.logo { width: 7em; height: 7em; border-radius: 1.75em; background: #2f5bd3; display: grid; place-items: center; box-shadow: 0 1em 3em rgba(0, 0, 0, 0.4), inset 0 0 0 0.12em rgba(255, 255, 255, 0.18); position: relative; }
.logo svg { width: 100%; height: 100%; }
.file { position: absolute; left: 50%; top: 50%; margin: -1.6em 0 0 -4.4em; width: 8.8em; padding: 0.7em 0.8em; border-radius: 0.6em; background: #fff; color: #172447; font-weight: 600; font-size: 0.9em; text-align: center; opacity: 0; transform: scale(0.1); box-shadow: 0 0.6em 1.6em rgba(0, 0, 0, 0.35); }
.file:nth-of-type(1) { --fx: -18em; --fy: -7em; --fr: -12deg; } .file:nth-of-type(2) { --fx: 17em; --fy: -5em; --fr: 9deg; } .file:nth-of-type(3) { --fx: -14em; --fy: 9em; --fr: 7deg; }
.scene.on .file { animation: f-fly 1.3s cubic-bezier(0.5, 0, 0.2, 1) both; }
.scene.on .logo.beat { animation: f-pulse 0.7s 2.6s 2 both; }
.never { display: flex; gap: 0.7em; flex-wrap: wrap; justify-content: center; }
.never span { padding: 0.4em 0.9em; border-radius: 0.5em; background: rgba(42, 179, 111, 0.18); border: 1px solid rgba(96, 220, 150, 0.5); font-weight: 600; }

/* A piece of the app: the Today list, a draft, the referral search. */
.card { background: #fff; color: #172447; border-radius: 0.9em; box-shadow: 0 1.4em 3.4em rgba(0, 0, 0, 0.45); overflow: hidden; text-align: left; width: 100%; }
.card header { display: flex; justify-content: space-between; align-items: center; padding: 0.7em 1em; border-bottom: 1px solid #e3e8f0; font-weight: 700; }
.card header span { font: 600 0.75em/1 var(--font); color: #5c6b84; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8em; align-items: center; padding: 0.7em 1em; border-bottom: 1px solid #eef1f6; }
.row:last-child { border: 0; }
.row i { width: 2.2em; height: 2.2em; border-radius: 50%; background: #dfe7fb; color: #2f5bd3; display: grid; place-items: center; font: 700 0.85em/1 var(--font); font-style: normal; }
.row b { display: block; } .row small { display: block; color: #5c6b84; font-size: 0.78em; } .row small.hot { color: #c2410c; font-weight: 600; }
.row em { font: 600 0.7em/1 var(--font); font-style: normal; padding: 0.4em 0.7em; border-radius: 99em; background: #e7f6ee; color: #1f7a4d; white-space: nowrap; }
.row em.lvl { background: #dfe7fb; color: #2f5bd3; }
.note { padding: 0.9em 1em; font-size: 0.92em; line-height: 1.45; }
.note .type { display: block; }
.card footer { display: flex; gap: 0.6em; padding: 0 1em 1em; }
.key { padding: 0.55em 1em; border-radius: 0.5em; background: #2f5bd3; color: #fff; font-weight: 600; font-size: 0.85em; }
.key.ghost { background: #eef1f6; color: #172447; }
.scene.on .key.press { animation: f-pulse 0.6s 4.6s 1 both; }
.find { display: flex; align-items: center; gap: 0.6em; padding: 0.7em 1em; border-bottom: 1px solid #e3e8f0; font-weight: 600; }
.find::before { content: ''; width: 0.9em; height: 0.9em; border: 0.16em solid #5c6b84; border-radius: 50%; flex: none; }
.find .type { border-right: 0.12em solid #2f5bd3; padding-right: 0.1em; }
.scene.on .find .type { animation: f-type 1.1s steps(9) 0.4s both; }

/* Job postings, three levels, the goal ring. */
.sheets { position: relative; width: 15em; height: 10em; }
.sheet { position: absolute; inset: 0; border-radius: 0.6em; background: #c9d2e6; box-shadow: 0 0.3em 0.8em rgba(0, 0, 0, 0.3); transform: rotate(var(--r, 0deg)) translate(var(--x, 0), var(--y, 0)); }
.sheet:nth-child(1) { --r: -9deg; --x: -1.6em; } .sheet:nth-child(2) { --r: 6deg; --x: 1.4em; --y: 0.3em; } .sheet:nth-child(3) { --r: -3deg; --y: -0.5em; } .sheet:nth-child(4) { --r: 11deg; --x: 2.4em; --y: -0.8em; }
.sheet.top { background: #fff; color: #172447; padding: 1em; --r: 0deg; --y: -1.4em; display: grid; align-content: center; gap: 0.3em; font-weight: 700; outline: 0.2em solid #ffb547; }
.sheet.top small { font-weight: 600; color: #b45309; }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2em; width: 84%; }
.lv { border-radius: 0.9em; padding: 1.1em; background: rgba(255, 255, 255, 0.1); border: 1px solid rgba(255, 255, 255, 0.2); text-align: center; }
.lv b { display: block; font: 700 1.5em/1.1 var(--display); color: #ffb547; } .lv span { display: block; margin-top: 0.5em; font-weight: 600; } .lv small { display: block; margin-top: 0.3em; color: rgba(255, 255, 255, 0.75); font-size: 0.82em; }
.ring { width: 9em; height: 9em; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 9; } .ring .track { stroke: rgba(255, 255, 255, 0.16); } .ring .fill { stroke: #ffb547; stroke-linecap: round; stroke-dasharray: 252; stroke-dashoffset: 0; }
.scene.on .ring .fill { animation: f-ring 2.6s ease-in-out both; }
.ringbox { position: relative; display: grid; place-items: center; }
.ringbox b { position: absolute; font: 700 2.2em/1 var(--display); }
.conf { position: absolute; left: 50%; top: 50%; }
.conf i { position: absolute; width: 0.55em; height: 0.9em; border-radius: 0.12em; background: #ffb547; opacity: 0; transform: translate(var(--cx), var(--cy)) rotate(var(--cr)) scale(1); }
.conf i:nth-child(3n) { background: #fff; } .conf i:nth-child(3n + 1) { background: #6fa0ff; border-radius: 50%; height: 0.6em; }
.conf i:nth-child(1) { --cx: -9em; --cy: -6em; --cr: 40deg; } .conf i:nth-child(2) { --cx: -6em; --cy: -8em; --cr: 120deg; } .conf i:nth-child(3) { --cx: -2em; --cy: -9em; --cr: 200deg; } .conf i:nth-child(4) { --cx: 3em; --cy: -8.5em; --cr: 80deg; }
.conf i:nth-child(5) { --cx: 7em; --cy: -7em; --cr: 300deg; } .conf i:nth-child(6) { --cx: 10em; --cy: -4em; --cr: 20deg; } .conf i:nth-child(7) { --cx: -10em; --cy: -2em; --cr: 160deg; } .conf i:nth-child(8) { --cx: 9em; --cy: 1em; --cr: 250deg; }
.conf i:nth-child(9) { --cx: -7em; --cy: 3em; --cr: 70deg; } .conf i:nth-child(10) { --cx: 5em; --cy: 4em; --cr: 330deg; } .conf i:nth-child(11) { --cx: -3em; --cy: 5em; --cr: 110deg; } .conf i:nth-child(12) { --cx: 1em; --cy: -11em; --cr: 15deg; }
.scene.on .conf i { animation: f-burst 1.4s cubic-bezier(0.1, 0.8, 0.3, 1) 2.7s both; }
.bars { display: flex; align-items: flex-end; gap: 0.6em; height: 7em; }
.bars i { width: 1.6em; border-radius: 0.3em 0.3em 0 0; background: #6fa0ff; transform-origin: bottom; height: var(--h); }
.bars i:last-child { background: #ffb547; }
.bars i:nth-child(1) { --h: 22%; } .bars i:nth-child(2) { --h: 38%; } .bars i:nth-child(3) { --h: 50%; } .bars i:nth-child(4) { --h: 72%; } .bars i:nth-child(5) { --h: 100%; }
.scene.on .bars i { animation: f-grow 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(3.4s + var(--b, 0) * 0.16s); }
.bars i:nth-child(2) { --b: 1; } .bars i:nth-child(3) { --b: 2; } .bars i:nth-child(4) { --b: 3; } .bars i:nth-child(5) { --b: 4; }
.pair { display: flex; align-items: center; gap: 4em; }
.pair figure { margin: 0; display: grid; justify-items: center; gap: 0.7em; font-weight: 600; }
.s-end h2 { font-size: 4.2em; }
.s-end .go { display: inline-flex; align-items: center; min-height: 2.6em; padding: 0 1.3em; border-radius: 0.55em; background: #ffb547; color: #172447; font-weight: 700; text-decoration: none; pointer-events: auto; }

/* The start button, the words, the controls. */
.start { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; border: 0; background: rgba(11, 17, 35, 0.35); color: #fff; font: 600 clamp(0.95rem, 2.2cqw, 1.3rem)/1.2 var(--font); cursor: pointer; }
.start svg { width: clamp(64px, 11cqw, 112px); height: auto; filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5)); transition: transform 200ms; }
.start:hover svg { transform: scale(1.07); }
.film.started .start { display: none; }
/* When the film is over, the last picture rests in its finished state. */
.stage.ended .scene.on * { animation: none !important; }
.cap { min-height: 3.4em; margin: 14px 0 0; padding: 12px 16px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); font-size: 1.05rem; line-height: 1.45; }
.film:not(.started) .cap { color: var(--muted); }
.ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.ctl button { min-height: 44px; padding: 0 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--paper); color: var(--ink); font: 600 0.95rem/1 var(--font); cursor: pointer; }
.ctl button:hover { border-color: var(--accent); color: var(--accent); }
.ctl button[data-play] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); min-width: 124px; }
.ticks { flex: 1 1 160px; display: flex; gap: 5px; list-style: none; margin: 0; padding: 0; }
.ticks li { flex: 1; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; position: relative; }
.ticks li.done { background: var(--accent); }
.ticks li.now::after { content: ''; position: absolute; inset: 0; background: var(--accent); transform-origin: left; animation: f-bar var(--ms, 5000ms) linear both; }
@keyframes f-bar { from { transform: scaleX(0); } }
.film:has(.stage.paused) .ticks li.now::after { animation-play-state: paused; }
.words { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.words summary { cursor: pointer; font-weight: 600; min-height: 44px; display: flex; align-items: center; }
.words ol { color: var(--muted); padding-left: 1.3em; }
.films { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); list-style: none; padding: 0; margin: 28px 0; }
.films a { display: block; padding: 18px 20px; border-radius: var(--r); background: var(--paper); border: 1px solid var(--line); text-decoration: none; }
.films a:hover { border-color: var(--accent); }
.films b { display: block; font: 700 1.2rem/1.2 var(--display); } .films span { color: var(--muted); font-size: 0.95rem; }

/* Pages for a group of people (founders, career offices, a school). */
.who h1 { font-size: clamp(2.1rem, 1.3rem + 3.4vw, 4rem); margin-top: clamp(24px, 5vw, 64px); max-width: 18ch; }
.who .lead { max-width: 60ch; }
.who .acts { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 8px; }
.btn.line { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn.line:hover { color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.offer { margin: 22px 0; padding: 16px 18px; border-radius: var(--r); background: var(--soft); color: var(--soft-ink); font-weight: 600; max-width: 70ch; }
.fine { color: var(--muted); font-size: 0.9rem; }
.groups { display: flex; flex-wrap: wrap; gap: 8px 18px; }

@media (prefers-reduced-motion: reduce) {
  .scene *, .ticks li.now::after { animation: none !important; }
  .scene { transition: none; }
  .scene.on .file { opacity: 0; }
}
