/* =========================================================
   يوميات مغترب في بلاد الكفيل
   Cinematic Literary Website · style.css
   ========================================================= */

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }
::selection { background: var(--ochre); color: var(--ink); }

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Palette — desert, ink, dried blood, parchment */
  --ink:        #1a1410;       /* deep ink black */
  --ink-2:      #2a2018;       /* slightly lifted */
  --parchment:  #f5ede0;       /* warm cream paper */
  --parchment-2:#ebe0ce;
  --sand:       #d9b88a;       /* dune sand */
  --sand-deep:  #b8915c;       /* shadow sand */
  --ochre:      #c08545;       /* burnt ochre accent */
  --rust:       #8b3a1f;       /* dried-blood red */
  --olive:      #4a5a3a;       /* book-cover green muted */
  --mist:       #7a6e5d;       /* dusty taupe text */
  --line:       #d6c4a7;       /* hairline on parchment */
  --line-dark:  #3a2f24;       /* hairline on ink */

  /* Type */
  --f-display: 'Tajawal', 'Tahoma', sans-serif;
  --f-serif:   'Amiri', 'Times New Roman', serif;
  --f-body:    'Tajawal', 'Tahoma', sans-serif;
  --f-latin:   'Cormorant Garamond', 'Times New Roman', serif;

  /* Rhythm */
  --container: 1240px;
  --container-wide: 1400px;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --section-y: clamp(5rem, 12vw, 9rem);
}

/* ---------- BASE ---------- */
html, body { background: var(--parchment); color: var(--ink); }

body {
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.75;
  font-weight: 400;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(ellipse 80% 50% at 50% 0%, rgba(192, 133, 69, 0.08), transparent 60%),
    var(--parchment);
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}
.container-wide {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
}

/* ---------- GRAIN OVERLAY ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 100;
  opacity: 0.10;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1 0 0 0 0 0.08 0 0 0 0 0.06 0 0 0 0.5 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- SAND CANVAS ---------- */
#sand-canvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.55;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  padding: 1.25rem 0;
  transition: background 0.45s ease, padding 0.4s ease, backdrop-filter 0.4s ease;
}
.nav.scrolled {
  background: rgba(245, 237, 224, 0.85);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(58, 47, 36, 0.08);
}
.nav-inner {
  max-width: var(--container-wide);
  margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.nav-mark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.4s ease;
}
.nav-mark::before {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 1px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.45s ease;
}
.nav-mark:hover { color: var(--rust); }
.nav-mark:hover::before { transform: scaleX(1); }

.nav-links {
  display: flex;
  gap: 2.25rem;
  align-items: center;
}
.nav-links a {
  font-family: var(--f-body);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink);
  position: relative;
  padding: 0.4rem 0;
  transition: color 0.3s ease;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 1px;
  background: var(--rust);
  transition: width 0.4s ease;
}
.nav-links a:hover { color: var(--rust); }
.nav-links a:hover::after { width: 100%; }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 8rem var(--gutter) 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  z-index: 2;
}

.hero-bg { position: absolute; inset: 0; z-index: -1; }
.hero-dunes {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 40% at 80% 70%, rgba(192, 133, 69, 0.22), transparent 60%),
    radial-gradient(ellipse 60% 35% at 15% 85%, rgba(139, 58, 31, 0.10), transparent 60%),
    radial-gradient(ellipse 50% 30% at 50% 0%, rgba(74, 90, 58, 0.06), transparent 60%);
}
.hero-vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(245, 237, 224, 0) 0%, rgba(245, 237, 224, 0) 70%, var(--parchment) 100%);
}

.hero-grid {
  max-width: var(--container-wide);
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
}

.hero-text { position: relative; }

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
  opacity: 0;
  animation: fadeIn 1.2s ease 0.2s forwards;
}
.hero-eyebrow .line {
  flex: 0 0 36px;
  height: 1px;
  background: var(--ink);
  opacity: 0.5;
}
.hero-eyebrow .eyebrow-text {
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.45em;
  font-weight: 600;
  color: var(--ink);
}

