/* =================================================================
   Bark Media Africa — extras: Partner page, Sniff chat guide, events pop-up
   Loaded after style.css. Uses the same variables (--gold, --indigo, --bone ...).
   ================================================================= */

[hidden] { display: none !important; }
html.sn-lock { overflow: hidden; }

/* Nav: seven links + Join fit between 961px and 1180px */
.main-nav a { white-space: nowrap; }
@media (min-width: 961px) and (max-width: 1180px) {
  .main-nav { gap: 0; }
  .main-nav a:not(.btn) { padding: .5rem .5rem; font-size: .92rem; }
  .brand small { display: none; }
  .brand b { font-size: 1rem; white-space: nowrap; }
  .nav-join { margin-left: .4rem; padding: .55rem .85rem; font-size: .92rem; }
  .cart-btn { margin-left: .3rem; }
}

/* =================================================================
   PARTNER PAGE
   ================================================================= */
.pt-stats { background: var(--indigo); color: var(--on-dark); padding: clamp(1.6rem, 4vw, 2.6rem) 0; }
.pt-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)); gap: 1.2rem 1.5rem; margin: 0; }
.pt-stat-grid > div { display: flex; flex-direction: column-reverse; border-top: 3px solid var(--gold); padding-top: .8rem; }
.pt-stat-grid dd { margin: 0; font: 800 clamp(1.8rem, 4.2vw, 2.7rem)/1 var(--display); letter-spacing: -.02em; }
.pt-stat-grid dt { margin-top: .35rem; color: var(--on-dark-soft); font-size: .95rem; }

.pt-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 1.25rem; }
.pt-way {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: .55rem;
  padding: 1.7rem 1.5rem 1.5rem; background: var(--card); border-radius: var(--r-lg); overflow: hidden;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.pt-way::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 6px; background: var(--gold); }
.pt-way:nth-child(2)::before { background: var(--green); }
.pt-way:nth-child(3)::before { background: var(--red); }
.pt-way:nth-child(4)::before { background: var(--indigo-3); }
.pt-way:hover { transform: translateY(-5px); box-shadow: 0 18px 40px rgba(22, 18, 74, .14); }
.pt-way h3 { margin: .4rem 0 0; }
.pt-way p { flex: 1; color: var(--ink-soft); margin: 0 0 .4rem; }
.pt-ico { display: grid; place-items: center; width: 68px; height: 68px; border-radius: 20px; background: var(--indigo); color: var(--gold); transform: rotate(-5deg); transition: transform .4s var(--ease); }
.pt-way:nth-child(even) .pt-ico { transform: rotate(5deg); }
.pt-way:hover .pt-ico { transform: rotate(0) scale(1.06); }

.pt-steps { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 2.75rem 2rem; }
.pt-steps li { position: relative; padding-top: 1.1rem; border-top: 3px solid var(--ink); }
.pt-steps h3 { margin: .9rem 0 .3rem; }
.pt-steps p { margin: 0; color: var(--ink-soft); }
.pt-n { position: absolute; top: -22px; left: 0; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--gold); color: var(--night); font: 800 1.2rem var(--display); box-shadow: 0 4px 0 var(--gold-deep); }

