/* ==========================================================================
   اصْنَعْ نَفْسَك — stylesheet
   Design system inherited from the book: ink / ivory / burnished gold,
   Reem Kufi on dark surfaces, Cairo on light, IBM Plex Sans Arabic for body.
   ========================================================================== */

:root {
  --ink: #141109;
  --ink2: #1d160c;
  --ink3: #241c10;
  --paper: #f4eddd;
  --paper2: #ede3cd;
  --gold: #b08533;
  --gold-l: #cda24e;
  --gold-d: #8a6e2e;
  --bone: #efe6d2;
  --stone: #9c8d72;
  --stone-d: #6e6350;
  --rule: #d8cbae;
  --rule-dk: rgba(205, 162, 78, 0.18);
  --display: 'Reem Kufi', sans-serif;
  --head: 'Cairo', sans-serif;
  --body: 'IBM Plex Sans Arabic', sans-serif;
  --serif: 'Amiri', serif;
  --wrap: 1120px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px; /* keeps anchors clear of the sticky nav */
}

body {
  font-family: var(--body);
  background: var(--ink);
  color: var(--bone);
  font-size: 16px;
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* height:auto lets the width/height attributes act as an aspect-ratio hint
   (they map to CSS presentational hints, so without this the height stays
   pinned and the image distorts once max-width kicks in) */
img { display: block; max-width: 100%; height: auto; object-fit: contain; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--gold); color: #141109; }
:focus-visible { outline: 2px solid var(--gold-l); outline-offset: 3px; border-radius: 2px; }

/* skip link for keyboard users */
.skip-link {
  position: absolute; right: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: #191204;
  font-family: var(--head); font-weight: 700; font-size: 14px;
  padding: 13px 22px; border-radius: 0 0 0 2px;
}
.skip-link:focus { right: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.band { position: relative; overflow: hidden; }
.band-dark { background: var(--ink); color: var(--bone); }
.band-paper { background: var(--paper); color: #2a2217; }

/* faint stepped-kufic motif, from the book's chapter openers */
.motif { position: absolute; inset: 0; pointer-events: none; opacity: 0.5; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 60;
  background: rgba(20, 17, 9, 0.86);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--rule-dk);
}
.nav .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px; gap: 16px;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--display); font-weight: 700; font-size: 17px;
  color: var(--bone); letter-spacing: 0.01em;
}
.brand svg { width: 26px; height: 26px; flex: none; }
.nav-links { display: flex; gap: 26px; font-size: 14px; color: var(--stone); font-weight: 500; }
.nav-links a { transition: color 0.2s; padding: 10px 2px; display: inline-block; }
.nav-links a:hover { color: var(--gold-l); }
.nav .btn { padding: 9px 18px; font-size: 14px; }
@media (max-width: 820px) { .nav-links { display: none; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  font-family: var(--head); font-weight: 700; font-size: 16px;
  padding: 15px 34px; border-radius: 2px; border: 1px solid transparent;
  cursor: pointer; white-space: nowrap;
  transition: transform 0.18s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.25s, background 0.25s, color 0.25s;
}
.btn-gold {
  background: linear-gradient(180deg, var(--gold-l), var(--gold));
  color: #191204;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.28) inset, 0 10px 30px -12px rgba(205, 162, 78, 0.75);
}
.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.3) inset, 0 18px 40px -14px rgba(205, 162, 78, 0.95);
}
.btn-ghost { border-color: rgba(205, 162, 78, 0.42); color: var(--gold-l); background: transparent; }
.btn-ghost:hover { background: rgba(205, 162, 78, 0.09); transform: translateY(-2px); }
.btn-ink { background: var(--ink); color: var(--bone); border-color: var(--ink); }
.btn-ink:hover { transform: translateY(-2px); box-shadow: 0 16px 34px -16px rgba(20, 17, 9, 0.7); }

