/* =========================================================
   FOLIO & KEY — BATCH 4A.1 HOMEPAGE POLISH
   Customer entry paths + exact product flow + final hero fade
   Loaded last on the homepage to preserve the approved baseline.
   ========================================================= */

:root {
  --b4-forest: #031f19;
  --b4-forest-deep: #01140f;
  --b4-ivory: #f7ead4;
  --b4-gold: #d4b373;
  --b4-gold-dark: #8a6733;
}

#story,
#editions,
#how,
#authors {
  scroll-margin-top: 118px;
}

/* ---------------- HEADER / CUSTOMER PATHS ---------------- */
.header-actions {
  gap: 10px;
}

.header-account-link {
  color: rgba(247,235,213,.76);
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
  white-space: nowrap;
  transition: color .2s ease;
}

.header-account-link:hover {
  color: var(--b4-gold);
}

html[lang="ar"] .header-account-link {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 15px;
  letter-spacing: 0;
}

.header-activate {
  background: rgba(212,179,115,.08);
  white-space: nowrap;
}

.desktop-nav .nav-future,
.mobile-menu .nav-future,
.footer-link-group .nav-future {
  opacity: .68;
}

@media (max-width: 1180px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: flex; }

  .mobile-menu.is-open {
    display: grid !important;
  }
}

@media (min-width: 851px) and (max-width: 1180px) {
  .mobile-menu {
    top: 104px;
    inset-inline: auto 4.5%;
    width: min(390px, 88vw);
  }
}

@media (max-width: 760px) {
  .header-account-link,
  .header-activate {
    display: none;
  }
}

.mobile-menu .mobile-primary {
  margin-bottom: 5px;
  border: 1px solid rgba(212,179,115,.44);
  border-radius: 12px;
  color: #f7ead4 !important;
  background: rgba(212,179,115,.10);
  text-align: center;
}

.mobile-menu .mobile-account {
  color: var(--b4-gold) !important;
}

html[lang="ar"] .mobile-menu a {
  font-family: "Noto Naskh Arabic", serif;
}

/* ---------------- HERO COPY ---------------- */
html[lang="en"] .hero-luxury h1 em {
  display: block;
  margin-top: 10px;
  font-style: normal;
}

/* Keep the dissolving edge visible instead of fading to zero.
   RTL: image is left and dissolves to the right.
   LTR: image is right and dissolves to the left. */
@media (min-width: 851px) {
  html[dir="rtl"] .hero-render-frame {
    -webkit-mask-image:
      linear-gradient(to right,
        #000 44%,
        rgba(0,0,0,.96) 59%,
        rgba(0,0,0,.73) 75%,
        rgba(0,0,0,.38) 90%,
        rgba(0,0,0,.18) 100%),
      linear-gradient(to bottom,
        transparent 0%,
        rgba(0,0,0,.85) 6%,
        #000 14%,
        #000 86%,
        rgba(0,0,0,.72) 94%,
        transparent 100%);
    mask-image:
      linear-gradient(to right,
        #000 44%,
        rgba(0,0,0,.96) 59%,
        rgba(0,0,0,.73) 75%,
        rgba(0,0,0,.38) 90%,
        rgba(0,0,0,.18) 100%),
      linear-gradient(to bottom,
        transparent 0%,
        rgba(0,0,0,.85) 6%,
        #000 14%,
        #000 86%,
        rgba(0,0,0,.72) 94%,
        transparent 100%);
  }

  html[dir="ltr"] .hero-render-frame {
    -webkit-mask-image:
      linear-gradient(to left,
        #000 44%,
        rgba(0,0,0,.96) 59%,
        rgba(0,0,0,.73) 75%,
        rgba(0,0,0,.38) 90%,
        rgba(0,0,0,.18) 100%),
      linear-gradient(to bottom,
        transparent 0%,
        rgba(0,0,0,.85) 6%,
        #000 14%,
        #000 86%,
        rgba(0,0,0,.72) 94%,
        transparent 100%);
    mask-image:
      linear-gradient(to left,
        #000 44%,
        rgba(0,0,0,.96) 59%,
        rgba(0,0,0,.73) 75%,
        rgba(0,0,0,.38) 90%,
        rgba(0,0,0,.18) 100%),
      linear-gradient(to bottom,
        transparent 0%,
        rgba(0,0,0,.85) 6%,
        #000 14%,
        #000 86%,
        rgba(0,0,0,.72) 94%,
        transparent 100%);
  }
}