/* Form */
#partner-section { scroll-margin-top: 80px; }
.pt-passport { position: relative; min-width: 0; }
.pt-form[hidden], .pt-thanks[hidden] { display: none !important; }
.pt-form > div, .pt-form > fieldset { min-width: 0; }
.opt { font-weight: 400; color: var(--ink-soft); font-size: .85em; }
.pt-fieldset { border: 0; padding: 0; margin: 0; }
.pt-fieldset legend { padding: 0; margin-bottom: .55rem; font-weight: 600; font-size: .95rem; }
.pills { display: flex; flex-wrap: wrap; gap: .55rem; }
.form .pill { position: relative; display: inline-flex; margin: 0; font-weight: 500; cursor: pointer; }
.form .pill input { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; margin: 0; padding: 0; border: 0; background: none; opacity: 0; cursor: pointer; }
.pill span {
  display: inline-flex; align-items: center; min-height: 46px; padding: .5rem 1.05rem; border-radius: var(--r-pill);
  border: 2px solid rgba(var(--ink-rgb), .18); background: var(--bone); font-size: .95rem; line-height: 1.2;
  transition: background .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.pill:hover span { border-color: var(--ink); }
.pill input:checked + span { background: var(--sel-bg); color: var(--sel-fg); border-color: var(--ink); }
.pill input[type="checkbox"]:checked + span::before { content: "\2713"; margin-right: .45rem; font-weight: 800; }
.pill input:active + span { transform: scale(.97); }
.pill input:focus-visible + span { outline: 3px solid var(--gold); outline-offset: 2px; }
.pt-fieldset[aria-invalid="true"] .pill span { border-color: var(--red); }
.pt-consent { align-items: flex-start !important; }
.pt-consent input { flex: none; margin-top: .2rem; }
.pt-consent span { font-size: .92rem; line-height: 1.45; font-weight: 400; }
.pt-form .btn { width: auto; }
@media (max-width: 520px) { .pt-form .btn { width: 100%; } .pill span { min-height: 44px; padding-inline: .9rem; } }

.pt-thanks { text-align: center; padding: clamp(1rem, 4vw, 2.5rem) 0; }
.pt-thanks:focus { outline: none; }
.pt-thanks .btn-row { justify-content: center; margin-top: 1.5rem; }
.pt-check { display: grid; place-items: center; width: 76px; height: 76px; margin: 0 auto 1.2rem; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 6px 0 #14633F; animation: pt-pop .6s var(--ease); }
@keyframes pt-pop { 0% { transform: scale(.3); opacity: 0; } 60% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }

.pt-next { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: 1.1rem; }
.pt-next li { display: grid; gap: .15rem; padding-left: 1rem; border-left: 3px solid var(--gold); }
.pt-next b { color: var(--gold); font-family: var(--display); }
.pt-next span { color: var(--on-dark-soft); font-size: .97rem; }

/* =================================================================
   EVENTS POP-UP
   ================================================================= */
.event-cta {
  position: fixed; z-index: 75; isolation: isolate;
  left: max(1rem, env(safe-area-inset-left)); bottom: max(1rem, env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: .75rem;
  width: max-content; max-width: min(390px, calc(100vw - 2rem));
  padding: .65rem 2.1rem .65rem .65rem; border-radius: 18px;
  background: var(--night); color: var(--on-dark);
  box-shadow: 0 18px 44px rgba(15, 12, 54, .45);
  opacity: 0; transform: translateY(28px) scale(.94); transform-origin: bottom left;
  transition: opacity .45s var(--ease), transform .55s cubic-bezier(.3, 1.4, .5, 1);
}
.event-cta::before {            /* moving kente edge */
  content: ""; position: absolute; inset: -2px; z-index: -1; border-radius: 20px;
  background: linear-gradient(90deg, var(--gold), var(--green), var(--red), var(--gold), var(--green));
  background-size: 250% 100%; animation: ec-edge 5s linear infinite;
}
.event-cta::after { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 18px; background: var(--night); }
.event-cta.in { opacity: 1; transform: none; }
.event-cta.out { opacity: 0; transform: translateY(20px) scale(.96); }
@keyframes ec-edge { to { background-position: -250% 0; } }

.ec-ticket { position: relative; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 13px; background: var(--gold); color: var(--night); transform: rotate(-6deg); }
.ec-dot { position: absolute; top: -4px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: var(--red); border: 2px solid var(--night); animation: ec-pulse 1.8s ease-out infinite; }
@keyframes ec-pulse { 0% { box-shadow: 0 0 0 0 rgba(200, 55, 45, .7); } 80%, 100% { box-shadow: 0 0 0 10px rgba(200, 55, 45, 0); } }
.ec-body { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.ec-body b { font: 700 1rem var(--display); letter-spacing: -.01em; }
.ec-body span { color: var(--on-dark-soft); font-size: .8rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ec-go { flex: none; display: inline-flex; align-items: center; min-height: 38px; padding: .45rem .9rem; border-radius: var(--r-pill); background: var(--gold); color: var(--night); font: 700 .85rem var(--body); text-decoration: none; white-space: nowrap; box-shadow: 0 3px 0 var(--gold-deep); transition: transform .2s var(--ease); }
.ec-go:hover { transform: translateY(-2px); }
.ec-x { position: absolute; top: 3px; right: 3px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; color: var(--on-dark-soft); font-size: 1.3rem; line-height: 1; cursor: pointer; }
.ec-x:hover { color: var(--gold); background: rgba(245, 238, 225, .08); }

@media (max-width: 640px) {
  .event-cta { left: 1rem; right: 1rem; width: auto; max-width: none; bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 70px); transform-origin: bottom center; }
  .ec-body { flex: 1; }
}
@media (max-width: 360px) { .ec-ticket { display: none; } .ec-go { padding-inline: .7rem; } }

/* =================================================================
   SNIFF — chat guide
   ================================================================= */
.sn-launch {
  position: fixed; z-index: 80; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom));
  display: inline-flex; align-items: center; gap: .6rem; height: 60px; padding: 0 1.2rem 0 .5rem;
  border: 0; border-radius: var(--r-pill); background: var(--gold); color: var(--night);
  font: 700 1rem var(--body); cursor: pointer;
  box-shadow: 0 5px 0 var(--gold-deep), 0 16px 34px rgba(15, 12, 54, .32);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.sn-launch:hover { transform: translateY(-2px); box-shadow: 0 7px 0 var(--gold-deep), 0 20px 38px rgba(15, 12, 54, .35); }
.sn-launch:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--gold-deep), 0 8px 18px rgba(15, 12, 54, .3); }
.sn-launch-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--indigo); }
.sn-launch-icon svg, .sn-avatar svg { width: 100%; height: 100%; padding: 4px; }
.sn-badge { display: none; position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); border: 2px solid var(--bone); animation: ec-pulse 1.8s ease-out infinite; }
.sn-launch.new .sn-badge { display: block; }
.sn-launch[aria-expanded="true"] .sn-launch-text::after { content: " (close)"; font-weight: 500; }
body:has(.cart-drawer.open) .sn-launch { opacity: 0; pointer-events: none; }

