:root {
  --bg-base: #0F0A05;
  --bg-surface: #1A1008;
  --bg-card: #221608;
  --bg-card-hover: #2C1E0E;
  --border: rgba(201, 168, 76, 0.14);
  --border-hover: rgba(201, 168, 76, 0.32);
  --gold: #C9A84C;
  --gold-light: #E2C47A;
  --gold-subtle: rgba(201, 168, 76, 0.08);
  --text-primary: #F5EDD8;
  --text-secondary: rgba(245, 237, 216, 0.62);
  --text-muted: rgba(245, 237, 216, 0.55);
  --font-urdu: 'Noto Nastaliq Urdu', 'Noto Nastaliq Fallback', 'Amiri Fallback', serif;
  --font-arabic: 'Amiri', 'Amiri Fallback', serif;
  --font-latin: 'IBM Plex Sans', 'IBM Plex Fallback', sans-serif;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 24px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

[data-theme="light"] {
  --bg-base: #FAF6ED;
  --bg-surface: #F0E8D0;
  --bg-card: #EADDb8;
  --bg-card-hover: #E0CF9E;
  --border: rgba(120, 88, 15, 0.18);
  --border-hover: rgba(120, 88, 15, 0.40);
  --gold: #7A5A0A;
  --gold-light: #5C4208;
  --gold-subtle: rgba(120, 88, 15, 0.07);
  --text-primary: #1C1006;
  --text-secondary: rgba(28, 16, 6, 0.65);
  --text-muted: rgba(28, 16, 6, 0.58);
}

/* PREMIUM CALLIGRAPHY PRELOADER */
#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}

#preloader.exit {
  pointer-events: none;
}

.preloader-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background: var(--bg-base);
  will-change: transform;
  transition: transform 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1;
  overflow: hidden;
}

.preloader-panel-top {
  top: 0;
  transform: translate3d(0, 0, 0);
  border-bottom: 1.5px solid rgba(201, 168, 76, 0.15);
}

.preloader-panel-bottom {
  bottom: 0;
  transform: translate3d(0, 0, 0);
  border-top: 1.5px solid rgba(201, 168, 76, 0.15);
}

#preloader.exit .preloader-panel-top {
  transform: translate3d(0, -100%, 0);
}

#preloader.exit .preloader-panel-bottom {
  transform: translate3d(0, 100%, 0);
}

.preloader-panel .preloader-text-svg {
  position: absolute;
  width: 100%;
  max-width: 600px;
  height: 180px;
  left: 50%;
  will-change: opacity;
  transition: opacity 0.5s ease;
}

.preloader-panel-top .preloader-text-svg {
  bottom: -90px;
  transform: translateX(-50%);
}

.preloader-panel-bottom .preloader-text-svg {
  top: -90px;
  transform: translateX(-50%);
}

#preloader.exit .preloader-text-svg {
  opacity: 0;
}

.preloader-text-svg text {
  font-family: var(--font-arabic), "Amiri", serif;
  font-size: 76px;
  font-weight: 700;
  fill: rgba(201, 168, 76, 0);
  stroke: var(--gold);
  stroke-width: 1.5px;
  stroke-linejoin: round;
  stroke-linecap: round;
  stroke-dasharray: 800;
  stroke-dashoffset: 800;
  text-anchor: middle;
  dominant-baseline: middle;
  animation: drawStroke 1.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards,
             fillText 0.5s ease-in-out 1.0s forwards;
}

.preloader-skip {
  position: absolute;
  bottom: 3.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gold);
  border: 1px solid var(--gold);
  color: var(--bg-base);
  padding: 8px 24px;
  font-size: 0.85rem;
  font-family: var(--font-latin);
  font-weight: 600;
  border-radius: 30px;
  cursor: pointer;
  z-index: 100002 !important;
  transition: all 0.3s var(--ease), opacity 0.4s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 20px rgba(201, 168, 76, 0.25);
  letter-spacing: 0.5px;
}

#preloader.exit .preloader-skip {
  opacity: 0;
  pointer-events: none;
}

.preloader-credits {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100002;
  font-family: var(--font-latin);
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  white-space: nowrap;
  opacity: 1;
  will-change: opacity;
  transition: opacity 0.4s ease;
}

.preloader-credits a {
  color: var(--gold);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.preloader-credits a:hover {
  color: var(--gold-light);
  text-decoration: underline;
}

#preloader.exit .preloader-credits {
  opacity: 0;
  pointer-events: none;
}

