/* Shringara accessibility — optional layer; default theme unchanged */

/* Ensure [hidden] wins over display utilities */
.nav-a11y [hidden],
.a11y-panel[hidden],
.a11y-fab[hidden] {
  display: none !important;
}

/* Header cluster: Listen + A−/A/A+ + more */
.nav-a11y {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-right: 0.1rem;
  max-width: min(100%, 26rem);
}

.nav-a11y-audio-idle,
.nav-a11y-audio-active {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.nav-a11y-btn,
.nav-a11y-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 34px;
  min-width: 34px;
  padding: 0.2rem 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(245, 239, 224, 0.8);
  font-family: 'EB Garamond', serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition: color 0.2s, border-color 0.2s, background 0.2s;
}

.nav-a11y-btn:hover,
.nav-a11y-more:hover,
.nav-a11y-btn:focus-visible,
.nav-a11y-more:focus-visible {
  color: var(--gold);
  border-color: rgba(201, 168, 76, 0.4);
  outline: none;
}

.nav-a11y-ico {
  display: block;
  flex-shrink: 0;
  opacity: 0.9;
}

.nav-a11y-more {
  letter-spacing: 0.18em;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.2rem 0.4rem;
}

.nav-a11y-live {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1024px) {
  .nav-a11y {
    order: 2;
    margin-left: auto;
    position: relative;
    z-index: 903;
  }
  .nav-hbg {
    order: 3;
  }
  .nav-brand {
    order: 1;
  }
}

@media (max-width: 520px) {
  .nav-a11y {
    gap: 0.15rem;
    max-width: calc(100vw - 7.5rem);
  }
  .nav-a11y-btn,
  .nav-a11y-more {
    min-height: 40px;
  }
}

/*
  Text size — fixed levels via --a11y-text-scale on html (rem root).
  A− = smaller, A = default/base, A+ = larger.
  Selecting the same level again never compounds (attribute + variable replaced).
*/
html {
  --a11y-text-scale: 1;
  font-size: calc(100% * var(--a11y-text-scale));
}
html[data-a11y-text='small'] {
  --a11y-text-scale: 0.9;
}
html[data-a11y-text='normal'] {
  --a11y-text-scale: 1;
}
html[data-a11y-text='large'] {
  --a11y-text-scale: 1.1875;
}

html[data-a11y-text='small'] body,
html[data-a11y-text='large'] body {
  overflow-x: clip;
}

html[data-a11y-text='large'] p,
html[data-a11y-text='large'] li,
html[data-a11y-text='large'] .lead,
html[data-a11y-text='large'] .about-text,
html[data-a11y-text='large'] .faq-a-inner,
html[data-a11y-text='large'] .faq-q,
html[data-a11y-text='large'] .cms-card-intro,
html[data-a11y-text='large'] .cms-body,
html[data-a11y-text='large'] .prog-desc,
html[data-a11y-text='large'] .legal-page,
html[data-a11y-text='large'] .footer-copy,
html[data-a11y-text='large'] .join-card,
html[data-a11y-text='large'] label,
html[data-a11y-text='large'] input,
html[data-a11y-text='large'] textarea {
  line-height: 1.85;
  overflow-wrap: anywhere;
  word-break: break-word;
}

html[data-a11y-text='large'] .c,
html[data-a11y-text='large'] .cw {
  max-width: min(1100px, 100%);
  padding-left: max(1rem, min(2.5rem, 4vw));
  padding-right: max(1rem, min(2.5rem, 4vw));
}

html[data-a11y-text='large'] .nav {
  flex-wrap: wrap;
  row-gap: 0.35rem;
}

html[data-a11y-text='large'] .nav-links {
  gap: 0.85rem 1rem;
  max-width: 100%;
}

html[data-a11y-text='large'] .nav-links a,
html[data-a11y-text='large'] .btn,
html[data-a11y-text='large'] .join-link {
  white-space: normal;
  overflow-wrap: anywhere;
}

html[data-a11y-text='large'] .cms-card,
html[data-a11y-text='large'] .prog-card,
html[data-a11y-text='large'] .join-card,
html[data-a11y-text='large'] .gap-card,
html[data-a11y-text='large'] .team-card,
html[data-a11y-text='large'] .v-card {
  overflow-wrap: anywhere;
  min-width: 0;
}

html[data-a11y-text='large'] .a11y-panel {
  max-height: min(72vh, 36rem);
  overflow-y: auto;
  overflow-x: hidden;
}

