/* The apps page (/apps/): every way to use Atelier, as tiles. Uses the site's tokens (styles.css); nothing here is shared. */

.apps-page { padding-block: clamp(48px, 7vw, 96px) clamp(64px, 9vw, 112px); }
.apps-page .nav a[aria-current="page"] { color: var(--ink); }

.apps-intro { max-width: 44rem; }
.apps-intro h1 { font-size: clamp(2.25rem, 5.2vw, 3.5rem); line-height: 1.06; }
.apps-intro .lead { margin-top: 20px; }

.apps-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: clamp(36px, 5vw, 56px); }

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: clamp(24px, 3vw, 32px);
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: border-color 200ms var(--ease);
}
.app:hover { border-color: var(--line-strong); }
.app > * { position: relative; }

.app-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; }
.app-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line-soft); color: var(--ink-2); }
.app-icon .icon { width: 20px; height: 20px; }

.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 4px 9px; border-radius: 999px; border: 1px solid var(--line); font-size: 0.8125rem; line-height: 1.3; color: var(--ink-2); white-space: nowrap; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); }
.status-live::before { background: #2f9e62; }
.status-soon::before { background: var(--clay-soft); }

.app h2 { font: 500 clamp(1.5rem, 2.4vw, 1.875rem)/1.15 var(--serif); letter-spacing: -0.015em; }
.app p { margin: 12px 0 0; color: var(--ink-2); font-size: 1rem; line-height: 1.6; text-wrap: pretty; max-width: 36rem; }
.app .app-meta { margin-top: 16px; font-size: 0.875rem; color: var(--ink-3); }

.app-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: auto; padding-top: 24px; }
.app-link { display: inline-flex; align-items: center; gap: 6px; color: var(--ink); text-decoration-color: var(--line-strong); font-size: 0.9375rem; }
.app-link .icon { width: 15px; height: 15px; }
.app-link:hover { text-decoration-color: var(--ink); }

.app-command { display: block; margin-top: 20px; padding: 12px 14px; border-radius: 10px; background: var(--sunken); border: 1px solid var(--line-soft); font: 400 0.8125rem/1.5 var(--mono); color: var(--ink); overflow-x: auto; white-space: nowrap; user-select: all; }
.app-command + .app-command { margin-top: 8px; }
.app-command small { display: block; margin-bottom: 2px; font: 400 0.75rem/1.4 var(--sans); color: var(--ink-3); user-select: none; }

/* A screenshot rests at the bottom of its tile and runs off the edge. */
.app-shot { margin: 28px calc(-1 * clamp(24px, 3vw, 32px)) calc(-1 * clamp(24px, 3vw, 32px)); }
.app-shot picture, .app-shot img { display: block; width: 100%; height: auto; }
.app-desktop .app-shot { margin-top: 32px; }
.app-desktop .app-shot img { border-radius: 12px 12px 0 0; box-shadow: 0 0 0 1px var(--line), var(--shadow-window); width: calc(100% - 2 * clamp(24px, 3vw, 32px)); margin-inline: auto; }
.app-phone .app-shot { display: flex; justify-content: center; margin-top: 28px; }
.app-phone .app-shot picture { width: min(260px, 70%); }
.app-phone .app-shot img { border-radius: 34px 34px 0 0; box-shadow: 0 0 0 1px var(--line-strong), var(--shadow-window); }

.apps-fit { margin-top: clamp(56px, 8vw, 96px); padding-top: clamp(32px, 5vw, 48px); border-top: 1px solid var(--line-soft); display: grid; gap: 28px; }
.apps-fit h2 { font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.15; }
.fit-cols { display: grid; gap: 24px; }
.fit-cols h3 { font: 600 1rem/1.4 var(--sans); }
.fit-cols p { margin: 6px 0 0; color: var(--ink-2); font-size: 0.9688rem; line-height: 1.6; text-wrap: pretty; }
.apps-cta { display: flex; flex-wrap: wrap; gap: 12px; }

@media (min-width: 900px) {
  .apps-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 18px; }
  .app-desktop { grid-column: span 8; }
  .app-phone { grid-column: span 4; }
  .app-half { grid-column: span 6; }
  .fit-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; }
}

/* On a narrow screen only the top of the phone shows, running off the tile's edge. */
@media (max-width: 899px) { .app-phone .app-shot picture { max-height: 380px; overflow: hidden; border-radius: 34px 34px 0 0; } }

@media (prefers-reduced-motion: reduce) { .app { transition: none; } }
