/* =======================================================================
   المحامي عبدالرحمن عايض القبيعي — للمحاماة والاستشارات القانونية
   Design tokens sampled directly from the reference design.
   ======================================================================= */

/* ---------------------------------------------------------------------
   IBM Plex Sans Arabic — SIL Open Font License 1.1 (حر للاستخدام التجاري)
   مقاساته مطابقة تقريبًا لخط التصميم المرجعي، وله وزنان حقيقيان
   (400 و 700) فلا يوجد "بولد صناعي".
   مقسّم إلى نطاقين: العربي واللاتيني، فلا يُحمَّل اللاتيني إلا عند الحاجة.
   --------------------------------------------------------------------- */
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/plex-arabic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
                 U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/plex-arabic-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1,
                 U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41,
                 U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/plex-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("../fonts/plex-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  /* --- palette (sampled from the reference) --- */
  --ink:          #1B1A16;
  --ink-deep:     #131210;
  --ink-card:     #241F19;
  --ink-input:    #2E2A23;
  --accent:       #E8792A;
  --accent-dark:  #CF6819;
  /* درجة أغمق من البرتقالي تُستخدم فوق الخلفيات الفاتحة لتحقيق تباين AA */
  --accent-ink:   #A64D10;
  --accent-soft:  rgba(232, 121, 42, .14);
  --accent-line:  rgba(232, 121, 42, .30);

  --paper:        #F9F8F4;
  --cream:        #F1EDE4;
  --sand:         #EFE9DB;
  --white:        #FFFFFF;

  --on-dark:      #EDEAE4;
  --on-dark-mut:  #A9A59C;
  --on-dark-dim:  #8A867E;
  --on-light:     #1B1A16;
  --on-light-mut: #6C665C;

  --line-dark:    rgba(255, 255, 255, .09);
  --line-light:   rgba(27, 26, 22, .10);

  --danger:       #EE7264;
  --success:      #3FA36B;

  /* --- shape --- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-pill: 999px;

  --shadow-card: 0 1px 2px rgba(27, 26, 22, .04), 0 8px 24px rgba(27, 26, 22, .06);
  --shadow-lift: 0 6px 14px rgba(27, 26, 22, .08), 0 18px 40px rgba(27, 26, 22, .10);
  --shadow-accent: 0 8px 22px rgba(232, 121, 42, .28);

  --container: 1180px;
  --gutter: 24px;

  --ease: cubic-bezier(.4, 0, .2, 1);
  --t: .25s var(--ease);

  --header-h: 84px;
}

/* ===================== base ===================== */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Naskh Arabic", sans-serif;
  font-size: 17px;
  line-height: 1.85;
  color: var(--on-light);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /* clip وليس hidden: hidden ينشئ حاوية تمرير تُعطّل position:sticky للهيدر */
  overflow-x: clip;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.35; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; transition: color var(--t); }
a:hover { color: var(--accent); }

button { font: inherit; color: inherit; cursor: pointer; }

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

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: fixed; inset-inline-start: 50%; top: -100px;
  transform: translateX(50%);
  z-index: 200;
  background: var(--ink); color: #fff;
  border: 2px solid var(--accent);
  border-top: 0;
  padding: 10px 22px; border-radius: 0 0 var(--r-md) var(--r-md);
  font-weight: 700;
  transition: top var(--t);
}
.skip-link:focus { top: 0; color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.ico {
  width: 1.15em; height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ico--accent { color: var(--accent); }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: 900px; }

/* ===================== buttons ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 26px;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  font-size: .95em;
  font-weight: 700;
  line-height: 1.6;
  text-align: center;
  cursor: pointer;
  transition: background-color var(--t), color var(--t), border-color var(--t),
              box-shadow var(--t), transform var(--t);
}
.btn--lg { padding: 15px 34px; font-size: 1em; }
.btn--block { width: 100%; }

.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #241206;
}
.btn--primary:hover,
.btn--primary:focus-visible {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
  box-shadow: var(--shadow-accent);
  transform: translateY(-2px);
}
.btn--primary:active { transform: translateY(0); }

.btn--ghost {
  background: transparent;
  border-color: rgba(237, 234, 228, .28);
  color: var(--on-dark);
}
.btn--ghost:hover,
.btn--ghost:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

/* ===================== top bar ===================== */
.topbar {
  background: var(--ink-deep);
  color: var(--on-dark-mut);
  font-size: .78em;
  border-bottom: 1px solid rgba(255, 255, 255, .05);
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 44px;
  flex-wrap: wrap;
}
.topbar__license,
.topbar__contact li a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.topbar__license .ico { color: var(--accent); }
.topbar__contact { display: flex; gap: 26px; flex-wrap: wrap; }
.topbar__contact .ico { color: var(--on-dark-dim); transition: color var(--t); }
.topbar__contact a:hover .ico { color: var(--accent); }

/* ===================== header ===================== */
.header {
  position: sticky;
  top: 0;
  z-index: 90;
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
  color: var(--on-dark);
  transition: box-shadow var(--t), background-color var(--t);
}
.header.is-stuck { box-shadow: 0 10px 30px rgba(0, 0, 0, .32); }

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex: none;
}
.brand:hover { color: inherit; }
.brand__mark {
  display: grid;
  place-items: center;
  width: 54px; height: 54px;
  flex: none;
  background: var(--ink-card);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.brand__mark img { width: 40px; height: auto; }
.brand__text { display: flex; flex-direction: column; line-height: 1.35; }
.brand__text strong { font-size: .95em; letter-spacing: -.01em; }
.brand__text small { font-size: .78em; color: var(--on-dark-dim); }

.nav { display: contents; }
.nav__list {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-inline-start: auto;
  font-size: .87em;
}
.nav__list a {
  position: relative;
  color: var(--on-dark-mut);
  padding-block: 6px;
  white-space: nowrap;
}
.nav__list a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: inline-end;
  transition: transform var(--t);
}
.nav__list a:hover,
.nav__list a.is-active { color: var(--on-dark); }
.nav__list a:hover::after,
.nav__list a.is-active::after { transform: scaleX(1); transform-origin: inline-start; }