@media (max-width: 640px) {
  .sn-launch { width: 60px; padding: 0; justify-content: center; }
  .sn-launch-text { display: none; }
  .sn-launch-icon { width: 50px; height: 50px; }
  html.sn-lock .sn-launch { display: none; }
}

.sn-panel {
  position: fixed; z-index: 85; display: flex; flex-direction: column; overflow: hidden;
  right: max(1rem, env(safe-area-inset-right)); bottom: calc(max(1rem, env(safe-area-inset-bottom)) + 74px);
  width: min(396px, calc(100vw - 2rem)); height: min(620px, calc(100vh - 8rem)); height: min(620px, calc(100dvh - 8rem));
  background: var(--bone); border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 12, 54, .45), 0 0 0 1px rgba(var(--ink-rgb), .1);
  opacity: 0; transform: translateY(18px) scale(.96); transform-origin: bottom right;
  transition: opacity .25s ease, transform .35s var(--ease);
}
.sn-panel.open { opacity: 1; transform: none; }

.sn-head { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; background: var(--indigo); color: var(--on-dark); }
.sn-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; background: var(--indigo-2); display: grid; place-items: center; box-shadow: inset 0 0 0 2px rgba(244, 182, 63, .5); }
.sn-title { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.2; }
.sn-title b { font: 800 1.1rem var(--display); }
.sn-title small { display: flex; align-items: center; gap: .4rem; color: var(--on-dark-soft); font-size: .8rem; }
.sn-live { width: 8px; height: 8px; border-radius: 50%; background: #3CCB8A; box-shadow: 0 0 0 3px rgba(60, 203, 138, .25); }
.sn-reset, .sn-close { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 50%; background: rgba(245, 238, 225, .1); color: var(--on-dark); font-size: 1.5rem; line-height: 1; cursor: pointer; transition: background .2s, color .2s; }
.sn-reset:hover, .sn-close:hover { background: var(--gold); color: var(--night); }
.sn-kente { flex: none; height: 6px; background: repeating-linear-gradient(90deg, var(--gold) 0 36px, var(--night) 36px 40px, var(--green) 40px 66px, var(--gold) 66px 70px, var(--red) 70px 96px, var(--night) 96px 100px); }

.sn-log { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .75rem; padding: 1rem; scroll-behavior: smooth; }
.sn-msg { display: flex; flex-direction: column; gap: .45rem; max-width: 90%; animation: sn-in .35s var(--ease); }
.sn-msg.me { align-self: flex-end; align-items: flex-end; }
@keyframes sn-in { from { opacity: 0; transform: translateY(10px); } }
.sn-bubble { padding: .65rem .95rem; border-radius: 18px; font-size: .97rem; line-height: 1.45; white-space: pre-line; overflow-wrap: anywhere; }
.sn-msg.bot .sn-bubble { background: var(--card); color: var(--ink); border-bottom-left-radius: 6px; box-shadow: 0 2px 0 rgba(var(--ink-rgb), .07); }
.sn-msg.me .sn-bubble { background: var(--indigo); color: var(--on-dark); border-bottom-right-radius: 6px; }
.sn-links { display: flex; flex-wrap: wrap; gap: .4rem; }
.sn-link { display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .95rem; border-radius: var(--r-pill); background: var(--gold); color: var(--night); font: 700 .88rem var(--body); text-decoration: none; box-shadow: 0 3px 0 var(--gold-deep); transition: transform .2s var(--ease); }
.sn-link:hover { transform: translateY(-2px); }
.sn-note { align-self: center; padding: .2rem .8rem; border-radius: var(--r-pill); background: var(--bone-2); color: var(--ink-soft); font-size: .78rem; font-weight: 600; text-align: center; }
.sn-typing { display: inline-flex; align-items: center; gap: 5px; padding: .85rem 1rem !important; }
.sn-typing i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-soft); opacity: .4; animation: sn-dot 1s infinite ease-in-out; }
.sn-typing i:nth-child(2) { animation-delay: .15s; }
.sn-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes sn-dot { 40% { opacity: 1; transform: translateY(-4px); } }

