/* MotionSkill home page: the page's own CSS, linked after the taste skill's kit (public/assets, unchanged).
   The system, the grid, the type scale, the buttons, the cards and every hover are the kit's.
   This file holds only the fonts and what sits inside a visual (the kit has no rule for those),
   plus the few screen-count rules the skill's references ask a page to write. */

@font-face { font-family: "Inter"; src: url("/fonts/inter-latin-opsz-normal.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-style: normal; font-display: swap; }
body { font-optical-sizing: auto; }

/* ---------------------------------------------------------------- the hero's picture
   The film leads: whole at 16:9 on seven of the twelve columns, in the middle of the hero's height,
   with no frame around it but its own hairline. Stacked (below 1024) it runs the column's width under the words. */
.hero-film { align-self: center; min-width: 0; }
.hero--split .hero__text:has(+ .hero-film) { align-self: center; }
@media (max-width: 1023px) { .hero-film { margin-top: var(--s-6); } }
/* an ad's longer headline keeps to three lines beside the film */
@media (min-width: 1024px) { .hero--long h1 { font-size: clamp(2.5rem, 3.6vw, 3.25rem); } }
/* a terminal line's text may shrink, so a line too long for its pane wraps or ends in an ellipsis */
.ui-term .term-text { flex: 0 1 auto; }
.run-film { position: relative; aspect-ratio: 16 / 9; overflow: clip; border-radius: 12px; background: #000;
  box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 10%, transparent); }
.run-film > video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* the sound control: the kit's pause disc again, one disc to its left */
.run-film__sound {
  position: absolute; right: 56px; bottom: 12px; z-index: 6; display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0;
  border-radius: 50%; cursor: pointer; border: 1px solid color-mix(in oklab, var(--ink) 16%, transparent); background: var(--bg); color: var(--ink);
  box-shadow: 0 1px 2px rgb(0 0 0 / .12), 0 4px 12px -4px rgb(0 0 0 / .28);
}
.run-film__sound::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; }
.run-film__sound svg { width: 16px; height: 16px; }
/* under reduced motion the film waits on its poster: its play control must stay (the kit hides a loop's pause disc there) */
@media (prefers-reduced-motion: reduce) { .run-film > .loop-pause { display: grid; } }
/* ---------------------------------------------------------------- the app frame (sections-library.md, app-frame: its whole recipe) */
.app.ui { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); margin-top: var(--s-7); background: var(--u-bg); border: 1px solid var(--u-border); border-radius: var(--u-r); box-shadow: var(--u-shadow); }
.app > .app__pane { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.app > .app__pane + .app__pane { border-left: 1px solid var(--u-line); }
.app > .app__pane > .ui-panel { width: 100%; border: 0; border-radius: 0; box-shadow: none; }
.app > .app__pane::after { content: ""; position: absolute; inset: auto 0 0 0; height: 64px; background: linear-gradient(transparent, var(--u-bg)); pointer-events: none; }
/* below 1280 a section grows with its content, so the frame cuts nothing and needs no fade over its last rows */
@media (max-width: 1279px) { .app > .app__pane::after { display: none; } }
@media (min-width: 1024px) and (max-width: 1279px) { .app.ui { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); } }
@media (max-width: 1023px) {
  .app.ui { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); }
  .app > .app__pane--list { max-height: 252px; }
  .app > .app__pane--list::after { display: none; }
  .app .ui-win__side { display: none; }
  .app .ui-win__body { grid-template-columns: minmax(0, 1fr); }
  .app > .app__pane + .app__pane { border-left: 0; border-top: 1px solid var(--u-line); }
}
@media (max-width: 639px) {
  .app.ui { grid-template-rows: minmax(0, 1fr); }
  .app > .app__pane--list { display: none; }
  .app > .app__pane + .app__pane { border-top: 0; }
}

/* ---------------------------------------------------------------- the showcase films (inside .tile__media) */
.film-poster { display: block; width: 100%; padding: 0; border: 0; cursor: pointer; font: inherit; color: inherit; }
.tile__media > video { display: block; width: 100%; height: 100%; object-fit: cover; background: #000; }
.film-poster__disc { position: absolute; left: var(--s-4); bottom: var(--s-4); display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); color: var(--ink);
  border: 1px solid color-mix(in oklab, var(--ink) 16%, transparent); }
.film-poster__disc svg { width: 16px; height: 16px; margin-left: 2px; }
.tile.span-3 .film-poster__disc { left: var(--s-3); bottom: var(--s-3); width: 36px; height: 36px; }
/* the small print and the button close the second screen: on its foot, under the films */
.films-foot { margin-top: auto; padding-top: var(--s-5); }
.films-foot > .measure { max-width: 76ch; }

