/* ==========================================================================
   GVA Products – main stylesheet
   No framework. Mobile-first. Progressive enhancement for newer CSS
   (popover, scroll-driven animations, ::details-content) with fallbacks.
   ========================================================================== */

/* Fonts (self-hosted, SIL Open Font License – see /assets/fonts/LICENSE-*.txt)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/montserrat-latin-500-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Montserrat";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/montserrat-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Hind";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/hind-latin-300-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Hind";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/hind-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Hind";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/hind-latin-700-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Varela Round";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/varela-round-latin-400-normal.woff2") format("woff2");
}

/* Design tokens
   -------------------------------------------------------------------------- */
:root {
  /* Brand */
  --brand: #f05a21;            /* GVA orange – backgrounds / large text */
  --brand-about: #ed5821;
  --brand-manuals: #f15a22;
  --brand-strong: #c2410c;     /* orange for small text & button fills (AA) */
  --brand-strong-hover: #9a3412;
  --brand-text: #d0470f;       /* orange for large headings on light grey */
  --purple: #5b10e8;
  --purple-hover: #4709c4;
  --purple-deep: #31014d;
  --link-on-dark: #ff8a5c;

  /* Neutrals */
  --ink: #1f1f1f;
  --ink-soft: #3d3d3d;
  --grey-btn: #c9cac9;
  --grey-mid: #636363;
  --surface: #ffffff;
  --surface-1: #f9f9f9;
  --surface-2: #ededed;
  --footer: #252525;
  --footer-legal: #1f1f1f;
  --footer-text: #bdbdbd;
  --footer-muted: #9a9a9a;

  /* Type */
  --font-display: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Hind", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-soft: "Varela Round", "Hind", "Segoe UI", system-ui, sans-serif;

  /* Layout */
  --header-h: 4.5rem;
  --container: 75rem;
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --section-pad: clamp(3rem, 8vw, 6.5rem);
  --radius: 2px;
  --shadow: 0 0.5rem 1.75rem rgb(0 0 0 / 0.14);
}

/* Base / reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: var(--header-h);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  padding-top: var(--header-h);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
picture,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
p,
ul {
  margin: 0;
}

ul[role="list"] {
  list-style: none;
  padding: 0;
}

a {
  color: inherit;
}

button {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #fff;
}

main:focus,
.manuals-library:focus {
  outline: none;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

/* Buttons
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 3rem;
  padding: 0.75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .btn:hover {
    transform: translateY(-2px);
  }
}

.btn--brand {
  background: var(--brand-strong);
  color: #fff;
}
.btn--brand:hover {
  background: var(--brand-strong-hover);
}

.btn--purple {
  background: var(--purple);
  color: #fff;
}
.btn--purple:hover {
  background: var(--purple-hover);
}

.btn--light {
  background: #fff;
  color: var(--brand-strong);
}
.btn--light:hover {
  background: var(--ink);
  color: #fff;
}

.btn--outline-light {
  border-color: #fff;
  color: #fff;
}
.btn--outline-light:hover {
  background: #fff;
  color: var(--ink);
}

.btn--outline-dark {
  border-color: var(--ink);
  color: var(--ink);
}
.btn--outline-dark:hover {
  background: var(--ink);
  color: #fff;
}

.btn--grey {
  background: var(--grey-btn);
  color: var(--ink);
}
.btn--grey:hover {
  background: #b3b4b3;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* CSS-only icons
   -------------------------------------------------------------------------- */
.icon-chevron {
  display: inline-block;
  width: 0.65rem;
  height: 0.65rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}
.icon-chevron--left {
  transform: translateX(2px) rotate(135deg);
}
.icon-chevron--right {
  transform: translateX(-2px) rotate(-45deg);
}
.icon-chevron--up {
  transform: translateY(2px) rotate(-135deg);
}

.icon-pause {
  display: inline-block;
  width: 0.75rem;
  height: 0.85rem;
  border-inline: 0.25rem solid currentColor;
}

[data-paused="true"] .icon-pause {
  /* play triangle */
  width: 0;
  height: 0;
  border-block: 0.45rem solid transparent;
  border-inline-start: 0.75rem solid currentColor;
  border-inline-end: 0;
  transform: translateX(2px);
}

