/* VeloVision homepage (tasteskill 2.5.1 kit in assets/kit, kind software).
   Brand: charcoal #141312, surface #25221E, ink #F6F1E6, muted #B3AA9C, gold #F0B44C; one typeface, General Sans, self-hosted.
   Order on the page: the kit's stylesheets first, then this file. */

@font-face { font-family: "General Sans"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("../fonts/general-sans-400.woff2") format("woff2"); }
@font-face { font-family: "General Sans"; font-weight: 500; font-style: normal; font-display: swap;
  src: url("../fonts/general-sans-500.woff2") format("woff2"); }

/* the client's own colours through `start.mjs brand` (the block as printed), General Sans in place of the dealt Google pairing */
:root {
  --p-bg: #141312; --p-surface: #25221e; --p-ink: #f6f1e6; --p-muted: #b3aa9c;
  --p-accent: #f0b44c; --p-accent-ink: #141312; --p-action: #f0b44c; --p-action-ink: #141312;
  --p-inv-bg: #f6f1e6; --p-inv-surface: #e4dfd5; --p-inv-ink: #141312; --p-inv-muted: #605d59;
  --p-inv-accent: #141312; --p-inv-accent-ink: #f6f1e6; --p-inv-action: #141312; --p-inv-action-ink: #f6f1e6;
  --font-display: "General Sans", system-ui, sans-serif;
  --font-text: "General Sans", system-ui, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --display-weight: 500;
  --display-tracking: -0.028em;
  --display-tracking-xl: -0.036em;
  --ly-scale: 1.04;
}

