/* ============================================================
   مروان الزوري — Shared Design System
   ============================================================ */

:root {
  --white: #FFFFFF;
  --black: #0A0A0A;
  --ink: #111111;
  --ink-soft: #2A2A2A;
  --muted: #6B6B6B;
  --muted-soft: #9A9A9A;
  --line: #E5E5E5;
  --line-soft: #F0F0F0;
  --paper: #FAFAFA;
  --blue: #1E00FE;
  --blue-deep: #1500B0;
  --blue-soft: rgba(30, 0, 254, 0.08);
  --blue-hover: #1700CC;
  --radius: 9px;
  --radius-lg: 18px;
  --font-sans: 'Thmanyah Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-serif: 'Thmanyah Serif', Georgia, 'Times New Roman', serif;
  --easing: cubic-bezier(0.22, 1, 0.36, 1);
  --max-w: 1440px;
  --gutter: 32px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--white); }
body {
  font-family: var(--font-sans);
  font-weight: 400;
  font-feature-settings: 'kern', 'liga', 'calt';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  background: var(--white);
  color: var(--ink);
  line-height: 1.6;
  overflow-x: hidden;
  letter-spacing: 0;
}
[dir="rtl"], [lang="ar"] { line-height: 1.75; letter-spacing: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
::selection { background: var(--blue); color: var(--white); }

/* Latin-script span — apply letter-spacing only here so Arabic shaping isn't broken */
.latin {
  letter-spacing: 0.14em;
  text-transform: uppercase;
}


/* Loader */
.loader {
  position: fixed; inset: 0;
  background: var(--white);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s var(--easing), visibility 0.4s var(--easing);
}
.loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader__mark { width: 14px; height: 14px; border-radius: 50%; background: var(--blue); }

/* Container */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding-inline: var(--gutter); }

/* ─── Nav with calligraphy logo ──────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px 0;
  background: rgba(255,255,255,0.82);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.4s var(--easing), padding 0.4s var(--easing);
}
.nav.scrolled { padding: 12px 0; border-bottom-color: var(--line); }
.nav__inner {
  display: flex;
  align-items: center;
  position: relative;  /* anchor for absolutely-positioned centered menu */
  gap: 32px;
  min-height: 54px;
}

/* Calligraphy logo as nav brand — visible, right on desktop, center on mobile */
.nav__brand {
  display: inline-flex;
  align-items: center;
  height: 54px;
  transition: opacity 0.25s, transform 0.25s var(--easing);
}
.nav__brand:hover { opacity: 0.7; }
.nav__brand > span {
  display: inline-flex;
  align-items: center;
  height: 100%;
}
.nav__brand svg {
  height: 54px;        /* explicit so it always renders */
  width: auto;
  display: block;
  color: var(--blue);
}

/* Menu in the center of the nav (desktop) */
.nav__links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.nav__links a {
  display: inline-block; padding: 10px 16px;
  font-size: 14px; font-weight: 500; color: var(--ink-soft);
  border-radius: var(--radius);
  transition: background 0.25s, color 0.25s;
}
.nav__links a:hover { background: var(--paper); color: var(--ink); }
.nav__links a.active { color: var(--blue); }

.nav__mobile-toggle { display: none; width: 40px; height: 40px; border-radius: var(--radius); align-items: center; justify-content: center; }
.nav__mobile-toggle span { width: 18px; height: 1.5px; background: var(--ink); position: relative; transition: background 0.25s; }
.nav__mobile-toggle span::before,
.nav__mobile-toggle span::after { content: ''; position: absolute; left: 0; right: 0; height: 1.5px; background: var(--ink); transition: transform 0.25s var(--easing); }
.nav__mobile-toggle span::before { top: -6px; }
.nav__mobile-toggle span::after { top: 6px; }
.nav.open .nav__mobile-toggle span { background: transparent; }
.nav.open .nav__mobile-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav.open .nav__mobile-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 26px;
  font-size: 15px; font-weight: 500;
  border-radius: var(--radius);
  transition: background 0.25s, color 0.25s, border-color 0.25s;
  white-space: nowrap;
}
.btn--primary { background: var(--blue); color: var(--white); }
.btn--primary:hover { background: var(--blue-hover); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { border-color: var(--ink); background: var(--paper); }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--blue); }
.btn svg { width: 16px; height: 16px; }

