/* ═══════════════════════════════════════════════════════
   VoQab Presentation Website — Riad Theme
   Colors: garden green (#5B8C5A), terracotta (#C07830),
           cream (#F9F6F0), dark brown (#2D2418)
   ═══════════════════════════════════════════════════════ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #F9F6F0;
  --bg-alt:     #F2EDE4;
  --surface:    #FFFFFF;
  --surface-strong: #EDE7DA;
  --border:     #D9D0C0;
  --text:       #2D2418;
  --text-muted: #7A6E5D;
  --accent:     #5B8C5A;
  --accent-dark:#3D6B3D;
  --gold:       #C07830;
  --gold-light: #FDF4EB;
  --error:      #B23E32;
  --radius:     12px;
  --radius-sm:  8px;
  --shadow:     0 2px 12px rgba(45, 36, 24, 0.08);
  --shadow-lg:  0 8px 32px rgba(45, 36, 24, 0.12);
  --font:       'Merriweather', Georgia, serif;
  --font-ar:    'Amiri', 'Merriweather', serif;
  --nav-h:      64px;
}

html { scroll-behavior: smooth; scroll-padding-top: var(--nav-h); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

/* RTL support */
[dir="rtl"] body { font-family: var(--font-ar); }
[dir="rtl"] .hero-inner { direction: rtl; }
[dir="rtl"] .feat-card, [dir="rtl"] .lang-card { text-align: right; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .store-icon { margin-right: 0; margin-left: 12px; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; }

/* ─── Nav ──────────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(249, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
  height: 100%;
}
.nav-brand {
  font-size: 1.25rem; font-weight: 900;
  color: var(--text); text-decoration: none;
}
.nav-links {
  display: flex; align-items: center; gap: 24px;
}
.nav-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 700;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

/* Language switcher */
.lang-switch { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface-strong); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 6px 12px;
  font-family: inherit; font-size: 0.85rem; font-weight: 700;
  color: var(--text); cursor: pointer; transition: all 0.2s;
}
.lang-btn:hover { border-color: var(--accent); }
.lang-dropdown {
  display: none; position: absolute; top: calc(100% + 6px); right: 0;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  min-width: 180px; max-height: 360px;
  overflow-y: auto; z-index: 200;
}
[dir="rtl"] .lang-dropdown { right: auto; left: 0; }
.lang-dropdown.open { display: block; }
.lang-dropdown button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 14px; border: none; background: none;
  font-family: inherit; font-size: 0.85rem; color: var(--text);
  cursor: pointer; text-align: left; transition: background 0.15s;
}
[dir="rtl"] .lang-dropdown button { text-align: right; }
.lang-dropdown button:hover { background: var(--bg-alt); }
.lang-dropdown button.active { background: var(--gold-light); color: var(--accent-dark); font-weight: 700; }