.hero-title {
  font-family: var(--f-display);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 2rem;
}
.title-line {
  display: block;
  font-size: clamp(2.6rem, 6.5vw, 5.5rem);
  overflow: hidden;
}
.title-line > span {
  display: inline-block;
  transform: translateY(110%);
  animation: titleReveal 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.title-line:nth-child(1) > span { animation-delay: 0.4s; }
.title-line:nth-child(2) > span { animation-delay: 0.55s; }
.title-line:nth-child(3) > span { animation-delay: 0.7s; }

.title-emphasis {
  font-style: italic;
  color: var(--rust);
  font-family: var(--f-serif);
  font-weight: 700;
}

.hero-sub {
  font-family: var(--f-serif);
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  line-height: 1.85;
  color: var(--ink);
  opacity: 0.78;
  max-width: 32rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}

.hero-author {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--f-body);
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 2.75rem;
  letter-spacing: 0.02em;
}
.hero-author .dot {
  width: 6px; height: 6px;
  background: var(--rust);
  border-radius: 50%;
}
.hero-author strong {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: center;
}
.cta-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  background: var(--ink);
  color: var(--parchment);
  padding: 1rem 1.75rem;
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
  transition: background 0.4s ease, color 0.4s ease;
}
.cta-primary svg {
  width: 18px; height: 18px;
  transition: transform 0.4s ease;
}
.cta-primary:hover { background: var(--rust); }
.cta-primary:hover svg { transform: translateX(-6px); }

.cta-ghost {
  display: inline-flex;
  align-items: center;
  padding: 1rem 1.5rem;
  font-family: var(--f-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  border: 1px solid var(--ink);
  transition: all 0.4s ease;
}
.cta-ghost:hover {
  background: var(--ink);
  color: var(--parchment);
}

/* Hero cover */
.hero-cover {
  position: relative;
  perspective: 1500px;
}
.cover-frame {
  position: relative;
  aspect-ratio: 530 / 764;
  max-width: 380px;
  margin: 0 auto;
  transform: rotate(-3deg) translateY(20px);
  box-shadow:
    0 1px 2px rgba(26, 20, 16, 0.1),
    0 8px 20px rgba(26, 20, 16, 0.15),
    0 30px 60px -10px rgba(26, 20, 16, 0.35),
    0 50px 100px -20px rgba(139, 58, 31, 0.25);
  transition: transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
  opacity: 0;
  animation: coverIn 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.5s forwards;
}
.cover-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(1.05);
}
.cover-frame:hover { transform: rotate(-1deg) translateY(0) scale(1.02); }
.cover-glow {
  position: absolute;
  inset: -2px;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.18), transparent 35%),
    linear-gradient(225deg, transparent 65%, rgba(26, 20, 16, 0.25));
  mix-blend-mode: overlay;
}

.cover-meta {
  position: absolute;
  bottom: -1.5rem;
  left: -1rem;
  background: var(--rust);
  color: var(--parchment);
  padding: 0.85rem 1.1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: var(--f-display);
  line-height: 1;
  transform: rotate(-6deg);
  box-shadow: 0 8px 20px rgba(139, 58, 31, 0.4);
}
.meta-num {
  font-size: 1.6rem;
  font-weight: 700;
}
.meta-cur {
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  margin-top: 0.2rem;
  opacity: 0.85;
}

/* Hero foot */
.hero-foot {
  max-width: var(--container-wide);
  margin: 4rem auto 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-top: 2rem;
  border-top: 1px solid rgba(26, 20, 16, 0.12);
  opacity: 0;
  animation: fadeIn 1s ease 1.5s forwards;
}
.scroll-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.35em;
  color: var(--ink);
  opacity: 0.7;
}
.scroll-line {
  width: 60px;
  height: 1px;
  background: var(--ink);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--rust);
  transform: translateX(100%);
  animation: scrollLine 2.5s ease-in-out infinite;
}

.hero-coords {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--mist);
  display: flex;
  gap: 0.6rem;
  align-items: center;
}
.coord-sep { color: var(--rust); }

/* ---------- SECTION MARK ---------- */
.section-mark {
  display: inline-flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 2.5rem;
  font-family: var(--f-body);
}
.section-mark.center {
  justify-content: center;
  width: 100%;
}
.mark-num {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 1.5rem;
  color: var(--rust);
  font-weight: 400;
}
.mark-label {
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  font-weight: 600;
  color: var(--ink);
  text-transform: uppercase;
}

