/* ==========================================================================
   NAWAH OFFICE — nawah.io
   Palette : Babylonian lapis + ochre gold, on blue-biased cool paper.
   Type    : Reem Kufi (geometric kufic display) · IBM Plex Sans Arabic (body)
             IBM Plex Mono (Latin data, numerals)
   ========================================================================== */

:root {
  color-scheme: light dark;

  /* ---- Neutrals (biased toward lapis, never a flat grey) ---- */
  --ground:       #F4F6FA;
  --surface:      #FFFFFF;
  --surface-sunk: #EAEFF6;
  --line:         #DBE2EC;
  --line-soft:    #E8EDF4;

  --ink:          #0D1524;
  --ink-body:     #35415C;
  --ink-muted:    #64718A;

  /* ---- Brand ---- */
  --lapis:        #24468A;
  --lapis-deep:   #17305F;
  --lapis-tint:   #E4EAF7;
  --ochre:        #A8761B;
  --ochre-tint:   #F6EBD4;
  --on-ochre:     #FFFFFF;

  /* ---- The dark band: identical in both themes, by design ---- */
  --band:         #14254A;
  --band-deep:    #0C1830;
  --band-ink:     #F0F4FC;
  --band-body:    #C3D1EB;
  --band-muted:   #8FA4CB;
  --band-line:    #2A3E69;
  --band-gold:    #E2B155;

  --focus:        #24468A;
  --shadow:       0 1px 2px rgba(13, 21, 36, .04), 0 8px 24px -12px rgba(13, 21, 36, .12);
  --shadow-lift:  0 2px 4px rgba(13, 21, 36, .05), 0 16px 40px -16px rgba(13, 21, 36, .18);

  /* ---- Type ---- */
  --display: "Reem Kufi", "Noto Kufi Arabic", Georgia, serif;
  /* Reem Kufi carries no Latin glyphs — English headings need their own face */
  --display-lat: "IBM Plex Sans", "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --body: "IBM Plex Sans Arabic", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --fs-display: clamp(2.6rem, 6.4vw, 4.5rem);
  --fs-h2:      clamp(1.6rem, 3.4vw, 2.35rem);
  --fs-h3:      1.125rem;
  --fs-body:    1.03125rem;
  --fs-small:   0.875rem;
  --fs-micro:   0.75rem;

  /* ---- Rhythm ---- */
  --pad-page: clamp(1.15rem, 4vw, 2.75rem);
  --max: 76rem;
  --prose: 40rem;
  --r: 4px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground:       #090E17;
    --surface:      #111926;
    --surface-sunk: #18222F;
    --line:         #26313F;
    --line-soft:    #1C2531;

    --ink:          #E8EEF7;
    --ink-body:     #B9C6D9;
    --ink-muted:    #8695AC;

    --lapis:        #83A6E6;
    --lapis-deep:   #AFC6F0;
    --lapis-tint:   #17223A;
    --ochre:        #DFAE51;
    --ochre-tint:   #2F2611;
    --on-ochre:     #1C1406;

    --focus:        #83A6E6;
    --shadow:       0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --shadow-lift:  0 2px 4px rgba(0, 0, 0, .45), 0 16px 40px -16px rgba(0, 0, 0, .7);
  }
}

:root[data-theme="dark"] {
  --ground:       #090E17;
  --surface:      #111926;
  --surface-sunk: #18222F;
  --line:         #26313F;
  --line-soft:    #1C2531;

  --ink:          #E8EEF7;
  --ink-body:     #B9C6D9;
  --ink-muted:    #8695AC;

  --lapis:        #83A6E6;
  --lapis-deep:   #AFC6F0;
  --lapis-tint:   #17223A;
  --ochre:        #DFAE51;
  --ochre-tint:   #2F2611;
  --on-ochre:     #1C1406;

  --focus:        #83A6E6;
  --shadow:       0 1px 2px rgba(0, 0, 0, .4), 0 8px 24px -12px rgba(0, 0, 0, .6);
  --shadow-lift:  0 2px 4px rgba(0, 0, 0, .45), 0 16px 40px -16px rgba(0, 0, 0, .7);
}

/* ============================================================== base ==== */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink-body);
  font-family: var(--body);
  font-size: var(--fs-body);
  line-height: 1.78;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

a {
  color: var(--lapis);
  text-decoration-color: color-mix(in srgb, currentColor 32%, transparent);
  text-underline-offset: 0.25em;
  transition: color .15s ease, text-decoration-color .15s ease;
}
a:hover { text-decoration-color: currentColor; }

:where(a, button, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: var(--r);
}

