@charset "UTF-8";

/* ============================================================
   Говийн Бага Дархан Цаазат Газар — үндсэн загвар
   Өнгөний эх сурвалж: говийн хайрган тал, заган ойн сүүдэр,
   хулангийн зүс, хадны сүг зургийн улаан зос.
   ============================================================ */

:root {
  /* Өнгө */
  --ink:      #14170f;   /* заган сүүдэр */
  --soil:     #2c3323;   /* гүн бутлаг ногоон */
  --soil-2:   #3d4632;
  --gravel:   #e9e4d8;   /* хайрган тал — хуудасны дэвсгэр */
  --salt:     #fbf9f3;   /* хужир цагаан — картын дэвсгэр */
  --khulan:   #b4813f;   /* хулангийн зүс — өргөлт */
  --saxaul:   #6c7b54;   /* амьд заг */
  --zos:      #8e3e23;   /* хадны зос — зөвхөн статус тэмдэглэгээ */
  --line:     rgba(44, 51, 35, 0.18);
  --line-soft:rgba(44, 51, 35, 0.09);

  /* Үсгийн хэлбэр */
  --display: "Alegreya", "Times New Roman", Georgia, serif;
  --body:    "Golos Text", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --mono:    "JetBrains Mono", "SFMono-Regular", Consolas, monospace;

  /* Хэмжээ */
  --wrap: 1160px;
  --narrow: 760px;
  --step: clamp(1rem, 0.6rem + 1.6vw, 1.5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--gravel);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; display: block; }

a { color: var(--soil); text-decoration-color: var(--khulan); text-underline-offset: 3px; }
a:hover { color: var(--khulan); }

:focus-visible {
  outline: 2.5px solid var(--khulan);
  outline-offset: 3px;
}

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: 22px; }
.narrow { max-width: var(--narrow); }

/* ---------- Толгой хэсэг ба цэс ---------- */

.topbar {
  background: var(--ink);
  color: rgba(233, 228, 216, 0.62);
  font-size: 12.5px;
  letter-spacing: 0.06em;
  font-family: var(--mono);
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: 6px 26px;
  align-items: center; justify-content: space-between;
  min-height: 36px;
}
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--khulan); }

.masthead {
  background: var(--soil);
  color: var(--salt);
  border-bottom: 3px solid var(--khulan);
  position: sticky; top: 0; z-index: 60;
}
.masthead .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 18px; min-height: 84px;
}

.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: inherit; }
.brand .sigil {
  flex: none; width: 52px; height: auto;
  /* албан ёсны бэлгэ тэмдэг — гүн ногоон дэвсгэр дээр тодруулна */
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.35));
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.16; }
.brand-txt b {
  font-family: var(--display);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: 0.005em;
}
.brand-txt span {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: rgba(251, 249, 243, 0.58);
  margin-top: 3px;
}

.navtoggle {
  display: none;
  background: none; border: 1px solid rgba(251,249,243,0.35);
  color: var(--salt); border-radius: 2px;
  padding: 9px 12px; font: inherit; font-size: 14px; cursor: pointer;
}

.nav ul { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav > ul > li { position: relative; }
.nav a, .nav .sub-btn {
  display: block; padding: 10px 13px;
  color: rgba(251, 249, 243, 0.86);
  text-decoration: none;
  font-size: 14.5px;
  letter-spacing: 0.005em;
  border-bottom: 2px solid transparent;
  background: none; border-top: 0; border-inline: 0;
  font-family: inherit; cursor: pointer; white-space: nowrap;
}
.nav a:hover, .nav .sub-btn:hover { color: var(--salt); border-bottom-color: var(--khulan); }
.nav a[aria-current="page"] { color: var(--salt); border-bottom-color: var(--khulan); }

.nav .sub {
  position: absolute; left: 0; top: 100%;
  min-width: 268px;
  background: var(--soil-2);
  border: 1px solid rgba(251,249,243,0.14);
  border-top: 2px solid var(--khulan);
  display: none; flex-direction: column;
  padding: 6px 0;
  box-shadow: 0 16px 34px rgba(0,0,0,0.32);
}
.nav li.open .sub { display: flex; }
.nav .sub a { padding: 9px 18px; border-bottom: 0; font-size: 14.5px; }
.nav .sub a:hover { background: rgba(180,129,63,0.2); }
.sub-btn::after { content: " ▾"; opacity: 0.6; font-size: 11px; }

@media (max-width: 1000px) {
  .navtoggle { display: block; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    background: var(--soil-2);
    border-top: 1px solid rgba(251,249,243,0.14);
    padding: 10px 0 18px;
    max-height: 78vh; overflow: auto;
  }
  .nav.open { display: block; }
  .nav ul { flex-direction: column; gap: 0; }
  .nav a, .nav .sub-btn { padding: 12px 24px; width: 100%; text-align: left; border-bottom: 1px solid rgba(251,249,243,0.07); }
  .nav .sub { position: static; display: flex; border: 0; border-left: 2px solid var(--khulan); margin-left: 24px; background: transparent; box-shadow: none; }
  .nav .sub a { padding-left: 18px; }
}

/* ---------- Гарчиг, бичвэр ---------- */

h1, h2, h3, h4 { font-family: var(--display); font-weight: 800; line-height: 1.14; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.1rem, 1.2rem + 3.4vw, 3.5rem); letter-spacing: -0.012em; }
h2 { font-size: clamp(1.5rem, 1.05rem + 1.6vw, 2.15rem); }
h3 { font-size: clamp(1.18rem, 1rem + 0.7vw, 1.45rem); }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1.05em; }
p:last-child { margin-bottom: 0; }

