/* ═══════════════════════════════════════════════════════════════════════════
   BimPlot Website — Purple theme matching desktop app (#6B2FA0 → #9B59B6)
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  --primary: #6B2FA0;
  --primary-light: #9B59B6;
  --primary-dark: #5A2589;
  --primary-bg: #F8F4FC;
  --text: #333;
  --text-light: #666;
  --text-muted: #999;
  --bg: #fff;
  --bg-alt: #f9f9f9;
  --border: #e8e8e8;
  --radius: 12px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 30px rgba(107, 47, 160, 0.15);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  line-height: 1.6;
  background: var(--bg);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Navbar ─────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-content {
  gap: 16px;
}

.nav-links a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  box-shadow: 0 4px 15px rgba(107, 47, 160, 0.3);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(107, 47, 160, 0.4);
}

.btn-secondary {
  background: var(--bg);
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-bg);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: #fff;
}

.btn-lg {
  padding: 15px 36px;
  font-size: 16px;
}

.btn-block {
  display: block;
  width: 100%;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 140px 0 80px;
  text-align: center;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, #C39BD3 100%);
  color: #fff;
}

.hero h1 {
  font-size: 44px;
  font-weight: 800;
  margin-bottom: 18px;
  letter-spacing: -0.5px;
}

.hero-subtitle {
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto 30px;
  opacity: 0.9;
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin-top: 20px;
  font-size: 13px;
  opacity: 0.7;
}

/* ── Features ───────────────────────────────────────────────── */
.features {
  padding: 80px 0;
  background: var(--bg);
}

.features h2,
.pricing h2,
.download h2,
.faq h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 12px;
  color: var(--text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.feature-card {
  padding: 30px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: box-shadow 0.2s;
}

.feature-card:hover {
  box-shadow: var(--shadow);
}

.feature-icon {
  font-size: 36px;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 17px;
  margin-bottom: 8px;
  color: var(--text);
}

.feature-card p {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
}

/* ── Pricing ────────────────────────────────────────────────── */
.pricing {
  padding: 80px 0;
  background: var(--bg-alt);
}

.pricing-subtitle {
  text-align: center;
  color: var(--text-light);
  margin-bottom: 48px;
  font-size: 16px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}

.plan-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  position: relative;
  transition: box-shadow 0.2s;
}

.plan-card:hover {
  box-shadow: var(--shadow);
}

.plan-featured {
  border: 2px solid var(--primary);
  box-shadow: var(--shadow-lg);
  transform: scale(1.03);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--primary);
  color: #fff;
  padding: 4px 18px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
}

.plan-card h3 {
  font-size: 20px;
  margin-bottom: 8px;
  text-align: center;
}

.plan-price {
  text-align: center;
  margin: 16px 0;
}

.price-amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--primary);
}

.price-period {
  display: block;
  font-size: 14px;
  color: var(--text-muted);
}

.plan-desc {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 20px;
}

.plan-features {
  list-style: none;
  margin-bottom: 28px;
}

.plan-features li {
  padding: 7px 0;
  font-size: 14px;
  color: var(--text-light);
  position: relative;
  padding-left: 24px;
}

.plan-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 700;
}

/* ── Download ───────────────────────────────────────────────── */
.download {
  padding: 80px 0;
  text-align: center;
  background: var(--bg);
}

.download p {
  color: var(--text-light);
  margin-bottom: 24px;
  font-size: 16px;
}

.download .btn {
  margin-bottom: 16px;
}

.download-meta {
  font-size: 13px;
  color: var(--text-muted);
}

.download-note {
  font-size: 14px;
  color: var(--text-light);
  margin-top: 12px;
}

/* ── FAQ ────────────────────────────────────────────────────── */
.faq {
  padding: 80px 0;
  background: var(--bg-alt);
}

.faq-list {
  max-width: 700px;
  margin: 40px auto 0;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  padding: 18px 0;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::after {
  content: "+";
  font-size: 20px;
  color: var(--primary);
  font-weight: 300;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  padding: 0 0 18px;
  color: var(--text-light);
  font-size: 14px;
  line-height: 1.7;
}

/* ── Footer ─────────────────────────────────────────────────── */
.footer {
  padding: 30px 0;
  background: var(--text);
  color: #999;
  text-align: center;
}

.footer-content p {
  font-size: 13px;
  margin: 4px 0;
}

.footer a {
  color: var(--primary-light);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* ── Result Pages (success / cancel) ────────────────────────── */
.result-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 40px 24px;
}

.result-page h1 {
  font-size: 36px;
  margin-bottom: 16px;
  color: var(--text);
}

.result-page .icon {
  font-size: 64px;
  margin-bottom: 24px;
}

.result-page p {
  font-size: 16px;
  color: var(--text-light);
  max-width: 500px;
  margin-bottom: 12px;
  line-height: 1.7;
}

.result-page .btn {
  margin-top: 24px;
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 30px;
  }

  .hero-subtitle {
    font-size: 15px;
  }

  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .plan-featured {
    transform: none;
    order: -1;
  }

  .nav-links {
    gap: 16px;
  }

  .nav-links a {
    font-size: 13px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 26px;
  }

  .nav-links {
    display: none;
  }

  .lang-selector {
    margin-left: auto;
  }

  .hero-actions {
    flex-direction: column;
    align-items: center;
  }
}

/* ── Language Selector ────────────────────────────────────── */
.lang-selector {
  position: relative;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 5px 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-light);
  transition: border-color 0.2s;
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.lang-globe {
  font-size: 15px;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  max-height: 320px;
  overflow-y: auto;
  min-width: 150px;
}

.lang-dropdown.open {
  display: block;
}

.lang-option {
  display: block;
  width: 100%;
  padding: 8px 16px;
  background: none;
  border: none;
  text-align: left;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
  transition: background 0.15s;
}

.lang-option:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* ── RTL Support ──────────────────────────────────────────── */
[dir="rtl"] .nav-content {
  flex-direction: row-reverse;
}

[dir="rtl"] .nav-links {
  flex-direction: row-reverse;
}

[dir="rtl"] .plan-features li {
  padding-left: 0;
  padding-right: 24px;
}

[dir="rtl"] .plan-features li::before {
  left: auto;
  right: 0;
}

[dir="rtl"] .faq-item summary {
  flex-direction: row-reverse;
}

[dir="rtl"] .lang-dropdown {
  right: auto;
  left: 0;
}

[dir="rtl"] .lang-option {
  text-align: right;
}

/* ── Hebrew font ──────────────────────────────────────────── */
[lang="he"] body,
[lang="he"] .hero h1,
[lang="he"] h1,
[lang="he"] h2,
[lang="he"] h3,
[lang="he"] .faq-item summary {
  font-family: Arial, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif !important;
}
