/* The home page's own pieces. They use the app's look from pieces.css (.app) but are explanations, not copies of
   one app view. Every piece's resting style is its finished state. Motion runs only under .home-motion, which
   home.js adds when scripts run and the visitor has not asked for reduced motion; with scripts blocked or reduced
   motion on, the finished state shows and nothing moves. A piece only animates while .is-in (pieces.js). */

/* team colours not in pieces.css: Clemson's #f56600 is the feed's colour (Clemson is not in the app's palette) */
.app-team.clem{--team:#f56600}
.app-pts.clem{--team:#f56600}

/* ---------- glyphs: the field map and the court float on the page, no card ---------- */
.glyph{margin:0}
.glyph .app{background:none;box-shadow:none;padding:0;border-radius:0}
.glyph svg{display:block;width:100%;height:auto;overflow:visible;filter:drop-shadow(0 22px 26px rgba(17,19,25,.22))}
.fm-names-sm{font-size:11px}

/* ---------- court (CourtGraphicView): half a court from above, basket at the top ----------
   viewBox 0 0 340 256: the court runs x 20 to 320 (50 ft at 6 px a foot), baseline at y 38, rim centre at
   (170, 69.5). The shot spot is set with --sx and --sy (px). Same loop as the field map: run, hold, fade, 6 s. */
.hp-court{--team:var(--gt);--off:var(--gt);display:block}
.hp-court svg *{transform-box:view-box;transform-origin:0 0}
.ct-floor{fill:#e9d3ad}
.ct-lane{fill:var(--team);fill-opacity:.28}
.ct-lines{fill:none;stroke:#fff;stroke-width:1.4;stroke-opacity:.95}
.ct-dash{stroke-dasharray:4 4}
.ct-board{stroke-width:2.2}
.ct-rim{fill:none;stroke:#f26a21;stroke-width:1.6}
.ct-edge{fill:none;stroke:var(--a-tert);stroke-opacity:.35;stroke-width:.6}
.ct-spot{fill:var(--team);stroke:#fff;stroke-width:1.2}
.ct-trail{fill:none;stroke:var(--team);stroke-width:1.4;stroke-dasharray:2 4;stroke-linecap:round}
.ct-ball{fill:#f26a21;stroke:#000;stroke-opacity:.35;stroke-width:.6}
.ct-bx{transform:translate(170px,69.5px)}
.ct-bs{opacity:0}
.home-motion .hp-court .ct-play{animation:fm-fade 6s linear infinite}
.home-motion .hp-court .ct-spot{animation:ct-spot 6s linear infinite}
.home-motion .hp-court .ct-trail{animation:ct-trail 6s linear infinite}
.home-motion .hp-court .ct-bx{animation:ct-bx 6s linear infinite}
.home-motion .hp-court .ct-bs{animation:ct-bs 6s linear infinite}
.home-motion .hp-court .pieces-js .hp-court:not(.is-in) *{animation-play-state:paused}
@keyframes ct-spot{0%,6%{opacity:0;transform:none}10%,100%{opacity:1}}
@keyframes ct-trail{0%,36%{opacity:0}42%,100%{opacity:1}}
/* the ball leaves the spot, rises (grows) and drops through the rim (shrinks), then is gone */
@keyframes ct-bx{0%,10.83%{transform:translate(var(--sx),var(--sy));animation-timing-function:cubic-bezier(.45,0,.55,1)}34%,100%{transform:translate(170px,69.5px)}}
@keyframes ct-bs{0%,9%{opacity:0;transform:scale(1)}10.83%{opacity:1;transform:scale(1);animation-timing-function:cubic-bezier(.3,.6,.6,1)}22%{transform:scale(1.7);animation-timing-function:cubic-bezier(.4,0,.7,.4)}34%{opacity:1;transform:scale(.8)}38%,100%{opacity:0;transform:scale(.6)}}

/* ---------- camera names to the app's list ----------
   The app's own Plays tab rows (pieces.css .app-plays), unchanged. The only motion: each row's clip label shows the
   camera file name, then changes to the clip number as the play and score appear under it. One 10 s loop, rows a
   beat apart. Resting state: the app's list. */
.hp-names{width:100%;display:flex;flex-direction:column;justify-content:center}
.hp-names .app-row{flex:none}
/* the box keeps the finished list's height (an invisible copy) so the page never moves while the rows grow */
.hp-names-box{display:grid;align-items:stretch}
.hp-names-box>*{grid-area:1/1;width:100%;max-width:none}
.hp-ghost{visibility:hidden}
/* Starts as a plain list of camera files, the way they come off the card, then each row turns into the app's clip
   row: team pill, clock, clip number, play and score. Rests on the app's list. */
.hp-raw{display:flex;gap:6px;align-items:center;margin:0;font-size:12px;height:0;opacity:0;overflow:hidden}
.hp-raw .i{color:var(--a-soft)}
.hp-cool{overflow:hidden}
/* home.js measures each row's two heights (--h0 file name, --h1 app row) and adds .hp-sized; only then it moves */
.home-motion .hp-names.hp-sized.is-in{animation:hp-panel 5s ease-in-out infinite both}
.home-motion .hp-names.hp-sized.is-in .app-row{animation:hp-row 5s ease-in-out infinite both;animation-delay:calc(var(--k)*.12s)}
.home-motion .hp-names.hp-sized.is-in .hp-raw{animation:hp-raw 5s cubic-bezier(.4,0,.2,1) infinite both;animation-delay:calc(var(--k)*.12s)}
.home-motion .hp-names.hp-sized.is-in .hp-cool{animation:hp-cool 5s cubic-bezier(.4,0,.2,1) infinite both;animation-delay:calc(var(--k)*.12s)}
/* a 5 s loop: about 0.8 s as camera files, 0.9 s to turn into the app's rows, 2.5 s as the app's list, then back */
@keyframes hp-panel{0%,16%{background:var(--a-card)}34%,84%{background:var(--a-window)}100%{background:var(--a-card)}}
@keyframes hp-row{0%,16%{background:transparent;box-shadow:inset 0 -.5px 0 var(--a-line)}
  34%,84%{background:var(--a-card);box-shadow:inset 0 0 0 .5px var(--a-line)}
  100%{background:transparent;box-shadow:inset 0 -.5px 0 var(--a-line)}}
@keyframes hp-raw{0%,16%{height:var(--h0);opacity:1}22%{opacity:0}34%{height:0}84%{height:0;opacity:0}
  94%{opacity:0}100%{height:var(--h0);opacity:1}}
@keyframes hp-cool{0%,16%{height:0;opacity:0}22%{opacity:0}32%{opacity:1}34%{height:var(--h1)}
  84%{height:var(--h1);opacity:1}92%{opacity:0}100%{height:0;opacity:0}}
.pieces-js .hp-names:not(.is-in) *{animation-play-state:paused}

/* ---------- a flag clip marks the clip before it ----------
   Two camera clips on the left, the name playr gives the first on the right. Resting state: the Select badge is
   on. With motion, the flag clip lights up, then the badge appears, on one 6 s loop. */
.hp-arrow{flex:none;width:18px;height:1px;background:var(--a-tert);position:relative}
.hp-arrow::after{content:"";position:absolute;right:0;top:-3px;width:6px;height:6px;border:solid var(--a-tert);border-width:1px 1px 0 0;transform:rotate(45deg)}
.hp-fd{display:flex;align-items:center;gap:16px;padding:14px;background:var(--a-window);border-radius:var(--r-media);box-shadow:var(--a-shadow)}
.fd-col{display:grid;gap:6px;min-width:0;flex:1 1 0}
.fd-head{font-size:11px;font-weight:600;color:var(--a-soft);max-width:none}
.fd-clip{display:flex;align-items:center;gap:6px;min-width:0;max-width:none;padding:8px 10px;border-radius:var(--r-row);background:var(--a-card);box-shadow:inset 0 0 0 .5px var(--a-line);font-size:12px}
.fd-clip .i{width:14px;height:14px;flex:none;color:var(--a-soft)}
.fd-clip .flag{color:var(--red)}
.fd-flagclip{width:max-content}
.fd-out{flex-wrap:wrap}
.fd-arrow{width:28px}
.home-motion .hp-fd.is-in .fd-flagclip{animation:fd-flag 6s var(--a-ease) infinite}
.home-motion .hp-fd.is-in .fd-sel{animation:fd-sel 6s var(--a-ease) infinite}
@keyframes fd-flag{0%,10%{box-shadow:inset 0 0 0 .5px var(--a-line)}20%,45%{box-shadow:inset 0 0 0 1.5px var(--red)}55%,100%{box-shadow:inset 0 0 0 .5px var(--a-line)}}
@keyframes fd-sel{0%,40%{opacity:0;transform:scale(.8)}50%,94%{opacity:1;transform:none}100%{opacity:0}}
.pieces-js .hp-fd:not(.is-in) *{animation-play-state:paused}

@media (max-width:480px){
  .hp-fd{padding:10px}
  .hp-fd{flex-direction:column;align-items:stretch}
  .fd-arrow{transform:rotate(90deg);align-self:center;margin:4px 0}
}

/* ---------- the four smaller features ---------- */
/* ratings: the app's Good, Great and Amazing buttons (ClipViewerView label bar), drawn large, lit in turn in the
   colours the app uses for those ratings. Rests on Amazing. */
.hp-rate{display:flex;gap:8px;width:100%}
.hp-rate .app-btn{flex:1 1 0;min-height:48px;border-radius:10px;font-size:17px;font-weight:500}
.hp-rate .r-amazing{background:var(--purple);color:#000;box-shadow:none}
@media (max-width:639px){.hp-rate .app-btn{min-height:38px;font-size:15px;border-radius:8px}}
.home-motion .hp-rate.is-in .r-good{animation:hp-r-good 6s var(--a-ease) infinite}
.home-motion .hp-rate.is-in .r-great{animation:hp-r-great 6s var(--a-ease) infinite}
.home-motion .hp-rate.is-in .r-amazing{animation:hp-r-amazing 6s var(--a-ease) infinite}
@keyframes hp-r-good{0%,4%{background:var(--a-ctl);color:var(--a-text);box-shadow:inset 0 0 0 .5px var(--a-ctl-line)}
  8%,30%{background:var(--gray);color:#000;box-shadow:inset 0 0 0 0 transparent}34%,100%{background:var(--a-ctl);color:var(--a-text);box-shadow:inset 0 0 0 .5px var(--a-ctl-line)}}
@keyframes hp-r-great{0%,30%{background:var(--a-ctl);color:var(--a-text);box-shadow:inset 0 0 0 .5px var(--a-ctl-line)}
  34%,62%{background:var(--blue);color:#000;box-shadow:inset 0 0 0 0 transparent}66%,100%{background:var(--a-ctl);color:var(--a-text);box-shadow:inset 0 0 0 .5px var(--a-ctl-line)}}
@keyframes hp-r-amazing{0%,62%{background:var(--a-ctl);color:var(--a-text);box-shadow:inset 0 0 0 .5px var(--a-ctl-line)}
  66%,96%{background:var(--purple);color:#000;box-shadow:inset 0 0 0 0 transparent}100%{background:var(--a-ctl);color:var(--a-text);box-shadow:inset 0 0 0 .5px var(--a-ctl-line)}}

/* one naming setup: three cameras' clips of one play, named the same way but for the camera */
.hp-crew{padding:10px 12px;width:100%;font-size:12px}
.hp-crew p{display:flex;gap:8px;align-items:center;margin:0;padding:5px 0;min-width:0}
.hp-crew p>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hp-crew p+p{border-top:.5px solid var(--a-line)}
.hp-crew .i{color:var(--a-soft)}
.hp-crew b{font-weight:600;color:var(--accent)}
.home-motion .hp-crew.is-in p{animation:hp-in 7s var(--a-ease) infinite;animation-delay:calc(var(--k)*.35s)}

/* Premiere Pro: the Selects bin with the game's Selects in it */
.hp-bin{padding:10px 12px;width:100%;font-size:12px}
.hp-bin p{display:flex;gap:8px;align-items:center;margin:0;padding:5px 0;min-width:0}
.hp-bin p+p{border-top:.5px solid var(--a-line)}
.hp-bin .bin-head{font-size:13px;padding-bottom:7px}
.hp-bin .bin-head .i{color:var(--blue)}
.hp-bin p .i{color:var(--a-soft)}
.hp-bin .num{flex:none;font-variant-numeric:tabular-nums}
.home-motion .hp-bin.is-in p[style]{animation:hp-in 7s var(--a-ease) infinite;animation-delay:calc(var(--k)*.35s)}
@keyframes hp-in{0%,6%{opacity:0;transform:translateY(-6px)}14%,92%{opacity:1;transform:none}100%{opacity:0}}
