/* ============================================================
   Zawaya & Afkar — Engineering Consultancy
   main.css — design tokens, base, typography, utilities
   ============================================================ */

:root {
  /* Brand */
  --gold: #cfaa3f;
  --gold-light: #e6c468;
  --gold-soft: #f3e3b3;
  --gold-dark: #a88a2f;
  --gold-deep: #8a6f23;

  --gray: #6d6e72;
  --gray-light: #9c9da1;
  --gray-soft: #d8d9dc;
  --gray-dark: #2c2d30;
  --gray-ink: #1a1b1d;

  --white: #ffffff;
  --off-white: #fafaf7;
  --cream: #f7f3ea;
  --pearl: #f3eedf;

  /* Surfaces */
  --bg: var(--off-white);
  --surface: #ffffff;
  --surface-warm: var(--cream);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(20, 20, 20, 0.04);
  --shadow-sm: 0 4px 14px rgba(20, 20, 20, 0.05);
  --shadow-md: 0 10px 30px rgba(20, 20, 20, 0.07);
  --shadow-lg: 0 20px 60px rgba(20, 20, 20, 0.10);
  --shadow-gold: 0 18px 50px rgba(207, 170, 63, 0.22);
  --shadow-inset: inset 0 0 0 1px rgba(207, 170, 63, 0.18);

  /* Radii */
  --r-xs: 6px;
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;
  --r-pill: 999px;

  /* Spacing */
  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 24px;
  --s-6: 32px;
  --s-7: 48px;
  --s-8: 64px;
  --s-9: 96px;
  --s-10: 128px;

  /* Type */
  --font-ar: 'Tajawal', 'Almarai', system-ui, -apple-system, sans-serif;
  --font-display: 'Almarai', 'Tajawal', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;

  /* Container */
  --container: 1280px;
  --container-narrow: 1080px;
  --gutter: clamp(20px, 4vw, 56px);

  /* Motion */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --t-fast: 180ms;
  --t-mid: 360ms;
  --t-slow: 700ms;

  /* Header */
  --nav-h: 84px;
}

/* Reset & base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-ar);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.7;
  color: var(--gray-dark);
  background: var(--bg);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; }
img { height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}
a:hover { color: var(--gold); }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul, ol { list-style: none; padding: 0; margin: 0; }

input, textarea, select {
  font-family: inherit;
  font-size: 1rem;
  color: var(--gray-dark);
}

::selection { background: var(--gold); color: var(--white); }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gray-ink);
  margin: 0 0 var(--s-4);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.4rem, 5vw, 4.4rem); font-weight: 900; line-height: 1.1; }
h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
h3 { font-size: clamp(1.4rem, 2vw, 1.8rem); }
h4 { font-size: clamp(1.15rem, 1.5vw, 1.3rem); }
p { margin: 0 0 var(--s-4); color: var(--gray); line-height: 1.85; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--gold-dark);
  text-transform: uppercase;
  margin-bottom: var(--s-4);
}
.eyebrow::before {
  content: '';
  display: block;
  width: 28px;
  height: 1px;
  background: var(--gold);
}

.section-title {
  position: relative;
  display: inline-block;
  margin-bottom: var(--s-5);
}
.section-title .accent {
  color: var(--gold);
  font-style: normal;
}

.lead {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  color: var(--gray);
  max-width: 640px;
  margin-inline: auto;
}

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

section { padding-block: clamp(64px, 9vw, 128px); position: relative; }

.section-header {
  text-align: center;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.section-header .lead { margin-top: var(--s-3); }

.text-center { text-align: center; }
.text-gold { color: var(--gold); }
.bg-cream { background: var(--cream); }
.bg-warm-grad {
  background: linear-gradient(180deg, var(--off-white) 0%, var(--cream) 100%);
}
.bg-gold-grad {
  background: linear-gradient(135deg, rgba(207,170,63,0.08) 0%, rgba(255,255,255,0) 60%);
}

.grid { display: grid; gap: var(--s-5); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-2 { gap: var(--s-2); }
.gap-3 { gap: var(--s-3); }
.gap-4 { gap: var(--s-4); }
.gap-5 { gap: var(--s-5); }

.divider-gold {
  width: 64px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  margin: var(--s-4) auto;
}

/* Decorative gold lines */
.gold-line {
  display: block;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold) 50%, transparent);
  opacity: 0.6;
}

/* Floating shapes */
.shape {
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cream); }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-radius: 10px;
}

/* Responsive helpers */
@media (max-width: 768px) {
  body { font-size: 15px; }
  section { padding-block: clamp(56px, 12vw, 96px); }
}
