/* ==========================================================================
   BASE — page-wide rules shared by every section
   (reset, fonts per language, content width, focus outline, shared headings)
   Colors/fonts/sizes come from theme.css — edit them there.
   ========================================================================== */

/* ---------- Fonts per language ---------- */
html[lang="ar"]  { --font-headings: var(--font-headings-arabic);  --font-body: var(--font-body-arabic); }
html[lang="ckb"] { --font-headings: var(--font-headings-kurdish); --font-body: var(--font-body-kurdish); }

/* In right-to-left languages, small arrow nudges flip direction */
:root          { --dir: 1; }
[dir="rtl"]    { --dir: -1; }

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--size-body);
  line-height: 1.6;
  color: var(--text-on-light);
  background: var(--page-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.is-loading { overflow: hidden; }          /* no scrolling while the loader is showing */
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-headings); line-height: 1.05; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

/* Smooth-scroll library (Lenis) helpers */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

/* ---------- Keyboard focus outline ---------- */
:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ---------- Content width ---------- */
.container { width: 100%; max-width: var(--max-width); margin-inline: auto; padding-inline: var(--side-space); }

/* ---------- "Skip to content" link (appears only when using the keyboard) ---------- */
.skip-link {
  position: fixed; inset-inline-start: 16px; top: -60px; z-index: 1000;
  padding: .6em 1em; border-radius: 8px; font-weight: 700;
  background: var(--orange); color: var(--navy);
  transition: top .3s var(--ease);
}
.skip-link:focus { top: 16px; }

/* ---------- Film-grain texture (used on blue backgrounds) ---------- */
.grain {
  position: absolute; inset: 0; pointer-events: none;
  opacity: .09;                                  /* ← grain strength */
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Shared section headings (About, Services, Contact) ---------- */
/* Small label above a heading, e.g. "— ABOUT US" */
.section-label {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 18px;
  font-size: var(--size-label); font-weight: 700; letter-spacing: .16em; text-transform: uppercase;
  color: var(--blue);
}
.section-label::before { content: ""; width: 34px; height: 2px; border-radius: 2px; background: var(--orange); }

/* Big section heading */
.section-title {
  font-size: var(--size-section-title); font-weight: 700; line-height: 1.02; letter-spacing: -.03em;
  color: var(--text-on-light); text-wrap: balance;
}
/* The highlighted word inside a heading: <em>the world</em> in content/texts.js */
.section-title em {
  font-style: normal; color: var(--highlight-word-on-light);
  background: linear-gradient(transparent 72%, var(--highlight-underline) 72%, var(--highlight-underline) 92%, transparent 92%);
}

/* Versions for dark (blue) backgrounds */
.section-label--on-dark { color: var(--orange); }
.section-title--on-dark { color: var(--text-on-dark); }
.section-title--on-dark em { color: var(--highlight-word-on-dark); background: none; }

/* Arabic/Kurdish: no letter-spacing (it breaks joined letters), taller lines */
[dir="rtl"] .section-label { letter-spacing: 0; font-size: .95rem; }
[dir="rtl"] .section-title { letter-spacing: 0; line-height: 1.3; font-weight: 800; }

/* Word-by-word reveal wrappers (created automatically by js/core/language.js) */
.w   { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.w-i { display: inline-block; will-change: transform; }

/* ---------- Reduced motion: visitors who ask their device for less animation ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
