/* Presentation layer: customize this file for your community. */
/* =========================================
   COMMUNITY THEME — HOMEPAGE
   Monochrome Industrial Brutalism
   ========================================= */

.home-intro {
  padding: 80px 0 64px;
  border-bottom: 1px solid #444;
}

.home-intro .eyebrow {
  margin-bottom: 18px;
  color: #999;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-intro h1 {
  text-transform: uppercase;
  overflow-wrap: anywhere;
  margin: 0;
  color: #fff;
  font-size: clamp(4rem, 12vw, 10rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.065em;
}

.home-intro .intro-description {
  margin: 28px 0 0;
  color: #aaa;
  font-size: 1rem;
}

.home-primary-link {
  width: auto;
  min-width: 11rem;
  max-width: 100%;
  text-align: center;
  white-space: normal;
}

.discord-invite {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  margin-bottom: 32px;
}

.discord-invite-arrow {
  font-size: 1.4rem;
  line-height: 1;
}

/* Photo carousel container */

.home-gallery {
  width: 100%;
  margin: 48px 0 80px;
  aspect-ratio: 16 / 9;
  background: #151515;
  border: 1px solid #444;
  overflow: hidden;
}

/* Upcoming events */

.home-events {
  padding: 24px 0 80px;
  border-top: 1px solid #444;
}

.events-panel {
  padding: clamp(20px, 3vw, 28px);
  background: var(--dark-grey);
  border: 1px solid var(--light-grey);
  border-radius: 8px;
}

.events-panel .page-heading {
  margin-bottom: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid #444;
}

.events-panel .page-heading .eyebrow {
  margin: 0;
}

.events-panel .page-heading h2 {
  margin: 6px 0 0;
}

.events-panel article {
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.events-panel article > p:first-child {
  margin-top: 0;
}

.events-panel article > :last-child {
  margin-bottom: 0;
}

.home-events h2 {
  text-transform: uppercase;
}

.home-community-note {
  margin: 24px 0 0;
  font-size: 0.9rem;
}

/* Mobile adjustments */

@media (max-width: 700px) {
  .home-intro {
    padding: 48px 0 40px;
  }

  .home-gallery {
    margin: 32px 0 48px;
  }

  .home-events {
    padding-bottom: 48px;
  }
}

/* Community photo gallery */

.home-gallery .gallery-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
  transition: filter 0.8s ease;
}
.home-gallery .gallery-image.is-color {
  filter: grayscale(0%);
  cursor: pointer;
}

.home-gallery .gallery-image {
  cursor: pointer;
}

/* =========================================
   COMMUNITY THEME — PHOTO CAROUSEL
   ========================================= */

.home-gallery {
  position: relative;
}

.gallery-slides {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.home-gallery .gallery-image {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  visibility: hidden;
  filter: grayscale(100%);
  transition:
    opacity 0.6s ease,
    filter 0.8s ease,
    visibility 0.6s;
}

.home-gallery .gallery-image.is-active {
  opacity: 1;
  visibility: visible;
}

.home-gallery .gallery-image.is-color {
  filter: grayscale(0%);
}

/* Navigation arrows */

.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 2;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid #777;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 24px;
  cursor: pointer;
}

.gallery-prev {
  left: 16px;
}

.gallery-next {
  right: 16px;
}

.gallery-arrow:hover {
  background: #fff;
  color: #000;
}

/* Photo counter */

.gallery-counter,
.gallery-expand {
  position: absolute;
  width: 84px;
  bottom: 16px;
  z-index: 2;
  padding: 8px 12px;
  border: 1px solid #777;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 12px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-align: center;
  white-space: nowrap;
}

.gallery-counter {
  right: 16px;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 700px) {
  .gallery-arrow {
    width: 40px;
    height: 40px;
  }

  .gallery-prev {
    left: 8px;
  }

  .gallery-next {
    right: 8px;
  }

  .gallery-counter {
    right: 8px;
    bottom: 8px;
  }
}

/* Fullscreen photo viewer */
.gallery-expand {
  left: 16px;
  border-radius: 0;
}

.photo-viewer {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 64px 16px 72px;
  border: 0;
  background: #0a0a0a;
  color: #fff;
}

.photo-viewer::backdrop { background: #0a0a0a; }
.viewer-image { width: 100%; height: 100%; object-fit: contain; }
.viewer-close {
  position: absolute;
  top: 12px;
  right: 16px;
  min-height: 0;
  padding: 6px 10px;
  border-radius: 0;
  font-size: 12px;
  line-height: 1.6;
}

@media (max-width: 700px) {
  .home-gallery { aspect-ratio: 4 / 3; }
  .gallery-expand { left: 8px; bottom: 8px; padding: 8px 12px; }
  .gallery-arrow { width: 44px; height: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .home-gallery .gallery-image { transition: none; }
}

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 1rem;
  padding-inline: max(1rem, calc((100% - 1052px) / 2));
  text-align: left;
}

.footer-admin {
  grid-column: 3;
  justify-self: end;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-left: auto;
  font-size: 0.8rem;
}

.footer-admin a { color: var(--light-grey); }
.footer-admin a:hover { color: var(--white); }
.footer-admin form { margin: 0; }

.back-home {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.footer-socials {
  grid-column: 2;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  color: var(--light-grey);
}

.footer-socials a:hover { color: var(--white); }
.footer-socials svg { width: 22px; height: 22px; }

.preview-notice { padding: .75rem 1rem; text-align: center; font: 600 .75rem/1.5 system-ui, sans-serif; letter-spacing: .06em; background: #ddd; color: #111; }

@media (max-width: 700px) {
  .site-footer { grid-template-columns: 1fr; }
  .site-footer > span { text-align: center; }
  .footer-socials, .footer-admin { grid-column: 1; }
}

/* Compact gallery audio; metadata and playlist appear only on request. */
.photo-viewer.has-player { padding-bottom: 100px; }
.photo-viewer.has-player .gallery-counter { top: 16px; left: 16px; right: auto; bottom: auto; }
.gallery-player { position: absolute; bottom: 16px; left: 16px; right: 16px; width: min(100% - 32px, 560px); margin-inline: auto; padding: 8px; background: #191919; border: 1px solid #444; border-radius: 8px; display: flex; align-items: center; gap: 8px; }
.player-audio { flex: 1; width: 100%; min-width: 0; height: 44px; }
.player-details { flex: none; }
.player-details > summary { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 6px 10px; border-radius: 4px; color: #ddd; cursor: pointer; font-size: .75rem; list-style: none; }
.player-details > summary::-webkit-details-marker { display: none; }
.player-details > summary:hover { background: #303030; }
.player-details[open] > summary { background: #303030; }
.player-details[open] > summary > [aria-hidden] { transform: rotate(180deg); }
.player-details:not([open]) .player-details-panel { display: none; }
.player-details-panel { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; display: grid; gap: 8px; padding: 10px; max-height: min(24dvh, 180px); overflow: auto; background: #191919; border: 1px solid #444; border-radius: 8px; }
.player-track { display: grid; gap: 4px; min-width: 0; }
.player-track .eyebrow { font-size: .65rem; color: #999; }
.player-title { font-size: 1rem; overflow-wrap: anywhere; }
.player-artist { font-size: .8rem; color: #aaa; }
.player-artist:empty { display: none; }
.gallery-player > .player-previous, .gallery-player > .player-next { flex: none; width: 28px; height: 36px; min-height: 0; padding: 0; border-color: transparent; background: transparent; color: #ddd; font-size: 22px; }
.gallery-player > .player-previous:hover, .gallery-player > .player-next:hover { background: #303030; }
.gallery-player > button:disabled { opacity: .35; cursor: default; }
.player-playlist { display: grid; gap: 4px; list-style: none; margin: 0; padding: 0; }
.player-track-choice { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 44px; padding: 10px; text-align: left; font-size: .8rem; font-weight: 500; background: transparent; color: #ddd; border: 1px solid transparent; }
.player-track-choice[aria-current="true"] { border-color: #777; background: #303030; color: #fff; }
.player-track-choice:hover { background: #303030; }
.player-track-choice > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.player-track-choice small { display: block; margin-top: 3px; color: #aaa; }
.player-track-number { flex: none; color: #999; font-variant-numeric: tabular-nums; }
.player-status { position: absolute; bottom: calc(100% + 8px); left: 0; right: 0; margin: 0; padding: 8px; background: #191919; font-size: .8rem; }
.player-status:empty { display: none; }
.viewer-loading { position: absolute; top: 16px; left: 110px; right: 130px; margin: 0; color: #aaa; text-align: center; font-size: .75rem; pointer-events: none; }
.viewer-loading:empty { display: none; }

@media (orientation: landscape) and (max-height: 600px) and (max-width: 1100px) {
  .home-gallery { aspect-ratio: 16 / 9; }
  .photo-viewer { padding: 56px 12px 12px; }
  .photo-viewer.has-player {
    padding: 40px 12px 76px;
  }
  .photo-viewer.has-player .gallery-player { bottom: 8px; left: 12px; right: 12px; width: min(100% - 24px, 440px); margin-inline: auto; padding: 4px; }
  .photo-viewer.has-player .player-audio { height: 40px; }
  .photo-viewer.has-player .player-details-panel { max-height: min(28dvh, 120px); }

}

/* Compact photo navigation inside the expanded viewer. */
.home-gallery > .gallery-arrow,
.photo-viewer > .gallery-arrow { width: 32px; height: 32px; font-size: 18px; }

@media (max-width: 700px) and (orientation: portrait) {
  .gallery-player .player-info-label { display: none; }
}

/* Optional community-owned privacy notice, beside homepage admin access. */
.footer-admin .footer-privacy { font-size: .7rem; white-space: nowrap; }

/* Event categories: one accent token to rebrand community-owned events. */
:root { --community-event-accent: #65e0d0; }
.calendar-key { display: flex; flex-wrap: wrap; gap: 12px 28px; margin: 20px 0 24px; font-size: .8rem; }
.calendar-key > span { display: grid; grid-template-columns: 12px auto; column-gap: 9px; align-items: center; }
.calendar-key small { grid-column: 2; color: var(--light-grey); font-size: .72rem; }
.calendar-key-swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.calendar-key-swatch.community { background: var(--community-event-accent); }
.calendar-key-swatch.venue { background: #555; border: 1px solid #aaa; }
.calendar-event.event-community, .agenda-event.event-community {
  border-color: var(--community-event-accent); border-left-width: 4px; background: #132c29;
}
.calendar-event.event-community:hover, .agenda-event.event-community:hover { background: #1b3c37; }
.calendar-event.event-community strong, .agenda-event.event-community strong,
.calendar-event.event-community .event-kind, .agenda-event.event-community .event-kind {
  color: var(--community-event-accent);
}
.event-kind { display: block; font-size: .65rem; font-weight: 650; letter-spacing: .04em; margin: 0 0 4px; }
.events-panel article.event-community { border-left: 3px solid var(--community-event-accent); padding-left: 14px; }
.events-panel article.event-community h2 a, .events-panel article.event-community > .eyebrow { color: var(--community-event-accent); }
/* Public navigation and member-project stories; reusable community presentation. */
.public-menu-wrap{position:absolute;z-index:100;top:20px;left:50%;transform:translateX(-50%);width:100%;max-width:1100px;padding:0 24px;box-sizing:border-box;display:flex;justify-content:flex-end;pointer-events:none}.public-menu-wrap.on-preview{top:62px}.site-menu{position:relative;pointer-events:auto}.site-menu summary{list-style:none;width:44px;height:44px;display:grid;place-items:center;cursor:pointer;color:#eee;background:#151515;border:1px solid #444}.site-menu summary::-webkit-details-marker{display:none}.site-menu summary:focus-visible,.project-photo-toggle:focus-visible{outline:2px solid #eee;outline-offset:4px}.site-menu-panel{position:absolute;right:0;top:52px;display:flex;flex-direction:column;gap:0;min-width:230px;max-width:calc(100vw - 32px);padding:8px;background:#1d1d1d;border:1px solid #444;box-shadow:0 12px 28px #0008}.site-menu-panel a{padding:14px 12px;text-decoration:none;color:#eee;font-size:.9rem}.site-menu-panel a:hover,.site-menu-panel a:focus-visible{background:#333}.projects-intro h1{font-size:clamp(3rem,10vw,7rem)}.project-story{padding:56px 0 72px;border-bottom:1px solid #444}.project-story-heading{display:block;padding:0;margin:0 0 28px;border:0;background:none}.project-story-heading .eyebrow{color:#aaa;letter-spacing:.14em}.project-story h2{font-size:clamp(2rem,5vw,4rem);line-height:1.05;text-transform:uppercase;margin:16px 0;overflow-wrap:anywhere}.project-story h2 a{text-decoration:none}.project-photo-toggle{display:block;width:100%;padding:0;border:1px solid #444;background:#151515;cursor:pointer}.project-photo-toggle img{display:block;width:100%;height:auto;max-height:75svh;object-fit:contain;filter:grayscale(1);transition:filter .65s ease}.project-photo-toggle.is-color img{filter:grayscale(0)}.project-writeup{max-width:760px;margin:36px auto 0;color:#c8c8c8;font-size:1.05rem;line-height:1.85}.project-writeup>p{white-space:pre-line;overflow-wrap:anywhere;margin:0 0 24px}.project-links{display:block;border:0;border-top:1px solid #444;margin:44px 0 0;padding:28px 0 20px;background:none}.project-links .eyebrow{font-size:.7rem;color:#999;letter-spacing:.15em}.project-links>div{display:flex;gap:16px 28px;flex-wrap:wrap}.project-links a{color:#eee;overflow-wrap:anywhere}.projects-empty{padding:72px 0 100px;color:#aaa}.project-pagination{display:flex;justify-content:space-between;gap:24px;margin:32px 0}.project-draft-note{border:1px dashed #777;padding:16px;margin:24px 0;color:#bbb}.project-back{margin-top:24px}.project-admin-photo{display:block;max-width:100%;width:360px;height:240px;object-fit:contain;margin-bottom:24px;background:#222}
@media(max-width:650px){.public-menu-wrap{padding:0 16px}.project-story{padding-top:36px;padding-bottom:48px}.project-writeup{font-size:1rem;margin-top:24px}.project-story h2{font-size:2rem}}
@media(prefers-reduced-motion:reduce){.project-photo-toggle img{transition:none}}
.project-story{background:transparent;border:0;border-bottom:1px solid #444;border-radius:0;margin:0}.project-photo-toggle{border-radius:0}

/* Keep homepage navigation and location together without a separate header row. */
main:has(.homepage-intro) { margin-top: 24px; }
.home-intro.homepage-intro { padding-top: 0; }
.home-intro-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.home-intro-top .eyebrow { margin: 0; padding-top: 0; }
.home-intro-top .public-menu-wrap { position: static; transform: none; width: auto; padding: 0; flex: 0 0 auto; }
.home-intro-top .site-menu summary { margin-top: -8px; }
