/* =========================================================
   مكتبة جليسي — الرئيسية
   مكتبة مغربية فاخرة: أخضر الأرز، ونحاس، وورق، وبرتقالي جليسي
   ========================================================= */
:root {
  --night: #0b1c18;
  --cedar: #0f231e;
  --cedar-2: #163a31;
  --cedar-3: #1f4a3f;
  --brass: #c9a35a;
  --brass-2: #e4c88a;
  --brass-deep: #9c7a36;
  --paper: #f5eddd;
  --paper-2: #ece0c8;
  --paper-3: #dfcfae;
  --ink: #1d1712;
  --ink-soft: #5a4d40;
  --orange: #f39200;
  --wa: #1f7a4d;
  --f-cal: "Aref Ruqaa", "Amiri", serif;
  --f-head: "Amiri", Georgia, serif;
  --f-body: "IBM Plex Sans Arabic", system-ui, sans-serif;
  --wrap: 1240px;
  --r: 18px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --hdr: 76px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hdr); }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--f-body); font-size: 17px; line-height: 1.8;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--f-head); font-weight: 400; line-height: 1.25; }
h2 { font-size: clamp(34px, 4.6vw, 60px); }
h1 em, h2 em { font-style: normal; color: var(--brass); }
.wrap { width: min(var(--wrap), 100% - 48px); margin-inline: auto; }
.muted { color: var(--ink-soft); }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100; background: var(--brass); color: var(--ink); padding: 8px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 6px; }

/* ---------- الزليج: نجمة ثمانية بخطوط نحاسية ---------- */
.zellige {
  position: absolute; inset: 0; pointer-events: none; opacity: .14; z-index: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23c9a35a' stroke-width='1.2'%3E%3Cpath d='M60 18l12 30 30 12-30 12-12 30-12-30-30-12 30-12z'/%3E%3Cpath d='M60 30l21 9 9 21-9 21-21 9-21-9-9-21 9-21z'/%3E%3Cpath d='M0 0l18 18M120 0l-18 18M0 120l18-18M120 120l-18-18'/%3E%3Ccircle cx='60' cy='60' r='6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 20%, transparent 75%);
}
.zellige--soft { opacity: .08; }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 12px 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-weight: 500; font-size: 16px; white-space: nowrap;
  transition: transform .2s var(--ease), background .25s, box-shadow .25s, color .25s;
}
.btn:active { transform: scale(.97); }
.btn--lg { min-height: 58px; padding: 14px 32px; font-size: 18px; }
.btn--gold { background: linear-gradient(180deg, var(--brass-2), var(--brass)); color: var(--ink); box-shadow: 0 10px 30px -10px rgba(201,163,90,.8), inset 0 1px 0 rgba(255,255,255,.5); }
.btn--gold:hover { transform: translateY(-2px); box-shadow: 0 16px 36px -10px rgba(201,163,90,.9), inset 0 1px 0 rgba(255,255,255,.5); }
.btn--line { color: var(--paper); border: 1.5px solid rgba(228,200,138,.5); background: transparent; }
.btn--line:hover { border-color: var(--brass-2); background: rgba(228,200,138,.08); }
.btn--ink { background: var(--ink); color: var(--paper); }
.btn--ink:hover { background: var(--cedar-2); transform: translateY(-2px); }
.btn--wa { background: var(--wa); color: #fff; }
.btn--wa:hover { background: #18663f; transform: translateY(-2px); }
.arr { display: inline-block; transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(-5px); }

/* ---------- الهيدر ---------- */
.hdr { position: fixed; inset: 0 0 auto; z-index: 50; height: var(--hdr); transition: background .35s, box-shadow .35s, color .35s; color: var(--paper); }
.hdr.solid { background: rgba(245,237,221,.94); color: var(--ink); box-shadow: 0 1px 0 rgba(29,23,18,.1); backdrop-filter: saturate(1.2) blur(10px); }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--f-head); font-size: 30px; line-height: 1; }
.brand img { border-radius: 50%; box-shadow: 0 0 0 2px rgba(228,200,138,.5); }
.hdr__nav { display: flex; gap: 4px; margin-inline-start: auto; }
.hdr__nav a { padding: 8px 14px; border-radius: 999px; font-weight: 500; font-size: 15.5px; position: relative; }
.hdr__nav a::after { content: ""; position: absolute; inset-inline: 14px; bottom: 4px; height: 1.5px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .3s var(--ease); }
.hdr__nav a:hover::after { transform: scaleX(1); }

