@import url("https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&family=Inter:wght@400;500;600;700&display=swap");

:root {
  --color-primary: #7C3AED;
  --color-primary-dark: #5B21B6;
  --color-primary-light: #A78BFA;
  --color-accent: #F59E0B;
  --color-accent-light: #FCD34D;
  --color-pink: #EC4899;
  --color-bg: #FFFFFF;
  --color-bg-soft: #F8F7FC;
  --color-text: #1A1B25;
  --color-text-muted: #63667A;
  --color-border: #ECE9F6;
  --color-ink: #14121F;
  --radius-sm: 10px;
  --radius: 18px;
  --radius-lg: 26px;
  --shadow-sm: 0 4px 14px rgba(45, 24, 88, 0.06);
  --shadow: 0 12px 32px rgba(45, 24, 88, 0.1);
  --shadow-lg: 0 24px 60px rgba(45, 24, 88, 0.16);
  --max-width: 1120px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Tajawal", "Segoe UI", "Inter", Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.85;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

[dir="ltr"] body,
html[lang="en"] body {
  font-family: "Inter", "Tajawal", "Segoe UI", Arial, sans-serif;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: none;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
}

::selection {
  background: var(--color-primary);
  color: #fff;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px) saturate(160%);
  -webkit-backdrop-filter: blur(14px) saturate(160%);
  z-index: 100;
  transition: box-shadow 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  box-shadow: 0 6px 24px rgba(45, 24, 88, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--color-text);
  letter-spacing: -0.01em;
}

.brand .logo-badge {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-pink) 60%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(124, 58, 237, 0.35);
}

.brand .logo-badge svg {
  width: 22px;
  height: 22px;
}

.brand small {
  display: block;
  font-weight: 500;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  width: 44px;
  height: 44px;
  font-size: 1.2rem;
  cursor: pointer;
  color: var(--color-text);
  transition: background 0.2s var(--ease);
}

.nav-toggle:hover {
  background: var(--color-border);
}

.main-nav ul {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.96rem;
  padding: 9px 16px;
  border-radius: 999px;
  display: inline-block;
  transition: all 0.2s var(--ease);
}

.main-nav a:hover {
  color: var(--color-primary-dark);
  background: var(--color-bg-soft);
  text-decoration: none;
}

.main-nav a.active {
  color: #fff;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  box-shadow: 0 4px 14px rgba(124, 58, 237, 0.3);
}

/* Hero */
.hero {
  position: relative;
  padding: 90px 0 76px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  z-index: -1;
  opacity: 0.55;
}

.hero::before {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--color-primary-light), transparent 70%);
  top: -160px;
  inset-inline-end: -120px;
}

.hero::after {
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--color-accent-light), transparent 70%);
  bottom: -180px;
  inset-inline-start: -100px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.1), rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(124, 58, 237, 0.18);
  color: var(--color-primary-dark);
  font-size: 0.85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 999px;
  margin-bottom: 22px;
}

.hero h1 {
  font-size: clamp(2rem, 4.6vw, 3.2rem);
  margin: 0 0 18px;
  font-weight: 900;
  color: var(--color-ink);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.hero h1 .accent-word {
  background: linear-gradient(120deg, var(--color-primary), var(--color-pink));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.subtitle {
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 0 auto 10px;
  font-weight: 500;
}

.hero .subtitle-en {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 34px;
  direction: ltr;
  opacity: 0.85;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 32px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 10px 28px rgba(124, 58, 237, 0.32);
  border: none;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 14px 36px rgba(124, 58, 237, 0.4);
  text-decoration: none;
}

.btn-outline {
  background: #fff;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
}

.btn-outline:hover {
  color: var(--color-primary-dark);
  border-color: var(--color-primary-light);
  box-shadow: var(--shadow);
}

/* Sections */
.section {
  padding: 72px 0;
  position: relative;
}

.section-soft {
  background: var(--color-bg-soft);
}

.section-eyebrow {
  display: block;
  text-align: center;
  color: var(--color-primary);
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
  text-align: center;
  margin: 0 0 46px;
  font-weight: 900;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 32px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(124, 58, 237, 0.2);
}

.card .icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(124, 58, 237, 0.12), rgba(236, 72, 153, 0.12));
  color: var(--color-primary);
}