/* Header
   -------------------------------------------------------------------------- */
.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  color: var(--ink-soft);
  background: #fff;
  box-shadow: 0 1px 0 rgb(0 0 0 / 0.08);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: min(100% - 2 * var(--gutter), var(--container));
  height: 100%;
  margin-inline: auto;
}

.site-header__brand {
  display: block;
  width: 5.5rem;
  height: 2.4rem;
  flex: none;
}

.logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: left center;
}

/* Mobile menu button */
.menu-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.menu-toggle__bars,
.menu-toggle__bars::before,
.menu-toggle__bars::after {
  display: block;
  width: 1.6rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
}

.menu-toggle__bars {
  position: relative;
}

.menu-toggle__bars::before,
.menu-toggle__bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle__bars::before {
  top: -0.5rem;
}

.menu-toggle__bars::after {
  top: 0.5rem;
}

/* Navigation: a native popover on small screens, an inline list on large. */
.site-nav {
  /* reset UA popover styles */
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: calc(var(--header-h) + 1rem) var(--gutter) 2rem;
  border: 0;
  color: #fff;
  background: var(--brand-strong);
  overflow-y: auto;
}

.site-nav:popover-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.site-nav__close {
  position: absolute;
  top: 0.875rem;
  right: var(--gutter);
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
}

.site-nav__list {
  display: grid;
  gap: 0.5rem;
  text-align: center;
}

.site-nav__list a {
  display: inline-block;
  padding: 0.35rem 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 7vw, 2.5rem);
  font-weight: 700;
  line-height: 1.25;
  text-decoration: none;
}

.site-nav__list a:hover,
.site-nav__list a[aria-current="true"] {
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.3em;
}

:root:has(.site-nav:popover-open) {
  overflow: hidden;
}

@media (min-width: 56em) {
  .menu-toggle,
  .site-nav__close {
    display: none;
  }

  .site-nav,
  .site-nav:popover-open {
    position: static;
    display: block;
    width: auto;
    height: auto;
    padding: 0;
    overflow: visible;
    color: inherit;
    background: none;
  }

  .site-nav__list {
    display: flex;
    gap: clamp(1rem, 2vw, 1.75rem);
  }

  .site-nav__list a {
    position: relative;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    font-weight: 500;
  }

  .site-nav__list a::after {
    content: "";
    position: absolute;
    inset: auto 0 0.15rem;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
  }

  .site-nav__list a:hover,
  .site-nav__list a[aria-current="true"] {
    text-decoration: none;
  }

  .site-nav__list a:hover::after,
  .site-nav__list a[aria-current="true"]::after {
    transform: scaleX(1);
  }
}

@media (min-width: 56em) and (pointer: coarse) {
  .site-nav__list a {
    padding-block: 0.8rem;
  }

  .site-nav__list a::after {
    bottom: 0.45rem;
  }
}

/* Hero slider
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  height: calc(100vh - var(--header-h));
  height: calc(100svh - var(--header-h));
  min-height: 30rem;
  max-height: 56rem;
  background: #e2561d;
  color: #fff;
}

.hero__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}

.hero__track::-webkit-scrollbar {
  display: none;
}

.hero__slide {
  position: relative;
  flex: 0 0 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.hero__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__slide--right .hero__image {
  object-position: 18% center;
}

@media (min-width: 56em) {
  .hero__slide--right .hero__image {
    object-position: 72% center;
  }
}

/* Legibility wash behind the text */
.hero__slide--right::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(90deg, rgb(0 0 0 / 0.28) 0%, rgb(0 0 0 / 0.12) 45%, rgb(0 0 0 / 0) 70%);
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.5rem;
  width: min(100% - 2 * var(--gutter), var(--container));
  height: 100%;
  margin-inline: auto;
  padding-block: 2rem 5.5rem;
}

.hero__title {
  max-width: 18ch;
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.2rem + 3.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.3;
  text-wrap: balance;
}

