/* Bricolage Grotesque, served from this site (SIL Open Font License 1.1, see fonts/OFL.txt).
   Variable font with the opsz (12-96) and wght (400-800) axes, width fixed at 100, Latin subset. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #ffffff;
  --green-deep: #0c4a35;
  --yellow: #ffcf3d;
  --yellow-soft: #fff4cc;
  --grey: #f0f1ed;
  --surface: #ffffff;
  --ink: #111417;
  --ink-2: #474f57;
  --ink-3: #7a828a;
  --line: #e1e2dd;
  --accent: #0b7a55; /* solder mask green */
  --accent-ink: #075a3f;
  --accent-soft: #e4f1ea;
  --radius: 8px;
  --wrap: 1240px;
  --font: "Bricolage Grotesque", system-ui, sans-serif;

  /* fixed type scale */
  --t-xs: 13px;
  --t-sm: 15px;
  --t-md: 16px;
  --t-lg: 20px;
  --t-xl: 34px;
  --t-2xl: 64px;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 var(--t-md)/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
}
h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
h1 {
  font-size: var(--t-2xl);
  font-weight: 800;
}
h2 {
  font-size: var(--t-xl);
  font-weight: 700;
}
h3 {
  font-size: var(--t-lg);
  font-weight: 700;
}
p {
  margin: 0 0 1em;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 32px;
}
.muted {
  color: var(--ink-2);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo {
  display: block;
}
.logo img {
  height: 34px;
  width: auto;
}
.logo-inv img {
  height: 30px;
}
.nav {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 6px;
}
.nav a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  text-decoration: none;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
  border-bottom: 4px solid transparent;
  border-top: 4px solid transparent;
}
.nav a:hover {
  color: var(--accent);
}
.nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.nav a.nav-btn {
  align-self: center;
  height: 46px;
  margin-left: 14px;
  padding: 0 22px;
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: 6px;
}
.nav a.nav-btn:hover {
  background: var(--accent);
  color: #fff;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: 6px;
  font: 700 var(--t-sm)/1 var(--font);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-ink);
}
.btn-ghost {
  border-color: var(--ink);
  color: var(--ink);
  background: transparent;
}
.btn-ghost:hover {
  background: var(--ink);
  color: #fff;
}
.btn-buy {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}
.btn-buy:hover {
  border-color: var(--ink);
}
.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- sections ---------- */
section {
  padding: 96px 0;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 36px;
}

/* hero */
.hero {
  position: relative;
  padding: 0;
  overflow: hidden;
  min-height: min(86vh, 820px);
  display: flex;
  align-items: center;
  color: #fff;
  background: #0b0d0f;
}
/* photo layer: moves slower than the page (parallax) and brightens a little while scrolling */
.hero-bg {
  position: absolute;
  left: 0;
  right: 0;
  top: -10%;
  bottom: -10%;
  z-index: 0;
  background: url("img/hero.jpg") right 20% center / cover no-repeat;
  transform: translate3d(0, var(--hero-shift, 0px), 0)
    scale(var(--hero-scale, 1));
  filter: brightness(var(--hero-light, 1)) saturate(var(--hero-sat, 1));
  will-change: transform, filter;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    90deg,
    rgba(10, 12, 14, 0.92) 0%,
    rgba(10, 12, 14, 0.78) 38%,
    rgba(10, 12, 14, 0.15) 75%
  );
}
.hero-inner {
  position: relative;
  z-index: 2;
}
.hero-inner {
  width: 100%;
  padding-top: 80px;
  padding-bottom: 80px;
}
.hero h1 {
  max-width: 760px;
  font-size: 72px;
  line-height: 1.04;
}
.hero .lead {
  font-size: var(--t-lg);
  line-height: 1.6;
  color: #d5dade;
  max-width: 600px;
  margin: 28px 0 40px;
}
.hero-ctas {
  gap: 14px;
}
.hero-ctas .btn {
  padding: 18px 30px;
  font-size: var(--t-md);
}
.btn-light {
  border-color: #fff;
  color: #fff;
  background: transparent;
}
.btn-light:hover {
  background: #fff;
  color: var(--ink);
}

/* coloured home sections */
.sec-green {
  background: var(--green-deep);
  color: #fff;
}
.sec-green .btn-ghost,
.sec-dark .btn-ghost {
  border-color: #fff;
  color: #fff;
}
.sec-green .btn-ghost:hover,
.sec-dark .btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}
.sec-green .car-arrow {
  border-color: #fff;
  color: #fff;
}
.sec-green .car-arrow:hover {
  background: #fff;
  color: var(--green-deep);
}
.sec-green .slide-card {
  border-color: transparent;
}
.sec-yellow {
  background: var(--yellow);
}
.sec-yellow .slide-card {
  border-color: transparent;
}
.sec-yellow .slide-card-img {
  background: #fff7d9;
}
.sec-dark {
  background: var(--ink);
  color: #fff;
}
.sec-dark .fri3d-block {
  border-radius: 0;
}
.sec-dark .fri3d-text {
  padding-left: 0;
}
.sec-accent {
  background: var(--accent);
  color: #fff;
}
.sec-accent .contact-block {
  background: transparent;
  padding: 0;
  border-radius: 0;
}
.sec-grey {
  background: var(--grey);
}