.nav__close, .nav__cta { display: none; }
.header__cta { flex: none; font-size: .88em; }

.burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px; height: 46px;
  background: var(--ink-card);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-sm);
  color: var(--on-dark);
  transition: border-color var(--t), color var(--t);
}
.burger .ico { width: 22px; height: 22px; }
.burger:hover { border-color: var(--accent); color: var(--accent); }

.nav-overlay {
  position: fixed; inset: 0;
  background: rgba(10, 9, 8, .6);
  backdrop-filter: blur(2px);
  z-index: 95;
  opacity: 0;
  transition: opacity var(--t);
}
.nav-overlay.is-open { opacity: 1; }

/* ===================== sections ===================== */
.section { padding-block: clamp(60px, 8vw, 104px); }
.section--dark  { background: var(--ink);  color: var(--on-dark); }
.section--paper { background: var(--paper); }
.section--cream { background: var(--cream); }
.section--sand  { background: var(--sand); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  font-size: .8em;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .01em;
}

.section__head { text-align: center; margin-bottom: clamp(36px, 5vw, 56px); }
.section__head--split {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  text-align: start;
  flex-wrap: wrap;
}
.section__title {
  font-size: clamp(1.6rem, 2.8vw, 2.5rem);
  line-height: 1.42;
  letter-spacing: -.015em;
  margin-bottom: 12px;
}
.section__title--start { text-align: start; }
.section__sub {
  max-width: 62ch;
  margin-inline: auto;
  font-size: .92em;
  color: var(--on-light-mut);
}
.section--dark .section__sub { color: var(--on-dark-mut); }
.section__sub--start { margin-inline: 0; max-width: 44ch; text-align: start; }
.section__head .btn { margin-top: 26px; }

.lead { font-size: .95em; color: var(--on-light-mut); }
.section--dark .lead { color: var(--on-dark-mut); }

/* البرتقالي فوق الخلفيات الفاتحة يستخدم الدرجة الأغمق (تباين AA) */
.section--paper .eyebrow,
.section--cream .eyebrow,
.section--sand .eyebrow,
.section--paper .ico--accent,
.section--cream .ico--accent,
.section--sand .ico--accent { color: var(--accent-ink); }

.section--paper a:hover,
.section--cream a:hover,
.section--sand a:hover { color: var(--accent-ink); }