h1, h2, h3, h4 {
  font-family: var(--display);
  color: var(--ink);
  font-weight: 600;
  line-height: 1.3;
  text-wrap: balance;
  margin: 0;
}

p { margin: 0; }

html[lang="en"] h1,
html[lang="en"] h2,
html[lang="en"] h3,
html[lang="en"] h4 {
  font-family: var(--display-lat);
  letter-spacing: -0.015em;
  font-weight: 600;
}
html[lang="en"] .brand .name { font-family: var(--display); letter-spacing: 0; }


/* ============================================================ layout ==== */

.wrap {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--pad-page);
}

.prose { max-width: var(--prose); }

.stack   { display: flex; flex-direction: column; gap: 1rem; }
.stack-s { display: flex; flex-direction: column; gap: 0.5rem; }
.stack-l { display: flex; flex-direction: column; gap: clamp(2rem, 4vw, 3rem); }

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section--sunk { background: var(--surface-sunk); }

.section-head { display: flex; flex-direction: column; gap: 0.875rem; max-width: 44rem; }

/* Arabic is cursive: letter-spacing breaks the joins, so tracking is applied
   only to Latin strings, through .lat */
.eyebrow {
  font-size: var(--fs-micro);
  font-weight: 600;
  color: var(--ochre);
  margin: 0;
}

.eyebrow.lat, .lat {
  font-family: var(--mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 400;
  direction: ltr;
  unicode-bidi: isolate;
}

.lead {
  font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
  color: var(--ink-body);
}

/* ============================================================== mark ==== */

.mark { display: block; flex: none; }
.mark .ring { fill: none; stroke: currentColor; }
.mark .core { fill: var(--ochre); }

/* ============================================================ header ==== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: color-mix(in srgb, var(--ground) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, background .2s ease;
}
.site-header.is-stuck { border-bottom-color: var(--line); }

.site-header .bar {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  min-height: 4.25rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  margin-inline-end: auto;
}
.brand .mark { color: var(--lapis); }
.brand .name {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
}
.brand .latin {
  font-family: var(--mono);
  font-size: 0.625rem;
  letter-spacing: 0.24em;
  color: var(--ink-muted);
  line-height: 1;
  padding-top: 0.35em;
}

.nav { display: flex; gap: 1.5rem; font-size: var(--fs-small); flex-wrap: wrap; align-items: center; }
.nav a { color: var(--ink-body); text-decoration: none; position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -0.35em;
  height: 1px;
  background: var(--ochre);
  transform: scaleX(0);
  transition: transform .2s ease;
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after { transform: scaleX(1); }

/* ============================================================== hero ==== */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(120% 90% at 82% 8%, rgba(226, 177, 85, .17) 0%, transparent 55%),
    radial-gradient(90% 80% at 8% 100%, rgba(80, 130, 220, .22) 0%, transparent 60%),
    linear-gradient(160deg, var(--band) 0%, var(--band-deep) 100%);
  color: var(--band-body);
}

.hero .orbit {
  position: absolute;
  inset-block-start: -18%;
  inset-inline-start: -12%;
  width: min(46rem, 88%);
  aspect-ratio: 1;
  z-index: -1;
  opacity: .5;
  pointer-events: none;
}
.hero .orbit circle { fill: none; stroke: var(--band-gold); stroke-width: .6; opacity: .32; }
.hero .orbit .wide { stroke: #7FA0DE; opacity: .22; }

.hero-inner { padding-block: clamp(3.5rem, 9vw, 7rem) 0; }

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 64rem) {
  .hero-grid { grid-template-columns: minmax(0, 1.05fr) minmax(20rem, .8fr); }
}