.eyebrow {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--khulan);
  margin: 0 0 14px;
  display: flex; align-items: center; gap: 12px;
}
.eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.lede { font-size: clamp(1.06rem, 0.98rem + 0.4vw, 1.24rem); line-height: 1.62; color: var(--soil); }

/* ---------- Хэсгүүд ---------- */

section.band { padding: clamp(48px, 6vw, 92px) 0; }
section.band + section.band { border-top: 1px solid var(--line-soft); }
.band.dark { background: var(--soil); color: rgba(251,249,243,0.9); border-top: 0; }
.band.dark h2, .band.dark h3 { color: var(--salt); }
.band.dark .eyebrow { color: var(--khulan); }
.band.dark .eyebrow::after { background: rgba(251,249,243,0.22); }
.band.dark a { color: var(--khulan); }
.band.salt { background: var(--salt); }

/* ---------- Нүүр — баннер ---------- */

.hero { position: relative; background: var(--ink); overflow: hidden; }
.hero img.bg {
  width: 100%; height: clamp(400px, 62vh, 660px);
  object-fit: cover; object-position: center 58%;
  opacity: 0.74;
}
.hero .veil {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(20,23,15,0.62) 0%, rgba(20,23,15,0.18) 42%, rgba(20,23,15,0.9) 100%);
}
.hero .inner {
  position: absolute; inset: auto 0 0 0;
  padding-bottom: clamp(30px, 5vw, 62px);
}
.hero h1 { color: var(--salt); max-width: 17ch; margin-bottom: 16px; text-shadow: 0 2px 26px rgba(0,0,0,0.5); }
.hero .sub {
  color: rgba(251,249,243,0.84); max-width: 56ch;
  font-size: clamp(1rem, 0.94rem + 0.35vw, 1.17rem);
}
.hero .stamp {
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.19em;
  text-transform: uppercase; color: var(--khulan); margin-bottom: 14px;
}

/* Гарын үсэг: "А" / "Б" хэсгийн зурвас */
.sectors {
  display: flex; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.1em; background: var(--ink); color: rgba(233,228,216,0.72);
  border-top: 1px solid rgba(251,249,243,0.1);
}
.sectors > div {
  padding: 13px 22px; display: flex; align-items: center; gap: 12px;
  border-right: 1px solid rgba(251,249,243,0.1);
}
.sectors > div:last-child { border-right: 0; margin-left: auto; }
.sectors b {
  font-family: var(--display); font-size: 17px; color: var(--khulan);
  letter-spacing: 0; line-height: 1;
}

/* ---------- Тоон үзүүлэлт ---------- */

