:root {
  --teal: #00897b;
  --teal-dark: #00695c;
  --teal-light: #4db6ac;
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a2421;
  --text-muted: #5b6b66;
  --border: #e4e9e7;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1513;
    --surface: #161e1c;
    --text: #eef2f0;
    --text-muted: #9fb0ab;
    --border: #263230;
    --shadow: 0 2px 16px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 24px;
}

header.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  position: sticky;
  top: 0;
  z-index: 10;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: 880px;
  margin: 0 auto;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text);
}

.brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 0.95rem;
  font-weight: 500;
}

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

.nav-links a.active,
.nav-links a:hover {
  color: var(--teal);
  text-decoration: none;
}

main {
  padding: 56px 0 80px;
}

.hero {
  text-align: center;
  padding: 24px 24px 8px;
}

.hero img.app-icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.hero h1 {
  font-size: 2.1rem;
  margin: 0 0 6px;
  letter-spacing: -0.02em;
}

.hero .arabic {
  font-size: 1.6rem;
  color: var(--teal);
  margin: 0 0 18px;
  direction: rtl;
}

.hero p.tagline {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 32px;
}

.download-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #111;
  color: #fff;
  padding: 11px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  border: 1px solid #111;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.store-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
  opacity: 0.9;
}

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

.store-btn .btn-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.1;
}

.store-btn .btn-text small { font-size: 0.68rem; opacity: 0.85; }
.store-btn .btn-text strong { font-size: 1rem; }

.store-btn.disabled {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: default;
  pointer-events: none;
}

.store-btn.disabled svg { opacity: 0.5; }

section.features {
  padding: 48px 24px 0;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 22px;
  box-shadow: var(--shadow);
}

.feature-card .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(0, 137, 123, 0.12);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-card h3 {
  margin: 0 0 6px;
  font-size: 1.02rem;
}

.feature-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
}

h2.section-title {
  font-size: 1.4rem;
  text-align: center;
  margin: 0;
}

p.section-sub {
  text-align: center;
  color: var(--text-muted);
  max-width: 480px;
  margin: 8px auto 0;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

footer.site-footer a { color: var(--text-muted); margin: 0 8px; }
footer.site-footer a:hover { color: var(--teal); }

/* Page header used on support / privacy */
.page-head {
  text-align: center;
  padding: 8px 24px 40px;
}

.page-head h1 {
  font-size: 1.9rem;
  margin: 0 0 10px;
}

.page-head p {
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

/* Support form */
.support-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 32px;
  max-width: 560px;
  margin: 0 auto;
}

.form-row { margin-bottom: 18px; }

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-muted);
}

.form-row input,
.form-row select,
.form-row textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  resize: vertical;
}

.form-row input:focus,
.form-row select:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.15);
}

.submit-btn {
  width: 100%;
  background: var(--teal);
  color: #fff;
  border: none;
  padding: 13px 18px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease;
}

.submit-btn:hover { background: var(--teal-dark); }
.submit-btn:disabled { opacity: 0.75; cursor: default; }

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: none;
}

.submit-btn.loading .spinner { display: inline-block; }
.submit-btn.loading .btn-label { display: none; }

@keyframes spin { to { transform: rotate(360deg); } }

.form-status {
  margin-top: 16px;
  font-size: 0.88rem;
  text-align: center;
  display: none;
}

.form-status.visible { display: block; }
.form-status.success { color: var(--teal-dark); }
.form-status.error { color: #c0392b; }

.success-panel {
  text-align: center;
  padding: 20px 8px 4px;
}

.success-panel .check {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(0, 137, 123, 0.12);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.success-panel h3 { margin: 0 0 8px; }
.success-panel p { color: var(--text-muted); margin: 0 0 20px; font-size: 0.92rem; }

.support-alt {
  text-align: center;
  margin-top: 20px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Privacy policy */
.policy {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

.policy h2 {
  font-size: 1.15rem;
  margin: 36px 0 10px;
}

.policy h2:first-child { margin-top: 0; }

.policy p, .policy li {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.policy ul { padding-left: 20px; }

.policy .updated {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 40px;
}

@media (max-width: 560px) {
  .nav { flex-direction: row; padding: 14px 18px; }
  .nav-links { gap: 14px; font-size: 0.88rem; }
  .hero h1 { font-size: 1.7rem; }
  .support-card { padding: 22px; }
}
