/* QN shared foundation: brand fonts, tokens, reset, browser surfaces, shared chrome */
/* Ko Gali Modern covers Arabic only; its Latin glyphs are incomplete, so Latin and digits fall through to Dubai. */

@font-face { font-family: "Ko Gali Modern"; src: url("../fonts/kogali-400.woff2") format("woff2"); font-weight: 400; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Ko Gali Modern"; src: url("../fonts/kogali-500.woff2") format("woff2"); font-weight: 500; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "Ko Gali Modern"; src: url("../fonts/kogali-700.woff2") format("woff2"); font-weight: 700; font-display: swap; unicode-range: U+0600-06FF, U+0750-077F, U+08A0-08FF, U+FB50-FDFF, U+FE70-FEFF, U+200C-200F; }
@font-face { font-family: "DG Ghareeb"; src: url("../fonts/dg-ghareeb-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DG Ghareeb"; src: url("../fonts/dg-ghareeb-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Dubai"; src: url("../fonts/dubai-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Dubai"; src: url("../fonts/dubai-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Dubai"; src: url("../fonts/dubai-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --navy: #0c2238;
  --sand: #ffeac5;
  --mist: #9eacb1;
  --clay: #b06f49;
  --palm: #5d604f;
  --stone: #414042;

  --rule: rgb(12 34 56 / 0.18);
  --rule-on-dark: rgb(255 234 197 / 0.22);
  --shadow: 0 8px 24px rgb(12 34 56 / 0.08);

  --wrap: 75rem;
  --gutter: 1rem;
  --section: 4rem;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-body: "Ko Gali Modern", "Dubai", system-ui, sans-serif;
  --font-display: "Ko Gali Modern", "Dubai", system-ui, sans-serif;
}
:root:lang(en) {
  --font-body: "Dubai", "Ko Gali Modern", system-ui, sans-serif;
  --font-display: "DG Ghareeb", Georgia, serif;
}
@media (min-width: 48rem) { :root { --gutter: 1.5rem; --section: 6rem; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
/* Desktop reads at 110%: the whole rem scale grows with it */
@media (min-width: 64rem) { html { font-size: 110%; } }
body {
  margin: 0;
  font: 400 1.0625rem/1.85 var(--font-body);
  color: var(--navy);
  background: var(--sand);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
:lang(en) body, body:lang(en) { line-height: 1.65; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); font-weight: 700; line-height: 1.2; text-wrap: balance; }
:lang(en) h1, :lang(en) h2, :lang(en) h3 { font-weight: 400; line-height: 1.1; }
p, ul, ol, dl, dd, figure { margin: 0; }
p { text-wrap: pretty; }
ul, ol { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

::selection { background: var(--navy); color: var(--sand); }
.on-dark ::selection, .on-dark::selection { background: var(--sand); color: var(--navy); }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--navy) var(--sand); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--sand); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 999px; border: 2px solid var(--sand); }
input { accent-color: var(--navy); caret-color: var(--clay); }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 50; background: var(--navy); color: var(--sand); padding: .6rem 1rem; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .75rem 1.75rem; border-radius: 999px;
  font-weight: 700; font-size: 1.0625rem; line-height: 1.2; text-decoration: none;
  border: 1.5px solid transparent; cursor: pointer;
  transition: background-color .2s var(--ease-out), color .2s var(--ease-out), transform .2s var(--ease-out);
}
.btn svg { width: 1.25em; height: 1.25em; flex: none; }
.btn:active { transform: translateY(1px); }
.btn-navy { background: var(--navy); color: var(--sand); }
.btn-navy:hover { background: #163454; }
.btn-sand { background: var(--sand); color: var(--navy); }
.btn-sand:hover { background: #fff3dc; }
.btn-line { border-color: currentColor; background: transparent; }
.btn-line:hover { background: rgb(12 34 56 / 0.06); }
.on-dark .btn-line:hover { background: rgb(255 234 197 / 0.1); }
.btn-lg { min-height: 3.75rem; padding-inline: 2.25rem; font-size: 1.1875rem; }

.text-link { font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .45em; }
.text-link:hover { text-decoration-thickness: 2px; }

/* ---------- motif ---------- */
.motif { width: 5.5rem; height: auto; color: inherit; }
.motif-sm { width: 3.5rem; }
.mark { width: 3rem; height: 3rem; flex: none; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header-bg, var(--sand)); color: var(--header-fg, var(--navy)); border-bottom: 1px solid var(--header-rule, var(--rule)); }
.site-header .wrap { display: flex; align-items: center; gap: 1.25rem; min-height: 5rem; }
.brand { display: block; flex: none; }
.brand img { height: 2.5rem; width: auto; }
.nav { display: none; align-items: center; padding-inline-start: 1.75rem; border-inline-start: 1px solid var(--header-rule, var(--rule)); font-size: 1.1875rem; line-height: 1.4; }
.nav a { position: relative; padding-block: .5rem; text-decoration: none; font-weight: 500; opacity: .9; }
.nav a + a { margin-inline-start: 2.25rem; }
.nav a + a::before { content: ""; position: absolute; inset-inline-start: -1.29rem; top: 50%; width: .32rem; height: .32rem; margin-top: -.16rem; background: var(--clay); transform: rotate(45deg); }
.nav a:hover { opacity: 1; }
.nav a[aria-current="page"] { opacity: 1; box-shadow: inset 0 -2px 0 currentColor; }
.header-tools { display: flex; align-items: center; gap: .75rem; margin-inline-start: auto; }
.lang { display: inline-flex; align-items: center; min-height: 3rem; padding: 0 1.2rem; border: 1.5px solid currentColor; border-radius: 999px; font-size: 1.125rem; font-weight: 500; line-height: 1.4; text-decoration: none; }
.lang:hover { background: rgb(127 127 127 / 0.12); }
/* Arabic glyphs read smaller than Latin at the same size, so the switch on English pages is set larger */
.lang:lang(ar) { font-family: "Ko Gali Modern", sans-serif; font-size: 1.4375rem; font-weight: 700; line-height: 1.1; padding-bottom: .2rem; }
.lang:lang(en) { font-family: "Dubai", sans-serif; }
.nav:lang(ar) { font-size: 1.375rem; }
.header-wa:lang(ar) { font-size: 1.25rem; }
.header-wa { min-height: 3rem; padding: .5rem 1.35rem; font-size: 1.125rem; font-weight: 500; line-height: 1.4; }
.header-wa span { display: none; }
.menu-btn { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; border: 1.5px solid currentColor; background: transparent; cursor: pointer; }
.menu-btn svg { width: 1.25rem; height: 1.25rem; }
.mobile-nav { display: none; border-top: 1px solid var(--header-rule, var(--rule)); }
.mobile-nav.open { display: block; }
.mobile-nav ul { display: grid; padding-block: .5rem 1.25rem; }
.mobile-nav a { display: block; padding: .8rem 0; font-size: 1.25rem; text-decoration: none; border-bottom: 1px solid var(--header-rule, var(--rule)); }
@media (min-width: 64rem) {
  .nav { display: flex; }
  .header-tools { margin-inline-start: auto; }
  .menu-btn, .mobile-nav, .mobile-nav.open { display: none; }
  .header-wa span { display: inline; }
}

/* ---------- footer ---------- */
.site-footer { background: var(--navy); color: var(--sand); padding: 2.5rem 0 1.5rem; border-top: 3px solid var(--clay); }
.site-footer .row { display: grid; gap: 1.5rem; align-items: center; }
.site-footer .mark img { display: block; width: 4.25rem; height: auto; }
.site-footer .links { display: flex; flex-wrap: wrap; gap: .35rem 1.75rem; font-weight: 700; }
.site-footer .links a { text-decoration: none; display: inline-block; padding: .25rem 0; }
.site-footer .links a:hover { text-decoration: underline; text-decoration-color: var(--clay); text-underline-offset: .4em; }
.site-footer .wa { display: inline-flex; align-items: center; gap: .6rem; font-size: 1.1875rem; justify-self: start; padding: .55rem 1.15rem; background: var(--clay); border: 1.5px solid var(--clay); border-radius: 999px; font-weight: 700; text-decoration: none; transition: background-color .2s var(--ease-out), color .2s var(--ease-out); }
.site-footer .wa svg { width: 1.1rem; height: 1.1rem; }
.site-footer .wa span { direction: ltr; unicode-bidi: isolate; }
.site-footer .wa:hover { background: var(--sand); border-color: var(--sand); color: var(--navy); }
.site-footer .base { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid var(--rule-on-dark); font-size: .875rem; color: var(--mist); }
@media (min-width: 64rem) { .site-footer .row { grid-template-columns: auto 1fr auto; gap: 3rem; } }

/* ---------- floating whatsapp ---------- */
.float-wa {
  position: fixed; inset-inline-end: 1.25rem; bottom: 1.25rem; z-index: 30;
  width: 3.5rem; height: 3.5rem; border-radius: 50%; display: grid; place-items: center;
  background: var(--navy); color: var(--sand); box-shadow: 0 10px 28px rgb(12 34 56 / 0.28);
  transition: transform .25s var(--ease-out);
}
.float-wa:hover { transform: translateY(-2px); }
.float-wa.is-away { opacity: 0; transform: translateY(1rem) scale(.9); pointer-events: none; }
.float-wa { transition: transform .3s var(--ease-out), opacity .3s var(--ease-out); }
.float-wa svg { width: 1.6rem; height: 1.6rem; }
.on-dark-zone .float-wa { background: var(--sand); color: var(--navy); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
