/* BAD EXAMPLE — deliberately fails several WCAG success criteria.
   See facilitator-notes.html for the full list and fixes.
   Palette inspired by SDSC's navy + multi-colour accent identity
   (own original hex values, not copied from their stylesheet) —
   the accent tints below are deliberately too light to pass contrast. */

:root {
  /* Brand colour from the new logo (logo_1.svg). Buttons and text links
     all use it here — but at ~2.6:1 on white it still fails 1.4.3, so
     it's scoped to bad.css only. good.css keeps its passing colours. */
  --brand-color: #00aaf8;
}

.hero-title,
.section-heading,
.event-title,
.news-headline,
.field-heading {
  font-family: 'Geologica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.hero-title,
.section-heading,
.event-title,
.news-headline,
.field-heading {
  font-weight: 500;
}

body {
  background: #ffffff;
  color: #10315c;
  font-family: 'Albert Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.btn {
  font-family: 'Albert Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Issue: focus indicator removed site-wide (WCAG 2.4.7 Focus Visible) */
* {
  outline: none;
}

.site-header {
  background: #ffffff;
}

/* Issue: hamburger is a styled <div> — now reachable/activatable by
   keyboard (tabindex + keydown handler in bad.js), but still no role,
   accessible name, or aria-expanded, and the global `outline: none`
   above means it shows no focus ring even though it IS focusable. */
.hamburger {
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

/* Visual-only fix: swaps from the "menu" to the "close" Material Icon
   glyph when open, matching the sighted-user affordance in good.html —
   but unlike good.html, nothing here is exposed to AT (no aria-expanded,
   no accessible name at all, see issue #3), so a screen reader user gets
   none of this feedback. */
.hamburger-icon {
  font-size: 28px;
  color: #10315c;
}

/* Issue: the "second" nav copy is hidden using an old off-screen-position
   hack instead of the `hidden` attribute / display:none — it stays fully
   exposed to screen readers even though no sighted user ever sees it. */
.nav-menu {
  list-style: none;
  margin: 0;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  background: #fff;
}

.nav-menu a {
  color: var(--brand-color);
  text-decoration: none;
  font-size: 1rem;
}

/* Issue: opens as a fixed overlay on top of the rest of the page, but
   focus is never sent into it (no focus() call anywhere in bad.js) and
   nothing behind it is made inert — so the content it's covering is
   still exactly where keyboard/AT focus goes next (WCAG 2.4.3). */
.nav-menu.is-visible {
  display: flex;
  position: fixed;
  top: 64px;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  bottom: 0;
  z-index: 50;
  overflow-y: auto;
}

.nav-menu.is-hidden-offscreen {
  position: absolute;
  left: -9999px;
  top: 0;
}

/* Issue: auto-advancing carousel with no pause/stop control (WCAG 2.2.2)
   — same flaw as the news carousel further down, but now it's the very
   first thing on the page. See js/bad.js for the interval. */
.hero-carousel {
  position: relative;
  min-height: 480px;
  overflow: hidden;
  display: grid; /* slides stack in one cell, like the news carousel */
}

/* Issue: slide text sits directly on top of a busy photo/gradient — no
   scrim, no overlay, no contrast check against what's underneath
   (WCAG 1.4.3). */
/* Inactive slides fade out (opacity) rather than display:none, so they
   stay in the accessibility tree. With display:none, the slide a screen
   reader was reading vanished every 3.5s and threw its cursor back to the
   top of the page, so it could never get past the hero. */
.carousel-slide {
  display: flex;
  grid-area: 1 / 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem 1.25rem 1.75rem;
  min-height: 480px;
  background-size: cover;
  background-position: center;
}

.carousel-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Issue: this is a <div>, not an <h1> — visually looks like a heading,
   announces as plain text to a screen reader (WCAG 1.3.1). */
.hero-title {
  font-size: 2.25rem;
  letter-spacing: 0em;
  margin: 0 0 0.4rem;
  color: #ffffff;
}

.carousel-slide p {
  color: #ffffff;
  margin: 0.5rem 0 1.25rem;
  font-size: 1rem;
}

/* Issue: same white-on-brand contrast fail as .btn-primary — ~2.6:1
   (WCAG 1.4.3) — but this button's label is a real, properly announced
   text node. */
.btn-view-activities {
  background: var(--brand-color);
  color: #ffffff;
}

/* Issue: unlabelled carousel controls — see the HTML comment above them.
   No focus styling beyond the global outline removal either. */
.carousel-dots {
  position: absolute;
  bottom: 1.5rem;
  left: 0;
  right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.carousel-dot.is-active {
  background: #ffffff;
}

/* Issue: same unlabelled-dots bug as the hero carousel, now on every
   event card too — dots-only, no arrows, no accessible name on any of
   them (see issue #17). */
.event-image-carousel {
  position: relative;
  margin-bottom: 0.75rem;
  touch-action: pan-y; /* horizontal swipes go to the carousel, vertical still scrolls */
}

.event-image-carousel .event-image {
  display: none;
  margin-bottom: 0;
}

.event-image-carousel .event-image.is-active {
  display: block;
}

.event-image-carousel .carousel-dot {
  background: rgba(16, 49, 92, 0.35);
}

.event-image-carousel .carousel-dot.is-active {
  background: #10315c;
}

.btn-primary {
  background: var(--brand-color);
  color: #ffffff; /* Issue: ~2.6:1 contrast — fails 1.4.3 */
}

/* Issue: heading skips from (missing) h1 straight to h4 (WCAG 1.3.1 / 2.4.6) */
.section-heading {
  color: #10315c;
}

.event-card {
  border-color: #eaeaea;
  background: #fff;
}

.spotlight-card img {
  box-shadow: 5px 5px 0 0 #febd00;
}

/* Issue: status conveyed by colour alone, no text/icon (WCAG 1.4.1),
   and red/green are close together on the protanopia/deuteranopia
   confusion line. */
.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.green {
  background: #4caf50;
}

.status-dot.red {
  background: #e53935;
}

/* Issue: light pink meta text — ~2.1:1 contrast on white (WCAG 1.4.3) */
.event-meta {
  color: #fe83f7;
}

/* Issue: "Register" link text repeated identically on every card,
   out of context it tells a screen reader user nothing (WCAG 2.4.4). */
.event-link {
  color: var(--brand-color);
  font-size: 0.875rem;
  text-decoration: underline;
}

/* Issue: placeholder text is the only label — disappears once a value
   is typed, and isn't exposed as a label at all (WCAG 1.3.1 / 3.3.2). */
input[type="text"],
input[type="email"],
input[type="tel"] {
  border-color: #e0e0e0; /* very low contrast border, hard to see the field exists */
  color: #2a2a2a;
  background: #fff;
}

input::placeholder {
  color: #cccccc;
}

/* Issue: required-field marker is colour-only, ~2.9:1 (WCAG 1.4.1 / 1.4.3) */
.required-mark {
  color: #e59aab;
}

.puzzle-track {
  position: relative;
  height: 44px;
  border-radius: 8px;
  background: #f0f0f0;
  overflow: hidden;
}

.puzzle-track.is-verified {
  background: #d7f4e3;
}

.puzzle-track-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #999999;
  font-size: 0.875rem;
  pointer-events: none;
}

.puzzle-track-fill {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 44px;
  background: rgba(0, 170, 248, 0.15);
}

.puzzle-piece {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 40px;
  height: 40px;
  border-radius: 6px;
  background: var(--brand-color);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: grab;
  touch-action: none;
}

/* Issue: purely cosmetic — no real `disabled` attribute, so a screen
   reader announces this as a completely normal, enabled button the
   whole time it's greyed out. */
.is-disabled-look {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Issue: submit is a styled <div onclick>, invisible to keyboard/AT users
   as an actionable control (WCAG 2.1.1 / 4.1.2). */
.btn-submit {
  background: var(--brand-color);
  color: #ffffff; /* ~2.6:1 contrast — fails 1.4.3, same as .btn-primary */
}

.spotlight-quote {
  color: #fe83f7; /* Issue: ~2.1:1 contrast (WCAG 1.4.3) */
  font-family: 'Geologica', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.news-carousel {
  position: relative;
  overflow: hidden;
  display: grid;
}

#news-carousel-dots {
  position: static;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

#news-carousel-dots .carousel-dot {
  background: rgba(16, 49, 92, 0.35);
}

#news-carousel-dots .carousel-dot.is-active {
  background: #10315c;
}

.news-item {
  border-color: #eaeaea;
  background: #fff;
  grid-area: 1 / 1;
  opacity: 0;
  transition: opacity 0.4s;
}

.news-item.is-active {
  opacity: 1;
}

/* Issue: identical "Read More" link text on every item (WCAG 2.4.4) */
.news-link {
  color: var(--brand-color);
  font-size: 0.875rem;
}

.site-footer {
  background: #fe83f7;
}

/* Issue: icon-only social links, no accessible name (WCAG 4.1.2 / 2.4.4).
   Also no padding/min-size on the link itself, so the clickable area is
   exactly the icon's own size — 14x14px, well under the 24x24px minimum
   (WCAG 2.5.8 Target Size Minimum) and nowhere near the 44x44px
   recommendation (2.5.5), a real problem for anyone with limited fine
   motor control tapping on a touchscreen. */
.social-icon {
  width: 14px;
  height: 14px;
  fill: #ffffff;
}

/* Issue: low-contrast small footer links, ~2.6:1 contrast (WCAG 1.4.3) */
.footer-links a {
  color: #ffffff;
  text-decoration: none;
}

/* Issue: looks like a set of radio buttons, but see the HTML comment
   above them on bad-register.html — no semantics at all, just a CSS
   class swap on click. */
.field-heading {
  font-size: 0.9375rem;
  margin: 0 0 0.5rem;
  color: #10315c;
}

.date-options {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.date-option {
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid #cccccc;
  cursor: pointer;
  font-size: 0.9375rem;
  color: #10315c;
}

.date-option.selected {
  background: var(--brand-color);
  color: #ffffff;
  border-color: var(--brand-color);
}

/* Issue: see the HTML comment above — no real checkbox semantics at
   all, just a class swap on a plain <div>. */
.fake-checkbox {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  margin-bottom: 1.1rem;
  font-size: 0.9375rem;
  color: #10315c;
}

.checkbox-box {
  position: relative;
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  flex-shrink: 0;
}

.fake-checkbox.checked .checkbox-box {
  background: var(--brand-color);
  border-color: var(--brand-color);
}

.fake-checkbox.checked .checkbox-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Issue: see the HTML comment above — visible feedback with no
   aria-live/role="status" behind it at all. */
.toast {
  position: fixed;
  left: 50%;
  bottom: -80px;
  transform: translateX(-50%);
  background: #10315c;
  color: #ffffff;
  padding: 0.85rem 1.5rem;
  border-radius: 8px;
  font-size: 0.9375rem;
  transition: bottom 0.3s ease;
  z-index: 100;
}

.toast.show {
  bottom: 24px;
}
