/* QM Farming — landing site
   Brand-green design, mobile-first, RTL primary. */

:root {
  --brand-dark: #1a5a3d;
  --brand-mid: #206747;
  --brand-light: #3aab7a;
  --gold: #dcaf3c;
  --bg: #f5f9f7;
  --surface: #ffffff;
  --text: #1a2a23;
  --text-mute: #5b6c64;
  --border: #e2ebe6;
  --shadow-sm: 0 2px 8px rgba(26, 90, 61, 0.08);
  --shadow-md: 0 6px 24px rgba(26, 90, 61, 0.12);
  --shadow-lg: 0 18px 50px rgba(26, 90, 61, 0.18);
  --radius: 14px;
  --radius-lg: 22px;
  --max: 1180px;
  --font: 'Cairo', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 22px;
}

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 19px;
  color: var(--brand-dark);
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.5px;
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex;
  gap: 26px;
  align-items: center;
}
.nav a {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-mute);
  transition: color .2s;
}
.nav a:hover { color: var(--brand-dark); }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14.5px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-dark));
  color: #fff;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost {
  background: transparent;
  color: var(--brand-dark);
  border-color: var(--border);
}
.btn-ghost:hover { background: #fff; border-color: var(--brand-light); }
.btn-white {
  background: #fff;
  color: var(--brand-dark);
}
.btn-white:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
/* Header CTA: lighter than .btn-primary so it doesn't overpower the clean
   white header. Soft brand-green tint + clear green border + green text
   make the affordance obvious without being heavy. Fills green on hover. */
.btn-nav {
  background: rgba(58, 171, 122, 0.10);
  color: var(--brand-dark);
  border: 1.5px solid rgba(58, 171, 122, 0.45);
  padding: 9px 18px;
  font-size: 14px;
}
.btn-nav i { color: var(--brand-mid); transition: color .15s; }
.btn-nav:hover {
  background: var(--brand-mid);
  color: #fff;
  border-color: var(--brand-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(32, 103, 71, 0.28);
}
.btn-nav:hover i { color: #fff; }
.lang-toggle {
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 700;
  font-size: 13px;
  color: var(--brand-dark);
  cursor: pointer;
}
.nav-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
  cursor: pointer;
  color: var(--brand-dark);
}
.nav-toggle svg { display: block; }

@media (max-width: 860px) {
  .nav { display: none; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    padding: 18px 22px 22px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 14px;
  }
  .nav-toggle { display: inline-flex; align-items: center; }
}

/* ===== Hero ===== */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand-mid) 55%, var(--brand-light) 110%);
  color: #fff;
  padding: 96px 0 110px;
}
.hero::before {
  content: "";
  position: absolute;
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.18), transparent 60%);
  top: -240px;
  inset-inline-end: -180px;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  width: 540px;
  height: 540px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 175, 60, .25), transparent 60%);
  bottom: -180px;
  inset-inline-start: -120px;
  pointer-events: none;
}
.hero .container {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 60px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 22px;
  backdrop-filter: blur(6px);
}
.hero h1 {
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.18;
  font-weight: 800;
  margin: 0 0 18px;
  letter-spacing: -0.5px;
}
.hero h1 .accent { color: var(--gold); }
.hero p.lead {
  font-size: 19px;
  line-height: 1.75;
  margin: 0 0 30px;
  color: rgba(255, 255, 255, 0.92);
  max-width: 540px;
}
.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 36px;
}
.store-badges {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: #0f1a14;
  color: #fff;
  border-radius: 14px;
  padding: 11px 20px;
  transition: transform .15s ease;
}
.store-badge:hover { transform: translateY(-2px); }
.store-badge .b-icon {
  font-size: 28px;
  line-height: 1;
}
.store-badge .b-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.store-badge .b-text small {
  font-size: 11px;
  opacity: 0.7;
  margin-bottom: 2px;
}
.store-badge .b-text strong {
  font-size: 17px;
  font-weight: 700;
}

