/**
 * a11y.css — Zeyvera accessibility & mobile overrides
 * Injected on all marketing pages after the page's own <style> block.
 *
 * Covers:
 *  - Focus-visible ring on every interactive element
 *  - prefers-reduced-motion: disable scroll animations
 *  - Contrast fixes for --text-dim on dark backgrounds
 *  - Mobile hamburger nav (JS in nav-mobile.js)
 *  - Touch target minimums
 *  - Skip-to-content link
 */

/* ── Skip link ─────────────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 10000;
  background: #c9a96e;
  color: #0c0c0a;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0 0 6px 6px;
  text-decoration: none;
}
.skip-link:focus {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
  outline: 3px solid #0c0c0a;
}

/* ── Focus-visible ring (all interactive elements) ─────────────────── */
:focus-visible {
  outline: 2px solid #c9a96e !important;
  outline-offset: 3px !important;
}

/* Remove default ugly outline on non-keyboard focus */
:focus:not(:focus-visible) {
  outline: none;
}

/* Extra specificity for buttons and links */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #c9a96e !important;
  outline-offset: 3px !important;
  border-radius: 3px;
}

/* Form fields get a gold border glow on focus */
.form-group input:focus-visible,
.form-group select:focus-visible,
.form-group textarea:focus-visible {
  border-color: #c9a96e !important;
  box-shadow: 0 0 0 3px rgba(201, 169, 110, 0.18) !important;
}

/* ── Contrast fix: raise --text-dim from #7a7165 (3.3:1) ───────────── */
/* We bump it to #9a9286 which achieves ~4.6:1 on #0c0c0a */
:root {
  --text-dim-accessible: #9a9286;
}

/* Override specific uses that render body-size text in --text-dim */
.footer-copy,
.footer-links a,
.nav-link,
.disclaimer-bar p,
.form-note,
.proof-stat .desc,
.step-desc,
.contact-detail,
.founder-region,
.founder-linkedin {
  color: #9a9286 !important;
}

/* Hover states also raised for text-mid (#b8ad9e is ~6.3:1 — fine) */

/* ── Touch target minimums (44px) ──────────────────────────────────── */
.nav-link,
.nav-dropdown-btn,
.btn-nav,
.btn-primary,
.btn-submit,
.tier-cta,
.footer-links a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Chat bubble is already 56px — fine */

/* ── prefers-reduced-motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  /* Disable scroll animations — show all elements immediately */
  .fade-up,
  .fade-up-delay-1,
  .fade-up-delay-2,
  .fade-up-delay-3,
  .fade-up-delay-4,
  .fade-up-delay-5,
  .fade-up-delay-6,
  .fade-up-delay-7 {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  /* Disable pulse animations */
  .hero-eyebrow .dot,
  .zw-dot {
    animation: none !important;
  }

  /* Disable all transitions */
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Mobile hamburger nav ──────────────────────────────────────────── */
#nav-hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 8px;
  min-height: 44px;
  min-width: 44px;
}
#nav-hamburger .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: #b8ad9e;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
#nav-hamburger[aria-expanded="true"] .bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
#nav-hamburger[aria-expanded="true"] .bar:nth-child(2) {
  opacity: 0;
}
#nav-hamburger[aria-expanded="true"] .bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 640px) {
  #nav-hamburger {
    display: flex;
  }

  .nav-right {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(280px, 80vw);
    background: #131310;
    border-left: 1px solid rgba(255,255,255,0.08);
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform 0.25s ease;
    z-index: 499;
  }

  .nav-right.nav-open {
    transform: translateX(0);
  }

  /* Overlay behind drawer */
  #nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 498;
  }
  #nav-overlay.visible {
    display: block;
  }

  .nav-right .nav-link,
  .nav-right .nav-dropdown-btn {
    font-size: 1.1rem;
    color: #b8ad9e !important;
    padding: 0.85rem 0;
    width: 100%;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    min-height: 52px;
  }

  .nav-right .btn-nav {
    margin-top: 1.5rem;
    width: 100%;
    justify-content: center;
    padding: 0.9rem 1.5rem;
    font-size: 1rem;
  }

  /* Dropdown in mobile drawer — always expanded */
  .nav-dropdown-menu {
    position: static;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    background: transparent;
    border: none;
    padding: 0;
    min-width: unset;
  }

  .nav-dropdown-item {
    padding: 0.6rem 0.75rem 0.6rem 1rem;
    font-size: 1rem;
    color: #b8ad9e;
    min-height: 44px;
  }
}

/* ── Hero headline mobile cap (max 42px = 2.625rem) ────────────────── */
@media (max-width: 640px) {
  .hero h1 {
    font-size: clamp(2.2rem, 8vw, 2.625rem) !important;
    letter-spacing: -1px !important;
  }

  /* Full-width CTA buttons on mobile */
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
  .hero-ctas .btn-primary {
    justify-content: center;
    width: 100%;
  }

  /* Body text minimum 16px */
  body {
    font-size: 1rem;
  }

  /* Ensure no horizontal scroll */
  .steps-flow {
    display: none !important;
  }

  /* Pricing grid: single column centered */
  .pricing-grid {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Table: horizontal scroll wrapper already on the page */
}

/* ── ARIA live region for form feedback ────────────────────────────── */
/* The existing #form-success and #form-error just need aria attrs —
   handled via JS in nav-mobile.js */

/* ── Outline CTA button (used on pages without their own btn styles) ── */
.btn-outline-gold {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: transparent;
    border: 1px solid var(--gold, #c9a96e);
    color: var(--gold, #c9a96e);
    font-family: 'Satoshi', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-decoration: none;
    border-radius: 3px;
    transition: background 0.2s ease, color 0.2s ease;
    min-height: 44px;
}
.btn-outline-gold:hover,
.btn-outline-gold:focus-visible {
    background: var(--gold, #c9a96e);
    color: #0c0c0a;
}

/* ── Font loading performance ──────────────────────────────────────── */
/* font-display: swap is set via the Google Fonts URL &display=swap param */
