/* ================================
   BUTTONS
================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-pill);
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-sans);
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
  white-space: nowrap;
}

.btn:hover { opacity: 0.88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn--yellow {
  background-color: var(--color-yellow);
  color: var(--color-blue);
}

.btn--dark {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.btn--light-grey {
  background-color: var(--color-hover);
  color: var(--color-blue);
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-sm);
}

.btn--outline {
  background-color: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255,255,255,0.4);
}

.btn--outline:hover {
  border-color: var(--color-white);
}

.btn--sm {
  padding: 7px 14px;
  font-size: var(--text-xs);
}

.btn--pulse {
  animation: button-pulse var(--button-pulse-duration) ease-in-out infinite;
}

.btn--pulse:hover,
.btn--pulse:focus-visible {
  animation: none;
}

@keyframes button-pulse {
  0%, 100% { scale: 1; }
  50% { scale: var(--button-pulse-scale); }
}

@media (prefers-reduced-motion: reduce) {
  .btn--pulse { animation: none; }
}

/* ================================
   STAT BLOCK
================================ */
.stat-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-block__value {
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1;
}

.stat-block__label {
  font-family: var(--label-font);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: 150%;
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--color-blue);
}

/* ================================
   PROJECT CARD
================================ */
.project-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.project-card__image {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  background-color: var(--color-grey);
}

.project-card__illustration {
  position: relative;
  overflow: hidden;
  background-color: var(--color-cream);
}

.project-card__illustration svg {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}

.project-card__body {
  padding: var(--space-sm);
}

.project-card__title {
  font-size: var(--text-base);
  font-weight: 700;
  margin-bottom: 6px;
}

.project-card__desc {
  font-size: var(--text-sm);
  color: var(--color-blue);
  line-height: 1.5;
}

/* ================================
   PERSON CARD
================================ */
.person-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-xs);
}

.person-card__photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--color-grey);
}

.person-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.person-card__role {
  font-size: var(--text-xs);
  color: var(--color-blue);
}

/* ================================
   FAQ ACCORDION
================================ */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border-dark);
}

.faq-item {
  border-bottom: 1px solid var(--border-dark);
  padding-block: var(--space-md);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: var(--text-base);
  cursor: pointer;
  list-style: none;
  gap: var(--space-md);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: var(--text-xl);
  font-weight: 300;
  color: var(--color-blue);
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.faq-item[open] summary::after {
  content: '−';
  background: var(--color-yellow);
  color: var(--color-blue);
}

.faq-item__answer {
  padding-top: var(--space-sm);
  font-size: var(--text-sm);
  color: var(--color-blue);
  line-height: 1.7;
  max-width: 680px;
}

/* ================================
   SECTION HEADING
================================ */
.section-heading {
  margin-bottom: var(--head-gap);
}

.section-heading__label {
  font-family: var(--label-font);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  line-height: 150%;
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--color-blue);
  margin-bottom: var(--space-xs);
}

.section-heading__title {
  font-size: var(--text-4xl);
  font-weight: 600;
  line-height: 1.15;
}

/* mobile: step section titles down to match the shared h2 mobile size (3xl) */
@media (max-width: 900px) {
  .section-heading__title { font-size: var(--text-3xl); }
}

.section-heading__subtitle {
  margin-top: var(--space-xs);
  font-size: var(--text-lg);
  color: var(--color-blue);
  max-width: 560px;
}

/* ================================
   TESTIMONIAL CARD
================================ */
.testimonial-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  box-shadow: var(--shadow-sm);
}

.testimonial-card__quote {
  font-size: var(--text-sm);
  line-height: 1.7;
  color: var(--color-blue);
  margin-bottom: var(--space-sm);
}

.testimonial-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
}

.testimonial-card__photo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--color-grey);
}

.testimonial-card__name {
  font-size: var(--text-sm);
  font-weight: 600;
}

.testimonial-card__role {
  font-size: var(--text-xs);
  color: var(--color-blue);
}

/* ================================
   NEWSLETTER FORM (inline, reuse in footer)
================================ */
.newsletter-form {
  display: flex;
  gap: 8px;
  max-width: 400px;
}

.newsletter-form input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid rgba(0,0,0,0.15);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
  font-family: var(--font-sans);
}

.newsletter-form input:focus {
  outline: 2px solid var(--color-yellow);
}

