/* ============================================================================
   Baran (بران) — main stylesheet
   Lifted verbatim from the original HTML so the rendered output is identical.
   ============================================================================ */

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

:root {
  --primary: #944a00;
  --on-primary: #fff;
  --primary-container: #e67e22;
  --on-primary-container: #502600;
  --secondary: #4e6073;
  --on-secondary: #fff;
  --secondary-container: #cfe2f9;
  --tertiary: #865300;
  --tertiary-container: #d78800;
  --surface: #f7f9fb;
  --surface-dim: #d8dadc;
  --surface-container: #eceef0;
  --surface-container-low: #f2f4f6;
  --surface-container-lowest: #fff;
  --surface-container-high: #e6e8ea;
  --on-surface: #191c1e;
  --on-surface-variant: #564337;
  --outline: #897365;
  --outline-variant: #dcc1b1;
  --error: #ba1a1a;
  --on-error: #fff;
  --inverse-surface: #2d3133;
  --inverse-on-surface: #eff1f3;
  --font: 'IBM Plex Sans Arabic', sans-serif;
  --radius-sm: 0.25rem;
  --radius: 0.5rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  --space-base: 8px;
  --space-margin: 20px;
  --space-gutter: 16px;
  --space-gap: 12px;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--surface);
  color: var(--on-surface);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; font-family: var(--font); }

.material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  display: inline-block; line-height: 1; text-transform: none;
  letter-spacing: normal; word-wrap: normal; white-space: nowrap; direction: ltr;
}
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--space-margin); }

/* === Header === */
.header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 251, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(220, 193, 177, .3);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
}
.header-inner {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px var(--space-margin); max-width: 1200px; margin: 0 auto;
}
.header-right { display: flex; align-items: center; gap: 32px; }
.logo img { height: 44px; width: auto; object-fit: contain; }
.nav { display: flex; gap: 24px; }
.nav a { font-size: 14px; font-weight: 500; color: var(--secondary); transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--primary); }
.nav a.active { font-weight: 700; border-bottom: 2px solid var(--primary); padding-bottom: 2px; }

.btn-download {
  background: var(--primary-container); color: var(--on-primary-container);
  padding: 10px 24px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 500;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  transition: all .2s; display: inline-flex; align-items: center;
}
.btn-download:hover { opacity: .9; }
.btn-download:active { transform: scale(.95); }

.menu-btn { display: none; background: none; color: var(--on-surface); font-size: 0; }
.menu-btn .material-symbols-outlined { font-size: 28px; }
.mobile-menu {
  display: none; flex-direction: column; gap: 16px;
  padding: 16px var(--space-margin); background: var(--surface);
  border-bottom: 1px solid rgba(220, 193, 177, .3);
}
.mobile-menu a { font-size: 14px; font-weight: 500; color: var(--secondary); }
.mobile-menu a.active { color: var(--primary); font-weight: 700; }
.mobile-menu.open { display: flex; }

/* === Hero === */
.hero { padding: 48px 0 64px; overflow: hidden; }
.hero .container { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.hero-text { text-align: right; }
.hero-subtitle { color: var(--primary); font-size: 35px; font-weight: 600; line-height: 32px; margin-bottom: 16px; }
.hero-title { font-size: 32px; font-weight: 700; line-height: 44px; margin-bottom: 24px; }
.hero-title span { color: var(--primary); }
.hero-desc { font-size: 18px; line-height: 26px; color: var(--secondary); margin-bottom: 32px; max-width: 540px; }

.store-buttons { display: flex; flex-wrap: wrap; gap: 16px; }
.store-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--on-surface); color: var(--surface);
  padding: 12px 24px; border-radius: var(--radius-md);
  transition: opacity .2s;
}
.store-btn:hover { opacity: .9; }
.store-btn .text { text-align: right; }
.store-btn .text .small { font-size: 10px; opacity: .7; line-height: 1; }
.store-btn .text .big { font-size: 18px; font-weight: 700; line-height: 1; }
.cta-store-btn { background: #fff; color: var(--on-surface); }

.hero-phone { position: relative; display: flex; justify-content: center; }
.phone-glow {
  position: absolute; inset: 0;
  background: rgba(148, 74, 0, .1);
  border-radius: 50%; filter: blur(48px);
  transform: scale(1.1); z-index: 0;
}
.phone-frame { position: relative; width: 250px; aspect-ratio: 9/19.5; perspective: 1000px; z-index: 1; }
.phone-body {
  width: 100%; height: 100%; background: #121212;
  border-radius: 2.5rem; border: 6px solid #2c2c2c;
  box-shadow: 20px 40px 60px -15px rgba(0, 0, 0, .5);
  transform: rotateY(-15deg) rotateX(10deg) rotateZ(7deg);
  overflow: hidden; position: relative;
}
.phone-screen { position: absolute; inset: 0; border-radius: 1.8rem; overflow: hidden; background: #fff; }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; }
.phone-gloss {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, .1), transparent 50%, rgba(255, 255, 255, .05));
  pointer-events: none;
}