.sn-chips { flex: none; display: flex; gap: .45rem; padding: .25rem 1rem .7rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.sn-chips::-webkit-scrollbar { display: none; }
.sn-chip { flex: none; min-height: 40px; padding: .4rem .95rem; border-radius: var(--r-pill); border: 2px solid var(--ink); background: transparent; color: var(--ink); font: 600 .88rem var(--body); white-space: nowrap; cursor: pointer; transition: background .2s, color .2s; }
.sn-chip:hover { background: var(--sel-bg); color: var(--sel-fg); }

.sn-form { flex: none; display: flex; gap: .5rem; padding: .65rem 1rem; background: var(--card); border-top: 1px solid rgba(var(--ink-rgb), .1); }
.sn-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 1.1rem; border: 2px solid var(--bone-2); border-radius: var(--r-pill); background: var(--bone); color: var(--ink); font: inherit; font-size: 16px; transition: border-color .2s, background .2s; }
.sn-form input:focus { outline: none; border-color: var(--ink); background: var(--card); }
.sn-send { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--indigo); color: var(--gold); cursor: pointer; transition: transform .2s var(--ease), background .2s; }
.sn-send:hover { background: var(--indigo-3); transform: scale(1.06); }
.sn-foot { flex: none; margin: 0; padding: 0 1rem .6rem; background: var(--card); color: var(--ink-soft); font-size: .74rem; text-align: center; }

/* Phones: full-screen sheet */
@media (max-width: 640px) {
  .sn-panel { inset: 0; width: 100%; height: 100vh; height: 100dvh; border-radius: 0; box-shadow: none; transform: translateY(26px); transform-origin: bottom center; }
  .sn-head { padding-top: max(.8rem, env(safe-area-inset-top)); }
  .sn-foot { padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
  .sn-msg { max-width: 92%; }
}
/* Landscape phones / very short windows: dock to the right, full height */
@media (max-height: 520px) and (min-width: 641px) {
  .sn-panel { top: max(.5rem, env(safe-area-inset-top)); bottom: .5rem; height: auto; }
  .sn-launch { height: 52px; }
}
/* Large screens: a little more room */
@media (min-width: 1500px) { .sn-panel { width: 430px; } .sn-bubble { font-size: 1rem; } }
@media (prefers-reduced-motion: reduce) {
  .sn-panel, .event-cta { transition: none !important; }
  .sn-panel.open, .event-cta.in { opacity: 1; transform: none; }
}

/* =================================================================
   Small-screen fixes for the existing footer (long email link pushed the page wider than a 320px phone)
   ================================================================= */
.footer-grid > * { min-width: 0; }
.flinks a { overflow-wrap: anywhere; }
@media (max-width: 420px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; padding: 3rem 0 2rem; } }
.news-form input[type="email"] { min-width: 0; max-width: 100%; }
@media (max-width: 420px) { .news-form .btn { width: 100%; } }
