/* ============ Legal dropdown nav menu (for existing pages) ============ */
.nav-dropdown { position: relative; }
.nav-dropdown > button {
  background: none; border: none;
  color: var(--text-secondary, #a8a195);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  cursor: pointer;
  font-family: inherit;
  padding: 0.5rem 0;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 180ms ease;
}
.nav-dropdown > button:hover,
.nav-dropdown.open > button { color: var(--gold-light, #e4c989); }
.nav-dropdown > button::after { content: '⌄'; font-size: 0.85em; opacity: 0.7; }
.nav-dropdown-menu {
  position: absolute;
  top: 100%;
  min-width: 180px;
  background: rgba(10, 10, 12, 0.97);
  border: 1px solid var(--border-strong, rgba(201, 169, 97, 0.35));
  padding: 0.5rem 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  list-style: none;
  margin: 0;
}
html[dir="rtl"] .nav-dropdown-menu { right: 0; }
html[dir="ltr"] .nav-dropdown-menu,
html:not([dir="rtl"]) .nav-dropdown-menu { left: 0; }
.nav-dropdown.open .nav-dropdown-menu { opacity: 1; pointer-events: auto; transform: translateY(0); }
.nav-dropdown-menu li { display: block; }
.nav-dropdown-menu a {
  display: block !important;
  padding: 0.65rem 1.25rem !important;
  font-size: 0.85rem;
  color: var(--text-secondary, #a8a195);
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease;
}
.nav-dropdown-menu a::after { display: none !important; }
.nav-dropdown-menu a:hover, .nav-dropdown-menu a.active {
  background: rgba(201, 169, 97, 0.08);
  color: var(--gold-light, #e4c989);
}
@media (max-width: 968px) {
  .nav-dropdown-menu { position: static; opacity: 1; pointer-events: auto; transform: none; padding: 0.25rem 1rem 0.5rem; background: transparent; border: none; }
  .nav-dropdown > button { width: 100%; text-align: inherit; justify-content: space-between; }
  .nav-dropdown-menu a { padding: 0.4rem 0 !important; }
}

/* ============ Accessibility Widget ============ */

:root {
  --a11y-bg: rgba(10, 10, 12, 0.97);
  --a11y-border: rgba(201, 169, 97, 0.4);
  --a11y-gold: #c9a961;
  --a11y-gold-light: #d4b876;
  --a11y-text: #f0ead6;
  --a11y-muted: #8a8a92;
}

/* Floating trigger button */
.a11y-trigger {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px; height: 44px;
  background: var(--a11y-gold);
  color: #0a0a0c;
  border: 2px solid var(--a11y-gold-light);
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(201, 169, 97, 0.35);
  transition: transform 250ms ease, box-shadow 250ms ease, background 250ms ease;
}
.a11y-trigger:hover {
  transform: scale(1.08);
  box-shadow: 0 10px 26px rgba(201, 169, 97, 0.55);
  background: var(--a11y-gold-light);
}
.a11y-trigger:active { transform: scale(0.95); }
.a11y-trigger:focus-visible { outline: 3px solid #ffffff; outline-offset: 3px; }
.a11y-trigger svg { width: 22px; height: 22px; display: block; }

@media (max-width: 480px) {
  .a11y-trigger { width: 40px; height: 40px; bottom: 1.25rem; right: 1.25rem; }
  .a11y-trigger svg { width: 20px; height: 20px; }
}

/* Panel — slides in from the right side of the viewport */
.a11y-panel {
  position: fixed;
  top: 0;
  bottom: 0;
  right: 0;
  width: 360px;
  max-width: 90vw;
  background: var(--a11y-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--a11y-border);
  transform: translateX(100%);
  transition: transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
  font-family: 'Heebo', sans-serif;
  color: var(--a11y-text);
}
.a11y-panel.open { transform: translateX(0) !important; }

.a11y-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 350ms ease;
}
.a11y-overlay.open { opacity: 1; pointer-events: auto; }

/* Panel header */
.a11y-header {
  padding: 1.5rem 1.25rem 1rem;
  border-bottom: 1px solid var(--a11y-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem;
}
.a11y-title {
  font-family: 'Frank Ruhl Libre', 'Heebo', sans-serif;
  font-size: 1.4rem;
  font-weight: 500;
  color: var(--a11y-gold-light);
  margin: 0;
}
.a11y-close {
  background: transparent;
  border: 1px solid var(--a11y-border);
  color: var(--a11y-text);
  width: 36px; height: 36px;
  border-radius: 50%;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  transition: background 200ms ease, border-color 200ms ease;
}
.a11y-close:hover {
  background: rgba(201, 169, 97, 0.15);
  border-color: var(--a11y-gold);
}
.a11y-close:focus-visible { outline: 2px solid var(--a11y-gold); outline-offset: 2px; }

/* Panel body */
.a11y-body {
  padding: 1.25rem;
  overflow-y: auto;
  flex: 1;
}

.a11y-section {
  margin-bottom: 1.5rem;
}
.a11y-section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--a11y-muted);
  margin: 0 0 0.75rem 0;
}

/* Buttons grid */
.a11y-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
}
.a11y-btn {
  padding: 0.75rem 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--a11y-border);
  color: var(--a11y-text);
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.85rem;
  text-align: center;
  transition: all 200ms ease;
  display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
}
.a11y-btn:hover {
  background: rgba(201, 169, 97, 0.12);
  border-color: var(--a11y-gold);
}
.a11y-btn:focus-visible {
  outline: 2px solid var(--a11y-gold-light);
  outline-offset: 2px;
}
.a11y-btn.active {
  background: var(--a11y-gold);
  color: #0a0a0c;
  border-color: var(--a11y-gold);
  font-weight: 500;
}
.a11y-btn svg { width: 22px; height: 22px; flex-shrink: 0; }

/* Reset button */
.a11y-reset {
  width: 100%;
  padding: 0.85rem;
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.6);
  color: #ffb3bb;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  transition: background 200ms ease;
}
.a11y-reset:hover {
  background: rgba(220, 53, 69, 0.25);
}

/* Footer */
.a11y-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--a11y-border);
  font-size: 0.8rem;
  color: var(--a11y-muted);
  text-align: center;
}
.a11y-footer a {
  color: var(--a11y-gold);
  text-decoration: underline;
}