/* ---------- home: white sections with rounded colour shapes behind the content ---------- */
.deco {
  position: relative;
  overflow: hidden;
  background: #fff;
}
.deco > .wrap {
  position: relative;
  z-index: 1;
}
.deco::before,
.deco::after {
  content: "";
  position: absolute;
  z-index: 0;
  pointer-events: none;
}
/* The rounded side of a colour panel bulges out at most --bulge past the content edge, and its curve is never
   wider than that bulge, so on narrower windows the curve can never cut through a heading, button or card.
   --gut = space between the window edge and the content. */
.deco {
  --gut: max(32px, calc((100vw - var(--wrap)) / 2 + 32px));
  --bulge: min(var(--gut), 200px);
  --curve: max(
    20px,
    calc(var(--bulge) - 12px)
  ); /* 12px margin for the scrollbar, which 100vw includes */
}
.deco .slide-card {
  border-color: var(--line);
  box-shadow: 0 10px 30px rgba(17, 20, 23, 0.08);
}

/* projects: green panel with big rounded right side, cards hang over its lower edge */
.deco-green::before {
  left: 0;
  right: calc(var(--gut) - var(--bulge));
  top: 0;
  height: 76%;
  background: var(--green-deep);
  border-radius: 0 var(--curve) var(--curve) 0;
}
/* one yellow circle, half off the right edge, below the green panel so it never covers content */
.deco-green::after {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: var(--yellow);
  right: -120px;
  bottom: -60px;
}
.deco-green .section-head h2 {
  color: #fff;
}
.deco-green .section-head .btn-ghost {
  border-color: #fff;
  color: #fff;
}
.deco-green .section-head .btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}

/* solder kits: yellow panel from the right with a big rounded left side */
.deco-yellow::before {
  right: 0;
  left: calc(var(--gut) - var(--bulge));
  top: 0;
  height: 76%;
  background: var(--yellow);
  border-radius: var(--curve) 0 0 var(--curve);
}
.deco-yellow::after {
  display: none;
}
.deco-yellow .slide-card-img {
  background: #fff8de;
}

/* Fri3d: rounded dark block with a green circle peeking out */
.deco-dark {
  padding-top: 24px;
}
.deco-dark .fri3d-block {
  border-radius: 24px;
}
.deco-dark::before {
  display: none;
}

/* contact: rounded green block with a thin yellow accent line */
.deco-accent {
  padding-top: 24px;
}
.deco-accent .contact-block {
  border-radius: 32px;
  position: relative;
  overflow: hidden;
}
/* second and last circle: yellow, tucked into the bottom-left corner of the contact block */
.deco-accent .contact-block::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: var(--yellow);
  left: -110px;
  bottom: -150px;
}
.deco-accent .contact-block > * {
  position: relative;
  z-index: 1;
}
/* keep text clear of the yellow corner circle */
.deco-accent .contact-block {
  padding-left: 190px;
}
@media (max-width: 1000px) {
  .deco-accent .contact-block {
    padding-left: 40px;
    padding-bottom: 120px;
  }
}

/* home: contact block with a short form */
.home-contact {
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 56px;
}
.quick-form {
  background: #fff;
  color: var(--ink);
  border-radius: 16px;
  padding: 32px;
}
.quick-form .field {
  margin-bottom: 16px;
}
.quick-form textarea {
  min-height: 110px;
}
.home-contact .quick-form .btn-primary {
  background: var(--accent);
  color: #fff;
  width: 100%;
  justify-content: center;
  padding: 16px;
}
.home-contact .quick-form .btn-primary:hover {
  background: var(--green-deep);
}
.quick-form .notice {
  margin-top: 12px;
}

/* coloured page heads (projects, about, contact, distributors) */
.page-band {
  background: var(--green-deep);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.page-band::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  width: 34%;
  height: 8px;
  background: var(--yellow);
}
.page-band .page-head {
  position: relative;
  z-index: 1;
  padding: 88px 32px 80px;
}
.page-band .page-head p {
  color: #cfe3da;
}
.page-band + .wrap.library {
  padding-top: 48px;
}
.page-band + .wrap.contact-grid,
.page-band + section {
  margin-top: 0;
}

/* sliding carousels (home) */
.slider-view {
  /* hide the cards outside the view on the sides only, so a hovered card can lift and show its shadow */
  overflow-x: clip;
  overflow-y: visible;
}
.slider-track {
  display: flex;
  column-gap: 20px;
  will-change: transform;
}
.slide-card {
  flex: 0 0 calc((100% - 40px) / 3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
}
/* one fixed image frame for every card, so a full card always fits on screen */
.slide-card-img {
  height: 220px;
  background: #f3f4f0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  overflow: hidden;
}
.slide-card-img img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}
.slide-card-img .placeholder {
  height: 100%;
}
.slide-card-body {
  padding: 22px 24px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.slide-card-body h3 {
  font-size: 20px;
  margin-bottom: 10px;
}
.slide-card-body p {
  font-size: var(--t-sm);
  line-height: 1.65;
  color: var(--ink-2);
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* project detail: coloured top band */
.detail-band {
  background: var(--grey);
  border-bottom: 6px solid var(--yellow);
}
.detail-band .crumbs a {
  color: var(--accent);
}
.detail-band .detail-img {
  border: 0;
}
.slide-card-link {
  margin-top: auto;
  font-weight: 700;
  font-size: var(--t-sm);
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.slider-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.car-arrow {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  background: transparent;
  font-size: 20px;
  cursor: pointer;
  color: var(--ink);
}
.car-arrow:hover {
  background: var(--ink);
  color: #fff;
}

/* Fri3d block (home) */
.fri3d-block {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  overflow: hidden;
}
.fri3d-text {
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}
.fri3d-text h2 {
  font-size: 38px;
  margin-bottom: 20px;
}
.fri3d-text p {
  color: #c3cad0;
  font-size: 17px;
  line-height: 1.75;
  margin-bottom: 28px;
}
.fri3d-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #2a3137;
}
.fri3d-grid img {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #1b2025;
  padding: 24px;
}

/* contact block (home) */
.contact-block {
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius);
  padding: 64px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}
.contact-block h2 {
  margin-bottom: 20px;
}
.contact-block p {
  color: #d9efe5;
  font-size: 17px;
  line-height: 1.75;
  max-width: 720px;
}
.contact-block p:last-child {
  margin-bottom: 0;
}
.contact-block .btn-primary {
  background: #fff;
  color: var(--accent-ink);
  padding: 18px 32px;
  font-size: var(--t-md);
}
.contact-block .btn-primary:hover {
  background: var(--ink);
  color: #fff;
}

/* type tiles */
.type-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
.type-tile {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 140px;
}
.type-tile:hover {
  border-color: var(--ink);
}
.type-tile h3 {
  font-size: 18px;
}
.type-tile .count {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--accent);
}
.type-tile p {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin: 8px 0 0;
}