/*
  Fluid clamp() sizes use vw, which ignores the html rem root.
  Multiply vw terms by --a11y-text-scale so A− / A+ still affect those headings.
*/
html[data-a11y-text='small'] .hero-h1,
html[data-a11y-text='large'] .hero-h1 {
  font-size: clamp(3rem, calc(9vw * var(--a11y-text-scale)), 7.5rem);
}
html[data-a11y-text='small'] .hero-pre,
html[data-a11y-text='large'] .hero-pre {
  font-size: clamp(0.88rem, calc(1.8vw * var(--a11y-text-scale)), 1.05rem);
}
html[data-a11y-text='small'] .hero-sub,
html[data-a11y-text='large'] .hero-sub {
  font-size: clamp(0.9rem, calc(1.6vw * var(--a11y-text-scale)), 1.1rem);
}
html[data-a11y-text='small'] .section-title,
html[data-a11y-text='large'] .section-title {
  font-size: clamp(2rem, calc(4vw * var(--a11y-text-scale)), 3.6rem);
}
html[data-a11y-text='small'] .lead,
html[data-a11y-text='large'] .lead {
  font-size: clamp(1rem, calc(1.6vw * var(--a11y-text-scale)), 1.18rem);
}

/* High contrast */
html.a11y-contrast {
  --crimson: #b01e1e;
  --wine: #7a1010;
  --deep-wine: #4a0808;
  --gold: #e0b84a;
  --ivory: #fff8ea;
  --black: #050403;
  --charcoal: #171310;
}
html.a11y-contrast body {
  color: #f7f0e2;
}
html.a11y-contrast .s-ivory {
  background: #fff8ea;
  color: #1a120e;
}
html.a11y-contrast .s-ivory .lead,
html.a11y-contrast .about-text,
html.a11y-contrast .vision-pillar p,
html.a11y-contrast .legal-page .lead,
html.a11y-contrast .cms-card-intro,
html.a11y-contrast .cms-body {
  color: #2a1d16;
}
html.a11y-contrast .nav {
  background: rgba(5, 4, 3, 0.97);
  border-bottom-color: rgba(224, 184, 74, 0.35);
}
html.a11y-contrast .nav-links a,
html.a11y-contrast .nav-a11y-btn {
  color: #f7f0e2;
}
html.a11y-contrast .btn-outline-light {
  border-color: #f7f0e2;
  color: #f7f0e2;
}
html.a11y-contrast .gap-card,
html.a11y-contrast .join-card,
html.a11y-contrast .cms-card {
  box-shadow: inset 0 0 0 1px rgba(224, 184, 74, 0.35);
}
html.a11y-contrast a:hover,
html.a11y-contrast .join-link,
html.a11y-contrast .faq-q {
  text-decoration-thickness: 2px;
}

/* Colour safe — preserve palette intent; improve distinguishability */
html.a11y-colour-safe {
  --crimson: #9c2a1f;
  --wine: #6e241c;
  --deep-wine: #421812;
  --gold: #c4a035;
}
html.a11y-colour-safe .btn-crimson,
html.a11y-colour-safe .mq,
html.a11y-colour-safe .s-crimson {
  background: #8f2f22;
}
html.a11y-colour-safe .s-ivory .eyebrow,
html.a11y-colour-safe .s-ivory .section-title em,
html.a11y-colour-safe .about-pull {
  color: #8a2e22;
}
html.a11y-colour-safe .faq-item.open .faq-q,
html.a11y-colour-safe .nav-links a[aria-current='page'],
html.a11y-colour-safe .a11y-toggle.is-on,
html.a11y-colour-safe .a11y-btn.is-active {
  color: #c4a035;
  text-decoration: underline;
  text-underline-offset: 0.25em;
}
html.a11y-colour-safe .a11y-toggle.is-on {
  border-style: solid;
  border-width: 1px;
}

