/* ==========================================================================
   مؤسسة درب العان — Darb Alan Establishment
   Design system: brand palette only (#C9A46A, #443721, #6E6E6E, #F2F2F2, #FFFFFF)
   RTL, mobile-first, static-first. No frameworks.
   ========================================================================== */

:root {
  /* Brand palette (authoritative — official Darb Alan identity sheet) */
  --gold: #C9A46A;
  --brown: #443721;
  --gray: #6E6E6E;
  --light: #F2F2F2;
  --white: #FFFFFF;
  /* Derived tints/shades of the brand palette only */
  --brown-deep: #362C1A;      /* shade of --brown */
  --brown-ink: #2B2215;       /* text-on-light, shade of --brown */
  --gold-soft: #DFC79B;       /* tint of --gold */
  --gold-faint: #F6EEE0;      /* faint tint of --gold */
  --gold-ink: #7A5A22;        /* shade of --gold, for gold text on light bg (contrast) */
  --gray-line: #DCDCDC;       /* tint of --gray */

  /* Type */
  --font-display: "Tajawal", "IBM Plex Sans Arabic", system-ui, sans-serif;
  --font-body: "IBM Plex Sans Arabic", "Tajawal", system-ui, sans-serif;

  --radius: 6px;
  --shadow: 0 6px 24px rgba(44, 33, 20, 0.10);
  --maxw: 1140px;
  --gutter: 20px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.8;
  color: var(--brown-ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); }
a:hover { color: var(--gold-ink); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--brown);
  line-height: 1.35;
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.8rem, 5vw, 2.9rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); font-weight: 700; }
.card h2, .article-card h2 { font-size: clamp(1.15rem, 2.6vw, 1.4rem); font-weight: 700; }
p { margin: 0 0 1em; }

/* Focus visibility (accessibility) */
:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
  border-radius: 3px;
}

