/* ==========================================================================
   base.css — design tokens, fonts, reset, typography, buttons, utilities
   Abdulhamed Jalil Group
   --------------------------------------------------------------------------
   CHANGE BRAND COLOURS HERE (section 1). Everything else uses these variables.
   ========================================================================== */

/* 1. DESIGN TOKENS ------------------------------------------------------- */
:root {
  /* Brand colours */
  --c-navy: #0B2545;
  --c-navy-2: #13315C;          /* secondary */
  --c-navy-3: #1D4477;
  --c-navy-deep: #061830;
  --c-gold: #F2A900;            /* accent */
  --c-gold-light: #FFC94A;
  --c-gold-ink: #8A6100;        /* gold for text on light backgrounds (AA contrast) */
  --c-gold-soft: #FFF4D6;
  --c-bg: #F7F9FC;              /* page background */
  --c-surface: #FFFFFF;
  --c-text: #1F2933;            /* body text */
  --c-muted: #52606D;
  --c-line: #E2E8F0;
  --c-on-dark: #EEF3FA;
  --c-on-dark-muted: #AFC0D6;
  --c-success: #17784A;
  --c-error: #B42318;
  --c-wa: #25D366;
  --c-wa-dark: #0E7C66;

  /* Typography */
  --font-ar: "Cairo", "Segoe UI", Tahoma, "Noto Sans Arabic", "Geeza Pro", sans-serif;
  --font-en: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font: var(--font-ar);
  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: clamp(1.125rem, 1.05rem + 0.35vw, 1.3125rem);
  --fs-h3: clamp(1.25rem, 1.15rem + 0.5vw, 1.5rem);
  --fs-h2: clamp(1.875rem, 1.4rem + 2vw, 3rem);
  --fs-h1: clamp(2.25rem, 1.5rem + 3.6vw, 4.25rem);
  --lh: 1.75;
  --lh-tight: 1.25;

  /* Shape & depth */
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 28px;
  --radius-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06), 0 2px 8px rgba(11, 37, 69, 0.05);
  --shadow: 0 6px 24px -6px rgba(11, 37, 69, 0.14), 0 2px 6px rgba(11, 37, 69, 0.05);
  --shadow-lg: 0 24px 60px -18px rgba(11, 37, 69, 0.28), 0 6px 18px -6px rgba(11, 37, 69, 0.1);
  --shadow-gold: 0 12px 32px -10px rgba(242, 169, 0, 0.55);

  /* Layout */
  --container: 76rem;
  --gutter: clamp(1.125rem, 4vw, 2rem);
  --section: clamp(4.5rem, 9vw, 7.5rem);
  --header-h: 5.25rem;
  --header-h-sm: 4.25rem;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --t-fast: 0.2s;
  --t: 0.4s;
  --dir: -1; /* RTL: things that slide "in" come from the left */
  color-scheme: light;
}

html[dir="ltr"] { --dir: 1; --font: var(--font-en); --lh: 1.65; }

/* 2. SELF-HOSTED FONTS (no external requests) ---------------------------- */
@font-face {
  font-family: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("/fonts/cairo-arabic-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/cairo-arabic-wght-normal.woff2") format("woff2");
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-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: "Cairo";
  font-style: normal;
  font-display: swap;
  font-weight: 200 1000;
  src: url("/fonts/cairo-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/cairo-latin-wght-normal.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: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-latin-wght-normal.woff2") format("woff2-variations"),
       url("/fonts/inter-latin-wght-normal.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;
}

/* 3. RESET --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h-sm) + 1rem);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: var(--lh);
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, picture, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
ul[class], ol[class] { list-style: none; padding: 0; }
h1, h2, h3, h4 { line-height: var(--lh-tight); font-weight: 800; color: var(--c-navy); text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
::selection { background: var(--c-gold); color: var(--c-navy); }

/* Inline English inside Arabic pages keeps Cairo's Latin (no extra font download) */
html:is([lang="ar"], [lang="ckb"]) [lang="en"] { font-family: var(--font-ar); }
/* Arabic word inside English pages (language switch) uses system Arabic font */
html[lang="en"] :is([lang="ar"], [lang="ckb"]) { font-family: "Segoe UI", Tahoma, "Geeza Pro", "Noto Sans Arabic", sans-serif; }

/* 4. ACCESSIBILITY ------------------------------------------------------- */
:focus-visible {
  outline: 3px solid var(--c-gold);
  outline-offset: 3px;
  border-radius: 6px;
}
.skip-link {
  position: fixed;
  inset-inline-start: 1rem;
  top: -4rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--c-gold);
  color: var(--c-navy);
  font-weight: 700;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* 5. LAYOUT -------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section); position: relative; }
