/* ============================================================
   Apps hub (/apps/) — page-specific styles only.
   Loaded after css/base.css + css/themes/bacuri.css. No brand colour
   belongs here except the per-app `--app-accent` custom property set
   inline on each card from window.APPS_REGISTRY.
   ============================================================ */

/* ============ Hero ============ */
.apps-hero {
  text-align: center;
  padding-block: clamp(3.5rem, 3rem + 4vw, 6rem) clamp(1.5rem, 1rem + 2vw, 3rem);
}
.apps-hero .eyebrow { margin-inline: auto; }
.apps-hero h1 {
  font-size: var(--text-hero);
  font-weight: 800;
  max-width: 40rem;
  margin-inline: auto;
  margin-bottom: 0.5em;
}
.apps-hero .hero-sub { margin-inline: auto; }

/* ============ Grid ============ */
.apps-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.app-card-item { display: flex; }

.app-card {
  --app-accent: var(--color-accent);
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  width: 100%;
  padding: 1.6rem 1.5rem;
  background: var(--color-surface);
  border: 1px solid var(--stroke);
  border-top: 4px solid var(--app-accent);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  color: inherit;
  transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease;
}
.app-card:hover,
.app-card:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.05), 0 20px 44px rgba(15, 23, 42, 0.11);
}
/* Focus ring uses the site ink token rather than --app-accent: some app
   accents (e.g. Bacuri mint on white, ~2.5:1) are not reliable enough
   against a white card to guarantee a visible indicator. */
.app-card:focus-visible {
  outline: 2px solid var(--color-ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .app-card { transition: none; }
  .app-card:hover,
  .app-card:focus-visible { transform: none; }
}

.app-card-logo-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--color-surface-alt);
  background: color-mix(in srgb, var(--app-accent) 16%, white);
}
.app-card-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.app-card--no-logo .app-card-logo-wrap { display: none; }

.app-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.app-card-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.app-card-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text);
}
.app-card-tagline {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.94rem;
}

/* Status pill — base.css styles .app-status-pill for the dark footer
   cross-promo; these overrides adapt it for the light card background
   used on this page. Colours picked and contrast-checked against their
   own background, not against --app-accent (see report). */
.apps-grid .app-status-pill {
  background: var(--color-surface-alt);
  border: 1px solid var(--stroke);
  color: var(--color-text-muted);
}
.apps-grid .app-status-pill--live {
  background: rgba(46, 160, 100, 0.12);
  border-color: rgba(46, 160, 100, 0.28);
  color: #1c7a4d; /* ~4.7:1 on the blended background above, passes AA */
}

.apps-grid-empty,
.apps-grid-noscript {
  text-align: center;
  color: var(--color-text-muted);
}

/* ============ Nav current-page indicator ============ */
.nav-links a[aria-current="page"] {
  color: var(--color-text);
  font-weight: 700;
}

@media (max-width: 720px) {
  .apps-grid { grid-template-columns: 1fr; }
}
