/* =========================================================
   AuraMouse — Website Stylesheet
   ========================================================= */

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

:root {
  --blue: #2563EB;
  --purple: #7C3AED;
  --gradient: linear-gradient(135deg, var(--blue), var(--purple));

  /* Light mode */
  --bg: #FAFAFE;
  --bg-section-alt: #F3F4F8;
  --surface: #FFFFFF;
  --surface-border: rgba(0, 0, 0, 0.06);
  --text-primary: #0F172A;
  --text-secondary: #475569;
  --text-tertiary: #94A3B8;
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.06);
  --card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.06), 0 8px 32px rgba(0, 0, 0, 0.1);
  --hero-dot-color: rgba(37, 99, 235, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0B0E17;
    --bg-section-alt: #10141F;
    --surface: #161B2A;
    --surface-border: rgba(255, 255, 255, 0.06);
    --text-primary: #E8ECF4;
    --text-secondary: #94A3B8;
    --text-tertiary: #64748B;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.3);
    --card-shadow-hover: 0 2px 8px rgba(0, 0, 0, 0.3), 0 8px 32px rgba(0, 0, 0, 0.4);
    --hero-dot-color: rgba(124, 58, 237, 0.1);
  }
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

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

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

/* Stagger children in grids */
.features-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.features-grid .reveal:nth-child(3) { transition-delay: 0.16s; }
.features-grid .reveal:nth-child(4) { transition-delay: 0.24s; }

.steps .reveal:nth-child(2) { transition-delay: 0.06s; }
.steps .reveal:nth-child(3) { transition-delay: 0.12s; }
.steps .reveal:nth-child(4) { transition-delay: 0.18s; }
.steps .reveal:nth-child(5) { transition-delay: 0.24s; }

.stats-grid .reveal:nth-child(2) { transition-delay: 0.08s; }
.stats-grid .reveal:nth-child(3) { transition-delay: 0.16s; }

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: linear-gradient(180deg, #f0f4ff 0%, var(--bg) 100%);
}

@media (prefers-color-scheme: dark) {
  .hero { background: linear-gradient(180deg, #0f1328 0%, var(--bg) 100%); }
}

/* Background effects */
.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.dot-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--hero-dot-color) 1.2px, transparent 1.2px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, black 20%, transparent 70%);
}

.gradient-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
}

.orb-1 {
  width: 600px;
  height: 600px;
  background: var(--blue);
  top: -15%;
  left: -10%;
  animation: float-orb 18s ease-in-out infinite;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--purple);
  bottom: -10%;
  right: -10%;
  animation: float-orb 22s ease-in-out infinite reverse;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: linear-gradient(135deg, #60a5fa, #a78bfa);
  top: 30%;
  left: 50%;
  transform: translateX(-50%);
  filter: blur(100px);
  opacity: 0.2;
  animation: float-orb 15s ease-in-out infinite 3s;
}

/* Shimmer lines — subtle diagonal streaks of light */
.shimmer-line {
  position: absolute;
  width: 200%;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 30%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.06) 70%, transparent 100%);
  transform-origin: center;
}
@media (prefers-color-scheme: dark) {
  .shimmer-line { background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.03) 30%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.03) 70%, transparent 100%); }
}

.shimmer-1 {
  top: 25%;
  left: -50%;
  transform: rotate(-15deg);
  animation: shimmer 8s ease-in-out infinite;
}
.shimmer-2 {
  top: 55%;
  left: -50%;
  transform: rotate(-12deg);
  animation: shimmer 10s ease-in-out infinite 2s;
}
.shimmer-3 {
  top: 75%;
  left: -50%;
  transform: rotate(-18deg);
  animation: shimmer 12s ease-in-out infinite 4s;
}

@keyframes shimmer {
  0%, 100% { opacity: 0; transform: rotate(-15deg) translateX(-10%); }
  50% { opacity: 1; transform: rotate(-15deg) translateX(10%); }
}

/* Pulse rings — emanate from center */
.pulse-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.08);
  pointer-events: none;
}
@media (prefers-color-scheme: dark) {
  .pulse-ring { border-color: rgba(124, 58, 237, 0.06); }
}

.ring-1 {
  width: 400px;
  height: 400px;
  animation: pulse-expand 6s ease-out infinite;
}
.ring-2 {
  width: 400px;
  height: 400px;
  animation: pulse-expand 6s ease-out infinite 3s;
}

@keyframes pulse-expand {
  0% { width: 200px; height: 200px; opacity: 0.5; }
  100% { width: 900px; height: 900px; opacity: 0; }
}