.section-heading {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.8rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin-bottom: 3.5rem;
  max-width: 22ch;
}
.section-heading.center {
  margin-inline: auto;
  text-align: center;
  max-width: none;
}
.section-heading em {
  font-style: italic;
  color: var(--rust);
  font-family: var(--f-serif);
}

/* ---------- SYNOPSIS ---------- */
.synopsis {
  padding: var(--section-y) 0;
  position: relative;
  z-index: 2;
}
.synopsis-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.synopsis-text p {
  font-family: var(--f-serif);
  font-size: clamp(1.05rem, 1.4vw, 1.25rem);
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 1.6rem;
}
.synopsis-text .lead {
  font-size: clamp(1.15rem, 1.6vw, 1.4rem);
  font-weight: 700;
}
.synopsis-text em {
  color: var(--rust);
  font-style: italic;
}
.synopsis-text strong {
  color: var(--ink);
  font-weight: 700;
}

.synopsis-aside {
  position: sticky;
  top: 6rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 2rem 1.75rem;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(235, 224, 206, 0.4));
  border: 1px solid var(--line);
  position: relative;
}
.synopsis-aside::before {
  content: '';
  position: absolute;
  top: -1px; right: -1px;
  width: 30px; height: 30px;
  border-top: 2px solid var(--rust);
  border-right: 2px solid var(--rust);
}
.synopsis-aside::after {
  content: '';
  position: absolute;
  bottom: -1px; left: -1px;
  width: 30px; height: 30px;
  border-bottom: 2px solid var(--rust);
  border-left: 2px solid var(--rust);
}
.aside-card {
  padding: 0.75rem 0;
  border-bottom: 1px dashed var(--line);
}
.aside-card:last-child { border-bottom: none; }
.aside-label {
  font-family: var(--f-body);
  font-size: 0.72rem;
  letter-spacing: 0.3em;
  color: var(--mist);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}
.aside-value {
  font-family: var(--f-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

/* ---------- PASSAGES ---------- */
.passages {
  padding: var(--section-y) 0;
  position: relative;
  z-index: 2;
}

.passages-heading {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 4.2rem);
  text-align: center;
  margin-bottom: 1rem;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.passages-sub {
  font-family: var(--f-serif);
  font-style: italic;
  text-align: center;
  font-size: 1.1rem;
  color: var(--mist);
  max-width: 32rem;
  margin: 0 auto 5rem;
  line-height: 1.7;
}

.passage {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(1.5rem, 4vw, 4rem);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 4rem);
  margin: 0 auto clamp(3rem, 5vw, 5rem);
  max-width: 1100px;
  align-items: center;
}

.passage--right {
  background: linear-gradient(135deg, rgba(245, 237, 224, 0.8), rgba(235, 224, 206, 0.6));
  border-right: 3px solid var(--rust);
}
.passage--left {
  background: linear-gradient(225deg, rgba(245, 237, 224, 0.8), rgba(235, 224, 206, 0.6));
  border-left: 3px solid var(--ochre);
  grid-template-columns: 1fr auto;
}
.passage--left .passage-num { order: 2; }
.passage--left .passage-body { order: 1; text-align: left; direction: ltr; }
.passage--left .passage-body * { direction: rtl; }

.passage--dark {
  background:
    radial-gradient(ellipse 80% 50% at 50% 50%, rgba(192, 133, 69, 0.1), transparent 70%),
    var(--ink);
  color: var(--parchment);
  border: none;
  position: relative;
  overflow: hidden;
}
.passage--dark::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.9 0 0 0 0 0.7 0 0 0 0 0.4 0 0 0 0.4 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: 0.06;
  pointer-events: none;
}

.passage--ochre {
  background: linear-gradient(135deg, var(--sand), var(--sand-deep));
  color: var(--ink);
  border: none;
}