.skip-link {
  position: absolute; inset-inline-start: -9999px; top: 0;
  background: var(--brown); color: var(--white);
  padding: 10px 18px; z-index: 100; border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { inset-inline-start: 12px; color: var(--white); }

.container { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--gray-line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 68px; gap: 16px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
/* official Darb Alan mark — aspect ratio preserved, never stretched */
.brand-logo { width: 44px; height: 44px; flex: none; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name strong { font-family: var(--font-display); font-weight: 800; color: var(--brown); font-size: 1.02rem; }
.brand-name span { font-size: .72rem; color: var(--gray); letter-spacing: .04em; }

.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid var(--gray-line);
  background: var(--white); border-radius: var(--radius); cursor: pointer;
}
.nav-toggle-bars { position: relative; width: 20px; height: 2px; background: var(--brown); }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; inset-inline-start: 0; width: 20px; height: 2px; background: var(--brown);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }

.site-nav { display: none; }
.site-nav.open {
  display: block; position: absolute; top: 100%; inset-inline: 0;
  background: var(--white); border-bottom: 1px solid var(--gray-line);
  box-shadow: var(--shadow);
}
.site-nav ul { list-style: none; margin: 0; padding: 8px var(--gutter) 16px; }
.site-nav a {
  display: block; padding: 11px 8px; text-decoration: none;
  font-weight: 500; color: var(--brown-ink); border-radius: var(--radius);
}
.site-nav a:hover { background: var(--gold-faint); color: var(--brown); }
.site-nav li:not(.nav-cta) > a[aria-current="page"] {
  color: var(--brown); font-weight: 700; background: var(--gold-faint);
}
.nav-cta a[aria-current="page"] { box-shadow: 0 0 0 3px var(--gold-soft); }
.nav-cta { margin-top: 8px; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav { display: block; position: static; box-shadow: none; border: 0; }
  .site-nav ul { display: flex; align-items: center; gap: 2px; padding: 0; }
  .site-nav a { padding: 9px 12px; font-size: .95rem; }
  .site-nav li:not(.nav-cta) > a[aria-current="page"] {
    background: transparent; box-shadow: inset 0 -3px 0 var(--gold); border-radius: 0;
  }
  .nav-cta { margin: 0 0 0 0; margin-inline-start: 10px; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: var(--radius);
  font-family: var(--font-display); font-weight: 700; font-size: 1rem;
  text-decoration: none; border: 2px solid transparent; cursor: pointer;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn-gold { background: var(--gold); color: var(--brown-ink); }
.btn-gold:hover { background: var(--gold-soft); color: var(--brown-ink); }
.btn-outline { border-color: var(--gold); color: var(--gold); background: transparent; }
.btn-outline:hover { background: var(--gold); color: var(--brown-ink); }
.btn-outline-dark { border-color: var(--brown); color: var(--brown); background: transparent; }
.btn-outline-dark:hover { background: var(--brown); color: var(--white); }
.btn-block { width: 100%; }

/* ==========================================================================
   Signature motif: the route line (مسار الرحلة)
   A dashed gold route with origin/destination markers — encodes the
   subject itself: freight moving between two Saudi cities.
   ========================================================================== */
.route-line {
  --dot: 10px;
  position: relative; height: var(--dot);
  margin: 26px 0;
}
.route-line::before {
  content: ""; position: absolute; top: 50%; inset-inline: calc(var(--dot) + 6px);
  border-top: 2px dashed var(--gold); transform: translateY(-50%);
}
.route-line::after {
  content: ""; position: absolute; top: 50%; inset-inline-end: 0;
  width: var(--dot); height: var(--dot); border-radius: 50%;
  background: var(--gold); transform: translateY(-50%);
}
.route-line > i {
  position: absolute; top: 50%; inset-inline-start: 0;
  width: var(--dot); height: var(--dot); border-radius: 50%;
  border: 2px solid var(--gold); background: var(--white); transform: translateY(-50%);
}
.route-line.on-dark > i { background: var(--brown-deep); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  background:
    repeating-linear-gradient(-45deg, rgba(200,154,60,.05) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, var(--brown-deep), var(--brown));
  color: var(--light);
  padding: 56px 0 44px;
}
.hero .eyebrow {
  display: inline-block; color: var(--gold); font-weight: 700;
  font-size: .9rem; letter-spacing: .02em; margin-bottom: 10px;
  border: 1px solid var(--gold); border-radius: 999px; padding: 4px 14px;
}
.hero h1 { color: var(--white); }
.hero h1 .accent { color: var(--gold); }
.hero p.lead { color: var(--gold-faint); font-size: 1.08rem; max-width: 46ch; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.hero-meta { margin-top: 26px; font-size: .85rem; color: var(--gold-soft); }
.hero-meta strong { color: var(--white); font-weight: 600; }

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: 52px 0; }
.section-alt { background: var(--light); }
.section-dark { background: var(--brown); color: var(--light); }
.section-dark h2, .section-dark h3 { color: var(--white); }
.section-dark p { color: var(--gold-faint); }
.section-dark .kicker { color: var(--gold); }
.section-head { max-width: 62ch; margin-bottom: 28px; }
.section-head .kicker {
  color: var(--gold-ink); font-weight: 700; font-size: .88rem;
  display: block; margin-bottom: 6px;
}

.grid { display: grid; gap: 18px; }
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white); border: 1px solid var(--gray-line);
  border-radius: var(--radius); padding: 22px;
}
.card h2, .card h3 { margin-top: 6px; }
.card .icon {
  width: 46px; height: 46px; border-radius: var(--radius);
  display: grid; place-items: center;
  background: var(--gold-faint); color: var(--brown);
}
.card .icon svg { width: 24px; height: 24px; }
.section-dark .card { background: var(--brown-deep); border-color: rgba(200,154,60,.35); }
.section-dark .card h2, .section-dark .card h3 { color: var(--gold); }
.section-dark .card p { color: var(--light); }

/* Steps (how to request a quote) — ride the route motif */
.steps { counter-reset: step; display: grid; gap: 14px; }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(4, 1fr); } }
.step {
  position: relative; background: var(--white);
  border: 1px solid var(--gray-line); border-radius: var(--radius);
  padding: 20px 20px 18px;
}
.step::before {
  counter-increment: step; content: counter(step, arabic-indic);
  position: absolute; top: -14px; inset-inline-start: 16px;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--gold); color: var(--brown-ink);
  font-family: var(--font-display); font-weight: 800;
  display: grid; place-items: center; font-size: .95rem;
}
.step h3 { font-size: 1.05rem; margin-top: 4px; }
.step p { margin: 0; font-size: .93rem; color: var(--gray); }

/* Coverage band */
.coverage {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px;
}
.coverage span {
  background: var(--gold-faint); color: var(--brown);
  border-radius: 999px; padding: 6px 16px; font-size: .9rem; font-weight: 500;
}

/* ==========================================================================
   Forms
   ========================================================================== */
