/* AiSAL Design System — shared.css
   Import this in every page before page-specific styles */

/* ─── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Syne:wght@700;800&family=DM+Sans:opsz,wght@9..40,300;9..40,400;9..40,500&family=Noto+Naskh+Arabic:wght@400;600&display=swap');

/* ─── Design Tokens ─────────────────────────────────────────── */
:root {
  --white:        #FFFFFF;
  --white-warm:   #F9FAFA;
  --teal:         #0097A7;
  --teal-light:   #00BCD4;
  --teal-faint:   #E0F7FA;
  --navy:         #1A2C5B;
  --text:         #0D1B2A;
  --muted:        #4A6070;
  --hint:         #8AA0AE;
  --border:       #E8F0F2;

  --radius-card:   20px;
  --radius-btn:    100px;
  --radius-input:  12px;

  --shadow-card:   0 20px 60px rgba(0,151,167,0.08);
  --shadow-nav:    0 4px 24px rgba(0,0,0,0.06);

  --max-w:        1280px;
  --section-py:   120px;
  --section-px:   max(5vw, 40px);
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.8;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: 'Syne', sans-serif;
  color: var(--navy);
  line-height: 1.1;
}
h1 {
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
h2 {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
h3 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.section-label {
  display: block;
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 16px;
}

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--section-px);
}
.section {
  padding: var(--section-py) var(--section-px);
}
.section-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}
.section-header {
  margin-bottom: 64px;
}
.section-header.centered {
  text-align: center;
}
.section-sub {
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.8;
  margin-top: 16px;
  max-width: 520px;
}
.section-header.centered .section-sub {
  margin-left: auto;
  margin-right: auto;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-btn);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1;
  border: none;
  transition: background 0.25s ease, transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
.btn-primary {
  background: var(--teal);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--teal-light);
  transform: translateY(-2px);
}
.btn-ghost {
  background: var(--white);
  color: var(--teal);
  border: 1.5px solid var(--teal);
}
.btn-ghost:hover {
  background: var(--teal-faint);
}
.btn-sm {
  padding: 10px 22px;
  font-size: 14px;
}
.btn-full { width: 100%; justify-content: center; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 2.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

/* ─── Scroll Animations ──────────────────────────────────────── */
/* CSS fallback: if JS never fires, everything becomes visible at 2 s */
@keyframes revealFallback {
  to { opacity: 1; transform: none; }
}
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16,1,0.3,1),
              transform 0.8s cubic-bezier(0.16,1,0.3,1);
  animation: revealFallback 0.8s 2s cubic-bezier(0.16,1,0.3,1) both;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
  animation: none; /* JS took over — cancel the fallback timer */
}

/* ─── Arabic Text ────────────────────────────────────────────── */
.arabic {
  font-family: 'Noto Naskh Arabic', serif;
  direction: rtl;
}

/* ─── Focus States ───────────────────────────────────────────── */
:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--hint); }
