/* ==========================================================================
   Al-Rayie for Pharmaceutical Trading & Medical Supplies Ltd.
   Main stylesheet
   ========================================================================== */

/* ---------- Design tokens ---------- */
:root {
  /* ---- Brand palette, sampled from assets/img/AlRayie Logo.png ----
     The site is built on two colours only: the logo's petrol blue and its
     sky blue. Every other value below is a tint or shade of those, plus a
     neutral grey ramp. Restraint is deliberate — a pharmaceutical
     distributor should read as clinical and corporate, not decorative. */
  --brand-blue: #005380;   /* wordmark + dark hexagon face */
  --brand-sky:  #8ac2e5;   /* light hexagon face */

  /* Primary ramp — shades of the logo blue */
  --navy-900: #001d30;
  --navy-800: #003b5e;
  --navy-700: #005380;
  --navy-600: #0a6795;
  --navy-500: #1c7ba8;

  /* Secondary ramp — tints toward the logo sky blue */
  --steel-500: #4e9cc4;
  --steel-400: #6fb0d5;
  --steel-300: #8ac2e5;
  --steel-200: #b7dbf0;
  --steel-100: #dceefa;

  /* Neutrals — very slightly blue-tinted so they sit with the brand */
  --grey-900: #12212b;
  --grey-700: #3d4d59;
  --grey-600: #55666f;   /* muted body copy — 6.0:1 on white, clears WCAG AA */
  --grey-500: #6b7c88;   /* decorative only: 4.3:1, below AA for body text */
  --grey-300: #c3ced6;
  --grey-200: #dfe6ea;
  --grey-100: #eef2f5;
  --grey-50:  #f7f9fb;

  --bg: var(--grey-50);
  --bg-elevated: #ffffff;
  --bg-sunken: var(--grey-100);
  --text: var(--grey-900);
  --text-muted: var(--grey-600);
  --text-inverse: #ffffff;
  --border: rgba(0, 83, 128, 0.13);
  --shadow-sm: 0 1px 2px rgba(0, 29, 48, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 29, 48, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 29, 48, 0.12);

  --radius-sm: 6px;
  --radius: 12px;
  --radius-lg: 20px;

  --container: 1200px;
  --header-h: 76px;

  --ff-sans: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --ff-serif: "Playfair Display", Georgia, "Times New Roman", serif;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 0.45s;
}

/* ---------- Icons ----------
   Inline SVG (assets/js/icons.js) replaces emoji throughout. Icons inherit
   the surrounding text colour and scale with font size. */
.icon {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -0.125em;
  flex: none;
  stroke: currentColor;
  fill: none;
}
[data-icon] { display: inline-flex; align-items: center; justify-content: center; }
.icon--lg { width: 1.5em; height: 1.5em; }

/* Context sizes */
.btn .icon { width: 1.05em; height: 1.05em; }
.to-top .icon { width: 20px; height: 20px; }
.lb-close .icon { width: 22px; height: 22px; }
.lb-nav .icon { width: 26px; height: 26px; }
.ps-icon .icon { width: 17px; height: 17px; }
.ps-clear .icon { width: 16px; height: 16px; }
.empty-state .es-icon .icon { width: 40px; height: 40px; stroke-width: 1.2; }
.rank-item .icon, .bullet-list .icon { width: 18px; height: 18px; }
.partner__country .icon { width: 15px; height: 15px; }
.hero__scroll .icon { width: 18px; height: 18px; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  transition: background var(--dur) var(--ease), color var(--dur) var(--ease);
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.22; font-weight: 700; }
p { margin: 0 0 1rem; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ---------- Layout helpers ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 24px;
}
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--sunken { background: var(--bg-sunken); }
.section--navy {
  background: linear-gradient(135deg, var(--navy-800), var(--navy-700));
  color: var(--text-inverse);
}
.section--navy .section-title,
.section--navy .eyebrow { color: var(--text-inverse); }
.section--navy .lead { color: rgba(255, 255, 255, 0.82); }

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