/* === Features === */
.features { padding: 80px 0; background: var(--surface-container-low); }
.section-header { text-align: center; margin-bottom: 64px; }
.section-header h2 { font-size: 24px; font-weight: 600; line-height: 32px; margin-bottom: 16px; }
.section-header .bar { height: 4px; width: 80px; background: var(--primary); margin: 0 auto; border-radius: var(--radius-full); }

.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.feature-card {
  background: var(--surface-container-lowest);
  padding: 32px; border-radius: var(--radius-xl);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .06);
  border: 1px solid rgba(220, 193, 177, .2);
  transition: box-shadow .3s;
}
.feature-card:hover { box-shadow: 0 4px 16px rgba(0, 0, 0, .1); }
.feature-icon {
  width: 48px; height: 48px;
  background: rgba(148, 74, 0, .1);
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: var(--primary); margin-bottom: 24px;
}
.feature-icon .material-symbols-outlined { font-size: 28px; }
.feature-card h3 { font-size: 20px; font-weight: 600; line-height: 28px; margin-bottom: 12px; }
.feature-card p { font-size: 16px; line-height: 24px; color: var(--secondary); }

/* === Tools === */
.tools { padding: 80px 0; background: var(--surface-container); overflow: hidden; }
.tools .container { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.compass-wrap { display: flex; justify-content: center; }
.compass {
  width: 450px; height: 450px;
  border-radius: 50%; border: 1px solid rgba(220, 193, 177, .3);
  position: relative; display: flex; align-items: center; justify-content: center;
}
.compass-bg { position: absolute; inset: 0; background: rgba(255, 255, 255, .5); border-radius: 50%; box-shadow: inset 0 2px 12px rgba(0, 0, 0, .06); }
.compass-ring {
  width: calc(100% - 64px); height: calc(100% - 64px);
  border-radius: 50%; border: 4px dashed rgba(148, 74, 0, .2);
  animation: spin 60s linear infinite; position: relative;
}
@keyframes spin { to { transform: rotate(360deg); } }
.compass-value { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.compass-deg { font-size: 32px; font-weight: 900; color: var(--on-surface); }
.compass-dir { color: var(--primary); font-weight: 700; font-size: 20px; }
.compass-north {
  position: absolute; top: 0; left: 50%;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
}
.compass-north .diamond {
  width: 16px; height: 16px;
  background: var(--primary);
  transform: rotate(45deg);
  margin-bottom: 4px;
}
.compass-north span { color: var(--primary); font-weight: 700; }

.tools-text { text-align: right; }
.tools-text h2 { font-size: 24px; font-weight: 600; line-height: 32px; margin-bottom: 24px; }
.tools-text > p { font-size: 18px; line-height: 26px; color: var(--secondary); margin-bottom: 40px; }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.stat-card {
  background: var(--surface-container-lowest);
  padding: 24px; border-radius: var(--radius-xl);
  display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
}
.stat-icon {
  width: 40px; height: 40px;
  background: rgba(207, 226, 249, .3);
  color: var(--secondary);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.stat-label { font-size: 12px; font-weight: 500; color: var(--outline); }
.stat-value { font-size: 20px; font-weight: 600; line-height: 28px; }

/* === CTA === */
.cta { padding: 96px 0; position: relative; overflow: hidden; }
.cta-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; }
.cta-overlay { position: absolute; inset: 0; background: rgba(25, 28, 30, .6); z-index: 1; }
.cta .container { position: relative; z-index: 2; text-align: center; color: var(--surface); }
.cta h2 { font-size: 32px; font-weight: 700; line-height: 44px; margin-bottom: 32px; }
.cta > div > p { font-size: 18px; line-height: 26px; opacity: .9; max-width: 640px; margin: 0 auto 48px; }
.cta-buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; }
.btn-cta-primary {
  background: var(--primary-container); color: var(--on-primary-container);
  padding: 16px 40px; border-radius: var(--radius-full);
  font-size: 20px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
  transition: all .2s;
}
.btn-cta-primary:hover { transform: scale(1.05); }
.btn-cta-primary:active { transform: scale(.95); }
.btn-cta-secondary {
  background: rgba(255, 255, 255, .1); backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .3); color: #fff;
  padding: 16px 40px; border-radius: var(--radius-full);
  font-size: 20px; font-weight: 600;
  transition: background .2s;
}
.btn-cta-secondary:hover { background: rgba(255, 255, 255, .2); }