/* Reduce motion */
html.a11y-reduce-motion,
html.a11y-reduce-motion * {
  scroll-behavior: auto !important;
}
html.a11y-reduce-motion .rv {
  opacity: 1 !important;
  transform: none !important;
  transition: none !important;
}
html.a11y-reduce-motion .hero-mark,
html.a11y-reduce-motion .hero-pre,
html.a11y-reduce-motion .hero-h1,
html.a11y-reduce-motion .hero-sub,
html.a11y-reduce-motion .hero-ctas,
html.a11y-reduce-motion .hero-scroll,
html.a11y-reduce-motion .mq-track,
html.a11y-reduce-motion .hero-scroll-lbl::after {
  animation: none !important;
}
html.a11y-reduce-motion .mq-track {
  transform: none !important;
}
html.a11y-reduce-motion .faq-a,
html.a11y-reduce-motion .nav-mob,
html.a11y-reduce-motion .nav-hbg span,
html.a11y-reduce-motion .team-modal-backdrop,
html.a11y-reduce-motion .team-modal-panel,
html.a11y-reduce-motion .team-modal-photo,
html.a11y-reduce-motion .team-modal-copy,
html.a11y-reduce-motion .join-idea .idea-form-wrap,
html.a11y-reduce-motion .join-idea .idea-form,
html.a11y-reduce-motion .join-idea .idea-confirm,
html.a11y-reduce-motion .a11y-panel,
html.a11y-reduce-motion .a11y-fab {
  transition: none !important;
}

/* FAB + panel */
.a11y-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 940;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0.55rem 0.95rem;
  border: 1px solid rgba(201, 168, 76, 0.35);
  border-radius: 999px;
  background: rgba(13, 10, 8, 0.92);
  color: var(--ivory);
  font-family: 'EB Garamond', serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
}
.a11y-fab:hover,
.a11y-fab:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.a11y-fab-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.55rem;
  height: 1.55rem;
  border: 1px solid rgba(201, 168, 76, 0.45);
  border-radius: 50%;
  font-family: 'Playfair Display', serif;
  font-size: 0.85rem;
}
.a11y-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 4.5rem;
  z-index: 941;
  width: min(22rem, calc(100vw - 2rem));
  max-height: min(70vh, 34rem);
  overflow: auto;
  padding: 1.15rem 1.2rem 1.25rem;
  background: rgba(13, 10, 8, 0.97);
  border: 1px solid rgba(201, 168, 76, 0.28);
  color: var(--ivory);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.a11y-panel[hidden] {
  display: none !important;
}
.a11y-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.a11y-panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  margin: 0 0 0.35rem;
}
.a11y-panel-sub {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: rgba(245, 239, 224, 0.72);
}
.a11y-panel-close {
  border: 0;
  background: transparent;
  color: rgba(245, 239, 224, 0.8);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.35rem;
  min-width: 44px;
  min-height: 44px;
}
.a11y-panel-close:hover,
.a11y-panel-close:focus-visible {
  color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.a11y-section {
  margin-bottom: 1rem;
}
.a11y-section-label {
  display: block;
  margin-bottom: 0.45rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(201, 168, 76, 0.9);
}
.a11y-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}
.a11y-row-stack {
  flex-direction: column;
}
.a11y-btn,
.a11y-toggle {
  border: 1px solid rgba(201, 168, 76, 0.28);
  background: rgba(245, 239, 224, 0.04);
  color: rgba(245, 239, 224, 0.88);
  font-family: 'EB Garamond', serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.a11y-btn {
  min-height: 40px;
  padding: 0.35rem 0.75rem;
}
.a11y-btn.is-active,
.a11y-toggle.is-on {
  border-color: rgba(201, 168, 76, 0.7);
  color: var(--gold);
  background: rgba(201, 168, 76, 0.1);
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(201, 168, 76, 0.55);
}
.a11y-btn:hover,
.a11y-toggle:hover,
.a11y-btn:focus-visible,
.a11y-toggle:focus-visible {
  border-color: var(--gold);
  color: var(--gold);
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
.a11y-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  min-height: 44px;
  padding: 0.45rem 0.75rem;
  text-align: left;
}
.a11y-toggle-state {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}
.a11y-reset {
  width: 100%;
  margin-top: 0.35rem;
}
.a11y-assist-note {
  margin: 0 0 0.95rem;
  font-size: 0.78rem;
  line-height: 1.45;
  color: rgba(245, 239, 224, 0.65);
  padding-top: 0.15rem;
  border-top: 1px solid rgba(201, 168, 76, 0.15);
}
.a11y-live {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

@media (max-width: 520px) {
  .a11y-fab {
    right: 0.85rem;
    bottom: 0.85rem;
  }
  .a11y-fab-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
  .a11y-panel {
    right: 0.85rem;
    left: 0.85rem;
    bottom: 4rem;
    width: auto;
  }
}

html.a11y-contrast .a11y-fab,
html.a11y-contrast .a11y-panel {
  border-color: rgba(224, 184, 74, 0.5);
}
