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

html { scroll-behavior: smooth; }

/* === BASE === */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: #030014;
  color: #f1f5f9;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === COSMIC NEBULA BACKGROUND === */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 15% 40%, rgba(109, 40, 217, 0.20) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 15%, rgba(8, 145, 178, 0.13) 0%, transparent 50%),
    radial-gradient(ellipse at 60% 88%, rgba(88, 28, 135, 0.16) 0%, transparent 45%),
    radial-gradient(ellipse at 38% 8%,  rgba(139, 92, 246, 0.09) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
  animation: nebula-breathe 12s ease-in-out infinite alternate;
}

@keyframes nebula-breathe {
  0%   { opacity: 0.7; }
  100% { opacity: 1; }
}

/* === CANVAS STARFIELD === */
#starfield {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* === LAYOUT === */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

/* === NAVBAR === */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.25rem 0;
  background: rgba(3, 0, 20, 0.55);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid rgba(139, 92, 246, 0.12);
  transition: background 0.35s ease;
}

.navbar.scrolled {
  background: rgba(3, 0, 20, 0.88);
}

.navbar .logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.logo-icon {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  filter: drop-shadow(0 0 6px rgba(167, 139, 250, 0.5));
  transition: filter 0.3s ease;
}

.logo-icon:hover,
.navbar .logo:hover .logo-icon {
  filter: drop-shadow(0 0 10px rgba(167, 139, 250, 0.8)) drop-shadow(0 0 20px rgba(103, 232, 249, 0.3));
}

.navbar .logo h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #c4b5fd 0%, #22d3ee 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === HERO === */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 9rem 0 6rem;
  position: relative;
  z-index: 1;
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.10) 0%, transparent 70%);
  pointer-events: none;
  animation: pulse-glow 5s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  0%   { opacity: 0.5; transform: translate(-50%, -50%) scale(0.92); }
  100% { opacity: 1;   transform: translate(-50%, -50%) scale(1.08); }
}

.hero-content {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.30);
  border-radius: 100px;
  padding: 0.4rem 1.1rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #a78bfa;
  margin-bottom: 2rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero-badge .dot {
  width: 6px; height: 6px;
  background: #a78bfa;
  border-radius: 50%;
  box-shadow: 0 0 6px #a78bfa;
  animation: blink 2.2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.15; }
}

.hero-content h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.4rem, 5.5vw, 4.75rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 1.5rem;
  background: linear-gradient(160deg, #ffffff 25%, #c4b5fd 60%, #22d3ee 95%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-content p {
  font-size: 1.08rem;
  color: #94a3b8;
  max-width: 540px;
  margin: 0 auto 2.75rem;
  line-height: 1.78;
}

/* === BUTTONS === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.85rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.22s ease;
  cursor: pointer;
  border: none;
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
  color: #fff;
  box-shadow:
    0 0 24px rgba(124, 58, 237, 0.42),
    0 4px 14px rgba(0, 0, 0, 0.36);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #8b5cf6 0%, #6366f1 100%);
  box-shadow:
    0 0 44px rgba(139, 92, 246, 0.58),
    0 8px 28px rgba(0, 0, 0, 0.46);
  transform: translateY(-3px);
}

.btn-secondary {
  background: rgba(139, 92, 246, 0.08);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.btn-secondary:hover {
  background: rgba(139, 92, 246, 0.16);
  border-color: rgba(139, 92, 246, 0.62);
  box-shadow: 0 0 26px rgba(139, 92, 246, 0.22);
  transform: translateY(-3px);
  color: #c4b5fd;
}

.btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* === APPS SECTION === */
.apps-section {
  padding: 8rem 0 10rem;
  position: relative;
  z-index: 1;
}

.apps-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(139, 92, 246, 0.20) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 12%, black 88%, transparent 100%);
  opacity: 0.20;
  pointer-events: none;
}

.apps-section h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.03em;
  margin-bottom: 0.65rem;
  background: linear-gradient(135deg, #ffffff 30%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  text-align: center;
  color: #64748b;
  font-size: 0.96rem;
  margin-bottom: 4rem;
  letter-spacing: 0.01em;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* === APP CARDS === */
.app-card {
  background: rgba(14, 8, 40, 0.62);
  border: 1px solid rgba(139, 92, 246, 0.16);
  border-radius: 22px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: transform 0.30s ease, box-shadow 0.30s ease, border-color 0.30s ease;
  position: relative;
  overflow: hidden;
}

/* top shimmer line */
.app-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(139, 92, 246, 0.55) 50%, transparent 100%);
}

/* ambient card glow */
.app-card::after {
  content: '';
  position: absolute;
  top: -80px; left: -80px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.09), transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.app-card:hover {
  transform: translateY(-8px);
  border-color: rgba(139, 92, 246, 0.48);
  box-shadow:
    0 0 55px rgba(139, 92, 246, 0.15),
    0 28px 70px rgba(0, 0, 0, 0.52),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

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

/* coming soon */
.app-card.coming-soon {
  border-style: dashed;
  border-color: rgba(100, 116, 139, 0.22);
  background: rgba(8, 4, 25, 0.44);
}

.app-card.coming-soon::before { display: none; }

.app-card.coming-soon:hover {
  border-color: rgba(100, 116, 139, 0.40);
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.38);
  transform: translateY(-4px);
}

/* === APP ICON === */
.app-icon {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.20);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.30s ease;
}

.app-card:hover .app-icon {
  box-shadow: 0 0 22px rgba(139, 92, 246, 0.28);
}

.logo-img {
  width: 44px; height: 44px;
  object-fit: contain;
}

.icon { font-size: 1.8rem; }

/* === CARD TEXT === */
.app-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: #e2e8f0;
  letter-spacing: -0.015em;
}

.app-description {
  color: #7f8ea3;
  font-size: 0.875rem;
  line-height: 1.72;
  flex: 1;
}

/* === TAGS === */
.app-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.22rem 0.72rem;
  border-radius: 100px;
  font-size: 0.70rem;
  font-weight: 500;
  background: rgba(139, 92, 246, 0.10);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.22);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* === FOOTER === */
.footer {
  padding: 3rem 0;
  border-top: 1px solid rgba(139, 92, 246, 0.10);
  text-align: center;
  position: relative;
  z-index: 1;
}

.footer p {
  color: #475569;
  font-size: 0.84rem;
  line-height: 2.4;
}

/* === SCROLL REVEAL === */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.65s ease, transform 0.65s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.10s; }
.reveal-delay-2 { transition-delay: 0.22s; }
.reveal-delay-3 { transition-delay: 0.34s; }

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .hero         { padding: 8rem 0 5rem; }
  .apps-section { padding: 5rem 0 7rem; }
  .hero-glow    { width: 380px; height: 380px; }

  .apps-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 1.25rem; }
}
