/* Kansest Holding Company - site styles. Palette from the official letterhead:
   logo navy #1D2A6B, footer slate #4A5578, footer rule #A8B0C8.
   Typeface: Readex Pro (SIL OFL 1.1, see fonts/OFL.txt), self-hosted in assets/fonts.
   One family for Arabic and Latin; weights 400 (text), 500 (labels, nav), 700 (headings).
   Nothing is loaded from other hosts. Colour rule: headings and brand elements use --navy,
   running text uses --ink, small labels and meta lines use --muted. */

/* Aref Ruqaa 700 (SIL OFL 1.1, assets/fonts/OFL-Aref-Ruqaa.txt): Arabic headings only, the closest open font to the logo's Ruqaa-style name. Latin falls back to Readex Pro. */
@font-face {
  font-family: "Aref Ruqaa";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/aref-ruqaa-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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, U+102E0-102FB, U+10E60-10E7E, U+10EC2-10EC7, U+10EC9-10EEE, U+10EF0-10EFF, U+1EE00-1EE03, U+1EE05-1EE1F, U+1EE21-1EE22, U+1EE24, U+1EE27, U+1EE29-1EE32, U+1EE34-1EE37, U+1EE39, U+1EE3B, U+1EE42, U+1EE47, U+1EE49, U+1EE4B, U+1EE4D-1EE4F, U+1EE51-1EE52, U+1EE54, U+1EE57, U+1EE59, U+1EE5B, U+1EE5D, U+1EE5F, U+1EE61-1EE62, U+1EE64, U+1EE67-1EE6A, U+1EE6C-1EE72, U+1EE74-1EE77, U+1EE79-1EE7C, U+1EE7E, U+1EE80-1EE89, U+1EE8B-1EE9B, U+1EEA1-1EEA3, U+1EEA5-1EEA9, U+1EEAB-1EEBB, U+1EEF0-1EEF1;
}
@font-face {
  font-family: "Readex Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/readex-pro-arabic-400.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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: "Readex Pro"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/readex-pro-arabic-500.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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: "Readex Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/readex-pro-arabic-700.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-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: "Readex Pro"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/readex-pro-latin-400.woff2") format("woff2");
  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: "Readex Pro"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("fonts/readex-pro-latin-500.woff2") format("woff2");
  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: "Readex Pro"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("fonts/readex-pro-latin-700.woff2") format("woff2");
  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 {
  color-scheme: light;
  --navy: #1D2A6B;      /* logo: headings, brand, links, accents */
  --navy-deep: #141E52; /* hover */
  --ink: #1B2033;       /* running text */
  --muted: #4A5578;     /* labels, dates, footer */
  --mist: #A8B0C8;      /* rules */
  --line: #DCE0EA;      /* card borders */
  --tint: #F4F5F9;      /* alternate section background, badge */
  --paper: #FFFFFF;
  --radius: 10px;
  --wrap: 1080px;
  --font-head: "Aref Ruqaa", "Readex Pro", system-ui, "Geeza Pro", serif;
  --font: "Readex Pro", system-ui, -apple-system, "Segoe UI", "SF Arabic", "Geeza Pro", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
}

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 400;
  font-size: 1.0625rem;
  line-height: 1.85;
  overflow-wrap: break-word;
}
html[lang="en"] body { line-height: 1.7; }

h1, h2, h3, h4 { color: var(--navy); font-weight: 700; }
/* Arabic headings take the logo's Ruqaa style; English headings stay in Readex Pro. */
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, html[lang="ar"] h4, html[lang="ar"] .values strong { font-family: var(--font-head); line-height: 1.6; }
html[lang="ar"] .values strong { font-size: 1.3rem; }
html[lang="ar"] .section h4 { font-size: 1.3rem; }
html[lang="ar"] .hero h1 { font-size: clamp(2rem, 5vw, 3rem); }
html[lang="ar"] .section h2 { font-size: clamp(1.6rem, 3.6vw, 2.2rem); }
html[lang="ar"] .section h3 { font-size: 1.35rem; }
p { margin: 0; }
img { max-width: 100%; height: auto; display: block; }
strong { font-weight: 700; }

a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--navy-deep); }
:focus-visible { outline: 3px solid var(--navy); outline-offset: 3px; border-radius: 4px; }

.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 16px; }
@media (min-width: 720px) { .wrap { padding-inline: 32px; } }

/* Skip link */
.skip {
  position: absolute; inset-inline-start: 16px; top: -100px;
  background: var(--navy); color: var(--paper); padding: 10px 16px; border-radius: 6px; z-index: 10;
  text-decoration: none; font-weight: 500;
}
.skip:focus { top: 12px; color: var(--paper); }

