/* ================================
   APPLICATION ANNOUNCEMENT
================================ */
.application-banner {
  position: absolute;
  top: calc(var(--header-height, calc(var(--space-lg) + var(--space-xs))) + 1px);
  inset-inline: 0;
  z-index: 2;
  display: flex;
  background-color: var(--color-yellow);
  color: var(--color-blue);
}

.application-banner__link {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  padding-block: var(--space-xs);
  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;
}

.application-banner__track {
  display: flex;
  width: max-content;
}

.application-banner.is-ready .application-banner__track {
  animation: application-banner-scroll var(--application-banner-duration) linear infinite;
}

.application-banner__group {
  display: flex;
  flex-shrink: 0;
  justify-content: space-around;
  min-width: 100vw;
}

.application-banner__group > span {
  padding-inline: var(--space-md);
  white-space: nowrap;
}

.application-banner__toggle {
  flex-shrink: 0;
  width: var(--space-md);
  border: 0;
  border-left: 1px solid var(--border-dark);
  background-color: var(--color-yellow);
  color: var(--color-blue);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  cursor: pointer;
}

.application-banner[hidden],
.application-banner__toggle[hidden] { display: none; }

.application-banner:focus-within .application-banner__track,
.application-banner:hover .application-banner__track,
.application-banner.is-paused .application-banner__track {
  animation-play-state: paused;
}

.application-banner__link:focus-visible,
.application-banner__toggle:focus-visible {
  outline: 2px solid var(--color-blue);
  outline-offset: -2px;
}

@keyframes application-banner-scroll {
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .application-banner.is-ready .application-banner__track { animation: none; }
  .application-banner__toggle { display: none; }
}

/* ================================
   HERO
================================ */
.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-blue);
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  /* navy stops below are var(--color-overlay-navy) #202D3A at varying alpha */
  background:
    linear-gradient(
      90deg,
      var(--color-overlay-navy) 0%,
      rgba(32, 45, 58, 0.00) 52%
    ),
    linear-gradient(
      180deg,
      rgba(32, 45, 58, 0.65) 0%,
      rgba(32, 45, 58, 0.00) 22%,
      rgba(32, 45, 58, 0.00) 78%,
      var(--color-blue) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-inline: var(--space-lg);
  color: var(--color-white);
}

.hero__content h1 {
  font-size: var(--text-display-lg);
  line-height: 1;
  font-weight: 600;
}

/* Stats pinned to the bottom of hero */
.hero__stats {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: var(--space-lg);
  padding-inline: var(--space-lg);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: var(--space-md);
  border-left: 1px solid rgba(255,255,255,0.25);
}

.hero__stat-value {
  font-size: var(--text-5xl);
  font-weight: 600;
  color: var(--color-white);
  line-height: 1;
}

.hero__stat-label {
  font-family: var(--label-font);
  font-size: var(--label-size);
  font-weight: var(--label-weight);
  letter-spacing: var(--label-spacing);
  text-transform: uppercase;
  color: var(--color-yellow);
}

/* ================================
   COMMUNITY / THE TEAM
================================ */
.community {
  background-color: var(--color-blue);
  color: var(--color-white);
}

.community .label {
  color: var(--color-yellow);
}

.community__head {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: start;
  margin-bottom: var(--head-gap);
}

.community__head-left h2 {
  font-size: var(--text-5xl);
  font-weight: 600;
  margin-top: var(--space-xs);
}

.community__head-right p {
  font-size: var(--text-lg);
  color: var(--color-white);
}

.community__head-right .btn {
  margin-top: var(--space-sm);
}

.community__mosaic {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: repeat(2, 190px);
  gap: 12px;
}

.community__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background-color: var(--color-grey);
}

/* big feature photo: left half, full height */
.community__photo--feature {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
}

/* top-right: one wide + one narrow */
.community__photo:nth-of-type(2) { grid-column: 4 / 6; grid-row: 1; }
.community__photo:nth-of-type(3) { grid-column: 6 / 7; grid-row: 1; }
/* bottom-right: two photos + card */
.community__photo:nth-of-type(4) { grid-column: 4 / 5; grid-row: 2; }
.community__photo:nth-of-type(5) { grid-column: 5 / 6; grid-row: 2; }

.community__cta-card {
  grid-column: 6 / 7;
  grid-row: 2;
  background-color: var(--color-yellow);
  border-radius: var(--radius-lg);
  padding: var(--space-sm);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.community__cta-card p {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-blue);
}