/* ---------- Typography blocks ---------- */
.eyebrow {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--navy-700);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--ff-serif);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  color: var(--navy-700);
  margin-bottom: 18px;
}
.section--navy .section-title { color: #fff; }
.section-title::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 16px;
  background: var(--navy-700);
  border-radius: 2px;
}
.section-head { max-width: 720px; margin-bottom: 48px; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .section-title::after { margin-inline: auto; }
.lead { font-size: 1.08rem; color: var(--text-muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 30px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease),
              background 0.25s var(--ease), color 0.25s var(--ease);
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
/* Primary sits on the dark hero, so it uses the light brand tint with dark
   text — the only high-contrast pairing available within the two logo colours. */
.btn--primary {
  background: var(--steel-300);
  color: var(--navy-900);
  box-shadow: var(--shadow-md);
}
.btn--primary:hover { background: var(--steel-200); box-shadow: var(--shadow-lg); }
.btn--ghost { border: 1.5px solid currentColor; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.14); }
.btn--navy { background: var(--navy-700); color: #fff; }
.btn--navy:hover { background: var(--navy-600); }
.btn .arrow { transition: transform 0.25s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- Header / navigation ---------- */
.site-header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  height: var(--header-h);
  z-index: 1000;
  display: flex;
  align-items: center;
  background: transparent;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease),
              height 0.35s var(--ease);
}
.site-header.is-stuck {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow-sm);
  height: 64px;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand { display: flex; align-items: center; gap: 12px; }
/* The supplied logo already contains the Arabic wordmark and "Splendid",
   so the header shows the artwork alone rather than repeating it as text. */
.brand-logo {
  height: 44px;
  width: auto;
  flex: none;
  display: block;
  transition: height 0.35s var(--ease);
}
.site-header.is-stuck .brand-logo { height: 38px; }
/* Over the dark hero the navy wordmark would disappear, so the logo is
   knocked out to white until the header gains its solid background. */
body.has-dark-hero .site-header:not(.is-stuck) .brand-logo {
  filter: brightness(0) invert(1);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--ff-serif);
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--navy-700);
}
.brand-sub { font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

/* Pages whose header floats over a dark hero need light header text until
   the header gains its own solid background on scroll. */
body.has-dark-hero .site-header:not(.is-stuck) .brand-name,
body.has-dark-hero .site-header:not(.is-stuck) .nav > a {
  color: #fff;
}
body.has-dark-hero .site-header:not(.is-stuck) .brand-sub {
  color: rgba(255, 255, 255, 0.72);
}
body.has-dark-hero .site-header:not(.is-stuck) .nav > a.is-active {
  color: var(--steel-300);
}
body.has-dark-hero .site-header:not(.is-stuck) .burger span { background: #fff; }

/* The mobile drawer is an opaque panel, so it always uses body text colour. */
@media (max-width: 860px) {
  body.has-dark-hero .site-header:not(.is-stuck) .nav > a { color: var(--text); }
  body.has-dark-hero .site-header:not(.is-stuck) .nav > a.is-active { color: var(--navy-700); }
}

.nav { display: flex; align-items: center; gap: 6px; }
.nav a {
  position: relative;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.2s var(--ease);
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 14px;
  bottom: 4px;
  height: 2px;
  background: var(--navy-700);
  transform: scaleX(0);
  transform-origin: var(--origin, left);
  transition: transform 0.28s var(--ease);
}
.nav a:hover::after, .nav a.is-active::after { transform: scaleX(1); }
.nav a.is-active { color: var(--navy-700); font-weight: 600; }

.header-tools { display: flex; align-items: center; gap: 10px; }

/* Mobile burger */
.burger { display: none; width: 42px; height: 42px; place-items: center; }
.burger span {
  display: block; width: 22px; height: 2px; background: var(--text);
  border-radius: 2px; transition: transform 0.3s var(--ease), opacity 0.2s;
}
.burger span + span { margin-top: 5px; }
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding-top: var(--header-h);
  background: linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--navy-600) 100%);
  color: #fff;
  overflow: hidden;
}
.hero--compact { min-height: 58vh; }
.hero__bg {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-size: cover;
  background-position: center;
}
.hero__hexes { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; }
.hero__hexes svg { position: absolute; stroke: rgba(157, 189, 208, 0.35); fill: none; }
.hex-1 { width: 340px; top: -60px; inset-inline-end: -70px; animation: float 14s ease-in-out infinite; }
.hex-2 { width: 220px; bottom: 40px; inset-inline-end: 180px; animation: float 18s ease-in-out infinite reverse; }
.hex-3 { width: 140px; bottom: -30px; inset-inline-end: 420px; animation: float 11s ease-in-out infinite; }
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0); }
  50% { transform: translateY(-26px) rotate(6deg); }
}
.hero .container { position: relative; z-index: 2; }
.hero__inner { max-width: 760px; }
.hero__title {
  font-family: var(--ff-serif);
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  line-height: 1.06;
  margin-bottom: 20px;
}
.hero__title .accent { color: var(--steel-300); }
.hero__tagline { font-size: clamp(1.05rem, 2vw, 1.35rem); color: rgba(255,255,255,0.9); margin-bottom: 14px; }
.hero__desc { font-size: 1.05rem; color: rgba(255,255,255,0.74); max-width: 620px; margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__rule { width: 88px; height: 4px; background: var(--navy-700); border-radius: 2px; margin-bottom: 28px; }
.hero__scroll {
  position: absolute; bottom: 26px; inset-inline-start: 50%;
  transform: translateX(-50%);
  display: grid; place-items: center; gap: 6px;
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  animation: bob 2.2s ease-in-out infinite;
}
@keyframes bob { 0%,100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }

/* Page hero (interior pages) */
.page-hero {
  position: relative;
  padding: calc(var(--header-h) + 74px) 0 66px;
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  color: #fff;
  overflow: hidden;
}
.page-hero .eyebrow { color: var(--steel-300); }
.page-hero h1 { font-family: var(--ff-serif); font-size: clamp(2.1rem, 4.6vw, 3.3rem); margin-bottom: 12px; }
.page-hero p { color: rgba(255,255,255,0.76); max-width: 640px; margin: 0; }
.breadcrumb { display: flex; gap: 8px; font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 22px; }
.breadcrumb a:hover { color: var(--steel-300); }

/* ---------- Stat cards ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  position: relative;
  overflow: hidden;
  padding: 34px 24px 30px;
  border-radius: var(--radius);
  text-align: center;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.stat:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
/* Stat tiles share one treatment: a white card with a brand-blue rule and
   figure. Colour-coding each tile differently was visually noisy and carried
   no meaning — the number is the message. The old --navy/--steel/--gold/--dark
   modifiers are kept as aliases so existing markup keeps working. */
.stat--navy, .stat--steel, .stat--gold, .stat--dark {
  background: var(--bg-elevated);
  color: var(--text);
  border-color: var(--border);
}
.stat__num { color: var(--navy-700); }
.stat__label { color: var(--text-muted); }
.stat::after {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 38px;
  height: 3px;
  background: var(--navy-700);
  border-radius: 0 0 2px 2px;
}
/* On the dark hero band, invert the same tile rather than recolouring it. */
.section--navy .stat,
.cta-band .stat {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.section--navy .stat .stat__num { color: #fff; }
.section--navy .stat .stat__label { color: rgba(255, 255, 255, 0.75); }
.section--navy .stat::after { background: var(--steel-300); }
.stat__num {
  display: block;
  font-family: var(--ff-serif);
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 700;
  line-height: 1.05;
}
.stat__label { font-size: 0.86rem; opacity: 0.85; }
.stat__icon { display: grid; place-items: center; margin-bottom: 10px; color: var(--navy-700); }
.stat__icon .icon { width: 28px; height: 28px; stroke-width: 1.5; }
.section--navy .stat__icon { color: var(--steel-300); }

/* ---------- Generic cards ---------- */
.card {
  position: relative;
  padding: 32px 28px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.card::before {
  content: "";
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 3px;
  background: var(--navy-700);
  transform: scaleX(0);
  transform-origin: var(--origin, left);
  transition: transform 0.4s var(--ease);
}
.card:hover::before { transform: scaleX(1); }
.card__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 12px;
  margin-bottom: 18px;
  background: var(--steel-100);
  color: var(--navy-700);
}
.card__icon .icon { width: 26px; height: 26px; stroke-width: 1.5; }
.card h3 { font-size: 1.16rem; color: var(--navy-700); }
.card p { color: var(--text-muted); font-size: 0.95rem; margin: 0; }

/* Color-block card variants (mirrors the PDF activity slide) */
.card--fill { color: #fff; border: none; }
.card--fill h3, .card--fill p { color: inherit; }
.card--fill p { opacity: 0.86; }
.card--fill .card__icon { background: rgba(255,255,255,0.16); color: #fff; }
/* One filled treatment in the brand blue, rather than four competing colours.
   The modifiers remain as aliases so existing markup is unaffected. */
.card--navy, .card--steel, .card--gold, .card--dark { background: var(--navy-700); }
.card--fill .card__icon { background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-inline-start: 34px; }
.timeline::before {
  content: "";
  position: absolute;
  inset-inline-start: 8px;
  top: 6px; bottom: 6px;
  width: 2px;
  background: linear-gradient(var(--navy-700), var(--steel-500));
}
.timeline li { position: relative; padding-bottom: 34px; }
.timeline li::before {
  content: "";
  position: absolute;
  inset-inline-start: -34px;
  top: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--bg);
  border: 3px solid var(--navy-700);
}
.timeline .year { font-family: var(--ff-serif); font-size: 1.4rem; color: var(--navy-700); font-weight: 700; }
.timeline p { margin: 4px 0 0; color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Partner grid ---------- */
.partners { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.partner {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.partner:hover { transform: translateY(-4px); border-color: var(--navy-700); box-shadow: var(--shadow-md); }

/* Logo plate — partner artwork arrives in mixed formats, most of it drawn for
   a white ground, so the plate stays white and the logo is contained inside it
   rather than cropped. A fixed height keeps every card the same size. */
/* Supplied artwork ranges from 1:1 (Recordati Ilac) to 4.3:1 (Recordati), so
   the plate is deliberately squarish — a wide plate letterboxes square logos
   down to almost nothing, while a squarish one suits both reasonably. */
.partner__plate {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 108px;
  padding: 18px 22px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  overflow: hidden;   /* belt-and-braces: nothing escapes the plate */
}
/* Logos arrive in wildly different aspect ratios — wide wordmarks, tall
   stacked lockups, squares. Sizing the <img> itself to the box and letting
   object-fit letterbox the artwork keeps every one inside the plate. */
.partner__plate img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}
/* Partners with no official artwork yet: their name set in the brand blue,
   filling the same plate so the grid keeps a single rhythm. */
.partner__wordmark {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--navy-700);
  text-align: center;
  line-height: 1.25;
}
.partner__meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 18px 16px;
}
/* Sub-agent cards have no plate, so they carry their own padding. */
.partner--text .partner__meta { padding: 20px 20px 22px; }

.partner__name { font-weight: 700; color: var(--navy-700); font-size: 0.95rem; line-height: 1.3; }
.partner__country { font-size: 0.8rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; }
/* ISO country-code badge (see data.js for why this is not a flag emoji) */
.partner__flag {
  flex: none;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--steel-100);
  color: var(--navy-700);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-chip {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 500;
  background: var(--bg-elevated);
  transition: all 0.25s var(--ease);
}
.filter-chip:hover { border-color: var(--navy-700); }
.filter-chip.is-active { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow-sm); }
table { width: 100%; border-collapse: collapse; background: var(--bg-elevated); min-width: 480px; }
th, td { padding: 15px 20px; text-align: start; font-size: 0.94rem; border-bottom: 1px solid var(--border); }
thead th { background: var(--navy-700); color: #fff; font-weight: 600; }
tbody tr:nth-child(even) { background: var(--bg-sunken); }
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background 0.2s var(--ease); }
tbody tr:hover { background: rgba(201, 162, 39, 0.10); }

/* ---------- Disease / list chips ---------- */
.rank-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.rank-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease);
}
.rank-item:hover { transform: translateX(4px); border-color: var(--navy-700); }
.rank-item .num {
  flex: none;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy-700);
  color: #fff;
  font-weight: 700;
  font-size: 0.86rem;
}
.bullet-list li {
  position: relative;
  padding-inline-start: 26px;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.bullet-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 10px;
  width: 8px; height: 8px;
  border-radius: 2px;
  background: var(--navy-700);
  transform: rotate(45deg);
}

