/* Public home: the voiced tour video and the two carousels (app screens, reviews).
 * Carousels: a scroll-snap track whose columns are sized so exactly N items fit (N by width), so no item
 * is ever half visible; without JS the track still scrolls by touch, wheel or keyboard. home.js adds the
 * arrows and the page dots. The phone frame itself is in pro.css (.hm-phone). */

/* Tour video (16:9, plays with sound on the visitor's click). */
.hm-video { margin-top: 40px; }
.hm-video__player {
  display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: contain;
  border-radius: var(--pr-r-md); border: 1px solid var(--pr-line); background: #03080c;
  box-shadow: var(--pr-phone-shadow);
}
.hm-video__alt { margin: 14px 0 0; font-size: var(--pr-t-small); }

/* Carousel */
.hm-carousel { --per: 1; --gap: 16px; margin-top: 72px; }
#reviews .hm-carousel { margin-top: 0; }
.hm-carousel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.hm-carousel__nav { display: flex; gap: 8px; flex: none; }
.hm-carousel__nav[hidden] { display: none; }
.hm-carousel__btn {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px;
  border: 1px solid var(--pr-line-2); background: transparent; color: var(--pr-ink); cursor: pointer;
  transition: border-color .18s var(--pr-ease), background-color .18s var(--pr-ease), opacity .18s var(--pr-ease);
}
.hm-carousel__btn:hover:not(:disabled) { border-color: var(--pr-ink-3); background: var(--pr-glass); }
.hm-carousel__btn:disabled { opacity: .35; cursor: default; }
[dir="rtl"] .hm-carousel__btn svg { transform: scaleX(-1); }
.hm-carousel__track {
  display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - (var(--per) - 1) * var(--gap)) / var(--per));
  gap: var(--gap); margin: 24px 0 0; padding: 4px 0 16px; list-style: none;
  /* Touch: a one-axis scroller (overflow-y hidden, not the computed auto) that hands vertical swipes to the
     page; overscroll is contained on x only and touch-action keeps both pan axes (and pinch zoom). */
  overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; overscroll-behavior-y: auto;
  touch-action: pan-x pan-y pinch-zoom; scroll-snap-type: x mandatory; scrollbar-width: none;
}
.hm-carousel__track::-webkit-scrollbar { display: none; }
.hm-carousel__track:focus-visible { outline: none; box-shadow: var(--pr-focus); border-radius: 12px; }
.hm-carousel__item { scroll-snap-align: start; min-width: 0; }
.hm-carousel__dots { display: flex; gap: 6px; margin-top: 16px; }
.hm-carousel__dots[hidden] { display: none; }
.hm-carousel__dot { position: relative; flex: 1; max-width: 96px; height: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.hm-carousel__dot::before {
  content: ""; position: absolute; top: 50%; inset-inline: 0; height: 4px; margin-top: -2px; border-radius: 2px;
  background: var(--pr-line-2); transition: background-color .25s var(--pr-ease);
}
.hm-carousel__dot:hover::before { background: var(--pr-ink-3); }
.hm-carousel__dot[aria-current="true"]::before { background: var(--pr-accent); }
.hm-carousel__count { min-width: 3.5em; font-size: var(--pr-t-small); font-weight: 600; color: var(--pr-ink-2); font-variant-numeric: tabular-nums; text-align: end; }
.hm-carousel__nav { align-items: center; }
@media (prefers-reduced-motion: no-preference) { .hm-carousel__track { scroll-behavior: smooth; } }

/* Screens: 2 / 3 / 4 / 5 per view, each phone whole. */
.hm-carousel--screens { --per: 2; --gap: 14px; }
@media (min-width: 640px) { .hm-carousel--screens { --per: 3; --gap: 20px; } }
@media (min-width: 1000px) { .hm-carousel--screens { --per: 4; --gap: 28px; } }
@media (min-width: 1440px) { .hm-carousel--screens { --per: 5; --gap: 28px; } }
.hm-screen__fig { margin: 0; }
.hm-screen .hm-phone { padding: 6px; border-radius: 28px; }
.hm-screen .hm-phone img { border-radius: 22px; }
@media (min-width: 1000px) { .hm-screen .hm-phone { padding: 7px; border-radius: 34px; } .hm-screen .hm-phone img { border-radius: 27px; } }
.hm-screen__cap { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; }
.hm-screen__kicker { font-size: var(--pr-t-caption); font-weight: 500; color: var(--pr-ink-3); }
.hm-screen__title { font-size: var(--pr-t-small); font-weight: 600; line-height: 1.35; color: var(--pr-ink); text-wrap: balance; }

/* Reviews: 1 / 2 / 3 per view */
.hm-carousel--reviews { --per: 1; --gap: 24px; }
@media (min-width: 700px) { .hm-carousel--reviews { --per: 2; --gap: 32px; } }
@media (min-width: 1040px) { .hm-carousel--reviews { --per: 3; --gap: 40px; } }
.hm-carousel--reviews .hm-carousel__track { margin-top: 32px; }
