@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap");

:root {
  --bg-deep: #06060a;
  --bg-mid: #0e0f14;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-raised: rgba(255, 255, 255, 0.07);
  --border: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.16);
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --accent: #a78bfa;
  --accent-glow: rgba(167, 139, 250, 0.35);
  --accent-2: #38bdf8;
  --radius-lg: 20px;
  --radius-md: 14px;
  --font: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    Roboto, sans-serif;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.35);
  --max: 1100px;
}

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

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .app-card,
  .site-header .cta,
  .app-card__arrow {
    transition: none;
  }
  .app-card:hover {
    transform: none;
  }
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg-deep);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Ambient background */
.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(167, 139, 250, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 0%, rgba(56, 189, 248, 0.12), transparent 50%),
    radial-gradient(ellipse 50% 35% at 0% 30%, rgba(167, 139, 250, 0.08), transparent 45%),
    linear-gradient(180deg, var(--bg-mid) 0%, var(--bg-deep) 45%, var(--bg-deep) 100%);
}

.site-header {
  padding: clamp(2.5rem, 8vw, 4.5rem) 1.5rem clamp(2rem, 5vw, 3rem);
  text-align: center;
  position: relative;
}

.site-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: min(420px, 70%);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border-strong), transparent);
}

.site-header__eyebrow {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.site-header h1 {
  margin: 0 0 0.6rem;
  font-size: clamp(2.45rem, 6.5vw, 3.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(135deg, #fff 0%, #e4e4e7 45%, #c4b5fd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.site-header p {
  margin: 0 auto;
  max-width: 28rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.site-header .cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.75rem;
  padding: 0.65rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
}

.site-header .cta:hover {
  border-color: var(--accent);
  background: var(--surface-raised);
  box-shadow: 0 0 28px var(--accent-glow);
  transform: translateY(-1px);
}

.site-header .cta svg {
  width: 1em;
  height: 1em;
  opacity: 0.85;
}

.site-main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1.5rem 1.25rem 4rem;
}

.site-footer {
  padding: 1.35rem 1.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.site-footer a:hover {
  color: var(--accent);
}

/* Legal / prose (privacy) */
.prose {
  max-width: 42rem;
  margin: 0 auto;
  padding-top: 0.5rem;
}

.prose .back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 2rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--accent-2);
  text-decoration: none;
  transition: color 0.2s;
}

.prose .back-link:hover {
  color: var(--accent);
}

.prose h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
}

.prose h2:first-of-type {
  margin-top: 0;
}

.prose h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #d4d4d8;
}

.prose p,
.prose li {
  color: var(--text-muted);
  margin: 0 0 0.85rem;
}

.prose ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.prose li {
  margin-bottom: 0.4rem;
}

.prose a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s;
}

.prose a:hover {
  color: var(--accent);
}

.prose .meta-line {
  font-size: 0.9rem;
  color: var(--text-muted);
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* App catalog (home) */
#status {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
  min-height: 1.5em;
}

#status.error {
  color: #f87171;
}

#status.error a {
  color: #fde68a;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 1.25rem;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.app-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card), 0 0 40px var(--accent-glow);
}

.app-card__icon-wrap {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 1.1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.app-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: #27272a;
}

.app-card h2 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--text);
}

.app-card p {
  margin: 0 0 1.1rem;
  flex: 1;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.app-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0.75rem;
  margin-top: auto;
}

.platform-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.platform-badge--ios {
  border-color: rgba(56, 189, 248, 0.35);
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.08);
}

.platform-badge--mac {
  border-color: rgba(167, 139, 250, 0.4);
  color: #d8b4fe;
  background: rgba(167, 139, 250, 0.1);
}

.app-card__arrow {
  font-size: 1.15rem;
  color: var(--text-muted);
  opacity: 0.6;
  transition: transform 0.2s, opacity 0.2s, color 0.2s;
}

.app-card:hover .app-card__arrow {
  transform: translateX(3px);
  opacity: 1;
  color: var(--accent);
}