.hero__text {
  max-width: 28ch;
  font-family: var(--font-body);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.35;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero__controls {
  position: absolute;
  inset: auto 0 1.25rem;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.hero__controls[hidden] {
  display: none;
}

.hero__btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgb(0 0 0 / 0.45);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.hero__btn:hover {
  background: rgb(0 0 0 / 0.7);
}

.hero__btn--pause {
  margin-inline-end: 0.5rem;
}

.hero__dots {
  display: flex;
}

.hero__dot {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.hero__dot::before {
  content: "";
  width: 0.75rem;
  height: 0.75rem;
  border: 2px solid #fff;
  border-radius: 50%;
  background: rgb(0 0 0 / 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.hero__dot[aria-current="true"]::before {
  background: #fff;
  transform: scale(1.15);
}

/* Product category tiles
   -------------------------------------------------------------------------- */
.section--tiles {
  padding: clamp(1rem, 2vw, 1.75rem);
  background: var(--surface-1);
}

.tiles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.75rem, 2vw, 1.75rem);
}

@media (min-width: 56em) {
  .tiles {
    grid-template-columns: repeat(4, 1fr);
  }
}

.tile {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  color: #fff;
  text-decoration: none;
  background: #2aa79d;
  box-shadow: var(--shadow);
}

.tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tile__label {
  position: absolute;
  inset: auto 0 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  padding: 2.5rem 0.5rem 1rem;
  text-align: center;
  background: linear-gradient(to top, rgb(0 0 0 / 0.55), rgb(0 0 0 / 0));
  transition: background-color 0.3s ease, inset 0.3s ease;
}

.tile__title {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 0.8rem + 1.2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.tile__cta {
  font-size: clamp(0.8rem, 0.75rem + 0.25vw, 0.95rem);
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0.75rem;
  border: 6px solid var(--brand);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

@media (hover: hover) {
  .tile:hover .tile__label {
    inset: 0;
    justify-content: center;
    background: rgb(90 90 90 / 0.55);
  }

  .tile:hover::after {
    opacity: 1;
  }
}

.tile:focus-visible .tile__label {
  inset: 0;
  justify-content: center;
  background: rgb(90 90 90 / 0.55);
}

.tile:focus-visible::after {
  opacity: 1;
}

@media (prefers-reduced-motion: no-preference) and (hover: hover) {
  .tile:hover img,
  .tile:focus-visible img {
    transform: scale(1.05);
  }
}

/* Shared section bits
   -------------------------------------------------------------------------- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 1.4rem + 4vw, 5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.section-title--brand {
  color: var(--brand-text);
}

@supports (font-size: 1cqi) {
  .split__body .section-title {
    font-size: clamp(2.25rem, 12.5cqi, 5rem);
  }
}

.lead {
  font-family: var(--font-body);
  font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.6rem);
  font-weight: 700;
  line-height: 1.35;
  color: #000;
}

.lead-soft {
  max-width: 38rem;
  font-family: var(--font-soft);
  font-size: clamp(1.05rem, 1rem + 0.35vw, 1.25rem);
  line-height: 1.65;
}

.split {
  display: grid;
}

.split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split__body {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 1.25rem;
  padding: var(--section-pad) var(--gutter);
}

@media (min-width: 48em) {
  .split {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }

  .split__media {
    min-height: 24rem;
  }

  .split__body {
    padding-inline: clamp(2rem, 5vw, 5rem) var(--gutter);
  }
}

/* The Range */
.section--range {
  background: var(--surface-2);
}

/* About */
.section--about {
  background: var(--brand-about);
  color: #fff;
}

.about {
  display: grid;
  gap: 2rem;
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
  padding-block: var(--section-pad) 0;
}

.about__title {
  font-size: clamp(2.25rem, 1.3rem + 3.8vw, 4.75rem);
  line-height: 1.08;
}

.about__media {
  align-self: end;
  max-width: 26rem;
}

@media (min-width: 48em) {
  .about {
    grid-template-columns: 2fr 1fr;
    align-items: end;
  }

  .about__title {
    padding-bottom: var(--section-pad);
  }
}

.about__copy {
  padding-block: clamp(2.5rem, 6vw, 4rem);
  background: var(--grey-mid);
  color: #fff;
  font-family: var(--font-soft);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.75;
}

.columns {
  display: grid;
  gap: 1.5rem 4rem;
}

@media (min-width: 48em) {
  .columns {
    grid-template-columns: 1fr 1fr;
  }
}

/* Where to buy */
.section--buy {
  background: var(--surface-1);
}

.section--buy .split__media {
  display: flex;
  align-items: center;
  padding: clamp(1rem, 4vw, 3rem);
}

.section--buy .split__media img {
  height: auto;
  object-fit: contain;
}

/* Contact – purple with illustrated left edge */
.section--contact,
.manuals-library {
  --edge: 3rem;
  background-color: var(--purple-deep);
  background-image: url("../img/contact-edge.jpg");
  background-image: image-set(url("../img/contact-edge.webp") type("image/webp"), url("../img/contact-edge.jpg") type("image/jpeg"));
  background-repeat: repeat-y;
  background-position: left top;
  background-size: var(--edge) auto;
  color: #fff;
}

@media (min-width: 56em) {
  .section--contact,
  .manuals-library {
    --edge: 5.5rem;
  }
}

.section--contact {
  padding-block: var(--section-pad);
}

.section--contact .container,
.manuals-library .container {
  width: min(100% - var(--edge) - 2 * var(--gutter), var(--container));
  margin-inline-start: max(var(--edge) + var(--gutter), (100% - var(--container)) / 2);
}

.section--contact .section-title {
  margin-bottom: 1.5rem;
}

.link-light {
  color: var(--link-on-dark);
  text-decoration-thickness: 2px;
  text-underline-offset: 0.2em;
}

.link-light:hover {
  color: #fff;
}

/* Product manuals banner */
.manuals-banner {
  display: grid;
  align-items: center;
  background: var(--brand-manuals);
  color: #fff;
  overflow: hidden;
}

.manuals-banner__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: clamp(2.5rem, 6vw, 4rem) var(--gutter);
}

.manuals-banner__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 1.5rem + 2vw, 3rem);
  font-weight: 700;
  line-height: 1.1;
}

.manuals-banner__text {
  max-width: 30rem;
  font-size: 1.2rem; /* bold ≥ 18.66px counts as large text for contrast */
  font-weight: 700;
  line-height: 1.45;
}

.manuals-banner__media img {
  width: 100%;
}

@media (min-width: 56em) {
  .manuals-banner {
    grid-template-columns: 1fr 1fr;
  }

  .manuals-banner__body {
    padding-inline-start: max(var(--gutter), (100vw - var(--container)) / 2);
  }
}

/* Product manuals library (native <details>, no JS)
   -------------------------------------------------------------------------- */
.manuals-library {
  padding-block: clamp(2.5rem, 6vw, 4.5rem);
}

.manuals-library__hint {
  margin-bottom: 1.5rem;
  text-align: center;
  color: #e6dcf2;
}

.manual-cats {
  display: grid;
  gap: 0.5rem;
}

.manual-cat > summary,
.manual-sub > summary {
  list-style: none;
  cursor: pointer;
}

.manual-cat > summary::-webkit-details-marker,
.manual-sub > summary::-webkit-details-marker {
  display: none;
}

.manual-cat > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid rgb(255 255 255 / 0.55);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.manual-cat > summary::after {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.2s ease;
}

.manual-cat[open] > summary::after {
  transform: rotate(-135deg);
}

.manual-cat > summary:hover {
  border-color: #fff;
  background: rgb(255 255 255 / 0.08);
}

.manual-cat[open] > summary {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
}

.manual-cat__panel {
  padding: 1.25rem 0 1.5rem;
}

.manual-subs {
  display: grid;
  gap: 0.25rem;
}

.manual-sub > summary {
  padding: 0.55rem 0.25rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.2);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 500;
}

.manual-sub > summary:hover {
  color: var(--link-on-dark);
}

.manual-sub[open] > summary {
  color: var(--link-on-dark);
  border-bottom-color: var(--link-on-dark);
}

.manual-sub__count {
  font-weight: 500;
  opacity: 0.8;
}

.manual-list {
  padding: 1rem 0 1.5rem;
}

@media (min-width: 40em) {
  .manual-list {
    columns: 2 18rem;
    column-gap: 2.5rem;
  }
}

.manual-list li {
  break-inside: avoid;
  padding-block: 0.3rem;
  line-height: 1.45;
}

.manual-list a {
  color: #fff;
  text-decoration-color: rgb(255 255 255 / 0.45);
  text-underline-offset: 0.2em;
}

.manual-list a:hover {
  color: var(--link-on-dark);
  text-decoration-color: currentColor;
}

.manual-model {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9em;
}

.manual-meta {
  white-space: nowrap;
  font-size: 0.85em;
  color: #d9cbe9;
}

.manual-unavailable {
  color: #cdbfe0;
}

.manual-empty {
  padding: 1rem 0;
  color: #d9cbe9;
}

/* Enhanced layout: buttons in a row with the open panel underneath
   (category "tabs"), using ::details-content where supported. */
@supports selector(::details-content) {
  .manual-cats {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.75rem;
  }

  .manual-cat {
    display: contents;
  }

  .manual-cat > summary {
    margin-block: 0.375rem;
  }

  .manual-cat > summary::after {
    display: none;
  }

  .manual-cat::details-content {
    order: 1;
    flex: 0 0 100%;
  }

  .manual-cat:not([open])::details-content {
    display: none;
  }

  .manual-subs {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 1.5rem;
    margin-top: 1rem;
  }

  .manual-sub {
    display: contents;
  }

  .manual-sub > summary {
    margin-block: 0.25rem;
    border-bottom: 2px solid transparent;
  }

  .manual-sub::details-content {
    order: 1;
    flex: 0 0 100%;
    margin-top: 0.75rem;
    border-top: 1px solid rgb(255 255 255 / 0.2);
  }

  .manual-sub:not([open])::details-content {
    display: none;
  }
}

/* Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background: var(--footer);
  color: var(--footer-text);
}

.site-footer__inner {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
}

@media (min-width: 40em) {
  .site-footer__inner {
    grid-template-columns: 16rem 1fr;
  }
}

.site-footer__brand {
  display: block;
  width: 11.5rem;
}

.site-footer__heading {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--footer-muted);
}

.site-footer__nav ul {
  display: grid;
  gap: 0.35rem;
}

.site-footer__nav ul ul {
  margin-top: 0.35rem;
  padding-inline-start: 1rem;
}

.site-footer__nav a {
  display: inline-block;
  padding-block: 0.2rem;
  color: #e5e5e5;
  text-decoration: none;
}

.site-footer__nav a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.site-footer__legal {
  padding-block: 1.25rem;
  background: var(--footer-legal);
  color: var(--footer-muted);
  font-size: 0.875rem;
}

/* Back to top
   -------------------------------------------------------------------------- */
.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  color: #fff;
  background: rgb(31 31 31 / 0.75);
  transition: background-color 0.2s ease;
}

