/* Brand colours, taken from the REBIRD logo. */
:root {
  --navy: #1C314D;
  --navy-deep: #142439;
  --gold: #AC8C47;
  --gold-soft: rgba(172, 140, 71, 0.14);
  --blue: #365F7C;
  --sky: #60B1C7;
  --sky-soft: rgba(96, 177, 199, 0.14);
  --bg: #FFFFFF;
  --surface: #F6F8FA;
  --text: #1C314D;
  --muted: #55627A;
  --border: #E3E8EE;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(28, 49, 77, 0.05), 0 8px 24px rgba(28, 49, 77, 0.07);
  --max: 1040px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Tajawal", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.75;
}

/* Language switching: both languages live in the markup; the inactive one is hidden.
   Without JavaScript the page stays in Arabic (the default on <html>). */
html[data-lang="ar"] [lang="en"]:not(html) { display: none !important; }
html[data-lang="en"] [lang="ar"]:not(html) { display: none !important; }

img { max-width: 100%; }

a { color: var(--blue); }
a:hover { color: var(--navy); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--sky); outline-offset: 3px; border-radius: 6px; }

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

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: 0.5px;
  color: var(--navy);
  text-decoration: none;
}
/* Header mark: the bird from assets/rebirdlogo.jpg, framed with CSS only (the file
   itself is untouched). In the 1200x630 source the bird spans x 418–738, y 58–400;
   at 40px tall that is a 0.117 scale. */
