/*
 * Sage Store ("/store", later store.sage.show).
 *
 * Page-specific layer on top of /sage/hub.css: the header, footer, wordmark and
 * .wrap container come from the hub so the two pages read as one site. Only the
 * title block, the app panels and the web-service list live here.
 *
 * Colour discipline (design/theme-ref/THEME.md): white surfaces, #202124 and
 * #5f6368 text, #dadce0 rules, #0b57d0 for the one primary action. Colour
 * appears only in the SAGE wordmark and in the product illustrations.
 *
 * Radius rule, applied everywhere on the page: 16px on panels, 8px on the icon
 * tile, 999px on anything you press.
 */

/* ---------- Title ---------- */
.store-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 200px;
  align-items: center;
  gap: 2.5rem;
  padding-block: 3.5rem 2.5rem;
}
.store-head h1 {
  margin: 0;
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.25;
  letter-spacing: -.01em;
}
.store-head .lede {
  margin: .9rem 0 0;
  max-width: 34ch;
  color: var(--muted);
  font-size: 1.05rem;
}
.store-art { justify-self: end; width: 200px; }

/* ---------- App panels ---------- */
#apps { scroll-margin-top: 5rem; outline: none; } /* clear the sticky header for the skip link */
.apps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.app {
  border: 1px solid var(--rule);
  border-radius: 16px;
  background: #fff;
  padding: 1.5rem;
}
.app-top { display: flex; align-items: flex-start; gap: 1.1rem; }
.app-icon {
  flex: none;
  width: 5.5rem; height: 5.5rem;
  display: grid; place-items: center;
  border: 1px solid var(--rule); border-radius: 8px;
  background: var(--tint);
  overflow: hidden;
}
.app-icon img { width: 100%; height: 100%; object-fit: contain; }
.app-name { margin: 0; font-size: 1.3rem; font-weight: 600; line-height: 1.35; }
.app-top p { margin: .35rem 0 0; color: var(--muted); font-size: .96rem; }
.badge {
  display: inline-block; margin-top: .6rem;
  border: 1px solid var(--rule); border-radius: 999px;
  padding: .2rem .7rem;
  color: var(--muted); font-size: .8rem;
}

/* The platform list is a real OS-by-state matrix, so each platform gets a row
 * and one hairline separates them. Nothing here is decoration. */
.plats { list-style: none; margin: 1.4rem 0 0; padding: 0; }
.plats > li {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .5rem 1rem;
  padding-block: .85rem;
  border-top: 1px solid var(--rule);
}
.os { flex: none; width: 9rem; font-weight: 500; }
.opts { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-left: auto; }
.note { flex-basis: 100%; margin: 0; color: var(--muted); font-size: .85rem; }

.dl {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; min-width: 2.75rem;
  padding: .55rem 1.25rem; border-radius: 999px;
  background: var(--primary); color: #fff;
  font-family: inherit; font-size: .95rem; font-weight: 500; text-decoration: none;
  transition: background .2s var(--ease);
}
.dl:hover { background: var(--primary-hover); }
.dl.alt { background: #fff; color: var(--primary); border: 1px solid var(--rule); }
.dl.alt:hover { background: var(--tint); }
.off {
  display: inline-flex; align-items: center;
  min-height: 2.75rem;
  color: var(--muted); font-size: .95rem;
}

/* ---------- Closing note + web services ---------- */
.after { padding-block: 2.5rem 1rem; }
.after p { margin: 0; max-width: 62ch; color: var(--muted); }
.web { padding-block: 1.5rem 3.5rem; }
.web h2 { margin: 0 0 .3rem; font-size: 1.05rem; font-weight: 600; }
.web p { margin: 0; color: var(--muted); font-size: .92rem; }
.web ul { list-style: none; margin: .9rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.web a {
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: .5rem 1.1rem;
  border: 1px solid var(--rule); border-radius: 999px;
  color: var(--ink); text-decoration: none; font-size: .95rem;
  transition: background .2s var(--ease);
}
.web a:hover { background: var(--tint); }

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
  .store-head { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; padding-block: 2.5rem 1.75rem; }
  .store-art { justify-self: start; width: 150px; }
  .store-head .lede { max-width: none; }
  .app { padding: 1.25rem; }
  .app-icon { width: 4rem; height: 4rem; }
  .plats > li { align-items: flex-start; }
  .os { width: 100%; }
  .opts { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .dl, .web a { transition: none; }
}
