/* ============================================================
   AllenApps — Global Stylesheet
   Clean, minimal, mobile-responsive, dark-mode compatible
   ============================================================ */

:root {
  --bg: #ffffff;
  --bg-card: #f5f5f7;
  --text: #1d1d1f;
  --text-secondary: #6e6e73;
  --accent: #0071e3;
  --accent-hover: #0077ed;
  --border: #d2d2d7;
  --radius: 14px;
  --max-width: 860px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-card: #1c1c1e;
    --text: #f5f5f7;
    --text-secondary: #98989d;
    --accent: #2997ff;
    --accent-hover: #47a8ff;
    --border: #38383a;
  }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Helvetica, Arial, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header ─────────────────────────────────────────────── */

header {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--border);
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

header .tagline {
  color: var(--text-secondary);
  margin-top: 6px;
  font-size: 1rem;
}

/* ── Main ───────────────────────────────────────────────── */

main {
  flex: 1;
  padding: 48px 0 64px;
}

/* ── App Cards ──────────────────────────────────────────── */

.apps {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.app-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.app-icon {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
}

.app-icon img {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  display: block;
  object-fit: cover;
}

/* Shown when icon image is missing */
.app-icon-placeholder {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 1.25rem;
  font-weight: 600;
  align-items: center;
  justify-content: center;
}

.app-info h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.app-info p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 16px;
  max-width: 560px;
}

.app-store-badge img {
  height: 40px;
  width: auto;
  display: block;
}

@media (max-width: 480px) {
  .app-card {
    flex-direction: column;
    gap: 16px;
  }
}

/* ── Legal pages ────────────────────────────────────────── */

.legal-header {
  padding: 56px 0 32px;
  border-bottom: 1px solid var(--border);
}

.legal-header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.legal-header .updated {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin-top: 8px;
}

.legal-header .back {
  display: inline-block;
  color: var(--accent);
  text-decoration: none;
  font-size: 0.9375rem;
  margin-bottom: 20px;
}

.legal-header .back:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.legal-content {
  padding: 40px 0 64px;
}

.legal-content section {
  margin-bottom: 40px;
}

.legal-content h2 {
  font-size: 1.1875rem;
  font-weight: 600;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.legal-content p {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 12px;
}

.legal-content p:last-child {
  margin-bottom: 0;
}

.legal-content ul {
  color: var(--text-secondary);
  font-size: 0.9375rem;
  padding-left: 20px;
  margin-bottom: 12px;
}

.legal-content ul li {
  margin-bottom: 6px;
}

.legal-content a {
  color: var(--accent);
  text-decoration: none;
}

.legal-content a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ── Footer ─────────────────────────────────────────────── */

footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 16px;
}

.footer-nav a {
  color: var(--accent);
  text-decoration: none;
  font-size: 0.875rem;
}

.footer-nav a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.8125rem;
}
