/* Buttons. The hover ring draws clockwise round the button, then keeps going clockwise on leave. */
@property --q-ring-from { syntax: "<angle>"; inherits: false; initial-value: 360deg; }
@property --q-ring-len { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.q-btn {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  height: 48px;
  padding: 0 20px;
  border-radius: 8px;
  font: 500 16px/1.5 var(--q-font-sans);
  white-space: nowrap;
  text-decoration: none;
  outline: none;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1), color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.q-btn--sm { height: 40px; }
.q-btn--primary { background: var(--q-purple-700); color: #fff; border: 0; }
.q-btn--primary:hover { background: var(--q-purple-600); color: #fff; }
.q-btn--secondary { background: #fff; color: #000; border: 1px solid var(--q-purple-700); }
.q-btn--secondary:hover { background: var(--q-purple-100); color: #000; }
.q-btn::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 12px;
  padding: 1.5px;
  background: conic-gradient(from var(--q-ring-from), var(--q-violet) var(--q-ring-len), transparent var(--q-ring-len));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
  --q-ring-from: 360deg;
  --q-ring-len: 0deg;
  transition: --q-ring-from 600ms cubic-bezier(0.4, 0, 0.2, 1), --q-ring-len 600ms cubic-bezier(0.4, 0, 0.2, 1);
}
.q-btn:hover::before,
.q-btn:focus-visible::before {
  --q-ring-from: 0deg;
  --q-ring-len: 360deg;
  transition: --q-ring-from 0s, --q-ring-len 600ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Heading accent: a row of violet dots under the words, drawn in left to right when it scrolls into view.
   --q-accent-cover must match the background behind the heading. */
@property --q-accent-reveal { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
.q-accent {
  font-weight: 400;
  background-image:
    linear-gradient(var(--q-accent-cover, #fff), var(--q-accent-cover, #fff)),
    radial-gradient(circle, var(--q-violet) 0.032em, transparent 0.037em);
  background-size: calc(100% - var(--q-accent-reveal)) 0.12em, 0.15em 0.08em;
  background-repeat: no-repeat, repeat-x;
  background-position: 100% 100%, 0.02em 100%;
  padding-bottom: 0.1em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: --q-accent-reveal 1100ms cubic-bezier(0.65, 0, 0.35, 1);
}

/* Full-width section rule: solid across the 1200px content width, dotted and fading out into the side gutters. */
.q-rule { position: absolute; left: 0; right: 0; z-index: 10; display: flex; align-items: center; height: 1px; pointer-events: none; }
.q-rule--top { top: 0; }
.q-rule--bottom { bottom: 0; }
.q-rule__line { flex-shrink: 0; width: 100%; max-width: var(--q-page-width); height: 1px; background: var(--q-line); }
.q-rule__dots { flex: 1; min-width: 0; height: 3px; background-image: radial-gradient(circle, var(--q-line-strong) 0.9px, transparent 1.1px); background-size: 6px 3px; background-repeat: repeat-x; }
.q-rule__dots--start { background-position: right center; -webkit-mask-image: linear-gradient(to left, #000 15%, transparent); mask-image: linear-gradient(to left, #000 15%, transparent); }
.q-rule__dots--end { background-position: left center; -webkit-mask-image: linear-gradient(to right, #000 15%, transparent); mask-image: linear-gradient(to right, #000 15%, transparent); }

@media (prefers-reduced-motion: reduce) {
  .q-section *, .q-section *::before, .q-section *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Three platforms ===== */
.q-platforms { background: var(--q-page); --q-accent-cover: #fff; }
.q-panel { position: relative; margin: 0 auto; overflow: clip; border-left: 1px solid var(--q-line); border-right: 1px solid var(--q-line); background: #fff; }
.q-platforms__head { padding: 64px 24px; }
.q-heading { font-family: var(--q-font-display); font-size: 32px; line-height: 1.3; font-weight: 300; color: #000; }

/* Cards: stacked and all open on small screens; an expanding row on desktop (the open card takes half the row). */
.q-plat-list { position: relative; display: flex; flex-direction: column; container-type: inline-size; }
.q-plat { position: relative; display: flex; overflow: hidden; background: #fff; transition: flex-grow 500ms ease-out; }
.q-plat::before { content: ""; position: absolute; left: 0; right: 0; top: 0; z-index: 2; height: 1px; background: var(--q-line); }
.q-plat__num { font-family: var(--q-font-display); font-size: 12px; line-height: 16px; letter-spacing: 0.06em; color: var(--q-neutral-400); }
.q-plat__name { font-family: var(--q-font-display); font-size: 24px; line-height: 32px; font-weight: 500; white-space: nowrap; color: #000; }
.q-plat__head, .q-plat__pinned { display: flex; flex-direction: column; gap: 8px; }
.q-plat__pinned, .q-plat__progress, .q-plat__art--pinned, .q-plat__spacer { display: none; }
.q-plat__body { position: relative; display: flex; flex-direction: column; gap: 24px; width: 100%; padding: 24px; }
.q-plat__art { overflow: visible; }
.q-plat__art--inline { align-self: center; width: 100%; max-width: 220px; height: 144px; }
.q-plat__text { max-width: 400px; font-family: var(--q-font-sans); font-size: 14px; line-height: 1.6; color: var(--q-neutral-400); }
.q-plat__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; }

/* The diamond net in each card's top-right corner, fading out; the dots darken around the pointer. */
.q-corner { position: absolute; top: 0; bottom: 0; right: 0; left: 50%; pointer-events: none; --q-spot-on: 0; -webkit-mask-image: linear-gradient(to right, transparent, #000 60%); mask-image: linear-gradient(to right, transparent, #000 60%); }
.q-corner > svg, .q-corner__fade { position: absolute; inset: 0; width: 100%; height: 100%; }
.q-corner__spot {
  opacity: var(--q-spot-on);
  transition: opacity 300ms;
  -webkit-mask-image: radial-gradient(circle 90px at var(--q-spot-x, -999px) var(--q-spot-y, -999px), #000 0%, transparent 100%);
  mask-image: radial-gradient(circle 90px at var(--q-spot-x, -999px) var(--q-spot-y, -999px), #000 0%, transparent 100%);
}
.q-corner__fade { background: radial-gradient(ellipse 120% 100% at 100% 0%, rgb(255 255 255 / 0), #fff); }

@media (min-width: 768px) {
  .q-platforms__head { padding: 64px 48px; }
  .q-heading { font-size: 40px; }
  .q-plat__body { padding: 32px; }
}
@media (min-width: 1024px) {
  .q-plat-list { flex-direction: row; height: 440px; }
  .q-plat { min-width: 0; flex: 1 1 0; }
  .q-plat:not(:last-child) { border-right: 1px solid var(--q-line); }
  .q-plat.is-open { flex-grow: 2; }
  /* Time until the next card opens, drawn over the open card's top line */
  .q-plat__progress { position: absolute; left: 0; right: 0; top: 0; z-index: 10; display: block; height: 1px; }
  .q-plat__progress > span { position: absolute; top: 0; bottom: 0; left: 0; width: 0; background: var(--q-purple-400); }
  .q-plat.is-open .q-plat__progress > span { animation: q-platform-progress 7000ms linear forwards; }
  .q-plat-list.is-paused .q-plat__progress > span { animation-play-state: paused; }
  /* Number and title pinned in the corner; the illustration glides up under it when the card opens */
  .q-plat__pinned { position: absolute; top: 32px; left: 32px; z-index: 1; display: flex; pointer-events: none; }
  .q-plat__art--pinned { position: absolute; z-index: 1; display: block; left: calc(12.5cqw - 90px); top: calc(50% - 72px); width: 180px; height: 144px; pointer-events: none; transition: top 500ms ease-out; }
  .q-plat.is-open .q-plat__art--pinned { top: 100px; }
  .q-plat__art--inline { display: none; }
  .q-plat__head { visibility: hidden; }
  .q-plat__spacer { display: block; height: 160px; }
  /* Details: laid out at the open card's width so nothing re-wraps; fade and drift in once the card has room */
  .q-plat__body { width: 50cqw; flex-shrink: 0; opacity: 0; transform: translateY(8px); pointer-events: none; transition: opacity 500ms ease-out, transform 500ms ease-out; }
  .q-plat.is-open .q-plat__body { opacity: 1; transform: none; pointer-events: auto; transition-delay: 400ms; }
}
@keyframes q-platform-progress { from { width: 0%; } to { width: 100%; } }
@media (prefers-reduced-motion: reduce) { .q-plat__progress { display: none !important; } }