/* Safaa Mahmoud book site — v1.1.0 — SSS (info@sss-me.com) */

:root {
  color-scheme: light dark;
  --paper: #F3EBDA;
  --marble: #E8DCC4;
  --card: #FBF7EE;
  --ink: #3E2B1D;
  --ink-soft: #6B5440;
  --gold: #9C7833;
  --gold-hi: #C4A158;
  --band: #3B2A1C;
  --band-ink: #F3EBDA;
  --band-soft: #D9C8A6;
  --rule: rgba(156, 120, 51, .45);
  --shadow: 0 18px 40px -18px rgba(62, 43, 29, .45);
  --glow: rgba(255, 241, 208, .95);
  --glow-text: rgba(196, 161, 88, .55);
  --pattern-o: .075;

  --f-display: "Aref Ruqaa", "Amiri", "Traditional Arabic", "Times New Roman", serif;
  --f-body: "Amiri", "Traditional Arabic", "Noto Naskh Arabic", "Times New Roman", serif;

  --wrap: 68rem;
  --topbar-h: 3.75rem;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #141A2B;
    --marble: #1A2236;
    --card: #1E2740;
    --ink: #EFE4CC;
    --ink-soft: #C4B597;
    --gold: #CDA95E;
    --gold-hi: #E2C47E;
    --band: #0D1220;
    --band-ink: #EFE4CC;
    --band-soft: #BFAF90;
    --rule: rgba(205, 169, 94, .4);
    --shadow: 0 18px 44px -16px rgba(0, 0, 0, .7);
    --glow: rgba(226, 196, 126, .30);
    --glow-text: rgba(226, 196, 126, .45);
    --pattern-o: .06;
  }
}
:root[data-theme="dark"] {
  --paper: #141A2B;
  --marble: #1A2236;
  --card: #1E2740;
  --ink: #EFE4CC;
  --ink-soft: #C4B597;
  --gold: #CDA95E;
  --gold-hi: #E2C47E;
  --band: #0D1220;
  --band-ink: #EFE4CC;
  --band-soft: #BFAF90;
  --rule: rgba(205, 169, 94, .4);
  --shadow: 0 18px 44px -16px rgba(0, 0, 0, .7);
  --glow: rgba(226, 196, 126, .30);
  --glow-text: rgba(226, 196, 126, .45);
  --pattern-o: .06;
}

*, *::before, *::after { box-sizing: inherit; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(env(safe-area-inset-top, 0px) + var(--topbar-h) + .5rem);
  -webkit-text-size-adjust: 100%;
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

html { background: var(--paper); }
body {
  margin: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.1875rem;
  line-height: 1.95;
  text-rendering: optimizeLegibility;
}

/* safe-area strip above the sticky header */
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 10;
  background: var(--paper);
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, figure, blockquote, ol, ul, dl, dd { margin: 0; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

.skip {
  position: absolute;
  inset-inline-start: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: .5rem 1rem;
  z-index: 20;
}
.skip:focus { top: calc(env(safe-area-inset-top, 0px) + .5rem); }

.wrap {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
}

.h2 {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.2vw, 2.6rem);
  line-height: 1.35;
  color: var(--ink);
  margin-bottom: 1.25rem;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--f-body);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.4;
  text-decoration: none;
  padding: .8rem 1.6rem;
  border-radius: 2px;
  border: 1px solid var(--gold);
  transition: background-color .2s, color .2s;
}
.btn--solid { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn--solid:hover { background: var(--gold); border-color: var(--gold); color: var(--paper); }
.btn--line { color: var(--ink); background: transparent; }
.btn--line:hover { background: var(--card); }
.btn--gold { background: var(--gold-hi); color: #2A1D12; border-color: var(--gold-hi); }
.btn--gold:hover { background: var(--band-ink); border-color: var(--band-ink); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 15;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.topbar__inner {
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.5rem;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.nav { display: flex; gap: 1.6rem; }
.nav a {
  text-decoration: none;
  font-size: 1.02rem;
  color: var(--ink-soft);
  padding-block: .25rem;
  border-bottom: 1px solid transparent;
}
.nav a:hover { color: var(--ink); border-bottom-color: var(--gold); }

.navtoggle {
  display: none;
  align-items: center;
  gap: .55rem;
  background: none;
  border: 1px solid var(--rule);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  padding: .3rem .8rem;
  border-radius: 2px;
  cursor: pointer;
}
.navtoggle__bars,
.navtoggle__bars::before,
.navtoggle__bars::after {
  display: block;
  width: 1.05rem;
  height: 1.5px;
  background: currentColor;
  position: relative;
}
.navtoggle__bars::before,
.navtoggle__bars::after { content: ""; position: absolute; inset-inline: 0; }
.navtoggle__bars::before { top: -5px; }
.navtoggle__bars::after { top: 5px; }

@media (max-width: 860px) {
  .navtoggle { display: inline-flex; }
  .nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: .5rem 1.25rem 1rem;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--rule); font-size: 1.1rem; }
  .nav a:last-child { border-bottom: 0; }
}

/* ---------- hero ---------- */
.hero {
  padding: clamp(1.5rem, 4vw, 3.5rem) 0 clamp(2.5rem, 6vw, 5rem);
  background:
    radial-gradient(60rem 30rem at 85% 0%, color-mix(in srgb, var(--card) 80%, transparent), transparent 70%),
    radial-gradient(40rem 26rem at 10% 70%, color-mix(in srgb, var(--marble) 90%, transparent), transparent 70%);
  position: relative;
  overflow: hidden;
}
.hero__frame {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--wrap));
  margin-inline: auto;
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
  /* the double gold frame from the printed invitations */
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: -9px;
}
.hero__frame::before,
.hero__frame::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--gold);
  transform: rotate(45deg);
}
.hero__frame::before { top: -7px; inset-inline-start: calc(50% - 7px); }
.hero__frame::after { bottom: -7px; inset-inline-start: calc(50% - 7px); }