/* Hero mockup */
.hero-mockup {
  position: relative;
  display: flex;
  justify-content: center;
}
.phone-frame {
  position: relative;
  width: 320px;
  max-width: 100%;
  aspect-ratio: 9 / 19.5;
  background: #0f1a14;
  border-radius: 44px;
  padding: 12px;
  box-shadow: 0 40px 100px rgba(0,0,0,.35);
  transform: rotate(-3deg);
}
.phone-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 32px;
}
.phone-frame::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 110px;
  height: 22px;
  background: #0f1a14;
  border-radius: 14px;
  z-index: 2;
}
.phone-frame.behind {
  position: absolute;
  inset-inline-end: -50px;
  top: 30px;
  width: 240px;
  transform: rotate(8deg);
  opacity: 0.85;
  z-index: -1;
}

@media (max-width: 860px) {
  .hero { padding: 64px 0 70px; }
  .hero .container { grid-template-columns: 1fr; gap: 40px; }
  .hero-mockup { display: none; }
}

/* ===== Sections ===== */
section {
  padding: 88px 0;
}
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-mid);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.section-head h2 {
  font-size: clamp(28px, 3.6vw, 38px);
  font-weight: 800;
  margin: 0 0 14px;
  color: var(--brand-dark);
  letter-spacing: -0.4px;
}
.section-head p {
  font-size: 17px;
  color: var(--text-mute);
  max-width: 620px;
  margin: 0 auto;
}

/* Features grid */
.features {
  background: #fff;
}
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
.feature {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.feature:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-light);
}
.feature-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 26px;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}
.feature h3 {
  font-size: 19px;
  margin: 0 0 10px;
  color: var(--brand-dark);
  font-weight: 800;
}
.feature p {
  margin: 0;
  font-size: 15px;
  color: var(--text-mute);
  line-height: 1.7;
}

@media (max-width: 860px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* Steps */
.steps {
  background: var(--bg);
}
.step-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}
.step {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 22px;
  text-align: center;
  position: relative;
}
.step-num {
  position: absolute;
  top: -18px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--gold);
  color: #1a2a23;
  font-weight: 800;
  display: grid;
  place-items: center;
  box-shadow: var(--shadow-sm);
}
.step h3 {
  margin: 18px 0 8px;
  font-size: 18px;
  color: var(--brand-dark);
}
.step p {
  margin: 0;
  font-size: 14.5px;
  color: var(--text-mute);
}

@media (max-width: 860px) {
  .step-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .step-grid { grid-template-columns: 1fr; }
}

/* App showcase */
.showcase {
  background: linear-gradient(180deg, #fff, var(--bg));
}
.showcase-rows {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 80px;
}
.showcase-rows:nth-child(even) {
  grid-template-columns: 1fr 1.2fr;
}
.showcase-rows:nth-child(even) .showcase-text { order: 2; }
.showcase-text h3 {
  font-size: clamp(24px, 3vw, 30px);
  margin: 0 0 16px;
  color: var(--brand-dark);
  font-weight: 800;
}
.showcase-text p {
  font-size: 16.5px;
  color: var(--text-mute);
  margin: 0 0 18px;
}
.showcase-text ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.showcase-text li {
  position: relative;
  padding-inline-start: 28px;
  margin-bottom: 10px;
  font-size: 15px;
}
.showcase-text li::before {
  content: "✓";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--brand-light);
  color: #fff;
  font-size: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
}
.showcase-img {
  display: flex;
  justify-content: center;
}
.showcase-img .phone-frame {
  transform: rotate(0deg);
}

@media (max-width: 860px) {
  .showcase-rows,
  .showcase-rows:nth-child(even) { grid-template-columns: 1fr; gap: 36px; }
  .showcase-rows:nth-child(even) .showcase-text { order: initial; }
}

/* CTA */
.cta {
  padding: 64px 0;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
  color: #fff;
}
.cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-inner h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
}
.cta-inner p {
  margin: 0;
  color: rgba(255,255,255,.85);
  font-size: 16px;
}

