/* Hope Organization for Development and Improvement — hope-raja.org
   Palette: Tigris pine + saffron on near-white. Display: Bricolage Grotesque.
   Body: Instrument Sans. Arabic accent: Amiri (رجاء). Motif: the arch. */

:root {
  --ink: #14211d;
  --ink-soft: #3d4f49;
  --pine: #0e5148;
  --pine-deep: #0a3b35;
  --pine-tint: #e9efea;
  --amber: #e39a2d;
  --amber-deep: #c07e15;
  --paper: #faf9f5;
  --card: #ffffff;
  --line: #dbe2db;
  --arch: 999px 999px 18px 18px / 640px 640px 18px 18px;
  --font-display: "Bricolage Grotesque", "Instrument Sans", sans-serif;
  --font-body: "Instrument Sans", system-ui, sans-serif;
  --font-arabic: "Amiri", serif;
  --wrap: 1140px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--pine); text-decoration-thickness: 1px; text-underline-offset: 3px; }

:focus-visible { outline: 3px solid var(--amber); outline-offset: 3px; border-radius: 2px; }

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

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; padding: 14px 24px; max-width: var(--wrap); margin: 0 auto;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }

.brand img { width: 46px; height: 46px; object-fit: contain; }

.brand-name {
  font-family: var(--font-display);
  font-weight: 700; font-size: 1.05rem; line-height: 1.15; letter-spacing: 0.01em;
}

.brand-name small {
  display: block; font-family: var(--font-body); font-weight: 500;
  font-size: 0.68rem; color: var(--ink-soft); letter-spacing: 0.09em; text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 22px; list-style: none; }

.nav-links a {
  text-decoration: none; color: var(--ink-soft);
  font-weight: 500; font-size: 0.95rem; white-space: nowrap;
}

.nav-links a:hover { color: var(--pine); }

.nav-links a.current { color: var(--pine); font-weight: 700; }

.btn {
  display: inline-block; font-weight: 700; text-decoration: none;
  border-radius: 999px; padding: 12px 26px; font-size: 0.95rem;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
  border: 2px solid transparent; cursor: pointer; font-family: var(--font-body);
  white-space: nowrap;
}

.btn:hover { transform: translateY(-1px); }

.btn-amber { background: var(--amber); color: var(--ink); }

.btn-amber:hover { background: var(--amber-deep); color: #fff; }

.btn-pine { background: var(--pine); color: #fff; }

.btn-pine:hover { background: var(--pine-deep); }

.btn-ghost { border-color: var(--pine); color: var(--pine); background: transparent; }

.btn-ghost:hover { background: var(--pine-tint); }

.btn-ghost-light { border-color: rgba(255,255,255,0.55); color: #fff; background: transparent; }

.btn-ghost-light:hover { background: rgba(255,255,255,0.12); }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; font-size: 1.2rem; color: var(--pine); cursor: pointer;
}

/* ---------- hero ---------- */

.hero { position: relative; overflow: hidden; }

.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 56px; align-items: center; padding: 72px 24px 84px;
  max-width: var(--wrap); margin: 0 auto;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--pine);
}

.eyebrow::before { content: ""; width: 26px; height: 2px; background: var(--amber); }

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800; font-size: clamp(2.4rem, 5vw, 3.9rem);
  line-height: 1.04; letter-spacing: -0.02em; margin: 18px 0 22px;
}

.raja {
  font-family: var(--font-arabic); font-weight: 700; font-style: normal;
  color: var(--amber-deep); font-size: 1.12em; line-height: 1;
}

.hero-sub { font-size: 1.15rem; color: var(--ink-soft); max-width: 34rem; margin-bottom: 30px; }

.hero-ctas { display: flex; gap: 14px; flex-wrap: wrap; }

.hero-media { position: relative; }

.arch-photo {
  border-radius: var(--arch);
  overflow: hidden;
  border: 6px solid #fff;
  box-shadow: 0 24px 60px -28px rgba(10, 59, 53, 0.45);
}

