/* © 2024-2026 Mehdi TMIMI — Vivace Music (vivace-music.org) */
/* ═══════════════════════════════════════════════════════════════════════
   SITE CHROME — the header bar and footer shared by every page.
   Markup comes from site-chrome.mjs (sentinel blocks vc:nav / vc:footer).

   Self-contained on purpose: pages load main.css, learn.css, the ear,
   library, tools or Andalusian stylesheets, or the player bundle. Every rule
   here is namespaced .vc-* and sets what those files set on bare elements,
   and the legacy bare `footer {…}` rules are scoped to footer:not(.vc-footer).

   The bar is position:fixed with an in-flow .vc-spacer of the same height —
   not sticky: main.css puts overflow-x:hidden on html AND body, which makes
   body a scroll container that never scrolls, and sticky then pins to nothing.
   ═══════════════════════════════════════════════════════════════════════ */

:root {
  --vc-h: 64px;
  --vc-font: "Poppins", "Tajawal", system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", sans-serif;
  --vc-bg: rgba(255, 255, 255, 0.84);
  --vc-bg-solid: #ffffff;
  --vc-surface: #faf9f8;
  --vc-ink: #18161d;
  --vc-muted: #56535f;
  --vc-line: rgba(24, 22, 29, 0.10);
  --vc-hover: rgba(255, 110, 199, 0.10);
  --vc-active-bg: linear-gradient(135deg, rgba(255, 110, 199, 0.18), rgba(255, 179, 71, 0.22));
  /* Pink as TEXT on white: #b8196e is 6.0:1 (the brand #ff6ec7 is 2.5:1). */
  --vc-accent-ink: #b8196e;
  --vc-grad: linear-gradient(90deg, #ff6ec7, #ffb347, #1dd1a1, #54a0ff);
  --vc-warm: linear-gradient(135deg, #ff6ec7, #ff9a3d);
  --vc-shadow: 0 8px 28px rgba(24, 22, 29, 0.08);
  --vc-focus: #3a86ff;
}
:root[data-theme="dark"],
html[data-vui-mode="dark"] {
  --vc-bg: rgba(13, 13, 17, 0.80);
  --vc-bg-solid: #0f0f14;
  --vc-surface: #0b0b0f;
  --vc-ink: #f1f0f5;
  --vc-muted: #aeabb9;
  --vc-line: rgba(255, 255, 255, 0.10);
  --vc-hover: rgba(255, 110, 199, 0.14);
  --vc-active-bg: linear-gradient(135deg, rgba(255, 110, 199, 0.26), rgba(255, 179, 71, 0.18));
  --vc-accent-ink: #ff9ad8;
  --vc-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}
@media (max-width: 1099px) {
  :root { --vc-h: 58px; }
}

/* Anchors (#team, #faq…) land below the bar, not under it. */
html { scroll-padding-top: calc(var(--vc-h) + 12px); }

.vc-bar, .vc-bar *, .vc-bar *::before, .vc-bar *::after,
.vc-footer, .vc-footer *, .vc-footer *::before, .vc-footer *::after { box-sizing: border-box; }

/* ── Header bar ─────────────────────────────────────────────────────── */
.vc-bar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 10100;
  height: var(--vc-h);
  margin: 0;
  padding: 0;
  font-family: var(--vc-font);
  font-size: 16px;
  line-height: 1.4;
  text-align: start;
  color: var(--vc-ink);
  background: var(--vc-bg);
  -webkit-backdrop-filter: saturate(1.6) blur(14px);
  backdrop-filter: saturate(1.6) blur(14px);
  border-bottom: 1px solid var(--vc-line);
  transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.vc-bar.is-scrolled { box-shadow: var(--vc-shadow); }
.vc-spacer { display: block; height: var(--vc-h); margin: 0; padding: 0; flex: none; }

.vc-bar__inner {
  height: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 clamp(12px, 3vw, 28px);
  display: flex;
  align-items: center;
  gap: 12px;
}

.vc-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: none;
  margin-inline-end: auto;
  padding: 2px 4px 2px 0;
  border-radius: 12px;
  color: var(--vc-ink);
  text-decoration: none;
  font-weight: 800;
  transform: none;
}
.vc-brand picture { display: contents; }
.vc-brand__mark { display: block; width: 40px; height: 40px; max-width: none; transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1); }
.vc-brand:hover .vc-brand__mark { transform: rotate(-8deg) scale(1.06); }
.vc-brand__word {
  font-family: var(--vc-font);
  font-weight: 800;
  font-size: 1.12rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  color: var(--vc-ink);
}
.vc-brand__word em {
  font-style: normal;
  font-weight: 700;
  margin-inline-start: 1px;
  background: var(--vc-warm);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}