/* feature blocks */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 44px;
}
.block.dark {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.block.dark .muted {
  color: #b9c0c6;
}
.block h2 {
  margin-bottom: 18px;
  font-size: 30px;
}
.block .btn {
  margin-top: 12px;
}
.block.dark .btn-ghost {
  border-color: #fff;
  color: #fff;
}
.block.dark .btn-ghost:hover {
  background: #fff;
  color: var(--ink);
}
.fri3d-strip {
  display: flex;
  gap: 12px;
  margin-top: 28px;
}
.fri3d-strip img {
  width: 33%;
  aspect-ratio: 1;
  object-fit: contain;
  background: #20262b;
  border-radius: 6px;
  padding: 10px;
}

/* partners */
.partners {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
.partners-title {
  font-size: var(--t-lg);
  text-align: center;
  margin-bottom: 36px;
}
/* logo marquee: the row is duplicated in JS and scrolls endlessly */
.logo-row {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
  mask-image: linear-gradient(
    90deg,
    transparent,
    #000 8%,
    #000 92%,
    transparent
  );
}
.logo-track {
  display: flex;
  align-items: center;
  gap: 72px;
  width: max-content;
  animation: marquee 40s linear infinite;
  padding: 8px 0;
}
.logo-row:hover .logo-track {
  animation-play-state: paused;
}
.logo-track a {
  display: block;
  flex: none;
}
.logo-track img {
  height: 56px;
  width: auto;
  transition: transform 0.2s;
}
.logo-track a:hover img {
  transform: scale(1.08);
}
@keyframes marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(calc(-50% - 36px));
  }
}

