/* community.html — page-specific styles. Builds on ./styles.css tokens and components
   and follows the conventions of start.css. */

/* Contrast: small print uses --muted (about 8:1 on --bg) instead of --quiet. */
.community-page .fineprint,
.community-page .card-label,
.community-page .contract-box span { color: var(--muted); }

html, body { overflow-x: hidden; }

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--text);
  color: #050506;
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

.community-page section[id] { scroll-margin-top: 96px; }
.community-page h2 { font-size: clamp(38px, 5vw, 64px); }

.text-link {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: rgba(233, 50, 50, .7);
  text-underline-offset: 3px;
  font-weight: 700;
}
.text-link:hover { text-decoration-color: var(--text); }

.community-page .chip:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.updating {
  margin: 0;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  background: rgba(0,0,0,.2);
}
.updating[hidden] { display: none; }

/* Example-data ribbon (only when community.json has "sample": true) */
.sample-ribbon {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  width: min(720px, calc(100% - 28px));
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px dashed rgba(233, 50, 50, .8);
  border-radius: 14px;
  background: rgba(30, 6, 6, .94);
  box-shadow: 0 12px 40px rgba(0,0,0,.45);
  font-size: 13px;
  line-height: 1.4;
}
.sample-ribbon[hidden] { display: none; }
.sample-ribbon strong {
  flex: 0 0 auto;
  padding: 4px 9px;
  border-radius: 8px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.sample-ribbon span { color: #e3d6d6; }
.sample-ribbon .ribbon-short { display: none; }
body.is-sample .footer { padding-bottom: 110px; }

/* Shared key colours: one hue per key, all low-saturation on the dark base. */
.key-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  color: var(--silver);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.key-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--k, var(--red));
  box-shadow: 0 0 12px var(--k, var(--red));
}
[data-k="Kindness"]  { --k: #e93232; }
[data-k="Knowledge"] { --k: #d8d8d3; }
[data-k="Koinonia"]  { --k: #e9a032; }
[data-k="Karma"]     { --k: #9a8cff; }

/* 1. Hero */
.cm-hero { padding-top: 150px; overflow: hidden; }
.cm-hero-grid {
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 42px;
  align-items: center;
}
.cm-hero h1 {
  font-size: clamp(64px, 10vw, 128px);
  line-height: .9;
  margin-bottom: 18px;
}
.cm-hero .hero-subtitle { color: var(--text); }
.cm-hero .hero-subtitle::after {
  content: "";
  display: block;
  width: 64px;
  height: 3px;
  margin-top: 16px;
  border-radius: 3px;
  background: var(--red);
  box-shadow: 0 0 18px var(--red);
}
.cm-hero .hero-lead { max-width: 620px; }

.cm-promises {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  box-shadow: 0 22px 80px rgba(0,0,0,.22);
}
.cm-promises ul {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.cm-promises li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(0,0,0,.2);
}
.cm-promises strong { font-size: 17px; }
.cm-promises span { color: var(--muted); font-size: 14px; line-height: 1.45; }

/* 2. Hall of Keys */
.consent-note {
  margin: 0 0 22px;
  padding: 16px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--red);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
  color: #c4c4c9;
  line-height: 1.55;
}
.consent-note strong { color: var(--text); }

.key-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.key-filter[hidden] { display: none; }
.chip {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}
.chip:hover { color: var(--text); }
.chip.is-active {
  border-color: rgba(233, 50, 50, .55);
  background: var(--red-soft);
  color: var(--text);
}

.hall-grid {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.hall-grid:empty { display: none; }
.hall-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  overflow: hidden;
}
.hall-card[hidden] { display: none; }
.hall-card::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--k, var(--red)), transparent 70%);
  opacity: .7;
}
.hall-card:hover { border-color: rgba(233, 50, 50, .44); }
.hall-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.hall-rank {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .08em;
  font-variant-numeric: tabular-nums;
}
.hall-name {
  margin: 0;
  font-size: 21px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.hall-contrib {
  flex: 1;
  margin: 0;
  color: #c4c4c9;
  font-size: 15px;
  line-height: 1.55;
}
.hall-since {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.example-tag {
  padding: 2px 7px;
  border: 1px dashed rgba(233, 50, 50, .7);
  border-radius: 6px;
  color: #f0b8b8;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

/* 3. How to get in */
.criteria-grid {
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.criteria-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}
.criteria-card h3 { margin: 0; font-size: 20px; line-height: 1.2; }
.criteria-card p { margin: 0; color: #c4c4c9; font-size: 15px; line-height: 1.55; }
.getin-foot {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: center;
}
.getin-foot .lead { margin: 0; font-size: 17px; }
.getin-foot .lead strong { color: var(--text); }
.notice {
  padding: 18px 20px;
  border: 1px dashed var(--line);
  border-left: 3px solid var(--red);
  border-radius: 14px;
  background: rgba(0,0,0,.24);
}
.notice p { margin: 0; color: #c4c4c9; line-height: 1.55; }
.notice strong { color: var(--text); }

/* 4. Holders */
.holders-panel {
  display: grid;
  gap: 16px;
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
  box-shadow: 0 22px 80px rgba(0,0,0,.22);
}
.holders-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.holders-metrics[hidden], .holders-meta[hidden], .holders-method[hidden] { display: none; }
.h-metric {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(0,0,0,.2);
}
.h-metric span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.h-metric strong {
  display: block;
  font-size: clamp(32px, 4vw, 48px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.h-metric.h-accent {
  border-color: rgba(233, 50, 50, .5);
  background: linear-gradient(180deg, rgba(233,50,50,.14), rgba(0,0,0,.2));
}
.holders-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 28px;
  margin: 0;
}
.holders-meta div { display: flex; gap: 8px; align-items: baseline; }
.holders-meta dt { color: var(--muted); font-size: 13px; }
.holders-meta dd { margin: 0; color: var(--text); font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.holders-method {
  padding: 16px 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(0,0,0,.2);
}
.holders-method .card-label { margin: 0 0 8px; }
.holders-method p:last-child { margin: 0; color: #c4c4c9; line-height: 1.6; font-size: 15px; }
.holders-list { margin: 0; color: #c4c4c9; }
.cm-mint { margin: 0; border-color: rgba(233, 50, 50, .35); background: rgba(0,0,0,.32); grid-template-columns: 1fr; }
.cm-mint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: clamp(13px, 1.6vw, 17px);
  color: var(--text);
  word-break: break-all;
}
.holders-panel .fineprint { margin: 0; }

/* 5. Key of the Week */
.kotw-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background:
    radial-gradient(circle at 92% 20%, rgba(233,50,50,.18), transparent 320px),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.025));
}
.kotw-card h2 { margin-bottom: 12px; }
.kotw-card .lead { margin: 0; max-width: 680px; }
.kotw-tag {
  margin: 0;
  padding: 16px 22px;
  border: 1px solid rgba(233, 50, 50, .5);
  border-radius: 16px;
  background: var(--red-soft);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 900;
  overflow-wrap: anywhere;
}
.kotw-tag[hidden] { display: none; }

/* 6. Join */
.join-actions { justify-content: center; }
.join-start { margin: 22px 0 6px; }
.community-page .footer p { color: var(--muted); }
.community-page .footer-links a { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line); }

/* Responsive */
@media (max-width: 1080px) {
  .hall-grid, .criteria-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 920px) {
  .cm-hero-grid, .getin-foot { grid-template-columns: 1fr; }
  .kotw-card { grid-template-columns: 1fr; }
  .kotw-tag { justify-self: start; }
}
@media (max-width: 720px) {
  .cm-hero { padding-top: 116px; }
  .cm-hero h1 { font-size: clamp(54px, 17vw, 84px); }
  .community-page h2 { font-size: clamp(32px, 10vw, 46px); }
  .hall-grid, .criteria-grid, .holders-metrics { grid-template-columns: 1fr; }
  .hall-card, .criteria-card { padding: 18px; }
  .holders-panel, .kotw-card { padding: 18px; }
  .holders-meta { flex-direction: column; }
  .sample-ribbon { bottom: 10px; padding: 8px 10px; gap: 10px; }
  .sample-ribbon .ribbon-long { display: none; }
  .sample-ribbon .ribbon-short { display: inline; }
}
