/* ============================================================================
   MOONSHOT - the community page.

   Loaded after css/styles.css (tokens, nav, buttons). A community page, not an
   event poster: words lead, there is ONE photograph (the join panel), and the
   page is about the two ways in - join an event, or lead one.
   ============================================================================ */

/* ---------- the ground and local tokens ---------- */
.cpage {
  --c-bg: var(--ink-000);
  --c-surface: rgba(255, 255, 255, .035);
  --c-tint: rgba(var(--brand-rgb), .035);
  --c-line: rgba(var(--brand-rgb), .14);
  --c-dim: var(--text-dim);
  --c-muted: var(--text-muted);
  --c-accent: var(--cn-green);
  background: var(--c-bg);
  color: var(--text);
}

:root[data-theme="light"] .cpage {
  --c-bg: #F4F8F5;
  --c-surface: #FFFFFF;
  --c-tint: #EAF3ED;
  --c-line: rgba(10, 25, 18, .10);
  --c-accent: var(--cn-teal);
}

.csec { padding-block: clamp(56px, 7vw, 104px) clamp(64px, 8vw, 116px); }
.csec--tint {
  background: var(--c-tint);
  border-block: 1px solid var(--c-line);
}

/* ---------- shared type ---------- */
.ckicker {
  margin: 0 0 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.chead h2,
.ch2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.1;
  text-wrap: balance;
}

.chead p:not(.ckicker) {
  margin: 16px 0 0;
  max-width: 40ch;
  line-height: 1.6;
  color: var(--c-dim);
}

.chead a,
.cnote a {
  color: var(--c-accent);
  text-decoration: none;
  border-bottom: 1px solid var(--c-line);
}

/* Heading left, content right. Stacks under 860px. */
.csplit {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(28px, 6vw, 96px);
  align-items: start;
}

.csplit .chead { position: sticky; top: calc(var(--nav-h, 72px) + 32px); }

/* ---------- 1. HERO ---------- */
.chero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: calc(var(--nav-h, 72px) + clamp(48px, 7vw, 104px)) 0 clamp(56px, 7vw, 104px);
}

/* One soft light from the top right, not a scrim over a photograph. */
.chero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(55% 60% at 85% 10%, rgba(var(--glow-rgb), .15), transparent 72%);
}

.chero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}

.chero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 22px;
  padding: 7px 14px 7px 11px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-surface);
  font-size: .86rem;
  font-weight: 500;
  color: var(--c-dim);
}

.chero__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cn-green);
  box-shadow: 0 0 0 4px rgba(var(--brand-rgb), .18);
}

.chero__line {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6.4vw, 5.2rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  max-width: 13ch;
  text-wrap: balance;
}

.chero__line em { font-style: normal; color: var(--c-accent); }

.chero__lead {
  margin: 24px 0 0;
  max-width: 50ch;
  font-size: clamp(1.02rem, 1.35vw, 1.16rem);
  line-height: 1.62;
  color: var(--c-dim);
  text-wrap: pretty;
}

.chero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 26px;
  margin-top: 32px;
}

.clink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.clink [data-icon] { color: var(--c-accent); transition: transform .2s var(--ease-out); }
.clink:hover [data-icon] { transform: translateX(3px); }

.chero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-size: .9rem;
  color: var(--c-muted);
}

.chero__facts li { display: inline-flex; align-items: center; gap: 7px; }
.chero__facts [data-icon] { color: var(--c-accent); }

/* What is on: the kinds of event, as one panel beside the headline. */
.cboard {
  padding: clamp(22px, 2.4vw, 30px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
  box-shadow: 0 30px 70px -40px rgba(4, 20, 12, .6);
}

.cboard__title {
  margin: 0 0 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-accent);
}

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

.cboard li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--c-line);
  line-height: 1.45;
  color: var(--c-dim);
  font-size: .93rem;
}

.cboard li b {
  display: block;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.015em;
}

.cboard__icon,
.cway__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(var(--brand-rgb), .10);
  color: var(--c-accent);
}

.cboard__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0 0;
  font-size: .86rem;
  color: var(--c-muted);
}

.cboard__foot [data-icon] { color: var(--c-accent); }

/* ---------- 2. JOIN OR LEAD ---------- */
.chead--center { text-align: center; margin: 0 auto clamp(32px, 4vw, 52px); }
.chead--center h2 { margin-inline: auto; }

.cways {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 24px);
}

