/* ============================================================
   Marketing layer — Noura Almaazmi
   Sticky WhatsApp · Mobile CTA bar · Newsletter capture · Lead intake
   Loaded on every page. Mobile-first.
   ============================================================ */

/* ===== WhatsApp floating button (icon only) ===== */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 96px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, .35);
  z-index: 990;
  text-decoration: none;
  transition: transform .25s, box-shadow .25s;
  border: 2px solid white;
}
.wa-float:hover { transform: scale(1.06); box-shadow: 0 10px 28px rgba(37, 211, 102, .5); }
.wa-float svg { width: 28px; height: 28px; flex-shrink: 0; }
.wa-float .wa-label { display: none; }
.wa-float::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid #25D366;
  animation: wa-pulse 2s infinite;
  opacity: 0;
  pointer-events: none;
}
@keyframes wa-pulse {
  0% { transform: scale(1); opacity: .55; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* ===== Sticky mobile CTA bar — classy, icon-only ===== */
.cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border-top: 1px solid rgba(0,0,0,.06);
  padding: 12px 24px calc(12px + env(safe-area-inset-bottom));
  display: none;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  z-index: 980;
  box-shadow: 0 -8px 32px rgba(0,0,0,.05);
}
.cta-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto;
  text-decoration: none;
  color: var(--ink, #1c1c1c);
  border-radius: 50%;
  transition: background .2s, transform .2s;
}
.cta-bar a span,
.cta-bar a em { display: none; }
.cta-bar a:hover,
.cta-bar a:active { background: var(--cream-warm, #f5efe3); transform: translateY(-1px); }
.cta-bar a svg { width: 22px; height: 22px; stroke-width: 1.6; }
.cta-bar a.cta-primary {
  background: var(--burgundy, #5C2E2E);
  color: white;
}
.cta-bar a.cta-primary:hover,
.cta-bar a.cta-primary:active { background: #6e3737; }

@media (max-width: 768px) {
  .cta-bar { display: grid; }
  body { padding-bottom: 84px; }
  .wa-float {
    bottom: 92px;
    right: 14px;
    height: 50px;
    width: 50px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  .wa-float .wa-label { display: none; }
  .wa-float svg { width: 24px; height: 24px; }
  .wa-float::after { left: 50%; }
}

/* ===== Newsletter capture modal (scroll-triggered) ===== */
.nl-modal {
  position: fixed;
  inset: 0;
  background: rgba(28, 16, 16, .55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.nl-modal.show { display: flex; animation: nl-fade .25s ease-out; }
@keyframes nl-fade { from { opacity: 0; } to { opacity: 1; } }
.nl-card {
  background: linear-gradient(180deg, #FFF8EC 0%, #F5EBD8 100%);
  border-radius: 12px;
  padding: 36px 32px 28px;
  max-width: 480px;
  width: 100%;
  position: relative;
  box-shadow: 0 30px 80px rgba(0,0,0,.3);
  border: 1px solid rgba(166, 124, 69, .25);
  animation: nl-up .35s cubic-bezier(.2,.9,.3,1);
}
@keyframes nl-up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.nl-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: none;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: var(--ink-soft, #6c6c6c);
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}
.nl-close:hover { background: rgba(0,0,0,.06); }
.nl-eyebrow { font-family: 'Montserrat', sans-serif; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-deep, #a67c45); font-weight: 700; }
.nl-title { font-family: 'Cormorant Garamond', serif; font-size: 1.85rem; line-height: 1.15; color: var(--burgundy, #5C2E2E); margin: 8px 0 12px; font-weight: 500; }
.nl-text { font-family: 'Inter', sans-serif; font-size: .96rem; color: var(--ink, #1c1c1c); line-height: 1.55; margin-bottom: 18px; }
.nl-form { display: flex; gap: 8px; }
.nl-form input {
  flex: 1;
  padding: 12px 14px;
  border: 1px solid rgba(0,0,0,.18);
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-size: .96rem;
  background: white;
  color: var(--ink, #1c1c1c);
}
.nl-form input:focus { outline: none; border-color: var(--gold-deep, #a67c45); box-shadow: 0 0 0 3px rgba(166,124,69,.18); }
.nl-form button {
  padding: 12px 20px;
  background: var(--burgundy, #5C2E2E);
  color: white;
  border: 0;
  border-radius: 6px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
  transition: background .2s;
}
.nl-form button:hover { background: #6e3737; }
.nl-foot { margin-top: 10px; font-size: .76rem; color: var(--ink-soft, #6c6c6c); line-height: 1.4; }
.nl-foot a { color: var(--gold-deep, #a67c45); text-decoration: none; }

@media (max-width: 480px) {
  .nl-form { flex-direction: column; }
  .nl-card { padding: 28px 22px 22px; }
  .nl-title { font-size: 1.55rem; }
}

/* ===== Inline article newsletter block ===== */
.nl-inline {
  background: linear-gradient(180deg, #5C2E2E 0%, #4a2424 100%);
  color: #FFF8EC;
  padding: 36px 32px;
  border-radius: 10px;
  margin: 40px 0;
  text-align: center;
}
.nl-inline h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; color: var(--gold, #c9a44a); margin: 0 0 10px; font-weight: 500; }
.nl-inline p { font-size: .98rem; color: rgba(255, 248, 236, .8); line-height: 1.55; margin-bottom: 18px; max-width: 480px; margin-left: auto; margin-right: auto; }
.nl-inline form { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.nl-inline input { flex: 1; padding: 12px 14px; border: 0; border-radius: 6px; font-family: 'Inter', sans-serif; font-size: .96rem; background: white; color: var(--ink, #1c1c1c); }
.nl-inline button { padding: 12px 22px; background: var(--gold, #c9a44a); color: var(--burgundy, #5C2E2E); border: 0; border-radius: 6px; font-family: 'Inter', sans-serif; font-weight: 700; cursor: pointer; }
.nl-inline button:hover { background: #d8b35d; }
.nl-inline .nl-success { color: var(--gold, #c9a44a); font-weight: 600; }

@media (max-width: 540px) {
  .nl-inline form { flex-direction: column; }
  .nl-inline { padding: 28px 22px; }
}

/* ===== Trust ribbon ===== */
.trust-ribbon {
  background: var(--cream-warm, #f5efe3);
  border-top: 1px solid rgba(166, 124, 69, .2);
  border-bottom: 1px solid rgba(166, 124, 69, .2);
  padding: 18px 0;
  font-family: 'Inter', sans-serif;
  font-size: .82rem;
  color: var(--ink-soft, #6c6c6c);
}
.trust-ribbon .ribbon-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 36px;
  text-align: center;
}
.trust-ribbon .ribbon-item { display: flex; align-items: center; gap: 8px; }
.trust-ribbon .ribbon-item svg { width: 16px; height: 16px; stroke: var(--gold-deep, #a67c45); stroke-width: 1.6; fill: none; }

@media (max-width: 600px) {
  .trust-ribbon .ribbon-grid { gap: 18px; font-size: .76rem; }
}
