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

:root {
  --purple-50:  #FAF5FF;
  --purple-100: #F3E8FF;
  --purple-200: #E9D5FF;
  --purple-300: #D8B4FE;
  --purple-400: #C084FC;
  --purple-500: #A855F7;
  --purple-600: #9333EA;
  --purple-700: #7C3AED;
  --purple-800: #6D28D9;
  --purple-900: #5B21B6;

  --gray-50:  #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4B5563;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;

  --white: #FFFFFF;
  --radius: 16px;
  --radius-sm: 12px;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }

/* ============ NAV ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(255, 255, 255, 0.8);
  border-bottom: 1px solid var(--purple-100);
}

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

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--purple-700);
  letter-spacing: -0.5px;
}

.nav-cta {
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 100px;
  background: var(--purple-700);
  color: var(--white);
  transition: background 0.2s, transform 0.2s;
}

.nav-cta:hover {
  background: var(--purple-800);
  transform: translateY(-1px);
}

/* ============ HERO ============ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 120px 24px 80px;
  background: linear-gradient(180deg, var(--white) 0%, var(--purple-50) 50%, var(--purple-100) 100%);
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  top: 20%;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
}

.hero-badge {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--purple-700);
  background: var(--purple-100);
  padding: 6px 16px;
  border-radius: 100px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.hero-title {
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.1;
  color: var(--gray-900);
  margin-bottom: 20px;
  letter-spacing: -1.5px;
}

.hero-sub {
  font-size: 18px;
  color: var(--gray-500);
  max-width: 520px;
  margin: 0 auto 36px;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Floating orbs */
.orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  animation: float 8s ease-in-out infinite;
}

.orb-1 {
  width: 300px; height: 300px;
  top: 10%; left: -5%;
  background: radial-gradient(circle, var(--purple-200), transparent 70%);
  animation-delay: 0s;
}

.orb-2 {
  width: 200px; height: 200px;
  bottom: 15%; right: -3%;
  background: radial-gradient(circle, var(--purple-300), transparent 70%);
  animation-delay: -3s;
}

.orb-3 {
  width: 150px; height: 150px;
  top: 60%; left: 10%;
  background: radial-gradient(circle, var(--purple-100), transparent 70%);
  animation-delay: -5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.05); }
}

/* ============ HERO VISUAL ============ */
.hero-visual {
  position: relative;
  width: 100%;
  max-width: 480px;
  margin: 48px auto 0;
  z-index: 2;
  animation: fadeSlideUp 1s 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-visual canvas {
  width: 100%;
  height: 200px;
  display: block;
  position: relative;
  z-index: 2;
}

.hero-blob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 40%,
    rgba(168, 85, 247, 0.25),
    rgba(124, 58, 237, 0.15),
    rgba(216, 180, 254, 0.1),
    transparent 70%
  );
  filter: blur(30px);
  animation: blobMorph 8s ease-in-out infinite, blobRotate 20s linear infinite;
  z-index: 1;
}

@keyframes blobMorph {
  0%, 100% { border-radius: 60% 40% 55% 45% / 55% 45% 60% 40%; transform: translate(-50%, -50%) scale(1); }
  25%      { border-radius: 45% 55% 40% 60% / 60% 40% 55% 45%; transform: translate(-50%, -50%) scale(1.08); }
  50%      { border-radius: 55% 45% 60% 40% / 40% 60% 45% 55%; transform: translate(-50%, -50%) scale(0.95); }
  75%      { border-radius: 40% 60% 45% 55% / 55% 45% 40% 60%; transform: translate(-50%, -50%) scale(1.05); }
}

@keyframes blobRotate {
  from { rotate: 0deg; }
  to   { rotate: 360deg; }
}

/* ============ BUTTONS ============ */
.btn {
  display: inline-block;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 100px;
  transition: all 0.25s;
  cursor: pointer;
}

.btn-primary {
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: var(--white);
  box-shadow: 0 4px 20px rgba(124, 58, 237, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.4);
}

.btn-ghost {
  color: var(--purple-700);
  border: 2px solid var(--purple-200);
  background: transparent;
}

.btn-ghost:hover {
  background: var(--purple-50);
  border-color: var(--purple-300);
}

/* ============ SECTIONS ============ */
.section-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.8px;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.section-sub {
  font-size: 17px;
  color: var(--gray-500);
  text-align: center;
  margin-bottom: 56px;
}

.section-title--light { color: var(--white); }
.section-sub--light { color: var(--purple-200); }