/* ---------------------------------------------------------------- the diagram and terminal panels: one height each */
.inside-panel { --p-h: 340px; }
.runs-panel { --p-h: 420px; }
.price-panel { --p-h: 300px; }
.before-panel { --p-h: 340px; }
.before-panel .ui-term { width: 100%; }
/* the setup check is held still at every width: a line that cannot fit its pane wraps */
.before-panel .ui-term__ln:has(> .term-text) { height: auto; min-height: 20px; white-space: pre-wrap; }
.before-panel .term-text { overflow: visible; }
@media (max-width: 639px) { .before-panel { --p-h: 480px; } }

/* ---------------------------------------------------------------- the name across the .wrap (close-word: hand-set per breakpoint)
   "MotionSkill" in the display face is 4.46 times its font size wide: the size is the .wrap's width over that. */
.close__word { font-size: min(calc((100vw - 160px) / 4.46), 287px); overflow: visible; }
@media (max-width: 1023px) { .close__word { font-size: calc((100vw - 96px) / 4.46); } }
@media (max-width: 639px) { .close__word { font-size: calc((100vw - 48px) / 4.46); } }
/* the footer's one row of links under the name: no second rule above the legal row */
footer.closing .footer__nav { margin-top: 0; padding-top: 0; border-top: 0; font-size: var(--t-small); }

/* ---------------------------------------------------------------- a split's row runs to the section's foot
   From 1280 a section is exactly its screens tall: the split under the heading takes what is left, so its picture
   (a .panel, a plan card) ends on the section's bottom line and every section keeps one gap to the next. Below 1280
   the kit lets a section grow with its content, and the split is as tall as what it holds. */
@media (min-width: 1280px) {
  main > section > .wrap > .split-fill { flex: 1 1 auto; min-height: 0; }
}

/* ---------------------------------------------------------------- questions: two answers a row */
.faq.grid > details { align-content: start; }
.faq.grid > details:first-child { padding-top: var(--s-5); }

/* ---------------------------------------------------------------- the tablet (640 to 1023): the screens planned again (layout-v4.md, section 2)
   The six stops stack to a second screen; the showcase's two groups follow each other instead of sharing two equal rows. */
@media (min-width: 640px) and (max-width: 1023px) {
  #how { --h: 2; --g-screen: 200svh; }
  #showcase > .wrap { display: flex; flex-direction: column; row-gap: var(--card-gap); }
  #showcase > .wrap > .group:last-child { flex: 1 1 auto; }
}

/* ---------------------------------------------------------------- a phone: a terminal line that cannot fit wraps (the fragments are held still there) */
@media (max-width: 639px) {
  .ui-term .ui-term__ln:has(> .term-text) { height: auto; min-height: 20px; white-space: pre-wrap; }
  .ui-term .term-text { overflow: visible; }
}

/* ---------------------------------------------------------------- a row's glyph stands at its right end, beside both of its lines */
.rows > li > .rows__icon { grid-row: 1 / span 2; align-self: start; }

/* a phone: the band keeps its two screens like every other two-screen section (backgrounds.css reads --g-screen) */
@media (max-width: 639px) { #how { --g-screen: 200lvh; } }

/* stacked (below 1024), a split's two columns keep a section's gap between them, not a card row's */
@media (max-width: 1023px) { main > section > .wrap > .grid.split-fill:has(> .split-col) { row-gap: var(--s-7); } }

/* ---------------------------------------------------------------- flat grounds, in the brand's own paper
   The page lists what the skill never puts on screen (glows, gradients), so its own panels and its band are flat:
   the brand's light ground, with no mesh, no vignette and no grain. */
html[data-ground] { --ground-bg: #eceae4; --ground-surface: #f7f6f2; --ground-ink: #0b0c0e; --ground-muted: #56575b; --ground-accent: #ff4a1c; }
.panel:not([data-fx], .panel--device) { background-image: none !important; }
.panel::before { content: none; }
.bg-band { background-image: none; }
/* a standalone link is its words and its arrow: no line under it (the arrow marks it as a link) */
.link { text-decoration: none; }
main .link { background-image: none !important; }
/* a diagram on a paper panel: its lines and dots in the panel's ink (the kit draws them in the page's light ink),
   and no halo behind the core or glow under the running light */
.panel > .dg {
  --dg-line: color-mix(in oklab, var(--ground-ink) 30%, transparent); --dg-faint: color-mix(in oklab, var(--ground-ink) 14%, transparent);
  --dg-dot: color-mix(in oklab, var(--ground-ink) 16%, transparent); --dg-halo: 0; --dg-glow-a: 0; --dg-glow-k: 0%;
}
.panel > .dg :is(.dg-halo, .dg-spark-halo, .dg-glow) { display: none; }
/* a small laptop (1024 to 1199): the bar's right group is wider than a third of the bar, so the three groups
   take their own widths and the words sit between the logo and the button instead of running under "Log in" */
@media (min-width: 1024px) and (max-width: 1199px) {
  .nav--centre .nav__bar { grid-template-columns: auto minmax(0, 1fr) auto; }
}

/* the showcase tile name opens the film's own page */
.film-name { color: var(--ink); text-decoration: none; }
.film-name:hover { color: var(--accent); }
