/* Accessibility and universal design basics shared by every page.
   Everything is sized in rem so it follows the reader's own text-size setting. */

/* ---- Skip link: first thing a keyboard or screen-reader user reaches ---- */
.skip-link {
  position: fixed;
  top: -5rem;
  left: 0.75rem;
  z-index: 100000;
  padding: 0.75rem 1.125rem;
  border-radius: 0.5rem;
  background: #1a1a1a;
  color: #fff;
  font-family: Poppins, sans-serif;
  font-size: 1rem;
  text-decoration: none;
}

.skip-link:focus {
  top: 0.75rem;
}

/* the skip link moves focus here; it is not a control, so no ring */
#main:focus {
  outline: none;
}

/* text for screen readers only */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* a wrapper that only adds the heading role: it takes no space of its own */
.heading-wrap {
  display: contents;
}

/* images keep their proportions: the width/height attributes only reserve space while they load */
img {
  height: auto;
}

/* ---- Touch and click targets: at least 44px tall ---- */
.hashtag,
.hashtag-3,
.hashtag-5,
.hashtag-6,
.hashtag-7,
.hashtag-user-testing,
.hashtag-prototyping,
.hashtag-pd,
.hashtag-wcag,
.hashtag-wireframes,
.hashtag-uu,
.hashtag-accessibility,
.hashtag-design,
.hashtag-ia,
.hashtag-heuristic {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 2.75rem;
}

.footer-email,
.menu-cta,
.next-project__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  box-sizing: border-box;
}

/* Links with the wiggle underline keep their text-height box (so the underline stays where it was);
   their 44px click area is an invisible extension instead */
.menu-button,
.div-block-43 .link {
  position: relative;
}

.menu-button::before,
.div-block-43 .link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2.75rem;
  transform: translateY(-50%);
}

.menu-button-2 {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.project-info .h3 {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

/* ---- Motion: if the reader asked for less, everything animated keeps still ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- High-contrast / forced-colors mode: keep buttons and pills visible ---- */
@media (forced-colors: active) {
  .hashtag,
  .hashtag-3,
  .hashtag-5,
  .hashtag-6,
  .hashtag-7,
  .hashtag-user-testing,
  .hashtag-prototyping,
  .hashtag-pd,
  .hashtag-wcag,
  .hashtag-wireframes,
  .hashtag-uu,
  .hashtag-accessibility,
  .hashtag-design,
  .hashtag-ia,
  .hashtag-heuristic,
  .footer-email,
  .menu-cta {
    border: 1px solid ButtonText;
  }
}

/* ---- Reflow: nothing may force sideways scrolling on a narrow window or at large text sizes ---- */
.hero-image img {
  min-width: 0;
  max-width: 100%;
}

.h1,
.h2,
.h3,
.h4 {
  overflow-wrap: anywhere;
}

/* flex and grid items may shrink below their content width instead of pushing the page sideways */
.main,
.main.shorter,
.div-block-31,
.page-contents,
.project-page,
.project,
.paragraph,
.paragraph-block,
.w-layout-vflex,
.w-layout-hflex {
  min-width: 0;
}

/* long words and links may wrap instead of widening their box */
.main .paragraph-text,
.main .list-element,
.main .caption-small,
.main li {
  overflow-wrap: anywhere;
}

/* 404 page: the "Back to the home page" button sits centred under the message */
.utility-page-content .menu-cta {
  align-self: center;
  margin-top: 1.5rem;
}

.utility-page-content h2 {
  margin: 0 0 0.75rem;
  font-family: Poppins, sans-serif;
  font-size: 2.125rem;
  font-weight: 500;
  line-height: 1.2;
}

.utility-page-content {
  font-family: Poppins, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
}