.form-grid { display: grid; gap: 16px; }
@media (min-width: 760px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
.field label { display: block; font-weight: 600; margin-bottom: 6px; color: var(--brown); }
.field .req { color: var(--gold-ink); }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font: inherit;
  border: 1px solid var(--gray-line); border-radius: var(--radius);
  background: var(--white); color: var(--brown-ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid var(--gold); outline-offset: 1px; border-color: var(--gold);
}
.field .hint { font-size: .82rem; color: var(--gray); margin-top: 4px; }
.field .error-msg { display: none; color: #8A2E1E; font-size: .85rem; margin-top: 5px; }
.field.invalid .error-msg { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: #8A2E1E; }
.consent { display: flex; gap: 10px; align-items: flex-start; }
.consent input { width: 20px; height: 20px; margin-top: 4px; flex: none; }
.form-status { display: none; border-radius: var(--radius); padding: 14px 16px; margin-top: 16px; }
.form-status.ok { display: block; background: var(--gold-faint); border: 1px solid var(--gold); color: var(--brown); }
.form-status.err { display: block; background: #FBEFEC; border: 1px solid #8A2E1E; color: #8A2E1E; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-item { border: 1px solid var(--gray-line); border-radius: var(--radius); margin-bottom: 12px; background: var(--white); }
.faq-item summary {
  cursor: pointer; list-style: none; padding: 16px 18px;
  font-family: var(--font-display); font-weight: 700; color: var(--brown);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; color: var(--gold-ink); font-size: 1.4rem; line-height: 1; flex: none; }
.faq-item[open] summary::after { content: "−"; }
.faq-item .faq-body { padding: 0 18px 16px; color: var(--gray); }

/* ==========================================================================
   Gallery / testimonials placeholders
   ========================================================================== */
.ph-media {
  border: 2px dashed var(--gray-line); border-radius: var(--radius);
  background: var(--light); min-height: 180px;
  display: grid; place-items: center; text-align: center;
  color: var(--gray); padding: 18px; font-size: .9rem;
}
.ph-media strong { display: block; color: var(--brown); margin-bottom: 4px; }

/* Articles */
.article-card { display: flex; flex-direction: column; }
.article-card .card-body { flex: 1; }
.article-card time { font-size: .82rem; color: var(--gray); }
.article-content { max-width: 72ch; }
.article-content h2 { margin-top: 1.6em; }
.article-content ul { padding-inline-start: 1.3em; }

/* Tables (pricing factors) */
.factors { display: grid; gap: 12px; }
@media (min-width: 760px) { .factors { grid-template-columns: 1fr 1fr; } }
.factor {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--white); border: 1px solid var(--gray-line);
  border-radius: var(--radius); padding: 16px;
}
.factor .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); margin-top: 9px; flex: none; }

/* ==========================================================================
   CTA band
   ========================================================================== */
.cta-band { background: linear-gradient(180deg, var(--brown), var(--brown-deep)); color: var(--white); text-align: center; padding: 48px 0; }
.cta-band h2 { color: var(--white); }
.cta-band p { color: var(--gold-faint); max-width: 52ch; margin-inline: auto; }
.cta-band .hero-ctas { justify-content: center; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--brown-deep); color: var(--gold-faint); padding: 42px 0 90px; font-size: .92rem; }
@media (min-width: 960px) { .site-footer { padding-bottom: 42px; } }
.footer-grid { display: grid; gap: 26px; }
@media (min-width: 820px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; } }
.site-footer h2 { color: var(--gold); font-size: 1rem; }
.footer-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-logo { width: 52px; height: 52px; flex: none; object-fit: contain; }
.footer-reg { margin-top: 10px; font-size: .84rem; color: var(--gold-soft); }
.footer-reg span { display: block; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.site-footer a { color: var(--light); text-decoration: none; }
.site-footer a:hover { color: var(--gold); }
.footer-license { margin-top: 10px; font-size: .84rem; color: var(--gold-soft); }
.footer-bottom {
  border-top: 1px solid rgba(200,154,60,.3); margin-top: 28px; padding-top: 18px;
  display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between;
  font-size: .82rem; color: var(--gray-line);
}

/* ==========================================================================
   Sticky mobile action bar
   ========================================================================== */
.mobile-actions {
  position: fixed; bottom: 0; inset-inline: 0; z-index: 60;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--white); border-top: 1px solid var(--gray-line);
  box-shadow: 0 -4px 18px rgba(44,33,20,.12);
}
.mobile-actions a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 9px 4px 10px; text-decoration: none;
  font-size: .74rem; font-weight: 600; color: var(--brown);
}
.mobile-actions a svg { width: 21px; height: 21px; }
.mobile-actions a.primary { background: var(--gold); color: var(--brown-ink); }
@media (min-width: 960px) { .mobile-actions { display: none; } }

