:root {
  --comog-brown: #75310c;
  --comog-brown-dark: #4f2008;
  --comog-cream: #f8f4e8;
  --comog-text: #2b2118;
  --comog-max-width: 72rem;
}

/* Contact channels: explain which inbox to use before visitors write. */
.contact-page {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.contact-page__intro {
  max-width: 720px;
  margin-bottom: 2rem;
}

.contact-page__intro h1,
.contact-form-section h2 {
  margin-top: 0;
}

.contact-page__eyebrow {
  margin: 0 0 0.5rem;
  color: var(--comog-brown);
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-channels {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: clamp(2.5rem, 6vw, 5rem);
}

.contact-channel {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 1.5rem;
  border: 1px solid #e6ddc8;
  border-radius: 0.75rem;
  background: #fff;
}

.contact-channel h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
}

.contact-channel p {
  flex: 1;
  margin: 0 0 1.25rem;
}

.contact-channel a {
  overflow-wrap: anywhere;
  font-weight: 700;
}

.contact-form-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
  padding: clamp(1.5rem, 4vw, 3rem);
  border-radius: 1rem;
  background: var(--comog-cream);
}

.contact-form-section form {
  margin: 0;
}

.contact-form-section__status {
  padding: 1rem;
  border-left: 4px solid var(--comog-brown);
  background: #fff;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-footer__contact-list {
  display: grid;
  gap: 0.75rem;
}

.site-footer__contact-list a {
  white-space: nowrap;
}

.site-footer__contact-list span {
  display: block;
  margin-bottom: 0.125rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

@media (max-width: 760px) {
  .contact-channels,
  .contact-form-section {
    grid-template-columns: 1fr;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--comog-text);
  background: #ffffff;
  line-height: 1.5;
  /* The hero slideshow's full-bleed "breakout" (width: 100vw) can round to
     a fraction of a pixel wider than the viewport on some mobile browsers;
     without this it shows up as a persistent horizontal scrollbar. */
  overflow-x: hidden;
}

a {
  color: var(--comog-brown);
}

a:hover {
  color: var(--comog-brown-dark);
}

/* Header */

.site-chrome {
  position: sticky;
  top: 0;
  z-index: 30;
}

.site-header {
  background: var(--comog-cream);
  border-bottom: 1px solid #e6ddc8;
}

/* Row 1: brand (left) + social icons (right) — always visible, unlike the
   old contact-info topbar it replaced, which only rendered once a Wagtail
   admin had filled in SiteContactSettings. */
.site-header__brandbar {
  max-width: var(--comog-max-width);
  margin: 0 auto;
  padding: 0.6rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  border-bottom: 1px solid #e6ddc8;
}

.site-header__social {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__social a {
  color: var(--comog-brown);
  display: inline-flex;
  opacity: 0.85;
}

.site-header__social a:hover {
  opacity: 1;
}

/* Row 2: nav (left) + actions (right) */
.site-header__inner {
  max-width: var(--comog-max-width);
  margin: 0 auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.site-header__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--comog-text);
}

.site-header__logo {
  display: block;
  border-radius: 6px;
}

.site-header__name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.site-header__wordmark {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--comog-brown);
}

.site-header__tagline {
  font-size: 0.75rem;
  color: var(--comog-brown);
  opacity: 0.85;
}

.site-header__nav {
  display: flex;
  gap: 1.25rem;
}

.site-header__nav a {
  text-decoration: none;
  font-weight: 600;
}

.site-header__nav a:hover {
  text-decoration: underline;
}

.site-header__nav-dropdown {
  position: relative;
}

.site-header__nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--comog-brown);
  cursor: pointer;
}

.site-header__nav-dropdown-toggle:hover {
  text-decoration: underline;
}

.site-header__nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 0.75rem;
  min-width: 9rem;
  background: var(--comog-cream);
  border: 1px solid #e6ddc8;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(43, 33, 24, 0.15);
  padding: 0.5rem;
  z-index: 20;
}