/* ─── Footer ─────────────────────────────────────────────── */
.footer { background: var(--white); padding: 60px 0 40px; border-top: 1px solid var(--line); margin-top: 80px; }
.footer__top {
  display: flex; justify-content: space-between; gap: 40px;
  flex-wrap: wrap;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 32px;
}
.footer__brand { max-width: 320px; }
.footer__brand-logo { height: 28px; margin-bottom: 16px; }
.footer__brand-logo svg { height: 100%; width: auto; color: var(--blue); }
.footer__brand-text { font-size: 14px; color: var(--muted); line-height: 1.7; }
.footer__nav { display: flex; gap: 60px; flex-wrap: wrap; }
.footer__nav-group h4 {
  font-size: 11px; font-weight: 500;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer__nav-group ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.footer__nav-group a {
  font-size: 14px; color: var(--ink-soft);
  transition: color 0.25s;
}
.footer__nav-group a:hover { color: var(--blue); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); font-feature-settings: 'tnum'; }
.footer__bottom a { color: var(--ink); font-weight: 500; transition: color 0.25s; }
.footer__bottom a:hover { color: var(--blue); }

/* ─── Section header ─────────────────────────────────────── */
.section { padding: 100px 0; position: relative; }
.section__head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 40px;
  margin-bottom: 60px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.section__label {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 12px; font-weight: 500;
  color: var(--muted);
  margin-bottom: 16px;
}
.section__label-dot { width: 6px; height: 6px; background: var(--blue); border-radius: 50%; }
.section__title {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.section__title .accent { color: var(--blue); font-weight: 900; }
.section__sub { max-width: 380px; color: var(--muted); font-size: 15px; line-height: 1.7; }

/* ─── Coming soon page ───────────────────────────────────── */
.coming-soon {
  min-height: calc(100vh - 200px);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 120px 24px 60px;
}
.coming-soon__label {
  font-size: 12px; font-weight: 500;
  color: var(--blue);
  margin-bottom: 24px;
  display: inline-flex; align-items: center; gap: 10px;
}
.coming-soon__label::before { content: ''; width: 24px; height: 1px; background: var(--blue); }
.coming-soon__title {
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 24px;
}
.coming-soon__sub {
  font-size: 18px;
  color: var(--muted);
  max-width: 540px;
  line-height: 1.7;
  margin-bottom: 40px;
}
.coming-soon__back {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 500;
  color: var(--ink);
  padding: 12px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: background 0.25s, border-color 0.25s;
}
.coming-soon__back:hover { background: var(--paper); border-color: var(--ink-soft); }
.coming-soon__back svg { width: 14px; height: 14px; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --gutter: 24px; }
}

@media (max-width: 768px) {
  :root { --gutter: 20px; }
  .nav { padding: 12px 0; }
  .nav__inner {
    justify-content: center;       /* center the brand */
    position: relative;
  }
  .nav__brand {
    height: 42px;
  }
  .nav__brand svg {
    height: 42px;
  }
  .nav__mobile-toggle {
    display: inline-flex;
    position: absolute;
    right: var(--gutter);
    top: 50%;
    transform: translateY(-50%);
  }
  .nav__links {
    /* reset desktop absolute centering for mobile */
    position: static;
    transform: none;
    display: none;
  }
  .nav.open .nav__links {
    display: flex; flex-direction: column;
    position: fixed; top: 60px; left: 0; right: 0;
    background: var(--white);
    padding: 20px var(--gutter);
    gap: 4px;
    border-bottom: 1px solid var(--line);
    align-items: stretch;
  }
  .nav.open .nav__links a { padding: 12px 18px; border-radius: var(--radius); }
  .section { padding: 70px 0; }
  .section__head { flex-direction: column; align-items: flex-start; margin-bottom: 40px; }
  .section__title { font-size: 32px; }
  .footer__top { flex-direction: column; gap: 32px; }
  .footer__nav { gap: 32px; }
  .footer__bottom { flex-direction: column; align-items: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; }
}