.arch-photo img { width: 100%; height: 100%; object-fit: cover; }

.hero-media .arch-photo { aspect-ratio: 4 / 5; max-height: 540px; }

.hero-media figcaption {
  margin-top: 12px; font-size: 0.85rem; color: var(--ink-soft); text-align: center;
}

.hero-raja-mark {
  position: absolute; z-index: -1; right: -4%; top: -10%;
  font-family: var(--font-arabic); font-size: clamp(14rem, 26vw, 24rem);
  line-height: 1; color: var(--pine); opacity: 0.055;
  user-select: none; pointer-events: none;
}

/* ---------- stats band ---------- */

.stats-band { background: var(--pine-deep); color: #fff; }

.stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  max-width: var(--wrap); margin: 0 auto; padding: 40px 24px;
  gap: 24px; text-align: center;
}

.stat b {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.9rem, 3.4vw, 2.7rem); display: block; line-height: 1.1;
}

.stat b span { color: var(--amber); }

.stat small { font-size: 0.85rem; letter-spacing: 0.08em; text-transform: uppercase; opacity: 0.82; }

/* ---------- sections ---------- */

.section { padding: 84px 0; }

.section-tint { background: var(--pine-tint); }

.section-head { max-width: 44rem; margin-bottom: 44px; }

.section-head h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.8rem, 3.4vw, 2.6rem); line-height: 1.12;
  letter-spacing: -0.015em; margin: 14px 0 14px;
}

.section-head p { color: var(--ink-soft); font-size: 1.08rem; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

.split .arch-photo { aspect-ratio: 4 / 5; max-width: 440px; }

.lede { font-size: 1.12rem; color: var(--ink-soft); margin-bottom: 18px; }

/* ---------- cards ---------- */

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.card-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.program-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 18px; padding: 28px 26px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.program-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -24px rgba(10, 59, 53, 0.35);
  border-color: var(--pine);
}

.program-icon {
  width: 52px; height: 52px; border-radius: 999px 999px 8px 8px;
  background: var(--pine-tint); color: var(--pine);
  display: grid; place-items: center; margin-bottom: 18px;
}

.program-icon svg { width: 26px; height: 26px; }

.program-card h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; margin-bottom: 8px; }

.program-card p { color: var(--ink-soft); font-size: 0.97rem; }

.project-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.project-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px -24px rgba(10, 59, 53, 0.35); }

.project-card img { height: 210px; width: 100%; object-fit: cover; }

.project-body { padding: 24px 24px 26px; display: flex; flex-direction: column; gap: 10px; flex: 1; }

.project-body h3 { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; line-height: 1.3; }

.project-body p { color: var(--ink-soft); font-size: 0.95rem; flex: 1; }

.tag-row { display: flex; gap: 8px; flex-wrap: wrap; }

.tag {
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--pine-tint); color: var(--pine);
  border-radius: 999px; padding: 4px 12px;
}

.tag-amber { background: #faf0dd; color: var(--amber-deep); }

/* ---------- where we work ---------- */

.office-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }

.office-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 999px 999px 16px 16px; padding: 30px 18px 22px;
  text-align: center; transition: border-color 0.18s ease, transform 0.18s ease;
}

.office-card:hover { border-color: var(--amber); transform: translateY(-4px); }

.office-card .dot {
  width: 12px; height: 12px; border-radius: 50%; background: var(--amber);
  margin: 0 auto 12px;
}

.office-card .dot-hq { background: var(--pine); box-shadow: 0 0 0 5px var(--pine-tint); }

.office-card h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; }

.office-card small { color: var(--ink-soft); font-size: 0.8rem; letter-spacing: 0.06em; text-transform: uppercase; }

.governorate-note { margin-top: 26px; color: var(--ink-soft); font-size: 0.95rem; }

/* ---------- partners ---------- */

.partner-strip { display: flex; flex-wrap: wrap; gap: 14px; }