/* ─── Hero ─────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  background: linear-gradient(170deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.hero-inner {
  max-width: 1100px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900; line-height: 1.2; color: var(--text);
  margin-bottom: 20px;
}
.hero-sub {
  font-size: 1.1rem; color: var(--text-muted); line-height: 1.8;
  margin-bottom: 36px; max-width: 520px;
}
.hero-ctas { display: flex; gap: 16px; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 12px 24px; border-radius: var(--radius);
  text-decoration: none; font-family: inherit; font-weight: 700;
  font-size: 0.9rem; transition: all 0.2s; border: 2px solid transparent;
}
.btn span { display: flex; flex-direction: column; text-align: left; }
[dir="rtl"] .btn span { text-align: right; }
.btn small { font-size: 0.7rem; font-weight: 400; opacity: 0.8; }
.btn strong { font-size: 0.85rem; }
.store-icon { width: 24px; height: 24px; flex-shrink: 0; }

.btn-primary {
  background: var(--accent); color: #fff;
  border-color: var(--accent);
}
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
.btn-secondary {
  background: var(--surface); color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-disabled { opacity: 0.7; pointer-events: none; }

/* Phone mockup */
.hero-visual { display: flex; justify-content: center; }
.phone-frame {
  width: 280px; height: 560px;
  background: var(--text); border-radius: 40px;
  padding: 12px; box-shadow: var(--shadow-lg);
  position: relative;
}
.phone-frame::before {
  content: ''; position: absolute; top: 12px; left: 50%; transform: translateX(-50%);
  width: 80px; height: 24px; background: var(--text); border-radius: 0 0 14px 14px;
  z-index: 2;
}
.phone-screen {
  width: 100%; height: 100%;
  background: var(--bg); border-radius: 28px;
  overflow: hidden; display: flex; align-items: center; justify-content: center;
}
.phone-demo {
  text-align: center; padding: 24px;
}
.demo-arabic {
  font-family: var(--font-ar); font-size: 2rem; font-weight: 700;
  color: var(--accent-dark); margin-bottom: 8px;
  direction: rtl;
}
.demo-label {
  font-size: 0.9rem; color: var(--text-muted); margin-bottom: 24px;
}
.demo-choices { display: flex; flex-direction: column; gap: 8px; }
.demo-choice {
  padding: 10px 16px; border-radius: var(--radius-sm);
  background: var(--surface); border: 1.5px solid var(--border);
  font-size: 0.8rem; color: var(--text); text-align: left;
}
[dir="rtl"] .demo-choice { text-align: right; }
.demo-choice.correct {
  background: rgba(91, 140, 90, 0.12);
  border-color: var(--accent); color: var(--accent-dark);
  font-weight: 700;
}

.hero-pattern {
  position: absolute; bottom: -2px; left: 0; right: 0; height: 80px;
  background: var(--surface);
  clip-path: ellipse(60% 100% at 50% 100%);
}

/* ─── Features ─────────────────────────────────────────── */
.features {
  background: var(--surface);
  padding: 80px 0;
}
.features h2, .languages h2 {
  text-align: center; font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 900; margin-bottom: 12px; color: var(--text);
}
.section-sub {
  text-align: center; color: var(--text-muted);
  font-size: 1rem; margin-bottom: 48px; max-width: 600px; margin-left: auto; margin-right: auto;
}
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
  margin-top: 48px;
}
.feat-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 24px;
  text-align: center; transition: all 0.25s;
}
.feat-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow);
  border-color: var(--accent);
}
.feat-icon { font-size: 2.5rem; margin-bottom: 16px; }
.feat-card h3 {
  font-size: 1.1rem; font-weight: 700; margin-bottom: 8px;
  color: var(--text);
}
.feat-card p {
  font-size: 0.9rem; color: var(--text-muted); line-height: 1.6;
}

/* ─── Languages ────────────────────────────────────────── */
.languages {
  padding: 80px 0;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg) 100%);
}
.lang-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px;
  margin-top: 40px;
}
.lang-card {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 700; color: var(--text);
  cursor: pointer; transition: all 0.2s;
}
.lang-card:hover {
  border-color: var(--accent); background: var(--gold-light);
  transform: translateY(-2px); box-shadow: var(--shadow);
}
.lang-card.active {
  border-color: var(--accent); background: rgba(91, 140, 90, 0.08);
}
.lang-flag { font-size: 1.4rem; }

/* ─── Footer ───────────────────────────────────────────── */
.footer {
  background: var(--text); color: var(--bg); padding: 40px 0;
  text-align: center;
}
.footer p { font-size: 0.95rem; opacity: 0.9; margin-bottom: 12px; }
.footer-links { display: flex; gap: 24px; justify-content: center; }
.footer-links a {
  color: var(--gold-light); text-decoration: none; font-size: 0.85rem;
  transition: opacity 0.2s;
}
.footer-links a:hover { opacity: 0.7; }

/* ─── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-ctas { justify-content: center; }
  .hero-visual { margin-top: 40px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .btn span { text-align: center; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-ctas { flex-direction: column; align-items: center; }
  .btn { width: 100%; max-width: 300px; justify-content: center; }
  .phone-frame { width: 220px; height: 440px; }
  .demo-arabic { font-size: 1.5rem; }
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .nav-links a:not(.lang-switch) { display: none; }
}
