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

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

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background-color: #09090b;
  color: #fafafa;
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

button {
  cursor: pointer;
  font-family: inherit;
}

/* ========================================
   DESIGN TOKENS
   ======================================== */
:root {
  --bg-primary: #09090b;
  --bg-card: #111113;
  --bg-card-hover: #18181b;
  --bg-elevated: #1c1c1f;
  --border-subtle: #27272a;
  --border-medium: #3f3f46;
  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #ffffff;
  --accent-dim: rgba(255, 255, 255, 0.08);
  --gradient-start: #e4e4e7;
  --gradient-end: #71717a;
  --glow: rgba(255, 255, 255, 0.04);
  --radius: 16px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --max-width: 1200px;
}

/* ========================================
   LAYOUT
   ======================================== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ========================================
   NAV
   ======================================== */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border-subtle);
  transition: background 0.3s ease;
}

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

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: -0.02em;
}

.nav-brand .logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
  display: flex;
  align-items: center;
}

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

.nav-links .nav-link-icon svg {
  width: 18px;
  height: 18px;
}

.nav-links .nav-link-danger {
  color: #f87171;
  font-weight: 600;
}

.nav-links .nav-link-danger:hover {
  color: #fca5a5;
}

.nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 8px 18px;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 999px;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-1px);
}

.nav-cta svg {
  width: 16px;
  height: 16px;
}

/* Mobile nav */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  padding: 8px;
}

/* ========================================
   HERO
   ======================================== */
.hero {
  padding-top: 160px;
  padding-bottom: 80px;
  text-align: center;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 600px;
  background: radial-gradient(
    circle,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 70%
  );
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px 6px 8px;
  background: var(--accent-dim);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
  animation: fadeInUp 0.6s ease forwards;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.5;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
  animation: fadeInUp 0.6s ease 0.1s forwards;
  opacity: 0;
}

.hero p {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 48px;
  line-height: 1.7;
  animation: fadeInUp 0.6s ease 0.2s forwards;
  opacity: 0;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeInUp 0.6s ease 0.3s forwards;
  opacity: 0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 999px;
  border: none;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--text-primary);
  color: var(--bg-primary);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.1),
    0 4px 24px rgba(0, 0, 0, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.6);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
  background: var(--accent-dim);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.btn-secondary:active {
  transform: translateY(0);
}

/* ========================================
   APP PREVIEW
   ======================================== */
.app-preview {
  padding: 0 0 120px;
  animation: fadeInUp 0.6s ease 0.4s forwards;
  opacity: 0;
}

.preview-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}

.preview-window {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.03),
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(255, 255, 255, 0.02);
}

.preview-titlebar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.02);
}

.preview-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--border-subtle);
}

.preview-dot:nth-child(1) {
  background: #ef4444;
}

.preview-dot:nth-child(2) {
  background: #eab308;
}

.preview-dot:nth-child(3) {
  background: #22c55e;
}

.preview-body {
  padding: 0;
  position: relative;
  overflow: hidden;
}

.preview-slideshow {
  position: relative;
  width: 100%;
}

.preview-slideshow img {
  width: 100%;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.8s ease;
}

.preview-slideshow img.active {
  position: relative;
  opacity: 1;
}

.preview-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 5;
}

.preview-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 0;
}

.preview-dots button.active {
  background: var(--text-primary);
  transform: scale(1.3);
}

/* Glow effect behind preview */
.preview-container::before {
  content: "";
  position: absolute;
  inset: -40px;
  background: radial-gradient(
    ellipse at 50% 50%,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: -1;
}

/* ========================================
   FEATURES
   ======================================== */
.features {
  padding: 80px 0 120px;
}

.features-header {
  text-align: center;
  margin-bottom: 64px;
}

.features-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.features-header p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

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

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  padding: 36px 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.feature-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: opacity 0.3s ease;
}

.feature-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
  transform: translateY(-4px);
}

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

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  background: var(--accent-dim);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-icon svg {
  width: 22px;
  height: 22px;
  color: var(--text-primary);
}

.feature-card h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}

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

/* ========================================
   FOOTER
   ======================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 40px 0;
}

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

.footer-copy {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.footer-socials {
  display: flex;
  align-items: center;
  gap: 20px;
}

.footer-socials a {
  color: var(--text-muted);
  transition:
    color 0.2s ease,
    transform 0.2s ease;
  display: flex;
}

.footer-socials a:hover {
  color: var(--text-primary);
  transform: translateY(-2px);
}

.footer-socials svg {
  width: 20px;
  height: 20px;
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 900px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .download-grid {
    grid-template-columns: 1fr;
  }

  .nav-links {
    display: none;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 130px;
    padding-bottom: 60px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    padding: 0 16px;
  }

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

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

  .preview-body {
    padding: 0;
  }

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

  .app-preview {
    padding-bottom: 80px;
  }
}

/* ========================================
   DOT GRID BACKGROUND
   ======================================== */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -10;
  opacity: 0.4;
  pointer-events: none;
  background-image: radial-gradient(
    rgba(255, 255, 255, 0.07) 1px,
    transparent 1px
  );
  background-size: 32px 32px;
}

