/* ============================================================
   Accessibility toolbar + the modes it switches on <html>
   Sizes in px on purpose: the panel must stay usable at every text scale.
   ============================================================ */

/* ---------- floating button ---------- */
.a11y__fab {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  padding: 0;
  color: #fff;
  background: linear-gradient(135deg, #b93ccc, #c83e62);
  border: 2px solid rgba(255, 255, 255, .85);
  border-radius: 50%;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .25s var(--ease-out, ease);
}
.a11y__fab:hover { transform: scale(1.07); }
.a11y__fab:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---------- panel ---------- */
.a11y__panel {
  position: fixed;
  left: 16px;
  bottom: 80px;
  z-index: 91;
  width: min(330px, calc(100vw - 32px));
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  padding: 18px;
  font-family: var(--font, system-ui, sans-serif);
  font-size: 15px;
  line-height: 1.4;
  color: #f3ebe7;
  background: #1f0915;
  border: 1px solid rgba(206, 193, 187, .35);
  border-radius: 18px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .5);
  animation: a11y-in .25s var(--ease-out, ease) both;
}
.a11y__panel[hidden] { display: none; }
@keyframes a11y-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.a11y__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.a11y__title {
  margin: 0;
  font-size: 19px;
  font-weight: 650;
}
.a11y__close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: inherit;
  background: none;
  border: 1px solid rgba(206, 193, 187, .35);
  border-radius: 50%;
  cursor: pointer;
}
.a11y__close:hover { background: rgba(206, 193, 187, .12); }

.a11y button:focus-visible,
.a11y a:focus-visible {
  outline: 2px solid #ff8fb0;
  outline-offset: 2px;
}

/* text size stepper */
.a11y__size {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid rgba(206, 193, 187, .25);
  border-radius: 12px;
}
.a11y__stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}
.a11y__stepper button {
  min-width: 40px;
  height: 36px;
  padding: 0 8px;
  font: inherit;
  font-weight: 700;
  color: inherit;
  background: rgba(206, 193, 187, .1);
  border: 1px solid rgba(206, 193, 187, .35);
  border-radius: 8px;
  cursor: pointer;
}
.a11y__stepper button:hover:not(:disabled) { background: rgba(206, 193, 187, .2); }
.a11y__stepper button:disabled { opacity: .4; cursor: default; }
.a11y__size-val {
  min-width: 48px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* toggle tiles */
.a11y__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.a11y__opt {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 78px;
  padding: 10px 6px;
  font: inherit;
  font-size: 14px;
  color: inherit;
  text-align: center;
  background: rgba(206, 193, 187, .06);
  border: 1px solid rgba(206, 193, 187, .25);
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.a11y__opt:hover { background: rgba(206, 193, 187, .14); }
.a11y__opt[aria-pressed="true"] {
  color: #1f0915;
  background: #f3ebe7;
  border-color: #f3ebe7;
}
.a11y__opt--reset { color: #ff8fb0; }

.a11y__statement {
  display: block;
  margin-top: 14px;
  text-align: center;
  color: #ff8fb0;
  font-size: 14px;
}

@media print { .a11y { display: none; } }

/* ============================================================
   Modes
   ============================================================ */

/* high contrast: black background, white text, yellow links */
html.a11y-contrast {
  --plum: #000;
  --plum-deep: #000;
  --sand: #fff;
  --sand-dim: #fff;
  --line: #fff;
  --pink: #ffe066;
  --magenta: #ffe066;
}
html.a11y-contrast body,
html.a11y-contrast .join,
html.a11y-contrast .footer,
html.a11y-contrast .page { background: #000; }
html.a11y-contrast .grain { display: none; }
html.a11y-contrast .hero__media img { filter: grayscale(1) contrast(1.25) brightness(.7); }
html.a11y-contrast .btn-join__label {
  background: none;
  -webkit-text-fill-color: #fff;
}
html.a11y-contrast .legal__toc,
html.a11y-contrast .legal__card { background: none; }
html.a11y-contrast :focus-visible { outline-color: #ffe066; }
html.a11y-contrast .a11y__panel {
  background: #000;
  border-color: #fff;
  color: #fff;
}
html.a11y-contrast .a11y__opt,
html.a11y-contrast .a11y__size,
html.a11y-contrast .a11y__stepper button,
html.a11y-contrast .a11y__close { border-color: #fff; }
html.a11y-contrast .a11y__opt[aria-pressed="true"] { background: #ffe066; border-color: #ffe066; color: #000; }
html.a11y-contrast .a11y__statement,
html.a11y-contrast .a11y__opt--reset { color: #ffe066; }

/* underline every link */
html.a11y-links a:not(.a11y__fab) {
  text-decoration: underline !important;
  text-underline-offset: 3px;
  text-decoration-thickness: 2px;
}

/* readable font */
html.a11y-font body,
html.a11y-font body * {
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif !important;
  letter-spacing: normal !important;
}

/* stop all motion */
html.a11y-motion-off *,
html.a11y-motion-off *::before,
html.a11y-motion-off *::after {
  animation: none !important;
  transition: none !important;
  scroll-behavior: auto !important;
}
html.a11y-motion-off .reveal { opacity: 1; transform: none; }
html.a11y-motion-off [data-parallax] { transform: none !important; }

/* big cursor */
html.a11y-cursor,
html.a11y-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 24 24'%3E%3Cpath d='M5 2.5 19 13.6l-6.1.9 3.5 7.2-2.8 1.3-3.5-7.2L5.6 20z' fill='%23000' stroke='%23fff' stroke-width='1.2' stroke-linejoin='round'/%3E%3C/svg%3E") 8 4, auto !important;
}
html.a11y-motion-off .spotlight { display: none; }
