/* One scroll = one screen */
html {
  scroll-snap-type: y mandatory;
  scroll-padding-top: var(--header-h);
  scroll-behavior: smooth;
}

.snap-section {
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100dvh - var(--header-h));
  box-sizing: border-box;
  padding: 2rem clamp(1.5rem, 8vw, 6rem);
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.site-footer {
  scroll-snap-align: end;
}

/* Story slides: text on one side, image on the other */
.slide {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(1.5rem, 5vw, 4rem);
}

.slide:nth-of-type(odd)  { background: #eef4fb; }
.slide:nth-of-type(even) { background: #ffffff; }

.slide.flip .slide-text  { order: 2; }
.slide.flip .slide-image { order: 1; }

.slide h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 1rem;
  color: #13233f;
}

.slide p {
  font-size: 1.25rem;
  line-height: 1.65;
  max-width: 34rem;
  color: #13233f;
}

.slide-image img {
  display: block;
  width: 100%;
  max-height: 65vh;
  object-fit: contain;
}

/* Team section */
.team {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: #13233f;
  color: #ffffff;
}

.team h2 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin: 0 0 2rem;
  text-align: center;
}

.team-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;      /* centers any leftover card on the last row */
  gap: 2rem 2.5rem;
  max-width: 68rem;
  margin: 0 auto;
}

.member {
  flex: 0 0 auto;
  min-width: 11rem;             /* grows if a name is longer */
  margin: 0;
  text-align: center;
}

.member img {
  width: 9rem;
  height: 9rem;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #89cfef;
  background: #2a3d5e;
}

.member figcaption {
  margin-top: 0.8rem;
}

.member strong {
  display: block;
  font-size: 1.1rem;
}

.member span {
  color: #b9c6dc;
}

.role {
  display: block;
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}

.names {
  list-style: none;
  margin: 0;
  padding: 0;
}

.names li {
  white-space: nowrap;          /* each name stays on one line */
  color: #b9c6dc;
  line-height: 1.5;
}

/* Shows a plain box if an image file can't be found */
img.missing {
  background: #cfd8e6;
  min-height: 9rem;
}

.slide-image img.missing {
  min-height: 14rem;
  border-radius: 8px;
}

/* Phones: stack text above image */
@media (max-width: 800px) {
  .slide {
    grid-template-columns: 1fr;
    align-content: center;
  }
  .slide.flip .slide-text  { order: 1; }
  .slide.flip .slide-image { order: 2; }
  .slide-image img { max-height: 40vh; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}