.vc-nav { display: flex; align-items: center; min-width: 0; }
.vc-nav__list,
.vc-menu__list { list-style: none; margin: 0; padding: 0; }
.vc-nav__list { display: flex; align-items: center; gap: 2px; }
.vc-nav__list > li,
.vc-menu__list > li { list-style: none; margin: 0; padding: 0; }
.vc-nav__link {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 0 13px;
  border-radius: 999px;
  font-family: var(--vc-font);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--vc-muted);
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.2s ease, background-color 0.2s ease;
}
.vc-nav__link:hover { color: var(--vc-ink); background: var(--vc-hover); text-decoration: none; }
.vc-nav__link.is-active { color: var(--vc-ink); font-weight: 700; background: var(--vc-active-bg); }
.vc-nav__link.is-active::after {
  content: '';
  position: absolute;
  inset-inline: 24%;
  bottom: 5px;
  height: 2px;
  border-radius: 2px;
  background: var(--vc-warm);
}

.vc-bar__actions { display: flex; align-items: center; gap: 6px; flex: none; margin-inline-start: 6px; }
.vc-iconbtn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  margin: 0;
  padding: 0;
  border-radius: 12px;
  border: 1px solid var(--vc-line);
  background: transparent;
  color: var(--vc-ink);
  font: inherit;
  line-height: 1;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.vc-iconbtn:hover { background: var(--vc-hover); border-color: rgba(255, 110, 199, 0.45); }
.vc-iconbtn:active { transform: scale(0.94); }
.vc-bar :focus-visible,
.vc-footer :focus-visible { outline: 3px solid var(--vc-focus); outline-offset: 2px; }
.vc-theme__sun { display: none; }
:root[data-theme="dark"] .vc-theme__moon { display: none; }
:root[data-theme="dark"] .vc-theme__sun { display: block; }

.vc-burger { display: none; }
.vc-burger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform 0.25s ease, opacity 0.2s ease;
}
.vc-burger span + span { margin-top: 4px; }
.vc-bar.is-open .vc-burger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.vc-bar.is-open .vc-burger span:nth-child(2) { opacity: 0; }
.vc-bar.is-open .vc-burger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.vc-menu { display: none; }

