/* TW #8409: TWU Local 106 office-TV presentation. Colours from the TSO seal. Everything is laid out on a fixed
   1920x1080 stage that tv.js scales to the screen (letterboxed in navy), so it looks the same on any TV. */
@font-face { font-family: "Oswald"; src: url("fonts/oswald.woff2") format("woff2"); font-weight: 200 700; }
@font-face { font-family: "Source Sans 3"; src: url("fonts/sourcesans3.woff2") format("woff2"); font-weight: 200 900; }

:root {
  --navy: #1d2250;
  --navy-deep: #10132f;
  --red: #c8243a;
  --white: #ffffff;
  --ease: cubic-bezier(.2, .7, .2, 1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { width: 100%; height: 100%; overflow: hidden; background: var(--navy-deep); }
body { color: var(--white); font-family: "Source Sans 3", "Helvetica Neue", Arial, sans-serif; }
body.idle, body.idle * { cursor: none !important; }

.stage {
  position: absolute; left: 0; top: 0; width: 1920px; height: 1080px; overflow: hidden;
  transform-origin: 0 0; background: var(--navy-deep);
}
video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  /* a filter nobody can see: it keeps Chrome from handing the film to a macOS overlay, so layers coming and
     going above it can never flash it to black (Steve 2026-11-24 15:17, the boxes on the bridge shot) */
  filter: brightness(1.001); }
.vignette { position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(5,7,25,.45) 100%); }

/* ---- scenes: a scene is .on while its shot is up; its timed parts get .in at data-at (tv.js) ---- */
.scene { position: absolute; inset: 0; pointer-events: none;
  /* a scene that is not up is hidden once its fade-out is over (1.2 s, longer than any transition), so its
     layers hold no memory: on a phone they were most of what is left (TW #8489) */
  visibility: hidden; transition: visibility 0s linear 1.2s; }
.scene.on { visibility: visible; transition-delay: 0s; }
.scrim { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease; }
.scene.on .scrim { opacity: 1; }
.scrim-left { background: linear-gradient(90deg, rgba(10,13,40,.82) 0%, rgba(10,13,40,.55) 38%, rgba(10,13,40,0) 66%); }
.scrim-bottom { background: linear-gradient(0deg, rgba(10,13,40,.85) 0%, rgba(10,13,40,.5) 34%, rgba(10,13,40,0) 62%); }
.scrim.strong.scrim-left { background: linear-gradient(90deg, rgba(10,13,40,.9) 0%, rgba(10,13,40,.7) 45%, rgba(10,13,40,.1) 75%); }
.scrim.strong.scrim-bottom { background: linear-gradient(0deg, rgba(10,13,40,.92) 0%, rgba(10,13,40,.6) 45%, rgba(10,13,40,0) 75%); }

.block { position: absolute; }
.left { left: 140px; }
.mid { top: 50%; transform: translateY(-50%); }
.bottom-left { left: 140px; bottom: 120px; }
.wide { right: 140px; }

[data-at], [data-until] { opacity: 0; transition: opacity .8s ease, transform 1.1s var(--ease), clip-path 1.1s var(--ease); }
/* every animated part keeps its own GPU layer for good, so no animation adds or drops a layer over the film */
[data-at], [data-until] { will-change: opacity; }
.rise, .slide, .pop { will-change: transform, opacity; }
.block[data-until]:not([data-at]) { transition: opacity .7s ease; }
.mid[data-at], .mid[data-until] { transform: translateY(-50%); }
[data-at].in, [data-until].in { opacity: 1; }
.rise { transform: translateY(36px); }
.rise.in { transform: none; }
.slide { transform: translateX(-60px); }
.slide.in { transform: none; }
.pop { transform: scale(.86); }
.pop.in { transform: none; }
.wipe { clip-path: inset(0 100% 0 0); opacity: 1; }
.wipe.in { clip-path: inset(0 0 0 0); }

.kicker { font-family: "Oswald", sans-serif; font-weight: 600; font-size: 34px; letter-spacing: .22em;
  text-transform: uppercase; color: var(--white); display: inline-flex; align-items: center; gap: 22px; margin-bottom: 22px; }
