@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@400;500;700;800&display=swap');

:root {
  --bg-color: #07050d;
  --surface-main: #130f1e;
  --surface-hover: #1e182e;
  --surface-card: rgba(25, 20, 40, 0.6);
  --primary: #7c3aed;
  --primary-light: #a78bfa;
  --secondary: #ec4899;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(124, 58, 237, 0.3);

  --font-sans: 'Inter', sans-serif;
  --font-display: 'Outfit', sans-serif;

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 16px;
}

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

html {
  scroll-behavior: smooth;
  /* Prevent font size inflation on mobile */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ========================
   Background Gradient
======================== */
.bg-gradient-spots {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 15% 50%, rgba(124, 58, 237, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(236, 72, 153, 0.1) 0%, transparent 50%);
  filter: blur(80px);
}

/* ========================
   Typography
======================== */
h1, h2, h3, h4,
.font-display {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
}

/* Fluid type scale — no duplicate overrides needed later */
h1 { font-size: clamp(2.2rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.8rem); }

.text-gradient {
  background: linear-gradient(135deg, #fff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-alt {
  background: linear-gradient(135deg, #a78bfa 0%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================
   Layout Utilities
======================== */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.section {
  padding: 100px 0;
}

.flex        { display: flex; }
.flex-col    { display: flex; flex-direction: column; }
.items-center   { align-items: center; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.gap-4  { gap: 1rem; }
.gap-8  { gap: 2rem; }

/* ========================
   Navbar
======================== */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background: rgba(7, 5, 13, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition-normal);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar .logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.1rem, 3vw, 1.5rem);
  color: var(--text-main);
  text-decoration: none;
  letter-spacing: -0.5px;
  /* Prevent logo being squashed by nav links */
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition-fast);
  font-size: 0.95rem;
  padding: 0.4rem 0.75rem;
  border-radius: 8px;
}

.nav-links a:hover {
  color: var(--text-main);
  background: rgba(255,255,255,0.05);
}

/* Hamburger — hidden by default */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  /* Ensure it doesn't inherit text color weirdness */
  color: var(--text-main);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-main);
  border-radius: 2px;
  transition: var(--transition-normal);
}

/* Animated hamburger when open */
.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ========================
   Buttons
======================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-family: var(--font-sans);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-normal);
  border: none;
  font-size: 1rem;
  /* Prevent tiny tap targets on mobile */
  min-height: 48px;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, #5b21b6 100%);
  color: white;
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(124, 58, 237, 0.5);
  background: linear-gradient(135deg, #8b5cf6 0%, var(--primary) 100%);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ========================
   Glass Cards
======================== */
.card {
  background: var(--surface-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 40px;
  transition: var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  opacity: 0;
  transition: var(--transition-normal);
}

.card:hover {
  transform: translateY(-5px);
  border-color: var(--border-glow);
  box-shadow: 0 10px 40px -10px rgba(124, 58, 237, 0.2);
}

.card:hover::before {
  opacity: 1;
}

/* ========================
   Scroll Reveal Animations
======================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1),
              transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

.delay-100 { transition-delay: 100ms; }
.delay-150 { transition-delay: 150ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }
.delay-500 { transition-delay: 500ms; }

/* ========================
   Hero
======================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  /* Room for fixed navbar */
  padding: 120px 0 60px;
}

.hero p {
  color: var(--text-muted);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  max-width: 600px;
  margin: 1.5rem auto 2.5rem;
}

/* ========================
   Demo Placeholder (Soonish)
======================== */
.demo-placeholder {
  width: 100%;
  height: clamp(280px, 40vw, 500px);
  background: linear-gradient(145deg, rgba(25, 20, 40, 0.8), rgba(12, 10, 20, 0.6));
  border-radius: 24px;
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
  margin: 4rem auto;
  position: relative;
  overflow: hidden;
}

.demo-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(124, 58, 237, 0.15) 0%, transparent 60%);
}

.demo-text {
  color: var(--text-muted);
  font-size: 1.2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  z-index: 1;
}

/* ========================
   Feature Grid (Soonish)
======================== */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

/* ========================
   Footer
======================== */
footer {
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-top: 80px;
}

footer a {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition-fast);
}

footer a:hover {
  color: white;
  text-decoration: underline;
}

/* ========================
   Privacy Content
======================== */
.privacy-content {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-muted);
}

.privacy-content h2 {
  color: #fff;
  margin: 2rem 0 1rem;
}

.privacy-content p {
  margin-bottom: 1rem;
}

.privacy-content ul {
  margin-left: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ========================
   RESPONSIVE — Mobile
======================== */
@media (max-width: 768px) {

  /* Navbar: show hamburger, collapse links */
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(7, 5, 13, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 0.85rem 1.5rem;
    margin: 0;
    border-radius: 0;
    font-size: 1rem;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  /* Hero buttons stack vertically */
  .hero .flex.gap-4 {
    flex-direction: column;
    align-items: center;
    width: 100%;
  }

  .hero .flex.gap-4 .btn {
    width: 100%;
    max-width: 340px;
  }

  /* Section spacing */
  .section {
    padding: 60px 0;
  }

  /* Card padding */
  .card {
    padding: 24px 20px;
  }

  /* Footer links wrap properly */
  footer .flex.gap-4 {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  footer {
    padding: 30px 0;
    font-size: 0.8rem;
    margin-top: 40px;
  }
}

/* ========================
   RESPONSIVE — Small phones
======================== */
@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  /* App card grid forces single column */
  .feature-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .demo-placeholder {
    margin: 2rem auto;
    border-radius: 16px;
  }

  .card {
    padding: 20px 16px;
  }
}
