/* ============================================
   LunaLog Marketing Site — Space Theme
   ============================================ */

:root {
  --bg: #0a0a1a;
  --bg-card: rgba(255, 255, 255, 0.03);
  --bg-card-hover: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #a78bfa;
  --accent-2: #818cf8;
  --gradient: linear-gradient(135deg, #a78bfa, #818cf8, #38bdf8);
  --radius: 12px;
  --radius-lg: 20px;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Stars canvas */
#stars {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ============================================
   Typography
   ============================================ */

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
  font-size: 1.2rem;
  font-weight: 600;
}

.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--bg-card);
  cursor: pointer;
}

.btn:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
}

.btn-sm {
  padding: 7px 16px;
  font-size: 0.875rem;
  border-radius: 8px;
}

.btn-lg {
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: 12px;
}

.btn-primary {
  background: var(--gradient);
  border: none;
  color: #fff;
  box-shadow: 0 4px 24px rgba(129, 140, 248, 0.3);
}

.btn-primary:hover {
  box-shadow: 0 6px 32px rgba(129, 140, 248, 0.45);
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.12);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.05);
}

.btn-block {
  display: flex;
  justify-content: center;
  width: 100%;
}

/* ============================================
   Navigation
   ============================================ */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.2rem;
}

.logo-img {
  height: 160px;
  width: auto;
  margin: -60px 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-links a:not(.btn) {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.925rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:not(.btn):hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-muted);
  border-radius: 1px;
  transition: all 0.2s;
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 65px;
  left: 0;
  right: 0;
  z-index: 99;
  background: rgba(10, 10, 26, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 16px 24px;
  flex-direction: column;
  gap: 12px;
}

.mobile-menu a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  padding: 8px 0;
}

.mobile-menu .btn {
  margin-top: 4px;
  justify-content: center;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .mobile-menu.open { display: flex; }
}

/* ============================================
   Hero
   ============================================ */

.hero {
  position: relative;
  padding: 160px 0 80px;
  text-align: center;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(129, 140, 248, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(167, 139, 250, 0.1);
  border: 1px solid rgba(167, 139, 250, 0.2);
  margin-bottom: 28px;
}

.hero h1 {
  margin-bottom: 24px;
}

.hero-sub {
  max-width: 600px;
  margin: 0 auto 36px;
  font-size: 1.15rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

/* ============================================
   Platforms
   ============================================ */

.platforms {
  padding: 24px 0 48px;
  text-align: center;
}

.platform-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

/* ============================================
   Sections
   ============================================ */

.section {
  padding: 96px 0;
  position: relative;
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-header p {
  max-width: 540px;
  margin: 16px auto 0;
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

.section-header .hero-badge {
  margin-bottom: 20px;
}

/* ============================================
   Features Grid
   ============================================ */

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.feature-card {
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  transition: all 0.3s ease;
}

.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
}

.feature-card h3 {
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.65;
}

/* ============================================
   AI Section
   ============================================ */

.section-ai {
  overflow: hidden;
}

.ai-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 600px;
  background: radial-gradient(ellipse, rgba(129, 140, 248, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.ai-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 24px;
}

.ai-card {
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(167, 139, 250, 0.15);
  background: rgba(167, 139, 250, 0.04);
  transition: all 0.3s ease;
}

.ai-card:hover {
  border-color: rgba(167, 139, 250, 0.25);
  background: rgba(167, 139, 250, 0.07);
  transform: translateY(-4px);
}

.ai-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--accent);
}

.ai-card-header h3 {
  color: var(--text);
}

.ai-card > p {
  color: var(--text-muted);
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 20px;
}

.ai-card-preview {
  padding: 16px;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.ai-preview-line {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.ai-preview-line strong {
  color: var(--accent);
}

.ai-preview-bubble {
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.82rem;
  line-height: 1.5;
}

.ai-preview-user {
  background: rgba(129, 140, 248, 0.15);
  color: var(--text);
  align-self: flex-end;
  max-width: 80%;
  border-bottom-right-radius: 4px;
}

.ai-preview-ai {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  align-self: flex-start;
  max-width: 85%;
  border-bottom-left-radius: 4px;
}

/* ============================================
   Pricing
   ============================================ */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
  max-width: 740px;
  margin: 0 auto;
}

.pricing-card {
  padding: 36px 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--bg-card);
  position: relative;
  transition: all 0.3s ease;
}

.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
}

.pricing-card-featured {
  border-color: rgba(167, 139, 250, 0.3);
  background: rgba(167, 139, 250, 0.05);
  box-shadow: 0 8px 40px rgba(129, 140, 248, 0.15);
}

.pricing-card-featured:hover {
  border-color: rgba(167, 139, 250, 0.45);
  box-shadow: 0 12px 48px rgba(129, 140, 248, 0.25);
}

.pricing-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 16px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--gradient);
  color: #fff;
  white-space: nowrap;
}

.pricing-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.pricing-price span {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-muted);
}

.pricing-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 32px;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.925rem;
  color: var(--text-muted);
}

.pricing-features li svg {
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

.pricing-features li strong {
  color: var(--text);
}

/* ============================================
   CTA
   ============================================ */

.section-cta {
  text-align: center;
  padding: 80px 0 96px;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  bottom: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 800px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(129, 140, 248, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.section-cta h2 {
  margin-bottom: 16px;
}

.section-cta p {
  max-width: 520px;
  margin: 0 auto 32px;
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* ============================================
   Footer
   ============================================ */

.footer {
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  position: relative;
  z-index: 1;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 32px;
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.9rem;
  margin-top: 8px;
}

.footer-links {
  display: flex;
  gap: 64px;
}

.footer-links h4 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-links a {
  display: block;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  padding: 3px 0;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--text);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
}

.footer-bottom p {
  color: var(--text-dim);
  font-size: 0.82rem;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 640px) {
  .hero { padding: 140px 0 60px; }
  .section { padding: 64px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .ai-grid { grid-template-columns: 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
  .footer-inner { flex-direction: column; gap: 32px; align-items: center; text-align: center; }
  .footer-links { gap: 40px; }
  .footer-bottom { text-align: center; }
}

/* ============================================
   Animations
   ============================================ */

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Fade-in on scroll */
.feature-card,
.ai-card,
.pricing-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.feature-card.visible,
.ai-card.visible,
.pricing-card.visible {
  opacity: 1;
  transform: translateY(0);
}