.kicker::before { content: ""; width: 64px; height: 6px; background: var(--red); display: block; }
h1, h2, h3, .year { font-family: "Oswald", sans-serif; text-transform: uppercase; line-height: 1.02;
  text-shadow: 0 4px 30px rgba(0,0,0,.45); }
h1 { font-size: 128px; font-weight: 700; letter-spacing: .01em; }
h2 { font-size: 104px; font-weight: 700; }
h3 { font-size: 88px; font-weight: 700; }
.red { color: #ff4a5f; }
.lede { font-size: 44px; line-height: 1.3; font-weight: 400; margin-top: 30px; max-width: 1150px;
  text-shadow: 0 2px 18px rgba(0,0,0,.6); }
.block p.lede:first-child { margin-top: 0; }

.list { list-style: none; margin-top: 44px; }
.list li { font-family: "Oswald", sans-serif; font-weight: 400; font-size: 50px; text-transform: uppercase;
  letter-spacing: .03em; padding: 10px 0 10px 34px; border-left: 8px solid var(--red); margin-bottom: 14px;
  background: linear-gradient(90deg, rgba(29,34,80,.75), rgba(29,34,80,0)); width: 1000px; }

.year { font-size: 300px; font-weight: 700; line-height: .9; color: var(--white); margin: 6px 0 18px;
  -webkit-text-stroke: 0; letter-spacing: .02em; }
.founder { position: absolute; right: 230px; top: 50%; margin-top: -285px; width: 400px; background: var(--white);
  padding: 18px 18px 26px; box-shadow: 0 30px 80px rgba(0,0,0,.55); transform-origin: 50% 60%; }
.founder.pop { transform: scale(.86) rotate(-2.5deg); }
.founder.pop.in { transform: rotate(-2.5deg); }
.founder img { display: block; width: 100%; height: 405px; object-fit: cover; object-position: 50% 0;  /* crops off the caption printed on the photo */ filter: grayscale(1) contrast(1.05); }
.founder figcaption { color: var(--navy); font-family: "Oswald", sans-serif; font-weight: 700; font-size: 38px;
  text-transform: uppercase; margin-top: 18px; line-height: 1.1; }
.founder figcaption span { font-family: "Source Sans 3", sans-serif; text-transform: none; font-weight: 600;
  font-size: 28px; color: var(--red); }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 46px; }
