/* HEXAGON community sign-in.
 *
 * Palette and type follow the site: --bio-* tokens from index.html, Urbanist for
 * display and Roboto for text, both already self-served from assets/fonts.
 * The hexagon field on the left is the installation's own geometry — 54 cells on
 * three hectares — not decoration borrowed from elsewhere.
 */

:root {
  --bio-bg: #EFEFEA;
  --bio-card: #F6F6F2;
  --bio-ink: #15160F;
  --bio-lime: #C3F03C;
  --bio-yellow: #FFD300;
  --bio-line: #E0E0D8;
  --bio-muted: #7B7D72;
  --bio-sand: #DCD7C6;
  --bio-danger: #A6371F;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bio-bg);
  color: var(--bio-ink);
  font-family: "Roboto", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap { min-height: 100%; display: flex; }
/* An author `display` beats the UA rule for [hidden], so hiding has to be said
   explicitly or the sign-in screen stays on top of the portal after signing in. */
.wrap[hidden] { display: none; }

/* ══════════════════════════════════════════════════════════════════════
   THE MEMBERS' FRONT PAGE
   Not a public marketing page: it is what a member meets before signing in,
   so it argues the case for keeping the network alive rather than selling
   anything. Editorial density over hero decoration — the figures carry it.
   ══════════════════════════════════════════════════════════════════════ */

#gate[hidden] { display: none; }

/* ── Hero ── */

/* Дэвсгэрт нь HEXAGON-ы загвар: гишүүн бүрийн туг талбай дээрээ. Зураг нь
   цайвар элсэн өнгөтэй тул цагаан бичвэр шууд дээр нь уншигдахгүй — зүүнээс
   баруун тийш гүн бараанаас тунгалаг руу шилжих хөшиг тавьна: бичвэр бараан
   талд, тугууд задгай талд. */
.hero::before, .hero::after { content: ''; position: absolute; inset: 0; z-index: 0; }
.hero::before {
  background-image: url('images/section/community-hero.jpg');
  background-size: cover; background-position: 72% 26%;
}
.hero::after {
  background: linear-gradient(100deg,
    var(--bio-ink) 0%, rgba(21,22,15,.94) 30%, rgba(21,22,15,.72) 55%,
    rgba(21,22,15,.34) 78%, rgba(21,22,15,.20) 100%);
}
.hero-nav, .hero-body, .hero-credit { z-index: 1; }
/* Энэ бол 2032 оны загвар, өнөөдрийн газар биш — хуудас хэмжсэн тоон дээр
   зогсдог тул зургаа ч нэрлэнэ. */
.hero-credit {
  position: relative;
  align-self: flex-start;
  margin: 0; padding: 0 clamp(20px, 5vw, 56px);
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: rgba(239, 239, 234, .45);
}
.hero {
  position: relative;
  overflow: hidden;
  background: var(--bio-ink);
  color: var(--bio-bg);
  padding: 0 0 clamp(56px, 9vw, 104px);
  min-height: 88vh;
  display: flex;
  flex-direction: column;
}

.cells {
  position: absolute;
  inset: -18% -30% auto auto;
  width: 128%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px;
  transform: rotate(-12deg);
  pointer-events: none;
}
.cells i {
  aspect-ratio: 1 / 1.1;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: rgba(239, 239, 234, 0.045);
}
.cells i:nth-child(5n) { background: rgba(195, 240, 60, 0.12); }
.cells i:nth-child(8n) { background: rgba(255, 211, 0, 0.10); }

.hero-nav {
  position: relative;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 20px clamp(20px, 5vw, 56px);
  border-bottom: 1px solid rgba(239, 239, 234, 0.12);
}
/* The supplied mark is white on transparent: it reads as-is on the dark hero,
   and is flipped to ink for the light portal bar rather than shipping a second
   file that could drift out of step with this one. */
.brand img { display: block; height: 34px; width: auto; }
.brand.ink img { filter: brightness(0) saturate(100%); }
.ghost {
  border: 1px solid rgba(239, 239, 234, 0.28); border-radius: 999px;
  padding: 9px 18px; color: var(--bio-bg); text-decoration: none;
  font-family: "Urbanist", "Roboto", sans-serif; font-size: 13px; font-weight: 700;
}
.ghost:hover { border-color: var(--bio-lime); color: var(--bio-lime); }

.hero-body {
  position: relative;
  flex: 1; display: flex; flex-direction: column; justify-content: center;
  padding: clamp(44px, 8vw, 88px) clamp(20px, 5vw, 56px) 0;
  max-width: 980px;
}

.eyebrow {
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--bio-lime); margin: 0 0 22px;
}
.eyebrow.dark { color: var(--bio-muted); }