.partner-chip {
  font-family: var(--font-display); font-weight: 700; font-size: 1.02rem;
  color: var(--pine-deep); background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 24px;
}

/* ---------- CTA band ---------- */

.cta-band { background: var(--pine); color: #fff; position: relative; overflow: hidden; }

.cta-inner {
  max-width: var(--wrap); margin: 0 auto; padding: 72px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 36px; flex-wrap: wrap;
  position: relative;
}

.cta-inner h2 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; max-width: 30rem;
}

.cta-inner p { opacity: 0.85; margin-top: 10px; max-width: 32rem; }

.cta-band .raja-bg {
  position: absolute; right: -30px; bottom: -110px;
  font-family: var(--font-arabic); font-size: 20rem; line-height: 1;
  color: #fff; opacity: 0.05; pointer-events: none; user-select: none;
}

.cta-actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- page hero (inner pages) ---------- */

.page-hero { background: var(--pine-deep); color: #fff; position: relative; overflow: hidden; }

.page-hero-inner { max-width: var(--wrap); margin: 0 auto; padding: 72px 24px; position: relative; }

.page-hero .eyebrow { color: var(--amber); }

.page-hero h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.1rem, 4.5vw, 3.2rem); line-height: 1.08; letter-spacing: -0.02em;
  margin-top: 16px; max-width: 40rem;
}

.page-hero p { opacity: 0.85; margin-top: 16px; max-width: 38rem; font-size: 1.08rem; }

.page-hero .raja-bg {
  position: absolute; right: -10px; top: -70px;
  font-family: var(--font-arabic); font-size: 17rem; line-height: 1;
  color: #fff; opacity: 0.05; pointer-events: none; user-select: none;
}

/* ---------- value list (about) ---------- */

.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.value-card {
  border-left: 3px solid var(--amber); background: var(--card);
  border-radius: 0 16px 16px 0; padding: 24px 24px;
  border-top: 1px solid var(--line); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
}

.value-card h3 { font-family: var(--font-display); font-size: 1.12rem; font-weight: 700; margin-bottom: 8px; }

.value-card p { color: var(--ink-soft); font-size: 0.95rem; }

.doc-row { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- contact ---------- */

.contact-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }

.contact-list { list-style: none; display: flex; flex-direction: column; gap: 22px; margin-top: 8px; }

.contact-list li { display: flex; gap: 16px; align-items: flex-start; }

.contact-list .ci {
  width: 46px; height: 46px; flex: none; border-radius: 999px 999px 8px 8px;
  background: var(--pine-tint); color: var(--pine); display: grid; place-items: center;
}

.contact-list .ci svg { width: 22px; height: 22px; }

.contact-list b { display: block; font-family: var(--font-display); font-size: 1.02rem; }

.contact-list span, .contact-list a { color: var(--ink-soft); font-size: 0.97rem; }

.contact-form {
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 34px;
}

.contact-form h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.5rem; margin-bottom: 6px; }

.contact-form > p { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 22px; }

.field { margin-bottom: 18px; }

.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 7px; }

.field input, .field textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px;
  padding: 13px 15px; font: inherit; background: var(--paper); color: var(--ink);
}

.field input:focus, .field textarea:focus { outline: 3px solid var(--amber); outline-offset: 1px; border-color: var(--amber); }

/* ---------- footer ---------- */

.site-footer { background: var(--ink); color: rgba(255, 255, 255, 0.78); }

.footer-grid {
  max-width: var(--wrap); margin: 0 auto; padding: 60px 24px 30px;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px;
}

.footer-grid h3 {
  font-family: var(--font-display); color: #fff; font-size: 1rem;
  letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px;
}

.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.footer-grid a { color: rgba(255, 255, 255, 0.78); text-decoration: none; font-size: 0.95rem; }

.footer-grid a:hover { color: var(--amber); }

.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }

.footer-brand img { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 10px; padding: 4px; }