/* ---------- Org chart ---------- */
.org { display: grid; gap: 26px; justify-items: center; }
.org-node {
  padding: 14px 26px;
  border-radius: var(--radius-sm);
  background: var(--navy-700);
  color: #fff;
  font-weight: 600;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.org-row { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; width: 100%; }
.org-branch { display: grid; gap: 12px; justify-items: center; flex: 1 1 170px; }
.org-branch .org-node { width: 100%; background: var(--bg-elevated); color: var(--text); border: 1px solid var(--border); font-size: 0.9rem; }
.org-branch .org-node.lvl-2 { background: var(--bg-sunken); font-weight: 500; font-size: 0.86rem; }
.org-connector { width: 2px; height: 18px; background: var(--border); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contact-card {
  padding: 40px 34px;
  border-radius: var(--radius-lg);
  background: linear-gradient(150deg, var(--navy-800), var(--navy-700));
  color: #fff;
}
.contact-item { display: flex; gap: 16px; margin-bottom: 26px; }
.contact-item .ci-icon {
  flex: none; width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.12);
  color: var(--steel-300);
}
.contact-item .ci-icon .icon { width: 20px; height: 20px; }
.contact-item .ci-label {
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: rgba(255,255,255,0.55); margin-bottom: 4px;
}
.contact-item .ci-value { font-size: 0.98rem; }
.contact-item a:hover { color: var(--steel-300); }

.form-field { margin-bottom: 20px; }
.form-field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 8px; }
.form-field .req { color: #d9534f; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 13px 16px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field.has-error input,
.form-field.has-error select,
.form-field.has-error textarea { border-color: #d9534f; }
.field-error { display: none; font-size: 0.8rem; color: #d9534f; margin-top: 6px; }
.form-field.has-error .field-error { display: block; }
.form-note {
  display: none;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: rgba(40, 160, 100, 0.12);
  border: 1px solid rgba(40, 160, 100, 0.35);
  color: #1f7a4d;
  font-size: 0.92rem;
  margin-bottom: 20px;
}
.form-note.is-visible { display: block; animation: fadeUp 0.4s var(--ease); }

.map-embed { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); border: 1px solid var(--border); }
.map-embed iframe { width: 100%; height: 340px; border: 0; display: block; }

/* ---------- Social ---------- */
.social-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; }
.social-card {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.social-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
/* Platform brand colours (the Instagram gradient especially) fought with the
   Al-Rayie palette, so social tiles use the house blue instead. */
.social-card .sc-icon {
  flex: none; width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--steel-100);
  color: var(--navy-700);
}
.social-card .sc-icon .icon { width: 22px; height: 22px; }
.social-card.is-official .sc-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.social-card.is-official { background: var(--navy-700); color: #fff; border-color: transparent; }
.social-card .sc-name { font-weight: 600; font-size: 0.98rem; }
.social-card .sc-handle { font-size: 0.84rem; color: var(--text-muted); }
.social-card.is-official .sc-handle { color: rgba(255,255,255,0.72); }

/* ---------- CTA band ---------- */
.cta-band {
  padding: 68px 0;
  background: linear-gradient(120deg, var(--navy-800), var(--navy-600));
  color: #fff;
  text-align: center;
}
.cta-band h2 { font-family: var(--ff-serif); font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.cta-band p { color: rgba(255,255,255,0.78); max-width: 560px; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255,255,255,0.72); padding: 62px 0 0; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 40px; padding-bottom: 44px; }
.site-footer h4 { color: #fff; font-size: 0.98rem; margin-bottom: 18px; }
.site-footer a { transition: color 0.2s var(--ease); }
.site-footer a:hover { color: var(--steel-300); }
.site-footer li { margin-bottom: 10px; font-size: 0.92rem; }
.footer-brand .brand-name { color: #fff; }
.footer-brand .brand-sub { color: rgba(255,255,255,0.5); }
.footer-brand p { font-size: 0.92rem; margin-top: 16px; max-width: 320px; }
/* Footer sits on the darkest navy — knock the logo out to white */
.footer-logo { height: 52px; filter: brightness(0) invert(1); }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 12px;
  align-items: center; justify-content: space-between;
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,0.12);
  font-size: 0.85rem;
}

/* ==========================================================================
   Product catalogue (products.html)
   ========================================================================== */

/* ---------- Brand tabs ---------- */
.brand-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.brand-tab {
  --accent: var(--navy-700);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.28s var(--ease);
}
.brand-tab:hover { border-color: var(--accent); transform: translateY(-2px); }
.brand-tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.bt-count {
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(13, 79, 108, 0.10);
  font-size: 0.76rem;
  font-weight: 700;
}
.brand-tab.is-active .bt-count { background: rgba(255, 255, 255, 0.24); }

/* ---------- Search ---------- */
.product-search {
  position: relative;
  max-width: 460px;
  margin-bottom: 22px;
}
.product-search input {
  width: 100%;
  padding: 13px 44px;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: 999px;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.product-search input:focus {
  outline: none;
  border-color: var(--navy-700);
  box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.18);
}
.product-search input::-webkit-search-cancel-button { display: none; }
.ps-icon {
  position: absolute;
  inset-inline-start: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  opacity: 0.55;
  pointer-events: none;
}
.ps-clear {
  position: absolute;
  inset-inline-end: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 1.2rem;
  line-height: 1;
  color: var(--text-muted);
  transition: background 0.2s var(--ease);
}
/* `display:grid` above would otherwise defeat the [hidden] attribute */
.ps-clear[hidden] { display: none; }
.ps-clear:hover { background: var(--bg-sunken); color: var(--text); }

/* Result count on one side, page-size picker on the other */
.grid-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px 20px;
  margin-bottom: 20px;
}
.result-count {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Page-size picker ---------- */
.per-page {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-inline-start: auto;
}
.pp-label {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.pp-group {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-elevated);
  overflow: hidden;
}
.pp-btn {
  padding: 7px 15px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.pp-btn + .pp-btn { border-inline-start: 1px solid var(--border); }
.pp-btn:hover { background: var(--steel-100); color: var(--navy-700); }
.pp-btn.is-active { background: var(--navy-700); color: #fff; }

/* ---------- Pagination ---------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 36px;
}
.pagination[hidden] { display: none; }
.page-btn {
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text);
  transition: background 0.2s var(--ease), border-color 0.2s var(--ease),
              color 0.2s var(--ease);
}
.page-btn:hover:not(:disabled):not(.is-active) {
  border-color: var(--navy-700);
  background: var(--steel-100);
  color: var(--navy-700);
}
.page-btn.is-active {
  background: var(--navy-700);
  border-color: var(--navy-700);
  color: #fff;
  cursor: default;
}
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn .icon { width: 18px; height: 18px; }
.page-gap {
  min-width: 24px;
  text-align: center;
  color: var(--text-muted);
  user-select: none;
}

@media (max-width: 560px) {
  .grid-toolbar { flex-direction: column; align-items: flex-start; }
  .per-page { margin-inline-start: 0; }
  .page-btn { min-width: 36px; height: 36px; padding: 0 9px; font-size: 0.82rem; }
}

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 20px;
}
.product-card {
  --accent: var(--navy-700);
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  text-align: start;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s var(--ease), transform 0.5s var(--ease),
              box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}
.product-card.is-in { opacity: 1; transform: none; }
.product-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-6px);
}
.product-card:focus-visible {
  outline: 3px solid var(--navy-700);
  outline-offset: 2px;
}
.pc-media {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  /* Product photography is shot on white, so the tile stays white in both
     themes — a dark tile would show as a grey box around the cut-out. */
  background: #fff;
  padding: 14px;
  overflow: hidden;
}
.pc-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 0.45s var(--ease);
}
.product-card:hover .pc-media img { transform: scale(1.07); }
.pc-body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 16px 16px 18px;
  border-top: 3px solid var(--accent);
}
.pc-brand {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.pc-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
}
.pc-line { font-size: 0.8rem; color: var(--text-muted); }

/* ---------- Empty state ---------- */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-muted);
}
.empty-state .es-icon { font-size: 2.4rem; display: block; margin-bottom: 12px; }
.empty-state p { margin-bottom: 18px; }