.site-header__nav-dropdown.is-open .site-header__nav-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.site-header__nav-dropdown-menu a {
  display: block;
  padding: 0.5rem 0.6rem;
  border-radius: 0.35rem;
  white-space: nowrap;
}

.site-header__nav-dropdown-menu a:hover {
  background: rgba(117, 49, 12, 0.08);
}

.site-header__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-header__icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--comog-brown);
  padding: 0.4rem;
  border-radius: 999px;
}

.site-header__icon-link:hover {
  color: var(--comog-brown-dark);
  background: rgba(117, 49, 12, 0.08);
}

.site-header__button {
  display: inline-block;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 2px solid var(--comog-brown);
  white-space: nowrap;
}

.site-header__button--outline {
  color: var(--comog-brown);
  background: transparent;
}

.site-header__button--outline:hover {
  background: var(--comog-brown);
  color: var(--comog-cream);
}

.site-header__button--solid {
  color: var(--comog-cream);
  background: var(--comog-brown);
}

.site-header__button--solid:hover {
  background: var(--comog-brown-dark);
  color: var(--comog-cream);
}

.site-header__account {
  position: relative;
}

.site-header__account-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  padding: 0.4rem 0.5rem;
  font: inherit;
  font-weight: 600;
  color: var(--comog-brown);
  cursor: pointer;
  border-radius: 999px;
}

.site-header__account-toggle:hover {
  color: var(--comog-brown-dark);
  background: rgba(117, 49, 12, 0.08);
}

.site-header__account-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 10rem;
  background: var(--comog-cream);
  border: 1px solid #e6ddc8;
  border-radius: 0.5rem;
  box-shadow: 0 8px 20px rgba(43, 33, 24, 0.15);
  padding: 0.5rem;
  z-index: 20;
}

.site-header__account.is-open .site-header__account-menu {
  display: flex;
  flex-direction: column;
}

/* On real mouse/trackpad devices, dropdowns also expand on hover — the
   [data-dropdown] click/tap behaviour in config.js still works underneath
   this (and is what mobile/touch and keyboard users rely on, since hover
   has no meaningful equivalent there). */
@media (hover: hover) and (pointer: fine) {
  .site-header__nav-dropdown:hover .site-header__nav-dropdown-menu,
  .site-header__account:hover .site-header__account-menu {
    display: flex;
    flex-direction: column;
  }
}

.site-header__account-menu a,
.site-header__account-menu .link-button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 0.35rem;
  text-decoration: none;
  color: var(--comog-text);
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
}

.site-header__account-menu a:hover,
.site-header__account-menu .link-button:hover {
  background: rgba(117, 49, 12, 0.08);
}

/* Mobile nav: below the breakpoint, .site-header__nav and
   .site-header__actions (wrapped together in .site-header__menu) collapse
   behind a hamburger toggle instead of wrapping onto multiple crowded
   lines. "display: contents" on .site-header__menu above the breakpoint
   makes it act as if it weren't there, so desktop layout is untouched. */

.site-header__menu {
  display: contents;
}

.site-header__menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  background: none;
  color: var(--comog-brown);
  border-radius: 999px;
  cursor: pointer;
}

.site-header__menu-toggle:hover {
  background: rgba(117, 49, 12, 0.08);
}

.site-header__menu-icon-close {
  display: none;
}

.site-header.is-menu-open .site-header__menu-icon-open {
  display: none;
}

.site-header.is-menu-open .site-header__menu-icon-close {
  display: block;
}

@media (max-width: 60rem) {
  .site-header__menu-toggle {
    display: inline-flex;
    order: 2;
    /* The brand now lives in its own row above, so nothing else shares
       .site-header__inner's line with the toggle on mobile — push it to
       the right for the conventional hamburger position instead of
       letting a lone flex item with justify-content: space-between fall
       back to flex-start. */
    margin-left: auto;
  }

  .site-header__menu {
    display: none;
    order: 3;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 1rem;
    border-top: 1px solid #e6ddc8;
  }

  .site-header.is-menu-open .site-header__menu {
    display: flex;
  }

  .site-header__nav,
  .site-header__actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .site-header__nav-dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    margin-top: 0.25rem;
    padding-left: 0.75rem;
  }

  .site-header__button {
    text-align: center;
  }

  .site-header__account-menu {
    position: static;
    box-shadow: none;
    border: none;
    margin-top: 0.25rem;
  }
}