.passage-num {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  padding: 1.5rem 0;
}
.passage-num::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -1rem;
  width: 1px;
  height: 60%;
  background: currentColor;
  opacity: 0.25;
  transform: translateY(-50%);
}
.passage--left .passage-num::after {
  right: auto;
  left: -1rem;
}
.passage--dark .passage-num::after,
.passage--ochre .passage-num::after { opacity: 0.4; }

.num-arabic {
  font-family: var(--f-display);
  font-size: clamp(3.5rem, 7vw, 6rem);
  font-weight: 700;
  line-height: 1;
  color: currentColor;
  opacity: 0.85;
}
.num-latin {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.3em;
  color: currentColor;
  opacity: 0.5;
}

.passage-body { position: relative; }

.passage-title-mini {
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.4em;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  opacity: 0.7;
}

.passage-quote {
  font-family: var(--f-serif);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 2;
  font-weight: 400;
  position: relative;
  padding-right: 1.5rem;
}
.passage--dark .passage-quote { color: var(--parchment); }

.quote-mark {
  font-family: var(--f-serif);
  font-size: 5rem;
  line-height: 0.5;
  position: absolute;
  top: 0.5rem;
  right: -0.5rem;
  color: var(--rust);
  opacity: 0.6;
  font-weight: 700;
}
.passage--dark .quote-mark { color: var(--ochre); opacity: 0.8; }
.passage--ochre .quote-mark { color: var(--rust); opacity: 0.7; }
.passage--left .quote-mark {
  right: auto;
  left: -0.5rem;
}

/* ---------- WHY ---------- */
.why {
  padding: var(--section-y) 0;
  position: relative;
  z-index: 2;
}
.why-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.why-card {
  position: relative;
  padding: 2.5rem 2rem 2rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(235, 224, 206, 0.3));
  border: 1px solid var(--line);
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1), border-color 0.5s ease, background 0.5s ease;
  overflow: hidden;
}
.why-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--rust), var(--ochre));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.6s ease;
}
.why-card:hover {
  transform: translateY(-6px);
  border-color: var(--ochre);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(235, 224, 206, 0.4));
}
.why-card:hover::before { transform: scaleX(1); }

.why-icon {
  width: 48px;
  height: 48px;
  color: var(--rust);
  margin-bottom: 1.5rem;
  transition: transform 0.6s ease;
}
.why-icon svg { width: 100%; height: 100%; }
.why-card:hover .why-icon { transform: rotate(-8deg) scale(1.1); }

.why-num {
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--mist);
  margin-bottom: 0.5rem;
}
.why-card h3 {
  font-family: var(--f-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.85rem;
  color: var(--ink);
}
.why-card p {
  font-family: var(--f-serif);
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--ink);
  opacity: 0.85;
}

/* ---------- AUTHOR ---------- */
.author {
  padding: var(--section-y) 0;
  background:
    radial-gradient(ellipse 60% 40% at 80% 20%, rgba(192, 133, 69, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 20% 80%, rgba(139, 58, 31, 0.08), transparent 60%),
    var(--parchment);
  position: relative;
  z-index: 2;
}
.author-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.author-portrait {
  position: relative;
  max-width: 420px;
  margin: 0 auto;
}
.author-portrait img {
  width: 100%;
  aspect-ratio: 4/5;
  object-fit: cover;
  filter: grayscale(0.15) contrast(1.05);
  position: relative;
  z-index: 2;
  box-shadow: 0 30px 60px -10px rgba(26, 20, 16, 0.35);
}
.portrait-frame {
  position: absolute;
  top: 1.5rem;
  right: -1.5rem;
  width: 100%;
  height: 100%;
  border: 1px solid var(--ink);
  z-index: 1;
}
.author-portrait::before {
  content: '';
  position: absolute;
  bottom: -1rem;
  left: -1rem;
  width: 60%;
  height: 60%;
  background: var(--rust);
  z-index: 0;
  opacity: 0.85;
}

.author-name {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4rem);
  line-height: 1.05;
  margin: 1.5rem 0 0.5rem;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.author-name em {
  font-family: var(--f-serif);
  font-style: italic;
  color: var(--rust);
  display: block;
}

.author-tag {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--mist);
  margin-bottom: 2rem;
}

.author-bio p {
  font-family: var(--f-serif);
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--ink);
  margin-bottom: 1.2rem;
}

