/* Их Хуралдай: үндсэн загвар */
@font-face {
  font-family: 'Montserrat';
  src: url('fonts/montserrat.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: 'Mongol Bichig';
  src: url('fonts/noto-mongolian.woff2') format('woff2');
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #071430;
  --navy: #0B1E3F;
  --navy-2: #0F2650;
  --deep: #050E22;
  --gold: #D4A62A;
  --gold-hi: #E9BF4B;
  --gold-dk: #9A7514;
  --text: #F2F4F8;
  --muted: #B9C5DB;
  --dim: #8FA0BF;
  --line: rgba(212, 166, 42, 0.30);
  --line-soft: rgba(185, 197, 219, 0.16);
  --red: #E8665A;
  --seal: #B23A2E;
  --parch: #EBDFC4;
  --ink: #3A2E1C;
  --ink-soft: #6B5A3E;
  --focus: #F2C14E;
  --wrap: 1160px;
  --gutter: clamp(16px, 4vw, 40px);
  --band: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='30' viewBox='0 0 26 30'%3E%3Cpath d='M0 2H26M0 28H26M2 28V7H22V19H10V13' fill='none' stroke='%23D4A62A' stroke-width='3'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--text);
  font-family: 'Montserrat', 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video, svg { display: block; max-width: 100%; }
a { color: var(--gold-hi); text-underline-offset: 3px; }
a:hover { color: #F6D274; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; line-height: 1.08; letter-spacing: -0.015em; text-wrap: balance; }
.mong { font-family: 'Mongol Bichig', serif; writing-mode: vertical-lr; line-height: 1.25; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--navy); font-weight: 800; padding: 10px 14px; border-radius: 10px; text-decoration: none; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.band { height: 24px; background: var(--band) repeat-x left center / 21px 24px; opacity: 0.9; }

/* ---------- толгой ---------- */
.site-head {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  transition: background-color .25s ease, border-color .25s ease;
  border-bottom: 1px solid transparent;
}
.site-head.solid { background: rgba(7, 20, 48, 0.92); border-bottom-color: var(--line-soft); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.head-row { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: 0.01em; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand svg { width: 24px; height: 47px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.nav a { color: var(--muted); text-decoration: none; font-weight: 600; font-size: 15px; padding: 10px 12px; border-radius: 10px; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.06); }
.nav .btn { margin-left: 8px; }
.nav a.btn-gold, .nav a.btn-gold:hover { color: var(--navy); background: var(--gold); }
.nav a.btn-gold:hover { background: var(--gold-hi); }
.menu-btn { display: none; margin-left: auto; width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line-soft); background: rgba(7, 20, 48, 0.6); color: var(--text); cursor: pointer; align-items: center; justify-content: center; }
.menu-btn svg { width: 22px; height: 22px; }
@media (max-width: 860px) {
  .menu-btn { display: inline-flex; }
  .nav {
    position: absolute; top: 68px; left: var(--gutter); right: var(--gutter);
    flex-direction: column; align-items: stretch; gap: 2px;
    background: rgba(7, 20, 48, 0.97); border: 1px solid var(--line-soft); border-radius: 16px; padding: 10px;
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 13px 14px; font-size: 16px; }
  .nav .btn { margin: 6px 0 0; justify-content: center; }
}

/* ---------- товч ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  font: inherit; font-weight: 800; font-size: 16px; line-height: 1.2;
  padding: 14px 22px; border-radius: 14px; text-decoration: none; cursor: pointer; border: 0;
  min-height: 48px;
}
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 5px 0 var(--gold-dk); transition: transform .08s ease, box-shadow .08s ease; }
.btn-gold:hover { color: var(--navy); background: var(--gold-hi); }
.btn-gold:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--gold-dk); }
.btn-line { background: rgba(7, 20, 48, 0.35); color: var(--text); border: 1.5px solid rgba(242, 244, 248, 0.45); }
.btn-line:hover { color: var(--text); border-color: var(--text); background: rgba(7, 20, 48, 0.6); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn-sm { padding: 10px 16px; min-height: 44px; font-size: 15px; }
.btn-gold.btn-sm { box-shadow: 0 4px 0 var(--gold-dk); }

/* ---------- нүүр ---------- */
.hero { position: relative; height: 100vh; height: 100svh; min-height: 640px; max-height: 1000px; overflow: hidden; background: var(--night); }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; z-index: 2; height: 100%; display: flex; align-items: flex-end; padding-bottom: 21vh; padding-bottom: 21svh; }
.hero-copy { display: flex; gap: clamp(18px, 3vw, 36px); align-items: stretch; max-width: 1000px; }
.hero-copy .mong { color: var(--gold); font-size: clamp(30px, 4.2vw, 50px); flex-shrink: 0; padding-top: 6px; }
.hero h1 { font-size: clamp(40px, 5.6vw, 72px); font-weight: 900; text-shadow: 0 2px 24px rgba(5, 14, 34, 0.55); }
.hero p { margin: 22px 0 0; font-size: clamp(17px, 1.6vw, 20px); color: #DCE3EF; max-width: 34em; text-shadow: 0 1px 14px rgba(5, 14, 34, 0.7); }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
@media (max-width: 640px) {
  .hero { min-height: 600px; }
  .hero-inner { padding-bottom: 23vh; padding-bottom: 23svh; }
  .hero-copy .mong { display: none; }
}

/* ---------- хэсгүүд ---------- */
section { position: relative; }
.sec { padding: clamp(72px, 10vw, 128px) 0; }
.sec-dark { background: var(--night); }
.sec-head { max-width: 46em; margin-bottom: clamp(36px, 5vw, 56px); }
.sec-head h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 900; }
.sec-head p { margin-top: 18px; color: var(--muted); font-size: 18px; }
.kicker { display: block; color: var(--gold); font-weight: 700; font-size: 15px; margin-bottom: 14px; }

/* Их Хуралдай */
.story { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 96px); align-items: center; }
.story-text h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 900; margin-bottom: 26px; }
.story-text p { color: var(--muted); font-size: 18px; max-width: 34em; }
.story-text p strong { color: var(--text); font-weight: 700; }
.year { font-weight: 900; font-size: clamp(64px, 10vw, 128px); line-height: 0.9; color: var(--gold); letter-spacing: -0.03em; margin-bottom: 18px; }
.logo-meaning { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 28px; align-items: start; }
.logo-meaning svg { width: 150px; height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, 0.35)); }
.logo-meaning dl { margin: 0; display: grid; gap: 20px; }
.logo-meaning dt { font-weight: 800; color: var(--gold); font-size: 17px; }
.logo-meaning dd { margin: 4px 0 0; color: var(--muted); font-size: 16px; line-height: 1.5; }
@media (max-width: 900px) { .story { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .logo-meaning { grid-template-columns: 96px minmax(0, 1fr); gap: 18px; } .logo-meaning svg { width: 96px; } }

/* Таван булан */
.corners { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.corner { display: grid; grid-template-columns: 76px minmax(150px, 0.8fr) minmax(0, 1.3fr) minmax(0, 1.1fr); gap: 20px 32px; padding: 30px 0; border-bottom: 1px solid var(--line); align-items: start; }
.corner-icon { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; }
.corner-icon svg { width: 30px; height: 30px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.corner h3 { font-size: 26px; font-weight: 900; padding-top: 14px; }
.corner .when { display: block; font-weight: 800; color: var(--gold); font-size: 15px; margin-bottom: 6px; }
.corner .past p, .corner .today p { margin: 0; color: var(--muted); font-size: 16.5px; line-height: 1.55; }
.corner .today .when { color: var(--text); }
@media (max-width: 960px) {
  .corner { grid-template-columns: 64px minmax(0, 1fr); gap: 14px 20px; }
  .corner h3 { padding-top: 12px; }
  .corner .past, .corner .today { grid-column: 2; }
}

/* Нийтлэлүүд */
.posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2.4vw, 28px); }
.post { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--text); }
.post img { width: 100%; height: auto; aspect-ratio: 4 / 5; border-radius: 10px; border: 1px solid var(--line-soft); transition: border-color .2s ease; background: var(--navy-2); }
.post:hover { color: var(--text); }
.post:hover img, .post:focus-visible img { border-color: var(--gold); }
.post-cat { font-weight: 700; color: var(--gold); font-size: 14px; }
.post-title { font-weight: 800; font-size: 18px; line-height: 1.3; }
.posts-more { margin-top: 36px; }
@media (max-width: 860px) { .posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .post-title { font-size: 15.5px; } }