.tile { background: rgba(29,34,80,.82); border-top: 8px solid var(--red); padding: 30px 30px 34px;
  box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.tile b { display: block; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 50px; text-transform: uppercase; line-height: 1.05; }
.tile span { display: block; font-size: 30px; margin-top: 14px; opacity: .9; line-height: 1.25; }

.name { margin-top: 56px; border-left: 8px solid var(--red); padding: 6px 0 8px 30px; }
.name b { display: block; font-family: "Oswald", sans-serif; font-weight: 700; font-size: 70px; text-transform: uppercase; line-height: 1.05; }
.name span { display: block; font-size: 40px; margin-top: 4px; }
.url { font-family: "Oswald", sans-serif; font-size: 48px; letter-spacing: .08em; margin-top: 50px; color: #fff; }

/* ---- TW #8628: the timeline rail along the bottom; tv.js adds one tick per year, lights the current one ---- */
.rail { position: absolute; left: 160px; right: 160px; bottom: 58px; height: 60px; opacity: 0;
  transition: opacity .9s ease; will-change: opacity; pointer-events: none; }
.rail.show { opacity: 1; }
.rail-line { position: absolute; left: 0; right: 0; top: 12px; height: 4px; background: rgba(255,255,255,.28); }
.rail-line i { display: block; height: 100%; width: 0; background: var(--red); transition: width 1.4s var(--ease); }
.tick { position: absolute; top: 0; width: 0; }
.tick b { position: absolute; left: -9px; top: 5px; width: 18px; height: 18px; border-radius: 50%;
  background: #8d90a8; box-shadow: 0 0 0 4px rgba(10,13,40,.6); transition: transform .8s var(--ease), background .6s ease; }
.tick span { position: absolute; top: 34px; left: -60px; width: 120px; text-align: center; font-family: "Oswald", sans-serif;
  font-size: 26px; letter-spacing: .06em; color: rgba(255,255,255,.55); transition: color .6s ease; }
.tick.past b { background: var(--red); }
.tick.on b { background: var(--red); transform: scale(1.7); }
.tick.on span { color: #fff; font-weight: 700; }

/* the year on a timeline scene, and the source line under it */
.when { font-family: "Oswald", sans-serif; font-weight: 700; font-size: 230px; line-height: 1; letter-spacing: .01em; text-transform: uppercase;
  color: #fff; text-shadow: 0 6px 40px rgba(0,0,0,.5); margin-bottom: 18px; }
.when small { display: block; font-size: 46px; line-height: 1.25; letter-spacing: .14em; color: #ff4a5f; margin-top: 4px; }
.seal { position: absolute; width: 520px; height: 520px; right: 230px; top: 50%; margin-top: -300px;
  filter: drop-shadow(0 24px 60px rgba(0,0,0,.55)); }
.seal.small { width: 300px; height: 300px; right: 340px; margin-top: -190px; }  /* the gold seal is 250 px as sent */
.oldlogo { position: absolute; right: 250px; top: 50%; margin-top: -300px; width: 520px; padding: 34px;
  background: #f4f1e8; box-shadow: 0 30px 80px rgba(0,0,0,.55); }
.oldlogo img { display: block; width: 100%; }
.oldlogo figcaption { color: var(--navy); font-family: "Source Sans 3", sans-serif; font-weight: 600; font-size: 26px;
  text-align: center; margin-top: 16px; }

/* ---- the seal: big and centred on the curtain at the loop point, docked in the corner in between ---- */
.curtain { position: absolute; inset: 0; opacity: 1; pointer-events: none;
  background: radial-gradient(ellipse at center, #2a3170 0%, var(--navy) 45%, var(--navy-deep) 100%); }
.logo { position: absolute; left: 50%; top: 50%; width: 560px; height: 560px; margin: -280px 0 0 -280px;
  filter: drop-shadow(0 20px 50px rgba(0,0,0,.5)); transition: transform 1.4s var(--ease), opacity .8s ease; }
.logo.docked { transform: translate(764px, -394px) scale(.27); }  /* a 151 px seal, 120 px from the right, 70 px from the top */
.logo.hidden { opacity: 0; transform: scale(.8); }

/* ---- loading, hint, hud ---- */
.loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at center, #2a3170 0%, var(--navy) 45%, var(--navy-deep) 100%);
  transition: opacity .8s ease; z-index: 5; }
.loader img { width: 560px; height: 560px; }
.loader img { position: absolute; left: 50%; top: 50%; margin: -280px 0 0 -280px; }  /* exactly where .logo sits */
.loader .bar { position: absolute; left: 50%; top: calc(50% + 330px); width: 560px; margin-left: -280px; height: 8px; background: rgba(255,255,255,.15); }
.loader .bar i { display: block; height: 100%; width: 0; background: var(--red); transition: width .3s linear; }
.loader .msg { position: absolute; left: 0; right: 0; top: calc(50% + 360px); text-align: center; font-size: 30px; opacity: .85; min-height: 40px; }
.loader.done { opacity: 0; pointer-events: none; }
.loader.done img, .loader.done .bar { visibility: hidden; }
.hint { position: absolute; right: 40px; bottom: 34px; font-size: 26px; padding: 12px 20px; background: rgba(10,13,40,.75);
  border-radius: 6px; opacity: 0; transition: opacity .4s ease; z-index: 6; }
body:not(.idle) .hint.show { opacity: 1; }
.hud { position: absolute; left: 20px; top: 16px; font: 24px/1.2 ui-monospace, Menlo, monospace; z-index: 7;
  background: rgba(0,0,0,.6); padding: 6px 10px; display: none; }
.hud.show { display: block; }

/* TW #8628: photo credit on the archival scenes (year, photographer, archive) */
.credit { position: absolute; right: 160px; bottom: 140px; max-width: 900px; text-align: right; font-size: 22px; background: rgba(10,13,40,.55); padding: 4px 12px; border-radius: 4px;
  line-height: 1.3; color: rgba(255,255,255,.72); text-shadow: 0 1px 6px rgba(0,0,0,.8); opacity: 0;
  transition: opacity 1s ease; will-change: opacity; }
.scene.on .credit { opacity: 1; }
