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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #0a0a0f;
  color: #e8e8ed;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

code {
  font-family: 'SF Mono', 'Fira Code', monospace;
}

/* ===== CUSTOM PROPERTIES ===== */
:root {
  --accent: #7C5CFC;
  --accent-light: #9b7fff;
  --accent-dark: #5a3fd4;
  --accent-glow: rgba(124, 92, 252, 0.35);

  --bg: #0a0a0f;
  --bg-elevated: #12121a;
  --bg-card: #16161f;
  --bg-card-hover: #1c1c28;
  --bg-glass: rgba(18, 18, 26, 0.72);

  --text: #e8e8ed;
  --text-muted: #88889a;
  --text-dim: #5e5e72;

  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.1);

  --radius: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --max-width: 1100px;
  --nav-height: 64px;
}

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

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  z-index: 1000;
  background: rgba(10, 10, 15, 0.68);
  backdrop-filter: blur(18px) saturate(1.4);
  -webkit-backdrop-filter: blur(18px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

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

.logo {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Hamburger */
.nav-toggle {
  display: none;
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}

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

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.25s;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform 0.25s;
}

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

.nav-links a:hover::after {
  transform: scaleX(1);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 80px;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(124, 92, 252, 0.12), transparent),
    radial-gradient(ellipse 50% 40% at 20% 60%, rgba(124, 92, 252, 0.06), transparent),
    radial-gradient(ellipse 40% 50% at 80% 80%, rgba(124, 92, 252, 0.04), transparent);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 60px,
      rgba(124, 92, 252, 0.02) 60px,
      rgba(124, 92, 252, 0.02) 61px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 60px,
      rgba(124, 92, 252, 0.02) 60px,
      rgba(124, 92, 252, 0.02) 61px
    );
  mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 50% 50%, black, transparent 70%);
}

.hero-bg::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 92, 252, 0.08), transparent 70%);
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  animation: hero-pulse 8s ease-in-out infinite;
}

@keyframes hero-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.6; }
  50% { transform: translateX(-50%) scale(1.2); opacity: 1; }
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 720px;
  animation: hero-fade 1s ease-out;
}

@keyframes hero-fade {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.2);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  margin-bottom: 28px;
}

.hero-title {
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  background: linear-gradient(180deg, #fff 30%, rgba(255,255,255,0.6));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 40px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  box-shadow: 0 4px 24px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 40px var(--accent-glow);
}

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

.btn-secondary {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

/* Download big button */
.btn-download {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff;
  padding: 20px 36px;
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 32px var(--accent-glow);
  gap: 16px;
  width: 100%;
  max-width: 400px;
}

.btn-download:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 48px var(--accent-glow);
}

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

.btn-download-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.btn-download-label {
  font-size: 1.1rem;
  font-weight: 700;
}

.btn-download-size {
  font-size: 0.78rem;
  font-weight: 500;
  opacity: 0.7;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
  border-top: 1px solid var(--border);
}

.section-download {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(124, 92, 252, 0.06), transparent);
}

.section-header {
  text-align: center;
  margin-bottom: 56px;
}

.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-light);
  background: rgba(124, 92, 252, 0.1);
  border: 1px solid rgba(124, 92, 252, 0.15);
  padding: 5px 14px;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
}

.section-title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  background: linear-gradient(180deg, #fff 40%, rgba(255,255,255,0.55));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ===== CARDS GRID ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: all 0.35s;
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(124, 92, 252, 0.04), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
}

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

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

.card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(124, 92, 252, 0.1);
  border-radius: var(--radius);
  margin-bottom: 20px;
  color: var(--accent-light);
  transition: all 0.3s;
}

.card:hover .card-icon {
  background: rgba(124, 92, 252, 0.18);
  transform: scale(1.05);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* ===== DOWNLOAD SECTION ===== */
.download-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}

.download-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.download-info {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
}

.badge-version {
  background: rgba(124, 92, 252, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(124, 92, 252, 0.2);
}

.badge-android {
  background: rgba(16, 185, 129, 0.1);
  color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-signed {
  background: rgba(59, 130, 246, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.download-footnote {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
}

/* QR placeholder */
.download-qr {
  flex-shrink: 0;
}

.qr-placeholder {
  width: 180px;
  height: 180px;
  background: #fff;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.4);
}

.qr-icon {
  width: 80px;
  height: 80px;
  background: var(--bg);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  color: var(--accent);
}

.qr-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #666;
  text-align: center;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

/* ===== STEPS / INSTRUCTIONS ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 640px;
  margin: 0 auto;
}

.step {
  display: flex;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  opacity: 0;
  animation: step-in 0.6s ease-out forwards;
}

.step:nth-child(1) { animation-delay: 0.05s; }
.step:nth-child(2) { animation-delay: 0.15s; }
.step:nth-child(3) { animation-delay: 0.25s; }
.step:nth-child(4) { animation-delay: 0.35s; }
.step:nth-child(5) { animation-delay: 0.45s; }
.step:nth-child(6) { animation-delay: 0.55s; }

@keyframes step-in {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

.step:last-child {
  border-bottom: none;
}

.step-number {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  background: rgba(124, 92, 252, 0.12);
  color: var(--accent-light);
  border: 1px solid rgba(124, 92, 252, 0.2);
  border-radius: 50%;
}

.step-content {
  flex: 1;
  padding-top: 6px;
}

.step-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.step-desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.step-code {
  display: inline-block;
  font-size: 0.82rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 8px;
  margin-top: 8px;
  color: var(--accent-light);
  word-break: break-all;
}

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

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-logo {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.heart {
  color: #f472b6;
  display: inline-block;
  animation: heart-beat 1.4s ease-in-out infinite;
}

@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(1); }
  75% { transform: scale(1.1); }
}

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

.footer-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color 0.25s;
}

.footer-links a:hover {
  color: var(--accent-light);
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 260px;
    height: 100vh;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: rgba(10, 10, 15, 0.92);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-left: 1px solid var(--border);
    padding: 90px 32px 32px;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .nav-toggle:checked ~ .nav-links {
    right: 0;
  }

  .nav-links a {
    display: block;
    padding: 14px 0;
    font-size: 1.05rem;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  /* Hamburger animation */
  .nav-toggle:checked ~ .hamburger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle:checked ~ .hamburger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

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

  .download-content {
    flex-direction: column;
    gap: 32px;
  }

  .section {
    padding: 64px 0;
  }

  .hero {
    padding: 80px 20px 60px;
  }
}

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

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

  html {
    scroll-behavior: auto;
  }
}
