
/* ---------- Design Tokens ---------- */
:root {
  /* Brand colors */
  --indigo: #3D2A9A;      /* indigo velvet  */
  --fuchsia: #E30387;     /* fuchsia flame  */
  --tangerine: #DE2B1D;   /* burnt tangerine */

  /* Natural / neutral palette */
  --cream: #FAF7F2;       /* page background, warm off-white */
  --sand: #F1ECE3;        /* secondary surface */
  --line: #E3DCCC;        /* hairline borders */
  --ink: #1A1A1A;         /* primary text */
  --charcoal: #4A4642;    /* secondary text */
  --muted: #8A8278;       /* tertiary text */
  --white: #FFFFFF;

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

  /* Spacing scale (8px base) */
  --s-1: 8px;
  --s-2: 16px;
  --s-3: 24px;
  --s-4: 32px;
  --s-5: 48px;
  --s-6: 64px;
  --s-7: 96px;

  /* Layout */
  --maxw: 1200px;
  --gutter: 24px;

  /* Radius scale (rounded edges) */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* Motion (kept minimal per brand brief) */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --fast: 180ms;
  --med: 280ms;
}

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

* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.75;
  font-size: 17px;
  font-weight: 400;
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

/* Force Latin (English) digits everywhere */
.num,
time,
tel,
[href^="tel"],
[href^="mailto"] {
  font-feature-settings: "lnum" 1;
  direction: ltr;
  unicode-bidi: embed;
}

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--s-7); }

.section-head {
  max-width: 640px;
  margin-bottom: var(--s-5);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  /* No letter-spacing / text-transform — Arabic is a cursive script whose
     letters must stay joined. Both properties break those joins and
     disconnect the glyphs (visible especially on mobile). */
  color: var(--fuchsia);
  margin-bottom: var(--s-2);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--tangerine);
  display: inline-block;
}

.section-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.25;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.section-sub {
  margin-top: var(--s-2);
  color: var(--charcoal);
  font-size: 17px;
}

/* ---------- Brand triptych stripe (echoes the logo) ---------- */
.stripe {
  display: flex;
  width: 100%;
  height: 4px;
}
.stripe > span { flex: 1; }
.stripe > span:nth-child(1) { background: var(--indigo); }
.stripe > span:nth-child(2) { background: var(--tangerine); }
.stripe > span:nth-child(3) { background: var(--fuchsia); }

.stripe-top { position: fixed; top: 0; inset-inline: 0; z-index: 200; }

/* ---------- Top contact bar ---------- */
.topbar {
  background: var(--ink);
  color: #D9D2C6;
  font-size: 13.5px;
  margin-top: 4px; /* sit just under the fixed stripe */
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s-2);
  min-height: 40px;
  flex-wrap: wrap;
}
.topbar a { color: #fff; transition: color var(--fast) var(--ease); }
.topbar a:hover { color: var(--fuchsia); }
.topbar .contact-links { display: flex; gap: var(--s-3); flex-wrap: wrap; align-items: center; }
.topbar .item { display: inline-flex; align-items: center; gap: 8px; }
.topbar svg { width: 15px; height: 15px; color: var(--tangerine); }
.topbar .loc { color: #C8BFAF; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 4px;
  z-index: 100;
  background: rgba(250, 247, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  min-height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}
.brand-text { line-height: 1.2; }
.brand-text .ar {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
}
.brand-text .en {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--s-4);
}
.nav-links a {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--charcoal);
  position: relative;
  padding-block: 6px;
  transition: color var(--fast) var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  inset-inline-start: 0;
  width: 0;
  height: 2px;
  background: var(--fuchsia);
  transition: width var(--med) var(--ease);
}
.nav-links a:hover { color: var(--ink); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--indigo);
  color: #fff;
  padding: 12px 22px;
  font-size: 15px;
  font-weight: 700;
  border-radius: var(--r-pill);
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.nav-cta:hover { background: var(--fuchsia); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.nav-toggle svg { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 15.5px;
  padding: 15px 30px;
  min-height: 52px;
  border-radius: var(--r-pill);
  transition: background var(--fast) var(--ease),
              color var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--indigo); color: #fff; }
.btn-primary:hover { background: var(--fuchsia); transform: translateY(-2px); }
.btn-outline {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
}
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-map {
  background: var(--tangerine);
  color: #fff;
  width: 100%;
}
.btn-map:hover { background: #b8211a; transform: translateY(-2px); }
.btn-block { width: 100%; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: var(--s-7) var(--s-6);
  overflow: hidden;
}
.hero::before {
  /* faint oversized color block — solid, no gradient */
  content: "";
  position: absolute;
  top: -120px;
  inset-inline-start: -120px;
  width: 420px;
  height: 420px;
  background: var(--sand);
  z-index: -1;
  border-radius: 50%;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: var(--s-6);
  align-items: center;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--charcoal);
  margin-bottom: var(--s-3);
  border-radius: var(--r-pill);
}
.hero-badge .dot { width: 8px; height: 8px; background: var(--fuchsia); border-radius: var(--r-pill); }

.hero-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(34px, 5.4vw, 64px);
  line-height: 1.15;
  letter-spacing: -1px;
  color: var(--ink);
}
.hero-title .accent-indigo { color: var(--indigo); }
.hero-title .accent-tang { color: var(--tangerine); }
.hero-title .accent-fuch { color: var(--fuchsia); }