/* ===================== hero ===================== */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--on-dark);
  padding-block: clamp(56px, 8vw, 104px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to left, rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 74px 74px;
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -10%;
  top: -30%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, rgba(232, 121, 42, .10), transparent 62%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.hero__copy { text-align: start; }
.hero__title {
  /* 4vw ≈ 57px عند 1440 — نفس مقاس العنوان في التصميم المرجعي */
  font-size: clamp(1.95rem, 4vw, 3.6rem);
  line-height: 1.32;
  letter-spacing: -.02em;
  /* نفس عرض سطر العنوان في التصميم المرجعي (≈500px عند 1440) */
  max-width: 8.7em;
  margin-bottom: 22px;
}
.hero__lead {
  max-width: 30em;
  font-size: .96em;
  color: var(--on-dark-mut);
  margin-bottom: 32px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* في RTL يقع العمود الأول يمينًا: النص يمينًا والرسم يسارًا كما في التصميم */
.hero__art {
  display: grid;
  place-items: center;
}
.hero__art svg { width: min(100%, 340px); height: auto; opacity: .95; }

/* ===================== about ===================== */
.about__grid {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  align-items: center;
  gap: clamp(32px, 5vw, 72px);
}
.about__card {
  background: var(--ink);
  border-radius: var(--r-lg);
  padding: 44px 32px;
  text-align: center;
  color: var(--on-dark);
  box-shadow: var(--shadow-lift);
}
.about__card img { width: 150px; margin-inline: auto; }
.about__rule {
  display: block;
  width: 56px; height: 3px;
  margin: 26px auto 20px;
  background: var(--accent);
  border-radius: var(--r-pill);
}
.about__card p { font-size: .85em; color: var(--on-dark-mut); margin: 0; }

.feature-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px 30px;
  margin-top: 34px;
}
.feature-grid li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: .87em;
  line-height: 1.65;
  color: var(--on-light-mut);
}
.feature-grid .ico { margin-top: .35em; width: 1.25em; height: 1.25em; }

/* ===================== practice cards ===================== */
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.card {
  display: flex;
  flex-direction: column;
  background: var(--ink-card);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  padding: 30px 26px;
  transition: transform var(--t), border-color var(--t), background-color var(--t), box-shadow var(--t);
}
.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  border-color: var(--accent-line);
  box-shadow: 0 18px 40px rgba(0, 0, 0, .30);
}
.card__icon {
  display: grid;
  place-items: center;
  width: 50px; height: 50px;
  margin-bottom: 20px;
  background: var(--accent-soft);
  border-radius: var(--r-md);
  color: var(--accent);
}
.card__icon .ico { width: 24px; height: 24px; }
.card__title { font-size: 1.02em; margin-bottom: 16px; }
.card__list { display: grid; gap: 9px; margin-bottom: 22px; }
.card__list li {
  position: relative;
  padding-inline-start: 18px;
  font-size: .82em;
  line-height: 1.6;
  color: var(--on-dark-mut);
}
.card__list li::before {
  content: "–";
  position: absolute;
  inset-inline-start: 0;
  color: var(--on-dark-dim);
}
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: .82em;
  font-weight: 700;
  color: var(--accent);
}
.card__link:hover { color: #F09A55; }
.card__link .ico { width: 1.1em; height: 1.1em; }

/* ===================== library / posts ===================== */
.posts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 26px;
}
.post {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t), box-shadow var(--t);
}
.post:hover,
.post:focus-within { transform: translateY(-4px); box-shadow: var(--shadow-lift); }
.post__thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 8;
  background: var(--sand);
  color: rgba(27, 26, 22, .38);
}
.post__thumb .ico { width: 44px; height: 44px; stroke-width: 1.5; }
.post__body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 28px; }
.post__tag {
  margin: 0 0 8px;
  font-size: .76em;
  font-weight: 700;
  color: var(--accent-ink);
}
.post__title { font-size: 1em; line-height: 1.5; margin-bottom: 12px; }
.post__excerpt { font-size: .84em; color: var(--on-light-mut); margin-bottom: 18px; }
.post__link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  font-size: .82em;
  font-weight: 700;
  color: var(--accent-ink);
}
.post__link:hover { color: var(--accent-dark); text-decoration: underline; }
.post__link .ico { width: 1.05em; height: 1.05em; }

/* ===================== faq ===================== */
.faq { display: grid; gap: 16px; }
.faq__item {
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t);
}
.faq__item.is-open { border-color: var(--accent-line); }
.faq__item h3 { margin: 0; font-size: inherit; }
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 22px 26px;
  background: none;
  border: 0;
  font-size: .95em;
  font-weight: 700;
  text-align: start;
  line-height: 1.6;
  transition: color var(--t);
}
.faq__q:hover { color: var(--accent-ink); }
.faq__chev {
  width: 20px; height: 20px;
  flex: none;
  color: var(--accent);
  transition: transform var(--t);
}
.faq__item.is-open .faq__chev { transform: rotate(180deg); }
.faq__a { padding: 0 26px 24px; font-size: .88em; color: var(--on-light-mut); }
.faq__a a { color: var(--accent-ink); font-weight: 700; }
.faq__a a:hover { text-decoration: underline; }