/* ---------- project cards ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: border-color 0.15s;
}
.card:hover {
  border-color: var(--ink);
}
/* strict grid: every image frame has the same size */
.card-img {
  position: relative;
  height: 230px;
  background: #f3f4f0;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.card-img img {
  position: absolute;
  inset: 20px;
  width: calc(100% - 40px);
  height: calc(100% - 40px);
  object-fit: contain;
}
.slide-card-img {
  position: relative;
}
.slide-card-img img.photo {
  position: absolute;
}
.card-img img.photo,
.slide-card-img img.photo {
  inset: 0;
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card-img .placeholder {
  position: absolute;
  inset: 0;
  border-radius: 0;
}
.placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--ink-3);
  background: #e9e9e4;
  border-radius: 4px;
}
.card-body {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}
/* fixed text heights so every card in the grid is exactly the same size */
.card-body h3 {
  font-size: 17px;
  line-height: 1.3;
  height: 2.6em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-body p {
  font-size: var(--t-sm);
  line-height: 1.55;
  color: var(--ink-2);
  margin: 0;
  height: 4.65em;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-meta {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  overflow: hidden;
  height: 30px;
}

.tag {
  display: inline-block;
  font: 600 12px/1 var(--font);
  padding: 6px 9px;
  border-radius: 4px;
  background: #eeeee9;
  color: var(--ink-2);
  text-decoration: none;
  white-space: nowrap;
}
.tag.chip {
  background: #eaeef2;
  color: #2f4a63;
}
.tag.fri3d {
  background: var(--yellow-soft);
  color: #6b5200;
}
.tag.buy {
  background: var(--accent-soft);
  color: var(--accent-ink);
}
a.tag:hover {
  outline: 1px solid currentColor;
}

/* ---------- library page ---------- */
.page-head {
  padding: 72px 0 36px;
}
.page-head p {
  max-width: 640px;
  color: var(--ink-2);
  font-size: var(--t-lg);
  line-height: 1.55;
  margin-top: 18px;
}
.library {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 40px;
  padding-bottom: 96px;
  align-items: start;
}
.filters {
  position: sticky;
  top: 108px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.filter-group h4 {
  margin: 0 0 12px;
  font-size: var(--t-sm);
  font-weight: 700;
}
.filter-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.fbtn {
  font: 600 13px/1 var(--font);
  padding: 9px 11px;
  border-radius: 5px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-2);
}
.fbtn:hover {
  border-color: var(--ink-3);
}
.fbtn.on {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.fbtn small {
  color: var(--ink-3);
  margin-left: 5px;
  font-weight: 500;
}
.fbtn.on small {
  color: #aab2b9;
}
.fbtn.toggle.on {
  background: var(--accent);
  border-color: var(--accent);
}
.searchbar {
  position: relative;
  margin-bottom: 20px;
}
.searchbar input {
  width: 100%;
  padding: 17px 18px 17px 50px;
  font: 500 var(--t-md)/1 var(--font);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
}
.searchbar input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
.searchbar svg {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-3);
}
.results-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  font-size: var(--t-sm);
  color: var(--ink-2);
  min-height: 32px;
  gap: 12px;
  flex-wrap: wrap;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.clear {
  background: none;
  border: 0;
  color: var(--accent);
  font: 700 var(--t-sm)/1 var(--font);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.empty {
  padding: 64px;
  text-align: center;
  background: var(--surface);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-2);
}

/* ---------- project detail ---------- */
.crumbs {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--ink-3);
  padding: 32px 0 0;
}
.crumbs a {
  text-decoration: none;
  color: var(--ink-2);
}
.crumbs a:hover {
  color: var(--accent);
}
.detail-top {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  padding: 32px 0 72px;
  align-items: start;
}
.detail-img {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  aspect-ratio: 1/1;
  display: grid;
  place-items: center;
  padding: 40px;
}
.detail-img img {
  max-height: 100%;
  object-fit: contain;
}
.detail-info h1 {
  font-size: 46px;
  margin-bottom: 18px;
}
.detail-info .lead {
  font-size: var(--t-lg);
  line-height: 1.55;
  color: var(--ink-2);
  margin-bottom: 24px;
}
.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 32px;
}
.buy-box,
.gh-box {
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 24px;
}
.buy-box {
  margin-top: 8px;
}
.buy-box h4,
.gh-box h4 {
  margin: 0 0 12px;
  font-size: var(--t-md);
  font-weight: 700;
}
.gh-box p {
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.detail-body {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  padding: 72px 0;
  border-top: 1px solid var(--line);
}
h3.sub {
  font-size: 24px;
  margin-bottom: 20px;
}
.detail-body .text p {
  font-size: var(--t-md);
  line-height: 1.8;
  color: #2b3137;
}
.specs {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.specs th,
.specs td {
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: var(--t-sm);
  vertical-align: top;
}
.specs tr:last-child th,
.specs tr:last-child td {
  border-bottom: 0;
}
.specs td {
  color: var(--ink);
} /* the table is white, also inside the dark green band */
.specs th {
  font-weight: 600;
  color: var(--ink-3);
  width: 38%;
  background: #fafaf8;
}
.related {
  padding: 72px 0 96px;
}
.related .card {
  border-color: transparent;
}
.related .grid {
  grid-template-columns: repeat(4, 1fr);
}

/* ---------- distributors: open rows, alternating colour, no boxes ---------- */
.dist-row {
  padding: 72px 0;
}
.dist-row:nth-child(odd) {
  background: #fff;
}
.dist-row:nth-child(even) {
  background: var(--grey);
}
.dist-row .wrap {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 64px;
  align-items: center;
}
.dist-logo {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  padding: 48px;
}
.dist-logo.c-green {
  background: var(--green-deep);
}
.dist-logo.c-yellow {
  background: var(--yellow);
}
.dist-logo.c-accent {
  background: var(--accent);
}
.dist-logo.c-ink {
  background: var(--ink);
}
.dist-logo img {
  max-height: 110px;
  max-width: 100%;
  object-fit: contain;
}
.dist-logo .wordmark {
  font-weight: 800;
  font-size: 34px;
  color: #fff;
  letter-spacing: -0.02em;
}
.dist-where {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--accent-ink);
  background: var(--accent-soft);
  padding: 6px 10px;
  border-radius: 4px;
  margin-bottom: 14px;
}
.dist-row h2 {
  font-size: 40px;
  margin-bottom: 16px;
}
.dist-row p {
  font-size: 17px;
  line-height: 1.75;
  color: #2b3137;
  max-width: 680px;
}
.dist-row h4 {
  font-size: var(--t-sm);
  font-weight: 700;
  margin: 8px 0 12px;
}
.dist-products {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 28px;
}
.dist-products .tag {
  font-size: 13px;
  padding: 8px 11px;
}
.tag.more {
  background: var(--yellow);
  color: var(--ink);
}

/* about: how we work */
.how {
  background: var(--grey);
}
.how h2 {
  margin-bottom: 32px;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-radius: var(--radius);
  overflow: hidden;
}
.how-item {
  padding: 44px 40px;
}
.how-item h3 {
  font-size: 22px;
  margin-bottom: 14px;
}
.how-item p {
  font-size: var(--t-md);
  line-height: 1.7;
  margin: 0;
}
.how-green {
  background: var(--green-deep);
  color: #fff;
}
.how-green p {
  color: #cfe3da;
}
.how-yellow {
  background: var(--yellow);
  color: var(--ink);
}
.how-dark {
  background: var(--ink);
  color: #fff;
}
.how-dark p {
  color: #c3cad0;
}

/* contact: form without side column */
.contact-grid {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
  padding-top: 56px;
}

/* ---------- about ---------- */
.prose {
  max-width: 760px;
}
.prose p {
  font-size: 17px;
  line-height: 1.8;
  color: #2b3137;
}
.people {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.person {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px;
}
.person-head {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
}
.person-head img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: #eee;
}
.person-head h3 {
  margin-bottom: 6px;
  font-size: 22px;
}
.person-head .role {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--accent);
}
.person p {
  font-size: var(--t-sm);
  line-height: 1.75;
  color: #2b3137;
}
.person .links {
  display: flex;
  gap: 18px;
  margin-top: 20px;
  font-size: var(--t-sm);
  font-weight: 700;
}
.person .links a {
  color: var(--accent);
}

