/* ============================================
   FOURYR — Apps / Portfolio Page
   ============================================ */

/* ── Section ───────────────────────────────── */
.apps-section {
  padding: var(--space-16);
}

/* ── Grid ──────────────────────────────────── */
.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-6);
}

/* ── Loading / Empty ───────────────────────── */
.apps-loading,
.apps-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 0 var(--space-3) 0;
  color: var(--gray-400);
  font-size: 1rem;
}

/* ── Card ──────────────────────────────────── */
.app-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.app-card:hover {
  border-color: var(--blue);
  box-shadow: 0 8px 32px rgba(37, 99, 235, 0.08);
  transform: translateY(-2px);
}

/* ── Card image ────────────────────────────── */
.app-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--gray-100);
  display: block;
}

.app-card__image-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-card__image-placeholder svg {
  width: 40px;
  height: 40px;
  color: var(--blue);
  opacity: 0.4;
}

/* ── Card body ─────────────────────────────── */
.app-card__body {
  padding: var(--space-5);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.app-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-3);
}

.app-card__name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 0;
  line-height: 1.3;
}

/* ── Status badge ──────────────────────────── */
.app-status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}

.app-status--live {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
}

.app-status--in_development {
  background: rgba(245, 158, 11, 0.1);
  color: #b45309;
}

.app-status--coming_soon {
  background: rgba(124, 58, 237, 0.1);
  color: #6d28d9;
}

/* ── Card description ──────────────────────── */
.app-card__desc {
  color: var(--gray-500);
  font-size: 0.875rem;
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

/* ── Card footer ───────────────────────────── */
.app-card__footer {
  padding-top: var(--space-3);
  border-top: 1px solid var(--gray-100);
  display: flex;
  gap: var(--space-3);
  align-items: center;
}

.app-card__link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.2s;
}

.app-card__link svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.app-card__link:hover { gap: 10px; }

/* ── CTA Band (reuse from services) ─────────── */
.cta-band {
  background: var(--gray-900);
  padding: var(--space-16) 0;
}

.cta-band__inner {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
}

.cta-band__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  color: var(--blue);
  margin: 0 0 var(--space-4);
}

.cta-band__sub {
  color: var(--gray-900);
  font-size: 1.05rem;
  line-height: 1.65;
  margin: 0 0 var(--space-8);
}

/* ── Card — clickable cursor ───────────────── */
.app-card {
  cursor: pointer;
}

/* ── Responsive ────────────────────────────── */
@media (max-width: 768px) {
  .apps-grid {
    grid-template-columns: 1fr;
  }
}


/* ════════════════════════════════════════════
   APP DETAIL MODAL
   ════════════════════════════════════════════ */

.app-detail-overlay {
  position: fixed;
  inset: 0;
  background: rgba(10, 15, 30, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 900;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 40px 16px;
}

.app-detail-modal {
  background: #fff;
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  overflow: hidden;
  box-shadow: 0 32px 80px rgba(0,0,0,0.25);
  animation: appModalIn 0.22s cubic-bezier(0.34, 1.56, 0.64, 1) both;
  position: relative;
  margin: auto 0;
}

@keyframes appModalIn {
  from { opacity: 0; transform: scale(0.94) translateY(12px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.app-detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--gray-700);
  transition: background 0.15s;
}

.app-detail-close:hover { background: #fff; color: var(--ink); }

/* ── Banner ─────────────────────────────────── */
.app-detail-banner {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
  position: relative;
}

.app-detail-banner__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.app-detail-banner--blurred .app-detail-banner__img {
  filter: blur(18px) brightness(0.9);
  transform: scale(1.15);
}

/* ── Body ──────────────────────────────────── */
.app-detail-body {
  padding: var(--space-6);
}

.app-detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
  margin-top: calc(-1 * var(--space-8));
}

.app-detail-icon {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  border: 3px solid #fff;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--gray-100);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.app-detail-icon--placeholder {
  background: linear-gradient(135deg, #eff6ff, #e0e7ff);
  display: flex;
  align-items: center;
  justify-content: center;
}

.app-detail-meta {
  padding-top: var(--space-6);
  flex: 1;
  min-width: 0;
}

.app-detail-name {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 6px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.app-detail-status {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
}

.app-detail-short {
  font-size: 0.975rem;
  color: var(--gray-600);
  font-weight: 500;
  margin: 0 0 var(--space-4);
  line-height: 1.55;
}

.app-detail-desc {
  font-size: 0.9rem;
  color: var(--gray-500);
  line-height: 1.7;
  margin-bottom: var(--space-6);
}

.app-detail-footer {
  padding-top: var(--space-4);
  border-top: 1px solid var(--gray-100);
}

.app-detail-get-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}

@media (max-width: 480px) {
  .app-detail-overlay { padding: 0; align-items: flex-end; }
  .app-detail-modal { border-radius: 20px 20px 0 0; max-width: 100%; }
}