/* Header: logo, menu, language. On phones the menu sits on its own row as a 3-column grid. */
.site-header { border-bottom: 1px solid var(--navy); background: var(--paper); }
.site-header .wrap {
  display: flex; align-items: center; gap: 12px 28px; padding-block: 18px;
}
.brand { display: block; flex: 0 0 auto; }
.brand img { width: 220px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 22px; margin-inline-start: auto; }
.nav a {
  text-decoration: none; color: var(--navy); font-weight: 500; font-size: 0.95rem;
  padding-block: 6px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--navy-deep); border-bottom-color: var(--mist); }
.lang {
  flex: 0 0 auto; border: 1px solid var(--mist); border-radius: 999px; padding: 4px 16px;
  color: var(--navy); text-decoration: none; font-weight: 500; font-size: 0.95rem;
}
.lang:hover { border-color: var(--navy); }

@media (max-width: 899px) {
  .site-header .wrap {
    display: grid; grid-template-columns: 1fr auto; grid-template-areas: "brand lang" "nav nav";
    padding-block: 14px 10px;
  }
  .brand { grid-area: brand; }
  .brand img { width: 190px; }
  .lang { grid-area: lang; }
  .nav {
    grid-area: nav; margin: 4px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0 8px; border-top: 1px solid var(--line); padding-top: 4px;
  }
  .nav a { text-align: center; padding-block: 10px; font-size: 0.92rem; }
}
@media (min-width: 560px) and (max-width: 899px) {
  .nav { grid-template-columns: repeat(6, auto); justify-content: space-between; }
}

/* Hero: echoes the letterhead's watermark */
.hero {
  background-color: var(--paper);
  background-image: url("watermark.png");
  background-repeat: no-repeat;
  background-position: center bottom 40px;
  background-size: min(80%, 760px) auto;
  padding-block: 76px 210px;
  text-align: center;
}
.eyebrow { margin: 0 0 10px; color: var(--muted); font-size: 0.95rem; font-weight: 500; }
html[lang="en"] .eyebrow { letter-spacing: 0.2em; text-transform: uppercase; font-size: 0.8rem; }
.hero h1 {
  margin: 0 auto; max-width: 26ch;
  font-size: clamp(1.6rem, 4vw, 2.45rem); line-height: 1.5;
}
html[lang="en"] .hero h1 { max-width: 28ch; line-height: 1.3; }
.hero .lead { margin: 22px auto 0; max-width: 60ch; font-size: 1.12rem; }
.vision-line {
  margin: 18px auto 0; max-width: 60ch; color: var(--navy); font-weight: 500;
}

/* Sections */
.section { padding-block: 64px; }
.section.tint { background: var(--tint); }
.section h2 { margin: 0 0 8px; font-size: clamp(1.4rem, 3vw, 1.85rem); line-height: 1.45; }
.section h2::after {
  content: ""; display: block; width: 56px; height: 3px; background: var(--navy); margin-top: 12px;
}
.section .intro { margin: 18px 0 0; max-width: 70ch; }
.section h3 { margin: 0 0 8px; font-size: 1.15rem; line-height: 1.5; }
.section h3.sub { margin-top: 44px; }
.section h3.sector {
  margin-top: 36px; font-size: 1rem; font-weight: 500; color: var(--navy);
  display: flex; align-items: center; gap: 14px;
}
.section h3.sector::after { content: ""; flex: 1; height: 1px; background: var(--mist); }
.section h4 { margin: 0; font-size: 1.15rem; line-height: 1.5; }

.grid { display: grid; gap: 20px; margin-top: 32px; }
.sector + .grid { margin-top: 16px; }
@media (min-width: 720px) { .grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; border-top: 3px solid var(--navy);
}

/* About: history text beside the company facts */
.split { display: grid; gap: 8px 48px; margin-top: 8px; }
@media (min-width: 820px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; } }
.facts {
  margin: 44px 0 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 8px 22px;
}
.facts div {
  display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr); gap: 4px 16px;
  padding-block: 10px; border-bottom: 1px solid var(--line);
}
.facts div:last-child { border-bottom: 0; }
.facts dt { color: var(--muted); font-size: 0.9rem; }
.facts dd { margin: 0; font-weight: 500; }
@media (max-width: 479px) { .facts div { grid-template-columns: 1fr; gap: 0; } }

/* Values */
.values { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .values { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; } }
.values li {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 22px; border-top: 3px solid var(--navy);
}
.values strong { display: block; color: var(--navy); font-size: 1.05rem; margin-bottom: 4px; }

/* Bulleted lists */
.list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.sub + .list { margin-top: 20px; }
@media (min-width: 720px) { .list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 28px; } }
.list li { position: relative; padding-inline-start: 22px; }
.list li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.8em;
  width: 8px; height: 8px; background: var(--navy); transform: rotate(45deg);
}
html[lang="en"] .list li::before { top: 0.65em; }