.author-other {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.other-label {
  font-family: var(--f-body);
  font-size: 0.72rem;
  letter-spacing: 0.4em;
  color: var(--mist);
  margin-bottom: 1rem;
  text-transform: uppercase;
}
.other-book {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.4);
  border: 1px solid var(--line);
  transition: all 0.4s ease;
  max-width: 380px;
}
.other-book:hover {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--ochre);
  transform: translateX(-4px);
}
.other-cover {
  flex: 0 0 70px;
  height: 95px;
  overflow: hidden;
}
.other-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.other-title {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.other-meta {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 0.9rem;
  color: var(--mist);
}

.author-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin-top: 2rem;
  padding: 0.7rem 1.2rem;
  border: 1px solid var(--ink);
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--ink);
  transition: all 0.4s ease;
}
.author-contact svg { width: 18px; height: 18px; }
.author-contact:hover {
  background: var(--ink);
  color: var(--parchment);
}

/* ---------- WHERE ---------- */
.where {
  padding: var(--section-y) 0;
  position: relative;
  z-index: 2;
}
.where-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  max-width: 1000px;
  margin-inline: auto;
}

.where-card {
  position: relative;
  padding: 3rem 2.5rem;
  background: var(--ink);
  color: var(--parchment);
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.where-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 0% 100%, rgba(192, 133, 69, 0.2), transparent 60%);
  opacity: 0.7;
  transition: opacity 0.5s ease;
}
.where-card:hover { transform: translateY(-6px); }
.where-card:hover::before { opacity: 1; }

.where-city {
  position: relative;
  z-index: 2;
  margin-bottom: 1.5rem;
}
.city-arabic {
  display: block;
  font-family: var(--f-display);
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  color: var(--parchment);
  letter-spacing: -0.01em;
}
.city-latin {
  display: block;
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 1rem;
  color: var(--ochre);
  letter-spacing: 0.1em;
  margin-top: 0.4rem;
}

.where-divider {
  width: 50px;
  height: 1px;
  background: var(--ochre);
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.where-detail {
  position: relative;
  z-index: 2;
  margin-bottom: 1.5rem;
}
.detail-label {
  font-family: var(--f-body);
  font-size: 0.78rem;
  letter-spacing: 0.3em;
  color: var(--sand);
  margin-bottom: 0.6rem;
  text-transform: uppercase;
}
.detail-place {
  font-family: var(--f-display);
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--parchment);
  margin-bottom: 0.4rem;
  line-height: 1.4;
}
.detail-date {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--sand);
}

.where-tag {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  font-family: var(--f-body);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--ochre);
  color: var(--ochre);
  text-transform: uppercase;
  z-index: 2;
}

/* ---------- FOOTER ---------- */
.footer {
  background:
    radial-gradient(ellipse 60% 40% at 50% 0%, rgba(139, 58, 31, 0.15), transparent 70%),
    var(--ink);
  color: var(--parchment);
  padding: 5rem 0 2rem;
  position: relative;
  z-index: 2;
  margin-top: 4rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 2fr 1.2fr;
  gap: 3rem;
  padding-bottom: 3.5rem;
  border-bottom: 1px solid rgba(245, 237, 224, 0.12);
  align-items: start;
}
.footer-title {
  font-family: var(--f-display);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.6rem;
}
.footer-sub {
  font-family: var(--f-latin);
  font-style: italic;
  color: var(--ochre);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
}
.footer-quote {
  font-family: var(--f-serif);
  font-style: italic;
  font-size: 1.25rem;
  line-height: 1.8;
  color: var(--sand);
  text-align: center;
  position: relative;
}
.footer-quote::before,
.footer-quote::after {
  content: '✦';
  display: block;
  color: var(--rust);
  font-size: 0.7rem;
  margin: 0.5rem 0;
}
.footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-family: var(--f-latin);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--sand);
  text-align: left;
  direction: ltr;
}
.footer-meta a:hover { color: var(--ochre); }
.footer-isbn {
  font-size: 0.85rem;
  opacity: 0.7;
  letter-spacing: 0.1em;
}

