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

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  direction: rtl;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

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

body {
  font-family: 'Tajawal', sans-serif;
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--ink-primary);
  background-color: var(--bg-deep);
  overflow-x: hidden;
  min-height: 100dvh;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  font-weight: 700;
  text-wrap: balance;
  letter-spacing: -0.01em;
}

h1 { font-size: var(--text-5xl); font-weight: 900; letter-spacing: -0.025em; line-height: 1.05; }
h2 { font-size: var(--text-4xl); font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
h3 { font-size: var(--text-3xl); letter-spacing: -0.015em; }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }

p {
  max-width: var(--content-max);
  text-wrap: pretty;
  color: var(--ink-secondary);
  line-height: 1.85;
}

a {
  color: var(--brand-primary-light);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out-quart);
}

a:hover {
  color: var(--brand-primary);
}

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

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

ul, ol {
  list-style: none;
}

::selection {
  background: oklch(0.550 0.180 353.3 / 0.35);
  color: var(--ink-primary);
}

:focus-visible {
  outline: 2px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-lg);
}

.container--wide {
  max-width: var(--container-wide);
}

.section {
  padding-block: var(--space-section);
  position: relative;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Noise texture overlay for depth */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}
