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

:root {
  --bg: #0e0818;
  --ink: #f0eeff;
  --ink-muted: rgba(240, 238, 255, 0.52);
  --ink-faint: rgba(240, 238, 255, 0.28);
  --purple: #a060ff;
  --purple-mid: #7c3aed;
  --border: rgba(255, 255, 255, 0.09);
  --border-hover: rgba(160, 100, 255, 0.35);
  --max: 860px;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  min-height: 100vh;
  line-height: 1.5;
  position: relative;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ---------- Background effects ---------- */

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 15% 0%, rgba(100, 40, 200, 0.35), transparent),
    radial-gradient(ellipse 55% 40% at 85% 5%, rgba(80, 20, 160, 0.25), transparent),
    radial-gradient(ellipse 50% 60% at 50% 90%, rgba(60, 10, 120, 0.15), transparent);
}

.grid-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 65%);
}

/* ---------- Navigation ---------- */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 84px;
  padding: 0 clamp(18px, 3vw, 38px);
  border-bottom: 1px solid rgba(247, 247, 244, 0.18);
  background: rgba(12, 13, 12, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-brand img {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  object-fit: cover;
}

.nav-brand span {
  font-family: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  font-size: clamp(1rem, 1.5vw, 1.38rem);
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: #ffffff;
}

.nav-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.15);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-tag {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.38);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ---------- Main ---------- */

main {
  position: relative;
  z-index: 1;
}

/* ---------- Hero ---------- */

.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: 80px 32px 56px;
  text-align: center;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(160, 100, 255, 0.35);
  background: rgba(120, 60, 220, 0.15);
  color: #c09aff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 28px;
}

.hero-pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #a060ff;
  flex-shrink: 0;
}

.hero h1 {
  font-size: clamp(34px, 5.5vw, 60px);
  font-weight: 900;
  line-height: 1.0;
  letter-spacing: -0.035em;
  margin-bottom: 18px;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #b080ff, #7c3aed, #9f5fff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 16px;
  color: var(--ink-muted);
  line-height: 1.65;
  max-width: 420px;
  margin: 0 auto;
}

/* ---------- App cards ---------- */

.apps-grid {
  max-width: var(--max);
  margin: 0 auto;
  padding: 8px 32px 80px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.app-card {
  display: flex;
  flex-direction: column;
  border-radius: 22px;
  border: 1px solid var(--border);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0.025) 100%);
  padding: 24px 22px 20px;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease, box-shadow 220ms ease;
  position: relative;
  overflow: hidden;
}

.app-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(180, 120, 255, 0.4), transparent);
  opacity: 0;
  transition: opacity 220ms ease;
}

.app-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  background: linear-gradient(150deg, rgba(120, 60, 220, 0.18) 0%, rgba(80, 20, 160, 0.08) 100%);
  box-shadow: 0 20px 60px rgba(80, 20, 180, 0.25);
}

.app-card:hover::after {
  opacity: 1;
}

.app-icon {
  width: 68px;
  height: 68px;
  border-radius: 18px;
  margin: 0 auto 16px;
  display: block;
  border: 1px solid rgba(255, 255, 255, 0.1);
  object-fit: cover;
}

.app-platform {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11px;
  font-weight: 600;
  color: rgba(240, 238, 255, 0.4);
  margin-bottom: 12px;
}

.app-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  color: var(--ink);
}

.app-desc {
  font-size: 13px;
  color: rgba(240, 238, 255, 0.48);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 20px;
}

.app-link {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 700;
  color: var(--purple);
  transition: gap 180ms ease;
}

.app-link svg {
  flex-shrink: 0;
  transition: transform 180ms ease;
}

.app-card:hover .app-link {
  gap: 8px;
}

.app-card:hover .app-link svg {
  transform: translateX(2px);
}

/* ---------- Footer ---------- */

footer {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 28px 32px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-faint);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-logo-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #3b0f8c, #6d28d9);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: -0.05em;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */

@media (max-width: 640px) {
  nav {
    padding: 14px 20px;
  }

  .nav-wordmark {
    font-size: 13px;
  }

  .hero {
    padding: 52px 20px 40px;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    padding: 8px 20px 60px;
  }

  footer {
    padding: 24px 20px 40px;
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }
}

@media (max-width: 430px) {
  .nav-brand {
    gap: 8px;
    font-size: 0.92rem;
    letter-spacing: 0.16em;
  }
}

/* ---------- Accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  .app-card,
  .app-card::after,
  .app-link,
  .app-link svg {
    transition: none;
  }
}

/* ---------- Scroll reveal (driven by main.js) ---------- */

.app-card.hidden {
  opacity: 0;
  transform: translateY(20px);
}

.app-card.visible {
  opacity: 1;
  transform: translateY(0);
}