.preloader-skip:hover {
  transform: translate(-50%, -4px);
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: 0 6px 25px rgba(201, 168, 76, 0.45);
}

@keyframes drawStroke {
  0% { stroke-dashoffset: 800; }
  100% { stroke-dashoffset: 0; }
}

@keyframes fillText {
  0% { fill: rgba(201, 168, 76, 0); }
  100% { fill: var(--gold); }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  background: var(--bg-base);
  color: var(--text-primary);
  direction: rtl;
  font-family: var(--font-urdu);
  line-height: 2;
  font-size: 16px;
  transition: background .4s var(--ease), color .4s var(--ease);
  overflow-x: hidden;
}

body.lang-en,
body.lang-roman {
  direction: ltr;
  font-family: var(--font-latin);
  line-height: 1.7;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: inherit;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: repeating-linear-gradient(45deg, transparent, transparent 48px, rgba(201, 168, 76, 0.024) 48px, rgba(201, 168, 76, 0.024) 49px), repeating-linear-gradient(-45deg, transparent, transparent 48px, rgba(201, 168, 76, 0.024) 48px, rgba(201, 168, 76, 0.024) 49px);
}

[data-theme="light"] body::before {
  background-image: repeating-linear-gradient(45deg, transparent, transparent 48px, rgba(120, 88, 15, 0.04) 48px, rgba(120, 88, 15, 0.04) 49px), repeating-linear-gradient(-45deg, transparent, transparent 48px, rgba(120, 88, 15, 0.04) 48px, rgba(120, 88, 15, 0.04) 49px);
}

/* NAV */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 10, 5, 0.86);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  padding: 0 clamp(1rem, 5vw, 3rem);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}

[data-theme="light"] nav {
  background: rgba(250, 246, 237, 0.90);
}

.nav-brand {
  font-family: var(--font-arabic);
  font-size: 1.05rem;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.lang-switcher {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 4px;
  gap: 6px;
}

.lang-btn {
  padding: 6px 14px;
  border-radius: 99px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-latin);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .25s var(--ease);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.lang-btn.active {
  background: var(--gold);
  color: #000000;
  font-weight: 700;
}

.lang-btn:not(.active):hover {
  color: var(--text-primary);
  background: var(--gold-subtle);
}

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .25s var(--ease);
  flex-shrink: 0;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
}

.theme-toggle .ti {
  font-size: 17px;
}

/* BOOK TABS */
.book-tabs-container {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 10;
  transition: background .4s var(--ease), border-color .4s var(--ease);
}

.book-tabs {
  display: flex;
  width: 100%;
  max-width: 600px;
  justify-content: center;
  padding: 0 1rem;
}

.book-tab {
  flex: 1;
  background: transparent;
  border: none;
  border-bottom: 3px solid transparent;
  color: var(--text-secondary);
  font-family: var(--font-urdu);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 14px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s var(--ease);
  opacity: 0.75;
}

body.lang-en .book-tab,
body.lang-roman .book-tab {
  font-family: var(--font-latin);
  font-size: 0.88rem;
}

.book-tab:hover {
  color: var(--text-primary);
  opacity: 1;
  background: var(--gold-subtle);
}

.book-tab.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
  opacity: 1;
  background: var(--gold-subtle);
}

.book-tab svg.icon {
  width: 1.2em;
  height: 1.2em;
  color: inherit;
}

/* TALBIYAH */
.talbiyah-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  padding: 9px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
  direction: ltr !important;
}

.talbiyah-ticker {
  display: flex;
  width: max-content;
  animation: ticker 42s linear infinite;
  direction: ltr !important;
}

.talbiyah-ticker span {
  font-family: var(--font-arabic);
  font-size: 0.88rem;
  color: var(--gold);
  opacity: 0.7;
  padding: 0 1.5rem;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-10%);
  }
}

/* HERO */
.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
  padding: clamp(3rem, 8vh, 6rem) clamp(1.5rem, 6vw, 4rem);
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 70%;
  height: 60%;
  background: radial-gradient(ellipse at top, var(--gold-subtle), transparent 65%);
  pointer-events: none;
}

.hero-inner {
  max-width: 1140px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.book-scene {
  display: flex;
  justify-content: center;
  align-items: center;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }

  50% {
    transform: translateY(-20px) rotate(-1deg);
  }
}

.book-shadow-wrap {
  position: relative;
}