.slogan {
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: clamp(38px, 7.2vw, 84px);
  font-weight: 800; line-height: 1.02; letter-spacing: -0.03em;
  margin: 0; text-wrap: balance;
}

.hero-sub {
  font-size: clamp(15px, 1.5vw, 18px); line-height: 1.75;
  color: rgba(239, 239, 234, 0.72);
  margin: 26px 0 0; max-width: 60ch;
}

.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-cta .primary, .hero-cta .secondary {
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: 14px; font-weight: 700; text-decoration: none;
  padding: 13px 26px; border-radius: 999px;
}
.hero-cta .primary { background: var(--bio-lime); color: var(--bio-ink); }
.hero-cta .primary:hover { background: #D4F76A; }
.hero-cta .secondary { border: 1px solid rgba(239, 239, 234, 0.3); color: var(--bio-bg); }
.hero-cta .secondary:hover { border-color: var(--bio-bg); }

/* ── Figures band ── */

.about {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(56px, 9vw, 104px) clamp(20px, 5vw, 56px) clamp(40px, 6vw, 64px);
}
.about-head { max-width: 66ch; margin-bottom: clamp(34px, 5vw, 54px); }
.about-head h2 {
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: clamp(26px, 3.6vw, 40px); font-weight: 700;
  letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 18px;
  text-wrap: balance;
}
.about-lede { font-size: clamp(14.5px, 1.4vw, 17px); line-height: 1.8; color: var(--bio-muted); margin: 0; }

.about-grid {
  display: grid; gap: 1px; background: var(--bio-line);
  border-top: 1px solid var(--bio-line); border-bottom: 1px solid var(--bio-line);
  grid-template-columns: repeat(2, 1fr);
}
.about-grid article { background: var(--bio-bg); padding: 30px clamp(18px, 3vw, 36px); }
.about-grid h3 {
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: 17px; font-weight: 700; margin: 0 0 10px;
}
.about-grid p { font-size: 13.5px; line-height: 1.75; color: var(--bio-muted); margin: 0; max-width: 46ch; }

/* ── Sign in ── */

.signin {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 56px) clamp(64px, 9vw, 104px);
  display: grid; gap: clamp(24px, 4vw, 48px);
  grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
  align-items: start;
}

.card {
  background: var(--bio-card);
  border: 1px solid var(--bio-line);
  border-radius: 14px;
  padding: 32px;
}
.card h2 { font-family: "Urbanist", "Roboto", sans-serif; font-size: 21px; font-weight: 700; margin: 0; }
.card .sub { font-size: 13px; color: var(--bio-muted); margin: 6px 0 24px; }

.join { padding-top: 8px; }
.join h3 { font-family: "Urbanist", "Roboto", sans-serif; font-size: 19px; font-weight: 700; margin: 0 0 12px; }
.join p { font-size: 14px; line-height: 1.8; color: var(--bio-muted); margin: 0 0 20px; max-width: 46ch; }
.join .secondary {
  display: inline-block;
  font-family: "Urbanist", "Roboto", sans-serif; font-size: 14px; font-weight: 700;
  color: var(--bio-ink); text-decoration: none;
  border-bottom: 2px solid var(--bio-lime); padding-bottom: 2px;
}
.join .where { font-size: 11.5px; color: var(--bio-muted); margin-top: 32px; }

label { display: block; margin-bottom: 15px; }
label > span {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--bio-muted); margin-bottom: 6px;
}

