/* ============================================================
   APPS — Editorial list layout
   Icon-forward. No cards. No noise.
   ============================================================ */

/* ── GRID CONTAINER ──────────────────────────────────────── */

.apps-showcase-grid {
  max-width: 860px;
  margin: 0 auto;
  padding: 0 2rem 4rem;
}

/* ── EACH APP ROW ────────────────────────────────────────── */

.app-showcase-item {
  display: grid;
  grid-template-columns: 88px 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 1.75rem;
  align-items: center;
  padding: 2rem 1rem;
  border-top: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
  position: relative;
  transition: background 200ms ease, padding-left 200ms ease;
}

.app-showcase-item:last-child {
  border-bottom: 1px solid var(--border);
}

.app-showcase-item:hover {
  background: rgba(232, 80, 2, 0.03);
  padding-left: 1.5rem;
}

/* ── ICON ────────────────────────────────────────────────── */

.app-showcase-icon {
  grid-row: 1 / 3;
  width: 88px;
  height: 88px;
  border-radius: 20px;
  overflow: hidden;
  flex-shrink: 0;
  transition: transform 300ms cubic-bezier(0.25, 1, 0.5, 1);
}

.app-showcase-item:hover .app-showcase-icon {
  transform: scale(1.06);
}

.app-showcase-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── NAME + PLATFORM ROW ─────────────────────────────────── */

.app-showcase-name {
  grid-column: 2;
  font-family: var(--font-display, 'Inter', sans-serif);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--fg);
  line-height: 1.2;
  align-self: end;
}

.app-showcase-platform {
  display: inline-block;
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-text);
  font-weight: 500;
  margin-left: 0.75rem;
  vertical-align: middle;
  opacity: 0.8;
}

/* ── DESCRIPTION ─────────────────────────────────────────── */

.app-showcase-description {
  grid-column: 2;
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0.3rem 0 0;
  align-self: start;
}

/* ── ARROW ───────────────────────────────────────────────── */

.app-showcase-arrow {
  grid-column: 3;
  grid-row: 1 / 3;
  font-size: 1.1rem;
  color: var(--muted);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 220ms ease, transform 220ms ease, color 220ms ease;
}

.app-showcase-item:hover .app-showcase-arrow {
  opacity: 1;
  transform: translateX(0);
  color: var(--accent-text);
}

/* ── LIGHT MODE ──────────────────────────────────────────── */

body.light-mode .app-showcase-item:hover {
  background: rgba(232, 80, 2, 0.025);
}

/* ── RESPONSIVE ──────────────────────────────────────────── */

@media (max-width: 640px) {
  .apps-showcase-grid {
    padding: 0 1rem 3rem;
  }

  .app-showcase-item {
    grid-template-columns: 72px 1fr;
    grid-template-rows: auto auto;
    padding: 1.5rem 0.5rem;
    column-gap: 1.25rem;
  }

  .app-showcase-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
  }

  .app-showcase-arrow {
    display: none;
  }

  .app-showcase-name {
    font-size: 1.1rem;
  }
}

/* ── REDUCED MOTION ──────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .app-showcase-item,
  .app-showcase-icon {
    transition: none !important;
  }
}

/* ── Coming soon / in-development placeholder ───────────────────
   An app still being built — shown as an "incognito" card: a "?"
   placeholder icon, dimmed, no hover/link affordance. */
.app-showcase-item--soon {
  cursor: default;
  opacity: 0.55;
}
.app-showcase-item--soon:hover {
  background: transparent;
  padding-left: 1rem;
}
.app-showcase-item--soon:hover .app-showcase-icon {
  transform: none;
}
.app-showcase-icon--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px dashed var(--border);
  color: var(--muted);
  font-family: var(--font-mono, 'IBM Plex Mono', monospace);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.app-showcase-item--soon .app-showcase-platform {
  color: var(--muted);
  opacity: 1;
}

/* First app sits right under the page-hero — drop its redundant top border
   (the hero already has a bottom border) and tighten the top padding so it
   doesn't read as an extra gap above the first app. */
.app-showcase-item:first-child {
  border-top: none;
  padding-top: 1rem;
}

/* ══════════════════════════════════════════════════════════════
   APPS CATALOGUE — featured / collection / process
   A personal software archive, not an app store: real icons keep
   their own colours, and apps without artwork get a typographic
   placeholder rather than a fake screenshot.
   ══════════════════════════════════════════════════════════════ */
.apps-catalogue {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-8, 48px) var(--space-6, 24px) var(--space-10, 80px);
}

.apps-block { padding: var(--space-8, 48px) 0; border-top: 1px solid var(--border); }

.apps-block-label {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-text);
  font-weight: 500;
  margin: 0 0 var(--space-7, 32px);
}

.apps-featured {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr));
  gap: var(--space-6, 24px);
}

.apps-collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: var(--space-5, 20px);
  /* Per-card borders, not a background showing through 1px gaps:
     an incomplete last row would otherwise leave coloured empty cells. */
}

.app-card {
  display: flex;
  gap: var(--space-5, 20px);
  padding: var(--space-6, 24px);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 4px);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur-base, 240ms) var(--ease-quart);
}

.app-card--featured {
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md, 4px);
  padding: var(--space-7, 32px);
}

a.app-card:hover,
a.app-card:focus-visible { background: var(--surface); }
a.app-card--featured:hover,
a.app-card--featured:focus-visible { border-color: var(--accent); }

.app-card-icon {
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  border-radius: 13px;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.app-card--featured .app-card-icon { width: 72px; height: 72px; border-radius: 17px; }
.app-card-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* No artwork yet → initial in the brand mono, never a fake screenshot */
.app-card-icon--placeholder {
  border: 1px solid var(--border);
  background: transparent;
}

.app-icon-letter {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--accent-text);
  line-height: 1;
}

.app-card--featured .app-icon-letter { font-size: 2rem; }

.app-card-name {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  flex-wrap: wrap;
}

.app-card--featured .app-card-name { font-size: clamp(1.5rem, 2.4vw, 2rem); }

.app-status {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-weight: 500;
}

.app-status--active   { color: #00C864; }
.app-status--shipped  { color: var(--accent-text); }
.app-status--paused   { color: #9A9AA5; }
.app-status--archived { color: #9A9AA5; opacity: 0.8; }

.app-card-meta {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: var(--space-3, 12px) 0 0;
}

.app-card-desc {
  margin: var(--space-4, 16px) 0 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--muted);
  max-width: 52ch;
}

.app-card--featured .app-card-desc { font-size: 1rem; color: var(--fg); }
.app-card-desc--pending { font-style: italic; }

.app-card-link {
  display: inline-block;
  margin-top: var(--space-4, 16px);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.app-card--featured .app-card-text { margin-top: var(--space-5, 20px); }

.apps-more {
  margin: var(--space-6, 24px) 0 0;
  font-size: 0.88rem;
  line-height: 1.6;
  color: var(--muted);
  max-width: 64ch;
}

.apps-process { border-bottom: 1px solid var(--border); }

.apps-process-body {
  margin: 0;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  line-height: 1.55;
  max-width: 48ch;
  color: var(--fg);
}

@media (max-width: 768px) {
  .apps-block { padding: var(--space-7, 32px) 0; }
  .app-card--featured { padding: var(--space-6, 24px); }
}

/* Light theme: status colours that pass AA on white */
:root:not([data-theme="dark"]) .app-status--active { color: #0B7A4B; }
:root:not([data-theme="dark"]) .app-status--paused,
:root:not([data-theme="dark"]) .app-status--archived { color: #646464; }
