/* Afrophilic Newsletter: popup + inline form. Brand tokens from BRAND.md (sage #BFC6B8, beige #FEFDF8, dark sage #5D695B, deep moss #2C352C, ink #161616).
   Fonts come from the site's own rules (Manrope headings, DM Sans text, IBM Plex Sans Arabic in RTL). */
.afnl { --afnl-bg:#FEFDF8; --afnl-ink:#161616; --afnl-muted:#55584F; --afnl-accent:#5D695B; --afnl-deep:#2C352C; --afnl-soft:#BFC6B8; --afnl-chip:#E6E9E2; --afnl-line:rgba(22,22,22,.14); box-sizing:border-box; }
.afnl *, .afnl *::before, .afnl *::after { box-sizing:inherit; }
.afnl p, .afnl h3 { margin:0; }
.afnl__eyebrow { font-size:13px; line-height:1.4; letter-spacing:.14em; text-transform:uppercase; font-weight:600; color:var(--afnl-accent); margin-bottom:10px; }
.afnl__title { font-size:clamp(24px,3vw,32px); line-height:1.2; font-weight:600; color:var(--afnl-ink); margin-bottom:12px; letter-spacing:-.01em; }
.afnl__text { font-size:16px; line-height:1.7; color:var(--afnl-muted); margin-bottom:22px; }
.afnl__form { display:flex; gap:10px; align-items:stretch; }
/* Theme form styles (Qode/Laurits: underlined transparent inputs, outlined buttons) are more specific, hence the !important here. */
.afnl .afnl__form .afnl__input { flex:1 1 auto; min-width:0; width:auto; height:52px !important; min-height:0 !important; margin:0 !important; padding:0 20px !important; font-size:16px !important; line-height:1.2 !important; font-weight:400; color:var(--afnl-ink) !important; background:#fff !important; border:1px solid var(--afnl-line) !important; border-radius:999px !important; outline:none !important; appearance:none; -webkit-appearance:none; box-shadow:none !important; text-transform:none; letter-spacing:0; }
.afnl .afnl__form .afnl__input::placeholder { color:#7A7E74 !important; opacity:1; }
.afnl .afnl__form .afnl__input:focus { border-color:var(--afnl-accent) !important; box-shadow:0 0 0 3px rgba(93,105,91,.22) !important; }
.afnl .afnl__form .afnl__btn { flex:0 0 auto; width:auto; height:52px !important; min-height:0 !important; margin:0 !important; padding:0 26px !important; font-size:15px !important; font-weight:600 !important; line-height:1.2 !important; color:#fff !important; background:var(--afnl-ink) !important; border:1px solid var(--afnl-ink) !important; border-radius:999px !important; box-shadow:none !important; cursor:pointer; transition:background .2s,border-color .2s; text-transform:none !important; letter-spacing:0 !important; text-decoration:none !important; }
.afnl .afnl__form .afnl__btn::before, .afnl .afnl__form .afnl__btn::after { display:none !important; }
.afnl .afnl__form .afnl__btn:hover, .afnl .afnl__form .afnl__btn:focus-visible { background:var(--afnl-accent) !important; border-color:var(--afnl-accent) !important; color:#fff !important; }
.afnl .afnl__form .afnl__btn:focus-visible { outline:3px solid rgba(93,105,91,.35) !important; outline-offset:2px; }
.afnl .afnl__form .afnl__btn[disabled] { opacity:.6; cursor:default; }
.afnl__hp { position:absolute !important; left:-9999px !important; width:1px; height:1px; opacity:0; }
.afnl__sr { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
.afnl__privacy { font-size:13px; line-height:1.5; color:var(--afnl-muted); margin-top:12px; }
.afnl__msg { display:none; font-size:14px; line-height:1.5; margin-top:12px; }
.afnl__msg.is-shown { display:block; }
.afnl__msg.is-error { color:var(--afnl-deep); background:var(--afnl-chip); padding:10px 14px; border-radius:12px; }
.afnl.is-done .afnl__form, .afnl.is-done .afnl__privacy, .afnl.is-done .afnl__dismiss, .afnl.is-done .afnl__eyebrow { display:none; }
.afnl.is-done .afnl__text { margin-bottom:0; }

/* Popup */
.afnl--popup { position:fixed; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; padding:16px; }
.afnl--popup[hidden] { display:none; }
.afnl__backdrop { position:absolute; inset:0; background:rgba(44,53,44,.55); opacity:0; transition:opacity .25s ease; }
.afnl--popup .afnl__card { position:relative; width:100%; max-width:520px; background:var(--afnl-bg); border-radius:24px; padding:44px 36px 30px; box-shadow:0 24px 64px rgba(0,0,0,.22); opacity:0; transform:translateY(18px); transition:opacity .3s ease,transform .3s ease; }
.afnl--popup.is-open .afnl__backdrop { opacity:1; }
.afnl--popup.is-open .afnl__card { opacity:1; transform:none; }
.afnl .afnl__x { position:absolute; margin:0; box-shadow:none; text-transform:none; letter-spacing:0; font-weight:400; min-height:0; line-height:1 !important; top:14px; inset-inline-end:14px; width:36px; height:36px; border:0; border-radius:50%; background:transparent; color:var(--afnl-muted); font-size:26px; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0; }
.afnl__x:hover, .afnl__x:focus-visible { background:var(--afnl-chip); color:var(--afnl-ink); outline:none; }
.afnl .afnl__dismiss { display:inline-block; height:auto; min-height:0; box-shadow:none; text-transform:none; letter-spacing:0; font-weight:400; margin-top:16px; padding:0; border:0; background:none; font-size:14px; color:var(--afnl-muted); text-decoration:underline; text-underline-offset:3px; cursor:pointer; }
.afnl__dismiss:hover { color:var(--afnl-ink); }
html.afnl-lock, html.afnl-lock body { overflow:hidden; }

/* Inline (shortcode) */
.afnl--inline { position:relative; }
.afnl--inline .afnl__card { border-radius:24px; padding:44px 40px; }
.afnl--soft .afnl__card { background:var(--afnl-soft); }
.afnl--soft .afnl__eyebrow, .afnl--soft .afnl__text, .afnl--soft .afnl__privacy { color:var(--afnl-deep); }   /* deep moss on sage: 7.25:1 */
.afnl--soft .afnl__form .afnl__input { border-color:transparent !important; }
.afnl--soft .afnl__msg.is-error { background:var(--afnl-bg); }
.afnl--light .afnl__card { background:var(--afnl-bg); border:1px solid var(--afnl-line); }
.afnl--inline .afnl__form { max-width:560px; }

/* Call to action (shortcode mode="button"): eyebrow + one line + a pill button that opens the popup. */
.afnl--cta { max-width:420px; }
.afnl--cta .afnl__text { font-size:15px; line-height:1.6; margin-bottom:14px; }
.afnl .afnl__open { display:inline-block; height:46px; padding:0 22px !important; margin:0 !important; font-size:14px !important; font-weight:600 !important; line-height:46px !important; border-radius:999px !important; border:1px solid transparent !important; box-shadow:none !important; cursor:pointer; text-transform:none !important; letter-spacing:0 !important; text-decoration:none !important; transition:background .2s,color .2s,border-color .2s; }
.afnl .afnl__open::before, .afnl .afnl__open::after { display:none !important; }
.afnl--cta.afnl--light .afnl__open, .afnl--cta.afnl--soft .afnl__open { background:var(--afnl-ink) !important; color:#fff !important; border-color:var(--afnl-ink) !important; }
.afnl--cta.afnl--light .afnl__open:hover, .afnl--cta.afnl--soft .afnl__open:hover { background:var(--afnl-accent) !important; border-color:var(--afnl-accent) !important; }
.afnl--cta.afnl--soft .afnl__eyebrow, .afnl--cta.afnl--soft .afnl__text { color:var(--afnl-deep); }
.afnl--cta.afnl--dark .afnl__eyebrow { color:#fff; }                       /* matches the footer headings */
.afnl--cta.afnl--dark .afnl__text { color:rgba(255,255,255,.72); }         /* matches the footer text */
.afnl--cta.afnl--dark .afnl__open { background:var(--afnl-bg) !important; color:var(--afnl-ink) !important; border-color:var(--afnl-bg) !important; }
.afnl--cta.afnl--dark .afnl__open:hover, .afnl--cta.afnl--dark .afnl__open:focus-visible { background:var(--afnl-soft) !important; border-color:var(--afnl-soft) !important; color:var(--afnl-deep) !important; }
.afnl .afnl__open:focus-visible { outline:3px solid rgba(191,198,184,.6) !important; outline-offset:2px; }

/* RTL */
.afnl[dir="rtl"] .afnl__eyebrow, .afnl[dir="rtl"] .afnl__title { letter-spacing:0; }
.afnl[dir="rtl"] .afnl__form .afnl__input { text-align:right; }

/* Phones: bottom sheet instead of a centred modal (no full-screen interstitial). */
@media (max-width:640px) {
  .afnl--popup { align-items:flex-end; padding:0; }
  .afnl--popup .afnl__card { max-width:none; border-radius:24px 24px 0 0; padding:36px 20px calc(22px + env(safe-area-inset-bottom)); transform:translateY(100%); }
  .afnl__form { flex-direction:column; }
  .afnl .afnl__form .afnl__btn { height:50px !important; }
  .afnl__title { font-size:22px; }
  .afnl--inline .afnl__card { padding:32px 20px; border-radius:18px; }
}
@media (prefers-reduced-motion:reduce) {
  .afnl__backdrop, .afnl--popup .afnl__card, .afnl__btn { transition:none; }
}