.hero__by {
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: .5rem;
}
.hero__title {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(3.4rem, 10.5vw, 7.4rem);
  line-height: 1.06;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 1.2rem;
}
/* staggered lines, echoing the cover calligraphy */
.hero__title .l { display: block; }
.hero__title .l1 { margin-inline-start: .15em; }
.hero__title .l2 { margin-inline-start: 0; }
.hero__title .l3 { margin-inline-start: 1.05em; }
.hero__title .l4 { margin-inline-start: .45em; }

.hero__sub {
  font-size: clamp(1.25rem, 2.6vw, 1.55rem);
  font-weight: 700;
  color: var(--gold);
  padding-bottom: .9rem;
  margin-bottom: .9rem;
  border-bottom: 1px solid var(--rule);
  max-width: 26rem;
}
.hero__lede {
  max-width: 30rem;
  color: var(--ink-soft);
  font-size: 1.2rem;
  margin-bottom: 1.8rem;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; }

.hero__cover {
  justify-self: center;
  max-width: 23rem;
  width: 100%;
}
.hero__cover img {
  position: relative;
  z-index: 2;
  width: 100%;
  border-radius: 2px 6px 6px 2px;
  box-shadow: var(--shadow);
}

/* one orchestrated entrance: title lines arrive in order */
@media (prefers-reduced-motion: no-preference) {
  .js .hero__title .l {
    opacity: 0;
    transform: translateY(.18em);
    animation: line-in .9s cubic-bezier(.2, .7, .2, 1) forwards;
  }
  .js .hero__title .l1 { animation-delay: .10s; }
  .js .hero__title .l2 { animation-delay: .32s; }
  .js .hero__title .l3 { animation-delay: .54s; }
  .js .hero__title .l4 { animation-delay: .76s; }
}
@keyframes line-in { to { opacity: 1; transform: none; } }

@media (max-width: 760px) {
  .hero__frame { grid-template-columns: 1fr; text-align: start; }
  .hero__cover { max-width: 17rem; order: -1; }
}

/* ---------- fair band ---------- */
.fair {
  background: var(--band);
  color: var(--band-ink);
  padding: clamp(3rem, 7vw, 5rem) 0;
  text-align: center;
}
.fair__h {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(1.8rem, 4.6vw, 2.8rem);
  line-height: 1.35;
  max-width: 40rem;
  margin-inline: auto;
}
.fair__edition { color: var(--gold-hi); font-size: 1.2rem; margin-top: .3rem; }