/* ---------- shared section bits ---------- */
.eyebrow {
  font-family: var(--body); font-weight: 600; letter-spacing: 0.34em;
  font-size: 11px; color: var(--gold); margin-bottom: 18px;
}
.band-dark .eyebrow { color: var(--gold-l); }
.sec-title {
  font-family: var(--head); font-weight: 700; line-height: 1.28;
  font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -0.01em;
}
.band-dark .sec-title { font-family: var(--display); font-weight: 700; letter-spacing: 0; }
.sec-lede { font-size: 17px; line-height: 2.05; color: var(--stone-d); max-width: 60ch; margin-top: 18px; }
.band-dark .sec-lede { color: #c3b79e; }
.sec-head { margin-bottom: 52px; }
section.band { padding: clamp(72px, 9vw, 116px) 0; }

/* gold hairline used as a divider */
.hair { height: 1px; width: 64px; background: linear-gradient(90deg, var(--gold), transparent); margin-top: 22px; }

/* ---------- hero ---------- */
.hero {
  padding: clamp(56px, 7vw, 84px) 0 clamp(72px, 8vw, 104px);
  background: radial-gradient(120% 78% at 74% 4%, #251d10 0%, #141109 62%);
}
.hero-grid {
  display: grid; grid-template-columns: 1.08fr 0.92fr;
  gap: clamp(32px, 5vw, 72px); align-items: center; position: relative;
}
.hero h1 {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(46px, 7.4vw, 86px); line-height: 1.04;
  color: var(--bone); letter-spacing: 0.005em;
}
.hero .sub {
  font-size: clamp(16px, 1.6vw, 19px); line-height: 1.95;
  color: #cdc0a6; max-width: 44ch; margin-top: 26px;
}
.hero .tag {
  font-family: var(--display); font-weight: 500;
  font-size: clamp(17px, 2vw, 21px); color: var(--gold-l); margin-top: 22px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 38px; }
.chips {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 30px;
  font-size: 13px; color: var(--stone); font-weight: 500;
}
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--rule-dk); padding: 7px 13px;
  border-radius: 2px; background: rgba(205, 162, 78, 0.04);
}
.chip svg { width: 14px; height: 14px; color: var(--gold); flex: none; }

