/* ==========================================================================
   landing.css - digibiz marketing pages: pieces the static template does not
   have but the app needs (cookie banner, language picker in the header,
   admin-written rich text). Uses the template's --dbk-* tokens so light and
   dark both follow.
   ========================================================================== */

/* ---- header: admin navigation can hold more and longer links than the template ---- */
.hp-bar .hp-menu a { white-space: nowrap; }
@media (max-width: 1279.98px) {
  .hp-bar .hp-bar-in { grid-template-columns: auto auto; justify-content: space-between; }
  .hp-bar .hp-menu { display: none; }
  .hp-bar .hp-burger { display: inline-flex; }
}

/* ---- language picker in .hp-bar ----
   the same pill as the user panel header: globe mark, current language, small chevron */
.hp-bar-act .language-switcher { display: flex; align-items: center; }
.hp-bar-act .language-switcher select.langu-swit { display: none !important; }
.hp-bar-act .language-switcher .langu-swit.nice-select {
  display: flex !important;
  align-items: center;
  gap: 7px;
  float: none;
  width: auto !important;
  min-width: 0 !important;
  height: 34px !important;
  line-height: 1 !important;
  padding-inline: 10px 24px;
  border: 1px solid var(--dbk-border) !important;
  background-color: transparent !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  font-weight: 500;
  font-size: 12.5px;
  color: var(--dbk-text-2) !important;
  transition: 0.16s;
}
.hp-bar-act .language-switcher .langu-swit.nice-select::before {
  content: "";
  flex: 0 0 auto;
  height: 14px;
  width: 14px;
  background: currentColor;
  opacity: 0.75;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") center/14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M2 12h20'/%3E%3Cpath d='M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z'/%3E%3C/svg%3E") center/14px no-repeat;
}
.hp-bar-act .language-switcher .langu-swit.nice-select .current { line-height: 1; font-size: 12.5px; color: inherit; }
.hp-bar-act .language-switcher .langu-swit.nice-select:hover {
  border-color: var(--dbk-border-strong) !important;
  background-color: var(--dbk-surface-2) !important;
}
.hp-bar-act .language-switcher .langu-swit.nice-select.open {
  border-color: var(--dbk-focus) !important;
  background-color: var(--dbk-surface-2) !important;
}
.hp-bar-act .language-switcher .langu-swit.nice-select::after {
  height: 5px;
  width: 5px;
  right: 11px;
  margin-top: -3px;
  border-bottom: 1.6px solid var(--dbk-muted);
  border-right: 1.6px solid var(--dbk-muted);
  -webkit-mask: none;
  mask: none;
  background: none;
}
.hp-bar-act .language-switcher .langu-swit.nice-select .list {
  min-width: 148px;
  inset-inline-start: auto;
  inset-inline-end: 0;
  width: auto;
}
[dir="rtl"] .hp-bar-act .language-switcher .langu-swit.nice-select { padding-inline: 10px 24px; }
[dir="rtl"] .hp-bar-act .language-switcher .langu-swit.nice-select::after { right: auto; left: 11px; }
@media (max-width: 767.98px) {
  .hp-bar-act .language-switcher,
  .hp-bar-act .hp-bar-login { display: none; }
}

/* ---- cookie banner ---- */
.hp-cookie {
  position: fixed;
  inset-inline: 16px;
  bottom: 16px;
  z-index: 1000;
  max-width: 560px;
  margin-inline-start: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--dbk-surface, #fff);
  color: var(--dbk-text, #0f172a);
  border: 1px solid var(--dbk-border, rgba(15, 23, 42, .08));
  box-shadow: var(--dbk-elev-3, 0 18px 50px rgba(15, 23, 42, .18));
}
.hp-cookie[hidden] { display: none; }
.hp-cookie-t { display: flex; align-items: center; gap: 8px; margin: 0 0 4px; font-weight: 700; }
.hp-cookie-p { margin: 0; font-size: 14px; color: var(--dbk-muted, #64748b); }
.hp-cookie-act { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

/* ---- admin-written HTML (dynamic pages, blog bodies, policies) ---- */
.hp-rich { color: var(--dbk-muted, #475569); line-height: 1.75; overflow-wrap: anywhere; }
.hp-rich h1, .hp-rich h2, .hp-rich h3, .hp-rich h4, .hp-rich h5, .hp-rich h6 {
  color: var(--dbk-text, #0f172a);
  margin: 1.4em 0 .5em;
  line-height: 1.3;
}
.hp-rich p, .hp-rich ul, .hp-rich ol { margin: 0 0 1em; }
.hp-rich ul, .hp-rich ol { padding-inline-start: 1.3em; }
.hp-rich ul { list-style: disc; }
.hp-rich ol { list-style: decimal; }
.hp-rich a { color: var(--dbk-accent, #2563eb); text-decoration: underline; }
.hp-rich img { max-width: 100%; height: auto; border-radius: 12px; }
.hp-rich table { width: 100%; border-collapse: collapse; margin: 0 0 1em; }
.hp-rich th, .hp-rich td { padding: 8px 10px; border: 1px solid var(--dbk-border, rgba(15, 23, 42, .1)); }
.hp-rich > :first-child { margin-top: 0; }

/* editor-pasted inline colours are written for a light page; in dark mode let the theme colour win */
.dark-theme .hp-rich [style*="color"] { color: inherit !important; }
.dark-theme .hp-rich [style*="background"] { background: transparent !important; }

/* ---- admin-sized lists: Our Story milestones take as many columns as there are rows (max 6) ---- */
@media (min-width: 1200px) {
  .hp-steps.hp-steps-n { grid-template-columns: repeat(var(--hp-n, 4), minmax(0, 1fr)); }
  .hp-steps.hp-steps-n.is-wrap::before { display: none; }
}
.hp-serv-i svg { width: 24px; height: 24px; }
.hp-serv-i img { width: 26px; height: 26px; object-fit: contain; }
.hp-step-i svg { width: 22px; height: 22px; }

/* ---- FAQ: heading stays at the top of its column and follows the reader down a long list ---- */
.hp-faq-head { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
@media (min-width: 992px) {
  .hp-faq-head { position: sticky; top: calc(var(--dbk-topbar-h, 72px) + 48px); }
}

/* ---- FAQ motion: the card's height is animated by the script in __faq; here the
   answer fades and slides in, and the mark turns back as soon as a close starts ---- */
@keyframes hp-q-answer-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.hp-q.is-opening .hp-q-a {
  animation: hp-q-answer-in 0.4s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both;
}
.hp-q .hp-q-a {
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.hp-q.is-closing .hp-q-a {
  opacity: 0;
  transform: translateY(-6px);
}
.hp-q .hp-q-x {
  transition: transform 0.38s cubic-bezier(0.22, 1, 0.36, 1), background 0.25s ease, color 0.25s ease;
}
.hp-q.is-closing .hp-q-x {
  transform: rotate(0deg);
  background: var(--dbk-surface-2);
  color: var(--dbk-text-2);
}
.hp-q > summary {
  transition: color 0.2s ease;
}
.hp-q > summary:hover {
  color: var(--dbk-pop);
}
@media (prefers-reduced-motion: reduce) {
  .hp-q.is-opening .hp-q-a { animation: none; }
  .hp-q .hp-q-a, .hp-q .hp-q-x { transition: none; }
}

/* RTL: the logo strip animates with translateX, which assumes left-to-right
   flow; under dir=rtl the copies stack from the right and leave a gap */
[dir="rtl"] .hp-marquee {
  direction: ltr;
}
