/* AgroMax Egypt — design tokens */
:root {
  --bg: #F4F1E8;
  --surface: #FFFFFF;
  --text: #1E3A24;
  --muted: #5A6B57;
  --accent: #3E7A3E;
  --accent-dark: #2C5A2C;
  --border: #DDD8C8;
  --heading: #1E3A24;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 6px 24px rgba(30, 58, 36, 0.10);
  --shadow-sm: 0 2px 10px rgba(30, 58, 36, 0.08);
  --space: 8px;
  --font: "Georgia", "Times New Roman", "Noto Naskh Arabic", serif;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
}

[dir="rtl"] { letter-spacing: 0; }

img { max-width: 100%; display: block; }

h1, h2, h3 { color: var(--heading); line-height: 1.25; }

h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.2rem; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

section { padding: 64px 0; }

.eyebrow {
  color: var(--accent);
  font-weight: bold;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
[dir="rtl"] .eyebrow { letter-spacing: 0; font-size: 0.95rem; }

/* Header / nav */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(244, 241, 232, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--heading);
  text-decoration: none;
  font-weight: bold;
  font-size: 1.15rem;
}
.brand svg { flex-shrink: 0; }
.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  transition: background 160ms ease-out, color 160ms ease-out;
}
.nav-links a:hover { background: rgba(62, 122, 62, 0.1); }
.nav-links a[aria-current="page"] { color: var(--accent); font-weight: bold; }

.lang-switch { display: flex; gap: 4px; }
.lang-switch button {
  font-family: inherit;
  font-size: 0.85rem;
  padding: 8px 10px;
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 160ms ease-out, border-color 160ms ease-out;
}
.lang-switch button:hover { border-color: var(--accent); }
.lang-switch button[aria-pressed="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: bold;
}

.menu-toggle {
  display: none;
  font-family: inherit;
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  min-height: 44px;
  cursor: pointer;
  color: var(--text);
  font-size: 1rem;
}

/* Buttons */
.btn {
  display: inline-block;
  font-family: inherit;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  padding: 13px 26px;
  min-height: 44px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: background 200ms ease-out, transform 120ms ease-out, box-shadow 200ms ease-out;
}
.btn-primary { background: var(--accent); color: #fff; font-weight: bold; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:active { transform: translateY(1px); }
.btn-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); font-weight: bold; }
.btn-outline:hover { background: rgba(62, 122, 62, 0.1); }

:where(a, button, input, textarea, select):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* Hero */
.hero {
  padding: 80px 0;
  background: linear-gradient(180deg, rgba(62,122,62,0.06), transparent 70%);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 48px;
  align-items: center;
}
.hero img.hero-photo {
  width: 100%;
  height: 380px;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.hero p.lead { font-size: 1.1rem; color: var(--muted); margin: 18px 0 28px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Cards / features */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 200ms ease-out, box-shadow 200ms ease-out;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card img { width: 100%; height: 200px; object-fit: cover; }
.card-body { padding: 20px; }
.card-body p { color: var(--muted); margin-top: 8px; font-size: 0.98rem; }

.section-head { max-width: 640px; margin-bottom: 36px; }
.section-head p { color: var(--muted); margin-top: 10px; }

/* Stat band */
.stat-band {
  background: var(--heading);
  color: #EAF2E6;
  padding: 40px 0;
}
.stat-band .grid-3 { gap: 16px; text-align: center; }
.stat-band .stat strong { display: block; font-size: 2rem; color: #fff; }
.stat-band .stat span { font-size: 0.95rem; opacity: 0.85; }

/* Split sections */
.split img { width: 100%; height: 320px; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.split p { color: var(--muted); margin-top: 12px; }

/* Checklist */
.checklist { list-style: none; margin-top: 16px; }
.checklist li { padding: 8px 0; display: flex; gap: 10px; align-items: flex-start; }
.checklist li::before {
  content: "✓";
  color: var(--accent);
  font-weight: bold;
  flex-shrink: 0;
}

/* Page hero (inner pages) */
.page-hero {
  background: var(--heading);
  color: #EAF2E6;
  padding: 64px 0;
}
.page-hero h1 { color: #fff; }
.page-hero p { opacity: 0.85; margin-top: 10px; max-width: 620px; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.contact-info .card-body { display: grid; gap: 16px; }
.contact-info a { color: var(--accent); text-decoration: none; word-break: break-word; }
.contact-info a:hover { text-decoration: underline; }
.contact-info .label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: bold; }
[dir="rtl"] .contact-info .label { letter-spacing: 0; }

form .field { margin-bottom: 16px; }
form label { display: block; font-weight: bold; margin-bottom: 6px; font-size: 0.95rem; }
form input, form textarea {
  width: 100%;
  font-family: inherit;
  font-size: 1rem;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
}
form input:focus, form textarea:focus { border-color: var(--accent); }
form .error-msg { color: #A33B2E; font-size: 0.85rem; margin-top: 4px; display: none; }
form .field.invalid input, form .field.invalid textarea { border-color: #A33B2E; }
form .field.invalid .error-msg { display: block; }
.form-success {
  display: none;
  background: rgba(62, 122, 62, 0.12);
  border: 1px solid var(--accent);
  color: var(--accent-dark);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  margin-top: 16px;
}
.form-success.visible { display: block; }

/* Footer */
.site-footer {
  background: var(--heading);
  color: #C9D6C4;
  padding: 40px 0 24px;
  margin-top: 40px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 12px; }
.site-footer ul { list-style: none; }
.site-footer a { color: #C9D6C4; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  margin-top: 28px;
  padding-top: 18px;
  font-size: 0.85rem;
  text-align: center;
  opacity: 0.8;
}

/* Skip link */
.skip-link {
  position: absolute;
  inset-inline-start: -9999px;
  background: var(--accent);
  color: #fff;
  padding: 10px 18px;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  z-index: 100;
}
.skip-link:focus { inset-inline-start: 16px; }

/* Responsive */
@media (max-width: 900px) {
  .hero-grid, .grid-2, .contact-grid { grid-template-columns: 1fr; }
  .hero img.hero-photo { height: 260px; order: -1; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .menu-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 68px;
    inset-inline: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
  .nav-links a { display: block; padding: 14px 12px; }
  .lang-switch { margin-inline-start: auto; }
  .grid-3 { grid-template-columns: 1fr; }
  section { padding: 48px 0; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  body { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