.footer-base {
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--f-body);
  font-size: 0.8rem;
  color: var(--mist);
  letter-spacing: 0.05em;
}

/* ---------- ANIMATIONS ---------- */
@keyframes titleReveal {
  to { transform: translateY(0); }
}
@keyframes fadeIn {
  to { opacity: 1; }
}
@keyframes coverIn {
  to { opacity: 1; }
}
@keyframes scrollLine {
  0%   { transform: translateX(100%); }
  50%  { transform: translateX(0); }
  100% { transform: translateX(-100%); }
}

/* Scroll reveal */
.reveal-up,
.reveal-fade,
.reveal-cover {
  opacity: 0;
  transform: translateY(40px);
  transition:
    opacity 1.1s cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 1.1s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.reveal-fade {
  transform: translateY(20px);
}
.reveal-cover {
  transform: translateY(60px) scale(0.96);
}
.reveal-up.is-visible,
.reveal-fade.is-visible,
.reveal-cover.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Hero reveal lines override (auto-trigger) */
.hero .reveal-fade { opacity: 0; animation: fadeIn 1s ease forwards; }
.hero .hero-sub.reveal-fade { animation-delay: 1.1s; }
.hero .hero-author.reveal-fade { animation-delay: 1.25s; }
.hero .hero-cta.reveal-fade { animation-delay: 1.4s; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 980px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-cover { order: -1; max-width: 280px; margin: 0 auto; }
  .cover-frame { max-width: 280px; }

  .synopsis-grid { grid-template-columns: 1fr; }
  .synopsis-aside { position: static; }

  .author-grid { grid-template-columns: 1fr; }
  .author-portrait { max-width: 320px; }

  .why-grid { grid-template-columns: 1fr; }
  .where-grid { grid-template-columns: 1fr; }

  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }
  .footer-meta { text-align: center; direction: ltr; align-items: center; }
  .footer-base { flex-direction: column; gap: 0.6rem; text-align: center; }

  .nav-links { gap: 1.25rem; }
  .nav-links a { font-size: 0.85rem; }

  .hero-foot { flex-direction: column; gap: 1.5rem; align-items: flex-start; }
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
  .nav-inner { justify-content: center; }
  .nav-mark { font-size: 1rem; }

  .hero { padding-top: 6rem; }
  .title-line { font-size: clamp(2.2rem, 10vw, 3.5rem); }

  .section-heading {
    font-size: clamp(1.8rem, 7vw, 2.5rem);
    margin-bottom: 2.5rem;
  }

  .why-card {
    padding: 2rem 1.5rem 1.75rem;
  }
  .why-icon {
    width: 38px;
    height: 38px;
    margin-bottom: 1rem;
  }
  .why-card h3 { font-size: 1.25rem; }
  .why-card p { font-size: 0.98rem; }

  .passage {
    padding: 2.5rem 1.5rem;
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .passage-num {
    flex-direction: row;
    padding: 0;
    gap: 1rem;
  }
  .passage-num::after { display: none; }
  .passage--left { grid-template-columns: 1fr; }
  .passage--left .passage-num { order: 0; }
  .passage--left .passage-body { order: 0; text-align: right; direction: rtl; }
  .num-arabic { font-size: 3rem; }

  .passage-quote {
    font-size: 1.05rem;
    line-height: 1.85;
    padding-right: 1rem;
  }
  .passage--left .passage-quote { padding-right: 1rem; padding-left: 0; }
  .quote-mark { font-size: 3rem; top: -0.5rem; right: -0.25rem; }
  .passage--left .quote-mark { left: auto; right: -0.25rem; }

  .hero-cta { flex-direction: column; align-items: stretch; }
  .cta-primary, .cta-ghost { justify-content: center; }

  .where-card { padding: 2rem 1.5rem; }
  .city-arabic { font-size: 1.8rem; }

  .author-name { font-size: clamp(2rem, 9vw, 2.8rem); }
  .author-bio p { font-size: 1.05rem; }

  .passages-heading { font-size: clamp(2rem, 9vw, 3rem); }
  .passages-sub { font-size: 0.98rem; margin-bottom: 3.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal-up, .reveal-fade, .reveal-cover {
    opacity: 1;
    transform: none;
  }
}