/* === Footer === */
.footer { background: var(--surface-container); border-top: 1px solid var(--outline-variant); padding: 48px 0; margin-top: auto; }
.footer .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 32px; }
.footer-brand { display: flex; flex-direction: column; gap: 8px; }
.footer-brand .name { font-size: 20px; font-weight: 600; color: var(--on-surface); }
.footer-brand .tagline { font-size: 16px; color: var(--secondary); }
.footer-links { display: flex; gap: 32px; }
.footer-links a { font-size: 16px; color: var(--secondary); transition: all .2s; }
.footer-links a:hover { color: var(--primary); text-decoration: underline; }
.footer-copy { font-size: 16px; color: var(--secondary); }

/* === Contact === */
.contact { padding: 80px 0; background: var(--surface-container-low); flex: 1; }
.contact .section-header { text-align: center; margin-bottom: 48px; }
.contact .section-header h1,
.contact .section-header h2 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.contact .section-header p { font-size: 16px; color: var(--secondary); line-height: 24px; }
.contact-form {
  max-width: 700px; margin: 0 auto;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(220, 193, 177, .25);
  border-radius: var(--radius-xl); padding: 40px;
}
.form-group { margin-bottom: 24px; }
.form-group:last-of-type { margin-bottom: 32px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; text-align: right; }
.form-group input,
.form-group textarea {
  width: 100%; padding: 14px 16px;
  border: 1px solid rgba(220, 193, 177, .4);
  border-radius: var(--radius);
  font-family: var(--font); font-size: 15px;
  color: var(--on-surface); background: var(--surface);
  outline: none; transition: border-color .2s;
  text-align: right; direction: rtl;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--outline); opacity: .6; }
.form-group input:focus,
.form-group textarea:focus { border-color: var(--primary); }
.form-group input.invalid,
.form-group textarea.invalid { border-color: var(--error); }
.form-error { color: var(--error); font-size: 13px; margin-top: 6px; text-align: right; min-height: 16px; }
.form-group textarea { min-height: 130px; resize: vertical; }

.btn-submit {
  width: 100%; padding: 16px;
  background: var(--primary); color: var(--on-primary);
  font-size: 18px; font-weight: 600;
  border-radius: var(--radius);
  transition: opacity .2s;
  box-shadow: 0 4px 12px rgba(148, 74, 0, .25);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-submit:hover { opacity: .9; }
.btn-submit:active { transform: scale(.98); }
.btn-submit[disabled] { opacity: .65; cursor: not-allowed; }
.btn-submit .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .9s linear infinite;
  display: none;
}
.btn-submit.loading .spinner { display: inline-block; }