/* ========================================
   SCROLL ANIMATIONS
   ======================================== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(36px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delays for feature cards */
.features-grid .feature-card:nth-child(1) {
  transition-delay: 0s;
}
.features-grid .feature-card:nth-child(2) {
  transition-delay: 0.08s;
}
.features-grid .feature-card:nth-child(3) {
  transition-delay: 0.16s;
}
.features-grid .feature-card:nth-child(4) {
  transition-delay: 0.24s;
}
.features-grid .feature-card:nth-child(5) {
  transition-delay: 0.32s;
}
.features-grid .feature-card:nth-child(6) {
  transition-delay: 0.4s;
}

/* Staggered delays for download cards */
.download-grid .download-card:nth-child(1) {
  transition-delay: 0.05s;
}
.download-grid .download-card:nth-child(2) {
  transition-delay: 0.15s;
}

/* ========================================
   FLOATING PREVIEW ANIMATION
   ======================================== */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.preview-window {
  animation: float 6s ease-in-out infinite;
}

/* ========================================
   GRADIENT TEXT SHIMMER
   ======================================== */
@keyframes shimmer {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.hero h1 .gradient-text {
  background: linear-gradient(
    135deg,
    #e4e4e7 0%,
    #a1a1aa 40%,
    #fafafa 60%,
    #71717a 100%
  );
  background-size: 200% 200%;
  animation: shimmer 4s ease infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========================================
   FEATURE ICON HOVER SPIN
   ======================================== */
.feature-card:hover .feature-icon svg {
  transform: rotate(8deg) scale(1.15);
}

.feature-icon svg {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ========================================
   NAV LINK UNDERLINE SLIDE
   ======================================== */
.nav-links a:not(.nav-link-icon) {
  position: relative;
}

.nav-links a:not(.nav-link-icon)::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1.5px;
  background: var(--text-primary);
  transition: width 0.25s ease;
  border-radius: 2px;
}

.nav-links a:not(.nav-link-icon):hover::after {
  width: 100%;
}

/* ========================================
   BUTTON SHINE ON HOVER
   ======================================== */
@keyframes btn-shine {
  from {
    left: -60%;
  }
  to {
    left: 120%;
  }
}

.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-15deg);
  opacity: 0;
  transition: opacity 0.1s;
}

.btn-primary:hover::after {
  opacity: 1;
  animation: btn-shine 0.55s ease forwards;
}

/* ========================================
   HERO BADGE PULSE RING
   ======================================== */
@keyframes ring-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.35);
  }
  70% {
    box-shadow: 0 0 0 7px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.hero-badge .dot {
  animation:
    pulse-dot 2s infinite,
    ring-pulse 2s infinite;
}

/* ========================================
   DOWNLOAD SECTION
   ======================================== */
.download {
  padding: 80px 0 120px;
}

.download-header {
  text-align: center;
  margin-bottom: 64px;
}

.download-header h2 {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 16px;
}

.download-header p {
  font-size: 1.0625rem;
  color: var(--text-secondary);
  max-width: 520px;
  margin: 0 auto;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 860px;
  margin: 0 auto;
}

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

.download-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: opacity 0.3s ease;
}

.download-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-medium);
}

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

.download-card-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}

.download-os-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-xs);
  background: var(--accent-dim);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.download-os-icon svg {
  width: 24px;
  height: 24px;
  color: var(--text-primary);
}

.download-card-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.download-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.download-btn {
  width: 100%;
  justify-content: center;
  margin-bottom: 24px;
}

.download-script {
  border-top: 1px solid var(--border-subtle);
  padding-top: 20px;
}

.download-script-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.download-script-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.download-script-box {
  flex: 1;
  min-width: 0;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  padding: 10px 14px;
  overflow-x: auto;
}

.download-script-box code {
  font-family:
    "SFMono-Regular", "Cascadia Code", "Fira Code", Consolas, monospace;
  font-size: 0.78rem;
  color: #e4e4e7;
  letter-spacing: 0.01em;
  white-space: nowrap;
  display: block;
}

.copy-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: none;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  transform: translateY(-6px);
  transition:
    color 0.12s ease,
    transform 0.12s ease;
}

.copy-btn:hover {
  background: transparent;
  color: var(--text-primary);
  transform: translateY(-4px);
}

.copy-btn.copied {
  color: #22c55e;
}

.copy-btn svg {
  width: 15px;
  height: 15px;
}

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

  .download-card {
    padding: 28px 20px;
  }
}