/* Breadcrumb-ish page header */
.page-head { background: var(--light); padding: 34px 0 26px; border-bottom: 1px solid var(--gray-line); }
.page-head h1 { margin-bottom: 6px; }
.page-head p { color: var(--gray); margin: 0; max-width: 62ch; }

/* Utility */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 18px; }
.mt-3 { margin-top: 28px; }
.center { text-align: center; }
.muted { color: var(--gray); }
.notice {
  background: var(--gold-faint); border: 1px solid var(--gold);
  border-radius: var(--radius); padding: 14px 16px; font-size: .93rem; color: var(--brown);
}

/* ==========================================================================
   Layout helpers — بدائل خصائص style= المضمّنة
   نُقلت هذه القواعد من inline styles حتى يبقى CSP صارمًا بلا 'unsafe-inline'.
   القيم مطابقة تمامًا للسابق، ودرجة التخصيص مختارة لتتفوق على القواعد الأساسية.
   ========================================================================== */
.m-0 { margin: 0; }
.text-end { text-align: end; }
.text-sm { font-size: .85rem; }

/* عمود واحد للعوامل في صفحة "من نحن" (يتفوق على قاعدة الوسائط في .factors) */
.factors.factors-single { grid-template-columns: 1fr; }

/* حقل مصيدة السبام — مُخفى بصريًا خارج الشاشة مع بقائه في الـ DOM */
.hp-field { position: absolute; right: -9999px; }

/* نموذج عرض السعر: وزن عادي لنص الموافقة */
.field label.label-normal { font-weight: 400; }

/* مواضع الصور الأطول في صفحة آراء العملاء */
.ph-media.ph-media-tall { min-height: 220px; }

/* حاوية أضيق لصفحة الأسئلة الشائعة */
.container.container-narrow { max-width: 820px; }

/* صفحة 404 */
.err-code { font-size: clamp(3rem, 10vw, 5rem); margin-bottom: 0; }
.route-line.route-line-compact { max-width: 280px; margin-inline: auto; }
.hero-ctas.is-centered { justify-content: center; }

/* ==========================================================================
   Business / contact information block
   ========================================================================== */
.info-list { display: grid; gap: 12px; margin: 0; }
.info-list > div {
  display: grid; gap: 2px;
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 12px;
}
.info-list dt { font-weight: 700; color: var(--brown); font-size: .92rem; }
.info-list dd { margin: 0; color: var(--brown-ink); }
.info-list dd a { font-weight: 600; }
@media (min-width: 760px) { .info-list { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   Content imagery
   صور توضيحية داخل الأقسام — نسبة 1:1 مثبتة لمنع أي إزاحة تخطيط (CLS)
   ========================================================================== */
.figure {
  margin: 0;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--light);
}
.figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}
.figure figcaption {
  padding: 10px 14px;
  font-size: .85rem;
  color: var(--gray);
  background: var(--white);
  border-top: 1px solid var(--gray-line);
}
/* صورة داعمة بجانب نص القسم */
.media-split { display: grid; gap: 22px; align-items: start; }
.media-split > * { min-width: 0; }
@media (min-width: 860px) { .media-split { grid-template-columns: 1fr 1fr; } }

/* ==========================================================================
   Illustrative vector visuals — رسومات متجهة توضيحية
   تحل محل المساحات التي كانت تشغلها الصور. لا صور فوتوغرافية، ولا اعتماد على
   مكتبات أو خطوط خارجية، ولا خصائص style= مضمّنة (يبقى CSP صارمًا).
   ========================================================================== */
.viz {
  margin: 0;
  min-width: 0;
  border: 1px solid var(--gray-line);
  border-radius: var(--radius);
  background: var(--gold-faint);
  padding: 22px 18px 14px;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.viz svg {
  display: block;
  width: 100%;
  max-width: 320px;
  height: auto;
  color: var(--brown);
}
.viz figcaption {
  font-size: .82rem;
  line-height: 1.6;
  color: var(--gold-ink);
  text-align: center;
}
.viz .ln, .viz .ac {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.viz .ln { stroke: currentColor; }
.viz .ac { stroke: var(--gold-ink); }
.viz .dash { stroke-dasharray: 6 7; }