/* ===================== contact ===================== */
.contact__grid {
  display: grid;
  grid-template-columns: .82fr 1.18fr;
  align-items: start;
  gap: clamp(32px, 4vw, 60px);
}
.info { display: grid; gap: 26px; align-content: start; padding-top: 8px; }
.info li { display: flex; align-items: flex-start; gap: 16px; }
.info__icon {
  display: grid;
  place-items: center;
  width: 46px; height: 46px;
  flex: none;
  background: var(--accent-soft);
  border-radius: var(--r-md);
  color: var(--accent);
}
.info__icon .ico { width: 21px; height: 21px; }
.info__label {
  display: block;
  font-size: .78em;
  color: var(--on-dark-dim);
  line-height: 1.5;
}
.info__value {
  display: block;
  font-size: .92em;
  font-weight: 700;
  color: var(--on-dark);
  line-height: 1.6;
}
a.info__value:hover { color: var(--accent); }
.info__alt {
  display: inline-block;
  margin-top: 2px;
  font-size: .8em;
  color: var(--accent);
}
.info__alt:hover { text-decoration: underline; }

.form-card {
  background: var(--ink-card);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-lg);
  padding: clamp(24px, 3vw, 36px);
}
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label {
  font-size: .82em;
  font-weight: 700;
  color: var(--on-dark-mut);
}
.req { color: var(--accent); }

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  font-size: .88em;
  color: var(--on-dark);
  background: var(--ink-input);
  border: 1px solid var(--line-dark);
  border-radius: var(--r-sm);
  transition: border-color var(--t), box-shadow var(--t), background-color var(--t);
}
.field textarea { resize: vertical; min-height: 130px; line-height: 1.7; }
.field input::placeholder,
.field textarea::placeholder { color: var(--on-dark-dim); opacity: 1; }

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(232, 121, 42, .16);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"],
.field select[aria-invalid="true"] { border-color: var(--danger); }

.select-wrap { position: relative; }
.select-wrap select {
  appearance: none;
  -webkit-appearance: none;
  padding-inline-start: 42px;
  cursor: pointer;
}
.select-wrap select:invalid { color: var(--on-dark-dim); }
.select-wrap option { color: var(--on-dark); background: var(--ink-input); }
.select-wrap__chev {
  position: absolute;
  inset-inline-start: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--accent);
  pointer-events: none;
}

.err {
  margin: 0;
  font-size: .76em;
  font-weight: 700;
  color: var(--danger);
  line-height: 1.5;
}

.form__status {
  margin: 0;
  font-size: .82em;
  font-weight: 700;
  line-height: 1.6;
  min-height: 0;
}
.form__status.is-error { color: var(--danger); }
.form__status.is-success { color: var(--success); }

.form__note {
  margin: 0;
  padding-top: 4px;
  font-size: .78em;
  line-height: 1.7;
  color: var(--on-dark-dim);
  border-top: 1px solid var(--line-dark);
  padding-top: 16px;
}

.hp {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ===================== footer ===================== */
.footer {
  background: var(--ink-deep);
  color: var(--on-dark-mut);
  font-size: .88em;
  padding-top: clamp(48px, 6vw, 72px);
  border-top: 1px solid rgba(255, 255, 255, .05);
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.55fr repeat(3, minmax(0, 1fr));
  gap: 40px 32px;
  padding-bottom: clamp(36px, 5vw, 56px);
}
.brand--footer { margin-bottom: 18px; }
.brand--footer .brand__mark { width: 48px; height: 48px; }
.brand--footer .brand__mark img { width: 34px; }
.brand--footer strong { font-size: 1em; color: var(--on-dark); }
.footer__brand p { max-width: 38ch; line-height: 1.85; }

.socials { display: flex; gap: 12px; margin-top: 22px; }
.socials a {
  display: grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 1px solid var(--line-dark);
  border-radius: var(--r-sm);
  color: var(--on-dark-mut);
  transition: border-color var(--t), color var(--t), background-color var(--t), transform var(--t);
}
.socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-2px);
}
.socials .ico { width: 19px; height: 19px; }

.footer__col h2 {
  font-size: .95em;
  color: var(--on-dark);
  margin-bottom: 18px;
}
.footer__col ul { display: grid; gap: 11px; }
.footer__col a:hover { color: var(--accent); }
.footer__wa { color: var(--accent); font-weight: 700; }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: .9em;
  color: var(--on-dark-dim);
}
.footer__bottom p { margin: 0; }