@media (prefers-color-scheme: dark) {
  .gradient-orb { opacity: 0.2; }
  .orb-3 { opacity: 0.12; }
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0); }
  33% { transform: translate(30px, -20px); }
  66% { transform: translate(-20px, 20px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 120px 24px 80px;
}

.app-icon {
  margin-bottom: 28px;
  animation: icon-enter 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.app-icon svg {
  width: 128px;
  height: 128px;
  filter: drop-shadow(0 8px 32px rgba(37, 99, 235, 0.25));
  border-radius: 28px;
}

@keyframes icon-enter {
  from {
    opacity: 0;
    transform: scale(0.8) translateY(20px);
  }
}

.hero-title {
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
  margin-bottom: 12px;
  animation: fade-up 0.8s 0.15s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-tagline {
  font-size: clamp(1.15rem, 2.5vw, 1.5rem);
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 36px;
  animation: fade-up 0.8s 0.25s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  animation: fade-up 0.8s 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Download Button */
.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--gradient);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 2px 12px rgba(37, 99, 235, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.btn-download:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.4), 0 2px 8px rgba(0, 0, 0, 0.12);
}

.btn-download:active {
  transform: translateY(0) scale(0.98);
}

.btn-download-lg {
  padding: 16px 36px;
  font-size: 1.12rem;
  border-radius: 16px;
}

.btn-icon {
  flex-shrink: 0;
}

/* Badge */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.01em;
}

.hero-version {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  animation: fade-up 0.8s 0.45s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* =========================================================
   Section Shared
   ========================================================= */
section {
  padding: 100px 0;
}

.section-title {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
  margin-bottom: 12px;
  line-height: 1.2;
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  color: var(--text-secondary);
  text-align: center;
  max-width: 560px;
  margin: 0 auto 56px;
  line-height: 1.5;
}

/* =========================================================
   Features
   ========================================================= */
.features {
  background: var(--bg-section-alt);
}

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  padding: 32px 28px;
  box-shadow: var(--card-shadow);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--card-shadow-hover);
}

.feature-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(124, 58, 237, 0.08));
  border-radius: 14px;
  margin-bottom: 18px;
}

@media (prefers-color-scheme: dark) {
  .feature-icon {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.15), rgba(124, 58, 237, 0.15));
  }
}

.feature-card h3 {
  font-size: 1.12rem;
  font-weight: 650;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.feature-card p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* =========================================================
   Screenshots
   ========================================================= */
.screenshots {
  padding: 100px 0;
}

.screenshot-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 32px;
  background: var(--bg-section-alt);
  border-radius: 12px;
  padding: 4px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  border: 1px solid var(--surface-border);
}

.screenshot-tab {
  padding: 10px 22px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  border-radius: 9px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.screenshot-tab:hover {
  color: var(--text-primary);
}

.screenshot-tab.active {
  background: var(--surface);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

@media (prefers-color-scheme: dark) {
  .screenshot-tab.active {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  }
}

.screenshot-showcase {
  max-width: 720px;
  margin: 0 auto;
}

.screenshot-frame {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.04);
  aspect-ratio: auto;
}

@media (prefers-color-scheme: dark) {
  .screenshot-frame {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3), 0 1px 3px rgba(0, 0, 0, 0.2);
  }
}

.screenshot-img {
  display: none;
  width: 100%;
  height: auto;
  opacity: 0;
  transition: opacity 0.35s ease;
}

.screenshot-img.active {
  display: block;
  opacity: 1;
}

.screenshot-captions {
  text-align: center;
  margin-top: 20px;
  min-height: 48px;
}

.screenshot-caption {
  display: none;
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
  max-width: 520px;
  margin: 0 auto;
}

.screenshot-caption.active {
  display: block;
  animation: caption-in 0.3s ease both;
}

@keyframes caption-in {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
  .screenshot-tabs {
    gap: 2px;
    padding: 3px;
  }
  .screenshot-tab {
    padding: 8px 14px;
    font-size: 0.85rem;
  }
}

/* =========================================================
   How It Works
   ========================================================= */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}

.step {
  flex: 1;
  min-width: 200px;
  max-width: 280px;
  text-align: center;
  padding: 0 20px;
}

.step-connector {
  width: 48px;
  height: 2px;
  background: var(--gradient);
  opacity: 0.25;
  margin-top: 28px;
  border-radius: 2px;
  flex-shrink: 0;
}

.step-number {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
  border-radius: 16px;
  background: var(--gradient);
  color: #fff;
  font-size: 1.25rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.2);
}

.step h3 {
  font-size: 1.05rem;
  font-weight: 650;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}

.step p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* =========================================================
   Lightweight / Stats
   ========================================================= */
.lightweight {
  background: var(--bg-section-alt);
}

.stats-grid {
  display: flex;
  justify-content: center;
  gap: 40px;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
  min-width: 160px;
  padding: 32px 24px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: 18px;
  box-shadow: var(--card-shadow);
}

.stat-value {
  display: block;
  font-size: 2.5rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
  margin-bottom: 4px;
}

.stat-unit {
  font-size: 1.5rem;
  font-weight: 600;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

/* =========================================================
   Final CTA
   ========================================================= */
.final-cta {
  text-align: center;
  padding: 80px 0 100px;
}

.final-cta h2 {
  font-size: clamp(1.8rem, 3.5vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 28px;
}

.final-cta .hero-version {
  margin-top: 16px;
}

/* =========================================================
   Footer
   ========================================================= */
.footer {
  border-top: 1px solid var(--surface-border);
  padding: 28px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 0.95rem;
}

.footer-brand svg {
  border-radius: 6px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 0.85rem;
  color: var(--text-tertiary);
}

.footer-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 768px) {
  section {
    padding: 72px 0;
  }

  .features-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .step-connector {
    width: 2px;
    height: 32px;
    margin-top: 0;
  }

  .step {
    padding: 0;
  }

  .stats-grid {
    gap: 16px;
  }

  .stat {
    min-width: 140px;
    flex: 1;
  }

  .hero-content {
    padding: 100px 20px 60px;
  }

  .app-icon svg {
    width: 96px;
    height: 96px;
  }
}

@media (max-width: 480px) {
  .stats-grid {
    flex-direction: column;
    align-items: center;
  }

  .stat {
    width: 100%;
    max-width: 280px;
  }

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

  .footer-meta {
    flex-direction: column;
    gap: 8px;
  }
}

/* =========================================================
   Accessibility: Reduced Motion
   ========================================================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .gradient-orb {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }
}