.card .icon-circle svg {
  width: 26px;
  height: 26px;
}

.card h3 {
  margin: 0 0 14px;
  font-size: 1.18rem;
  font-weight: 800;
  color: var(--color-ink);
}

.card ul {
  margin: 0;
  padding-inline-start: 20px;
  color: var(--color-text-muted);
}

.card ul li {
  margin-bottom: 8px;
}

.card ul li::marker {
  color: var(--color-primary-light);
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Page header (inner pages) */
.page-hero {
  position: relative;
  padding: 64px 0 30px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.page-hero::before {
  content: "";
  position: absolute;
  top: -140px;
  inset-inline-end: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.18), transparent 70%);
  filter: blur(60px);
  z-index: -1;
}

.page-hero h1 {
  font-size: clamp(1.7rem, 3.5vw, 2.3rem);
  margin: 0 0 10px;
  font-weight: 900;
  color: var(--color-ink);
  letter-spacing: -0.01em;
}

.page-hero p {
  color: var(--color-text-muted);
  margin: 0;
  font-weight: 500;
}

/* Legal / content pages */
.legal-content {
  padding: 40px 0 72px;
}

.legal-content .container {
  max-width: 820px;
}

.legal-content-inner {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 44px clamp(22px, 5vw, 56px);
}

.legal-content h2 {
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--color-primary-dark);
  margin-top: 34px;
  margin-bottom: 12px;
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  color: var(--color-text);
}

.legal-content ul {
  padding-inline-start: 22px;
}

.legal-content .updated {
  display: inline-block;
  color: var(--color-primary-dark);
  background: var(--color-bg-soft);
  border-radius: 999px;
  padding: 6px 16px;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 26px;
}

.divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: 40px 0;
}

.lang-note {
  background: var(--color-bg-soft);
  border: 1px solid var(--color-border);
  border-inline-start: 4px solid var(--color-primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 30px;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Contact */
.contact-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 44px 34px;
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: -100px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(124, 58, 237, 0.14), transparent 70%);
  z-index: 0;
}

.contact-card > * {
  position: relative;
  z-index: 1;
}

.contact-card .contact-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--color-primary), var(--color-pink));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 26px rgba(124, 58, 237, 0.32);
}

.contact-card .contact-icon svg {
  width: 30px;
  height: 30px;
  color: #fff;
}

.contact-card .contact-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 0;
  font-size: 1.05rem;
  border-top: 1px solid var(--color-border);
}

.contact-card .contact-row:first-of-type {
  border-top: none;
}

.contact-card .contact-row strong {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 0.85rem;
}

.contact-card .contact-email {
  font-weight: 800;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  background: var(--color-ink);
  color: rgba(255, 255, 255, 0.72);
  padding: 48px 0 28px;
  margin-top: 40px;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.footer-brand .logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-pink) 60%, var(--color-accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.footer-brand .logo-badge svg {
  width: 20px;
  height: 20px;
  color: #fff;
}

.footer-brand small {
  display: block;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.82rem;
  margin-top: 3px;
}

.footer-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.94rem;
  font-weight: 600;
}

.footer-links a:hover {
  color: #fff;
}

.footer-meta {
  text-align: end;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.88rem;
}

.footer-meta a {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 600;
}

.footer-meta a:hover {
  color: #fff;
}

.footer-bottom {
  padding-top: 20px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

/* RTL/LTR helpers */
[dir="ltr"] {
  text-align: left;
}

.ltr-block {
  direction: ltr;
  text-align: left;
}

/* Responsive */
@media (max-width: 860px) {
  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .main-nav {
    display: block;
    max-height: 0;
    overflow: hidden;
    width: 100%;
    order: 3;
    transition: max-height 0.35s var(--ease);
  }

  .main-nav.open {
    max-height: 320px;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
    border-top: 1px solid var(--color-border);
    margin-top: 14px;
    padding-top: 14px;
  }

  .main-nav a {
    display: block;
    padding: 12px 16px;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  .hero {
    padding: 64px 0 52px;
  }

  .footer-grid {
    flex-direction: column;
  }

  .footer-meta {
    text-align: start;
  }
}
