/* ═══════════════════════════════════════════════════════════
   base.css — Global Body, Typography, Language Visibility
═══════════════════════════════════════════════════════════ */

/* ─── BODY ─── */
body {
  font-family: var(--font-body-en);
  font-size: var(--text-base);
  color: var(--clr-text);
  background-color: var(--clr-bg);
  transition:
    background-color var(--dur-mid) var(--ease),
    color var(--dur-mid) var(--ease);
}

/* ─── LANGUAGE VISIBILITY ─── */
.ar-text,
.ar-only,
.logo-ar,
[data-lang="en"] .ar-text,
[data-lang="en"] .ar-only {
  display: none !important;
}

.en-text,
.en-only,
.logo-en {
  display: inline;
}

[data-lang="ar"] .en-text,
[data-lang="ar"] .en-only,
[data-lang="ar"] .logo-en {
  display: none !important;
}

[data-lang="ar"] .ar-text,
[data-lang="ar"] .ar-only,
[data-lang="ar"] .logo-ar {
  display: inline !important;
}

/* Block-level overrides */
[data-lang="ar"] p.ar-text,
[data-lang="ar"] h1.ar-text,
[data-lang="ar"] h2.ar-text,
[data-lang="ar"] h3.ar-text,
[data-lang="ar"] .hero-title .ar-text,
[data-lang="ar"] .section-title .ar-text {
  display: block !important;
}

p.en-text,
h1.en-text,
h2.en-text,
h3.en-text,
.hero-title .en-text,
.section-title .en-text {
  display: block;
}

/* ─── TYPOGRAPHY ─── */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display-en);
  line-height: 1.12;
  font-weight: 600;
  color: var(--clr-text);
}

[data-lang="ar"] h1,
[data-lang="ar"] h2,
[data-lang="ar"] h3,
[data-lang="ar"] h4 {
  font-family: var(--font-display-ar);
}

[data-lang="ar"] p,
[data-lang="ar"] li,
[data-lang="ar"] span,
[data-lang="ar"] a:not(.logo):not(.btn) {
  font-family: var(--font-body-ar);
}

p {
  line-height: 1.78;
}

em {
  font-style: italic;
  color: var(--clr-gold);
}

a {
  transition: color var(--dur-fast) var(--ease),
    opacity var(--dur-fast) var(--ease);
}

a:hover {
  opacity: 0.8;
}

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

/* ─── SECTION LABEL ─── */
.section-label {
  display: inline-block;
  font-family: var(--font-body-en);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-gold);
  margin-bottom: var(--space-4);
  background: linear-gradient(90deg,
      var(--clr-gold) 0%,
      var(--clr-gold-light) 40%,
      var(--clr-gold) 80%,
      var(--clr-gold-light) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmer 4s linear infinite;
}

[data-lang="ar"] .section-label {
  font-family: var(--font-body-ar);
  letter-spacing: 0;
}

/* ─── SECTION TITLE ─── */
.section-title {
  font-family: var(--font-display-en);
  font-size: clamp(2.1rem, 4.5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.08;
  margin-bottom: var(--space-6);
  letter-spacing: -0.01em;
}

[data-lang="ar"] .section-title {
  font-family: var(--font-display-ar);
  font-weight: 700;
  letter-spacing: 0;
}

.section-title.centered {
  text-align: center;
}

.section-sub {
  font-size: var(--text-md);
  color: var(--clr-text-muted);
  max-width: 52ch;
  margin: 0 auto var(--space-12);
  text-align: center;
  line-height: 1.75;
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-12);
}

/* ─── SELECTION ─── */
::selection {
  background: var(--clr-gold);
  color: var(--clr-accent-fg);
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--clr-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--clr-gold);
  border-radius: var(--radius-full);
  opacity: 0.5;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--clr-gold-dark);
}