/* cover artwork */
.cover-stage { position: relative; display: flex; justify-content: center; perspective: 1400px; }
.cover-glow {
  position: absolute; inset: -6% -12%;
  background: radial-gradient(52% 48% at 50% 46%, rgba(205, 162, 78, 0.3), transparent 72%);
  filter: blur(28px); pointer-events: none;
}
.cover-img {
  position: relative; border-radius: 3px;
  box-shadow:
    0 46px 80px -30px rgba(0, 0, 0, 0.92),
    0 0 0 1px rgba(205, 162, 78, 0.22),
    -14px 0 26px -20px rgba(0, 0, 0, 0.9);
  transform: rotateY(-9deg) rotateX(2.5deg);
  transform-style: preserve-3d;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.cover-stage:hover .cover-img { transform: rotateY(-3deg) rotateX(1deg) translateY(-6px); }
/* page-edge illusion on the binding side */
.cover-img::after {
  content: ''; position: absolute; top: 2%; bottom: 2%; left: -7px; width: 7px;
  background: linear-gradient(90deg, #0d0a05, #4a3f2c 40%, #8d7a5a);
  border-radius: 0 2px 2px 0;
}
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .cover-stage { order: -1; }
  .cover-img { transform: none; }
}

/* ---------- promise ---------- */
.promise-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(30px, 5vw, 70px); align-items: start;
}
.promise p { font-size: 17px; line-height: 2.1; color: #463a29; margin-bottom: 18px; }
.promise p strong { font-family: var(--head); font-weight: 700; color: #221b12; }
.truths { display: grid; gap: 2px; background: var(--rule); border: 1px solid var(--rule); }
.truth { background: var(--paper); padding: 22px 24px; }
.truth h3 { font-family: var(--head); font-weight: 700; font-size: 17px; color: #2a2217; margin-bottom: 7px; }
.truth p { font-size: 14.5px; line-height: 1.85; color: #5c5140; margin: 0; }
@media (max-width: 820px) { .promise-grid { grid-template-columns: 1fr; } }

/* ---------- chapters: the book's own table of contents ---------- */
.toc-shell {
  border: 1px solid var(--rule-dk);
  background: linear-gradient(180deg, rgba(205, 162, 78, 0.05), transparent 40%);
  padding: clamp(26px, 4vw, 46px);
}
.toc-row {
  display: flex; align-items: baseline; gap: 16px; padding: 15px 0;
  border-bottom: 1px solid rgba(205, 162, 78, 0.14); position: relative;
}
.toc-row:last-child { border-bottom: 0; }
.toc-n {
  font-family: var(--display); font-weight: 600; font-size: 15px;
  color: var(--gold); min-width: 32px; text-align: center; flex: none;
  transition: color 0.25s;
}
.toc-t {
  font-family: var(--head); font-weight: 600;
  font-size: clamp(15px, 1.7vw, 18px); color: var(--bone); transition: color 0.25s;
}
.toc-k { font-size: 12px; color: var(--stone); letter-spacing: 0.16em; flex: none; }
.toc-dots {
  flex: 1; border-bottom: 1px dotted rgba(205, 162, 78, 0.34);
  transform: translateY(-4px); min-width: 18px;
}
.toc-row:hover .toc-t { color: var(--gold-l); }
.toc-row:hover .toc-n { color: var(--gold-l); }
.toc-row.is-final .toc-t { font-family: var(--display); }
@media (max-width: 640px) {
  .toc-k { display: none; }
  .toc-dots { min-width: 12px; }
}

/* ---------- preview ---------- */
.pages { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.6vw, 34px); }
.page-card {
  position: relative; border-radius: 2px; overflow: hidden;
  box-shadow: 0 30px 54px -28px rgba(38, 30, 16, 0.6), 0 0 0 1px rgba(120, 100, 60, 0.16);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.3, 1), box-shadow 0.35s;
}
.page-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 42px 70px -30px rgba(38, 30, 16, 0.72), 0 0 0 1px rgba(176, 133, 51, 0.4);
}
.page-cap { margin-top: 14px; font-size: 13.5px; color: #6e6350; text-align: center; }
@media (max-width: 760px) {
  .pages { grid-template-columns: 1fr 1fr; }
  .pages > figure:last-child { display: none; }
}

/* ---------- audience ---------- */
.aud { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule-dk); border: 1px solid var(--rule-dk); }
.aud-item { background: var(--ink); padding: clamp(24px, 3vw, 34px); }
.aud-item .n {
  font-family: var(--display); font-weight: 700; font-size: 34px; line-height: 1;
  color: transparent; -webkit-text-stroke: 1.1px rgba(205, 162, 78, 0.6); margin-bottom: 16px;
}
.aud-item h3 { font-family: var(--display); font-weight: 600; font-size: 19px; color: var(--bone); margin-bottom: 9px; }
.aud-item p { font-size: 15px; line-height: 1.95; color: #b0a48c; }
@media (max-width: 760px) { .aud { grid-template-columns: 1fr; } }

/* ---------- what you get ---------- */
.gets { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(18px, 2.4vw, 30px); }
.get {
  border: 1px solid var(--rule); background: #efe6d0; padding: 26px 24px;
  border-radius: 2px; border-right: 3px solid var(--gold);
}
.get .ic { width: 26px; height: 26px; color: var(--gold); margin-bottom: 14px; }
.get h3 { font-family: var(--head); font-weight: 700; font-size: 17px; color: #2a2217; margin-bottom: 8px; }
.get p { font-size: 14.5px; line-height: 1.9; color: #5c5140; }
@media (max-width: 880px) { .gets { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .gets { grid-template-columns: 1fr; } }

/* ---------- pull quote ---------- */
.quote { text-align: center; max-width: 24ch; margin: 0 auto; }
.quote .q {
  font-family: var(--serif); font-style: italic;
  font-size: clamp(26px, 4.4vw, 46px); line-height: 1.55; color: var(--bone);
}
.quote .r {
  width: 52px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 30px auto 0;
}

/* ---------- pricing ---------- */
.buy {
  max-width: 600px; margin: 0 auto;
  border: 1px solid rgba(205, 162, 78, 0.3);
  background: linear-gradient(180deg, #1f1810, #171106);
  padding: clamp(30px, 4.4vw, 52px); text-align: center; position: relative;
}
.buy::before, .buy::after {
  content: ''; position: absolute; width: 14px; height: 14px;
  border: 1px solid var(--gold); opacity: 0.65;
}
.buy::before { top: 10px; right: 10px; border-left: 0; border-bottom: 0; }
.buy::after { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.buy h3 { font-family: var(--display); font-weight: 700; font-size: clamp(24px, 3.2vw, 32px); color: var(--bone); }
.price { display: flex; align-items: baseline; justify-content: center; gap: 10px; margin: 26px 0 6px; }
.price .v {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(48px, 8vw, 74px); line-height: 1; color: var(--gold-l);
}
.price .c { font-family: var(--head); font-weight: 600; font-size: 19px; color: var(--stone); }
.buy .note { font-size: 13.5px; color: var(--stone); }
.incl { text-align: right; margin: 30px 0; display: grid; gap: 12px; }
.incl li {
  list-style: none; display: flex; gap: 11px; align-items: flex-start;
  font-size: 15px; line-height: 1.85; color: #c9bda4;
}
.incl svg { width: 17px; height: 17px; color: var(--gold); flex: none; margin-top: 6px; }
.buy .btn { width: 100%; font-size: 17px; padding: 17px 30px; }

/* trust row under the buy button */
.trust {
  display: flex; justify-content: center; align-items: center;
  gap: 20px; flex-wrap: wrap; margin-top: 20px;
  font-size: 12.5px; color: #a3957b;
}
.trust span { display: inline-flex; align-items: center; gap: 6px; }
.trust svg { width: 14px; height: 14px; color: var(--gold); flex: none; }

/* ---------- faq ---------- */
.faq { max-width: 760px; margin: 0 auto; }
.faq details { border-bottom: 1px solid var(--rule); padding: 4px 0; }
.faq summary {
  list-style: none; cursor: pointer; padding: 20px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  font-family: var(--head); font-weight: 700; font-size: 17px; color: #2a2217;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm { width: 18px; height: 18px; flex: none; position: relative; transition: transform 0.3s; }
.faq summary .pm::before, .faq summary .pm::after {
  content: ''; position: absolute; background: var(--gold);
  top: 50%; left: 50%; transform: translate(-50%, -50%);
}
.faq summary .pm::before { width: 14px; height: 1.6px; }
.faq summary .pm::after { width: 1.6px; height: 14px; transition: opacity 0.3s; }
.faq details[open] summary .pm { transform: rotate(90deg); }
.faq details[open] summary .pm::after { opacity: 0; }
.faq .ans { padding: 0 0 22px; font-size: 15.5px; line-height: 2.05; color: #5c5140; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule-dk); padding: 44px 0 52px; background: var(--ink); }
.foot .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px 32px; flex-wrap: wrap; }
.foot p { font-size: 13px; color: #a3957b; }
.foot .brand { font-size: 15px; padding: 6px 0; }
.foot-links { display: flex; gap: 24px; font-size: 13px; }
.foot-links a { color: #a3957b; transition: color 0.2s; padding: 8px 0; }
.foot-links a:hover { color: var(--gold-l); }

/* ---------- reveal ---------- */
.rv {
  opacity: 0; transform: translateY(22px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv { opacity: 1; transform: none; transition: none; }
  .btn, .page-card, .cover-img { transition: none; }
  .cover-stage:hover .cover-img { transform: rotateY(-9deg) rotateX(2.5deg); }
}