.community__cta-link {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-blue);
}

/* ================================
   PROJECTS (full-screen, flexible card height)
================================ */
/* fixed full-screen height so the grid is forced to fit (not grow) */
.projects {
  height: 100vh;
  height: 100svh;
  align-items: stretch;
  overflow: hidden;
}

.projects > .container {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* grid fills the space left under the heading; two equal rows */
.projects__grid {
  flex: 1;
  min-height: 0;
  grid-template-rows: repeat(2, 1fr);
}

.projects__grid .project-card {
  height: 100%;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* image area grows to fill the card; no fixed aspect ratio */
.projects__grid .project-card__image {
  flex: 1;
  min-height: 0;
  aspect-ratio: auto;
  height: auto;
}

/* ================================
   NETWORK / GLOBAL COMMUNITY
================================ */
.network__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
}

.network__text {
  flex: 1 1 0;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.network__text .label { margin-bottom: var(--space-sm); }
.network__text h2 { margin-bottom: var(--space-md); }
.network__text p { margin-bottom: var(--space-md); }

.network__stats {
  flex: 1 1 0;
  max-width: 580px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: auto auto;
  gap: var(--space-sm);
}

.network__stat {
  min-height: 140px;
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--space-md);
}

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

.network__stat--dark .stat-block__value { color: var(--color-white); }
.network__stat--dark .stat-block__label { color: var(--text-on-dark-muted); }

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

.network__stat--yellow .stat-block__value { color: var(--color-blue); }
.network__stat--yellow .stat-block__label { color: rgba(35,45,57,0.6); }

.network__stat--outline {
  border: 1.5px solid var(--color-blue);
}

.network__stat--wide {
  grid-column: 1 / -1;
}

/* ================================
   BACKERS
================================ */
.backers {
  background-color: var(--color-yellow-tint);
}

.backers__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-lg);
}

.backers__text {
  flex: 1 1 0;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.backers__text .label { margin-bottom: var(--space-sm); color: var(--color-dark-grey); }
.backers__text h2 { margin-bottom: var(--space-md); font-weight: 600; }
.backers__text p { margin-bottom: var(--space-md); }

.backers__ethos {
  flex: 1 1 0;
  max-width: var(--max-width-contact);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding-left: var(--space-md);
  border-left: 1px solid var(--border-dark);
}

.backers__ethos-head {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.backers__ethos-label {
  color: var(--color-dark-grey);
}

.backers__ethos-head p:last-child,
.backers__ethos-item p {
  font-size: var(--text-sm);
  color: var(--color-blue);
}

.backers__ethos-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-md);
}

.backers__ethos-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  min-width: 0;
}

.backers__ethos-icon {
  width: var(--space-lg);
  height: var(--space-lg);
  object-fit: contain;
  mix-blend-mode: multiply;
}

.backers__ethos-item h3 {
  margin-bottom: var(--space-xs);
  font-size: var(--text-base);
  font-weight: 600;
}

/* ================================
   FAQ (left sticky, right scrolls with the page)
================================ */
/* top-align so the sticky left column has room to travel */
.section.faq {
  align-items: start;
}

.faq__grid {
  width: 100%;
  align-items: start;
}

/* left column stays put while the page scrolls the questions past it */
.faq__text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: sticky;
  top: calc(var(--header-height) + var(--space-sm) + var(--space-xs));
  align-self: start;
}

.faq__text .label { margin-bottom: var(--space-sm); }
.faq__text h2 { margin-bottom: var(--space-md); }

.faq__text > .btn { margin-top: var(--space-sm); }

.faq__scroll .faq-item__answer a {
  text-decoration: underline;
}

/* ================================
   JOIN CTA (contained dark card)
================================ */
.join-cta {
  padding: var(--space-lg);
}

.join-cta__inner {
  background-color: var(--color-blue);
  color: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
  flex-wrap: wrap;
}

.join-cta .label {
  color: var(--color-white);
  margin-bottom: var(--space-sm);
}

.join-cta__text h2 {
  margin-bottom: var(--space-sm);
}

.join-cta__text p {
  color: rgba(255,255,255,0.7);
  max-width: 460px;
}

.join-cta__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* ================================
   RESPONSIVE
