:root {
  --sand: #D6C7A4;      /* the wall behind the rider on the Talbat cover */
  --sand-deep: #CBB98F;
  --ink: #24190F;
  --ink-soft: #4A3B2C;
  --box: #C4481F;       /* the delivery box */
  --box-dark: #9E3615;
  --asphalt: #1F2629;   /* night street */
  --asphalt-soft: #2B3437;
  --brass: #D2A24C;     /* box latches */
  --paper: #FBF7EE;

  --display: "Lalezar", "Noto Naskh Arabic", system-ui, sans-serif;
  --text: "Literata", "Noto Naskh Arabic", Georgia, serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--sand);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-optical-sizing: auto;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--box); outline-offset: 3px; border-radius: 2px; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--ink); color: var(--paper); padding: 8px 14px; z-index: 10;
}
.skip:focus { left: 8px; }

/* Arabic runs */
[lang="ar"] { font-family: "Noto Naskh Arabic", var(--text); line-height: 1.95; }
h1 [lang="ar"], h2 [lang="ar"], h3[lang="ar"] { font-family: var(--display); line-height: 1.3; }

h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.1; }
h2 { font-size: clamp(2.25rem, 5vw, 3.25rem); margin-bottom: 0.6em; }

/* ---------- header ---------- */
.top { padding-block: 18px; }
.top-inner { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.wordmark { font-family: var(--display); font-size: 1.5rem; text-decoration: none; }
.top nav { display: flex; gap: clamp(14px, 3vw, 28px); flex-wrap: wrap; }
.top nav a { text-decoration: none; font-size: 1rem; }
.top nav a:hover { text-decoration: underline; }

/* ---------- hero ---------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding-top: clamp(16px, 4vw, 48px);
  padding-bottom: clamp(56px, 8vw, 104px);
}

.box {
  position: relative;
  background:
    radial-gradient(120% 90% at 30% 20%, rgba(255,255,255,.10), transparent 60%),
    radial-gradient(80% 60% at 85% 95%, rgba(0,0,0,.18), transparent 70%),
    var(--box);
  color: var(--paper);
  border-radius: 6px;
  aspect-ratio: 1 / 0.92;
  display: grid;
  place-items: center;
  padding: 12% 8% 10%;
  box-shadow:
    inset 0 0 0 2px rgba(0,0,0,.12),
    inset 0 14px 0 -8px rgba(255,255,255,.08),
    0 26px 40px -24px rgba(36,25,15,.55);
  animation: arrive .9s cubic-bezier(.2,.8,.2,1) both;
}
/* lid seam */
.box::before {
  content: ""; position: absolute; left: 0; right: 0; top: 13%;
  height: 2px; background: rgba(0,0,0,.18);
  box-shadow: 0 1px 0 rgba(255,255,255,.12);
}
.latch {
  position: absolute; top: 5%; width: 5.5%; height: 15%;
  background: linear-gradient(90deg, #8C6A2E, var(--brass) 45%, #8C6A2E);
  border-radius: 3px;
  box-shadow: 0 2px 3px rgba(0,0,0,.35);
}
.latch::after {
  content: ""; position: absolute; left: 50%; bottom: 14%;
  width: 46%; aspect-ratio: 1; transform: translateX(-50%);
  border-radius: 50%; background: #6E5223;
}
.latch-l { left: 22%; }
.latch-r { right: 22%; }

.box h1 { text-align: center; }
.name-ar {
  display: block;
  font-size: clamp(4.5rem, 13vw, 9.5rem);
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(0,0,0,.12);
}
.name-en {
  display: block;
  margin-top: .35em;
  font-family: var(--text);
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  font-weight: 400;
  font-style: italic;
  opacity: .92;
}

@keyframes arrive {
  from { transform: translateY(18px) rotate(-1.2deg); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .box { animation: none; } }

.intro { max-width: 34rem; }
.intro p { margin: 0 0 1em; }
.lede {
  font-family: var(--display);
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  line-height: 1.2;
  margin-bottom: .8em !important;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.6em; }

.btn {
  display: inline-block;
  background: var(--ink); color: var(--paper);
  padding: .7em 1.25em; border-radius: 4px;
  text-decoration: none; font-weight: 600; font-size: 1rem; line-height: 1.2;
}
.btn:hover { background: var(--box-dark); }
.btn-quiet { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--paper); }

/* ---------- books ---------- */
.books { padding-bottom: clamp(56px, 8vw, 96px); }

.book {
  display: grid;
  grid-template-columns: minmax(150px, 280px) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 56px);
  padding-block: clamp(28px, 4vw, 48px);
  border-top: 1.5px solid rgba(36,25,15,.22);
}
.book:last-child { border-bottom: 1.5px solid rgba(36,25,15,.22); }
.cover {
  width: 100%;
  border-radius: 3px;
  box-shadow: 0 1px 0 rgba(0,0,0,.08), 0 18px 30px -18px rgba(36,25,15,.6);
  align-self: start;
}
.book-body { max-width: 40rem; }
.book h3 { font-size: clamp(2rem, 4.2vw, 2.9rem); text-align: right; }
.book-en { margin: .25em 0 1.1em; color: var(--ink-soft); text-align: right; }
.ar p { margin: 0 0 .9em; font-size: 1.12rem; }
.buy {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 14px 18px;
  margin-top: 1.3em;
}
.price { font-family: var(--display); font-size: 1.6rem; line-height: 1; }
.text-link { font-size: .98rem; }
.soon {
  font-family: var(--display); font-size: 1.35rem;
  background: var(--ink); color: var(--brass);
  padding: .3em .8em .2em; border-radius: 4px;
}

/* ---------- reviews ---------- */
.reviews {
  background: var(--box);
  color: var(--paper);
  padding-block: clamp(56px, 8vw, 104px);
}
.reviews h2 { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2em 1em; }
.reviews h2 [lang="ar"] { font-size: .8em; opacity: .85; }
.quotes {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
  direction: rtl;       /* Arabic reading order: first review on the right */
}
.quote { margin: 0; position: relative; }
.quote figcaption { direction: ltr; }
.quote:first-child { grid-row: span 2; }
.quote blockquote { margin: 0; position: relative; padding-top: 2.4rem; }
.quote blockquote::before {
  content: "”";
  position: absolute; top: -.55rem; right: 0;
  font-family: var(--display); font-size: 5rem; line-height: 1;
  color: var(--ink); opacity: .55;
}
.quote p { margin: 0 0 .8em; font-size: 1.1rem; }
.quote:first-child p { font-size: 1.2rem; }
.quote figcaption { font-size: .98rem; text-align: right; opacity: .95; }
.quote figcaption a { color: var(--paper); }
.reviews :focus-visible { outline-color: var(--paper); }

/* ---------- events ---------- */
.events {
  background: var(--asphalt);
  color: #E9E2D3;
  padding-block: clamp(56px, 8vw, 104px);
}
.events h2 { color: var(--paper); }
.event-title {
  font-size: clamp(1.4rem, 2.6vw, 1.8rem);
  color: var(--brass);
  margin: 0 0 1em;
}
.photos {
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 14px;
  margin-bottom: clamp(48px, 7vw, 80px);
}
.ph { margin: 0; }
.ph img { width: 100%; height: clamp(280px, 32vw, 430px); object-fit: cover; border-radius: 3px; }
.ph-c img { object-position: 50% 70%; }
.ph figcaption { font-size: .9rem; margin-top: .5em; color: #BDB4A3; }

.videos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.video { margin: 0; }
.video iframe, .yt {
  width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 3px; display: block;
}
.yt {
  position: relative; padding: 0; cursor: pointer; overflow: hidden;
  background: #000;
}
.yt img { width: 100%; height: 100%; object-fit: cover; opacity: .85; transition: opacity .2s; }
.yt:hover img { opacity: 1; }
.play {
  position: absolute; left: 50%; top: 50%;
  width: 64px; height: 46px; transform: translate(-50%, -50%);
  background: var(--box); border-radius: 10px;
}
.play::after {
  content: ""; position: absolute; left: 52%; top: 50%; transform: translate(-40%, -50%);
  border-left: 18px solid var(--paper); border-top: 11px solid transparent; border-bottom: 11px solid transparent;
}
.video figcaption { font-size: .98rem; margin-top: .6em; }
.events :focus-visible { outline-color: var(--brass); }

/* ---------- contact ---------- */
.contact { padding-block: clamp(56px, 8vw, 104px); }
.contact p { margin: 0 0 .4em; }
.email {
  font-family: var(--display);
  font-size: clamp(1.7rem, 5.2vw, 3rem);
  line-height: 1.2;
  margin: .2em 0 .9em !important;
  overflow-wrap: anywhere;
}
.email a { text-decoration-color: var(--box); text-decoration-thickness: 3px; text-underline-offset: 8px; }
.email a:hover { color: var(--box-dark); }
.social { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.social a {
  display: inline-block; text-decoration: none;
  padding: .45em .95em; border-radius: 999px;
  box-shadow: inset 0 0 0 1.5px rgba(36,25,15,.45);
  font-size: .98rem;
}
.social a:hover { background: var(--ink); color: var(--paper); box-shadow: none; }

.foot { padding-block: 28px; border-top: 1.5px solid rgba(36,25,15,.22); font-size: .9rem; color: var(--ink-soft); }
.foot p { margin: 0; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .box { max-width: 520px; width: 100%; justify-self: center; }
  .quotes { grid-template-columns: 1fr; }
  .quote:first-child { grid-row: auto; }
  .videos { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 640px) {
  .top nav { width: 100%; justify-content: space-between; gap: 8px; }
  .book { grid-template-columns: 1fr; }
  .cover { max-width: 240px; justify-self: center; }
  .book h3, .book-en { text-align: center; }
  .buy { justify-content: center; }
  .photos { grid-template-columns: 1fr 1fr; }
  .ph img { height: 230px; }
  .ph-b { grid-column: 1 / -1; order: -1; }
  .ph-b img { height: auto; aspect-ratio: 4 / 3; }
}