/* ---------- المدخل ---------- */
.hero { position: relative; min-height: 100svh; background: radial-gradient(ellipse at 20% 10%, var(--cedar-3), transparent 55%), radial-gradient(ellipse at 90% 90%, #1a3d33, transparent 60%), var(--cedar); color: var(--paper); overflow: hidden; display: grid; align-items: center; padding: calc(var(--hdr) + 32px) 0 56px; isolation: isolate; }
.hero__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.kicker { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 14.5px; font-weight: 500; color: var(--brass-2); letter-spacing: .2px; }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(243,146,0,.2); }
.kicker--dark { color: var(--brass-deep); }
.hero h1 { font-size: clamp(44px, 6.4vw, 88px); line-height: 1.12; margin-bottom: 22px; text-wrap: balance; }
.hero__lead { font-size: clamp(17px, 1.5vw, 20px); color: #dcd3bf; max-width: 560px; margin: 0 0 32px; }
.hero__cta { display: flex; gap: 14px; flex-wrap: wrap; }
.trust { list-style: none; padding: 0; margin: 36px 0 0; display: flex; gap: 0; flex-wrap: wrap; border-top: 1px solid rgba(228,200,138,.22); padding-top: 22px; }
.trust li { font-size: 14.5px; color: #cfc4ac; padding-inline-end: 22px; margin-inline-end: 22px; border-inline-end: 1px solid rgba(228,200,138,.22); }
.trust li:last-child { border: 0; }
.trust b { display: block; font-family: var(--f-head); font-weight: 400; font-size: 24px; color: var(--paper); line-height: 1.2; }

.hero__art { position: relative; justify-self: center; width: min(460px, 100%); }
/* القوس المغربي (حدوة الفرس) */
.arch {
  position: relative; aspect-ratio: 46 / 62;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 135' preserveAspectRatio='none'%3E%3Cpath d='M6 135V62C-4 28 20 2 50 2s54 26 44 60v73z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 135' preserveAspectRatio='none'%3E%3Cpath d='M6 135V62C-4 28 20 2 50 2s54 26 44 60v73z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.arch img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.04); transition: transform 1.2s var(--ease); }
.hero__art:hover .arch img { transform: scale(1.08); }
.hero__art::before {
  content: ""; position: absolute; inset: -14px -14px 0; z-index: -1;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 135' preserveAspectRatio='none'%3E%3Cpath d='M6 135V62C-4 28 20 2 50 2s54 26 44 60v73z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 135' preserveAspectRatio='none'%3E%3Cpath d='M6 135V62C-4 28 20 2 50 2s54 26 44 60v73z' fill='none' stroke='black' stroke-width='1.4'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  background: linear-gradient(180deg, var(--brass-2), var(--brass-deep));
}
.arch--glow { filter: drop-shadow(0 40px 60px rgba(0,0,0,.45)); }
.float { position: absolute; width: 30%; border-radius: 4px; box-shadow: 0 24px 40px -12px rgba(0,0,0,.6); transition: transform .4s var(--ease); will-change: transform; }
.float--a { inset-inline-end: -16%; top: 16%; rotate: 7deg; }
.float--b { inset-inline-start: -12%; bottom: 14%; rotate: -8deg; width: 25%; }
.hero__seal { position: absolute; inset-inline-start: 50%; bottom: -26px; translate: 50% 0; margin: 0; white-space: nowrap;
  font-family: var(--f-cal); font-size: clamp(20px, 2vw, 28px); color: var(--brass-2);
  background: var(--cedar); padding: 4px 22px; border-radius: 999px; border: 1px solid rgba(228,200,138,.4); }

/* دخول المدخل */
.hero__text > *, .hero__art { animation: rise .9s var(--ease) both; }
.hero__text > :nth-child(2) { animation-delay: .08s; } .hero__text > :nth-child(3) { animation-delay: .16s; }
.hero__text > :nth-child(4) { animation-delay: .24s; } .hero__text > :nth-child(5) { animation-delay: .32s; }
.hero__art { animation-delay: .2s; animation-duration: 1.2s; }
@keyframes rise { from { opacity: 0; transform: translateY(26px); } }

/* ---------- رفّ الأغلفة ---------- */
.shelf { position: relative; background: linear-gradient(var(--cedar), var(--night)); padding: 40px 0 0; overflow: hidden; }
.shelf__track { display: flex; gap: 22px; width: max-content; padding: 0 22px; animation: slide 70s linear infinite; align-items: flex-end; }
.shelf:hover .shelf__track { animation-play-state: paused; }
@keyframes slide { to { transform: translateX(50%); } }
.shelf__track a { display: block; flex: none; width: 118px; transition: transform .35s var(--ease); }
.shelf__track a:nth-child(3n) { width: 104px; } .shelf__track a:nth-child(4n) { width: 128px; }
.shelf__track a:hover { transform: translateY(-14px) rotate(-1.5deg); }
.shelf__track img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 3px; box-shadow: 0 16px 24px -10px rgba(0,0,0,.8); }
.shelf__board { height: 22px; background: linear-gradient(#6b4527, #3f2716); box-shadow: 0 10px 24px rgba(0,0,0,.5), inset 0 2px 0 rgba(255,255,255,.12); }

/* ---------- من مكتبة… ---------- */
.exlib { background: var(--paper); padding: clamp(80px, 11vw, 140px) 0; }
.exlib__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.exlib h2 { margin-bottom: 18px; }
.exlib__text > p { color: var(--ink-soft); font-size: 18px; max-width: 520px; }
.field { display: grid; gap: 6px; margin: 26px 0 14px; max-width: 420px; }
.field span { font-size: 14px; font-weight: 500; color: var(--ink-soft); }
.field input { font-family: var(--f-cal); font-size: 28px; padding: 8px 18px; border-radius: 14px; border: 1.5px solid var(--paper-3); background: #fffaf0; color: var(--ink); }
.field input:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 4px rgba(201,163,90,.2); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 26px; }
.chip { min-height: 44px; padding: 8px 18px; border-radius: 999px; border: 1.5px solid var(--paper-3); background: #fffaf0; cursor: pointer; font-weight: 500; color: var(--ink-soft); transition: all .2s; }
.chip:hover { border-color: var(--brass); }
.chip.on { background: var(--cedar); border-color: var(--cedar); color: var(--paper); }
.exlib__cta { display: flex; gap: 12px; flex-wrap: wrap; }
.exlib__art { position: relative; display: grid; place-items: center; min-height: 520px; }
.exlib__art::before { content: ""; position: absolute; inset: 6% 10%; border-radius: 50%; background: radial-gradient(circle, rgba(201,163,90,.25), transparent 65%); }
.plate { position: relative; z-index: 2; margin: 0; width: min(360px, 82%); aspect-ratio: 3 / 4; padding: 14px;
  background: linear-gradient(160deg, #fffaf0, #f1e5cb); border-radius: 8px; box-shadow: 0 40px 70px -30px rgba(29,23,18,.55), 0 0 0 1px rgba(156,122,54,.3);
  rotate: -3deg; transition: rotate .5s var(--ease); }
.plate:hover { rotate: 0deg; }
.plate__arch { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 6px;
  border: 2px solid var(--brass); outline: 1px solid var(--brass); outline-offset: -8px; border-radius: 48% 48% 6px 6px / 30% 30% 6px 6px; padding: 30px 20px; }
.plate__arch img { width: 58px; height: 58px; border-radius: 50%; margin-bottom: 8px; }
.plate small { font-family: var(--f-head); font-size: 22px; color: var(--brass-deep); }
.plate strong { font-family: var(--f-cal); font-weight: 400; font-size: clamp(40px, 5vw, 64px); line-height: 1.3; color: var(--cedar-2); word-break: break-word; transition: opacity .2s; }
.plate__rule { width: 60%; height: 10px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 10'%3E%3Cpath d='M0 5h50M70 5h50' stroke='%23c9a35a'/%3E%3Cpath d='M60 1l4 4-4 4-4-4z' fill='%23c9a35a'/%3E%3C/svg%3E") center / contain no-repeat; }
.plate em { font-style: normal; font-family: var(--f-head); font-size: 16px; color: var(--ink-soft); }
.exlib__book { position: absolute; z-index: 1; width: 46%; inset-inline-start: 0; bottom: 4%; rotate: 9deg; filter: drop-shadow(0 30px 30px rgba(29,23,18,.35)); transition: opacity .3s; }

/* ---------- أمين المكتبة ---------- */
.libr { position: relative; background: var(--cedar); color: var(--paper); padding: clamp(80px, 11vw, 140px) 0; overflow: hidden; isolation: isolate; }
.libr__grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.libr h2 { margin-bottom: 14px; }
.libr__lead { color: #d3c9b3; font-size: 18px; max-width: 500px; }
.moods { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.mood { min-height: 46px; padding: 9px 20px; border-radius: 999px; border: 1.5px solid rgba(228,200,138,.35); background: rgba(255,255,255,.03); color: var(--paper); cursor: pointer; font-weight: 500; transition: all .2s; }
.mood:hover { border-color: var(--brass-2); }
.mood.on { background: var(--brass); border-color: var(--brass); color: var(--ink); }
.rx { position: relative; background: #fbf5e7; color: var(--ink); border-radius: 6px; padding: 38px 40px 34px; min-height: 420px;
  box-shadow: 0 40px 70px -30px rgba(0,0,0,.7); background-image: repeating-linear-gradient(transparent 0 35px, rgba(63,107,140,.12) 35px 36px); background-position: 0 92px; }
.rx::before { content: ""; position: absolute; inset: 10px; border: 1px solid rgba(156,122,54,.35); border-radius: 3px; pointer-events: none; }
.rx__empty { display: grid; place-items: center; min-height: 340px; font-family: var(--f-head); font-size: 24px; color: var(--ink-soft); text-align: center; }
.rx__head { display: flex; justify-content: space-between; color: var(--ink-soft); font-size: 14px; }
.rx__head b { font-family: var(--f-head); color: var(--cedar-2); font-size: 18px; }
.rx__body { display: grid; grid-template-columns: 1fr 120px; gap: 22px; margin-top: 18px; align-items: start; }
.rx h3 { font-size: 34px; color: var(--cedar-2); }
.rx__why { font-family: var(--f-head); font-size: 21px; line-height: 1.75; margin: 8px 0 0; }
.rx__cover { width: 120px; border-radius: 3px; box-shadow: 0 14px 24px -10px rgba(0,0,0,.45); rotate: 4deg; }
.rx__foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.rx__sign { font-family: var(--f-cal); font-size: 28px; color: var(--brass-deep); }
.stamp { position: absolute; bottom: 92px; inset-inline-end: 44px; border: 3px double #b94a2c; color: #b94a2c; font-family: var(--f-head); font-weight: 400; font-size: 18px; padding: 0 14px; border-radius: 8px; rotate: -10deg; opacity: .8; animation: stamp .45s .25s cubic-bezier(.3,1.6,.6,1) both; }
@keyframes stamp { from { scale: 2.2; opacity: 0; } }
.rx-in { animation: write .55s var(--ease) both; }
@keyframes write { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } }

/* ---------- الخطوات ---------- */
.steps { background: var(--paper-2); padding: clamp(80px, 10vw, 130px) 0; }
.steps h2 { max-width: 760px; }
.steps__list { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; counter-reset: s; }
.steps__list li { position: relative; background: #fbf5e7; border-radius: var(--r); padding: 34px 30px 30px; border: 1px solid var(--paper-3); transition: transform .3s var(--ease), box-shadow .3s; }
.steps__list li:hover { transform: translateY(-4px); box-shadow: 0 24px 40px -24px rgba(29,23,18,.4); }
.num { display: grid; place-items: center; width: 64px; height: 76px; margin-bottom: 18px; font-family: var(--f-head); font-weight: 400; font-size: 38px; color: var(--ink);
  background: linear-gradient(180deg, var(--brass-2), var(--brass)); border-radius: 32px 32px 6px 6px; }
.steps__list h3 { font-size: 28px; margin-bottom: 6px; }
.steps__list p { margin: 0; color: var(--ink-soft); }

/* ---------- أصوات ---------- */
.voices { background: var(--paper); padding: clamp(80px, 10vw, 130px) 0; }
.voices__head { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; }
.rating { margin: 0; color: var(--ink-soft); } .rating b { color: var(--orange); font-size: 22px; }
.notes { margin-top: 48px; columns: 3 300px; column-gap: 22px; }
.note { break-inside: avoid; margin: 0 0 22px; background: #fffaf0; border-radius: 4px; padding: 26px 26px 22px; box-shadow: 0 16px 30px -20px rgba(29,23,18,.4); border-top: 3px solid var(--brass); }
.note:nth-child(odd) { rotate: -.6deg; } .note:nth-child(even) { rotate: .5deg; }
.note p { margin: 0 0 14px; font-family: var(--f-head); font-size: 20px; line-height: 1.75; }
.note figcaption { color: var(--ink-soft); font-size: 14px; font-weight: 500; }
.note .stars { color: var(--orange); letter-spacing: 2px; font-size: 14px; }

/* ---------- الأسئلة ---------- */
.faq { background: var(--paper); padding: 0 0 clamp(80px, 10vw, 130px); }
.faq__grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 60px; border-top: 1px solid var(--paper-3); padding-top: clamp(60px, 8vw, 100px); }
.faq__list details { border-bottom: 1px solid var(--paper-3); padding: 20px 0; }
.faq__list summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--f-head); font-size: 24px; min-height: 44px; align-items: center; }
.faq__list summary::-webkit-details-marker { display: none; }
.faq__list summary::after { content: "+"; color: var(--brass-deep); font-size: 30px; transition: rotate .3s; }
.faq__list details[open] summary::after { rotate: 45deg; }
.faq__list p { margin: 8px 0 0; color: var(--ink-soft); }

/* ---------- الختام ---------- */
.finale { position: relative; background: var(--night); color: var(--paper); padding: clamp(100px, 14vw, 180px) 0; overflow: hidden; isolation: isolate; text-align: center; }
.finale__in { position: relative; z-index: 1; display: grid; justify-items: center; gap: 26px; }
.finale__cal { margin: 0; font-family: var(--f-cal); font-size: clamp(48px, 9vw, 130px); line-height: 1.2; color: var(--brass-2);
  background: linear-gradient(180deg, var(--brass-2), var(--brass-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.finale h2 { font-size: clamp(26px, 3vw, 40px); color: #e8dfca; }

/* ---------- الفوتر ---------- */
.ftr { background: var(--night); color: #bfb39b; border-top: 1px solid rgba(228,200,138,.15); padding: 64px 0 24px; }
.ftr__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 40px; }
.ftr h3 { font-family: var(--f-head); color: var(--paper); font-size: 22px; margin-bottom: 10px; }
.ftr a:not(.brand) { display: flex; align-items: center; min-height: 36px; } .ftr a:hover { color: var(--brass-2); }
.brand--light { color: var(--paper); }
.ftr__legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(228,200,138,.12); font-size: 14px; }

/* ---------- شريط الهاتف ---------- */
.bar { position: fixed; inset: auto 0 0; z-index: 60; display: none; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(11,28,24,.97); color: var(--paper);
  transform: translateY(110%); transition: transform .35s var(--ease); }
.bar.show { transform: none; }
.bar b { display: block; font-family: var(--f-head); font-size: 22px; line-height: 1.1; }
.bar small { color: #bfb39b; font-size: 12.5px; }

/* ظهور عند التمرير */
.rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.in { opacity: 1; transform: none; }

/* =========================================================
   الشاشات الصغيرة
   ========================================================= */
@media (max-width: 1000px) {
  .hdr__nav { display: none; }
  .hdr__cta { margin-inline-start: auto; }
  .hero__grid, .exlib__grid, .libr__grid, .faq__grid { grid-template-columns: 1fr; }
  .hero { padding-top: calc(var(--hdr) + 28px); }
  .hero__art { width: min(360px, 78%); margin: 20px auto 40px; }
  .steps__list { grid-template-columns: 1fr; }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
  .bar { display: flex; }
  .exlib__art { min-height: 440px; }
}
@media (max-width: 560px) {
  :root { --hdr: 64px; }
  .wrap { width: calc(100% - 32px); }
  .brand { font-size: 26px; } .brand img { width: 38px; height: 38px; }
  .hdr__cta { padding: 8px 16px; min-height: 44px; font-size: 14.5px; }
  .hero h1 { font-size: 40px; }
  .hero__cta .btn { width: 100%; }
  .trust li { padding-inline-end: 12px; margin-inline-end: 12px; }
  .trust b { font-size: 20px; }
  .exlib__cta .btn { width: 100%; }
  .rx { padding: 30px 22px; } .rx__body { grid-template-columns: 1fr 84px; } .rx__cover { width: 84px; } .rx h3 { font-size: 28px; }
  .ftr__grid { grid-template-columns: 1fr; }
  body { padding-bottom: 72px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .rv { opacity: 1; transform: none; }
}


/* =========================================================
   v4 — خزانة المدخل، أبواب الأجنحة، ركن المجموعات
   ========================================================= */

/* ---------- خزانة الكتب داخل القوس ---------- */
.case {
  position: relative; aspect-ratio: 46 / 60; isolation: isolate;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 135' preserveAspectRatio='none'%3E%3Cpath d='M6 135V62C-4 28 20 2 50 2s54 26 44 60v73z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 135' preserveAspectRatio='none'%3E%3Cpath d='M6 135V62C-4 28 20 2 50 2s54 26 44 60v73z'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  background:
    radial-gradient(ellipse 70% 45% at 50% 22%, rgba(255,196,110,.28), transparent 70%),
    linear-gradient(90deg, rgba(0,0,0,.45), transparent 18%, transparent 82%, rgba(0,0,0,.45)),
    linear-gradient(180deg, #3a2414, #2a190d 60%, #1c1009);
  display: grid; grid-template-rows: repeat(3, 1fr); padding: 44% 9% 9%;
  box-shadow: inset 0 0 60px rgba(0,0,0,.6);
}
.hero__art { filter: drop-shadow(0 40px 60px rgba(0,0,0,.5)); }
/* الطبلة: زليج نحاسي يذوب نحو الأسفل */
.case__tymp {
  position: absolute; inset: 0 0 58%; z-index: -1; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='60' height='60' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23e4c88a' stroke-width='2'%3E%3Cpath d='M60 18l12 30 30 12-30 12-12 30-12-30-30-12 30-12z'/%3E%3Ccircle cx='60' cy='60' r='7'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 46px 46px;
  -webkit-mask: radial-gradient(ellipse 60% 80% at 50% 0%, #000 30%, transparent 75%);
          mask: radial-gradient(ellipse 60% 80% at 50% 0%, #000 30%, transparent 75%);
}
.case__light { position: absolute; inset: 8% 10% 30%; z-index: -1; background: radial-gradient(ellipse at 50% 12%, rgba(255,214,140,.55), transparent 62%); animation: flick 4.5s ease-in-out infinite; pointer-events: none; }
@keyframes flick { 0%, 100% { opacity: .85; } 40% { opacity: 1; } 55% { opacity: .7; } 70% { opacity: .95; } }
.lantern { position: absolute; top: 0; left: 50%; width: 13%; margin-left: -6.5%; filter: drop-shadow(0 0 18px rgba(255,190,90,.8)); transform-origin: 50% 0; animation: sway 6s ease-in-out infinite; }
@keyframes sway { 0%, 100% { rotate: -2deg; } 50% { rotate: 2deg; } }

.case__row {
  grid-row: auto; position: relative; display: flex; align-items: flex-end; justify-content: center; gap: 3.5%;
  padding: 0 2% 0; transition: transform .5s var(--ease);
}
/* لوح الرف */
.case__row::after {
  content: ""; position: absolute; inset: auto -12% -9px; height: 11px; z-index: 2;
  background: linear-gradient(#7a5030, #4a2c17); border-top: 1.5px solid rgba(228,200,138,.55);
  box-shadow: 0 10px 18px rgba(0,0,0,.55);
}
.bk { position: relative; display: block; flex: 0 0 17%; aspect-ratio: 7 / 10; overflow: hidden; border-radius: 2px 4px 4px 2px; box-shadow: 4px 8px 14px rgba(0,0,0,.55), inset 3px 0 0 rgba(255,255,255,.12); transition: transform .35s var(--ease), box-shadow .35s; transform-origin: 50% 100%; }
.bk::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(0,0,0,.25), transparent 12%, transparent 85%, rgba(255,255,255,.08)); pointer-events: none; }
.bk img { width: 100%; height: 100%; object-fit: cover; }
.bk--l { rotate: -6deg; } .bk--r { rotate: 5deg; }
.bk:hover, .bk:focus-visible { transform: translateY(-10px) scale(1.06); box-shadow: 6px 18px 24px rgba(0,0,0,.6); z-index: 3; }
.bk-stack { flex: 0 0 15%; display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; align-self: flex-end; }
.bk-stack i { display: block; height: 11px; border-radius: 2px; background: linear-gradient(180deg, color-mix(in srgb, var(--c) 85%, #fff), var(--c)); box-shadow: 0 2px 3px rgba(0,0,0,.4); }
.bk-stack i:nth-child(2) { margin-inline: 6% -4%; } .bk-stack i:nth-child(3) { margin-inline: -3% 8%; }

/* الوسام */
.medal {
  position: absolute; inset-inline-end: -9%; top: 30%; z-index: 3; width: 108px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-content: center; text-align: center; line-height: 1.05; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff1c9, var(--brass-2) 35%, var(--brass) 70%, var(--brass-deep));
  box-shadow: 0 18px 30px -10px rgba(0,0,0,.6), inset 0 0 0 4px rgba(255,255,255,.25), inset 0 0 0 6px rgba(156,122,54,.6);
  rotate: 10deg; transition: rotate .4s var(--ease), transform .4s var(--ease);
}
.medal:hover { rotate: 0deg; transform: scale(1.06); }
.medal b { font-family: var(--f-head); font-size: 38px; font-weight: 400; }
.medal span { font-size: 13px; font-weight: 500; }
.medal small { font-size: 11px; margin-top: 4px; color: #4a3a22; }

/* ---------- رأس الأقسام ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: clamp(30px, 4vw, 50px); }
.sec-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; color: var(--brass-deep); border-bottom: 1.5px solid currentColor; padding-bottom: 2px; }
.sec-link:hover .arr { transform: translateX(-5px); }
.sec-head--light .sec-link { color: var(--brass-2); }


/* ---------- أبواب الأجنحة ---------- */
.wings { position: relative; background: radial-gradient(ellipse at 50% 0%, #fbf5e8, var(--paper) 60%); padding: clamp(80px, 10vw, 130px) 0 clamp(70px, 9vw, 110px); }
.doors {
  width: min(var(--wrap), 100% - 48px); margin-inline: auto;
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 26px 16px; padding-top: 10px;
}
.door {
  position: relative; display: flex; flex-direction: column; align-items: center; text-align: center;
  padding: 20px 10px 18px; min-height: 270px; justify-content: flex-end; color: var(--paper);
  border-radius: 50% 50% 10px 10px / 30% 30% 10px 10px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.16), transparent 60%),
    linear-gradient(180deg, var(--tone), color-mix(in srgb, var(--tone) 55%, #000));
  box-shadow: 0 0 0 1.5px rgba(201,163,90,.55), 0 0 0 6px var(--paper), 0 0 0 7px rgba(201,163,90,.35), 0 26px 34px -22px rgba(29,23,18,.7);
  transition: transform .4s var(--ease), box-shadow .4s;
}
.door::before { /* زليج خفيف */
  content: ""; position: absolute; inset: 0; border-radius: inherit; opacity: .13; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 120 120'%3E%3Cpath d='M60 18l12 30 30 12-30 12-12 30-12-30-30-12 30-12z' fill='none' stroke='%23fff' stroke-width='3'/%3E%3C/svg%3E");
  background-size: 34px;
}
.door__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; z-index: 0; transition: transform 1.2s var(--ease), filter .5s; filter: saturate(.9); }
.door { overflow: hidden; isolation: isolate; }
.door::before { z-index: 1; opacity: 1; background-image: none;
  background: linear-gradient(180deg, rgba(0,0,0,.05) 25%, color-mix(in srgb, var(--tone) 55%, transparent) 55%, color-mix(in srgb, var(--tone) 50%, #000) 100%); }
.door > :not(.door__img) { z-index: 2; }
.door:hover { transform: translateY(-8px); box-shadow: 0 0 0 1.5px var(--brass-2), 0 0 0 6px var(--paper), 0 0 0 7px var(--brass), 0 34px 40px -22px rgba(29,23,18,.8); }
.door:hover .door__img { transform: scale(1.08); filter: saturate(1.05); }
.door__seal {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; margin: 0 0 10px;
  font-family: var(--f-cal); font-size: 22px; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff1c9, var(--brass-2) 45%, var(--brass-deep));
  box-shadow: 0 4px 10px rgba(0,0,0,.35);
}
.door b { position: relative; font-family: var(--f-head); font-weight: 400; font-size: 19px; line-height: 1.3; text-wrap: balance; text-shadow: 0 2px 10px rgba(0,0,0,.6); }
.door small { position: relative; padding-top: 6px; font-size: 13px; color: #e5d7b8; }
.door::after { z-index: 2; /* المقبض */
  content: ""; position: absolute; bottom: 46%; inset-inline-start: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--brass-2); opacity: .7;
}

/* ---------- ركن المجموعات ---------- */
.colls { position: relative; overflow: hidden; color: var(--paper); padding: clamp(80px, 10vw, 130px) 0;
  background: radial-gradient(ellipse at 80% 0%, var(--cedar-3), transparent 55%), radial-gradient(ellipse at 10% 100%, #1a3d33, transparent 60%), var(--cedar); }
.colls .wrap { position: relative; z-index: 1; }
.colls__grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 26px; align-items: stretch; }
.coll {
  display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: linear-gradient(180deg, rgba(245,237,221,.07), rgba(245,237,221,.03));
  border: 1px solid rgba(228,200,138,.22); transition: transform .4s var(--ease), border-color .4s;
}
.coll:hover { transform: translateY(-6px); border-color: rgba(228,200,138,.6); }
.coll__img { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0b1c18; }
.coll--wide .coll__img { aspect-ratio: 16 / 11; }
.coll__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.coll:hover .coll__img img { transform: scale(1.05); }
.coll__badge {
  position: absolute; top: 16px; inset-inline-start: 16px; display: grid; place-content: center; text-align: center;
  width: 74px; height: 74px; border-radius: 50%; font-size: 12px; line-height: 1.1; color: var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff1c9, var(--brass-2) 40%, var(--brass) 75%);
  box-shadow: 0 10px 20px -6px rgba(0,0,0,.6), inset 0 0 0 3px rgba(156,122,54,.5);
}
.coll__badge b { font-family: var(--f-head); font-size: 28px; font-weight: 400; }
.coll__star { position: absolute; bottom: 14px; inset-inline-end: 14px; background: rgba(11,28,24,.82); color: var(--brass-2); padding: 4px 12px; border-radius: 999px; font-size: 13px; backdrop-filter: blur(6px); }
.coll__body { display: flex; flex-direction: column; flex: 1; padding: 24px 26px 26px; }
.coll__k { font-size: 13.5px; color: var(--brass-2); font-weight: 500; }
.coll h3 { font-size: clamp(26px, 2.4vw, 34px); margin: 6px 0 10px; }
.coll h3 a:hover { color: var(--brass-2); }
.coll p { margin: 0 0 14px; color: #d3c9b2; font-size: 16px; }
.coll ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 6px; font-size: 15px; color: #e8dfca; }
.coll li { position: relative; padding-inline-start: 20px; }
.coll li::before { content: "✦"; position: absolute; inset-inline-start: 0; color: var(--brass); font-size: 11px; top: 5px; }
.coll__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 18px; border-top: 1px dashed rgba(228,200,138,.3); }
.coll__price { font-size: 15px; color: #e8dfca; }
.coll__price b { font-family: var(--f-head); font-weight: 400; font-size: 38px; color: var(--paper); line-height: 1; }
.coll__price small { display: block; font-size: 12.5px; color: #b9ae96; margin-top: 4px; }

/* ---------- الشاشات ---------- */
@media (max-width: 1100px) {
  .doors {
    width: auto; grid-template-columns: none; grid-auto-flow: column; grid-template-rows: auto auto; grid-auto-columns: 168px;
    overflow-x: auto; scroll-snap-type: x mandatory; padding: 12px 24px 18px; scrollbar-width: none;
  }
  .doors::-webkit-scrollbar { display: none; }
  .door { scroll-snap-align: start; }
}
@media (max-width: 1000px) {
  .hero__art { width: min(380px, 84%); margin: 26px auto 46px; }
  .medal { inset-inline-end: -12%; width: 92px; }
  .medal b { font-size: 32px; }
  .colls__grid { grid-template-columns: 1fr; max-width: 560px; margin-inline: auto; }
  .coll--wide .coll__img { aspect-ratio: 4 / 3; }
}
@media (max-width: 560px) {
  .doors { grid-auto-columns: 148px; padding-inline: 16px; gap: 30px 12px; }
  .door { min-height: 236px; }
  .door b { font-size: 17px; }
  .medal { inset-inline-end: -6%; top: 22%; width: 80px; }
  .medal b { font-size: 28px; } .medal small { display: none; }
  .coll__body { padding: 20px; }
  .coll__foot { flex-wrap: wrap; } .coll__foot .btn { flex: 1; }
}