================================ */
@media (max-width: 900px) {
  .hero__stat-value {
    font-size: var(--text-4xl);
  }

  .community__head-left h2 {
    font-size: var(--text-3xl);
  }

  .hero__content,
  .hero__stats {
    padding-inline: var(--space-md);
  }

  .join-cta {
    padding: var(--space-md);
  }

  .join-cta__inner {
    padding: var(--space-md);
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-md);
  }

  .join-cta__actions {
    width: 100%;
  }

  .join-cta__actions .btn {
    justify-content: center;
  }

  .hero__stats {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-sm);
  }

  .hero__stat,
  .hero__stat:first-child {
    border-left: none;
    padding-left: 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
    padding-bottom: var(--space-sm);
  }

  .hero__stat:last-child,
  .hero__stat:nth-child(3) {
    border-bottom: none;
  }

  /* projects: stack the cards and lay each out horizontally — image on the
     LEFT at the card's (text-driven) height, like the departments overview */
  .projects {
    height: auto;
    overflow: visible;
  }

  .projects > .container { display: block; }

  .projects__grid {
    flex: none;
    grid-template-rows: none;
  }

  .projects__grid .project-card {
    flex-direction: row;
    height: auto;
  }

  .projects__grid .project-card__image {
    flex: none;
    width: 40%;
    max-width: 240px;
    min-height: 0;
    height: auto;
    align-self: stretch;      /* image height = card height (= text height) */
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center;
  }

  .projects__grid .project-card__body { flex: 1; }

  .network__inner,
  .backers__inner {
    flex-direction: column;
    gap: var(--space-md);
  }

  .backers__ethos {
    padding-left: 0;
    padding-top: var(--space-md);
    border-left: none;
    border-top: 1px solid var(--border-dark);
  }

  .backers__ethos-list {
    gap: var(--space-sm);
  }

  /* FAQ: single column, no sticky on mobile */
  .faq__text {
    position: static;
  }

  .network__text,
  .network__stats,
  .backers__text,
  .backers__ethos {
    max-width: none;
    width: 100%;
  }

  .community__head {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
    margin-bottom: var(--space-sm);
  }

  .community__mosaic {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(4, 150px);
  }

  .community__photo--feature {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .community__photo:nth-of-type(2) { grid-column: 1 / 3; grid-row: 2; }
  .community__photo:nth-of-type(3) { grid-column: 1; grid-row: 3; }

  .community__photo:nth-of-type(4) { grid-column: 2; grid-row: 3; }
  .community__photo:nth-of-type(5) { grid-column: 1; grid-row: 4; }

  .community__cta-card {
    grid-column: 2;
    grid-row: 4;
  }

  .network__stats {
    grid-template-columns: 1fr;
  }

  .network__stat--wide {
    grid-column: 1;
  }

  .join-cta__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
/* Home content spacing and public Luma events */
.section.community,
.section.network,
.section.backers,
.section.faq,
.section.events {
  min-height: 0;
  align-items: flex-start;
}

.network__text .label,
.backers__text .label,
.faq__text .label {
  margin-bottom: var(--space-sm);
}

.network__text h2,
.network__text p,
.backers__text h2,
.backers__text p,
.faq__text h2 {
  margin-bottom: var(--space-md);
}

.events {
  background-color: var(--color-cream);
}

.events__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
  margin-bottom: var(--head-gap);
}

.events__head .label {
  margin-bottom: var(--space-sm);
}

.events__intro {
  margin-top: var(--space-sm);
  max-width: var(--max-width-contact);
}

.events__head > .btn {
  flex-shrink: 0;
}

.events__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-md);
}

.events__card {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background-color: var(--color-white);
  display: flex;
  flex-direction: column;
}

.events__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.events__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 60%;
}

.events__image--fallback {
  display: grid;
  place-items: center;
  background-color: var(--color-yellow);
}

.events__image--fallback svg {
  width: 25%;
}

.events__badge {
  position: absolute;
  bottom: var(--space-sm);
  left: var(--space-sm);
  background-color: var(--color-yellow);
  border-radius: var(--radius-pill);
  padding: var(--space-xs) var(--space-sm);
}

.events__body {
  padding: var(--space-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-sm);
  flex: 1;
}

.events__date {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
}

.events__body h3 {
  font-size: var(--text-xl);
  font-weight: 600;
}

.events__description {
  font-size: var(--text-sm);
  line-height: 1.6;
}

.events__link {
  margin-top: auto;
  font-size: var(--text-sm);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: var(--space-xs);
}

@media (max-width: 900px) {
  .events__head {
    flex-direction: column;
    align-items: flex-start;
  }

  .events__grid {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }
}