/* Leadership */
.leader {
  margin-top: 20px; max-width: 420px; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); border-top: 3px solid var(--navy); padding: 18px 22px;
}
.leader-name { color: var(--navy); font-weight: 700; font-size: 1.15rem; }
.leader-role { color: var(--muted); font-weight: 500; }

/* Group companies */
.company-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.latin { color: var(--muted); font-weight: 400; font-size: 0.95rem; }
.latin[lang="en"] { letter-spacing: 0.08em; }
.badge {
  display: inline-block; font-size: 0.85rem; font-weight: 500; line-height: 1.6; padding: 2px 12px;
  border-radius: 999px; background: var(--tint); color: var(--navy); border: 1px solid var(--mist); white-space: nowrap;
}
.company p { margin-top: 12px; }

/* News */
.news { list-style: none; padding: 0; margin: 28px 0 0; max-width: 760px; }
.news > li { padding-block: 20px; border-bottom: 1px solid var(--line); }
.news > li:first-child { border-top: 1px solid var(--line); }
.news-date { color: var(--muted); font-size: 0.9rem; font-weight: 500; margin-bottom: 4px; }
.news h3 { margin-bottom: 6px; }

/* Contact */
.contact { display: grid; gap: 16px; margin: 32px 0 0; }
@media (min-width: 720px) { .contact { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.contact div { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.contact dt { color: var(--muted); font-size: 0.9rem; margin-bottom: 4px; }
.contact dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

/* Footer */
.site-footer { border-top: 1px solid var(--navy); padding-block: 28px 36px; color: var(--muted); font-size: 0.92rem; }
.site-footer .wrap { display: grid; gap: 6px; text-align: center; }
.site-footer .rule { width: 100%; height: 1px; background: var(--mist); margin: 6px 0 8px; border: 0; }

/* Phone: keep the watermark below the text so it never sits behind the lead paragraph. */
@media (max-width: 719px) {
  .hero { padding-block: 44px 128px; background-position: center bottom 32px; background-size: 92% auto; }
  .section { padding-block: 52px; }
}

/* Group chart: solid branch = formed under Kansest; dashed branch = existing company joining later. Pure CSS, stacks on narrow screens. */
.org { margin: 28px 0 8px; padding: 24px; background: var(--paper); border: 1px solid var(--mist); border-radius: var(--radius); }
.org-root { margin: 0 auto; width: fit-content; max-width: 100%; padding: 10px 22px; border-radius: var(--radius); background: var(--navy); color: var(--paper); font-weight: 700; text-align: center; }
html[lang="ar"] .org-root { font-family: var(--font-head); font-size: 1.35rem; }
.org-groups { display: grid; gap: 20px; margin-top: 28px; position: relative; }
.org-root { position: relative; }
@media (min-width: 720px) { .org-groups { grid-template-columns: 2fr 3fr; } }
.org-group { border-top: 3px solid var(--navy); padding-top: 14px; position: relative; }
.org-group::before { content: none; }
@media (min-width: 720px) {
  .org-groups { margin-top: 44px; }
  .org-root::after { content: ""; position: absolute; top: 100%; inset-inline-start: calc(50% - 1.5px); height: 22px; border-inline-start: 3px solid var(--navy); }
  .org-groups::before { content: ""; position: absolute; top: -22px; inset-inline-start: calc((100% - 20px) * 0.2); width: calc((100% - 20px) * 0.5 + 20px); border-top: 3px solid var(--navy); }
  .org-group::before { content: ""; position: absolute; top: -22px; inset-inline-start: calc(50% - 1.5px); height: 19px; border-inline-start: 3px solid var(--navy); }
}
.org-join { border-top-style: dashed; border-top-color: var(--slate); }
.org-join::before { border-inline-start-style: dashed; border-inline-start-color: var(--slate); }
.org-label { margin: 0 0 10px; color: var(--slate); font-size: 0.9rem; font-weight: 500; }
.org-nodes { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.org-nodes li { padding: 6px 14px; border: 1.5px solid var(--navy); border-radius: 8px; color: var(--navy); font-weight: 700; background: var(--paper); }
.org-join .org-nodes li { border-style: dashed; border-color: var(--slate); color: var(--ink); font-weight: 500; }
.org figcaption { margin-top: 18px; color: var(--slate); font-size: 0.88rem; }
.badge-join { background: var(--paper); border-style: dashed; color: var(--slate); }
.company.joining { border-style: dashed; }
.company-link { margin-top: 8px; font-size: 0.92rem; }
.company-link a { color: var(--navy); }
@media (min-width: 720px) { .grid.single { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