.hero-sub {
  margin-top: var(--s-3);
  font-size: 19px;
  color: var(--charcoal);
  max-width: 540px;
}

.hero-actions {
  margin-top: var(--s-4);
  display: flex;
  gap: var(--s-2);
  flex-wrap: wrap;
}

.hero-stats {
  margin-top: var(--s-5);
  display: flex;
  gap: var(--s-5);
  flex-wrap: wrap;
  padding-top: var(--s-4);
  border-top: 1px solid var(--line);
}
.stat .n {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
  color: var(--indigo);
  line-height: 1;
}
.stat .l {
  display: block;
  margin-top: 6px;
  font-size: 14px;
  color: var(--charcoal);
}

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}
.hero-logo-frame {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  padding: var(--s-4);
  width: 100%;
  max-width: 420px;
  box-shadow: 16px 16px 0 -2px var(--sand);
  border-radius: var(--r-xl);
  overflow: hidden;
}
.hero-logo-frame img { width: 100%; border-radius: var(--r-lg); }
.hero-logo-frame .stripe { margin-top: var(--s-3); border-radius: var(--r-pill); }

/* ---------- Features section ---------- */
.features { background: var(--white); border-block: 1px solid var(--line); }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
.card {
  background: var(--cream);
  border: 1px solid var(--line);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  border-radius: var(--r-lg);
  transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -28px rgba(26, 26, 26, 0.45);
}
.card-icon {
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--r-md);
}
.card-icon svg { width: 26px; height: 26px; }
.card:nth-child(3n + 1) .card-icon { background: var(--indigo); }
.card:nth-child(3n + 2) .card-icon { background: var(--tangerine); }
.card:nth-child(3n + 3) .card-icon { background: var(--fuchsia); }
.card h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 21px;
  color: var(--ink);
}
.card p { color: var(--charcoal); font-size: 15.5px; }

/* ---------- Categories section (what we import) ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-3);
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: var(--s-3) var(--s-3);
  display: flex;
  align-items: center;
  gap: var(--s-2);
  border-radius: var(--r-md);
  transition: transform var(--med) var(--ease),
              box-shadow var(--med) var(--ease),
              border-color var(--med) var(--ease);
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--fuchsia);
  box-shadow: 0 14px 32px -24px rgba(26, 26, 26, 0.4);
}
.cat-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border-radius: var(--r-sm);
}
.cat-icon svg { width: 24px; height: 24px; }
.cat-card:nth-child(3n + 1) .cat-icon { background: var(--indigo); }
.cat-card:nth-child(3n + 2) .cat-icon { background: var(--tangerine); }
.cat-card:nth-child(3n + 3) .cat-icon { background: var(--fuchsia); }
.cat-body h3 {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 18px;
  color: var(--ink);
  line-height: 1.3;
}
.cat-body p {
  margin-top: 4px;
  color: var(--charcoal);
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Branches section ---------- */
.branches-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--s-3);
}
.branch-card {
  background: var(--white);
  border: 1px solid var(--line);
  padding: var(--s-4);
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  border-radius: var(--r-lg);
  transition: transform var(--med) var(--ease), box-shadow var(--med) var(--ease);
}
.branch-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -28px rgba(26, 26, 26, 0.45);
}
.branch-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.branch-pin {
  width: 52px;
  height: 52px;
  background: var(--indigo);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: var(--r-md);
}
.branch-pin svg { width: 26px; height: 26px; }
.branch-card:nth-child(2) .branch-pin { background: var(--fuchsia); }
.branch-top .name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--ink);
}
.branch-top .area { color: var(--charcoal); font-size: 15px; }
.branch-meta {
  list-style: none;
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.branch-meta li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--charcoal);
}
.branch-meta svg { width: 18px; height: 18px; color: var(--tangerine); flex-shrink: 0; }
.branch-card .btn-map { margin-top: auto; }

