/* Promo link in the site header (all pages).
   Desktop: the last nav item, set apart by a hairline divider, with gradient text and a live dot.
   Mobile: a dot on the menu button, and a highlighted first row inside the menu. */

/* ---- Desktop nav item ---- */
.vx-promo-li { position: relative; display: flex; align-items: center; }
.vx-promo-li::before {
  content: '';
  position: absolute;
  left: -0.875rem;
  top: 50%;
  width: 1px;
  height: 14px;
  margin-top: -7px;
  background: currentColor;
  opacity: 0.18;
}
/* Arrives right after the other nav items on the animated home header. */
.hdr-nav > li.vx-promo-li { animation-delay: 615ms; }

.vx-promo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  font-weight: 800;
}
.vx-promo-text {
  background: linear-gradient(90deg, #f59e0b, #f97316, #e11d48, #f97316, #f59e0b);
  background-size: 300% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: vxp-drift 6s ease-in-out infinite;
}
.vx-promo-arrow {
  width: 12px;
  height: 12px;
  color: #f97316;
  opacity: 0;
  transform: translate(-4px, 4px);
  transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.vx-promo-link:hover .vx-promo-arrow,
.vx-promo-link:focus-visible .vx-promo-arrow { opacity: 1; transform: none; }
.vx-promo-link:focus-visible { outline: 3px solid #fdba74; outline-offset: 4px; border-radius: 6px; }

/* ---- Live dot (shared) ---- */
.vx-promo-dot { position: relative; width: 6px; height: 6px; flex: none; border-radius: 9999px; background: #f97316; }
.vx-promo-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #f97316;
  animation: vxp-ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}

/* ---- Mobile: dot on the menu button ---- */
summary:has(> .vx-menu-dot), #menu-button { position: relative; }
.vx-menu-dot {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 9999px;
  background: #f97316;
  box-shadow: 0 0 0 2px #fff;
}
#menu-button .vx-menu-dot { box-shadow: 0 0 0 2px #05070d; }
.vx-menu-dot::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: #f97316;
  animation: vxp-ping 2.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
details[open] > summary > .vx-menu-dot,
#menu-button[aria-expanded="true"] .vx-menu-dot { display: none; }

/* ---- Mobile: first row inside the menu ---- */
.vx-promo-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 0.375rem;
  padding: 0.75rem;
  background: linear-gradient(90deg, rgba(249, 115, 22, 0.12), rgba(225, 29, 72, 0.06));
  box-shadow: inset 0 0 0 1px rgba(249, 115, 22, 0.25);
  text-decoration: none;
}
.vx-promo-row .vx-promo-sub { margin-left: auto; display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.75rem; font-weight: 700; opacity: 0.6; }
.vx-promo-sub-arrow { width: 11px; height: 11px; }

@keyframes vxp-drift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes vxp-ping {
  0% { transform: scale(1); opacity: 0.7; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .vx-promo-text, .vx-promo-dot::after, .vx-menu-dot::after { animation: none; }
}

/* Legal trust badge in the footer (all pages).
   Collapsed: OSS badge + KBLI codes as tidy mono chips. Open: cards with plain-language scope + official KBLI title. */
.vx-legal { margin-top: 0.875rem; max-width: 46rem; font-size: 0.75rem; color: #94a3b8; }
.vx-legal--center { margin-left: auto; margin-right: auto; }
.vx-legal > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.375rem 0.5rem;
  list-style: none;
  cursor: pointer;
  border-radius: 8px;
}
.vx-legal > summary::-webkit-details-marker { display: none; }
.vx-legal--center > summary { justify-content: center; }
.vx-legal > summary:focus-visible { outline: 2px solid #93c5fd; outline-offset: 4px; }

.vx-legal__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.25);
  color: #6ee7b7;
  font-weight: 700;
}
.vx-legal__badge::before { content: ''; width: 6px; height: 6px; border-radius: 9999px; background: #34d399; }
.vx-legal__label { margin: 0 0.25rem; font-weight: 700; letter-spacing: 0.08em; color: #64748b; }
.vx-legal__codes { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 0.25rem; }
.vx-legal code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
}
.vx-legal__codes code {
  padding: 0.15rem 0.4rem;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
  color: #cbd5e1;
}
.vx-legal__toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: 0.25rem;
  font-weight: 700;
  color: #cbd5e1;
  transition: color 0.2s ease;
}
.vx-legal__toggle::after {
  content: '';
  width: 6px;
  height: 6px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.25s ease, margin 0.25s ease;
}
.vx-legal > summary:hover .vx-legal__toggle { color: #fff; }
.vx-legal[open] .vx-legal__toggle::after { transform: rotate(-135deg); margin-top: 3px; }

.vx-legal__grid {
  margin: 0.875rem auto 0;
  padding: 0;
  max-width: 40rem;
  list-style: none;
  text-align: left;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  animation: vxl-in 0.3s ease;
}
.vx-legal:not(.vx-legal--center) .vx-legal__grid { margin-left: 0; }
.vx-legal__grid li {
  display: grid;
  grid-template-columns: 5.25rem 1fr;
  column-gap: 0.75rem;
  align-items: baseline;
  padding: 0.65rem 1rem;
}
.vx-legal__grid li + li { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.vx-legal__grid code { grid-row: span 2; color: #93c5fd; }
.vx-legal__grid strong { font-size: 0.8125rem; font-weight: 700; line-height: 1.4; color: #e2e8f0; }
.vx-legal__grid span { font-size: 0.6875rem; line-height: 1.45; color: #64748b; }

@keyframes vxl-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .vx-legal__grid { animation: none; }
  .vx-legal__toggle::after { transition: none; }
}
