/* App portfolio: the homepage tiles and the /apps/<slug>/ pages. Generated markup from
   scripts/apps.py; colors come from the :root tokens each page already defines. */

/* ── Shared ── */
.app-icon { display: block; border-radius: 22%; flex: 0 0 auto; object-fit: cover; }
.app-icon-letter {
  display: grid; place-items: center;
  background: linear-gradient(135deg, #5B8AF7 0%, #4ECDC4 100%);
  color: white; font-weight: 700; font-size: 1.4em;
}
.app-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 10px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase;
  white-space: nowrap;
  background: rgba(78,205,196,0.10); border: 1px solid rgba(78,205,196,0.30); color: #4ECDC4;
}
.app-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.app-status.beta, .app-status.in-development {
  background: rgba(91,138,247,0.10); border-color: rgba(91,138,247,0.30); color: #5B8AF7;
}
.app-status.paused { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.14); color: #9AA3B5; }

/* ── Homepage tiles ── */
.app-group {
  font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-muted); margin: 0 0 20px;
}
.app-grid + .app-group { margin-top: 56px; }
.app-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.app-tile {
  display: flex; flex-direction: column;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 20px;
  overflow: hidden; transition: border-color 0.15s, transform 0.15s;
}
.app-tile:hover { border-color: rgba(91,138,247,0.5); color: inherit; transform: translateY(-2px); }
.app-preview {
  aspect-ratio: 16 / 10; overflow: hidden; position: relative;
  background: var(--bg-card); border-bottom: 1px solid var(--border);
}
.app-preview.web img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.app-preview.phone {
  display: flex; justify-content: center; gap: 18px; padding: 28px 24px 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(91,138,247,0.18), transparent 70%), var(--bg-card);
}
.app-preview.phone img {
  width: 36%; height: auto; align-self: flex-start;
  border-radius: 18px; border: 1px solid var(--border-strong, rgba(255,255,255,0.14));
  box-shadow: 0 12px 32px rgba(0,0,0,0.35);
}
.app-preview.none {
  display: grid; place-items: center;
  background: radial-gradient(80% 80% at 50% 40%, rgba(78,205,196,0.14), transparent 70%), var(--bg-card);
}
.app-tile-body { padding: 24px 26px 26px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.app-tile-head { display: flex; align-items: center; gap: 14px; }
.app-tile-head > div { flex: 1; min-width: 0; }
.app-tile-head h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; }
.app-category { font-size: 13px; color: var(--text-muted); }
.app-tile-body p { color: var(--text-dim); font-size: 15px; line-height: 1.5; }
.app-chips { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding: 0; }
.app-chips li {
  font-size: 12px; color: var(--text-dim);
  padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border);
}

/* ── App page ── */
.app-hero .back { display: inline-block; font-size: 14px; color: var(--text-muted); margin-bottom: 28px; }
.app-hero .back:hover { color: var(--accent); }
.app-hero-head { display: flex; align-items: center; gap: 24px; }
.app-hero-head h1 { margin-bottom: 8px; }
.app-hero-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 24px; }
.status-note { font-size: 14px; color: var(--text-dim); }
.app-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.product-cta {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px;
  background: var(--accent); color: white; font-weight: 500; font-size: 14px;
  transition: background 0.15s;
}
.product-cta:hover { background: #6E96F8; color: white; }
.product-cta.ghost { background: transparent; border: 1px solid rgba(255,255,255,0.14); color: var(--text); }
.product-cta.ghost:hover { border-color: var(--accent); color: var(--accent); background: rgba(91,138,247,0.12); }

.app-main { padding: 56px 0 80px; border-bottom: 1px solid var(--border); }
.app-columns { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 56px; align-items: start; }
.app-description { font-size: 18px; color: var(--text); line-height: 1.65; margin-bottom: 36px; }
.app-main h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; letter-spacing: -0.015em; margin-bottom: 14px; }
.feature-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.feature-list li {
  position: relative; padding: 14px 18px 14px 40px;
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
  color: var(--text-dim); font-size: 15px;
}
.feature-list li::before {
  content: ""; position: absolute; left: 18px; top: 22px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.facts {
  padding: 8px 24px; background: var(--bg-elev);
  border: 1px solid var(--border); border-radius: 16px;
}
.fact { padding: 14px 0; border-bottom: 1px solid var(--border); }
.fact:last-child { border-bottom: none; }
.fact dt { font-size: 11px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; }
.fact dt:empty { display: none; }
.fact dd { font-size: 15px; color: var(--text); }
.fact dd a { color: var(--accent); }

.gallery { margin-top: 64px; display: grid; gap: 24px; }
.gallery.phone { grid-template-columns: repeat(3, minmax(0, 280px)); justify-content: center; }
.gallery.phone img { border-radius: 28px; }
.gallery.web img { border-radius: 14px; }
.gallery img { width: 100%; height: auto; display: block; border: 1px solid var(--border); background: var(--bg-card); }
.gallery + .gallery { margin-top: 24px; }
.gallery-empty { margin-top: 64px; color: var(--text-muted); font-size: 14px; }
.disclaimer {
  margin-top: 48px; padding: 18px 22px; font-size: 13px; color: var(--text-muted); line-height: 1.6;
  border: 1px solid var(--border); border-radius: 12px;
}

@media (max-width: 800px) {
  .app-grid { grid-template-columns: 1fr; }
  .app-tile-body { padding: 20px; }
  .app-hero-head { gap: 16px; }
  .app-hero-head .hero-icon { width: 72px; height: 72px; }
  .app-columns { grid-template-columns: 1fr; gap: 32px; }
  .gallery.phone { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .gallery.phone img { border-radius: 16px; }
}