/* Homepage hero slideshow — deliberately full-bleed (edge-to-edge) rather
   than boxed within the max-width container, via the negative-margin
   "breakout" technique, since it reads as a banner rather than a content
   card. */

.hero-slideshow {
  position: relative;
  width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 0;
  height: 28rem;
  overflow: hidden;
  background: var(--comog-brown);
}

.hero-slideshow__slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.6s ease;
}

.hero-slideshow__slide.is-active {
  opacity: 1;
  visibility: visible;
}

.hero-slideshow__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-slideshow__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(20, 14, 8, 0.8),
    rgba(20, 14, 8, 0.35) 55%,
    rgba(20, 14, 8, 0.55)
  );
}

.hero-slideshow__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.5rem;
  color: var(--comog-cream);
}

.hero-slideshow__heading {
  font-size: 2rem;
  font-weight: 800;
  max-width: 46rem;
  margin: 0 0 1rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.hero-slideshow__excerpt {
  max-width: 38rem;
  margin: 0 0 1.5rem;
  opacity: 0.95;
}

.hero-slideshow__cta {
  display: inline-block;
  background: var(--comog-brown);
  color: var(--comog-cream);
  font-weight: 700;
  padding: 0.75rem 1.75rem;
  border-radius: 999px;
  text-decoration: none;
}

.hero-slideshow__cta:hover {
  background: var(--comog-brown-dark);
}

.hero-slideshow__control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  border: none;
  background: rgba(43, 33, 24, 0.55);
  color: var(--comog-cream);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  z-index: 1;
}

.hero-slideshow__control:hover {
  background: rgba(43, 33, 24, 0.8);
}

.hero-slideshow__control--prev {
  left: 1.5rem;
}

.hero-slideshow__control--next {
  right: 1.5rem;
}

.hero-slideshow__dots {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 1;
}

.hero-slideshow__dot {
  width: 0.6rem;
  height: 0.6rem;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
}

.hero-slideshow__dot.is-active {
  background: var(--comog-cream);
}

@media (max-width: 40rem) {
  .hero-slideshow {
    height: 20rem;
  }

  .hero-slideshow__heading {
    font-size: 1.5rem;
  }

  .hero-slideshow__control {
    width: 2rem;
    height: 2rem;
    font-size: 1.1rem;
  }
}

/* Latest content card grid */

.latest {
  max-width: var(--comog-max-width);
  margin: 3rem auto 0;
}

.latest h2 {
  margin-bottom: 1.25rem;
}

.latest__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.5rem;
}

.latest__card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e6ddc8;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.latest__card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(43, 33, 24, 0.12);
}

.latest__card-media {
  position: relative;
}

.latest__card-image {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  display: block;
}

.latest__card-body {
  padding: 1rem 1.1rem 1.25rem;
}

.latest__card-tag {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--comog-cream);
  background: var(--comog-brown);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.latest__card-title {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  color: var(--comog-text);
}

.latest__card-date {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.latest__card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* Scroll-reveal: fades sections in as they enter the viewport. Skipped
   entirely for users who've asked for reduced motion. */

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }

  .reveal-on-scroll {
    opacity: 0;
    transform: translateY(1.5rem);
    transition: opacity 0.6s ease, transform 0.6s ease;
  }

  .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: none;
  }
}

/* About page: vision/mission statement + repeated info-card grids (scope
   of work, key activities, strategic objectives, core values) */