.section--white { background: var(--c-surface); }
.section--tint { background: linear-gradient(180deg, var(--c-bg), #EEF2F8); }
.section--dark { background: var(--c-navy); color: var(--c-on-dark); }
.section--dark h2, .section--dark h3 { color: #fff; }

/* 6. TYPOGRAPHY ---------------------------------------------------------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: var(--fs-xs);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-gold-ink);
  margin-bottom: 0.9rem;
}
html:is([lang="ar"], [lang="ckb"]) .eyebrow { letter-spacing: 0; font-size: var(--fs-sm); }
.eyebrow::before {
  content: "";
  width: 2rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--c-gold), transparent);
}
html[dir="rtl"] .eyebrow::before { background: linear-gradient(-90deg, var(--c-gold), transparent); }
.eyebrow--light { color: var(--c-gold); }

.section-head { max-width: 44rem; margin-bottom: clamp(2.5rem, 5vw, 3.75rem); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }
.section-title { font-size: var(--fs-h2); letter-spacing: -0.02em; }
html:is([lang="ar"], [lang="ckb"]) .section-title { letter-spacing: 0; }
.section-lead { margin-top: 1rem; font-size: var(--fs-lg); color: var(--c-muted); }
.section--dark .section-lead { color: var(--c-on-dark-muted); }

/* Marker highlight that "draws" in when revealed */
.mark {
  background-image: linear-gradient(transparent 62%, rgba(242, 169, 0, 0.45) 62%, rgba(242, 169, 0, 0.45) 92%, transparent 92%);
  background-repeat: no-repeat;
  background-size: 0% 100%;
  background-position: right 0 bottom 0;
  transition: background-size 1.1s var(--ease) 0.35s;
}
html[dir="ltr"] .mark { background-position: left 0 bottom 0; }
.is-visible .mark, html:not(.js) .mark { background-size: 100% 100%; }
.gold { color: var(--c-gold); }

/* Rich text (privacy / about) */
.prose { max-width: 46rem; }
.prose h2 { font-size: var(--fs-h3); margin: 2.25rem 0 0.75rem; }
.prose p, .prose ul { margin-bottom: 1rem; color: #33414F; }
.prose ul { padding-inline-start: 1.25rem; }
.prose li { margin-bottom: 0.4rem; }
.prose a { color: var(--c-navy-3); font-weight: 600; }

/* 7. ICONS --------------------------------------------------------------- */
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }
html[dir="rtl"] .icon--dir { transform: scaleX(-1); }

/* 8. BUTTONS ------------------------------------------------------------- */
.btn {
  --btn-bg: var(--c-navy);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 3.25rem;
  padding: 0.8rem 1.6rem;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-weight: 700;
  font-size: var(--fs-base);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease), background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
.btn .icon { width: 1.2em; height: 1.2em; transition: transform var(--t) var(--ease); }
/* Shine sweep */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.8s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn:hover::after { transform: translateX(120%); }
.btn:hover .icon--dir { transform: translateX(calc(4px * var(--dir))); }
html[dir="rtl"] .btn:hover .icon--dir { transform: scaleX(-1) translateX(4px); }
.btn:active { transform: translateY(0); }

.btn--gold { --btn-bg: var(--c-gold); --btn-fg: var(--c-navy); }
.btn--gold:hover { box-shadow: var(--shadow-gold); background: var(--c-gold-light); }
.btn--navy:hover { box-shadow: var(--shadow-lg); background: var(--c-navy-2); }
.btn--ghost { --btn-bg: transparent; --btn-fg: #fff; border-color: rgba(255, 255, 255, 0.35); }
.btn--ghost:hover { border-color: var(--c-gold); color: var(--c-gold); }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--c-navy); border-color: var(--c-navy); }
.btn--outline:hover { background: var(--c-navy); color: #fff; }
.btn--wa { --btn-bg: var(--c-wa-dark); --btn-fg: #fff; }
.btn--wa:hover { background: #0A6A57; box-shadow: 0 12px 30px -10px rgba(14, 124, 102, 0.6); }
.btn--sm { min-height: 2.6rem; padding: 0.5rem 1.15rem; font-size: var(--fs-sm); }
.btn--lg { min-height: 3.75rem; padding: 1rem 2rem; font-size: var(--fs-lg); }
.btn--block { display: flex; width: 100%; }
@media (max-width: 30em) {
  .btn { white-space: normal; text-align: center; max-width: 100%; }
  .cta__actions .btn, .hero__actions .btn, .page-hero__actions .btn, .nf__actions .btn { flex: 1 1 100%; }
}

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 700;
  color: var(--c-navy-3);
  text-decoration: none;
}
.link-arrow .icon { transition: transform var(--t) var(--ease); }
.link-arrow:hover .icon { transform: translateX(calc(4px * var(--dir))); }
html[dir="rtl"] .link-arrow:hover .icon { transform: scaleX(-1) translateX(4px); }

/* 9. REVEAL ANIMATIONS (only when JS is running) ------------------------- */
.js .reveal {
  opacity: 0;
  transform: translate3d(0, 28px, 0);
  transition: opacity 0.9s var(--ease) var(--d, 0ms), transform 0.9s var(--ease) var(--d, 0ms);
}
.js .reveal--scale { transform: scale(0.94); }
.js .reveal--side { transform: translate3d(calc(40px * var(--dir) * -1), 0, 0); }
.js .reveal.is-visible { opacity: 1; transform: none; }

/* 10. REDUCED MOTION ----------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .mark { background-size: 100% 100%; }
}