/* ---------- Contact section ---------- */
.contact { background: var(--ink); color: #ECE6DA; }
.contact .section-title { color: #fff; }
.contact .eyebrow { color: var(--fuchsia); }
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-5);
  align-items: start;
}
.contact-list { display: flex; flex-direction: column; gap: var(--s-3); }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: var(--s-3);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--r-md);
  transition: border-color var(--fast) var(--ease);
}
.contact-item:hover { border-color: var(--fuchsia); }
.contact-item .ic {
  width: 46px;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fuchsia);
  color: #fff;
  flex-shrink: 0;
  border-radius: var(--r-sm);
}
.contact-item:nth-child(2) .ic { background: var(--tangerine); }
.contact-item:nth-child(3) .ic { background: var(--indigo); }
.contact-item .ic svg { width: 22px; height: 22px; }
.contact-item .label { font-size: 13px; color: #B7AFA0; }
.contact-item .value { font-size: 18px; font-weight: 600; color: #fff; }
.contact-item a.value:hover { color: var(--fuchsia); }

.contact-aside {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  padding: var(--s-4);
  border-radius: var(--r-lg);
}
.contact-aside h3 {
  font-family: var(--font-head);
  font-size: 22px;
  color: #fff;
  margin-bottom: var(--s-2);
}
.contact-aside p { color: #C8BFAF; margin-bottom: var(--s-3); }
.hours li {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  color: #ECE6DA;
}
.hours li:last-child { border-bottom: none; }
.hours .day { color: #B7AFA0; }

/* ---------- Footer ---------- */
.footer {
  background: #111;
  color: #9C9384;
  padding-block: var(--s-5) var(--s-3);
  border-top: 3px solid var(--fuchsia);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: var(--s-4);
  padding-bottom: var(--s-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.footer .brand-text .ar { color: #fff; }
.footer-col h4 {
  color: #fff;
  font-family: var(--font-head);
  font-size: 16px;
  margin-bottom: var(--s-2);
}
.footer-col a {
  display: block;
  padding: 6px 0;
  color: #9C9384;
  font-size: 15px;
  transition: color var(--fast) var(--ease);
}
.footer-col a:hover { color: var(--fuchsia); }
.footer-about p { color: #9C9384; font-size: 15px; max-width: 360px; }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--s-3);
  font-size: 13.5px;
  color: #6F6759;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Scroll reveal (minimal, tasteful) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms var(--ease), transform 520ms var(--ease);
}
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero-visual { order: -1; }
  .hero-logo-frame { max-width: 340px; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  :root { --s-7: 72px; --s-6: 48px; }
  body { font-size: 16px; }
  .nav-links, .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; }

  /* Mobile menu panel */
  .mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    background: var(--cream);
    z-index: 150;
    transform: translateX(100%);
    transition: transform var(--med) var(--ease);
    padding: var(--s-5) var(--gutter);
    overflow-y: auto;
  }
  .mobile-menu.open { transform: none; }
  .mobile-menu .close {
    position: absolute;
    top: 20px;
    inset-inline-end: 20px;
    width: 44px; height: 44px;
    display: flex; align-items: center; justify-content: center;
    border-radius: var(--r-pill);
    background: var(--sand);
  }
  .mobile-menu nav { display: flex; flex-direction: column; gap: 6px; margin-top: var(--s-4); }
  .mobile-menu nav a {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    color: var(--ink);
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
  }
  .mobile-menu .btn { margin-top: var(--s-4); }

  .cards-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .branches-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .container { justify-content: center; }
  .topbar .loc { display: none; }
}

@media (min-width: 761px) {
  .mobile-menu { display: none !important; }
}

/* Tablet: collapse 3-col grids to 2 cols */
@media (min-width: 761px) and (max-width: 980px) {
  .cards-grid,
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