.statement-block {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.statement-block__item {
  background: var(--comog-cream);
  border-left: 4px solid var(--comog-brown);
  border-radius: 0.5rem;
  padding: 1.5rem;
}

.statement-block__item h2 {
  margin-top: 0;
  color: var(--comog-brown);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1.25rem;
  margin: 1rem 0 2.5rem;
}

.info-card {
  border: 1px solid #e6ddc8;
  border-radius: 0.75rem;
  padding: 1.25rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(43, 33, 24, 0.1);
}

.info-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(117, 49, 12, 0.1);
  color: var(--comog-brown);
  margin-bottom: 0.75rem;
}

.info-card h3 {
  margin: 0 0 0.5rem;
  color: var(--comog-brown);
  font-size: 1.05rem;
}

.info-card p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.85;
}

/* News articles & individual project pages */

.article-cover {
  width: 100%;
  max-height: 26rem;
  object-fit: cover;
  border-radius: 1rem;
  margin: 1.25rem 0;
  display: block;
  box-shadow: 0 16px 32px rgba(43, 33, 24, 0.12);
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.9rem;
  opacity: 0.75;
  margin: 0.25rem 0;
}

.article-badge {
  display: inline-block;
  background: rgba(117, 49, 12, 0.1);
  color: var(--comog-brown);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  opacity: 1;
}

.article-summary {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--comog-brown);
  max-width: 42rem;
  margin: 0 0 1rem;
}

.article-body {
  max-width: 42rem;
}

.article-body p {
  margin: 0 0 1rem;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.project-gallery img {
  width: 100%;
  height: 12rem;
  object-fit: cover;
  border-radius: 0.6rem;
  display: block;
}

.project-gallery iframe,
.project-gallery video {
  width: 100%;
  border-radius: 0.6rem;
}

.pagination {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  font-weight: 700;
  text-decoration: none;
}

.pagination a {
  text-decoration: none;
}

/* Article/project detail: content + "More from COMoG" sidebar, listing
   older news/reports/projects as tiles so they stay reachable once
   they've scrolled off the homepage's 6-item "Latest" grid. The sidebar
   comes second in the HTML (after the article, for screen readers /
   reading order) but is pinned to the left visually via grid-column. */

.content-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: start;
}

@media (min-width: 60rem) {
  .content-layout {
    grid-template-columns: 16rem 1fr;
  }

  .content-layout__main {
    grid-column: 2;
    grid-row: 1;
    min-width: 0;
  }

  .content-sidebar {
    grid-column: 1;
    grid-row: 1;
  }
}

.content-sidebar__title {
  font-size: 1rem;
  color: var(--comog-brown);
  margin: 0 0 1rem;
}

.content-sidebar__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.content-sidebar__tile {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e6ddc8;
  border-radius: 0.6rem;
  padding: 0.5rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.content-sidebar__tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(43, 33, 24, 0.1);
}

.content-sidebar__tile-image {
  width: 3.5rem;
  height: 3.5rem;
  object-fit: cover;
  border-radius: 0.4rem;
  flex-shrink: 0;
}

.content-sidebar__tile-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.content-sidebar__tile-tag {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--comog-brown);
  opacity: 0.8;
}

.content-sidebar__tile-title {
  font-size: 0.9rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* Forms (login, registration, donation, contact, newsletter, volunteer,
   report submission, comments) — {{ form.as_p }} has no classes of its
   own to hook into, so these rules target the tags Django emits directly. */

main form {
  max-width: 32rem;
}

main form p {
  margin: 0 0 1.25rem;
}

main form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--comog-brown);
}

main form input[type="text"],
main form input[type="email"],
main form input[type="password"],
main form input[type="tel"],
main form input[type="url"],
main form input[type="number"],
main form input[type="date"],
main form textarea,
main form select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #d8cdb4;
  border-radius: 0.5rem;
  background: #fff;
  color: var(--comog-text);
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

main form textarea {
  min-height: 8rem;
  resize: vertical;
}

main form input:focus,
main form textarea:focus,
main form select:focus {
  outline: none;
  border-color: var(--comog-brown);
  box-shadow: 0 0 0 3px rgba(117, 49, 12, 0.15);
}

