/* Τένις Ύδρας, landing page reference: the court drawing: its colours by day and night, the layers (masks), the players' wiring, the floodlights' strike.
   From the design's stylesheet (court.css and the layer masks, as gen/assemble.py puts them), except what is around the
   court, ours and redrawn plainer: the mountain, the trees and the house (ct-mid, ct-win), the stone platform (ct-surface,
   ct-wall) and the marks always shown (ct-annot). */
.ct{--ct-ground:#F4F5F1;--ct-ink:#1C4B97;--ct-fig:#163773;--ct-surround:#D59D89;--ct-court:#8AB18F;--ct-lines:#FCFCF8;--ct-wall:#E7DDCC;--ct-ball:#D8EE36;--ct-shadow:#14336B;--ct-winc:rgba(255,210,125,0);--ct-lensc:#F4F5F1;--ct-label:#13306A;position:relative;color:var(--ct-ink)}
.ct[data-tone="night"]{--ct-ground:#0E1B35;--ct-ink:#C3D2EC;--ct-fig:#F1F5FB;--ct-surround:#4E3547;--ct-court:#26503F;--ct-lines:#DFE8F4;--ct-wall:#27324E;--ct-ball:#E6F85E;--ct-shadow:#01040C;--ct-winc:#FFD27D;--ct-lensc:#FFF4D6;--ct-label:#F1F5FB}
.ct{container-type:inline-size}
.ct-box{position:relative;width:100%;aspect-ratio:1200/863;overflow:hidden}
.ct-l,.ct-svg{position:absolute;inset:0;width:100%;height:100%}
.ct-l{-webkit-mask-size:100% 100%;mask-size:100% 100%;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;transition:background-color 1.2s}
.ct-svg{overflow:visible}
.ct-fig{fill:var(--ct-fig);transition:fill 1.2s}
.ct-fig .ct-limb{stroke:var(--ct-ground);stroke-width:2.6;paint-order:stroke;transition:stroke 1.2s}
.ct-fig .ct-frame{fill:none;stroke:var(--ct-fig);stroke-width:2.2;stroke-linecap:round}
.ct-fig .ct-strings{fill:none;stroke:var(--ct-fig);stroke-width:.7;opacity:.5}
.ct-sh-day,.ct-sh-night{fill:var(--ct-shadow);transition:opacity 1.2s,fill 1.2s}
.ct-sh-day{opacity:.2}
.ct-sh-night{opacity:0}
.ct[data-tone="night"] .ct-sh-day{opacity:0}
.ct[data-tone="night"] .ct-sh-night{opacity:.11}
.ct-pos-near{animation:ct-near-move 6.4s linear infinite}
.ct-pos-far{animation:ct-far-move 6.4s linear infinite}
.ct-torso,.ct-ua-r,.ct-fa-r,.ct-wr-r,.ct-ua-l,.ct-fa-l{animation-duration:3.2s;animation-timing-function:cubic-bezier(.42,0,.48,1);animation-iteration-count:infinite}
.ct-torso{transform-origin:0px -100px;animation-name:ct-torso}
.ct-ua-r{transform-origin:19px -145px;animation-name:ct-ua-r}
.ct-fa-r{transform-origin:19px -117px;animation-name:ct-fa-r}
.ct-wr-r{transform-origin:19px -91px;animation-name:ct-wr-r}
.ct-ua-l{transform-origin:-19px -145px;animation-name:ct-ua-l}
.ct-fa-l{transform-origin:-19px -117px;animation-name:ct-fa-l}
.ct-far .ct-torso,.ct-far .ct-ua-r,.ct-far .ct-fa-r,.ct-far .ct-wr-r,.ct-far .ct-ua-l,.ct-far .ct-fa-l{animation-delay:-1.6s}
.ct-far .ct-ua-r{animation-name:ct-ua-r-f}
.ct-far .ct-fa-r{animation-name:ct-fa-r-f}
.ct-far .ct-wr-r{animation-name:ct-wr-r-f}
.ct-bob{animation:ct-bob .8s ease-in-out infinite}
.ct-leg-l{transform-origin:-8px -89px}
.ct-leg-r{transform-origin:8px -89px}
.ct-near .ct-leg-l{animation:ct-legs-near-l 6.4s linear infinite}
.ct-near .ct-leg-r{animation:ct-legs-near-r 6.4s linear infinite}
.ct-far .ct-leg-l{animation:ct-legs-far-l 6.4s linear infinite}
.ct-far .ct-leg-r{animation:ct-legs-far-r 6.4s linear infinite}
.ct-far .ct-bob{animation-delay:-.4s}
@keyframes ct-bob{0%,100%{transform:translateY(0)}50%{transform:translateY(-2.4px)}}
.ct-ball{animation:ct-ball 6.4s linear infinite}
.ct-ball circle{fill:var(--ct-ball);stroke:var(--ct-ink);stroke-width:.9;transition:fill 1.2s,stroke 1.2s}
.ct-bshadow{animation:ct-ball-shadow 6.4s linear infinite}
.ct-bshadow ellipse{fill:var(--ct-shadow)}
.ct-pools,.ct-stars{opacity:0;transition:opacity 1s}
.ct[data-tone="night"] .ct-pools{opacity:1}
.ct[data-tone="night"] .ct-stars{opacity:.85}
.ct-stars circle{fill:#FFFFFF}
.ct-svg-glow{mix-blend-mode:screen}
.ct-lamp{opacity:0;transition:opacity .5s}
.ct[data-tone="night"] .ct-lamp{opacity:1}
.ct-core{fill:#FFF9EA}
/* switching to night (data-strike="on"): the floodlights stay dark while the sky goes dark, then strike and flicker on the
   same 1.4 s timeline and offsets as the photo beside it (js/photo.js), so both blink together. Keep the two in step, and
   the door code's drawing too (dc-strike in css/door.css).
   The house light and windows come on after the floodlights settle. Opening already at night: lights on, no flicker. */
.ct[data-tone="night"][data-strike="on"] .ct-lamp,.ct[data-tone="night"][data-strike="on"] .ct-pools{transition:none;animation:ct-strike 1.4s linear both}
.ct[data-tone="night"][data-strike="on"] .ct-pools{animation-name:ct-pool}
.ct[data-tone="night"][data-strike="on"] .ct-lamp-4{animation-name:ct-house}
.ct[data-tone="night"][data-strike="on"] .ct-l-win{transition:background-color .5s 1s}
@keyframes ct-strike{0%,54%{opacity:0}56.5%{opacity:.8}59.5%{opacity:.1}63.5%{opacity:.9}66.5%{opacity:.2}71.5%,100%{opacity:1}}
@keyframes ct-pool{0%,54%{opacity:0}56.5%{opacity:.6}59.5%{opacity:.08}63.5%{opacity:.7}66.5%{opacity:.15}71.5%,100%{opacity:1}}
@keyframes ct-house{0%,72%{opacity:0}86%,100%{opacity:1}}
.ct-labels{position:absolute;inset:0;pointer-events:none}
.ct-dim,.ct-flood{position:absolute;white-space:nowrap;font-size:12px;line-height:1.25;font-weight:600;font-variant-numeric:tabular-nums;color:var(--ct-label);transition:color 1.2s,background-color 1.2s}
.ct-dim{transform:translate(-50%,-50%);padding:1px 5px;border-radius:3px;background:var(--ct-surround)}
/* the court's length and the service line's distance stand beside the court, on the surround, next to their dimension
   lines in the alleys, where they cover none of the court's lines: the length to the left of the court, up to its left
   sideline, and the service line's distance to the right, from its right sideline. Nothing is behind them there, so no
   pill either (at night it would hide the floodlights' light on the surround) */
.ct-dim-length{transform:translate(-100%,-50%);background:transparent}
.ct-dim-service{transform:translate(0,-50%);background:transparent}
.ct-dim-net{transform:translate(0,-50%);background:transparent;padding:0}
.ct-flood{transform:translate(0,-100%);font-weight:550}
/* the ink layers: each one an SVG used as a mask, coloured by a token (so day and night are the same files); back to
   front, as court_drawing.html stacks them, with the players, the ball and the lights as inline SVG between them */
.ct-l-mid{-webkit-mask-image:url(../assets/court/ct-mid.svg);mask-image:url(../assets/court/ct-mid.svg);background-color:var(--ct-ink)}
.ct-l-win{-webkit-mask-image:url(../assets/court/ct-win.svg);mask-image:url(../assets/court/ct-win.svg);background-color:var(--ct-winc)}
.ct-l-fence-far{-webkit-mask-image:url(../assets/court/ct-fence-far.svg);mask-image:url(../assets/court/ct-fence-far.svg);background-color:var(--ct-ink)}
.ct-l-lens{-webkit-mask-image:url(../assets/court/ct-lens.svg);mask-image:url(../assets/court/ct-lens.svg);background-color:var(--ct-lensc)}
.ct-l-surround{-webkit-mask-image:url(../assets/court/ct-surround.svg);mask-image:url(../assets/court/ct-surround.svg);background-color:var(--ct-surround)}
.ct-l-wall{-webkit-mask-image:url(../assets/court/ct-wall.svg);mask-image:url(../assets/court/ct-wall.svg);background-color:var(--ct-wall)}
.ct-l-court{-webkit-mask-image:url(../assets/court/ct-court.svg);mask-image:url(../assets/court/ct-court.svg);background-color:var(--ct-court)}
.ct-l-lines{-webkit-mask-image:url(../assets/court/ct-lines.svg);mask-image:url(../assets/court/ct-lines.svg);background-color:var(--ct-lines)}
.ct-l-surface{-webkit-mask-image:url(../assets/court/ct-surface.svg);mask-image:url(../assets/court/ct-surface.svg);background-color:var(--ct-ink)}
.ct-l-net{-webkit-mask-image:url(../assets/court/ct-net.svg);mask-image:url(../assets/court/ct-net.svg);background-color:var(--ct-ink)}
.ct-l-tape{-webkit-mask-image:url(../assets/court/ct-tape.svg);mask-image:url(../assets/court/ct-tape.svg);background-color:var(--ct-lines)}
.ct-l-fence-side{-webkit-mask-image:url(../assets/court/ct-fence-side.svg);mask-image:url(../assets/court/ct-fence-side.svg);background-color:var(--ct-ink)}
.ct-l-annot{-webkit-mask-image:url(../assets/court/ct-annot.svg);mask-image:url(../assets/court/ct-annot.svg);background-color:var(--ct-ink)}
.ct-l-dims-minor{-webkit-mask-image:url(../assets/court/ct-dims-minor.svg);mask-image:url(../assets/court/ct-dims-minor.svg);background-color:var(--ct-ink)}
/* small widths, pausing */
.ct-ball circle{vector-effect:non-scaling-stroke}
.ct-dim,.ct-flood{font-size:clamp(9.5px,1.55cqi,13px)}
@container (max-width:440px){.ct-l-dims-minor,.ct-dim-singles,.ct-dim-service,.ct-dim-net{display:none}}
.ct[data-playing="false"] *{animation-play-state:paused!important}
@media (prefers-reduced-motion:reduce){.ct *{animation-play-state:paused!important}.ct[data-tone="night"] .ct-lamp,.ct[data-tone="night"] .ct-pools{animation:none!important;opacity:1}.ct-l,.ct-fig,.ct-ball circle,.ct-dim,.ct-flood{transition:none!important}}