.to-top:hover {
  background: var(--brand-strong);
}

@supports (animation-timeline: scroll()) {
  .to-top {
    animation: reveal linear both;
    animation-timeline: scroll(root block);
    animation-range: 40vh 70vh;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    visibility: hidden;
  }
  to {
    opacity: 1;
    visibility: visible;
  }
}

/* Error page
   -------------------------------------------------------------------------- */
body.no-header {
  padding-top: 0;
}

.error-page {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  padding: 3rem var(--gutter);
  text-align: center;
  background: var(--brand-about);
  color: #fff;
}

.error-page__inner {
  display: grid;
  justify-items: center;
  gap: 1.25rem;
}

/* Reduced motion
   -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
  }
}

/* Forced colours (Windows High Contrast)
   -------------------------------------------------------------------------- */
@media (forced-colors: active) {
  .btn,
  .hero__btn,
  .manual-cat > summary {
    border: 2px solid ButtonText;
  }

  .hero__dot::before {
    border-color: ButtonText;
  }

  .hero__dot[aria-current="true"]::before {
    background: Highlight;
  }
}

/* Print
   -------------------------------------------------------------------------- */
@media print {
  .site-header,
  .hero__controls,
  .to-top,
  .skip-link {
    display: none !important;
  }

  .hero {
    height: auto;
    min-height: 0;
  }

  .section--contact,
  .manuals-library,
  .section--about,
  .about__copy {
    color: #000;
    background: none;
  }
}
