/* ===== M&H Company — Global Styles ===== */
:root {
  --green-900: #0e2e1a;
  --green-800: #143a22;
  --green-700: #1f4d2c;
  --green-600: #2a6a3c;
  --green-500: #3f8a4f;
  --leaf-500:  #7ab547;
  --leaf-400:  #92c862;
  --leaf-300:  #b6dc8a;
  --cream-50:  #faf6ec;
  --cream-100: #f4efe3;
  --cream-200: #e9e2d0;
  --ink-900:   #15211a;
  --ink-700:   #2c3b32;
  --ink-500:   #5a6b60;
  --ink-300:   #8a9a8f;
  --line:      rgba(20, 58, 34, 0.12);
  --line-strong: rgba(20, 58, 34, 0.22);
  --shadow-sm: 0 1px 2px rgba(14, 46, 26, 0.06), 0 2px 6px rgba(14, 46, 26, 0.04);
  --shadow-md: 0 6px 20px rgba(14, 46, 26, 0.08), 0 2px 6px rgba(14, 46, 26, 0.05);
  --shadow-lg: 0 24px 60px rgba(14, 46, 26, 0.18), 0 8px 24px rgba(14, 46, 26, 0.08);
  --radius-sm: 8px;
  --radius:    14px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --serif: "Fraunces", "Cormorant Garamond", "Times New Roman", serif;
  --sans:  "Inter Tight", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:  "JetBrains Mono", ui-monospace, SFMono-Regular, monospace;
  --arabic: "Noto Naskh Arabic", "Amiri", serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  font-family: var(--sans);
  color: var(--ink-900);
  background: var(--cream-50);
  font-size: 16px;
  line-height: 1.55;
  font-feature-settings: "ss01", "cv11";
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--arabic), var(--sans); }
html[dir="rtl"] body { direction: rtl; }

img, svg, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===== Layout ===== */
.container { width: min(1240px, 100% - 48px); margin-inline: auto; }
.container-narrow { width: min(880px, 100% - 48px); margin-inline: auto; }
.section { padding-block: clamp(72px, 10vw, 140px); }

/* ===== Type ===== */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-600);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--green-600);
}
html[dir="rtl"] .eyebrow::before { display: none; }
html[dir="rtl"] .eyebrow::after {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--green-600);
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--green-900);
  text-wrap: balance;
}
h1 { font-size: clamp(44px, 7vw, 96px); }
h2 { font-size: clamp(34px, 5vw, 64px); }
h3 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
h4 { font-size: 18px; line-height: 1.3; }

html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4 {
  font-family: var(--arabic);
  letter-spacing: 0;
  line-height: 1.3;
}

.lead {
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.6;
  color: var(--ink-700);
  max-width: 60ch;
  text-wrap: pretty;
}
.body-text { color: var(--ink-700); line-height: 1.7; }
.body-text p + p { margin-top: 1em; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 14px 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 12px;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--green-800);
  color: var(--cream-50);
}
.btn-primary:hover { background: var(--green-900); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-ghost {
  border: 1px solid var(--line-strong);
  color: var(--green-900);
}
.btn-ghost:hover { background: var(--green-900); color: var(--cream-50); border-color: var(--green-900); }
.btn-leaf {
  background: var(--leaf-500);
  color: var(--green-900);
}
.btn-leaf:hover { background: var(--leaf-400); transform: translateY(-1px); }
.btn .arrow { transition: transform .2s ease; }
.btn:hover .arrow { transform: translateX(4px); }
html[dir="rtl"] .btn:hover .arrow { transform: translateX(-4px) scaleX(-1); }
html[dir="rtl"] .btn .arrow { transform: scaleX(-1); }

/* ===== Header ===== */
.site-header {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 14px 0;
  transition: background .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
}
.site-header.scrolled {
  background: rgba(250, 246, 236, 0.92);
  backdrop-filter: saturate(140%) blur(12px);
  box-shadow: 0 1px 0 var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green-900);
  display: grid; place-items: center;
  overflow: hidden;
}
.brand-mark img { width: 80%; height: 80%; object-fit: contain; }
.brand-name {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: -0.01em;
  color: var(--green-900);
  line-height: 1;
}
.brand-name small {
  display: block;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  margin-top: 4px;
  color: var(--green-600);
  text-transform: uppercase;
}

/* === Wordmark logo (preferred) === */
.brand-wordmark {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.brand-wordmark img {
  height: 192px !important;
  width: block;
  display: block;
}
@media (max-width: 720px) {
  .brand-wordmark img { height: 144px !important; }
}
.footer-brand .brand-wordmark img {
  height: 240px !important;
}

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-700);
  transition: background .2s, color .2s;
}
.nav a:hover { background: rgba(20, 58, 34, 0.06); color: var(--green-900); }
.nav a.active { color: var(--green-900); font-weight: 500; }
.nav a.active::after {
  content: "";
  display: block;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--leaf-500);
  margin: 2px auto 0;
}

