/* ==========================================================================
   ПЕРЕМИКАЧ ШРИФТІВ ТА ЕКСПЕРИМЕНТАЛЬНОЇ ВЕРСІЇ
   ========================================================================== */

:root[data-font-preset="jost"] {
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Jost', -apple-system, BlinkMacSystemFont, sans-serif;
}

:root[data-font-preset="logo"] {
  --font-sans: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-heading: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.font-switcher {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 940;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.font-switcher__bar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-mode-switch {
  display: inline-flex;
  align-items: center;
  height: 38px;
  padding: 3px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #2A374C;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
}

.hero-mode-switch__btn {
  height: 100%;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-xs);
  background: transparent;
  color: #94A3B8;
  font-family: var(--font-sans);
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.hero-mode-switch__btn:hover { color: #FFFFFF; }
.hero-mode-switch__btn.is-active { background: var(--primary-green); color: #FFFFFF; }

.font-switcher__toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 13px;
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid #2A374C;
  border-radius: var(--radius-sm);
  color: #E2E8F0;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.font-switcher__toggle:hover,
.font-switcher.is-open .font-switcher__toggle {
  border-color: var(--primary-green);
  color: #FFFFFF;
}

.font-switcher__glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 2px 6px;
  border-radius: var(--radius-xs);
  background: rgba(99, 175, 56, 0.16);
  border: 1px solid rgba(99, 175, 56, 0.35);
  color: #86EFAC;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
}

.font-switcher__panel {
  display: none;
  width: 280px;
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid #2A374C;
  border-radius: var(--radius-md);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  padding: 10px;
  flex-direction: column;
  gap: 6px;
}

.font-switcher.is-open .font-switcher__panel { display: flex; }

.font-switcher__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 6px;
  border-bottom: 1px solid #2A374C;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #94A3B8;
}

.font-switcher__opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: var(--radius-xs);
  background: rgba(255, 255, 255, 0.03);
  color: #CBD5E1;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.font-switcher__opt:hover { background: rgba(255, 255, 255, 0.07); border-color: #334155; color: #FFFFFF; }
.font-switcher__opt.is-active { background: rgba(99, 175, 56, 0.14); border-color: var(--primary-green); color: #FFFFFF; }

.font-switcher__opt-name { display: block; font-size: 0.86rem; font-weight: 700; line-height: 1.25; }
.font-switcher__opt-note { display: block; font-size: 0.72rem; color: #94A3B8; line-height: 1.25; margin-top: 2px; }
.font-switcher__opt-sample { font-size: 1rem; font-weight: 700; color: #86EFAC; flex-shrink: 0; }

@media (max-width: 768px) {
  .font-switcher { right: 12px; bottom: 12px; }
  .font-switcher__bar { gap: 6px; }
  .hero-mode-switch { height: 34px; padding: 2px; }
  .hero-mode-switch__btn { padding: 0 8px; font-size: 0.72rem; }
  .font-switcher__toggle { height: 34px; padding: 0 10px; font-size: 0.76rem; }
  .font-switcher__panel { width: min(280px, calc(100vw - 24px)); }
}