.book-shadow-wrap::after {
  content: '';
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%) scaleX(0.8);
  width: 240px;
  height: 28px;
  background: radial-gradient(ellipse, rgba(0, 0, 0, 0.45), transparent 70%);
  filter: blur(8px);
}

.book-img {
  width: clamp(280px, 38vw, 420px);
  height: auto;
  aspect-ratio: 490 / 633;
  border-radius: 4px 16px 16px 4px;
  box-shadow: -12px 0 0 #0a0603, -20px 10px 40px rgba(0, 0, 0, 0.7), 0 30px 70px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(201, 168, 76, 0.25);
  object-fit: cover;
}

[data-theme="light"] .book-img {
  box-shadow: -8px 0 0 #c8aa70, -12px 4px 24px rgba(0, 0, 0, 0.25), 0 20px 50px rgba(0, 0, 0, 0.18), 0 0 0 1px rgba(120, 88, 15, 0.3);
}

.bismillah {
  font-family: var(--font-arabic);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  color: var(--gold);
  opacity: 0.8;
  margin-bottom: 1.1rem;
  display: block;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-latin);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--gold-subtle);
  border: 1px solid var(--border);
  padding: 5px 13px;
  border-radius: 99px;
  margin-bottom: 1.1rem;
  direction: ltr;
}

.hero-title {
  font-family: var(--font-arabic);
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  line-height: 1.4;
  color: var(--text-primary);
  margin-bottom: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.lang-en .hero-title,
body.lang-roman .hero-title {
  font-family: var(--font-latin);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.hero-title .hl {
  color: var(--gold-light);
}

.hero-desc {
  font-size: clamp(0.9rem, 1.5vw, 1.05rem);
  color: var(--text-secondary);
  line-height: 2.2;
  margin-bottom: 2.5rem;
  max-width: 540px;
}

body.lang-en .hero-desc,
body.lang-roman .hero-desc {
  line-height: 1.6;
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

body[dir="rtl"] .hero-actions {
  justify-content: flex-start;
}

body.lang-en .hero-actions,
body.lang-roman .hero-actions {
  justify-content: flex-start;
  direction: ltr;
}

.hero-meta {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

body[dir="rtl"] .hero-meta {
  justify-content: flex-start;
}

body.lang-en .hero-meta,
body.lang-roman .hero-meta {
  justify-content: flex-start;
  direction: ltr;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-latin);
  font-size: 0.73rem;
  color: var(--text-muted);
  direction: ltr;
}

.meta-item .ti {
  font-size: 14px;
  color: var(--gold);
  opacity: 0.65;
}

/* BUTTONS */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0.72rem 1.65rem;
  border-radius: var(--r-md);
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all .3s var(--ease);
  white-space: nowrap;
}

.btn svg.icon {
  width: 1.2em;
  height: 1.2em;
  display: block;
  margin: 0 !important;
  flex-shrink: 0;
}

body.lang-en .btn,
body.lang-roman .btn {
  font-family: var(--font-latin);
}

.btn .ti {
  font-size: 17px;
}

.btn-gold {
  background: var(--gold);
  color: #ffffff;
  font-weight: 600;
  animation: goldGlow 2.5s infinite ease-in-out;
  border: 1px solid rgba(201, 168, 76, 0.2);
}

.btn-gold:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
}

.btn-gold:active {
  transform: scale(0.98);
}

@keyframes goldGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(201, 168, 76, 0.4), 0 0 0 1px rgba(201, 168, 76, 0.25);
  }
  50% {
    box-shadow: 0 0 35px rgba(201, 168, 76, 0.9), 0 0 0 12px rgba(201, 168, 76, 0);
  }
}

.btn-outline {
  background: transparent;
  color: var(--gold-light);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  background: var(--gold-subtle);
  border-color: var(--gold);
}

/* SECTIONS */
.section {
  position: relative;
  z-index: 1;
  padding: clamp(4rem, 8vh, 6rem) clamp(1.5rem, 6vw, 4rem);
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: clamp(2.5rem, 5vh, 3.5rem);
}

.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-latin);
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.7rem;
  direction: ltr;
}

.section-title {
  font-family: var(--font-arabic);
  font-size: clamp(1.45rem, 2.8vw, 2rem);
  color: var(--text-primary);
  line-height: 1.5;
  font-weight: 700;
}

body.lang-en .section-title,
body.lang-roman .section-title {
  font-family: var(--font-latin);
  line-height: 1.3;
}

.section-title .hl {
  color: var(--gold-light);
}