/* the site's rule: nothing is selectable or draggable but form fields */
html { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
img, video, canvas, svg { -webkit-user-drag: none; user-drag: none; }
input, textarea, [contenteditable] { -webkit-user-select: text; user-select: text; }

/* headings never break inside a word: the kit hyphenates words of ten letters or more, but Safari does not read that limit
   (hyphenate-limit-chars) and broke the nine-letter "analytics" in the hero as "analyt-ics" on an iPhone */
h1, h2, h3, h4 { -webkit-hyphens: manual; hyphens: manual; }

/* the owner's wordmark in the bar and the footer: its own file, never redrawn */
.nav__logo img { height: 44px; width: auto; }
.footer .nav__logo img { height: 56px; }

/* hero: the ball runs into the page (this page's own rule; it stands in for the kit's "nothing is laid over the photograph").
   A wide screen: the photograph covers the first screen and its lower part fades out, so the page's own ground shows at the
   hero's foot and the next section starts on the same colour, with no line between them. A tablet and a phone: the photograph
   is a band under the header; it fades out over its lower half instead of ending on a straight cut, and the ground under the
   words runs from the photograph's black at the band to the page's ground at the hero's foot. */
.hero.hero--photo, .hero.hero--photo[data-tone] { background: var(--p-bg); }
.hero--photo > .hero__bg {
  --fade: 50%;
  -webkit-mask-image: linear-gradient(to bottom, #000 0, #000 var(--fade), rgb(0 0 0 / .84) calc(var(--fade) + (100% - var(--fade)) * .25), rgb(0 0 0 / .5) calc(var(--fade) + (100% - var(--fade)) * .5), rgb(0 0 0 / .16) calc(var(--fade) + (100% - var(--fade)) * .75), transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0, #000 var(--fade), rgb(0 0 0 / .84) calc(var(--fade) + (100% - var(--fade)) * .25), rgb(0 0 0 / .5) calc(var(--fade) + (100% - var(--fade)) * .5), rgb(0 0 0 / .16) calc(var(--fade) + (100% - var(--fade)) * .75), transparent 100%);
}
@media (max-width: 1023px) {
  .hero.hero--photo, .hero.hero--photo[data-tone] { background: linear-gradient(to bottom, #000 0, #000 calc(var(--nav) + var(--photo)), var(--p-bg) 100%); }
  .hero--photo > .hero__bg { --fade: 46%; }
}

/* pictures run into the page: no box, no corners, no ground of their own. The picture's four edges fade out through a mask,
   so whatever ground its section has shows through (--fl, --fr, --ft, --fb: how far in each fade reaches, as a share of the
   box; keep the subject inside them at every width, since the box crops the picture differently per width).
   .frame--spot adds a round fall-off, for a picture whose backdrop is lit from one corner: the corners go first, so the light
   reads as a glow and not as the corner of a rectangle. */
.frame.frame--blend { background: none; border-radius: 0; }
.frame--blend > .frame__img {
  --fl: 12%; --fr: 12%; --ft: 14%; --fb: 14%;
  --m-x: linear-gradient(to right, transparent 0, rgb(0 0 0 / .16) calc(var(--fl) * .25), rgb(0 0 0 / .5) calc(var(--fl) * .5), rgb(0 0 0 / .84) calc(var(--fl) * .75), #000 var(--fl), #000 calc(100% - var(--fr)), rgb(0 0 0 / .84) calc(100% - var(--fr) * .75), rgb(0 0 0 / .5) calc(100% - var(--fr) * .5), rgb(0 0 0 / .16) calc(100% - var(--fr) * .25), transparent 100%);
  --m-y: linear-gradient(to bottom, transparent 0, rgb(0 0 0 / .16) calc(var(--ft) * .25), rgb(0 0 0 / .5) calc(var(--ft) * .5), rgb(0 0 0 / .84) calc(var(--ft) * .75), #000 var(--ft), #000 calc(100% - var(--fb)), rgb(0 0 0 / .84) calc(100% - var(--fb) * .75), rgb(0 0 0 / .5) calc(100% - var(--fb) * .5), rgb(0 0 0 / .16) calc(100% - var(--fb) * .25), transparent 100%);
  --m-spot: linear-gradient(#000, #000);
  background: none;
  -webkit-mask-image: var(--m-x), var(--m-y), var(--m-spot); mask-image: var(--m-x), var(--m-y), var(--m-spot);
  -webkit-mask-composite: source-in; mask-composite: intersect;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
.frame--spot > .frame__img { --sx: 58%; --sy: 62%; --m-spot: radial-gradient(ellipse var(--sx) var(--sy) at 50% 50%, #000 0, #000 66%, rgb(0 0 0 / .84) 74.5%, rgb(0 0 0 / .5) 83%, rgb(0 0 0 / .16) 91.5%, transparent 100%); }

/* a section with words only is as tall as its words at every width (the kit's whole-screen height would leave most of a
   screen empty where a picture used to be) */
main > section.section.sec--auto { height: auto; min-height: 0; }

/* ---------------------------------------------------------------- sections (page CSS only inside a visual or a list the kit lacks) */

/* #measure: the liquid-type headline, sized to its half of the grid; the link under it, the two facts in the right half.
   On a phone they follow in reading order: the headline, the facts, the link. */
#measure .mo-lt__type { font-size: clamp(44px, 6.2vw, 92px); max-width: 10ch; }
@media (max-width: 639px) { #measure .mo-lt__type { font-size: clamp(40px, 12vw, 56px); } }
.facts { display: grid; margin: 0; }
.facts > div { display: grid; grid-template-columns: minmax(0, 128px) minmax(0, 1fr); gap: var(--s-5); padding: var(--s-4) 0; border-bottom: 1px solid var(--line); }
.facts > div:first-child { border-top: 1px solid var(--line); }
.facts dt { color: var(--muted); font: 400 var(--t-body)/1.5 var(--font-text); }
.facts dd { margin: 0; font: 400 var(--t-lead)/1.4 var(--font-text); }
@media (max-width: 639px) { .facts > div { grid-template-columns: minmax(0, 1fr); gap: var(--s-1); } }
#measure .m-links { margin: 0; }
@media (min-width: 640px) { #measure .m-head { grid-column: 1 / span 6; grid-row: 1; } #measure .m-list { grid-column: 7 / span 6; grid-row: 1 / span 2; } #measure .m-links { grid-column: 1 / span 6; grid-row: 2; align-self: start; } }

/* a video slot: a real <video> with a still as its poster; the clip goes in as a <source> later */
.slot video { width: 100%; height: 100%; object-fit: cover; background: #000; }
/* the home plate: its white face spans 15.5-84.4 % of the picture's width and 36.7-68.5 % of its height; the fades and the
   round fall-off (.frame--spot) stay outside it at every crop */
#compare .slot .frame__img { --fl: 13%; --fr: 13%; --ft: 22%; --fb: 18%; }

/* the app's own screens, whole, on the brand's surface */
.shot { display: grid; place-items: center; height: var(--shot-h, min(440px, 40svh)); padding: var(--s-5); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: clip; }
.shot img { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; border-radius: var(--r-md); }
.card.card--open > .shot { margin: var(--s-5) 0 0; }
@media (max-width: 639px) { .shot { --shot-h: 340px; padding: var(--s-4); } }
/* the two cards sit in two groups so a phone gets one screen each; from 640 the groups are only wrappers */
@media (min-width: 640px) { #numbers .group { display: contents; } #numbers .section-head { grid-column: 1 / -1; } }

/* #replay: the stadium across the wrap */
.replay-head { align-items: start; margin-bottom: var(--s-7); }
.replay-head > h2 { margin: 0; }
.replay-head > p { margin: 0; }
.replay-frame { height: min(520px, 56svh); }
.replay-frame .frame__img { object-position: 50% 62%; --fl: 7%; --fr: 7%; --ft: 14%; --fb: 12%; }
@media (max-width: 1023px) { .replay-head { margin-bottom: var(--s-6); } .replay-frame { height: auto; aspect-ratio: 16 / 9; } }
@media (max-width: 639px) { .replay-frame { aspect-ratio: 1 / 1; } }

/* #compare: facts in rows on the grid; the same three columns at every width */
.cmp { display: grid; }
.cmp__row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gutter); align-items: baseline; padding: clamp(var(--s-3), 2.4svh, var(--s-5)) 0; border-bottom: 1px solid var(--line); font: 400 var(--t-body)/1.5 var(--font-text); }
.cmp__row > :nth-child(1) { grid-column: 1 / span 4; font-weight: 500; }
.cmp__row > :nth-child(2) { grid-column: 5 / span 4; }
.cmp__row > :nth-child(3) { grid-column: 9 / span 4; color: var(--muted); }
.cmp__row--head { padding-top: 0; padding-bottom: var(--s-3); border-bottom: 0; font-weight: 500; }
.cmp__row--head > * { color: var(--ink); }
.cmp__row--head > .cmp__corner { color: var(--muted); font-weight: 400; }
.cmp__row:last-child { border-bottom: 0; }
@media (max-width: 639px) {
  .cmp__row { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s-3); padding: var(--s-3) 0; }
  .cmp__row > :nth-child(n) { grid-column: auto; }
}

/* #teams */
.plain { list-style: none; margin: 0; padding: 0; display: grid; }
.plain li { padding: var(--s-4) 0; border-bottom: 1px solid var(--line); font: 400 var(--t-lead)/1.4 var(--font-text); }
.plain li:first-child { border-top: 1px solid var(--line); }
.links { display: flex; flex-wrap: wrap; gap: var(--s-3) var(--s-6); margin: 0; }

/* footer */
.legal-links { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-5); }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s-2); }

/* video slots: shorter on a tablet and a phone so each section keeps to its screens */
@media (max-width: 1023px) { .slot { --ratio: 56%; } }
@media (max-width: 639px) { .slot { --ratio: 56%; } }

/* a long action label on the narrowest phones (320): the same button, a smaller label, nothing past the screen */
@media (max-width: 359px) { .btn, .actionbar .btn { padding-inline: var(--s-4); font-size: 14px; } .btn--xl { font-size: 15px; } }

/* the footer on a short screen and on a phone: one screen each */
@media (max-height: 800px) { .footer .closing__links { gap: var(--s-6); } .footer .nav__logo img { height: 44px; } }
@media (max-width: 639px) { .footer .nav__logo img { height: 44px; } .footer .closing__links { gap: var(--s-4); } .footer .footer__col { grid-column: 1 / -1; } }

/* the tablet: two cards side by side in #numbers (the groups are wrappers there) */
@media (min-width: 640px) and (max-width: 1023px) { #numbers .card { grid-column: auto / span 6; } }

/* #teams on a tall screen: more air in the list; the swing card's panel takes its picture's height on a phone */
@media (min-width: 1024px) and (min-height: 801px) { .plain li { padding: var(--s-5) 0; } }
@media (max-width: 639px) { .shot--wide { height: auto; } }

/* the iris ring as a gradient on a stage-sized box: the same hairline circle at --mo-r, with no width or height animated (no layout shift) */
.mo-io > .mo-io__stage > .mo-io__ring { inset: 0; left: 0; top: 0; width: auto; height: auto; transform: none; border: 0; border-radius: 0; will-change: auto;
  background: radial-gradient(circle at var(--mo-cx) var(--mo-cy), transparent calc(var(--mo-r) - 1px), var(--accent) calc(var(--mo-r) - 1px), var(--accent) var(--mo-r), transparent calc(var(--mo-r) + 0.5px)); }

/* #numbers: the figures typeset on the panel (the app's own screens carry error numbers, so the page shows the readings only) */
.readout { place-items: stretch; padding: var(--s-6); }
.readout dl { margin: 0; display: grid; gap: var(--s-6); align-content: space-evenly; }
.readout dt { font: 400 var(--t-small)/1.3 var(--font-text); color: var(--muted); }
.readout dd { margin: 0; font: 500 clamp(18px, 1.5vw, 22px)/1.25 var(--font-text); letter-spacing: -0.01em; }
.readout__main dd { margin-top: var(--s-2); }
.readout__big { font-size: var(--t-h2); line-height: 1; font-weight: 500; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.readout__row--big .readout__big { font-size: var(--t-h2); }
.readout__unit { margin-left: 0.3em; font-size: clamp(16px, 1.4vw, 20px); font-weight: 400; color: var(--muted); }
.readout__row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s-4); }
.readout__row--big { grid-template-columns: minmax(0, 1fr); grid-template-rows: repeat(3, 1fr); gap: 0; height: 100%; }
.readout__row--big > div { display: flex; justify-content: space-between; align-items: center; gap: var(--s-3); padding: 0; border-top: 1px solid var(--line); }
.readout__row--big > div:first-child { border-top: 0; }
.readout__row--big dd { white-space: nowrap; }
@media (max-width: 639px) {
  .readout { padding: var(--s-5); }
  .readout dl { gap: var(--s-5); }
  .readout__row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .readout__row > div { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-3); padding: var(--s-3) 0; border-top: 1px solid var(--line); }
  .readout__row > div:first-child { border-top: 0; }
  .shot.readout { height: 360px; }
}

/* #compare on a phone: the table and a shorter picture share one screen (the plate in the middle of its box, air round it) */
@media (max-width: 639px) { #compare .slot { --ratio: 47%; } #compare .slot .frame__img { object-position: 50% 55%; --sy: 80%; } #compare .cmp__row { padding: var(--s-2) 0; } #compare .cmp__row--head { padding-bottom: var(--s-2); } }

/* #compare on a tablet and a small laptop: each half is narrow, so the rows are tighter and their words one step smaller */
@media (min-width: 640px) and (max-width: 1100px) { #compare .cmp__row { padding: var(--s-2) 0; font-size: var(--t-small); line-height: 1.4; } #compare .cmp__row--head { padding-bottom: var(--s-2); } #compare .slot { --ratio: 70%; } }

/* #teams: heading and links in the left half, the list in the right half; on a phone they follow in reading order */
@media (min-width: 640px) { #teams .t-head { grid-column: 1 / span 6; grid-row: 1; } #teams .t-list { grid-column: 7 / span 6; grid-row: 1 / span 2; } #teams .t-links { grid-column: 1 / span 6; grid-row: 2; align-self: start; } }

/* #faq: a little more air between the four answers on a tall screen, so the section fills its screen */
@media (min-width: 1024px) and (min-height: 801px) { #faq .faq__item { padding-block: var(--s-6); } }
