/* Rings in Ten — skip to your next decision: the dock's fast-forward button and the reel that plays
   while the skipped screens run underneath (fastforward.js). Loaded after app.css. */

/* ---------------------------------------------------------------- the button */
/* the dock's second action on screens that need no decision: the console's navy face, an orange
   fast-forward mark (orange = something you do) and two short lines */
.btn--ff { flex: none; width: 150px; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 0 11px 0 12px;
  text-align: left; font: 800 15px/1.02 var(--display); letter-spacing: .04em; white-space: nowrap; }
.btn--ff[hidden] { display: none; }
.btn--ff span { display: block; }
.ffmark { position: relative; display: block; width: 19px; height: 14px; }
.ffmark::before, .ffmark::after { content: ''; position: absolute; top: 0; width: 0; height: 0;
  border-top: 7px solid transparent; border-bottom: 7px solid transparent; border-left: 10px solid var(--accent); }
.ffmark::before { left: 0; }
.ffmark::after { left: 9px; }
/* beside it the screen's own button is narrower: its label may take two lines */
.dock__sub--ff .btn--next { min-width: 0; padding: 0 10px; font-size: 17px; line-height: 1.02; }

/* ---------------------------------------------------------------- the reel */
.ffw {
  --g1: #1B2550; --g2: #0C1229; --e1: var(--accent); --a: var(--gold); --a-ink: #1A1102;
  position: fixed; inset: 0; z-index: 23; overflow: hidden; display: flex; flex-direction: column; gap: 16px;
  padding: calc(env(safe-area-inset-top) + 18px) var(--gutter) calc(env(safe-area-inset-bottom) + 14px);
  background: linear-gradient(170deg, var(--g1), var(--g2) 70%, #05070F);
  color: var(--ink); cursor: pointer; opacity: 0; transition: opacity .28s ease;
  -webkit-user-select: none; user-select: none;
}
.ffw--in { opacity: 1; }
.ffw--held { opacity: 0 !important; pointer-events: none; }
.ffw > * { position: relative; max-width: 560px; width: 100%; margin: 0 auto; }
/* the tape running: faint scan lines and a streak of light passing again and again */
.ffw__lines { position: absolute !important; inset: 0; max-width: none !important; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255,255,255,.028) 0 1px, rgba(255,255,255,0) 1px 5px); }
.ffw__lines::before { content: ''; position: absolute; inset: 0;   /* speed lines: thin streaks racing right to left */
  --s: linear-gradient(90deg, rgba(255,255,255,0) 55%, rgba(255,255,255,.16) 85%, rgba(255,255,255,0));
  background-image: var(--s), var(--s), var(--s), var(--s), var(--s), var(--s);
  background-repeat: repeat-x;
  background-size: 300px 2px, 450px 1px, 600px 2px, 450px 1px, 300px 1px, 600px 2px;
  background-position: 0 14%, 120px 27%, 40px 46%, 300px 61%, 200px 78%, 500px 91%;
  animation: ffwStreak 1.2s linear infinite; }
@keyframes ffwStreak { to { background-position: -1800px 14%, -1680px 27%, -1760px 46%, -1500px 61%, -1600px 78%, -1300px 91%; } }
.ffw--fast .ffw__lines::before { animation-duration: .5s; }

.ffw__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-right: 50px; }   /* clear of the menu button */
.ffw__bug { display: inline-flex; align-items: center; gap: 10px; background: var(--a); color: var(--a-ink); padding: 6px 14px 5px 12px;
  font: italic 800 17px/1 var(--display); letter-spacing: .1em; transform: skewX(-14deg); box-shadow: 4px 4px 0 rgba(0,0,0,.35); }
.ffw__ff { position: relative; display: block; width: 20px; height: 14px; }
.ffw__ff::before, .ffw__ff::after { content: ''; position: absolute; top: 0; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
  border-left: 10px solid currentColor; animation: ffwBlink .7s steps(2, jump-none) infinite; }
.ffw__ff::before { left: 0; }
.ffw__ff::after { left: 9px; animation-delay: .35s; }
@keyframes ffwBlink { 0% { opacity: 1; } 100% { opacity: .35; } }
.ffw__when { font: 800 13px/1.1 var(--display); letter-spacing: .14em; color: var(--ink-2); text-align: right; }