.section-subtitle {
  margin-top: 0.55rem;
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

body.lang-en .section-subtitle,
body.lang-roman .section-subtitle {
  font-family: var(--font-latin);
  line-height: 1.65;
}

/* DIVIDER */
.div-wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 clamp(1.5rem, 6vw, 4rem);
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.div-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.div-dot {
  font-family: var(--font-arabic);
  font-size: 1rem;
  color: var(--gold);
  opacity: 0.45;
}

/* TOPICS */
.topics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.topic-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  transition: all .3s var(--ease);
  position: relative;
  overflow: hidden;
}

.topic-card::after {
  content: '';
  position: absolute;
  inset-inline-end: 0;
  top: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, var(--gold), transparent);
  opacity: 0;
  transition: opacity .3s var(--ease);
}

.topic-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateY(-3px);
}

.topic-card:hover::after {
  opacity: 1;
}

.topic-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--gold-subtle);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
}

.topic-icon .ti {
  font-size: 19px;
  color: var(--gold);
}

.t-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gold-light);
  margin-bottom: .3rem;
  line-height: 1.55;
}

body.lang-en .t-title,
body.lang-roman .t-title {
  font-family: var(--font-latin);
  line-height: 1.35;
}

.t-desc {
  font-size: 0.77rem;
  color: var(--text-secondary);
  line-height: 1.85;
}

body.lang-en .t-desc,
body.lang-roman .t-desc {
  font-family: var(--font-latin);
  line-height: 1.6;
}

/* HADITH */
.hadith-wrap {
  padding: 3rem clamp(1.5rem, 6vw, 4rem);
  position: relative;
  z-index: 1;
}

.hadith-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(2rem, 4vh, 3rem) clamp(1.5rem, 5vw, 3.5rem);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hadith-card::before {
  content: '\201C';
  position: absolute;
  top: -30px;
  inset-inline-start: 2rem;
  font-family: Georgia, serif;
  font-size: 11rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.05;
}

.hadith-ar {
  font-family: var(--font-arabic);
  font-size: clamp(1.05rem, 2.2vw, 1.4rem);
  color: var(--gold-light);
  line-height: 2.1;
  margin-bottom: .9rem;
  direction: rtl;
}

.hadith-tr {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

body.lang-en .hadith-tr,
body.lang-roman .hadith-tr {
  font-family: var(--font-latin);
}

.hadith-ref {
  display: inline-block;
  margin-top: .9rem;
  font-family: var(--font-latin);
  font-size: 0.65rem;
  color: var(--gold);
  opacity: 0.5;
  letter-spacing: 0.08em;
  border: 1px solid var(--border);
  padding: 3px 12px;
  border-radius: 99px;
  direction: ltr;
}

/* AUTHOR */
.author-section {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.author-inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.author-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.author-avatar {
  width: 108px;
  height: 108px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-hover));
  border: 1.5px solid var(--border-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-arabic);
  font-size: 2.1rem;
  color: var(--gold);
}

.author-avatar-wrap::after {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 50%;
  border: 1px solid var(--border);
}

.a-label {
  font-family: var(--font-latin);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: .45rem;
  direction: ltr;
}

body[dir="rtl"] .a-label {
  text-align: right;
}

.a-name {
  font-family: var(--font-arabic);
  font-size: clamp(1.25rem, 2.8vw, 1.8rem);
  color: var(--text-primary);
  font-weight: 700;
  line-height: 1.45;
  margin-bottom: .9rem;
}

body.lang-en .a-name,
body.lang-roman .a-name {
  font-family: var(--font-latin);
  line-height: 1.28;
}

.a-roles {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 1.1rem;
}

.a-role {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.79rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

body.lang-en .a-role,
body.lang-roman .a-role {
  font-family: var(--font-latin);
}

.a-role .ti {
  font-size: 14px;
  color: var(--gold);
  opacity: 0.6;
  margin-top: 3px;
  flex-shrink: 0;
}

.a-bio {
  font-size: 0.81rem;
  color: var(--text-secondary);
  line-height: 2;
}

body.lang-en .a-bio,
body.lang-roman .a-bio {
  font-family: var(--font-latin);
  line-height: 1.72;
}

/* CTA */
.cta-section {
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, var(--gold-subtle), transparent 65%);
  pointer-events: none;
}

.cta-card {
  max-width: 620px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 5vh, 4rem) clamp(2rem, 5vw, 3.5rem);
  position: relative;
}