.header-actions { display: flex; align-items: center; gap: 12px; }

/* Language Switcher */
.lang-switch {
  position: relative;
}
.lang-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 13px;
  background: rgba(255,255,255,0.5);
  font-weight: 500;
}
.lang-trigger:hover { border-color: var(--line-strong); }
.lang-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: white;
  border-radius: 14px;
  padding: 6px;
  box-shadow: var(--shadow-lg);
  min-width: 160px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all .2s ease;
  border: 1px solid var(--line);
}
html[dir="rtl"] .lang-menu { right: auto; left: 0; }
.lang-switch.open .lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.lang-menu button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 14px;
  text-align: left;
}
html[dir="rtl"] .lang-menu button { text-align: right; }
.lang-menu button:hover { background: var(--cream-100); }
.lang-menu button.active { background: var(--green-900); color: var(--cream-50); }
.lang-flag { width: 20px; height: 14px; border-radius: 2px; overflow: hidden; flex-shrink: 0; }

.menu-toggle { display: none; }

/* Tighten nav between 1100px–1300px so 7 items fit before hamburger kicks in */
@media (max-width: 1100px) {
  .nav { gap: 4px; }
  .nav a { padding: 6px 10px; font-size: 14px; white-space: nowrap; }
  .header-actions .btn { padding: 12px 18px; font-size: 14px; }
}

@media (max-width: 1100px) {
  .nav { display: none; }
  .menu-toggle {
    display: grid;
    place-items: center;
    width: 40px; height: 40px;
    border-radius: 999px;
    border: 1px solid var(--line);
  }
  .nav.open {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    position: fixed;
    top: 80px; left: 24px; right: 24px;
    background: white;
    padding: 12px;
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    gap: 2px;
  }
  .nav.open a { padding: 14px 16px; }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--green-900);
  color: var(--cream-100);
  padding: 80px 0 32px;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 48px;
  margin-bottom: 56px;
}
@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-brand .brand-name { color: var(--cream-50); }
.footer-brand .brand-name small { color: var(--leaf-300); }
.footer-brand p { margin-top: 16px; color: rgba(244, 239, 227, 0.6); font-size: 14px; line-height: 1.6; }
.footer-col h4 {
  color: var(--cream-50);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 500;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer-col a { color: rgba(244, 239, 227, 0.7); font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: var(--leaf-400); }
.footer-bottom {
  border-top: 1px solid rgba(244, 239, 227, 0.1);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  color: rgba(244, 239, 227, 0.5);
  font-size: 13px;
}
.footer-powered {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(244, 239, 227, 0.4);
}
.footer-powered a {
  color: var(--leaf-400);
  transition: color .2s;
  border-bottom: 1px solid transparent;
}
.footer-powered a:hover {
  color: var(--leaf-300);
  border-bottom-color: var(--leaf-400);
}

/* ===== Reusable cards ===== */
.card {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: transform .3s ease, box-shadow .3s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-family: var(--mono);
  letter-spacing: 0.05em;
  background: var(--cream-100);
  color: var(--green-700);
  border: 1px solid var(--line);
}
.tag.leaf { background: rgba(122, 181, 71, 0.15); color: var(--green-800); border-color: rgba(122, 181, 71, 0.3); }

/* ===== Scroll reveal ===== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity .8s ease, transform .8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.delay-4 { transition-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== Page intro (for sub-pages) ===== */
.page-intro {
  padding: 180px 0 80px;
  background:
    radial-gradient(60% 80% at 80% 20%, rgba(122, 181, 71, 0.2), transparent 60%),
    radial-gradient(50% 70% at 10% 90%, rgba(63, 138, 79, 0.15), transparent 60%),
    var(--cream-50);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.page-intro .container { position: relative; z-index: 2; }
.page-intro h1 { font-size: clamp(48px, 8vw, 96px); }
.page-intro .lead { margin-top: 24px; font-size: clamp(18px, 1.6vw, 22px); }
.page-intro .breadcrumb {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green-600);
  margin-bottom: 32px;
}
.page-intro .breadcrumb a:hover { color: var(--green-900); }

/* Floating leaves background decoration */
.leaf-decor {
  position: absolute;
  pointer-events: none;
  opacity: 0.5;
  filter: blur(0.5px);
  animation: float 8s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(8deg); }
}
.leaf-decor.l1 { top: 20%; left: 5%; animation-delay: 0s; }
.leaf-decor.l2 { top: 65%; right: 8%; animation-delay: 2s; }
.leaf-decor.l3 { top: 40%; right: 30%; animation-delay: 4s; }

/* ===== Utilities ===== */
.flex { display: flex; }
.grid { display: grid; }
.gap-12 { gap: 12px; }
.gap-24 { gap: 24px; }
.mt-16 { margin-top: 16px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
.text-center { text-align: center; }
