/* Per-app page styles — layered on top of styles.css */

.app-page main { padding-bottom: 80px; }

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 10px;
  margin-bottom: 18px;
  min-height: 40px;
  transition: background 160ms ease, color 160ms ease;
}
.back-link:hover {
  background: var(--surface-muted);
  color: var(--text);
}

/* ---------- App hero ---------- */
.app-hero {
  padding: 56px 0 48px;
  position: relative;
  isolation: isolate;
}
.app-hero::before {
  content: "";
  position: absolute;
  inset: -120px 0 auto 0;
  height: 420px;
  background:
    radial-gradient(620px 260px at 18% 28%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
    radial-gradient(480px 220px at 86% 18%, color-mix(in srgb, var(--brand-cta) 16%, transparent), transparent 72%);
  z-index: -1;
  pointer-events: none;
}
.app-hero-grid {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  align-items: center;
}
.app-hero-icon {
  width: 120px;
  height: 120px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--text) 6%, transparent),
    0 20px 40px rgba(42, 34, 31, 0.12),
    0 6px 12px rgba(42, 34, 31, 0.06);
}
.app-hero-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-hero-text .pill { margin-bottom: 10px; }
.app-hero-text h1 {
  font-size: clamp(32px, 4.8vw, 54px);
  letter-spacing: -0.025em;
  line-height: 1.05;
  margin: 2px 0 10px;
  font-weight: 700;
}
.app-hero-text .alias {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.55em;
  margin-left: 6px;
  letter-spacing: -0.005em;
}
.app-hero-tagline {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--text-muted);
  margin: 0 0 16px;
  max-width: 60ch;
  line-height: 1.5;
}
.app-hero-desc {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.65;
  margin: 0 0 24px;
  max-width: 60ch;
}
.app-hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

/* ---------- Features ---------- */
.app-features { padding: 32px 0; }
.app-features h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  margin: 0 0 24px;
  font-weight: 700;
}
.feature-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.feature-grid li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.feature-grid li::before {
  content: "";
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 2px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 20%, transparent) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center/11px 11px no-repeat;
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--accent) 55%, transparent);
}
.feature-grid li span {
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}

/* ---------- FAQ ---------- */
.app-faq { padding: 32px 0; }
.app-faq h2 {
  font-size: clamp(24px, 2.6vw, 32px);
  letter-spacing: -0.02em;
  margin: 0 0 20px;
  font-weight: 700;
}
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 760px;
}
.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.faq-item:hover {
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  box-shadow: var(--shadow-sm);
}
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-weight: 600;
  font-size: 15.5px;
  color: var(--text);
  min-height: 56px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
  flex-shrink: 0;
  transition: transform 220ms ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p {
  margin: 0;
  padding: 0 20px 18px;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 15px;
}

/* ---------- Policy links ---------- */
.app-policies { padding: 28px 0 12px; }
.app-policies h2 {
  font-size: clamp(22px, 2.2vw, 28px);
  letter-spacing: -0.02em;
  margin: 0 0 16px;
  font-weight: 700;
}
.policy-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.policy-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 18px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
  font-size: 14.5px;
  transition: background 160ms ease, border-color 160ms ease;
}
.policy-links a:hover {
  background: var(--surface-muted);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

/* Mobile */
@media (max-width: 640px) {
  .app-hero { padding: 40px 0 32px; }
  .app-hero-grid { grid-template-columns: 1fr; gap: 18px; }
  .app-hero-icon { width: 96px; height: 96px; border-radius: 22px; }
  .feature-grid { grid-template-columns: 1fr; }
  .faq-item summary { font-size: 15px; padding: 14px 16px; }
  .faq-item p { padding: 0 16px 16px; }
}