.cta-title-el {
  font-family: var(--font-arabic);
  font-size: clamp(1.45rem, 3.2vw, 2.1rem);
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: .7rem;
}

body.lang-en .cta-title-el,
body.lang-roman .cta-title-el {
  font-family: var(--font-latin);
  line-height: 1.3;
}

.cta-sub-el {
  font-size: 0.87rem;
  color: var(--text-secondary);
  line-height: 2;
  margin-bottom: 1.75rem;
}

body.lang-en .cta-sub-el,
body.lang-roman .cta-sub-el {
  font-family: var(--font-latin);
  line-height: 1.68;
}

.cta-acts {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-note-el {
  margin-top: 1.1rem;
  font-family: var(--font-latin);
  font-size: 0.67rem;
  color: var(--text-muted);
  direction: ltr;
}

/* FOOTER */
footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: 2.5rem clamp(1.5rem, 6vw, 4rem);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
}

.f-brand {
  font-family: var(--font-arabic);
  font-size: 0.95rem;
  color: var(--gold);
  opacity: 0.55;
  justify-self: start;
}

.f-copy {
  font-family: var(--font-latin);
  font-size: 0.69rem;
  color: var(--text-muted);
  direction: ltr;
  text-align: center;
  justify-self: center;
}

.footer-credits {
  position: relative;
  z-index: 1;
  background: #EADDB8;
  border-top: 1px solid rgba(120, 88, 15, 0.15);
  padding: 1.4rem 1.5rem;
  text-align: center;
  font-family: var(--font-latin);
  font-size: 0.72rem;
  color: #1C1006;
  letter-spacing: 0.03em;
  direction: ltr;
}

.footer-credits a {
  color: #7A5A0A;
  font-weight: 700;
  text-decoration: none;
  border-bottom: 1px dashed rgba(122, 90, 10, 0.50);
  padding-bottom: 1px;
  transition: all 0.25s var(--ease);
}

.footer-credits a:hover {
  color: #5C4208;
  border-bottom-color: #5C4208;
  text-shadow: 0 0 6px rgba(122, 90, 10, 0.20);
}

@keyframes heartPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.footer-credits .heart {
  color: #D32F2F;
  display: inline-block;
  animation: heartPulse 1.4s infinite var(--ease);
  margin: 0 3px;
  vertical-align: middle;
}

.f-links {
  display: flex;
  gap: .9rem;
  align-items: center;
  direction: ltr;
  justify-self: end;
}

.f-links a {
  font-family: var(--font-latin);
  font-size: 0.69rem;
  color: var(--text-muted);
  transition: color .2s;
}

.f-links a:hover {
  color: var(--gold);
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.d1 {
  transition-delay: .08s;
}

.d2 {
  transition-delay: .18s;
}

.d3 {
  transition-delay: .28s;
}

.d4 {
  transition-delay: .38s;
}

.d5 {
  transition-delay: .48s;
}

/* RESPONSIVE */
@media(max-width:800px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .book-scene {
    order: -1;
  }

  body[dir="rtl"] .hero-actions,
  body[dir="rtl"] .hero-meta {
    justify-content: center;
  }

  .hero-desc {
    margin: 0 auto 2rem;
  }

  .topics-grid {
    grid-template-columns: 1fr 1fr;
  }

  .author-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .author-avatar {
    margin: 0 auto;
  }

  body[dir="rtl"] .a-label {
    text-align: center;
  }

  .a-role {
    justify-content: center;
  }

  footer {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 1.2rem;
    padding: 2.2rem 1.5rem;
  }

  .f-brand,
  .f-copy,
  .f-links {
    justify-self: center;
  }

  .f-links {
    justify-content: center;
  }
}

@media(max-width:520px) {
  .topics-grid {
    grid-template-columns: 1fr;
  }

  .lang-btn {
    padding: 5px 8px;
    font-size: 0.65rem;
  }

  .book-tab {
    font-size: 0.82rem;
    padding: 10px 8px;
    gap: 4px;
  }

  .book-tab svg.icon {
    width: 1.1em;
    height: 1.1em;
  }

  body.lang-en .book-tab,
  body.lang-roman .book-tab {
    font-size: 0.76rem;
  }
}

@media(max-width:375px) {
  .book-tab {
    font-size: 0.76rem;
    padding: 10px 4px;
    gap: 3px;
  }

  .book-tab svg.icon {
    width: 1em;
    height: 1em;
  }

  body.lang-en .book-tab,
  body.lang-roman .book-tab {
    font-size: 0.70rem;
  }
}