main form p:has(input[type="checkbox"]) {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

main form input[type="checkbox"] {
  width: 1.1rem;
  height: 1.1rem;
  margin-top: 0.2rem;
  accent-color: var(--comog-brown);
  flex-shrink: 0;
}

main form p:has(input[type="checkbox"]) label {
  margin-bottom: 0;
  font-weight: 400;
  color: var(--comog-text);
}

main form .helptext {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  opacity: 0.7;
  font-weight: 400;
}

main form ul.errorlist {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
  color: #a3271f;
  font-size: 0.85rem;
  font-weight: 600;
}

main form button[type="submit"] {
  display: inline-block;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--comog-cream);
  background: var(--comog-brown);
  cursor: pointer;
  transition: background 0.15s ease;
}

main form button[type="submit"]:hover {
  background: var(--comog-brown-dark);
}

/* Comments (News articles, Projects) */

.comments-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e6ddc8;
}

.comments-list {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.comments-list__item {
  padding: 1rem 0;
  border-bottom: 1px solid #e6ddc8;
}

.comments-list__meta {
  margin: 0 0 0.25rem;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Main content */

main {
  max-width: var(--comog-max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem;
  min-height: 50vh;
}

/* Safety net for images embedded directly in rich text body content
   (Draftail lets editors drop these in freely) — without this, an
   editor pasting a full-resolution photo overflows the page on mobile. */
main img {
  max-width: 100%;
  height: auto;
}

main table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
}

main table th,
main table td {
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid #e6ddc8;
}

main table th {
  font-weight: 700;
  color: var(--comog-brown);
  border-bottom: 2px solid var(--comog-brown);
}

main table tbody tr:hover {
  background: rgba(117, 49, 12, 0.05);
}

/* Footer */

.site-footer {
  background: var(--comog-brown);
  color: var(--comog-cream);
  margin-top: 3rem;
}

.site-footer__inner {
  max-width: 88rem;
  margin: 0 auto;
  padding: 3rem 1.25rem 2rem;
}

.site-footer__name {
  font-weight: 700;
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
}

.site-footer__tagline {
  margin: 0;
  opacity: 0.85;
  font-size: 0.9rem;
}

.site-footer__grid {
  display: grid;
  grid-template-columns:
    minmax(15rem, 1.35fr)
    minmax(8rem, 0.75fr)
    minmax(12rem, 1fr)
    minmax(13rem, 1.05fr)
    minmax(17rem, 1.35fr);
  gap: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(248, 244, 232, 0.15);
}

@media (max-width: 78rem) {
  .site-footer__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .site-footer__brand {
    grid-column: 1 / -1;
  }

  .site-footer__col--connect {
    grid-column: 1 / -1;
  }
}

@media (max-width: 28rem) {
  .site-footer__grid {
    grid-template-columns: 1fr;
  }

  .site-footer__col--connect {
    grid-column: auto;
  }

  .site-footer__contact-list a {
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

.site-footer__col h2 {
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--comog-cream);
  opacity: 0.7;
}

.site-footer__col {
  display: flex;
  flex-direction: column;
}

.site-footer__col a {
  color: var(--comog-cream);
  text-decoration: none;
  opacity: 0.9;
  margin-bottom: 0.6rem;
}

.site-footer__col a:hover {
  opacity: 1;
  text-decoration: underline;
}

.site-footer__social {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.site-footer__social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  background: rgba(248, 244, 232, 0.12);
  margin-bottom: 0;
}

.site-footer__social a:hover {
  background: rgba(248, 244, 232, 0.25);
  text-decoration: none;
}

.site-footer__col--connect .site-footer__donate {
  display: inline-block;
  align-self: flex-start;
  background: var(--comog-cream);
  color: var(--comog-brown);
  font-weight: 700;
  padding: 0.6rem 1.3rem;
  border-radius: 999px;
  text-decoration: none;
  opacity: 1;
  margin-bottom: 0;
}

.site-footer__col--connect .site-footer__donate:hover {
  background: #fff;
  text-decoration: none;
}

/* Utility classes (kept out of inline style="" attributes so a strict CSP
   style-src can omit 'unsafe-inline') */

.visually-hidden-offscreen {
  position: absolute;
  left: -9999px;
}

.member-avatar {
  border-radius: 999px;
}

.id-card-preview {
  max-width: 400px;
}

.site-footer__copyright {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: center;
}

.site-footer__credit {
  margin-top: 0.25rem;
  font-size: 0.75rem;
  opacity: 0.5;
  text-align: center;
}

.site-footer__credit a {
  color: inherit;
}

.site-footer__credit a:hover {
  text-decoration: underline;
}

/* Team index: card grid, staggered via nth-child so cards cascade in one
   after another rather than all fading in at once (reveal-on-scroll itself
   is generic — see config.js — this just varies each card's delay). */

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.75rem;
  margin: 2rem 0;
  list-style: none;
  padding: 0;
}

.team-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid #e6ddc8;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.team-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px rgba(43, 33, 24, 0.12);
}

.team-card__photo-wrap {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--comog-cream);
}