/* ---------- contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 40px;
  padding-bottom: 96px;
  align-items: start;
}
form.block {
  padding: 40px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}
.field label {
  font-size: var(--t-sm);
  font-weight: 700;
}
.field label small {
  font-weight: 500;
  color: var(--ink-3);
}
.field input,
.field select,
.field textarea {
  font: 500 var(--t-md)/1.4 var(--font);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fcfcfa;
  color: var(--ink);
}
.field textarea {
  min-height: 150px;
  resize: vertical;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
.row2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.qtype {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 24px;
}
.qtype label {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: var(--t-sm);
  background: #fcfcfa;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.qtype label b {
  display: block;
  font-weight: 700;
}
.qtype label span {
  color: var(--ink-2);
  font-size: var(--t-xs);
}
.qtype input {
  accent-color: var(--accent);
  margin-top: 4px;
}
.qtype label:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.conditional {
  display: none;
}
.conditional.show {
  display: block;
}
.aside .block {
  padding: 28px;
  margin-bottom: 16px;
}
.aside h3 {
  font-size: 17px;
  margin-bottom: 10px;
}
.aside p {
  font-size: var(--t-sm);
  color: var(--ink-2);
  margin: 0;
}
.notice {
  display: none;
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-radius: 6px;
  font-size: var(--t-sm);
}

/* ---------- footer ---------- */
.site-footer {
  background: var(--grey);
  color: var(--ink-2);
  padding: 64px 0 40px;
  font-size: var(--t-sm);
  border-top: 6px solid var(--yellow);
}
.site-footer .cols {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
}
.site-footer h5 {
  margin: 0 0 14px;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--ink);
}
.site-footer a {
  color: var(--ink-2);
  text-decoration: none;
  display: block;
  margin-bottom: 8px;
}
.site-footer a:hover {
  color: var(--accent);
  text-decoration: underline;
}
.site-footer .logo {
  margin-bottom: 18px;
}
.site-footer .bottom {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 20px;
  font-size: var(--t-xs);
  color: var(--ink-3);
  display: flex;
  justify-content: space-between;
}

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .detail-top,
  .detail-body,
  .split,
  .contact-grid,
  .people,
  .dist-row .wrap,
  .how-grid {
    grid-template-columns: 1fr;
  }
  .library {
    grid-template-columns: 1fr;
  }
  .filters {
    position: static;
  }
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .type-grid,
  .related .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .site-footer .cols {
    grid-template-columns: 1fr 1fr;
  }
  .hero h1 {
    font-size: 52px;
  }
  .fri3d-block,
  .contact-block {
    grid-template-columns: 1fr;
  }
  .fri3d-text,
  .contact-block {
    padding: 40px;
  }
  .hero-bg {
    background-position: center;
  }
}
/* home carousels: two cards instead of three once three would get narrower than ~345px */
@media (max-width: 1150px) {
  .slide-card {
    flex-basis: calc((100% - 20px) / 2);
  }
}
@media (max-width: 700px) {
  :root {
    --t-2xl: 40px;
    --t-xl: 28px;
  }
  .hero h1 {
    font-size: 40px;
  }
  .hero-bg {
    background-position: center;
  }
  .hero::before {
    background: rgba(10, 12, 14, 0.8);
  }
  .site-header .wrap {
    height: auto;
    flex-wrap: wrap;
    padding-top: 12px;
    padding-bottom: 0;
  }
  .nav {
    height: 56px;
    width: 100%;
    overflow-x: auto;
  }
  .nav a {
    padding: 0 10px;
    font-size: 15px;
  }
  .nav a.nav-btn {
    display: none;
  }
  .grid,
  .type-grid,
  .related .grid,
  .qtype,
  .row2 {
    grid-template-columns: 1fr;
  }
  .slide-card {
    flex-basis: 85%;
  }
  section {
    padding: 64px 0;
  }
}

/* ---------- project page themes: green (boards, add-ons) or yellow (solder kits) ---------- */
.btn-theme {
  border: 0;
}
.theme-green .btn-theme {
  background: var(--accent);
  color: #fff;
}
.theme-green .btn-theme:hover {
  background: var(--green-deep);
}
.theme-yellow .btn-theme {
  background: var(--yellow);
  color: var(--ink);
}
.theme-yellow .btn-theme:hover {
  background: #f2bb12;
}
.theme-green .detail-band {
  border-bottom-color: var(--accent);
}

/* "About this project" on a full colour band */
.about-band .detail-body {
  border-top: 0;
}
.theme-green .about-band {
  background: var(--green-deep);
  color: #fff;
}
.theme-green .about-band .detail-body .text p {
  color: #dcebe4;
}
.theme-yellow .about-band {
  background: var(--yellow);
  color: var(--ink);
}
.theme-yellow .about-band .detail-body .text p {
  color: #2b2a20;
}
.about-band .specs {
  border: 0;
}

/* useful links */
.useful {
  padding: 80px 0 24px;
}
.useful h2 {
  margin-bottom: 28px;
}
.link-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.link-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 22px;
  text-decoration: none;
  background: var(--grey);
  border-radius: var(--radius);
  border-left: 5px solid var(--accent);
  transition: background 0.15s;
}
.theme-yellow .link-item {
  border-left-color: var(--yellow);
}
.link-item:hover {
  background: #e6e8e2;
}
.link-kind {
  font-size: var(--t-xs);
  font-weight: 700;
  color: var(--accent);
}
.theme-yellow .link-kind {
  color: #8a6a00;
}
.link-label {
  font-size: var(--t-md);
  font-weight: 600;
  color: var(--ink);
}