.footer-brand b { font-family: var(--font-display); color: #fff; line-height: 1.2; display: block; }

.footer-note { font-size: 0.92rem; max-width: 26rem; }

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 20px 24px; text-align: center; font-size: 0.85rem; color: rgba(255, 255, 255, 0.55);
}

/* ---------- language switch ---------- */

.lang-switch {
  font-weight: 700;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 6px 14px !important;
  color: var(--pine) !important;
}

.lang-switch:hover { border-color: var(--amber); background: var(--pine-tint); }

/* ---------- RTL (Arabic) ---------- */

html[dir="rtl"] body,
html[dir="rtl"] .btn { font-family: "IBM Plex Sans Arabic", "Instrument Sans", system-ui, sans-serif; }

html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] h3,
html[dir="rtl"] .brand-name, html[dir="rtl"] .stat b,
html[dir="rtl"] .partner-chip, html[dir="rtl"] .footer-brand b,
html[dir="rtl"] .footer-grid h3, html[dir="rtl"] .contact-list b,
html[dir="rtl"] .contact-form h2 {
  font-family: "Cairo", "IBM Plex Sans Arabic", sans-serif;
}

/* Arabic script needs no tracking or uppercase treatment */
html[dir="rtl"] .eyebrow, html[dir="rtl"] .tag, html[dir="rtl"] .stat small,
html[dir="rtl"] .brand-name small, html[dir="rtl"] .footer-grid h3,
html[dir="rtl"] .office-card small {
  letter-spacing: 0; text-transform: none;
}

html[dir="rtl"] .hero h1, html[dir="rtl"] .page-hero h1, html[dir="rtl"] .section-head h2 {
  letter-spacing: 0; line-height: 1.3;
}

html[dir="rtl"] .hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }

html[dir="rtl"] .value-card {
  border-left: 1px solid var(--line); border-right: 3px solid var(--amber);
  border-radius: 16px 0 0 16px;
}

html[dir="rtl"] .hero-raja-mark { right: auto; left: -4%; }

html[dir="rtl"] .page-hero .raja-bg, html[dir="rtl"] .cta-band .raja-bg { right: auto; left: -10px; }

/* ---------- reveal ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }

.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .program-card, .project-card, .office-card { transition: none; }
}

/* ---------- responsive ---------- */

@media (max-width: 1140px) {
  .nav-links { gap: 14px; }
  .nav-links a { font-size: 0.88rem; }
  .nav-bar .btn { padding: 10px 18px; font-size: 0.88rem; }
}

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; padding-top: 48px; padding-bottom: 56px; gap: 40px; }
  .hero-media .arch-photo { max-width: 420px; margin: 0 auto; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .split .arch-photo { margin: 0 auto; }
  .card-grid { grid-template-columns: repeat(2, 1fr); }
  .office-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1000px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: flex-start; gap: 0;
    display: none; padding: 10px 24px 18px;
  }
  .nav-links.open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 12px 0; font-size: 1.05rem; }
  .nav-toggle { display: block; }
  .nav-cta { display: none; }
}

@media (max-width: 720px) {
  .card-grid, .card-grid-2 { grid-template-columns: 1fr; }
  .office-grid { grid-template-columns: repeat(2, 1fr); }
  .value-grid { grid-template-columns: 1fr; }
  .section { padding: 60px 0; }
}

@media (max-width: 480px) {
  body { font-size: 1rem; }
  .hero-grid { padding: 36px 20px 44px; gap: 30px; }
  .wrap { padding: 0 20px; }
  .section { padding: 48px 0; }
  .stats-grid { padding: 30px 20px; gap: 20px; }
  .page-hero-inner, .cta-inner { padding: 52px 20px; }
  .contact-form { padding: 24px 20px; }
  .hero-ctas .btn, .cta-actions .btn { width: 100%; text-align: center; }
  .office-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .footer-grid { grid-template-columns: 1fr; padding: 44px 20px 24px; gap: 28px; }
  .split .arch-photo, .hero-media .arch-photo { max-width: 100%; }
}