.team-card__photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.team-card:hover .team-card__photo-wrap img {
  transform: scale(1.06);
}

.team-card__initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  font-weight: 700;
  color: var(--comog-brown);
  opacity: 0.35;
}

.team-card__body {
  padding: 1rem 1.15rem 1.25rem;
}

.team-card__name {
  margin: 0 0 0.3rem;
  color: var(--comog-brown);
  font-size: 1.05rem;
}

.team-card__role {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.75;
}

@media (prefers-reduced-motion: no-preference) {
  .team-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.08s; }
  .team-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.16s; }
  .team-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.24s; }
  .team-grid .reveal-on-scroll:nth-child(5) { transition-delay: 0.32s; }
  .team-grid .reveal-on-scroll:nth-child(n+6) { transition-delay: 0.4s; }
}

/* Team member profile */

.team-profile__back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 1.75rem;
}

.team-profile__back svg {
  transition: transform 0.2s ease;
}

.team-profile__back:hover svg {
  transform: translateX(-3px);
}

.team-profile {
  display: grid;
  grid-template-columns: minmax(14rem, 20rem) 1fr;
  gap: 2.75rem;
  align-items: start;
  margin-bottom: 2.5rem;
}

@media (max-width: 42rem) {
  .team-profile {
    grid-template-columns: 1fr;
  }
}

.team-profile__photo-wrap {
  aspect-ratio: 4 / 5;
  border-radius: 1rem;
  overflow: hidden;
  background: var(--comog-cream);
  box-shadow: 0 16px 32px rgba(43, 33, 24, 0.15);
}

.team-profile__photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.team-profile__initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  font-weight: 700;
  color: var(--comog-brown);
  opacity: 0.35;
}

.team-profile__name {
  margin: 0 0 0.6rem;
  font-size: 2.1rem;
  position: relative;
  display: inline-block;
}

.team-profile__name::after {
  content: "";
  display: block;
  width: 3rem;
  height: 3px;
  margin-top: 0.5rem;
  background: var(--comog-brown);
  border-radius: 999px;
}

@media (prefers-reduced-motion: no-preference) {
  .team-profile__name::after {
    width: 0;
    transition: width 0.6s ease 0.2s;
  }

  .team-profile.is-visible .team-profile__name::after {
    width: 3rem;
  }
}

.team-profile__role {
  display: inline-block;
  background: rgba(117, 49, 12, 0.1);
  color: var(--comog-brown);
  border-radius: 999px;
  padding: 0.35rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}

.team-profile__bio p {
  margin: 0 0 1rem;
}

.team-member-social {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: flex;
  gap: 0.75rem;
}

.team-member-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  background: rgba(117, 49, 12, 0.1);
  color: var(--comog-brown);
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.team-member-social a:hover {
  background: var(--comog-brown);
  color: var(--comog-cream);
  transform: translateY(-3px);
}

.assembly-project-map {
  height: 500px;
}