.fair__facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 2.2rem auto;
  max-width: 52rem;
  border-block: 1px solid rgba(226, 196, 126, .35);
}
.fact { padding: 1.1rem 1rem; }
.fact + .fact { border-inline-start: 1px solid rgba(226, 196, 126, .35); }
.fact dt { color: var(--band-soft); font-size: 1rem; }
.fact dd { font-size: 1.3rem; font-weight: 700; line-height: 1.5; }
@media (max-width: 640px) {
  .fair__facts { grid-template-columns: 1fr; }
  .fact + .fact { border-inline-start: 0; border-top: 1px solid rgba(226, 196, 126, .35); }
}

.fair__count {
  font-size: 1.25rem;
  color: var(--gold-hi);
  margin-bottom: 1.6rem;
  min-height: 1.95em;
}
.fair__count strong { font-size: 1.6rem; color: var(--band-ink); }
.fair__invite {
  font-family: var(--f-display);
  font-size: 1.6rem;
  color: var(--band-soft);
  margin-top: 2rem;
}

/* ---------- book ---------- */
.book { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.book__grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
.book__text p { max-width: 36rem; margin-bottom: 1.1rem; }
.book__meta { color: var(--gold); font-weight: 700; }
.book__photo img { border-radius: 3px; box-shadow: var(--shadow); }
@media (max-width: 760px) { .book__grid { grid-template-columns: 1fr; } }

/* ---------- contents ---------- */
.contents { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.toc {
  max-width: 40rem;
  margin-inline: auto;
  background: var(--card);
  padding: clamp(1.8rem, 5vw, 3rem);
  border: 1px solid var(--rule);
  outline: 1px solid var(--rule);
  outline-offset: -8px;
}
.toc__h { text-align: center; }
.toc__list { list-style: none; padding: 0; }
.toc__list li {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding-block: .35rem;
  font-size: 1.2rem;
}
.toc__list li::after {
  content: "";
  order: 1;
  flex: 1;
  border-bottom: 1px dotted var(--gold);
  transform: translateY(-.35em);
  min-width: 1.5rem;
}
.toc__t { order: 0; }
.toc__p { order: 2; color: var(--gold); font-weight: 700; min-width: 1.8rem; text-align: end; }

/* ---------- excerpt ---------- */
.excerpt {
  background: var(--marble);
  padding: clamp(3.5rem, 8vw, 6rem) 0;
  text-align: center;
}
.excerpt__h { font-size: clamp(1.5rem, 3.4vw, 2rem); color: var(--gold); }
.excerpt__q {
  max-width: 44rem;
  margin-inline: auto;
  position: relative;
  padding-top: 2.6rem;
}
.excerpt__q::before {
  content: "”";
  position: absolute;
  top: -.4rem;
  inset-inline: 0;
  font-family: var(--f-body);
  font-size: 4.5rem;
  line-height: 1;
  color: var(--gold);
}
.excerpt__q p {
  font-size: clamp(1.3rem, 2.8vw, 1.65rem);
  line-height: 2.05;
}

/* ---------- author ---------- */
.author { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.author__inner { max-width: 40rem; text-align: center; }
.author__name {
  font-family: var(--f-display);
  font-size: 2rem;
  color: var(--gold);
  line-height: 1.4;
  margin: -.5rem 0 .4rem;
}

/* ---------- where ---------- */
.where { padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.where .wrap { max-width: 44rem; }
.where__primary {
  background: var(--card);
  border-inline-start: 3px solid var(--gold);
  padding: 1.4rem 1.6rem;
  margin-bottom: 2rem;
}
.where__primary h3, .where__sub {
  font-size: 1.35rem;
  line-height: 1.5;
  margin-bottom: .3rem;
}
.where__booth { color: var(--gold); font-weight: 700; }
.stores { list-style: none; padding: 0; }
.stores li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 1rem;
  padding: .8rem 0;
  border-bottom: 1px solid var(--rule);
}
.store__name { font-weight: 700; }
.store__city { grid-column: 1; color: var(--ink-soft); font-size: 1.05rem; }
.store__map { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--gold); }
.stores:empty { display: none; }
.where__empty { color: var(--ink-soft); }
.where__empty a { color: var(--gold); }

/* ---------- follow ---------- */
.follow {
  border-top: 1px solid var(--rule);
  padding: clamp(3rem, 7vw, 4.5rem) 0;
  text-align: center;
}
.social {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  max-width: 52rem;
  margin-inline: auto;
}
.social li + li { border-inline-start: 1px solid var(--rule); }
.social a {
  display: flex;
  flex-direction: column;
  padding: .8rem .5rem;
  text-decoration: none;
}
.social a:hover .social__n { color: var(--gold); }
.social__n { font-weight: 700; font-size: 1.15rem; }
.social__h { color: var(--ink-soft); font-size: .98rem; font-family: var(--f-body); }
@media (max-width: 640px) {
  .social { grid-template-columns: 1fr 1fr; }
  .social li + li { border-inline-start: 0; }
  .social li:nth-child(even) { border-inline-start: 1px solid var(--rule); }
  .social li:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

/* ---------- footer ---------- */
.foot {
  background: var(--band);
  color: var(--band-soft);
  text-align: center;
  padding: 2rem 0;
  font-size: 1rem;
}
.foot__title {
  font-family: var(--f-display);
  font-size: 1.5rem;
  color: var(--band-ink);
}

/* =====================================================================
   v1.1.0 — spiritual layer: geometric pattern, mihrab niche, lanterns,
   light motes, the verse, night sky. All motion stops under
   prefers-reduced-motion.
   ===================================================================== */

/* faint eight-pointed-star lattice behind the whole page */
.bgpattern {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--gold);
  opacity: var(--pattern-o);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M18 18H62V62H18Z M40 9L71 40L40 71L9 40Z'/%3E%3Cpath d='M0 0L9 9 M80 0L71 9 M0 80L9 71 M80 80L71 71'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 80px 80px repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M18 18H62V62H18Z M40 9L71 40L40 71L9 40Z'/%3E%3Cpath d='M0 0L9 9 M80 0L71 9 M0 80L9 71 M80 80L71 71'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 80px 80px repeat;
}

/* ---------- hero: light motes ---------- */
.hero__motes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* ---------- hero: hanging lanterns ---------- */
.lantern {
  position: absolute;
  top: 0;
  z-index: 2;
  width: 44px;
  height: 162px;
  color: var(--gold);
  transform-origin: 50% 0;
  pointer-events: none;
}
.lantern--a { inset-inline-start: 2.2%; }
.lantern--b { inset-inline-end: 2.2%; top: -46px; }
.lantern__flame { fill: var(--gold-hi); opacity: .55; }
@media (prefers-reduced-motion: no-preference) {
  .lantern { animation: sway 7s ease-in-out infinite alternate; }
  .lantern--b { animation-duration: 8.5s; animation-delay: -3s; }
  .lantern__flame { animation: flicker 3.2s ease-in-out infinite; }
}
@keyframes sway { from { transform: rotate(2.6deg); } to { transform: rotate(-2.6deg); } }
@keyframes flicker { 0%, 100% { opacity: .45; } 40% { opacity: .85; } 60% { opacity: .6; } }
@media (max-width: 1000px) { .lantern { display: none; } }

/* ---------- hero: mihrab niche around the cover ---------- */
.niche {
  position: relative;
  padding: 26% 11% 7%;
  isolation: isolate;
}
.niche__arch {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  overflow: visible;
}
.niche__arch path {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}
.niche__arch path:first-child { fill: color-mix(in srgb, var(--card) 55%, transparent); }
.niche__glow {
  position: absolute;
  inset: 3% 5% 22%;
  z-index: 1;
  background: radial-gradient(ellipse 60% 55% at 50% 38%, var(--glow) 0%, transparent 70%);
  pointer-events: none;
}
.niche__rosette {
  position: absolute;
  z-index: 0;
  width: 150%;
  height: auto;
  aspect-ratio: 1;
  left: -25%;
  top: 50%;
  margin-top: -75%;
  color: var(--gold);
  opacity: .32;
  pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .niche__glow { animation: breathe 7s ease-in-out infinite; }
  .niche__rosette { animation: turn 240s linear infinite; }
}
@keyframes breathe { 0%, 100% { opacity: .65; transform: scale(.97); } 50% { opacity: 1; transform: scale(1.03); } }
@keyframes turn { to { transform: rotate(360deg); } }

/* ---------- the verse ---------- */
.verse {
  padding: clamp(3rem, 7vw, 5rem) 0 clamp(3.2rem, 7vw, 5.2rem);
  text-align: center;
}
.verse__text {
  font-family: "Amiri Quran", "Amiri", var(--f-body);
  font-size: clamp(2.1rem, 6.4vw, 4.1rem);
  line-height: 2.2;
  color: var(--ink);
}
.vb { color: var(--gold); }
.vw {
  display: inline-block;
  transition: opacity 1.6s ease, filter 1.6s ease, text-shadow 2.2s ease;
}
.js .verse:not(.is-lit) .vw { opacity: .1; filter: blur(5px); }
.verse.is-lit .vw { text-shadow: 0 0 26px var(--glow-text); }
.vw:nth-child(3) { transition-delay: .55s; }
.vw:nth-child(4) { transition-delay: 1.1s; }
.vw:nth-child(5) { transition-delay: 1.65s; }
.verse__ref { color: var(--gold); font-size: 1.1rem; }

/* ---------- fair band: gold lattice ---------- */
.fair { position: relative; overflow: hidden; }
.fair::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--gold-hi);
  opacity: .08;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M18 18H62V62H18Z M40 9L71 40L40 71L9 40Z'/%3E%3Cpath d='M0 0L9 9 M80 0L71 9 M0 80L9 71 M80 80L71 71'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 80px 80px repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cg fill='none' stroke='black' stroke-width='1'%3E%3Cpath d='M18 18H62V62H18Z M40 9L71 40L40 71L9 40Z'/%3E%3Cpath d='M0 0L9 9 M80 0L71 9 M0 80L9 71 M80 80L71 71'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 80px 80px repeat;
  pointer-events: none;
}
.fair .wrap { position: relative; }