/* related projects: plain, less prominent */
.related {
  background: #fff;
  padding-top: 80px;
}
.related h2 {
  font-size: 26px;
}
.related .card {
  border-color: var(--line);
}
@media (max-width: 1000px) {
  .link-list {
    grid-template-columns: 1fr;
  }
}
/* footer: legal company details */
.site-footer .legal {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 28px;
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: var(--t-xs);
  color: var(--ink-2);
}
.site-footer .legal a {
  display: inline;
  margin: 0;
}
.site-footer .bottom {
  margin-top: 16px;
  border-top: 0;
  padding-top: 0;
}
.site-footer .legal-links {
  display: flex;
  gap: 20px;
}
.site-footer .legal-links a {
  display: inline;
  margin: 0;
  color: var(--ink-2);
}
.todo-inline {
  background: #fff1bf;
  color: #6b5200;
  padding: 1px 5px;
  border-radius: 3px;
}
/* privacy and cookie policy pages */
.policy h2 {
  font-size: 24px;
  margin: 40px 0 12px;
}
.policy h2:first-of-type {
  margin-top: 8px;
}
.policy-date {
  font-size: var(--t-sm);
  color: var(--ink-3);
}
/* ---------- subtle motion ---------- */
/* hidden instantly, animated only on the way in */
.reveal {
  opacity: 0;
  transform: translateY(22px);
}
.reveal.in {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.7s ease,
    transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* hero text appears line by line on load */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(26px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
.hero h1,
.hero .lead,
.hero-ctas {
  animation: rise 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero .lead {
  animation-delay: 0.18s;
}
.hero-ctas {
  animation-delay: 0.34s;
}
/* the hero photo settles in with a slow zoom */
.hero-bg {
  animation: settle-zoom 2.4s ease-out both;
}
@keyframes settle-zoom {
  from {
    scale: 1.08;
    opacity: 0.55;
  }
  to {
    scale: 1;
    opacity: 1;
  }
}

/* gentle hover feedback */
.card-img img,
.slide-card-img img {
  transition: transform 0.5s ease;
}
.card:hover .card-img img,
.slide-card:hover .slide-card-img img {
  transform: scale(1.04);
}
.card,
.slide-card {
  transition:
    border-color 0.15s,
    box-shadow 0.25s,
    transform 0.25s;
}
.card:hover,
.slide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(17, 20, 23, 0.1);
}
.btn {
  transition:
    background 0.15s,
    color 0.15s,
    transform 0.15s;
}
.btn:hover {
  transform: translateY(-1px);
}
.link-item {
  transition:
    background 0.15s,
    transform 0.2s;
}
.link-item:hover {
  transform: translateX(4px);
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hero-bg,
  .hero h1,
  .hero .lead,
  .hero-ctas {
    animation: none;
  }
  .card:hover,
  .slide-card:hover,
  .btn:hover,
  .link-item:hover,
  .card:hover .card-img img {
    transform: none;
  }
}
/* 404 */
.hero-search-404 {
  display: flex;
  gap: 10px;
  max-width: 640px;
}
.hero-search-404 input {
  flex: 1;
  padding: 16px 18px;
  font: 500 var(--t-md)/1 var(--font);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.hero-search-404 input:focus {
  outline: 2px solid var(--accent);
  border-color: transparent;
}
/* ---------- mobile ---------- */
.nav-toggle {
  display: none;
}
@media (max-width: 900px) {
  /* header: logo + hamburger, menu drops down as a full-width panel */
  .site-header .wrap {
    height: 68px;
    flex-wrap: nowrap;
    padding-top: 0;
  }
  .logo img {
    height: 28px;
  }
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    padding: 10px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .nav-toggle span {
    display: block;
    height: 3px;
    background: var(--ink);
    border-radius: 2px;
    transition:
      transform 0.2s,
      opacity 0.2s;
  }
  .menu-open .nav-toggle span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .menu-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .menu-open .nav-toggle span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }
  .nav {
    display: none;
    position: absolute;
    left: 0;
    right: 0;
    top: 68px;
    height: auto;
    width: auto;
    overflow: visible;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 6px solid var(--yellow);
    box-shadow: 0 16px 30px rgba(17, 20, 23, 0.12);
    padding: 8px 24px 20px;
  }
  .menu-open .nav {
    display: flex;
  }
  .nav a {
    padding: 16px 0;
    font-size: 18px;
    border: 0;
    border-bottom: 1px solid var(--line);
  }
  .nav a.active {
    border-bottom-color: var(--line);
    color: var(--accent);
  }
  .nav a.nav-btn {
    display: flex;
    justify-content: center;
    margin: 16px 0 0;
    height: 50px;
    border-bottom: 0;
  }

  /* general spacing */
  .wrap {
    padding: 0 20px;
  }
  section {
    padding: 64px 0;
  }
  .page-band .page-head {
    padding: 56px 20px 48px;
  }
  .page-head p {
    font-size: 17px;
  }
  h1 {
    font-size: 38px;
  }
  h2 {
    font-size: 28px;
  }

  /* hero */
  .hero {
    min-height: 78vh;
  }
  .hero h1 {
    font-size: 40px;
  }
  .hero .lead {
    font-size: 17px;
    margin: 20px 0 28px;
  }
  .hero-ctas .btn {
    padding: 15px 22px;
  }

  /* home carousels: one and a bit cards visible, arrows stay */
  .slide-card {
    flex-basis: 82%;
  }
  .deco-green::before,
  .deco-yellow::before {
    left: 0;
    right: 0;
    border-radius: 0;
    height: 58%;
  }
  .deco-green::after {
    display: none;
  }
  .section-head {
    flex-wrap: wrap;
    align-items: center;
  }

  /* Fri3d block and home form */
  .fri3d-block {
    grid-template-columns: 1fr;
  }
  .fri3d-text {
    padding: 0 0 32px;
  }
  .fri3d-text h2 {
    font-size: 28px;
  }
  .home-contact {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .deco-accent .contact-block {
    padding: 36px 24px 110px;
    border-radius: 20px;
  }
  .quick-form {
    padding: 24px 20px;
  }
  .row2 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  /* library: filters fold into a compact block above the results */
  .library {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .filters {
    position: static;
    gap: 18px;
  }
  .grid,
  .related .grid {
    grid-template-columns: 1fr;
  }
  .card-img {
    height: 210px;
  }

  /* project page */
  .detail-top {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 20px 0 48px;
  }
  .detail-info h1 {
    font-size: 32px;
  }
  .detail-img {
    padding: 20px;
  }
  .detail-body {
    grid-template-columns: 1fr;
    gap: 40px;
    padding: 56px 0;
  }
  .link-list {
    grid-template-columns: 1fr;
  }

  /* distributors, about, contact */
  .dist-row {
    padding: 48px 0;
  }
  .dist-row .wrap {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .dist-row h2 {
    font-size: 30px;
  }
  .dist-logo {
    aspect-ratio: 16 / 9;
    padding: 32px;
  }
  .how-grid,
  .people {
    grid-template-columns: 1fr;
  }
  .person {
    padding: 28px;
  }
  .contact-grid {
    padding-top: 32px;
  }
  form.block {
    padding: 24px 20px;
  }
  .qtype {
    grid-template-columns: 1fr;
  }

  /* footer */
  .site-footer .cols {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
  .site-footer .cols > div:first-child {
    grid-column: 1 / -1;
  }
  .site-footer .legal {
    flex-direction: column;
    gap: 4px;
  }
  .site-footer .bottom {
    flex-direction: column;
    gap: 12px;
  }
  .logo-track img {
    height: 44px;
  }
  .logo-track {
    gap: 48px;
  }
}
@media (max-width: 900px) {
  .hero-search-404 {
    flex-direction: column;
  }
  .hero-search-404 .btn {
    justify-content: center;
    padding: 15px;
  }
  .contact-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-grid > form {
    min-width: 0;
  }
  .field input,
  .field select,
  .field textarea {
    min-width: 0;
    width: 100%;
  }
  .card-meta {
    flex-wrap: wrap;
    height: auto;
  }
}

/* same green as the privacy link; also inside the green contact block, where paragraphs are light mint for the white-on-green text */
.form-privacy,
.contact-block .form-privacy {
  font-size: var(--t-xs);
  color: var(--accent);
  margin: 14px 0 0;
}
.form-privacy a {
  color: var(--accent);
}
.partners {
  padding: 48px 0;
}
/* ---------- library: filter bar on top (search + dropdowns with checkboxes) ---------- */
.library {
  display: block;
  padding-top: 40px;
}
.filterbar {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  gap: 10px;
  align-items: stretch;
  margin-bottom: 18px;
}
.filterbar .searchbar {
  margin: 0;
}
.dd {
  position: relative;
}
.dd-btn {
  height: 100%;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 44px 0 18px;
  position: relative;
  font: 600 var(--t-md)/1 var(--font);
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  white-space: nowrap;
}
.dd-btn::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--ink-2);
  border-bottom: 2px solid var(--ink-2);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.2s;
}
.dd.open .dd-btn::after {
  transform: translateY(-30%) rotate(-135deg);
}
.dd-btn:hover,
.dd.open .dd-btn {
  border-color: var(--ink);
}
.dd.active .dd-btn {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.dd-count:empty {
  display: none;
}
.dd-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 12px;
  display: inline-grid;
  place-items: center;
}
.dd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 30;
  min-width: 260px;
  max-height: 380px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 40px rgba(17, 20, 23, 0.14);
  padding: 8px;
}
.dd-panel.dd-wide {
  min-width: 300px;
}
.dd-panel.dd-right {
  left: auto;
  right: 0;
}
.dd.open .dd-panel {
  display: block;
}
.dd-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: var(--t-sm);
}
.dd-opt:hover {
  background: var(--grey);
}
.dd-opt input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  margin: 0;
  flex: none;
}
.dd-opt span {
  flex: 1;
}
.dd-opt small {
  color: var(--ink-3);
  font-weight: 600;
}
.dd-opt.none {
  opacity: 0.45;
}
button.chip-x {
  border: 0;
  cursor: pointer;
  font-family: var(--font);
}
button.chip-x b {
  margin-left: 4px;
}
/* project library: 4, 3, 2, then 1 column; switches to 2 at the same width as the home carousels */
.library .grid {
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 1250px) {
  .library .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 1150px) {
  .library .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 640px) {
  .library .grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 900px) {
  .filterbar {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .filterbar .searchbar {
    grid-column: 1 / -1;
  }
  .dd-btn {
    width: 100%;
    padding: 0 30px 0 12px;
    font-size: 14px;
    min-height: 48px;
    justify-content: flex-start;
  }
  .dd-btn::after {
    right: 12px;
  }
  .dd {
    position: static;
  }
  .filterbar {
    position: relative;
  }
  .dd-panel,
  .dd-panel.dd-right,
  .dd-panel.dd-wide {
    left: 0;
    right: 0;
    min-width: 0;
    top: auto;
    margin-top: 6px;
  }
}
@media (max-width: 900px) {
  .filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .dd-btn {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    gap: 6px;
  }
}
/* ---------- projects page: colour ---------- */
/* the library sits on a light grey surface, cards are white with a tinted image frame */
.page-band + .wrap.library {
  padding-top: 40px;
}
body:has(.library) main {
  background: var(--grey);
  padding-bottom: 8px;
}
.library .card {
  border-color: transparent;
  box-shadow: 0 2px 0 rgba(17, 20, 23, 0.04);
  border-bottom: 5px solid var(--accent);
}
.library .card-kit {
  border-bottom-color: var(--yellow);
}
.card-kit .card-img {
  background: #fff4cc;
}
.card-board .card-img {
  background: #e3f0e9;
}
.card-img {
  border-bottom: 0;
}
.library .filterbar .searchbar input,
.library .dd-btn {
  border-color: #dcded8;
}
.results-bar b {
  color: var(--accent);
  font-size: 18px;
}
/* related projects on project pages use the same tinted cards */
.related .card {
  border-bottom: 5px solid var(--accent);
}
.related .card-kit {
  border-bottom-color: var(--yellow);
}
/* ---------- about: story with key figures, kit strip, coloured people band ---------- */
.about-story {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.about-story .prose {
  max-width: none;
}
.about-facts {
  display: grid;
  gap: 12px;
}
.fact {
  border-radius: var(--radius);
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fact b {
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.fact span {
  font-size: var(--t-md);
}
.fact-yellow {
  background: var(--yellow);
  color: var(--ink);
}
.fact-green {
  background: var(--green-deep);
  color: #fff;
}
.fact-green span {
  color: #cfe3da;
}
.fact-dark {
  background: var(--ink);
  color: #fff;
}
.fact-dark span {
  color: #c3cad0;
}
.about-strip {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0;
  background: #f3f4f0;
}
.about-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  padding: 26px;
}
.about-strip img:nth-child(odd) {
  background: #fff4cc;
}
.about-strip img:nth-child(even) {
  background: #e3f0e9;
}
.people-band {
  background: var(--green-deep);
}
.people-band h2 {
  color: #fff;
}
.people-band .person {
  border: 0;
  border-top: 6px solid var(--yellow);
}
.person-head img {
  box-shadow:
    0 0 0 4px #fff,
    0 0 0 7px var(--yellow);
}
@media (max-width: 900px) {
  .about-story {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .about-strip {
    grid-template-columns: repeat(3, 1fr);
  }
  .about-strip img {
    padding: 14px;
  }
  .fact b {
    font-size: 36px;
  }
}
/* ---------- contact: wide, horizontal form ---------- */
.contact-grid {
  grid-template-columns: minmax(0, 1fr);
}
form.block#form {
  padding: 44px 48px;
  border: 0;
  border-top: 6px solid var(--yellow);
  box-shadow: 0 10px 40px rgba(17, 20, 23, 0.06);
}
body:has(#form) main {
  background: var(--grey);
}
#form .qtype {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 32px;
}
#form .qtype label {
  padding: 18px;
}
.form-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: stretch;
}
.form-right {
  display: flex;
}
.field-msg {
  flex: 1;
  margin-bottom: 20px;
}
.field-msg textarea {
  flex: 1;
  min-height: 220px;
}
.form-foot {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.form-foot .form-privacy {
  margin: 0;
}
.form-foot .notice {
  flex-basis: 100%;
}
@media (max-width: 1000px) {
  #form .qtype {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 900px) {
  form.block#form {
    padding: 24px 20px;
  }
  #form .qtype {
    grid-template-columns: 1fr;
  }
  .form-cols {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .field-msg textarea {
    min-height: 150px;
  }
  .form-foot .btn {
    width: 100%;
    justify-content: center;
  }
}
/* filters left, search right */
.filterbar {
  grid-template-columns: auto auto auto 1fr;
}
@media (max-width: 900px) {
  .filterbar {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
/* phones: three filter buttons in a row are too narrow for "Chip / platform", so two side by side and the third below */
@media (max-width: 500px) {
  .filterbar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .filterbar .dd:nth-child(3) {
    grid-column: 1 / -1;
  }
}
/* about: "How we work" calmer — white cards with a thin colour line instead of full colour blocks */
.how {
  background: #fff;
}
.how-grid {
  gap: 16px;
  border-radius: 0;
  overflow: visible;
}
.how-item,
.how-green,
.how-yellow,
.how-dark {
  background: var(--grey);
  color: var(--ink);
  border-radius: var(--radius);
  border-top: 4px solid var(--accent);
}
.how-yellow {
  border-top-color: var(--yellow);
}
.how-dark {
  border-top-color: var(--ink);
}
.how-green p,
.how-yellow p,
.how-dark p {
  color: var(--ink-2);
}
.how-item h3 {
  font-size: 20px;
}
/* home: colour panels run down past the cards, so the cards (and arrows) sit fully inside */
.deco-green::before,
.deco-yellow::before {
  height: auto;
  bottom: 56px;
}
.deco-green .car-arrow {
  border-color: #fff;
  color: #fff;
}
.deco-green .car-arrow:hover {
  background: #fff;
  color: var(--green-deep);
}
.deco-green::after {
  bottom: -150px;
}
@media (max-width: 900px) {
  .deco-green::before,
  .deco-yellow::before {
    height: auto;
    bottom: 40px;
  }
}
[x-cloak] {
  display: none !important;
}