.cway {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(28px, 3.4vw, 44px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}

/* Lead is the invitation most visitors do not expect, so it gets the tint. */
.cway--lead {
  background:
    radial-gradient(80% 80% at 100% 0%, rgba(var(--glow-rgb), .14), transparent 70%),
    var(--c-surface);
  border-color: rgba(var(--brand-rgb), .30);
}

.cway__icon { width: 48px; height: 48px; border-radius: 14px; }

.cway h3 {
  margin: 20px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  font-weight: 800;
  letter-spacing: -.03em;
}

.cway > p {
  margin: 10px 0 0;
  max-width: 46ch;
  line-height: 1.62;
  color: var(--c-dim);
  text-wrap: pretty;
}

.cticks {
  margin: 22px 0 30px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.cticks li {
  position: relative;
  padding-left: 28px;
  line-height: 1.5;
}

.cticks li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .2em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(var(--brand-rgb), .14)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2321C58C' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

/* Buttons sit on one line across the two cards. */
.cway .btn { margin-top: auto; }

/* ---------- 3. WHO + HOW TO JOIN ---------- */
.cpair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 96px);
}

.cwho .ch2 { max-width: 16ch; }

.cchips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.cchips li {
  padding: 9px 16px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: var(--c-surface);
  font-weight: 500;
  font-size: .95rem;
}

.cnote {
  margin: 24px 0 0;
  max-width: 46ch;
  line-height: 1.6;
  color: var(--c-dim);
}

.csteps {
  padding: clamp(26px, 3.2vw, 40px);
  border: 1px solid var(--c-line);
  border-radius: var(--radius-lg);
  background: var(--c-surface);
}

.csteps ol {
  margin: 0 0 30px;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.csteps li {
  position: relative;
  counter-increment: step;
  padding: 0 0 26px 56px;
}

/* The numbers are joined by a line: three steps, one path. */
.csteps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: -2px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--grad-brand);
  color: var(--on-brand);
  font-weight: 700;
  font-size: .95rem;
}

.csteps li:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 17.5px;
  top: 40px;
  bottom: 4px;
  width: 1px;
  background: var(--c-line);
}

.csteps li:last-child { padding-bottom: 0; }

/* ---------- 5. QUESTIONS ---------- */
.cfaq { border-top: 1px solid var(--c-line); }

.cfaq details { border-bottom: 1px solid var(--c-line); }

.cfaq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 700;
  letter-spacing: -.015em;
}

.cfaq summary::-webkit-details-marker { display: none; }

.cfaq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--c-line);
  color: var(--c-accent);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.2rem;
  transition: transform .25s var(--ease-out);
}

.cfaq details[open] summary::after { transform: rotate(45deg); }
.cfaq summary:hover { color: var(--c-accent); }

.cfaq summary:focus-visible {
  outline: 2px solid var(--c-accent);
  outline-offset: 4px;
  border-radius: 4px;
}

.cfaq details p {
  margin: -6px 0 22px;
  max-width: 56ch;
  line-height: 1.65;
  color: var(--c-dim);
}

/* ---------- 5. JOIN: the page's one photograph ---------- */
.csec--last { padding-block: clamp(8px, 2vw, 24px) clamp(48px, 6vw, 80px); }

.cjoin {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  border-radius: var(--radius-lg);
  padding: clamp(40px, 6vw, 84px);
  background: var(--cn-green-900);
  color: #FFFFFF;
}

.cjoin img {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
}

/* Dark where the words are, clear over the faces. */
.cjoin::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(96deg, rgba(4, 20, 12, .94) 0%, rgba(4, 20, 12, .78) 42%,
                    rgba(4, 20, 12, .25) 100%);
}

.cjoin h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -.035em;
  line-height: 1.04;
  max-width: 12ch;
  text-wrap: balance;
}

.cjoin p {
  margin: 18px 0 0;
  max-width: 44ch;
  line-height: 1.62;
  color: rgba(255, 255, 255, .78);
}

.cjoin__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 34px;
}

/* Brand gradient in dark, but a light theme turns the gradient deep green,
   which vanishes on this panel - so the button carries its own colour. */
.cjoin__btn {
  background: linear-gradient(135deg, #5CF84A, #21C58C);
  color: #04140C;
  box-shadow: 0 14px 34px -14px rgba(92, 248, 74, .6);
}

.cjoin__btn:hover { transform: translateY(-2px); }

.cjoin__call {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: 8px;
  color: rgba(255, 255, 255, .86);
  text-decoration: none;
  font-weight: 500;
}

.cjoin__call:hover { color: #5CF84A; }

/* ---------- the header: a floating bar ---------- */
/* The glass is drawn by ::before rather than by the bar itself: a
   backdrop-filter on an ancestor would become the containing block for the
   fixed phone drawer and trap it inside the bar. */
.cnav,
.cnav.is-stuck {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.cnav .nav__inner {
  position: relative;
  isolation: isolate;
  margin-top: 12px;
  padding-block: 10px;
}

.cnav .nav__inner::before {
  content: '';
  position: absolute;
  inset: 0 calc(var(--gutter) - 14px);
  z-index: -1;
  border: 1px solid var(--c-line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--c-bg) 62%, transparent);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  transition: background-color .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

.cnav.is-stuck .nav__inner::before {
  background: color-mix(in srgb, var(--c-bg) 86%, transparent);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .55);
}

.cnav .nav__progress { display: none; }

.cbrand {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--text);
}

.cbrand .ms-mark { width: 36px; }
.cbrand:hover .ms-mark { transform: translateY(-1px) scale(1.04); }

.cbrand__text { display: grid; line-height: 1.05; }

.cbrand__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.06rem;
  letter-spacing: .04em;
}