/* ===================== floating whatsapp ===================== */
.fab {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: #25D366;
  color: #04310F;
  font-size: .85em;
  font-weight: 700;
  border-radius: var(--r-pill);
  box-shadow: 0 8px 26px rgba(6, 60, 24, .34);
  transition: transform var(--t), box-shadow var(--t), background-color var(--t);
}
.fab:hover,
.fab:focus-visible {
  background: #1FBA59;
  color: #04310F;
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(6, 60, 24, .42);
}
.fab__ico { width: 24px; height: 24px; fill: currentColor; flex: none; }

/* ===================== responsive ===================== */
/* شريط تنقل مضغوط قبل التحوّل إلى القائمة الجانبية */
@media (max-width: 1340px) {
  .nav__list { gap: 17px; font-size: .76em; }
  .header__cta { padding: 10px 16px; font-size: .76em; gap: 7px; }
  .brand { gap: 11px; }
  .brand__mark { width: 48px; height: 48px; }
  .brand__mark img { width: 36px; }
  .brand__text strong { font-size: .84em; }
  .brand__text small { font-size: .74em; }
  .header__inner { gap: 14px; }
}

@media (max-width: 1100px) {
  :root { --header-h: 76px; }

  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .header__cta { display: none; }
  .burger { display: inline-flex; }

  .nav {
    display: block;
    position: fixed;
    inset-block: 0;
    inset-inline-end: 0;
    width: min(88vw, 340px);
    z-index: 96;
    background: var(--ink);
    border-inline-start: 1px solid var(--line-dark);
    padding: 26px 24px 32px;
    overflow-y: auto;
    overscroll-behavior: contain;
    transform: translateX(100%);
    transition: transform .3s var(--ease);
  }
  html[dir="rtl"] .nav { transform: translateX(-100%); }
  .nav.is-open { transform: translateX(0) !important; }

  .nav__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    margin-inline-start: auto;
    margin-bottom: 18px;
    background: var(--ink-card);
    border: 1px solid var(--line-dark);
    border-radius: var(--r-sm);
    color: var(--on-dark);
  }
  .nav__close .ico { width: 20px; height: 20px; }

  .nav__list {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    margin: 0 0 22px;
    font-size: .95em;
  }
  .nav__list a {
    display: block;
    padding: 13px 12px;
    border-radius: var(--r-sm);
    color: var(--on-dark);
    transition: background-color var(--t), color var(--t);
  }
  .nav__list a::after { display: none; }
  .nav__list a:hover,
  .nav__list a.is-active { background: var(--accent-soft); color: var(--accent); }

  .nav__cta { display: inline-flex; width: 100%; }

  .hero__inner,
  .about__grid,
  .contact__grid { grid-template-columns: 1fr; }

  .hero__art { order: 1; }
  .hero__art svg { width: min(72%, 260px); }
  .about__card { order: 1; max-width: 420px; margin-inline: auto; width: 100%; }

  .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section__head--split { flex-direction: column; align-items: flex-start; }
  .section__sub--start { max-width: 60ch; }

  .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  :root { --gutter: 18px; }
  body { font-size: 16px; line-height: 1.8; }

  .topbar { font-size: .74em; }
  .topbar__inner { justify-content: center; gap: 6px 18px; padding-block: 8px; }
  .topbar__contact { gap: 18px; justify-content: center; }

  .brand__mark { width: 46px; height: 46px; }
  .brand__mark img { width: 34px; }
  .brand__text strong { font-size: .82em; }
  .brand__text small { font-size: .74em; }

  .hero__title { line-height: 1.32; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .hero__actions .btn { width: 100%; }

  .cards,
  .posts { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr; gap: 16px; }

  .section__head .btn { width: 100%; }

  .faq__q { padding: 18px 20px; gap: 12px; }
  .faq__a { padding: 0 20px 20px; }

  .info li { gap: 13px; }
  .info__icon { width: 42px; height: 42px; }

  .footer__grid { grid-template-columns: 1fr; gap: 32px; }
  .footer__bottom { justify-content: center; text-align: center; }

  .fab {
    inset-inline-end: 14px;
    bottom: 14px;
    padding: 13px;
    border-radius: 50%;
  }
  .fab__label { display: none; }
}

@media (max-width: 380px) {
  body { font-size: 15.5px; }
  .btn--lg { padding: 14px 20px; }
  .card, .form-card { padding: 22px 18px; }
}

/* ===================== motion / print ===================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
  .card:hover, .post:hover, .btn--primary:hover, .fab:hover, .socials a:hover {
    transform: none;
  }
}

@media print {
  .topbar, .header, .fab, .nav-overlay, .hero__art, .skip-link { display: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  .section--dark, .hero, .footer, .form-card, .card, .about__card {
    background: #fff !important;
    color: #000 !important;
    border-color: #ccc !important;
  }
}