/* ---------- excerpt: night sky (same in light and dark) ---------- */
.excerpt {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 60% at 50% 115%, #2B3659 0%, transparent 70%),
    linear-gradient(180deg, #141C33 0%, #0C1222 100%);
  color: #EFE4CC;
  padding-block: clamp(4.5rem, 10vw, 7.5rem);
}
.excerpt .wrap { position: relative; z-index: 1; }
.excerpt .excerpt__h { color: #E2C47E; }
.excerpt .excerpt__q::before { color: #E2C47E; }
.excerpt :focus-visible { outline-color: #E2C47E; }
.sky { position: absolute; inset: 0; pointer-events: none; }
.star {
  position: absolute;
  width: var(--s, 2px);
  height: var(--s, 2px);
  border-radius: 50%;
  background: #F6EAD0;
  opacity: .55;
}
@media (prefers-reduced-motion: no-preference) {
  .star { animation: twinkle var(--d, 4s) ease-in-out infinite; animation-delay: var(--dl, 0s); }
}
@keyframes twinkle { 0%, 100% { opacity: .15; } 50% { opacity: .9; } }
.crescent {
  position: absolute;
  top: 2.2rem;
  inset-inline-end: 6%;
  width: 104px;
  height: 104px;
  color: #E2C47E;
  opacity: .75;
  pointer-events: none;
}
@media (max-width: 640px) { .crescent { width: 64px; height: 64px; top: 1.2rem; inset-inline-end: 4%; } }

/* ---------- arabesque divider ---------- */
.ornament {
  width: min(320px, 72%);
  height: 28px;
  margin: 0 auto clamp(2.5rem, 6vw, 4rem);
  background: var(--gold);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 28'%3E%3Cg fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M0 14H128 M192 14H320'/%3E%3Cpath d='M118 14l5-5 5 5-5 5z M192 14l5-5 5 5-5 5z'/%3E%3Crect x='151' y='5' width='18' height='18'/%3E%3Cpath d='M160 1.3L172.7 14 160 26.7 147.3 14z'/%3E%3C/g%3E%3Ccircle cx='160' cy='14' r='2.4'/%3E%3Ccircle cx='60' cy='14' r='1.6'/%3E%3Ccircle cx='260' cy='14' r='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 320 28'%3E%3Cg fill='none' stroke='black' stroke-width='1.2'%3E%3Cpath d='M0 14H128 M192 14H320'/%3E%3Cpath d='M118 14l5-5 5 5-5 5z M192 14l5-5 5 5-5 5z'/%3E%3Crect x='151' y='5' width='18' height='18'/%3E%3Cpath d='M160 1.3L172.7 14 160 26.7 147.3 14z'/%3E%3C/g%3E%3Ccircle cx='160' cy='14' r='2.4'/%3E%3Ccircle cx='60' cy='14' r='1.6'/%3E%3Ccircle cx='260' cy='14' r='1.6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.ornament--top { margin-top: 0; }
.author { padding-top: clamp(3rem, 7vw, 5rem); }