/* ================================
   BOARD / MEMBER CARD  (shared)
   Dark card: full-height photo on the LEFT, then label → name → contact
   button stacked in the right column. Board contacts use the wide --row
   modifier with a larger portrait and a contact button below the name.

   Markup is `.board-card > .board-card__person(img + div[label,name]) + .btn`;
   `__person` is `display: contents` so the photo, the name block and the
   button all become cells of the card grid.
================================ */
.board-card {
  display: grid;
  width: 100%;
  max-width: var(--max-width-contact);
  margin-inline: auto;
  /* col: photo | right column (minmax(0,1fr) lets it shrink so the card never
     overflows a narrow viewport). rows: two flexible spacers top & bottom
     vertically centre the name+button group next to the taller photo. */
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: 1fr auto auto 1fr;
  column-gap: var(--space-md);
  padding: var(--space-md);
  min-width: 0;
  background-color: var(--color-blue);
  color: var(--color-white);
  border-radius: var(--radius-lg);
}

.board-card__person { display: contents; }

.board-card--text-only {
  grid-template-columns: minmax(0, 1fr);
}

.board-card--text-only .board-card__person > div,
.board-card--text-only > .btn {
  grid-column: 1;
}

/* portrait photo (2:3), inset inside the card with rounded corners and equal
   space above/below (card padding + vertical centering) */
.board-card__photo {
  grid-column: 1;
  grid-row: 1 / -1;
  align-self: center;
  width: 120px;
  aspect-ratio: 2 / 3;
  height: auto;
  object-fit: cover;
  border-radius: var(--radius-md);
  background-color: var(--color-grey);
}

/* name block (label + name), then button — centred as a group in the right column */
.board-card__person > div {
  grid-column: 2;
  grid-row: 2;
}

.board-card__label { color: var(--color-yellow); margin-bottom: 4px; }
.board-card__name { font-size: var(--text-lg); font-weight: 600; overflow-wrap: break-word; }

.board-card .btn {
  grid-column: 2;
  grid-row: 3;
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
  justify-content: center;
  margin-top: var(--space-sm);
}

.board-card--row {
  max-width: var(--max-width-wide);
}

.board-card--row .board-card__photo {
  width: var(--board-portrait-width);
}

/* Band wrapper for standalone board sections (innolab / join): keep the card
   at a card-like width rather than stretching across the whole band */
.board-band {
  padding-block: var(--space-lg) var(--space-xl);
  padding-inline: var(--space-lg);
}

.board-band__title {
  max-width: var(--max-width-contact);
  margin-inline: auto;
  margin-bottom: var(--head-gap);
  font-size: var(--text-4xl);
  font-weight: 600;
  text-align: center;
}

@media (max-width: 900px) {
  .board-band { padding-inline: var(--space-md); }
  .board-band__title { font-size: var(--text-3xl); }
  .board-card--row,
  .board-card--row.board-card--text-only {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: var(--space-sm);
    text-align: center;
  }
  .board-card--row .board-card__photo {
    width: var(--board-portrait-width-mobile);
    justify-self: center;
  }
  .board-card--row .board-card__photo,
  .board-card--row .board-card__person > div,
  .board-card--row > .btn,
  .board-card--row.board-card--text-only .board-card__person > div,
  .board-card--row.board-card--text-only > .btn {
    grid-column: 1;
    grid-row: auto;
  }
  .board-card--row > .btn { justify-self: center; margin-top: 0; }
}

/* A temporary loading view uses the original site's centered Origami treatment. */
.site-loading {
  position: fixed;
  inset: 0;
  z-index: var(--loading-layer);
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: var(--space-md);
  border: 0;
  outline: none;
  background-color: var(--color-loading-surface);
  color: var(--color-blue);
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: contain;
}

.site-loading:not(.site-loading--example):not([open]) { display: none; }
.site-loading::backdrop { background-color: var(--color-loading-surface); }

.site-loading img {
  width: clamp(var(--space-lg), var(--loading-logo-width), var(--loading-logo-max-width));
  height: auto;
  animation: loading-pulse var(--loading-pulse-duration) ease-in-out infinite;
}

.site-loading__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.site-loading--example {
  position: relative;
  z-index: auto;
  height: calc(var(--space-xl) * 2);
  border-radius: var(--radius-lg);
}

@media (max-width: 900px) {
  .site-loading img {
    width: clamp(var(--space-lg), var(--loading-logo-mobile-width), var(--loading-logo-max-width));
  }
}

@keyframes loading-pulse {
  0%, 100% { opacity: 0.6; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .site-loading img { animation: none; }
}