/* ============ Accessibility Mode Modifiers ============ */

/* Text sizes */
html.a11y-text-large body { font-size: 112.5%; }
html.a11y-text-xlarge body { font-size: 125%; }
html.a11y-text-xxlarge body { font-size: 140%; }

/* High contrast (black & white maximally) */
html.a11y-high-contrast body {
  background: #000 !important;
}
html.a11y-high-contrast body,
html.a11y-high-contrast h1, html.a11y-high-contrast h2,
html.a11y-high-contrast h3, html.a11y-high-contrast h4,
html.a11y-high-contrast p, html.a11y-high-contrast li,
html.a11y-high-contrast span, html.a11y-high-contrast a,
html.a11y-high-contrast label, html.a11y-high-contrast button {
  color: #fff !important;
  background-color: transparent !important;
}
html.a11y-high-contrast section,
html.a11y-high-contrast .why-card,
html.a11y-high-contrast .service-card,
html.a11y-high-contrast .testimonial-card,
html.a11y-high-contrast .instrument,
html.a11y-high-contrast .process-step,
html.a11y-high-contrast .faq-item,
html.a11y-high-contrast .contact-form,
html.a11y-high-contrast .track {
  background: #000 !important;
  border-color: #fff !important;
}
html.a11y-high-contrast a { color: #ffff00 !important; }
html.a11y-high-contrast .btn-primary,
html.a11y-high-contrast .btn-secondary {
  background: #fff !important;
  color: #000 !important;
  border-color: #fff !important;
}

/* Invert colors */
html.a11y-invert {
  filter: invert(1) hue-rotate(180deg);
}
html.a11y-invert img,
html.a11y-invert video,
html.a11y-invert .hero-video-frame,
html.a11y-invert .hero-deco {
  filter: invert(1) hue-rotate(180deg);
}

/* Grayscale */
html.a11y-grayscale { filter: grayscale(1); }

/* Underline links */
html.a11y-underline-links a { text-decoration: underline !important; }

/* Readable font - replace decorative with simple sans */
html.a11y-readable-font body,
html.a11y-readable-font h1, html.a11y-readable-font h2,
html.a11y-readable-font h3, html.a11y-readable-font h4,
html.a11y-readable-font p, html.a11y-readable-font li,
html.a11y-readable-font span, html.a11y-readable-font a,
html.a11y-readable-font div, html.a11y-readable-font button,
html.a11y-readable-font input, html.a11y-readable-font textarea,
html.a11y-readable-font label, html.a11y-readable-font em,
html.a11y-readable-font strong {
  font-family: 'Heebo', Arial, sans-serif !important;
  font-style: normal !important;
}

/* Disable animations */
html.a11y-no-motion *,
html.a11y-no-motion *::before,
html.a11y-no-motion *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}
html.a11y-no-motion video { animation-play-state: paused; }

/* Big cursor */
html.a11y-big-cursor,
html.a11y-big-cursor * {
  cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'><path fill='%23000' stroke='%23fff' stroke-width='1.5' d='M5.5 3.21V20.8c0 .45.54.67.85.35l4.86-4.86 2.85 6.78c.08.18.26.31.45.31h.05c.21 0 .42-.09.55-.26l3.93-5.16c.27-.36.05-.88-.4-.88h-3.16l-3.04-7.25h4.65c.27 0 .51-.18.55-.45.04-.27-.11-.5-.36-.6l-10.59-4.99c-.34-.18-.74.04-.74.42z'/></svg>") 6 6, auto !important;
}