.brand-mark {
  position: relative;
  flex: none;
  width: 38px;
  height: 40px;
  overflow: hidden;
}
.brand-mark img {
  position: absolute;
  left: -49px;
  top: -7px;
  width: 140px;
  height: auto;
  max-width: none;
}
/* Fade the crop's bottom/side edges so the image's pale background doesn't read as a box. */
.brand-mark {
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 70% 62% at 50% 45%, #000 70%, transparent 100%);
}
.nav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.nav a {
  color: var(--navy);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
}
.nav a:hover { color: var(--blue); }
.lang-btn {
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  background: transparent;
  border: 1.5px solid var(--gold);
  border-radius: 999px;
  padding: 4px 16px;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.lang-btn:hover { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--blue); color: #fff; }
.btn-ghost { border-color: var(--border); color: var(--navy); background: #fff; }
.btn-ghost:hover { border-color: var(--navy); color: var(--navy); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #967A3D; color: #fff; }
.btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── Hero ───────────────────────────────────────────────── */
/* The logo image is the hero, no text over it. The container repeats the image's own
   top-to-bottom gradient (#FEFEFE → #E9F2F9) so the sides blend in on wide screens. */
.hero {
  line-height: 0;
  background: linear-gradient(180deg, #FEFEFE 0%, #F3F8FB 50%, #E9F2F9 100%);
  border-bottom: 1px solid var(--border);
}
.hero-img {
  display: block;
  width: 100%;
  max-width: 920px;
  height: auto;
  margin: 0 auto;
  /* Soften the left/right edges so the image melts into the matching background. */
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 7%, #000 93%, transparent 100%);
}

/* ── Intro under the hero ───────────────────────────────── */
.intro { padding: 48px 0 16px; }
.intro h1 {
  margin: 0 0 10px;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.25;
  font-weight: 800;
}
.intro h1 .accent { color: var(--gold); }
.intro p { margin: 0; max-width: 660px; font-size: 19px; color: var(--muted); }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* ── Sections ───────────────────────────────────────────── */
section { padding: 64px 0; }
.section-tint { background: var(--surface); border-block: 1px solid var(--border); }
h2 { margin: 0 0 16px; font-size: clamp(24px, 4.2vw, 30px); line-height: 1.35; }
h3 { margin: 0 0 6px; font-size: 18px; line-height: 1.45; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  background: var(--gold-soft);
  border: 1px solid rgba(172, 140, 71, 0.45);
  border-radius: 999px;
  padding: 1px 12px;
  margin-bottom: 14px;
}
section > .wrap > p { max-width: 720px; }

/* Values (about) */
.values {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.value {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.value-num {
  display: block;
  font-weight: 800;
  font-size: 14px;
  color: var(--gold);
  letter-spacing: 1px;
  margin-bottom: 8px;
  direction: ltr;
  text-align: start;
}
.value p { margin: 0; color: var(--muted); font-size: 16px; }

/* Product (DiyarCo) */
.product {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px;
}
.product-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 18px;
}
.product-logo { display: block; height: 72px; width: auto; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--blue);
  background: var(--sky-soft);
  border-radius: 999px;
  padding: 4px 14px;
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--sky); box-shadow: 0 0 0 4px rgba(96, 177, 199, 0.25); }
.lead { margin: 0; font-size: 18px; max-width: 760px; }
.features {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-top: 28px;
}
.feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: 14px;
  background: var(--surface);
}
.feature-icon {
  flex: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border-radius: 12px;
  background: var(--navy);
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.feature p { margin: 0; color: var(--muted); font-size: 15.5px; line-height: 1.65; }
.how-title { margin-top: 32px; margin-bottom: 14px; }
.how {
  list-style: none;
  counter-reset: how;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.how li {
  counter-increment: how;
  position: relative;
  padding: 16px 16px 16px 16px;
  padding-inline-start: 58px;
  border: 1px dashed rgba(54, 95, 124, 0.35);
  border-radius: 14px;
  font-weight: 500;
  line-height: 1.6;
  min-height: 64px;
  display: flex;
  align-items: center;
}
.how li::before {
  content: counter(how);
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}
.product-links { margin: 28px 0 0; font-size: 15px; }
.product-links .sep { margin: 0 8px; color: var(--muted); }

/* Contact */
.contact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 36px;
  border-radius: 20px;
  color: #fff;
  background:
    radial-gradient(600px 240px at 0% 0%, rgba(96, 177, 199, 0.25), transparent 60%),
    linear-gradient(135deg, var(--navy) 0%, var(--blue) 100%);
}
.contact h2 { color: #fff; margin-bottom: 6px; }
.contact p { margin: 0; color: #D3DCE8; }
.contact .contact-city { margin-top: 10px; font-size: 15px; color: var(--sky); }
/* inline-block keeps the address whole: it drops to its own line instead of
   splitting mid-word inside Arabic text. */
.email {
  display: inline-block;
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
  font-weight: 700;
}
.email-btn { font-size: 17px; }

/* ── Legal pages ────────────────────────────────────────── */
.page-head {
  color: #fff;
  padding: 48px 0 40px;
  background:
    radial-gradient(700px 260px at 10% 0%, rgba(96, 177, 199, 0.25), transparent 60%),
    linear-gradient(135deg, var(--navy-deep) 0%, var(--navy) 55%, var(--blue) 100%);
  border-bottom: 3px solid var(--gold);
}
.page-head h1 { margin: 0 0 6px; font-size: clamp(28px, 6vw, 40px); line-height: 1.3; }
.page-head .meta { margin: 0; color: #C9D6E4; font-size: 15px; }
.legal { padding: 40px 0 64px; }
.legal .wrap { max-width: 820px; }
.legal h2 {
  font-size: 22px;
  margin-top: 40px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.legal h2:first-child { margin-top: 0; }
.legal h3 { margin-top: 24px; font-size: 18px; color: var(--blue); }
.legal ul, .legal ol { padding-inline-start: 24px; }
.legal li { margin-bottom: 6px; }
.legal li::marker { color: var(--gold); }
.legal .email { font-size: 17px; }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--border); margin: 12px 0; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td {
  text-align: start;
  vertical-align: top;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}
tr:last-child td { border-bottom: 0; }
th { background: var(--surface); color: var(--navy); }
.note {
  border-inline-start: 4px solid var(--gold);
  background: var(--gold-soft);
  padding: 14px 18px;
  border-radius: 8px;
}
.steps { counter-reset: s; list-style: none; padding: 0 !important; }
.steps li {
  counter-increment: s;
  position: relative;
  padding: 16px 18px;
  padding-inline-start: 62px;
  margin-bottom: 12px;
  background: var(--surface);
  border-radius: 14px;
}
.steps li::marker { content: none; }
.steps li::before {
  content: counter(s);
  position: absolute;
  inset-inline-start: 16px;
  top: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--blue);
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* ── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--navy-deep);
  color: #C9D3E2;
  padding: 28px 0;
  font-size: 14px;
  border-top: 3px solid var(--gold);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { color: var(--sky); }
.site-footer nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 860px) {
  .values, .how { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .nav { gap: 12px; }
  .nav .nav-link { display: none; }
  .brand { font-size: 19px; gap: 8px; }
  .intro { padding: 32px 0 8px; }
  .intro p { font-size: 17px; }
  .intro-actions .btn { flex: 1 1 auto; }
  section { padding: 44px 0; }
  .features { grid-template-columns: 1fr; }
  .product { padding: 20px; border-radius: 16px; }
  .product-logo { height: 54px; }
  .lead { font-size: 17px; }
  .contact { padding: 24px; }
  .email-btn { width: 100%; font-size: 15.5px; }
  .page-head { padding: 36px 0 30px; }
}
