/**
 * سَرْد | SARD Studio — Interior Architecture & Haute Living
 * منظومة الطباعة العربية وسلالم الخطوط الفاخرة (Editorial Typography & Scales)
 */

/* 1. استيراد عائلات الخطوط الأربعة بدقة متكاملة من Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Almarai:wght@300;400;700;800&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500;1,600&family=Reem+Kufi:wght@400;500;600;700&family=Space+Mono:ital,wght@0,400;0,700;1,400&display=swap');

/* 2. ضبط خط الجسم الأساسي (Body Baseline) */
body {
  font-family: var(--font-body);
  font-size: 1.0625rem; /* 17px للراحة البصرية المثلى في القراءة الطويلة */
  font-weight: 400;
  line-height: 1.9;
  letter-spacing: 0; /* التزام صارم بعدم تمديد الحروف العربية إطلاقاً */
  color: var(--chapter-text);
}

/* 3. سلم العناوين التحريرية والمعمارية (Reem Kufi Headings) */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-heading);
  letter-spacing: 0;
  text-wrap: balance;
  color: var(--chapter-text);
  margin-bottom: 1.25rem;
}

h1,
.hero-headline {
  font-size: clamp(3rem, 7.5vw, 6.5rem);
  font-weight: 600;
  line-height: 1.15;
}

h2,
.section-headline {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.3;
}

h3,
.item-headline {
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 500;
  line-height: 1.4;
}

h4 {
  font-size: 1.1875rem;
  font-weight: 500;
  line-height: 1.5;
}

/* 4. صياغة الفقرات وتحديد أقصى عرض للقراءة (Editorial Paragraphs) */
p {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.9;
  max-width: 65ch;
  color: var(--chapter-text);
  margin-bottom: 1.5rem;
}

p.lead {
  font-size: clamp(1.125rem, 1.5vw, 1.375rem);
  line-height: 1.8;
  font-weight: 300;
  color: var(--chapter-text);
}

p.muted {
  color: var(--chapter-text-muted);
}

/* 5. الأرقام الهندسية الشامخة (Cormorant Garamond Numerals) */
.chapter-number {
  font-family: var(--font-editorial);
  font-size: clamp(6rem, 12vw, 12rem);
  font-weight: 400;
  line-height: 0.85;
  color: var(--chapter-accent);
  opacity: 0.85;
  user-select: none;
  display: block;
}

.stat-number {
  font-family: var(--font-editorial);
  font-size: clamp(4rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1;
  color: var(--chapter-accent);
  letter-spacing: -0.02em;
}

.numeral-tabular {
  font-family: var(--font-editorial);
  font-variant-numeric: tabular-nums;
}

/* مونوغرام الشعار الرمزي في الشريط الجانبي */
.brand-monogram {
  font-family: var(--font-editorial);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--chapter-accent);
  display: inline-block;
  line-height: 1;
}

/* 6. الملاحظات والبيانات التقنية والمعمارية (Space Mono Tech Notes) */
.type-label,
.meta-tag,
.tech-spec {
  font-family: var(--font-tech);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--chapter-text-muted);
  display: inline-block;
}

.tag-badge {
  font-family: var(--font-tech);
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border: 1px solid var(--chapter-border);
  color: var(--chapter-text);
  background-color: rgba(255, 255, 255, 0.04);
}

/* 7. كشف الكلمات الانسيابي كلمة بكلمة (Word-by-Word Kinetic Reveal) */
.word-reveal {
  perspective: 1000px;
}

.word-reveal > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) rotateX(15deg);
  transition: opacity 0.6s var(--ease-chromatic),
              transform 0.6s var(--ease-chromatic);
  transition-delay: calc(var(--i, 0) * 0.06s);
  will-change: transform, opacity;
}

.word-reveal.is-visible > span {
  opacity: 1;
  transform: none;
}

/* استثناء خاص عند تفعيل تقليل الحركة لدى المستخدم */
@media (prefers-reduced-motion: reduce) {
  .word-reveal > span {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