.figures {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}
.figures div {
  padding: 24px 22px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.figures b {
  display: block; font-family: var(--display); font-weight: 800;
  font-size: clamp(1.9rem, 1.3rem + 2.1vw, 2.75rem); line-height: 1;
  color: var(--soil); letter-spacing: -0.02em;
}
.figures span {
  display: block; margin-top: 9px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.11em;
  text-transform: uppercase; color: rgba(44,51,35,0.66); line-height: 1.5;
}

/* ---------- Хоёр баганат зохиомж ---------- */

.split { display: grid; gap: clamp(28px, 4vw, 58px); align-items: start; }
@media (min-width: 860px) { .split { grid-template-columns: 1.05fr 0.95fr; } }
@media (min-width: 860px) { .split.wide-left { grid-template-columns: 1.35fr 0.65fr; } }

/* ---------- Зурагнууд ---------- */

figure { margin: 0; }
figure img { width: 100%; height: auto; background: rgba(44,51,35,0.06); }
figcaption {
  font-family: var(--mono); font-size: 11.5px; line-height: 1.55;
  letter-spacing: 0.03em; color: rgba(44,51,35,0.62);
  padding: 9px 2px 0; border-top: 1px solid var(--line-soft); margin-top: 9px;
}
.band.dark figcaption { color: rgba(251,249,243,0.55); border-top-color: rgba(251,249,243,0.18); }

.gallery { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.gallery figure img { aspect-ratio: 4 / 3; object-fit: cover; }

.plate img { aspect-ratio: 3 / 2; object-fit: cover; }

/* ---------- Төрөл зүйлийн карт (гарын үсэг) ---------- */

.species-grid {
  display: grid; gap: clamp(18px, 2.4vw, 30px);
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
}

.species {
  background: var(--salt);
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
}
.species > .shot {
  aspect-ratio: 4 / 3; overflow: hidden; background: var(--soil);
  border-bottom: 1px solid var(--line);
}
.species > .shot img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 480ms cubic-bezier(0.2, 0.7, 0.3, 1);
}
.species:hover > .shot img { transform: scale(1.035); }
.species .body { padding: 20px 21px 22px; display: flex; flex-direction: column; gap: 13px; flex: 1; }

.species .name { margin: 0; font-family: var(--display); font-size: 1.32rem; font-weight: 800; line-height: 1.18; }
.species .latin {
  font-family: var(--display); font-style: italic; font-size: 0.99rem;
  color: var(--khulan); margin: -8px 0 0; line-height: 1.35;
}
.species .en {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: rgba(44,51,35,0.5); margin: -6px 0 0;
}

/* Таксономийн шат — энэ вэбийн онцлох дүрслэл */
.ladder {
  font-family: var(--mono); font-size: 11px; line-height: 1.9;
  letter-spacing: 0.02em; color: rgba(44,51,35,0.62);
  border-left: 1px solid var(--khulan);
  padding: 2px 0 2px 0; margin: 0; list-style: none;
}
.ladder li { position: relative; padding-left: 14px; }
.ladder li::before {
  content: ""; position: absolute; left: 0; top: 0.95em;
  width: 8px; height: 1px; background: var(--line);
}
.ladder li:nth-child(2) { padding-left: 26px; }
.ladder li:nth-child(2)::before { width: 20px; }
.ladder li:nth-child(3) { padding-left: 38px; }
.ladder li:nth-child(3)::before { width: 32px; }
.ladder li:nth-child(4) { padding-left: 50px; }
.ladder li:nth-child(4)::before { width: 44px; }
.ladder li b { color: var(--soil); font-weight: 600; }

.facts { margin: 0; display: grid; gap: 9px; }
.facts > div { display: grid; grid-template-columns: 88px 1fr; gap: 12px; align-items: start; }
.facts dt {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--khulan); padding-top: 4px; line-height: 1.5;
}
.facts dd { margin: 0; font-size: 14.5px; line-height: 1.6; }

.measure {
  white-space: pre-line;
  font-family: var(--mono); font-size: 11.5px; line-height: 1.75;
  color: rgba(44,51,35,0.72); background: rgba(108,123,84,0.09);
  border-left: 2px solid var(--saxaul); padding: 10px 13px;
}

.tag {
  display: inline-block; font-family: var(--mono); font-size: 10px;
  letter-spacing: 0.13em; text-transform: uppercase;
  padding: 4px 9px; border: 1px solid var(--zos); color: var(--zos);
  align-self: flex-start;
}

/* ---------- Мэдээ, үйл ажиллагаа ---------- */

.news { display: grid; gap: clamp(26px, 3.6vw, 46px); }
.news article {
  display: grid; gap: clamp(18px, 2.6vw, 34px);
  padding-bottom: clamp(26px, 3.6vw, 46px);
  border-bottom: 1px solid var(--line);
}
.news article:last-child { border-bottom: 0; padding-bottom: 0; }
@media (min-width: 780px) { .news article { grid-template-columns: 0.86fr 1.14fr; align-items: start; } }
.news .meta {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--khulan); margin-bottom: 10px;
}
.news h3 { margin-bottom: 12px; }

/* ---------- Газар нутгийн карт ---------- */

.places { display: grid; gap: clamp(30px, 4vw, 62px); }
.place { display: grid; gap: clamp(20px, 3vw, 42px); align-items: center; }
@media (min-width: 820px) {
  .place { grid-template-columns: 1fr 1fr; }
  .place:nth-child(even) figure { order: 2; }
}
.place figure img { aspect-ratio: 3 / 2; object-fit: cover; }
.place .num {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em;
  color: var(--khulan); text-transform: uppercase; margin-bottom: 10px;
}

/* ---------- Жагсаалт ---------- */

.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.ticks li { position: relative; padding-left: 24px; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 0.72em;
  width: 11px; height: 1px; background: var(--khulan);
}

.orgchart { display: grid; gap: 22px; }
@media (min-width: 760px) { .orgchart { grid-template-columns: 1fr 1fr; } }
.unit { background: var(--salt); border: 1px solid var(--line); border-top: 3px solid var(--khulan); padding: 24px 24px 26px; }
.unit h3 { font-size: 1.1rem; letter-spacing: 0.02em; text-transform: uppercase; font-family: var(--body); font-weight: 700; margin-bottom: 16px; }