/* ---------- Brand cards ---------- */
.brand-card {
  --accent: var(--navy-700);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}
.brand-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.bc-head {
  display: grid;
  place-items: center;
  min-height: 150px;
  padding: 28px;
  background: #fff;           /* brand logos are supplied on white */
  border-bottom: 3px solid var(--accent);
}
.bc-logo { max-height: 82px; width: auto; object-fit: contain; }
.bc-wordmark {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #333;
}
.bc-body { padding: 26px 26px 28px; }
.bc-body h3 { font-size: 1.3rem; color: var(--navy-700); margin-bottom: 6px; }
.bc-origin {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.84rem; color: var(--text-muted);
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.bc-body p { font-size: 0.94rem; color: var(--text-muted); margin-bottom: 0; }
/* Product count sits inline with the origin as a quiet secondary note —
   the brand tabs below carry the authoritative counts. */
.bc-count {
  margin-inline-start: auto;
  padding-inline-start: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 5vh 6vw;
  background: rgba(6, 20, 32, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: lbIn 0.25s var(--ease);
}
.lightbox[hidden] { display: none; }
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lb-figure {
  margin: 0;
  max-width: 620px;
  width: 100%;
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: lbPop 0.3s var(--ease);
}
@keyframes lbPop { from { transform: scale(0.94); } to { transform: none; } }
.lb-figure img {
  width: 100%;
  max-height: 62vh;
  object-fit: contain;
  background: #fff;
  padding: 20px;
}
.lb-figure figcaption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 24px 22px;
  border-top: 3px solid var(--accent, var(--navy-700));
  background: #fff;
  color: #1c2b36;
}
.lb-brand {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent, var(--navy-700));
}
.lb-name { font-size: 1.12rem; font-weight: 600; }
.lb-line { font-size: 0.85rem; color: #5a6b78; }

.lb-close, .lb-nav {
  position: absolute;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease);
}
.lb-close:hover, .lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
/* Arrows are hidden when a filter leaves only one result */
.lb-nav[hidden] { display: none; }
.lb-close {
  top: 20px; inset-inline-end: 20px;
  width: 44px; height: 44px;
  font-size: 1.7rem; line-height: 1;
}
.lb-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 50px; height: 50px;
  font-size: 2rem; line-height: 1;
}
.lb-nav:hover { transform: translateY(-50%) scale(1.08); }
.lb-prev { inset-inline-start: 16px; }
.lb-next { inset-inline-end: 16px; }