/* Reel + тооцоолуур */
.duo { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: clamp(36px, 7vw, 96px); align-items: center; }
.phone { width: 100%; max-width: 330px; margin: 0 auto; border-radius: 34px; padding: 10px; background: #02060F; border: 1px solid var(--line-soft); box-shadow: 0 30px 70px rgba(0, 0, 0, 0.45); }
.phone video { width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 26px; background: var(--night); object-fit: cover; }
.phone-cap { text-align: center; color: var(--dim); font-size: 14px; margin-top: 14px; }
.duo h2 { font-size: clamp(32px, 4.6vw, 56px); font-weight: 900; }
.duo .lede { color: var(--muted); font-size: 18px; margin: 20px 0 28px; max-width: 32em; }
.race { display: grid; grid-template-columns: 112px minmax(0, 1fr) 70px; gap: 12px 14px; align-items: center; margin-bottom: 30px; max-width: 520px; }
.race .name { font-weight: 700; font-size: 15px; color: var(--muted); }
.race .track, .race .bar { display: block; }
.race .track { height: 22px; border-radius: 999px; background: rgba(255, 255, 255, 0.07); overflow: hidden; }
.race .bar { height: 100%; border-radius: 999px; }
.race .bar.infl { width: 62.5%; background: var(--red); }
.race .bar.pay { width: 100%; border: 2px dashed var(--gold); background: transparent; border-radius: 999px; }
.race .val { font-weight: 800; text-align: right; }
.race .val.infl { color: var(--red); }
.race .val.pay { color: var(--gold); }
.fine { color: var(--dim); font-size: 14px; margin-top: 16px; }
@media (max-width: 860px) { .duo { grid-template-columns: 1fr; } .duo .phone { max-width: 290px; } }

/* Хамтран ажиллах */
.collab { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: clamp(36px, 6vw, 80px); align-items: center; }
.collab h2 { font-size: clamp(36px, 5.4vw, 68px); font-weight: 900; }
.collab .lede { color: var(--muted); font-size: 18px; margin: 20px 0 26px; max-width: 34em; }
.mail { display: inline-block; font-weight: 800; font-size: clamp(20px, 3.2vw, 32px); color: var(--gold-hi); text-decoration: none; word-break: break-all; border-bottom: 2px solid var(--line); padding-bottom: 4px; }
.mail:hover { border-bottom-color: var(--gold); }
.collab-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; align-items: center; }
.copy-note { color: #9FD08A; font-weight: 700; font-size: 15px; min-height: 1px; }
.topics { list-style: none; padding: 0; margin: 30px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.topics li { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 15px; color: var(--muted); }
.seal { width: clamp(150px, 20vw, 220px); aspect-ratio: 1; border: 10px solid var(--seal); padding: 8px; transform: rotate(-8deg); opacity: 0.95; }
.seal div { width: 100%; height: 100%; border: 3px solid var(--seal); display: flex; justify-content: center; padding: 12px; }
.seal .mong { color: #E5786D; font-size: clamp(24px, 3vw, 34px); height: 100%; }
.about { margin-top: clamp(56px, 8vw, 96px); padding-top: 32px; border-top: 1px solid var(--line-soft); display: grid; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); gap: 24px 48px; }
.about h3 { font-size: 22px; font-weight: 900; }
.about p { color: var(--muted); margin: 0; max-width: 40em; }
@media (max-width: 760px) { .collab { grid-template-columns: 1fr; } .seal { justify-self: start; width: 128px; border-width: 8px; } .seal .mong { font-size: 22px; } .about { grid-template-columns: 1fr; } }

/* ---------- хөл ---------- */
.site-foot { background: var(--deep); padding: 48px 0 56px; color: var(--dim); font-size: 14.5px; }
.site-foot .band { margin-bottom: 36px; }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px 48px; }
.foot-row p { margin: 0 0 8px; max-width: 46em; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.foot-links a { color: var(--muted); font-weight: 600; text-decoration: none; }
.foot-links a:hover { color: var(--text); text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn-gold, .post img, .site-head { transition: none; }
}

/* ---------- тооцоолуур ---------- */
.calc-page { background: var(--night); }
.calc-page canvas.bg { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; }
.calc-main { position: relative; z-index: 1; max-width: 600px; margin: 0 auto; padding: 116px var(--gutter) 240px; }
.calc-main h1 { font-size: clamp(34px, 8vw, 52px); font-weight: 900; text-shadow: 0 2px 20px rgba(5, 14, 34, 0.6); }
.calc-main .lead { color: #DCE3EF; font-size: 17.5px; margin: 16px 0 28px; text-shadow: 0 1px 12px rgba(5, 14, 34, 0.7); }
.panel { background: rgba(9, 24, 52, 0.84); border: 1px solid var(--line); border-radius: 22px; padding: 24px 20px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.field + .field { margin-top: 20px; }
.field label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 8px; }
.money { position: relative; }
.money input {
  width: 100%; font: inherit; font-size: 22px; font-weight: 700; color: var(--text);
  background: rgba(255, 255, 255, 0.07); border: 1.5px solid rgba(185, 197, 219, 0.4); border-radius: 14px;
  padding: 13px 44px 13px 16px; outline: none;
}
.money input::placeholder { color: rgba(185, 197, 219, 0.55); }
.money input:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.money span { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); font-weight: 800; color: var(--muted); font-size: 20px; }
.range-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.range-row output { font-weight: 900; font-size: 26px; color: var(--red); }
.field input[type=range] { width: 100%; accent-color: var(--gold); margin: 6px 0 2px; height: 32px; }
.hint { font-size: 14px; color: var(--muted); margin: 4px 0 0; }
.hint button { font: inherit; font-weight: 700; color: var(--gold-hi); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.calc-submit { margin-top: 24px; width: 100%; font-size: 18px; }
.error { color: var(--red); font-weight: 700; font-size: 15px; margin: 12px 0 0; min-height: 1px; }
.privacy { font-size: 13.5px; color: var(--muted); margin: 14px 2px 0; }

.decree { scroll-margin-top: 92px; position: relative; margin-top: 30px; background: var(--parch); color: var(--ink); border-radius: 6px; padding: 32px 22px 24px; box-shadow: 0 24px 50px rgba(0, 0, 0, 0.4); border: 1px solid #C9B892; transform-origin: top center; }
.decree[hidden] { display: none; }
.decree.enter { animation: unroll .55s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes unroll { from { opacity: 0; transform: translateY(18px) scaleY(.94); } to { opacity: 1; transform: none; } }
.decree::before, .decree::after { content: ""; position: absolute; left: 14px; right: 14px; height: 12px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='30' viewBox='0 0 26 30'%3E%3Cpath d='M0 2H26M0 28H26M2 28V7H22V19H10V13' fill='none' stroke='%236B5A3E' stroke-width='3'/%3E%3C/svg%3E") repeat-x left center / 10.4px 12px; opacity: .6; }
.decree::before { top: 10px; } .decree::after { bottom: 10px; }
.verdict { font-weight: 900; font-size: 27px; line-height: 1.12; margin: 6px 0 18px; padding-right: 112px; }
.d-seal { position: absolute; top: 28px; right: 18px; width: 98px; height: 98px; display: grid; place-items: center; border: 6px double currentColor; color: #B23A2E; font-weight: 900; font-size: 14.5px; text-align: center; line-height: 1.1; transform: rotate(-10deg); opacity: .92; padding: 6px; }
.d-seal.win { color: #8E6A0E; }
.d-seal.stamp { animation: stamp .5s cubic-bezier(.2, 1.6, .4, 1) .35s both; }
@keyframes stamp { from { opacity: 0; transform: scale(2.2) rotate(-26deg); } to { opacity: .92; transform: scale(1) rotate(-10deg); } }
.big { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; font-weight: 900; margin: 0 0 4px; }
.big .from { font-size: 22px; color: var(--ink-soft); text-decoration: line-through; text-decoration-thickness: 2px; }
.big .to { font-size: 40px; letter-spacing: -0.01em; }
.big-cap { color: var(--ink-soft); font-size: 15px; margin: 0 0 20px; }
.d-race .track, .d-race .bar { display: block; }
.d-race { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 10px 12px; align-items: center; margin: 4px 0 22px; }
.d-race .name { font-weight: 700; font-size: 14.5px; }
.d-race .track { height: 22px; border-radius: 999px; background: rgba(58, 46, 28, 0.13); overflow: hidden; }
.d-race .bar { height: 100%; width: 0; border-radius: 999px; transition: width 1.1s cubic-bezier(.2, .8, .2, 1); }
.d-race .bar.infl { background: #C2483B; } .d-race .bar.pay { background: #B8901F; }
.d-race .val { font-weight: 800; font-size: 15px; min-width: 64px; text-align: right; }
.facts { margin: 0; padding: 0; list-style: none; border-top: 1px solid rgba(58, 46, 28, 0.24); }
.facts li { display: flex; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(58, 46, 28, 0.24); font-size: 15px; }
.facts li b { font-weight: 800; white-space: nowrap; }
.formula { font-size: 13px; color: var(--ink-soft); margin: 14px 0 0; }
.d-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.d-actions button, .d-actions a { font: inherit; font-weight: 800; font-size: 15px; border-radius: 12px; padding: 12px 16px; cursor: pointer; text-decoration: none; min-height: 46px; }
.d-actions button { background: var(--navy); color: var(--text); border: 0; }
.d-actions a { color: var(--ink); border: 1.5px solid rgba(58, 46, 28, 0.45); background: transparent; }
.d-actions a:hover { color: var(--ink); border-color: var(--ink); }
.sharebox { margin-top: 12px; width: 100%; font: inherit; font-size: 14px; color: var(--ink); background: rgba(255, 255, 255, 0.55); border: 1px solid #C9B892; border-radius: 10px; padding: 10px; }
.toast { font-size: 14px; font-weight: 700; color: #3E6B2E; margin: 10px 0 0; min-height: 1px; }
.calc-foot { margin-top: 34px; font-size: 13.5px; color: var(--muted); text-shadow: 0 1px 10px rgba(5, 14, 34, 0.8); }
.calc-foot a { font-weight: 700; }
@media (max-width: 400px) { .verdict { font-size: 23px; padding-right: 100px; } .d-seal { width: 86px; height: 86px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) { .decree.enter, .d-seal.stamp { animation: none; } .d-race .bar { transition: none; } }