/* === Toast === */
.toast-overlay {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .4);
  backdrop-filter: blur(4px);
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .3s ease;
}
.toast-overlay.show { opacity: 1; pointer-events: all; }
.toast-box {
  background: #fff; border-radius: var(--radius-xl);
  padding: 48px 40px; text-align: center;
  max-width: 420px; width: 90%;
  box-shadow: 0 24px 48px rgba(0, 0, 0, .15);
  transform: scale(.85) translateY(20px);
  transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
}
.toast-overlay.show .toast-box { transform: scale(1) translateY(0); }
.toast-icon {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(46, 204, 113, .35);
}
.toast-icon.error { background: linear-gradient(135deg, #ff6b6b, #c0392b); box-shadow: 0 8px 24px rgba(231, 76, 60, .35); }
.toast-icon .material-symbols-outlined { font-size: 36px; color: #fff; font-variation-settings: 'FILL' 1, 'wght' 600; }
.toast-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--on-surface); }
.toast-msg { font-size: 15px; color: var(--secondary); line-height: 24px; margin-bottom: 28px; }
.toast-close-btn {
  background: var(--primary); color: var(--on-primary);
  border: none; padding: 12px 48px;
  border-radius: var(--radius-full);
  font-size: 16px; font-weight: 600;
  font-family: var(--font); cursor: pointer;
  transition: opacity .2s;
  box-shadow: 0 4px 12px rgba(148, 74, 0, .25);
}
.toast-close-btn:hover { opacity: .9; }

/* === Privacy === */
.privacy { padding: 64px 0 80px; background: var(--surface-container-low); flex: 1; }
.privacy-header { text-align: center; margin-bottom: 48px; }
.privacy-header h1 { font-size: 28px; font-weight: 700; margin-bottom: 12px; }
.privacy-header p { font-size: 16px; color: var(--secondary); line-height: 26px; max-width: 700px; margin: 0 auto; }
.privacy-card {
  max-width: 800px; margin: 0 auto;
  background: var(--surface-container-lowest);
  border: 1px solid rgba(220, 193, 177, .25);
  border-radius: var(--radius-xl); padding: 48px;
}
.privacy-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; margin-top: 36px; }
.privacy-card h2:first-child { margin-top: 0; }
.privacy-card p { font-size: 15px; line-height: 28px; color: var(--on-surface); }
.privacy-card ul { padding-right: 24px; margin: 8px 0; }
.privacy-card ul li { font-size: 15px; line-height: 28px; color: var(--on-surface); }
.privacy-card .last-updated {
  margin-top: 40px; padding-top: 24px;
  border-top: 1px solid rgba(220, 193, 177, .3);
  font-size: 14px; color: var(--outline);
  text-align: left; direction: rtl;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav { display: none; }
  .menu-btn { display: block; }
  .logo img { height: 36px; }
  .header-right { gap: 16px; }
  .btn-download { padding: 8px 16px; }

  .hero { padding: 48px 0; }
  .hero .container { grid-template-columns: 1fr; text-align: center; }
  .hero-text { text-align: center; }
  .hero-desc { margin: 0 auto 32px; }
  .store-buttons { justify-content: center; }
  .hero-title { font-size: 28px; line-height: 38px; }
  .phone-frame { width: 220px; }

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

  .tools .container { grid-template-columns: 1fr; }
  .compass { width: 280px; height: 280px; }
  .compass-ring { width: calc(100% - 48px); height: calc(100% - 48px); }
  .compass-deg { font-size: 24px; }
  .compass-dir { font-size: 16px; }
  .compass-north .diamond { width: 12px; height: 12px; }
  .tools-text { text-align: center; order: -1; }
  .stat-card { align-items: center; }

  .cta h2 { font-size: 24px; line-height: 32px; }

  .contact-form { padding: 24px; }
  .privacy-card { padding: 24px; }
  .privacy-header h1 { font-size: 24px; }

  .footer .container { flex-direction: column; text-align: center; align-items: center; }
  .footer-brand { align-items: center; }
  .footer-links { flex-wrap: wrap; justify-content: center; }
}