.hero h1 {
  font-size: var(--fs-display);
  font-weight: 700;
  color: var(--band-ink);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.hero h1 .gold { color: var(--band-gold); }

.hero .lead { color: var(--band-body); max-width: 33rem; }
.hero .eyebrow { color: var(--band-gold); }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1.4rem;
  border-radius: 999px;
  font-size: var(--fs-small);
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--band-gold); color: #22190A; }
.btn-primary:hover { background: #EEC06A; }
.btn-gold { background: var(--ochre); color: var(--on-ochre); }
.btn-gold:hover { background: color-mix(in srgb, var(--ochre) 86%, #fff); }
.btn-ghost { border-color: rgba(195, 209, 235, .35); color: var(--band-ink); }
.btn-ghost:hover { border-color: var(--band-gold); color: var(--band-gold); }

/* ---- the registry strip that closes the hero ---- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1.5rem 2rem;
  margin-top: clamp(3rem, 6vw, 4.5rem);
  padding-block: 1.75rem;
  border-top: 1px solid var(--band-line);
}

.fact .k {
  display: block;
  font-size: var(--fs-micro);
  color: var(--band-muted);
  margin-bottom: 0.2rem;
}
.fact .v {
  display: block;
  color: var(--band-ink);
  font-weight: 500;
  font-size: 0.9375rem;
}
.fact .v.num {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  direction: ltr;
  unicode-bidi: isolate;
}

/* ========================================================= chat demo ==== */

.phone {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lift);
  overflow: hidden;
}
.hero .phone { border-color: rgba(195, 209, 235, .18); }

.phone-top {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--surface-sunk);
}
.phone-av {
  width: 1.85rem; height: 1.85rem;
  border-radius: 50%;
  background: linear-gradient(140deg, var(--lapis), var(--ochre));
  flex: none;
}
.phone-who { display: flex; flex-direction: column; line-height: 1.35; }
.phone-who b { font-size: 0.8125rem; color: var(--ink); font-weight: 600; }
.phone-who span { font-size: var(--fs-micro); color: var(--ink-muted); }

.thread {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding: 1.125rem 1rem 1.25rem;
  background: var(--surface);
}

.msg {
  max-width: 84%;
  padding: 0.6rem 0.875rem;
  border-radius: 14px;
  font-size: 0.875rem;
  line-height: 1.65;
}
.msg-in {
  align-self: flex-start;
  background: var(--surface-sunk);
  color: var(--ink-body);
  border-start-start-radius: 4px;
}
.msg-out {
  align-self: flex-end;
  background: var(--lapis);
  color: #FFFFFF;
  border-start-end-radius: 4px;
}
:root[data-theme="dark"] .msg-out,
:root:not([data-theme="light"]) .msg-out { color: #0A1220; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .msg-out { color: #FFFFFF; }
}

.msg-meta {
  align-self: flex-end;
  font-family: var(--mono);
  font-size: 0.625rem;
  color: var(--ink-muted);
  direction: ltr;
  unicode-bidi: isolate;
}

.msg-flag {
  align-self: stretch;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--ochre-tint);
  border: 1px solid color-mix(in srgb, var(--ochre) 35%, transparent);
  border-radius: 8px;
  padding: 0.625rem 0.75rem;
  font-size: 0.8125rem;
  color: var(--ink-body);
}
.msg-flag b { color: var(--ochre); font-weight: 600; }

/* ============================================================= steps ==== */

.steps { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(15.5rem, 1fr)); counter-reset: step; }

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 1.5rem 1.375rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color .2s ease, transform .2s ease;
}
.step:hover { border-color: color-mix(in srgb, var(--ochre) 55%, var(--line)); transform: translateY(-2px); }

.step .n {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--ochre);
  letter-spacing: .12em;
}
.step h3 { font-size: var(--fs-h3); }
.step p { font-size: var(--fs-small); color: var(--ink-muted); }

/* ========================================================== services ==== */

.grid-3 { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); }

.svc {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.25rem 1.125rem;
  border-inline-start: 2px solid var(--line);
  transition: border-color .2s ease;
}
.svc:hover { border-inline-start-color: var(--ochre); }
.svc h3 { font-size: var(--fs-h3); }
.svc p { font-size: var(--fs-small); color: var(--ink-muted); }

/* =========================================================== product ==== */

.split {
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}
@media (min-width: 60rem) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  align-self: flex-start;
  font-size: var(--fs-micro);
  font-weight: 600;
  padding: 0.28rem 0.75rem;
  color: var(--ochre);
  background: var(--ochre-tint);
  border-radius: 999px;
}
.status::before {
  content: "";
  width: 0.4rem; height: 0.4rem;
  border-radius: 50%;
  background: var(--ochre);
}

.feature-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 0.8rem; }
.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  font-size: var(--fs-small);
  color: var(--ink-body);
}
.feature-list li::before {
  content: "";
  width: 0.45rem; height: 0.45rem;
  margin-top: 0.68em;
  border-radius: 50%;
  border: 1.5px solid var(--ochre);
}

/* =========================================================== contact ==== */

.contact-grid { display: grid; gap: 1.75rem 2.5rem; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); }