@media (max-width: 1099px) {
  .vc-nav { display: none; }
  .vc-burger { display: inline-flex; flex-direction: column; align-items: center; justify-content: center; }
  .vc-menu {
    display: block;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    max-height: calc(100vh - var(--vc-h));
    max-height: calc(100dvh - var(--vc-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 10px clamp(12px, 3vw, 28px) 18px;
    background: var(--vc-bg-solid);
    border-bottom: 1px solid var(--vc-line);
    box-shadow: var(--vc-shadow);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
  }
  .vc-bar.is-open .vc-menu {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
  }
}
.vc-menu__list { display: grid; gap: 2px; max-width: 640px; margin: 0 auto; }
.vc-menu__link {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  font-family: var(--vc-font);
  font-size: 1rem;
  font-weight: 500;
  color: var(--vc-ink);
  text-decoration: none;
}
.vc-menu__link:hover { background: var(--vc-hover); text-decoration: none; }
.vc-menu__link.is-active { background: var(--vc-active-bg); font-weight: 700; }
.vc-menu__support {
  display: block;
  max-width: 640px;
  margin: 12px auto 0;
  padding: 12px 16px;
  border-radius: 12px;
  border: 1px dashed rgba(255, 110, 199, 0.5);
  font-family: var(--vc-font);
  font-weight: 600;
  text-align: center;
  color: var(--vc-accent-ink);
  text-decoration: none;
}
@media (max-width: 420px) {
  .vc-brand__word { font-size: 1.02rem; }
  .vc-brand__mark { width: 36px; height: 36px; }
}

/* ── Footer ─────────────────────────────────────────────────────────── */
footer.vc-footer {
  position: relative;
  display: block;
  margin: 0;
  padding: 0;
  text-align: start;
  font-family: var(--vc-font);
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--vc-muted);
  background: var(--vc-surface);
  border: 0;
  border-top: 1px solid var(--vc-line);
  opacity: 1;
  transform: none;
}
footer.vc-footer::before {
  content: '';
  position: absolute;
  top: -1px;
  inset-inline: 0;
  height: 3px;
  background: var(--vc-grad);
  opacity: 0.9;
}
.vc-footer__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 52px clamp(16px, 4vw, 40px) 30px;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
}
.vc-footer .vc-brand { margin: 0 0 14px; }
.vc-footer .vc-footer__tag {
  margin: 0 0 18px;
  max-width: 38ch;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--vc-muted);
}
.vc-footer .vc-footer__h {
  margin: 0 0 10px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--vc-ink);
}
.vc-footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.vc-footer__col li { list-style: none; margin: 0; padding: 0; }
.vc-footer .vc-footer__col a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--vc-muted);
  text-decoration: none;
  transform: none;
  transition: color 0.2s ease;
}
.vc-footer .vc-footer__col a:hover { color: var(--vc-accent-ink); transform: none; }

.vc-social { display: flex; flex-wrap: wrap; gap: 8px; }
.vc-footer .vc-social__link {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--vc-line);
  color: var(--vc-ink);
  background: transparent;
  text-decoration: none;
  transform: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.vc-footer .vc-social__link:hover {
  color: #fff;
  border-color: transparent;
  background: var(--vc-warm);
  transform: translateY(-2px);
}

.vc-footer__base {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px clamp(16px, 4vw, 40px) 28px;
  border-top: 1px solid var(--vc-line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 24px;
}
.vc-footer .vc-footer__base p { margin: 0; font-size: 0.85rem; line-height: 1.6; color: var(--vc-muted); }
/* The vivid pink→orange measured 2.5:1 on white; light mode gets the
   deepened pair (5.4:1 / 4.9:1), dark keeps the brand pair (7.8:1). */
.vc-footer a.vc-creator {
  font-weight: 700;
  color: #c2185b;
  text-decoration: none;
  background: linear-gradient(135deg, #c2185b, #a8590c);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transform: none;
}
:root[data-theme="dark"] .vc-footer a.vc-creator,
html[data-vui-mode="dark"] .vc-footer a.vc-creator {
  color: #ff6ec7;
  background: linear-gradient(135deg, #ff6ec7, #ffa502);
  -webkit-background-clip: text;
  background-clip: text;
}
.vc-footer a.vc-creator:hover { text-decoration: underline; text-decoration-color: #ff6ec7; }

@media (max-width: 760px) {
  .vc-footer__inner { grid-template-columns: 1fr 1fr; gap: 28px 20px; padding-top: 40px; }
  .vc-footer__brand { grid-column: 1 / -1; }
  .vc-footer__base { flex-direction: column; justify-content: center; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .vc-bar, .vc-menu, .vc-burger span, .vc-brand__mark, .vc-iconbtn,
  .vc-nav__link, .vc-footer .vc-social__link { transition: none !important; }
}
@media print {
  .vc-bar, .vc-spacer, .vc-footer { display: none !important; }
}
