/* Cyber City · the board (template-parts/board.php, assets/js/board.js): one box under the first screen of the home
   page that changes by itself. Loaded on the front page only, after home.css. Same rules as pages.css: every colour,
   space, size, radius, duration, layer and font is a token.
   "Power on. Run the current once. Then rest.": a slide every 6.5 s, two rounds, then it rests on its first slide.
   With a script every slide sits in the same grid cell, so the box keeps the height of its tallest slide and nothing
   below it moves. Without a script the slides are a list, one under the other. */

.ecc-board { margin-top: var(--ecc-gap); }
.ecc-board__frame { position: relative; display: grid; overflow: hidden; }
.ecc-board__slides { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; padding: 0; list-style: none; }
.ecc-board__slide { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); align-items: stretch; gap: var(--ecc-gap); min-width: 0; padding: var(--ecc-gap); }
.ecc-js .ecc-board__slide { grid-area: 1 / 1; opacity: 0; visibility: hidden; }
.ecc-js .ecc-board__slide[data-ecc-board-current] { opacity: 1; visibility: visible; }
@media (prefers-reduced-motion: no-preference) {
  html:not([data-ecc-motion="paused"]).ecc-js .ecc-board__slide { transition: opacity var(--ecc-d-base) var(--ecc-ease-out), visibility 0s linear var(--ecc-d-base); }
  html:not([data-ecc-motion="paused"]).ecc-js .ecc-board__slide[data-ecc-board-current] { transition-delay: 0s; }
}
.ecc-board__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--ecc-s-3); min-width: 0; padding: var(--ecc-s-5) var(--ecc-s-5) calc(var(--ecc-s-7) + var(--ecc-s-3)); }
.ecc-board__kind { display: flex; align-items: center; gap: var(--ecc-s-2); margin: 0; color: var(--ecc-ink-2); }
.ecc-board__title { max-width: 16em; text-wrap: balance; }
.ecc-board__line { max-width: 30em; }
.ecc-board__terms { display: flex; flex-wrap: wrap; gap: var(--ecc-s-1) var(--ecc-s-4); margin: 0; padding: var(--ecc-s-2) var(--ecc-s-3); border-left: 2px solid var(--ecc-line-strong); color: var(--ecc-ink); }
.ecc-board__cta { margin-top: auto; padding-top: var(--ecc-s-2); }
.ecc-board__stage { position: relative; min-height: calc(var(--ecc-s-9) * 3); }
.ecc-board__stage .ecc-stage__box { left: 10%; right: 10%; top: 10%; bottom: 10%; mix-blend-mode: multiply; }
.ecc-board__stage img { object-position: 50% 50%; filter: brightness(1.04); } /* near-white melts into the stage (pages.css, product page) */

/* the controls: which slide of how many (in the dot-matrix font), a square dot per slide, one pause switch */
.ecc-board__ctl { position: absolute; left: var(--ecc-s-5); bottom: var(--ecc-s-3); display: none; align-items: center; gap: var(--ecc-s-2); }
.ecc-js .ecc-board__ctl { display: flex; }
.ecc-board__count { display: flex; align-items: center; gap: var(--ecc-s-1); margin: 0 var(--ecc-s-2) 0 0; color: var(--ecc-ink-2); }
.ecc-board__count .ecc-dot { color: var(--ecc-ink); font-size: var(--ecc-t-h3); }
.ecc-board__dots { display: flex; }
.ecc-board__dot { display: grid; place-items: center; width: var(--ecc-hit); height: var(--ecc-hit); padding: 0; border: 0; background: none; cursor: pointer; }
.ecc-board__dot::before { content: ""; width: var(--ecc-s-2); height: var(--ecc-s-2); border-radius: var(--ecc-r-voxel); box-shadow: inset 0 0 0 2px var(--ecc-control-line); }
.ecc-board__dot[aria-current="true"]::before { background: var(--ecc-ink); box-shadow: none; }
.ecc-board__pause .ecc-icon:last-child { display: none; }
.ecc-board__pause[aria-pressed="true"] .ecc-icon:first-child { display: none; }
.ecc-board__pause[aria-pressed="true"] .ecc-icon:last-child { display: block; }

@media (max-width: 760px) {
  .ecc-board__slide { grid-template-columns: minmax(0, 1fr); }
  .ecc-board__stage { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
  .ecc-board__text { padding: var(--ecc-s-3) var(--ecc-s-3) calc(var(--ecc-s-7) + var(--ecc-s-2)); }
  .ecc-board__ctl { left: var(--ecc-s-2); bottom: var(--ecc-s-1); }
}
@media print { .ecc-board__ctl { display: none !important; } }
