/*
  Hides the header gradient and white
  gradient when the nav is collapsed
*/
@media screen and (max-width: 768px) {
  nav.nav-hidden ul {
    transform: translateY(-100%);
  }

  nav::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: linear-gradient(to bottom, white 0%, transparent 100%);
    z-index: -1;
    pointer-events: none;
  }
}

main {
  --bottom-padding: 20rem;
  display: grid;
  grid-template-columns: repeat(var(--column-count), 1fr);
  padding-bottom: var(--bottom-padding);
  overflow-x: hidden;
}

#council-intro {
  grid-column: 3 / 7;
  padding-bottom: var(--block-padding);
}
@media screen and (max-width: 768px) {
  #council-intro {
    grid-column: 1 / 9;
  }
}
#council-intro p {
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  text-align: center;
  padding-bottom: var(--body-line-height);
}
#council-intro p:last-of-type {
  padding-bottom: 0;
}

/* Wrapper: 1-column grid, both children overlap in the same cell */
#council-wrap {
  grid-column: 4 / 6;
  display: grid;
  grid-template-columns: 1fr;
  position: relative;
}
@media screen and (max-width: 1100px) {
  #council-wrap {
    grid-column: 3 / 7;
    display: grid;
    grid-template-columns: 1fr;
  }
}
@media screen and (max-width: 768px) {
  #council-wrap {
    grid-column: 3 / 7;
    display: grid;
    grid-template-columns: 1fr;
  }

  #council-canvas {
    width: 100vw !important;
  }
}
@media screen and (max-width: 550px) {
  #council-wrap {
    grid-column: 2 / 8;
    display: grid;
    grid-template-columns: 1fr;
  }
}

#council-list {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
}

/* List sits on top, no background — content only */
#council-list {
  z-index: 1;
}

/* SVG blob fallback — hidden by default, shown via noscript */
#council-blobs {
  grid-column: 1;
  grid-row: 1;
  display: none;
  z-index: 0;
  filter: url("#svg-goo");
  -webkit-filter: url("#svg-goo");
  overflow: visible;
  align-items: center;
  justify-items: center;
}

#council-blobs .blob {
  --blob-width: 195%;
  --blob-overlap: 1.75rem;
  width: var(--blob-width);
  aspect-ratio: 1 / 1;
  background: white;
  border-radius: 50%;
  margin-bottom: calc(-1 * var(--blob-overlap));
}
@media screen and (max-width: 768px) {
  #council-blobs .blob {
    --blob-width: 170%;
  }
}

#council-blobs .blob:last-child {
  margin-bottom: 0;
}

#council-list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
}
@media screen and (max-width: 768px) {
  #council-list li {
    padding: 0;
  }
}

/* Canvas sits inside main, full width, vertically aligned to council-wrap via JS */
#council-canvas {
  position: absolute;
  left: 0;
  width: 100% !important;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
}

#council-debug {
  position: absolute;
  left: 0;
  width: 100% !important;
  pointer-events: none;
  z-index: 2;
  display: block;
}

#council-canvas.ready {
  opacity: unset;
}

#council-list:not(.ready) li {
  opacity: 0 !important;
}

/* Use --ease-blob for council-specific scroll-hidden transitions */
#council-canvas.scroll-hidden,
#council-list li.scroll-hidden {
  transition:
    opacity var(--duration-reveal) var(--ease-blob),
    transform var(--duration-reveal) var(--ease-blob);
}

#council-list .initials {
  font-family: Altocumulus;
  font-size: var(--title-font-size);
  text-align: center;
  padding-bottom: var(--body-line-height);
}

#council-list .name,
#council-list p,
#council-list a {
  font-size: var(--body-font-size);
  line-height: var(--body-line-height);
  text-align: center;
  padding-bottom: var(--body-line-height);
}

#council-list a {
  display: block;
}

#council-list a.read-more {
  text-decoration: none;
}
