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

:root {
  --bg: #07030F;
  --surface: rgba(255, 255, 255, 0.04);
  --glass: rgba(255, 255, 255, 0.06);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text: #ffffff;
  --text-secondary: rgba(255, 255, 255, 0.55);
  --text-tertiary: rgba(255, 255, 255, 0.3);
  --accent-from: #7B5CFF;
  --accent-to: #FF6B8A;
  --accent-mid: #C96BFF;
  --radius: 20px;
  --radius-sm: 12px;
  --max-w: 1120px;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

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

.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: url('assets/noise-bg.png') repeat;
  opacity: 0.03;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3 { font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }

h1 { font-size: clamp(2.8rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 5vw, 3.2rem); text-align: center; }
h3 { font-size: 1.2rem; font-weight: 700; }

.gradient-text {
  background: linear-gradient(135deg, var(--accent-from), var(--accent-mid), var(--accent-to));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  text-align: center;
  text-transform: uppercase;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--accent-mid);
  margin-bottom: 0.75rem;
}

/* ===== GLASS ===== */
.glass {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 0 1.5rem;
  background: rgba(7, 3, 15, 0.7);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 800;
  font-size: 1.15rem;
}

.nav-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.2s;
}

.nav-cta:hover { opacity: 0.9; transform: scale(1.03); }

/* ===== HERO ===== */
.hero {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 10rem 1.5rem 6rem;
  display: flex;
  align-items: center;
  gap: 4rem;
  min-height: 100vh;
}

.hero-content { flex: 1; min-width: 0; }

.hero-badge {
  display: inline-block;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-mid);
  border: 1px solid rgba(201, 107, 255, 0.25);
  background: rgba(201, 107, 255, 0.08);
  margin-bottom: 1.5rem;
}

.hero-line { display: block; }

.hero-sub {
  margin-top: 1.5rem;
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 520px;
  line-height: 1.7;
}

.hero-actions { margin-top: 2.5rem; display: flex; flex-direction: column; gap: 0.75rem; align-items: flex-start; }

.hero-free { font-size: 0.85rem; color: var(--text-tertiary); }

/* ===== APP STORE BUTTON ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.9rem 2rem;
  border-radius: 16px;
  background: #fff;
  color: #000;
  font-weight: 800;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px rgba(123, 92, 255, 0.3);
}

.btn-large { padding: 1rem 2.4rem; font-size: 1.05rem; }

.apple-logo { width: 20px; height: 20px; }

/* ===== PHONE FRAME ===== */
.hero-phone {
  flex: 0 0 320px;
  position: relative;
}

.phone-frame {
  position: relative;
  width: 280px;
  border-radius: 40px;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 20px 80px rgba(123, 92, 255, 0.2),
    0 4px 20px rgba(0, 0, 0, 0.4);
  background: #000;
  aspect-ratio: 9 / 19.5;
}

.phone-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 37px;
}

/* ===== SCREENSHOTS ===== */
.screenshots {
  position: relative;
  z-index: 2;
  padding: 6rem 0;
  overflow: hidden;
}

.screenshots h2 { margin-bottom: 3rem; }

.screenshots-track {
  display: flex;
  gap: 1.25rem;
  padding: 0 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  justify-content: center;
}

.screenshots-track::-webkit-scrollbar { display: none; }

.screenshot-card {
  flex: 0 0 auto;
  width: 240px;
  scroll-snap-align: center;
  border-radius: 28px;
  overflow: hidden;
  border: 2px solid var(--glass-border);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s;
  background: #111;
}

.screenshot-card:hover { transform: scale(1.03); }

.screenshot-card img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 900px) {
  .screenshots-track { justify-content: flex-start; }
  .screenshot-card { width: 200px; }
}

/* ===== FEATURES ===== */
.features {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.features h2 { margin-bottom: 3.5rem; }

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

.feature-card {
  padding: 2rem;
  border-radius: var(--radius);
  transition: transform 0.3s, border-color 0.3s;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.15);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.feature-icon svg { width: 22px; height: 22px; color: #fff; }

.feature-card h3 { margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.95rem; line-height: 1.6; }

/* ===== HOW IT WORKS ===== */
.how-it-works {
  position: relative;
  z-index: 2;
  max-width: 640px;
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.how-it-works h2 { margin-bottom: 3.5rem; }

.steps { display: flex; flex-direction: column; gap: 0; }

.step {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
}

.step-number {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-from), var(--accent-to));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.2rem;
}

.step-content h3 { margin-bottom: 0.3rem; margin-top: 0.2rem; }
.step-content p { color: var(--text-secondary); font-size: 0.95rem; }

.step-line {
  width: 2px;
  height: 40px;
  margin-left: 23px;
  background: linear-gradient(to bottom, rgba(123, 92, 255, 0.4), rgba(255, 107, 138, 0.1));
}

/* ===== THEMES ===== */
.themes-section {
  position: relative;
  z-index: 2;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.themes-section h2 { margin-bottom: 1rem; }

.themes-sub {
  text-align: center;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto 3rem;
  font-size: 1.05rem;
}

.theme-icons {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.theme-icon-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
}

.theme-icon-wrap img {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  transition: transform 0.3s;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
}

.theme-icon-wrap img:hover { transform: scale(1.1) rotate(-3deg); }

.theme-icon-wrap span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 600;
}

/* ===== CTA ===== */
.cta-section {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 8rem 1.5rem;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(123, 92, 255, 0.12) 0%, transparent 70%);
  pointer-events: none;
}

.cta-section p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin: 1.25rem 0 2.5rem;
}

/* ===== FOOTER ===== */
footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--glass-border);
  padding: 2.5rem 1.5rem;
}

.footer-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
}

.footer-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-copy {
  width: 100%;
  text-align: center;
  color: var(--text-tertiary);
  font-size: 0.8rem;
  margin-top: 1rem;
}

/* ===== ANIMATIONS ===== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 8rem;
    gap: 3rem;
  }

  .hero-content { display: flex; flex-direction: column; align-items: center; }
  .hero-sub { max-width: 100%; }
  .hero-actions { align-items: center; }

  .hero-phone { flex: none; }
  .phone-frame { width: 240px; margin: 0 auto; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }

  .hero { padding-top: 7rem; min-height: auto; padding-bottom: 3rem; }

  .phone-frame { width: 200px; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-links { justify-content: center; }
}