.cbrand__by {
  font-size: .74rem;
  color: var(--c-muted);
}

.cnav .nav__links a {
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 500;
}

.cnav .nav__links a::after { display: none; }
.cnav .nav__links a:hover { background: rgba(var(--brand-rgb), .07); }
.cnav .nav__links a.is-active {
  color: var(--text);
  background: rgba(var(--brand-rgb), .12);
}

.cnav .nav__actions { position: relative; z-index: 2; gap: 10px; }
.cnav .theme-toggle { width: 38px; height: 38px; }
.cnav__join-short { display: none; }
.cnav__drawer-only { display: none; }

@media (min-width: 901px) {
  .cnav .nav__links {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* The phone drawer grows out of the bar: same corners, same edges. */
@media (max-width: 900px) {
  .cnav .nav__links {
    inset: 12px calc(var(--gutter) - 14px) auto;
    padding: 78px 20px 20px;
    border: 1px solid var(--c-line);
    border-radius: 18px;
    box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .6);
  }

  .cnav .nav__links a { border-radius: 0; }
  .cnav .nav__links a:hover,
  .cnav .nav__links a.is-active { background: none; }
  .cnav__drawer-only { display: block; color: var(--c-accent) !important; }
}

@media (max-width: 480px) {
  .cnav__join-long { display: none; }
  .cnav__join-short { display: inline; }
  .cbrand__by { font-size: .7rem; }
}

/* The smallest phones: brand, Join and the menu only just fit. */
@media (max-width: 380px) {
  .cnav .nav__inner { padding-inline: 16px; gap: 8px; }
  .cnav .nav__inner::before { inset-inline: 6px; }
  .cnav .nav__actions { gap: 6px; }
  .cbrand { gap: 8px; }
  .cbrand .ms-mark { width: 30px; }
  .cbrand__name { font-size: .95rem; letter-spacing: .02em; }
}

/* ---------- the footer ---------- */
.cfoot {
  position: relative;
  overflow: hidden;
  border-top: 1px solid var(--c-line);
  padding-top: clamp(48px, 6vw, 80px);
}

.cfoot__top {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr));
  gap: 36px clamp(24px, 4vw, 64px);
}

.cfoot__about p {
  margin: 18px 0 24px;
  max-width: 38ch;
  line-height: 1.62;
  color: var(--c-dim);
}

.cfoot__h {
  margin: 0 0 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-accent);
}

.cfoot__col { display: flex; flex-direction: column; align-items: flex-start; }

.cfoot__col a,
.cfoot__place {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 40px;
  color: var(--c-dim);
  text-decoration: none;
  transition: color .15s var(--ease-out);
}

.cfoot__col a:hover { color: var(--c-accent); }
.cfoot__place { color: var(--c-muted); }
.cfoot__place [data-icon] { color: var(--c-accent); }

/* The supplied logo carries its own white ground; the plate makes that
   look intended in both themes. */
.cfoot__cn img {
  height: 34px;
  width: auto;
  margin-top: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #FFFFFF;
  box-sizing: content-box;
}

.cfoot__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-block: 18px;
  border-top: 1px solid var(--c-line);
  font-size: .82rem;
  color: var(--c-muted);
}

.cfoot__bottom p { margin: 0; }

.cfoot__top-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  color: var(--c-dim);
  text-decoration: none;
}

.cfoot__top-link [data-icon] { transform: rotate(180deg); color: var(--c-accent); }
.cfoot__top-link:hover { color: var(--c-accent); }

/* The name once, very large and very quiet, cut off by the page edge. */
.cfoot__word {
  margin: 0 0 -.2em;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(2rem, 15.4vw, 17rem);
  line-height: .9;
  letter-spacing: -.045em;
  white-space: nowrap;
  background: linear-gradient(180deg, rgba(var(--brand-rgb), .16), transparent 80%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  user-select: none;
  pointer-events: none;
}

@media (max-width: 900px) {
  .cfoot__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cfoot__about { grid-column: 1 / -1; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .chero__grid,
  .csplit,
  .cpair { grid-template-columns: minmax(0, 1fr); }

  .csplit .chead { position: static; }

  .cways { grid-template-columns: minmax(0, 1fr); }

  /* On a phone the photograph sits under a full wash, words over it. */
  .cjoin::before { background: linear-gradient(180deg, rgba(4, 20, 12, .72), rgba(4, 20, 12, .92)); }
}

@media (max-width: 560px) {
  .cway .btn { width: 100%; white-space: normal; text-align: center; }
  .chero__cta .btn { width: 100%; }
  .cjoin__btn { width: 100%; }
}