input {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--bio-line); border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 14px; color: var(--bio-ink);
}
input:focus { outline: none; border-color: var(--bio-ink); }
input::placeholder { color: #ABAEA1; }

.pw { position: relative; }
.pw input { padding-right: 44px; }
.pw button {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border: 0; border-radius: 6px;
  background: transparent; color: var(--bio-muted);
  font-size: 11px; font-family: inherit; cursor: pointer;
}
.pw button:hover { color: var(--bio-ink); }

button.submit {
  width: 100%; margin-top: 6px; padding: 13px 16px;
  border: 0; border-radius: 8px;
  background: var(--bio-ink); color: var(--bio-bg);
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: 14px; font-weight: 700; cursor: pointer;
}
button.submit:hover { background: #000; }
button.submit[disabled] { background: var(--bio-muted); cursor: default; }

.message {
  margin-top: 16px; padding: 11px 13px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.6;
}
.message.error { background: #F7E4DF; border: 1px solid #E3BFB4; color: var(--bio-danger); }
.message.ok { background: #EAF6D2; border: 1px solid #CBE59A; color: #3F5510; }
.message.info { background: #EFEFE8; border: 1px solid var(--bio-line); color: var(--bio-muted); }
.message[hidden] { display: none; }

.foot {
  margin-top: 22px; padding-top: 16px;
  border-top: 1px solid var(--bio-line);
  font-size: 11px; line-height: 1.7; color: var(--bio-muted);
}
.foot a { color: var(--bio-ink); }

.mark {
  width: 44px; height: 49px;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
  background: var(--bio-lime);
}
.mark.sm { width: 26px; height: 29px; }

@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; }
  .signin { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ══════════════════════════════════════════════════════════════════════
   THE MEMBERS WALL
   Нэвтрэх хэсгийн байрлалыг эсрэгээр эргүүлэв: хана нь өргөн, урилга нарийн.
   Логонууд өөр өөр харьцаатай тул тус бүрийг тогтмол өндөртэй талбайд
   төвлөрүүлнэ — эс бүр адилхан хэмжээтэй нүд шиг эгнэнэ.
   ══════════════════════════════════════════════════════════════════════ */
.members {
  max-width: 1180px; margin: 0 auto;
  padding: clamp(40px, 6vw, 72px) clamp(20px, 5vw, 56px) clamp(64px, 9vw, 104px);
  display: grid;
  /* Мөр хоорондын завсар нь баганынхаас бага: урсгалын зурвас толгойгоосоо
     салж хоцрох ёсгүй. */
  column-gap: clamp(24px, 4vw, 48px); row-gap: 8px;
  grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
  align-items: start;
}
.wall-head h2 {
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: clamp(21px, 2.4vw, 28px); font-weight: 700; margin: 0;
}
.wall-head .sub {
  font-size: 13.5px; line-height: 1.75; color: var(--bio-muted);
  margin: 8px 0 26px; max-width: 60ch;
}
/* ── the register ─────────────────────────────────────────────────────────
   Энгийн хана: гишүүн бүр адилхан хэмжээтэй нүд. Хайлт нь тохирохгүйг нь
   нуух замаар яг энэ сүлжээн дотроо ажиллана. */
.holders, .no-match, .next-report { grid-column: 1 / -1; }
.holders {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}
.holders > li[hidden] { display: none; }

.wall-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--bio-card); border: 1px solid var(--bio-line);
  border-radius: 999px; padding: 0 16px; margin: 0 0 22px; max-width: 340px;
}
.wall-search svg {
  width: 15px; height: 15px; flex: none;
  fill: none; stroke: var(--bio-muted); stroke-width: 2; stroke-linecap: round;
}
.wall-search input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font: inherit; font-size: 13.5px; color: var(--bio-ink);
  padding: 11px 0;
}
.wall-search:focus-within { border-color: var(--bio-ink); }
.no-match { font-size: 13.5px; color: var(--bio-muted); margin: 18px 0 0; }
.no-match[hidden] { display: none; }

@media (prefers-reduced-motion: reduce) { .holders { animation: none; } }
.holder {
  position: relative;
  background: var(--bio-card); border: 1px solid var(--bio-line);
  border-radius: 14px; padding: 18px 18px 16px;
  display: flex; flex-direction: column; gap: 4px;
  transition: border-color .18s, transform .18s;
}
/* Холбоос нь картаа бүтнээр нь эзэлнэ — лого руу оносон эсэхийг хэрэглэгч
   бодох ёсгүй. Гишүүн бүр вэбтэй биш тул зарим карт холбоосгүй үлдэнэ. */
.holder-link {
  display: flex; flex-direction: column; gap: 4px;
  color: inherit; text-decoration: none;
}
.holder-link::after { content: ''; position: absolute; inset: 0; border-radius: 14px; }
.holder:has(.holder-link):hover { border-color: var(--bio-ink); transform: translateY(-2px); }
.holder-link:focus-visible::after { outline: 2px solid var(--bio-ink); outline-offset: 2px; }
.holder-mark {
  height: 46px; margin-bottom: 12px;
  display: flex; align-items: center; justify-content: flex-start;
}
.holder-mark img { max-height: 100%; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.holder b {
  font-family: "Urbanist", "Roboto", sans-serif;
  font-size: 14.5px; font-weight: 700; color: var(--bio-ink);
}
.holder .cell {
  font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--bio-muted);
}
.next-report {
  margin: 4px 0 0; font-size: 12.5px; color: var(--bio-muted);
  padding-top: 16px; border-top: 1px solid var(--bio-line);
}
.next-report b { color: var(--bio-ink); }

@media (max-width: 900px) { .members { grid-template-columns: minmax(0, 1fr); } }