/* where the reel is: the season's stops, a dot each */
.ffw__rail { list-style: none; margin: auto auto 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ffw__stop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ffw__stop::before { content: ''; position: absolute; top: 5px; left: 0; right: 0; height: 2px; background: rgba(255,255,255,.14); }
.ffw__stop:first-child::before { left: 50%; }
.ffw__stop:last-child::before { right: 50%; }
.ffw__stop.is-past::before, .ffw__stop.is-on::before { background: var(--e1); }
.ffw__stop.is-on::before { right: 50%; }
.ffw__stop.is-on:first-child::before { display: none; }
.ffw__stop i { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #0A0F1F; box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
  transition: transform .25s ease, background .25s ease; }
.ffw__stop.is-past i { background: var(--e1); box-shadow: none; }
.ffw__stop.is-on i { background: var(--a); box-shadow: 0 0 0 4px rgba(255,255,255,.12); transform: scale(1.25); }
.ffw__stop span { font: 800 10.5px/1 var(--display); letter-spacing: .12em; color: var(--ink-3); }
.ffw__stop.is-past span { color: var(--ink-2); }
.ffw__stop.is-on span { color: #fff; }

/* the scoreboard: what's ticking, as big as the live screen's record */
.ffw__hero { display: flex; flex-direction: column; gap: 8px; padding-top: 6px; }
.ffw__hk { font: 800 14px/1 var(--display); letter-spacing: .14em; color: var(--cyan); min-height: 14px; }
.ffw__big { font: italic 800 clamp(72px, 24vw, 104px)/.84 var(--display); letter-spacing: .01em; font-variant-numeric: tabular-nums; min-height: .84em; }
.ffw__big--word { font-size: clamp(46px, 14vw, 60px); line-height: .9; text-transform: uppercase; }
.ffw__swap { animation: ffwSwap .32s cubic-bezier(.16, 1, .3, 1); }
@keyframes ffwSwap { from { opacity: 0; transform: translateX(-18px); } to { opacity: 1; transform: none; } }
.ffw__hs { font: 600 14px/1.35 var(--body); color: var(--ink-2); min-height: 19px; }
.ffw__strip { display: grid; grid-template-columns: repeat(41, minmax(0, 1fr)); gap: 2px; }
.ffw__strip:empty { display: none; }
.ffw__g { height: 9px; background: rgba(255,255,255,.08); border-radius: 1px; }
.ffw__g--w { background: var(--good); }
.ffw__g--l { background: var(--coral); opacity: .8; }
.ffw__g--now { box-shadow: 0 0 0 1px #fff; }
.ffw__g--mark { box-shadow: -2px 0 0 var(--gold); }
.ffw__strip--series { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 280px; }
.ffw__strip--series .ffw__g { height: 14px; border-radius: 2px; }

/* the moments: the newest slides in on top, the older ones step back */
.ffw__reel { flex: none; min-height: 350px; display: flex; flex-direction: column; gap: 8px; }   /* room for three: nothing jumps as they come */
.ffw__card { --i: 0; position: relative; display: flex; flex-direction: column; gap: 5px; padding: 11px 14px 12px 20px; overflow: hidden;
  background: linear-gradient(180deg, #18214A, #0F1633); box-shadow: 0 10px 24px rgba(0,0,0,.35);
  opacity: 0; transform: translateX(46px); transition: transform .42s cubic-bezier(.16, 1, .3, 1), opacity .3s ease; }
.ffw__card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--edge, var(--ink-3)); }
.ffw__card--in { opacity: calc(1 - var(--i) * .3); transform: scale(calc(1 - var(--i) * .025)); transform-origin: left top; }
.ffw__card--gone { opacity: 0 !important; }
.ffw__ck { font: 800 12px/1 var(--display); letter-spacing: .16em; color: var(--kick, var(--ink-2)); }
.ffw__ct2 { font: italic 800 25px/.98 var(--display); letter-spacing: .02em; text-transform: uppercase; }
.ffw__cs { font: 600 13.5px/1.35 var(--body); color: var(--ink-2); }
.ffw__card--you, .ffw__card--gold { background: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 14px, rgba(255,255,255,0) 14px 30px), linear-gradient(180deg, var(--g1), var(--g2)); }
.ffw__card--you { --edge: var(--e1); --kick: var(--n2, #fff); }
.ffw__card--you .ffw__cs, .ffw__card--gold .ffw__cs { color: rgba(255,255,255,.82); }
.ffw__card--gold { --edge: var(--gold); --kick: var(--gold); }
.ffw__card--hurt { --edge: var(--coral); --kick: var(--coral); }
.ffw__card--league { --edge: var(--ink-3); }

.ffw__foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.ffw__hint { font: 800 12px/1 var(--display); letter-spacing: .2em; color: var(--ink-3); text-align: center; min-height: 12px; }
.ffw--fast .ffw__hint { visibility: hidden; }
.ffw__crawl { display: block; overflow: hidden; white-space: nowrap; height: 26px; line-height: 26px; margin: 0 calc(-1 * var(--gutter));
  background: rgba(0,0,0,.45); border-top: 2px solid rgba(255,255,255,.08); }
.ffw__ct { display: inline-block; padding-left: 100%; font: 700 13px/26px var(--display); letter-spacing: .05em; color: #fff; }
.ffw__ct--go { animation: ffwCrawl 7s linear forwards; }
@keyframes ffwCrawl { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* the end: your call, in your colours, then bands wipe the reel away */
.ffw--ending .ffw__hero, .ffw--ending .ffw__reel, .ffw--ending .ffw__rail { opacity: .18; transition: opacity .35s ease; }
.ffw__call { position: absolute !important; left: 0; right: 0; top: 38%; max-width: 560px; margin: 0 auto; padding: 18px 20px 20px 30px;
  display: flex; flex-direction: column; gap: 8px; overflow: hidden;
  background: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 14px, rgba(255,255,255,0) 14px 30px), linear-gradient(180deg, var(--g1), var(--g2));
  border-top: 3px solid var(--a); border-bottom: 9px solid var(--e1); box-shadow: 0 24px 50px rgba(0,0,0,.6);
  transform: translateX(-104%); transition: transform .5s cubic-bezier(.16, 1, .3, 1); }
.ffw__call::before { content: ''; position: absolute; left: -12px; top: 0; bottom: 0; width: 30px; background: var(--e1); transform: skewX(-14deg); }
.ffw__call--in { transform: none; }
.ffw__callk { align-self: flex-start; background: var(--a); color: var(--a-ink); font: 800 13px/1 var(--display); letter-spacing: .16em; padding: 5px 12px 4px; transform: skewX(-14deg); }
.ffw__callt { font: italic 800 clamp(44px, 13.5vw, 60px)/.88 var(--display); letter-spacing: .01em; text-transform: uppercase; color: #fff; }
.ffw__calls { font: 600 14.5px/1.35 var(--body); color: rgba(255,255,255,.86); }

.ffw__wipe { position: absolute !important; inset: 0; max-width: none !important; margin: 0 !important; pointer-events: none; z-index: 2; }
.ffw__wipe i { position: absolute; top: -10%; bottom: -10%; left: -30%; width: 160%; transform: translateX(-130%) skewX(-18deg); }
.ffw__wa { background: var(--e1); animation: ffwSting .76s cubic-bezier(.7, 0, .3, 1) forwards; }
.ffw__wb { background: linear-gradient(160deg, var(--g1), var(--g2)); animation: ffwSting .76s cubic-bezier(.7, 0, .3, 1) .05s forwards; }
.ffw__wc { width: 18% !important; left: 40% !important; background: var(--a); animation: ffwStingC .76s cubic-bezier(.7, 0, .3, 1) .02s forwards; }
@keyframes ffwSting { 0% { transform: translateX(-130%) skewX(-18deg); } 46%, 54% { transform: translateX(0) skewX(-18deg); } 100% { transform: translateX(130%) skewX(-18deg); } }
@keyframes ffwStingC { 0% { transform: translateX(-700%) skewX(-18deg); } 100% { transform: translateX(700%) skewX(-18deg); } }
/* once the bands cover the screen, the reel underneath is gone: they uncover the game */
.ffw--clear { background: none; }
.ffw--clear > :not(.ffw__wipe) { visibility: hidden; }

@media (max-height: 700px) {
  .ffw { gap: 11px; }
  .ffw__big { font-size: clamp(60px, 20vw, 80px); }
  .ffw__ct2 { font-size: 22px; }
  .ffw__reel { min-height: 270px; }
}
/* page motion: with Reduce Motion the reel steps instead of sliding, and the tape stands still */
@media (prefers-reduced-motion: reduce) {
  .ffw__lines::before, .ffw__ff::before, .ffw__ff::after { animation: none; }
  .ffw__card, .ffw__call { transition: opacity .2s ease; transform: none; }
  .ffw__ct--go { animation-duration: 14s; }
}