/* ---------- Тэмдэглэлийн хайрцаг ---------- */

.note {
  border-left: 3px solid var(--khulan);
  background: rgba(180,129,63,0.08);
  padding: 20px 22px;
  font-size: 15.5px;
}
.band.dark .note { background: rgba(180,129,63,0.13); }

/* ---------- Хуудасны толгой (дотоод хуудас) ---------- */

.pagehead { background: var(--soil); color: var(--salt); position: relative; overflow: hidden; }
.pagehead img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.3; }
.pagehead .inner { position: relative; padding: clamp(46px, 6vw, 92px) 0 clamp(36px, 5vw, 72px); }
.pagehead h1 { color: var(--salt); max-width: 20ch; margin-bottom: 14px; }
.pagehead p { color: rgba(251,249,243,0.82); max-width: 62ch; margin: 0; }
.crumbs {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--khulan); margin-bottom: 18px;
}
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }

/* ---------- Хөл ---------- */

footer.site {
  background: var(--ink); color: rgba(233,228,216,0.72);
  padding: clamp(44px, 5vw, 74px) 0 0;
  font-size: 15px;
}
footer.site h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.19em;
  text-transform: uppercase; color: var(--khulan); font-weight: 400; margin-bottom: 16px;
}
footer.site a { color: rgba(233,228,216,0.82); text-decoration: none; }
footer.site a:hover { color: var(--khulan); text-decoration: underline; }
.footgrid { display: grid; gap: 34px; }
.footlogo { width: 86px; height: auto; margin-bottom: 18px; opacity: 0.92; }
@media (min-width: 720px) { .footgrid { grid-template-columns: 1.4fr 1fr 1fr; } }
.footgrid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.colophon {
  margin-top: clamp(36px, 4vw, 58px);
  border-top: 1px solid rgba(233,228,216,0.14);
  padding: 20px 0 26px;
  font-family: var(--mono); font-size: 11px; letter-spacing: 0.09em;
  color: rgba(233,228,216,0.45);
  display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between;
}

/* ---------- Товч ---------- */

.btn {
  display: inline-block; font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
  padding: 13px 22px; border: 1px solid var(--khulan); color: var(--khulan);
  background: none; transition: background 200ms ease, color 200ms ease;
}
.btn:hover { background: var(--khulan); color: var(--ink); }
.btn.solid { background: var(--khulan); color: var(--ink); }
.btn.solid:hover { background: transparent; color: var(--khulan); }

/* ---------- Хүснэгт ---------- */

table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--khulan); font-weight: 400;
  border-bottom: 1px solid var(--khulan);
}

/* ---------- Зураг томруулагч ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(20,23,15,0.95);
  display: none; align-items: center; justify-content: center;
  padding: 28px;
}
.lightbox.on { display: flex; }
.lightbox img { max-width: 100%; max-height: 84vh; object-fit: contain; }
.lightbox figcaption {
  color: rgba(251,249,243,0.72); border-top-color: rgba(251,249,243,0.2);
  text-align: center; max-width: 70ch; margin-inline: auto;
}
.lightbox button {
  position: absolute; top: 20px; right: 22px;
  background: none; border: 1px solid rgba(251,249,243,0.4);
  color: var(--salt); font-family: var(--mono); font-size: 12px;
  letter-spacing: 0.12em; padding: 9px 15px; cursor: pointer;
}
.lightbox button:hover { border-color: var(--khulan); color: var(--khulan); }
.zoomable { cursor: zoom-in; }

.skip {
  position: absolute; left: -9999px;
  background: var(--khulan); color: var(--ink); padding: 12px 18px; z-index: 300;
}
.skip:focus { left: 12px; top: 12px; }

/* ---------- Жижиг дэлгэцийн тохируулга ---------- */

.sectors { flex-wrap: wrap; }

@media (max-width: 620px) {
  body { font-size: 16px; }
  .masthead .wrap { min-height: 70px; gap: 12px; }
  .brand .sigil { width: 42px; }
  .brand-txt b { font-size: 15.5px; }
  .brand-txt span { font-size: 9px; letter-spacing: 0.13em; }
  .topbar .wrap { min-height: 32px; font-size: 11px; }
  .topbar .wrap span:first-child { display: none; }
  .sectors > div { padding: 11px 16px; font-size: 11px; }
  .sectors > div:last-child { margin-left: 0; }
  .figures { grid-template-columns: 1fr 1fr; }
  .facts > div { grid-template-columns: 1fr; gap: 2px; }
  .facts dt { padding-top: 0; }
  .species-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr; }
}