/* ---------------- EXISTING KEY / ACCOUNT STRIP ---------------- */
.key-entry-strip {
  position: relative;
  z-index: 4;
  padding: 23px 7%;
  color: var(--b4-ivory);
  background:
    radial-gradient(circle at 20% 20%, rgba(212,179,115,.07), transparent 28%),
    linear-gradient(90deg, #011711, #042a21 48%, #011711);
  border-top: 1px solid rgba(212,179,115,.16);
  border-bottom: 1px solid rgba(212,179,115,.16);
}

.key-entry-inner {
  max-width: 1480px;
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.key-entry-copy {
  display: flex;
  align-items: baseline;
  gap: 15px;
  flex-wrap: wrap;
}

.key-entry-kicker {
  color: var(--b4-gold);
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.key-entry-copy strong {
  color: rgba(247,235,213,.94);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 400;
}

html[lang="ar"] .key-entry-kicker {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

html[lang="ar"] .key-entry-copy strong {
  font-family: "Amiri", serif;
  font-size: 24px;
}

.key-entry-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.key-entry-primary,
.key-entry-secondary {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .06em;
}

.key-entry-primary {
  color: #15352b;
  background: var(--b4-ivory);
}

.key-entry-secondary {
  color: var(--b4-gold);
  border: 1px solid rgba(212,179,115,.42);
  background: rgba(255,255,255,.02);
}

html[lang="ar"] .key-entry-primary,
html[lang="ar"] .key-entry-secondary {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 15px;
  letter-spacing: 0;
}

@media (max-width: 760px) {
  .key-entry-strip { padding: 26px 22px; }
  .key-entry-inner,
  .key-entry-copy {
    display: grid;
    gap: 8px;
  }
  .key-entry-actions {
    width: 100%;
    margin-top: 8px;
  }
  .key-entry-primary,
  .key-entry-secondary {
    flex: 1 1 0;
  }
}

/* ---------------- HOW IT WORKS PRODUCT NOTE ---------------- */
.ritual-recipient-note {
  max-width: 900px;
  margin: 58px auto 0;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  text-align: center;
  border-top: 1px solid rgba(126,94,49,.18);
  border-bottom: 1px solid rgba(126,94,49,.18);
  color: #294b40;
}

.ritual-recipient-note span {
  color: #8c6a36;
  font-size: 11px;
}

.ritual-recipient-note p {
  margin: 0;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: 1.7;
}

html[lang="ar"] .ritual-recipient-note p {
  font-family: "Noto Naskh Arabic", serif;
  font-size: 17px;
  line-height: 1.9;
}

/* ---------------- FOOTER V1 CUSTOMER PATHS ---------------- */
.footer-brand-lockup {
  display: grid;
  gap: 10px;
}

.footer-brand {
  align-items: center;
}

.footer-language-toggle {
  flex: 0 0 auto;
}

.footer-links-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(30px, 6vw, 90px);
  padding: 38px 0 36px;
  border-bottom: 1px solid rgba(212,179,115,.12);
}

.footer-link-group {
  display: grid;
  align-content: start;
  gap: 12px;
}

.footer-link-group strong {
  margin-bottom: 4px;
  color: var(--b4-gold);
  font-family: Arial, sans-serif;
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.footer-link-group a {
  width: max-content;
  max-width: 100%;
  color: rgba(247,235,213,.66);
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.5;
  transition: color .2s ease;
}

.footer-link-group a:hover {
  color: var(--b4-gold);
}

html[lang="ar"] .footer-link-group strong,
html[lang="ar"] .footer-link-group a {
  font-family: "Noto Naskh Arabic", serif;
  letter-spacing: 0;
  text-transform: none;
}

html[lang="ar"] .footer-link-group strong { font-size: 15px; }
html[lang="ar"] .footer-link-group a { font-size: 15px; }

.footer-end {
  padding-top: 28px;
}

@media (max-width: 760px) {
  .footer-brand {
    align-items: flex-start;
  }
  .footer-links-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-link-group:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 500px) {
  .footer-links-grid {
    grid-template-columns: 1fr;
  }
  .footer-link-group:last-child {
    grid-column: auto;
  }
  .footer-end {
    gap: 10px;
  }
}