@media (max-width: 700px) {
  .product-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
  .lb-nav { width: 40px; height: 40px; font-size: 1.5rem; }
  .lb-prev { inset-inline-start: 6px; }
  .lb-next { inset-inline-end: 6px; }
  .lightbox { padding: 4vh 3vw; }
}

/* ---------- Scroll reveal ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }
[data-reveal][data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal][data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal][data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal][data-reveal-delay="4"] { transition-delay: 0.32s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Scroll progress bar */
.scroll-progress {
  position: fixed; top: 0; inset-inline-start: 0;
  height: 3px; width: 0;
  background: linear-gradient(90deg, var(--navy-700), var(--steel-500));
  z-index: 1100;
  transition: width 0.1s linear;
}

/* Back to top */
.to-top {
  position: fixed;
  inset-block-end: 26px;
  inset-inline-end: 26px;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--navy-700);
  color: #fff;
  box-shadow: var(--shadow-md);
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: all 0.3s var(--ease);
  z-index: 900;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { background: var(--navy-700); color: var(--navy-900); }


/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .burger { display: grid; }
  .nav {
    position: fixed;
    inset-block-start: 0;
    inset-inline-end: 0;
    width: min(320px, 84vw);
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: calc(var(--header-h) + 20px) 22px 22px;
    background: var(--bg-elevated);
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform 0.35s var(--ease);
    overflow-y: auto;
  }
  .nav.is-open { transform: translateX(0); }
  .nav a { padding: 14px 12px; font-size: 1rem; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
  .grid--2, .grid--3, .contact-grid, .rank-list { grid-template-columns: 1fr; }
  .section { padding: 62px 0; }
  .hero { min-height: 88vh; }
}
@media (max-width: 560px) {
  .grid--4, .stats, .footer-grid { grid-template-columns: 1fr; }
  .container { padding-inline: 18px; }
  .brand-sub { display: none; }
  .hero__actions .btn { width: 100%; justify-content: center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Print */
@media print {
  .site-header, .to-top, .scroll-progress, .hero__scroll { display: none !important; }
  body { background: #fff; color: #000; }
}