/* Footer */
.site-footer {
  background: #0e1f17;
  color: rgba(255, 255, 255, 0.7);
  padding: 56px 0 26px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  margin-bottom: 36px;
}
.footer-grid h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin: 0 0 16px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-grid ul {
  padding: 0;
  margin: 0;
  list-style: none;
}
.footer-grid li {
  margin-bottom: 10px;
}
.footer-grid a {
  color: rgba(255,255,255,.7);
  font-size: 14.5px;
  transition: color .15s;
}
.footer-grid a:hover { color: var(--gold); }
.footer-about {
  font-size: 14.5px;
  line-height: 1.8;
}
.footer-about .brand { color: #fff; margin-bottom: 14px; }
.footer-about .brand-mark { box-shadow: none; }
.socials {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 16px;
  transition: background .15s;
}
.socials a:hover { background: var(--brand-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 22px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
}

@media (max-width: 860px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* ===== Inner pages (privacy / terms / contact) ===== */
.page-hero {
  background: linear-gradient(135deg, var(--brand-dark), var(--brand-mid));
  color: #fff;
  padding: 80px 0 56px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  margin: 0 0 12px;
  letter-spacing: -0.3px;
}
.page-hero p {
  margin: 0;
  color: rgba(255,255,255,.85);
  font-size: 16px;
}
.page-body {
  background: #fff;
  padding: 64px 0;
}
.page-body .container {
  max-width: 820px;
}
.page-body h2 {
  font-size: 22px;
  color: var(--brand-dark);
  margin: 36px 0 14px;
  font-weight: 800;
}
.page-body h2:first-child { margin-top: 0; }
.page-body p, .page-body li {
  font-size: 15.5px;
  line-height: 1.85;
  color: #2a3b34;
}
.page-body ul, .page-body ol { padding-inline-start: 22px; }
.page-body li { margin-bottom: 8px; }
.page-meta {
  font-size: 13px;
  color: var(--text-mute);
  text-align: center;
  margin-bottom: 24px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 50px;
}
.contact-channels { display: grid; gap: 16px; }
.contact-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.contact-row:hover { border-color: var(--brand-light); box-shadow: var(--shadow-sm); }
.contact-row .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
  color: #fff; display: grid; place-items: center; font-size: 19px;
  flex-shrink: 0;
}
.contact-row .meta b { display: block; color: var(--brand-dark); margin-bottom: 2px; font-size: 15px; }
.contact-row .meta span { color: var(--text-mute); font-size: 14.5px; word-break: break-all; }

.contact-form {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.contact-form .field { margin-bottom: 16px; }
.contact-form label {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--brand-dark);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 15px;
  background: var(--bg);
  transition: border-color .15s, background .15s;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--brand-light);
  background: #fff;
}
.contact-form textarea { min-height: 130px; resize: vertical; }
.contact-form .btn { width: 100%; padding: 14px; }
.contact-note {
  font-size: 13px;
  color: var(--text-mute);
  margin-top: 10px;
  text-align: center;
}

@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* ===== News section (landing) ===== */
.news {
  background: var(--bg);
}
.news-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.news-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-light);
}
.news-card-media {
  aspect-ratio: 16/10;
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-light));
}
.news-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}
.news-card:hover .news-card-media img { transform: scale(1.06); }
.news-card-ph {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  color: rgba(255,255,255,.85);
  font-size: 56px;
}
.news-card-body {
  padding: 18px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.news-card-title {
  font-size: 16.5px;
  font-weight: 800;
  color: var(--brand-dark);
  margin: 0;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-excerpt {
  font-size: 14px;
  color: var(--text-mute);
  margin: 0;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-meta {
  margin-top: auto;
  font-size: 12.5px;
  color: var(--text-mute);
  opacity: 0.75;
  padding-top: 6px;
}

@media (max-width: 980px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .news-grid { grid-template-columns: 1fr; } }

/* Contact status bar */
.contact-status {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14.5px;
  font-weight: 600;
  text-align: center;
}
.contact-status.ok {
  background: rgba(58, 171, 122, 0.12);
  color: #1a5a3d;
  border: 1px solid rgba(58, 171, 122, 0.4);
}
.contact-status.err {
  background: rgba(220, 53, 69, 0.08);
  color: #b21f2d;
  border: 1px solid rgba(220, 53, 69, 0.3);
}

/* Utilities */
.text-center { text-align: center; }
.hidden { display: none !important; }
[dir="ltr"] { direction: ltr; text-align: left; }
[dir="ltr"] .feature, [dir="ltr"] .showcase-text { text-align: left; }