.field .k { display: block; font-size: var(--fs-micro); font-weight: 600; color: var(--ink-muted); margin-bottom: .2rem; }
.field .v { display: block; font-size: 1.0625rem; color: var(--ink); font-weight: 500; line-height: 1.6; }
.field .v.ltr {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
  font-family: var(--mono);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

/* ============================================================ footer ==== */

.site-footer {
  background: var(--band-deep);
  color: var(--band-muted);
  padding-block: 3rem 2.25rem;
  font-size: var(--fs-small);
}
.site-footer .cols {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--band-line);
}
.site-footer .brand { color: var(--band-ink); }
.site-footer .brand .mark { color: var(--band-gold); }
.site-footer .brand .latin { color: var(--band-muted); }
.site-footer h4 { color: var(--band-ink); font-size: var(--fs-micro); font-family: var(--body); font-weight: 600; margin-bottom: .625rem; }
.site-footer a { color: var(--band-body); text-decoration: none; }
.site-footer a:hover { color: var(--band-gold); }
.site-footer .bar {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  justify-content: space-between;
  padding-top: 1.5rem;
  font-size: var(--fs-micro);
}
.footer-links { display: flex; gap: 1.25rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; flex-direction: column; }
.site-footer .bar .footer-links { flex-direction: row; }

/* ======================================================= legal pages ==== */

.legal { padding-block: clamp(2.5rem, 6vw, 4rem); }
.legal-head { border-bottom: 1px solid var(--line); padding-bottom: 1.5rem; }
.legal h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }

.updated {
  font-family: var(--mono);
  font-size: var(--fs-micro);
  color: var(--ink-muted);
  direction: ltr;
  unicode-bidi: isolate;
}

.legal-body { max-width: 44rem; }
.legal-body section { padding-block: 1.85rem; }
.legal-body section + section { border-top: 1px solid var(--line-soft); }
.legal-body h2 { font-size: 1.3rem; margin-bottom: 0.75rem; }
.legal-body h3 {
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  margin-block: 1.25rem 0.375rem;
}
.legal-body p + p { margin-top: 0.75rem; }
.legal-body ul {
  margin: 0.75rem 0 0;
  padding-inline-start: 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.legal-body li::marker { color: var(--ochre); }

code, .code {
  font-family: var(--mono);
  font-size: 0.875em;
  background: var(--lapis-tint);
  color: var(--lapis-deep);
  padding: 0.1em 0.42em;
  border-radius: 3px;
  direction: ltr;
  unicode-bidi: isolate;
  display: inline-block;
}

.callout {
  background: var(--surface);
  border: 1px solid var(--line);
  border-inline-start: 3px solid var(--ochre);
  border-radius: var(--r);
  padding: 1.125rem 1.25rem;
  margin-top: 1rem;
  font-size: var(--fs-small);
}

.table-scroll { overflow-x: auto; margin-top: 1rem; border: 1px solid var(--line); border-radius: var(--r); }
table { border-collapse: collapse; width: 100%; min-width: 30rem; font-size: var(--fs-small); background: var(--surface); }
th, td { text-align: start; padding: 0.7rem 0.9rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-weight: 600; color: var(--ink); background: var(--surface-sunk); font-size: var(--fs-micro); }

/* ---- english mirror ---- */

.en {
  direction: ltr;
  text-align: left;
  border-top: 1px solid var(--line);
  margin-top: 2.75rem;
  padding-top: 2rem;
}

.lang-tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: var(--fs-micro);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ochre);
  border: 1px solid color-mix(in srgb, var(--ochre) 60%, transparent);
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

/* ============================================================== misc ==== */

.skip { position: absolute; inset-inline-start: -9999px; }
.skip:focus {
  inset-inline-start: var(--pad-page);
  top: 0.5rem;
  z-index: 50;
  background: var(--surface);
  color: var(--ink);
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--lapis);
  border-radius: var(--r);
}

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

/* ======================================================== lang switch ==== */

.langsw {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: .08em;
  line-height: 1;
  flex: none;
}
.langsw a {
  padding: .38rem .7rem;
  text-decoration: none;
  color: var(--ink-muted);
  background: transparent;
  transition: background .15s ease, color .15s ease;
}
.langsw a:hover { color: var(--ink); }
.langsw a[aria-current="true"] { background: var(--lapis); color: #fff; }
:root[data-theme="dark"] .langsw a[aria-current="true"],
:root:not([data-theme="light"]) .langsw a[aria-current="true"] { color: #0A1220; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .langsw a[aria-current="true"] { color: #fff; }
}

/* ============================================================== why ==== */

.why {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--r);
  overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr));
}

.why article {
  background: var(--surface);
  padding: 1.6rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .7rem;
}

.why h3 { font-size: 1.0625rem; font-family: var(--body); font-weight: 600; }
.why p { font-size: .9375rem; color: var(--ink-body); }

.proof {
  margin-top: auto;
  padding-top: .875rem;
  border-top: 1px dashed var(--line);
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .02em;
  color: var(--ochre);
  direction: ltr;
  unicode-bidi: isolate;
  text-align: start;
}