/* ============ FEATURES ============ */
.features {
  padding: 100px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--purple-100);
  background: var(--white);
  transition: all 0.3s;
}

.feature-card:hover {
  border-color: var(--purple-300);
  box-shadow: 0 8px 30px rgba(124, 58, 237, 0.08);
  transform: translateY(-4px);
}

.feature-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--purple-50), var(--purple-100));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple-600);
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.6;
}

/* ============ HOW IT WORKS ============ */
.how-it-works {
  padding: 100px 24px;
  background: var(--purple-50);
}

.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  max-width: 900px;
  margin: 0 auto;
}

.step {
  text-align: center;
  flex: 1;
  padding: 0 24px;
}

.step-number {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple-500), var(--purple-700));
  color: var(--white);
  font-size: 20px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.step h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.step p {
  font-size: 15px;
  color: var(--gray-500);
  line-height: 1.6;
}

.step-line {
  width: 60px;
  height: 2px;
  background: var(--purple-200);
  margin-top: 24px;
  flex-shrink: 0;
}

/* ============ DOWNLOAD CTA ============ */
.download {
  position: relative;
  padding: 100px 24px;
  text-align: center;
  background: linear-gradient(135deg, var(--purple-700), var(--purple-900));
  overflow: hidden;
}

.download-glow {
  position: absolute;
  top: -30%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(196, 132, 252, 0.2) 0%, transparent 70%);
  pointer-events: none;
}

.download-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

/* ============ EARLY ACCESS FORM ============ */
.early-access-form {
  position: relative;
  z-index: 2;
  max-width: 480px;
  margin: 0 auto;
}

.form-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.form-input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font-size: 15px;
  font-family: inherit;
  outline: none;
  transition: all 0.25s;
}

.form-input::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.form-input:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.3);
}

.form-btn {
  padding: 14px 28px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  flex-shrink: 0;
}

.form-note {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
}

.form-success {
  font-size: 15px;
  font-weight: 600;
  color: #A7F3D0;
  text-align: center;
  margin-top: 12px;
}

.form-error {
  font-size: 15px;
  font-weight: 600;
  color: #FCA5A5;
  text-align: center;
  margin-top: 12px;
}

@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
  }

  .form-btn {
    width: 100%;
  }
}

/* ============ FOOTER ============ */
.footer {
  padding: 48px 24px;
  background: var(--gray-900);
  color: var(--gray-400);
  text-align: center;
}

.footer-inner {
  max-width: 600px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 20px;
  font-weight: 700;
  color: var(--purple-400);
  margin-bottom: 12px;
}

.footer-note {
  font-size: 13px;
  line-height: 1.6;
  color: var(--gray-500);
  margin-bottom: 20px;
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  margin-bottom: 24px;
}

.footer-links a {
  font-size: 14px;
  color: var(--gray-400);
  transition: color 0.2s;
}

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

.footer-copy {
  font-size: 13px;
  color: var(--gray-600);
}

/* ============ ANIMATIONS ============ */

/* Scroll reveal base state */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Hero entrance */
.hero-badge {
  animation: fadeSlideUp 0.8s 0.2s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-title {
  animation: fadeSlideUp 0.8s 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-sub {
  animation: fadeSlideUp 0.8s 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-buttons {
  animation: fadeSlideUp 0.8s 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Orb parallax — smooth transition for mouse-follow */
.orb {
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Feature card icon pulse on hover */
.feature-card:hover .feature-icon {
  animation: iconPulse 0.5s ease;
}

@keyframes iconPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.15); }
  100% { transform: scale(1); }
}

/* Step number glow on visible */
.step.visible .step-number {
  animation: stepGlow 1.5s ease forwards;
}

@keyframes stepGlow {
  0%   { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
  50%  { box-shadow: 0 0 20px 8px rgba(168, 85, 247, 0.2); }
  100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0); }
}

/* Nav scroll effect */
.nav--scrolled {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

/* Button hover glow */
.btn-primary {
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Store button shimmer */
.store-btn {
  position: relative;
  overflow: hidden;
}

.store-btn::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.08), transparent);
  transition: left 0.5s;
}

.store-btn:hover::after {
  left: 100%;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .steps {
    flex-direction: column;
    align-items: center;
    gap: 24px;
  }

  .step-line {
    width: 2px;
    height: 40px;
    margin: 0;
  }

  .hero-sub br { display: none; }
  .hero-title br { display: none; }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
