/* FlowCraft Logo Marquee — catalogue demo styles (extends site.css)
   Mirrors the buyer-delivered Tailwind widget with the site's own tokens.
   The loop itself (.is-ready / .is-paused / .is-static and the CSS variables
   --mq-distance, --mq-duration, --mq-direction) is driven by the unchanged
   buyer app.js. */

.mqd-stage { padding: 28px 0 32px; background: var(--bg); }
@media (min-width: 600px) { .mqd-stage { padding: 40px 0 40px; } }
.mqd-head { max-width: 40em; margin: 0 auto; padding: 0 16px; text-align: center; }
.mqd-kicker { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }
.mqd-title { margin: .35rem 0 .3rem; font-size: clamp(1.3rem, 1rem + 1.2vw, 1.8rem); font-weight: 800; letter-spacing: -.02em; }
.mqd-sub { margin: 0; color: var(--ink-muted); font-size: .95rem; }
.mqd-head + .mq { margin-top: 18px; }
.mq + .mqd-head { margin-top: 36px; }

/* ---------- The marquee ---------- */
.mq { position: relative; }
.mq .hidden { display: none !important; }
.mq-viewport {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.mq-track { display: flex; width: max-content; align-items: center; margin: 0; padding: 0; list-style: none; }
.mq-track > li { flex: none; margin: 0; }

@keyframes mq-scroll {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(calc(-1 * var(--mq-distance, 0px)), 0, 0); }
}
.mq.is-ready .mq-track {
  animation: mq-scroll var(--mq-duration, 30s) linear infinite;
  animation-direction: var(--mq-direction, normal);
  will-change: transform;
}
.mq.is-paused .mq-track { animation-play-state: paused; }

/* Logos: grey until hovered */
.mqd-logos { padding: 18px 0; }
.mq-logo { display: flex; align-items: center; padding: 0 28px; }
@media (min-width: 600px) { .mq-logo { padding: 0 44px; } }
.mq-logo svg { display: block; height: 36px; width: auto; filter: grayscale(1); opacity: .65; transition: filter 250ms ease, opacity 250ms ease; }
@media (min-width: 600px) { .mq-logo svg { height: 42px; } }
.mq-logo:hover svg { filter: none; opacity: 1; }

/* Project cards */
.mqd-cards { padding: 12px 0 16px; }
.mqd-cards .mq-track { align-items: stretch; }
.mqd-cards .mq-track > li { padding-right: 18px; }
.mq-card {
  display: block; width: 230px; overflow: hidden; border-radius: 16px; background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
@media (min-width: 600px) { .mq-card { width: 270px; } }
.mq-card:hover { transform: translateY(-3px); box-shadow: 0 14px 30px -12px rgba(15, 27, 61, .35); }
.mq-card:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-line); }
.mq-card img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.mq-card span { display: block; }
.mq-card .mqd-cat { padding: 10px 14px 0; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.mq-card .mqd-name { padding: 2px 14px 12px; font-weight: 700; }

/* Pause / play button */
.mq-toggle {
  position: absolute; right: 12px; bottom: 4px; z-index: 2;
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid var(--line); border-radius: 50%; background: rgba(255, 255, 255, .92); color: var(--ink-muted);
  cursor: pointer; opacity: .6; transition: opacity 200ms ease, color 150ms ease;
}
.mq-toggle svg { width: 15px; height: 15px; }
.mq:hover .mq-toggle, .mq:focus-within .mq-toggle, .mq-toggle[aria-pressed="true"] { opacity: 1; }
.mq-toggle:hover { color: var(--ink); }
.mq-toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--accent-line); }

.mqd-note { margin: 16px auto 0; padding: 0 16px; max-width: 40em; text-align: center; font-size: .82rem; color: var(--ink-muted); }
.mqd-form { max-width: 720px; margin: 28px auto 0; padding: 0 16px; }
.mqd-form .lead-form { background: var(--surface); }

/* Reduced motion: no movement, the row scrolls sideways by hand */
.mq.is-static .mq-viewport { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
.mq.is-static .mq-toggle { display: none; }
@media (prefers-reduced-motion: reduce) {
  .mq-track { animation: none !important; }
  .mq-logo svg, .mq-toggle, .mq-card { transition: none; }
}

/* Catalogue card: compact */
.mqd-compact { padding: 22px 0 18px; border-radius: 16px; }
.mqd-compact .mq-logo { padding: 0 22px; }
.mqd-compact .mq-logo svg { height: 30px; }
.mqd-compact .mq-card { width: 180px; }
.mqd-compact .mq-card .mqd-name { font-size: .88rem; }
.mqd-compact .mqd-cards .mq-track > li { padding-right: 14px; }
#logo-marquee .product-head > *, #logo-marquee .product-shot, #logo-marquee .live-widget { min-width: 0; }
#logo-marquee .live-badge { z-index: 10; }
@media (max-width: 479px) { #logo-marquee .product-head { padding: 24px 14px; } }
