*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  font-family: var(--font-body, "Noto Kufi Arabic", system-ui, sans-serif);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-text);
  background:
    radial-gradient(ellipse 100% 70% at 100% -10%, rgba(13, 148, 136, 0.055) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 0% 105%, rgba(6, 182, 212, 0.04) 0%, transparent 50%),
    linear-gradient(180deg, var(--color-surface-warm, #faf8f5) 0%, var(--color-surface) 38%, var(--color-surface) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(13, 148, 136, 0.22);
  color: var(--color-navy);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-teal);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-brand-accent);
}

:focus-visible {
  outline: 2px solid var(--color-brand-accent);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  inset-inline-start: var(--space-md);
  top: -100%;
  z-index: 10000;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-brand-primary);
  color: #fff;
  text-decoration: none;
  border-radius: var(--radius-sm);
  transition: top var(--transition-fast);
}

.skip-link:focus {
  top: var(--space-md);
}

.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;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-text);
  margin-block: 0 0.5em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.15rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.65rem, 3.2vw, 2.35rem);
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
}

html[lang="ar"] h1,
html[lang="ar"] h2 {
  letter-spacing: 0;
  font-weight: 700;
}

p {
  margin-block: 0 1em;
  color: var(--color-text-muted);
}

p:last-child {
  margin-bottom: 0;
}
