:root {
  --bg-dark: #0d0b1e;
  --bg-card: #1a1530;
  --card-border: rgba(255, 255, 255, 0.06);
  --accent-green: #4ade80;
  --accent-green-dim: rgba(74, 222, 128, 0.15);
  --accent-purple: #8b5cf6;
  --accent-purple-dim: rgba(139, 92, 246, 0.15);
  --text-primary: #ffffff;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --surface-dim: #141028;
  --radius-md: 12px;
  --radius-lg: 16px;
  --font: 'Roboto', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* --- Header --- */
.header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: rgba(13, 11, 30, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.lang-wrapper {
  position: relative;
}

.lang-btn {
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}

.lang-btn:hover {
  border-color: var(--accent-green);
}

.lang-btn svg {
  width: 14px;
  height: 14px;
  transition: transform 0.2s;
}

.lang-btn.open svg {
  transform: rotate(180deg);
}

.lang-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  background: var(--bg-card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  min-width: 200px;
  max-height: 360px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s, visibility 0.2s;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.lang-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.65rem 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-family: var(--font);
  cursor: pointer;
  text-align: start;
  transition: background 0.15s, color 0.15s;
}

.lang-option:hover {
  background: var(--accent-green-dim);
  color: var(--text-primary);
}

.lang-option.active {
  color: var(--accent-green);
}

.lang-option .flag {
  font-size: 1.15rem;
}

/* --- Hero --- */
.hero {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3.25rem 1rem 1rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 5%;
  left: 50%;
  transform: translateX(-50%);
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-green-dim) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  object-fit: contain;
  filter: drop-shadow(0 0 24px var(--accent-green-dim));
  margin-bottom: 0.5rem;
}

.hero h1 {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 0.15rem;
}

.hero-tagline {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* --- Hero Feature Chips --- */
.hero-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  width: 100%;
  margin-bottom: 1.25rem;
}

.hero-chip {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(30, 26, 54, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.55rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-primary);
}

.hero-chip svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--accent-green);
}

.hero-chip:nth-child(2) svg,
.hero-chip:nth-child(4) svg {
  color: var(--accent-purple);
}

.hero-chip.chip-wide {
  grid-column: 1 / -1;
  justify-content: center;
}

.hero-chip.chip-wide svg {
  color: var(--accent-green);
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent-green);
  color: #052e16;
  font-weight: 700;
  font-size: 1rem;
  padding: 0.75rem 2rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: var(--font);
  transition: filter 0.2s, transform 0.15s;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}

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

.btn-primary svg {
  width: 20px;
  height: 20px;
}

.btn-download {
  width: 100%;
  max-width: 280px;
  justify-content: center;
  padding: 0.875rem 2rem;
  font-size: 1.05rem;
}

.download-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  margin-top: 0.5rem;
}

/* --- Features (below fold, detailed cards) --- */
.features {
  padding: 3rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

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

.feature-card {
  background: #1e1a36;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.feature-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.feature-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.feature-icon svg {
  width: 24px;
  height: 24px;
}

.feature-icon.green {
  background: var(--accent-green-dim);
  color: var(--accent-green);
}

.feature-icon.purple {
  background: var(--accent-purple-dim);
  color: var(--accent-purple);
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
}

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

/* --- Coming Soon --- */
.coming-soon {
  padding: 1rem 1rem 3rem;
  max-width: 800px;
  margin: 0 auto;
}

.teaser-card {
  background: #1e1a36;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-inline-start: 3px solid var(--accent-purple);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.teaser-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.teaser-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--accent-purple);
}

.teaser-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Footer --- */
.footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  border-top: 1px solid var(--card-border);
  color: var(--text-muted);
  font-size: 0.75rem;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.footer-link {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  transition: color 0.2s;
}

.footer-link:hover {
  color: var(--accent-green);
}

.footer-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--text-muted);
  border-radius: 3px;
}

/* ===================== */
/* --- Tablet (640+) --- */
/* ===================== */
@media (min-width: 640px) {
  .header {
    padding: 0.875rem 1.5rem;
  }

  .nav-logo {
    font-size: 1.25rem;
  }

  .lang-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .hero {
    padding: 4rem 2rem 2rem;
  }

  .hero-content {
    max-width: 560px;
  }

  .hero-logo {
    width: 110px;
    height: 110px;
    border-radius: 24px;
    margin-bottom: 1rem;
  }

  .hero h1 {
    font-size: 2.75rem;
    margin-bottom: 0.5rem;
  }

  .hero-tagline {
    font-size: 1.15rem;
    margin-bottom: 1.75rem;
  }

  .hero-features {
    gap: 0.75rem;
    margin-bottom: 2rem;
  }

  .hero-chip {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    border-radius: 12px;
  }

  .hero-chip svg {
    width: 20px;
    height: 20px;
  }

  .btn-download {
    max-width: 300px;
    font-size: 1.15rem;
    padding: 1rem 2.5rem;
  }

  .download-hint {
    font-size: 0.8rem;
  }

  .features {
    padding: 4rem 2rem;
  }

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

  .feature-card {
    padding: 1.75rem;
  }

  .coming-soon {
    padding: 2rem 2rem 4rem;
  }
}

/* ===================== */
/* --- Desktop (1024+) --- */
/* ===================== */
@media (min-width: 1024px) {
  .header {
    padding: 1rem 3rem;
  }

  .hero {
    padding: 5rem 3rem 3rem;
  }

  .hero-content {
    max-width: 640px;
  }

  .hero-logo {
    width: 130px;
    height: 130px;
    border-radius: 28px;
    margin-bottom: 1.25rem;
  }

  .hero h1 {
    font-size: 3.5rem;
  }

  .hero-tagline {
    font-size: 1.35rem;
    margin-bottom: 2rem;
  }

  .hero-features {
    gap: 0.875rem;
    margin-bottom: 2.5rem;
  }

  .hero-chip {
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
  }

  .hero-chip svg {
    width: 22px;
    height: 22px;
  }

  .hero::before {
    width: 700px;
    height: 700px;
  }

  .btn-download {
    max-width: 320px;
    font-size: 1.2rem;
  }

  .features-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
  }

  /* Center the 5th card on its own row */
  .features-grid .feature-card:nth-child(5) {
    grid-column: 2 / 4;
  }

  .feature-card {
    padding: 2rem;
  }
}

/* --- RTL --- */
[dir="rtl"] .lang-dropdown {
  inset-inline-end: 0;
}

/* --- Small screens (360px and below, like SE) --- */
@media (max-height: 700px) {
  .hero {
    padding-top: 3rem;
    padding-bottom: 1rem;
  }

  .hero-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    margin-bottom: 0.5rem;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-tagline {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
  }

  .hero-features {
    gap: 0.375rem;
    margin-bottom: 1rem;
  }

  .hero-chip {
    padding: 0.45rem 0.6rem;
    font-size: 0.72rem;
    gap: 0.35rem;
  }

  .hero-chip svg {
    width: 15px;
    height: 15px;
  }

  .btn-download {
    padding: 0.65rem 1.5rem;
    font-size: 0.95rem;
  }

  .download-hint {
    font-size: 0.7rem;
  }
}
