/* Эрчим Инвест — шинэ (H) загвар. site.css-ийн дараа ачаална. */
:root {
  --navy: #0B1F44;
  --ink: #0B1F44;
  --sun: #FFC531;
  --tint: #F4F6FA;
  --line: #E6EAF1;
  --muted: #5A6780;
  --body: #44526B;
  --blue: #2E62C9;
  --green: #1C6B3F;
  --x-wrap: 1280px;
}

body { color: var(--ink); }
a { color: #2A4A8C; }

/* ---------- Хуудас хоорондын шилжилт ---------- */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: x-out .22s ease both; }
::view-transition-new(root) { animation: x-in .38s cubic-bezier(.2,.7,.2,1) both; }
@keyframes x-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes x-in { from { opacity: 0; transform: translateY(14px); } }
.x-page { animation: x-in .5s cubic-bezier(.2,.7,.2,1) both; }

.x-wrap { width: 100%; max-width: var(--x-wrap); margin: 0 auto; padding: 0 20px; }

/* ---------- Толгой ---------- */
.x-hdr { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: saturate(1.4) blur(6px); }
.x-hdr__in { position: relative; height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.x-brand { display: flex; align-items: center; gap: 12px; color: var(--navy); text-decoration: none; font-weight: 800; font-size: 23px; letter-spacing: -.01em; }
.x-brand { flex-direction: column; align-items: center; gap: 3px; }
.x-brand img { width: auto; height: 46px; display: block; flex: none; }
.x-word { font-weight: 400; font-size: 14px; letter-spacing: .08em; line-height: 1; white-space: nowrap; }
.x-word b { font-weight: 800; }
.x-brand:hover { color: var(--navy); }
.x-nav { display: flex; gap: 28px; font-weight: 600; font-size: 16px; }
.x-nav a { color: var(--navy); text-decoration: none; padding: 6px 0; }
.x-nav a:hover { color: var(--blue); }
.x-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--sun); }
.x-hdr__end { display: flex; align-items: center; gap: 8px; }
.x-call { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; min-width: 46px; padding: 0 16px; border-radius: 12px; background: var(--navy); color: #fff; font-weight: 700; text-decoration: none; }
.x-call:hover { background: var(--blue); color: #fff; }
.x-menu { display: none; width: 46px; height: 46px; align-items: center; justify-content: center; border: 1px solid #D3DAE6; border-radius: 12px; background: #fff; color: var(--navy); cursor: pointer; }

@media (max-width: 900px) {
  .x-call__label { display: none; }
  .x-menu { display: inline-flex; }
  .x-hdr__in { height: 72px; }
  .x-brand { font-size: 20px; gap: 10px; }
  .x-brand img { height: 40px; }
  .x-word { font-size: 12px; letter-spacing: .06em; }
  .x-nav { display: none; position: absolute; left: 12px; right: 12px; top: 72px; flex-direction: column; gap: 0; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 40px rgba(11,31,68,.16); }
  .x-nav.is-open { display: flex; }
  .x-nav a { padding: 14px 12px; border-radius: 10px; }
  .x-nav a[aria-current="page"] { box-shadow: none; background: var(--tint); }
}

/* ---------- Товч ---------- */
.x-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 22px; border: 2px solid transparent; border-radius: 12px; font: inherit; font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer; }
.x-btn--sun { background: var(--sun); color: var(--navy); }
.x-btn--sun:hover { background: #FFD65C; color: var(--navy); }
.x-btn--navy { background: var(--navy); color: #fff; }
.x-btn--navy:hover { background: var(--blue); color: #fff; }
.x-btn--line { border-color: var(--navy); color: var(--navy); background: transparent; }
.x-btn--line:hover { background: var(--navy); color: #fff; }
.x-btn--green { background: var(--green); color: #fff; }
.x-btn--green:hover { background: #155633; color: #fff; }
.x-shine { background-image: linear-gradient(110deg, var(--sun) 40%, #FFE28A 50%, var(--sun) 60%); background-size: 200% 100%; animation: x-shine 3.5s linear 1.5s infinite; }
@keyframes x-shine { from { background-position: -200% 0; } to { background-position: 200% 0; } }

/* ---------- Нүүр: эхний дэлгэц ---------- */
.x-hero { background: var(--tint); }
.x-hero__in { padding-top: 56px; padding-bottom: 64px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(500px, 100%), 1fr)); gap: 48px; align-items: center; }
.x-hero__copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.x-hero h1 { font-size: 64px; line-height: 1.02; font-weight: 800; letter-spacing: -.035em; text-wrap: balance; }
.x-lead { font-size: 19px; line-height: 1.6; color: var(--body); max-width: 560px; }
.x-quick { background: #fff; border-radius: 20px; padding: 22px; box-shadow: 0 1px 2px rgba(11,31,68,.06), 0 12px 32px rgba(11,31,68,.08); display: flex; flex-direction: column; gap: 16px; }
.x-quick__row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr)); gap: 12px; }
.x-field { display: flex; flex-direction: column; gap: 6px; }
.x-field label { font-weight: 700; font-size: 14px; }
.x-field select, .x-field input { min-height: 50px; border: 1px solid #C9D1DE; border-radius: 12px; padding: 0 12px; font: inherit; font-size: 16px; background: #fff; color: var(--navy); width: 100%; }
.x-quick .x-btn { min-height: 56px; font-size: 18px; }
.x-note { font-size: 14px; color: var(--muted); }
.x-checks { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; font-weight: 600; color: #2C3B57; }
.x-checks li { display: flex; align-items: center; gap: 8px; }
.x-hero__media { position: relative; min-width: 0; padding: 0 0 28px 28px; }
.x-sun { position: absolute; left: 0; top: -24px; width: 260px; height: 260px; border-radius: 50%; background: var(--sun); animation: x-sun 1s cubic-bezier(.2,.7,.2,1) both, x-glow 3.2s ease-in-out 1s infinite; }
@keyframes x-sun { from { opacity: 0; transform: scale(.4); } }
@keyframes x-glow { 0%,100% { box-shadow: 0 0 0 0 rgba(255,197,49,.45); } 50% { box-shadow: 0 0 0 28px rgba(255,197,49,0); } }
.x-hero__frame { position: relative; border-radius: 28px; overflow: hidden; }
.x-hero__frame img { display: block; width: 100%; height: 540px; object-fit: cover; }
.x-badge { position: absolute; left: 0; bottom: 0; background: #fff; border-radius: 16px; padding: 14px 18px; box-shadow: 0 12px 32px rgba(11,31,68,.16); display: flex; align-items: center; gap: 14px; animation: x-float 4s ease-in-out 1.6s infinite; }
.x-badge strong { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.x-badge span { display: flex; flex-direction: column; font-size: 14px; }
.x-badge small { color: var(--muted); font-size: 14px; }
@keyframes x-float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.x-in { animation: x-in .8s cubic-bezier(.2,.7,.2,1) both; }

/* ---------- Тоон мөр ---------- */
.x-proof { border-bottom: 1px solid var(--line); }
.x-proof__in { padding-top: 28px; padding-bottom: 28px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 20px; }
.x-proof__in > div { display: flex; flex-direction: column; gap: 2px; }
.x-proof b { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.x-proof span { font-size: 15px; color: var(--muted); }

/* ---------- Хэсэг ---------- */
.x-sec { padding: 88px 0; }
.x-sec--tint { background: var(--tint); }
.x-sec--navy { background: var(--navy); color: #fff; }
.x-sec__head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 36px; }
.x-h2 { font-size: 44px; line-height: 1.08; font-weight: 800; letter-spacing: -.03em; max-width: 720px; }
.x-kicker { font-size: 14px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--sun); }
.x-more { font-weight: 700; }

/* Иж бүрдлийн карт */
.x-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 20px; }
.x-card { border: 1px solid var(--line); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; background: #fff; }
.x-card > img { display: block; width: 100%; height: 220px; object-fit: cover; }
.x-card__body { padding: 22px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.x-tag { align-self: flex-start; font-size: 14px; font-weight: 800; color: #6B4D00; background: #FFF3CC; padding: 5px 10px; border-radius: 8px; }
.x-card h3 { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.x-card p { font-size: 15px; line-height: 1.55; color: var(--body); }
.x-specs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; background: var(--tint); border-radius: 14px; padding: 12px; }
.x-specs dt { font-size: 12px; color: var(--muted); font-weight: 600; }
.x-specs dd { margin: 0; font-weight: 800; font-size: 15px; }
.x-card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.x-price { font-size: 20px; font-weight: 800; }
.x-price--ask { font-size: 15px; font-weight: 600; color: var(--muted); }

/* Аймгийн нар */
.x-sun-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 48px; align-items: center; }
.x-sun-copy { display: flex; flex-direction: column; gap: 18px; }
.x-sun-copy p { font-size: 17px; line-height: 1.6; color: #C9D3E6; }
.x-sun-copy select { min-height: 52px; max-width: 360px; border: 0; border-radius: 12px; padding: 0 14px; font: inherit; font-size: 17px; background: #fff; color: var(--navy); }
.x-chart { margin: 0; background: #132A57; border-radius: 20px; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.x-chart__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.x-chart__stats div { display: flex; flex-direction: column; gap: 2px; }
.x-chart__stats span { font-size: 13px; color: #A9B8D6; }
.x-chart__stats b { font-size: 26px; font-weight: 800; }
.x-bars { height: 180px; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; align-items: end; }
.x-bars span { display: block; background: #6F8FD0; border-radius: 4px 4px 0 0; transition: height .5s cubic-bezier(.2,.7,.2,1); }
.x-bars span.is-min { background: var(--sun); }
.x-months { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; font-size: 12px; color: #A9B8D6; text-align: center; }
.x-chart figcaption { font-size: 13px; color: #A9B8D6; border-top: 1px solid #2A4475; padding-top: 12px; }
.x-chart figcaption a { color: #fff; }

/* Алхам */
.x-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.x-steps li { background: var(--tint); border-radius: 20px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.x-steps i { font-style: normal; width: 44px; height: 44px; border-radius: 50%; background: var(--sun); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 18px; }
.x-steps h3 { font-size: 22px; font-weight: 800; }
.x-steps p { color: var(--body); line-height: 1.55; }

/* Ажлын жижиг карт (нүүр) */
.x-works { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; }
.x-work { display: block; color: inherit; text-decoration: none; background: #fff; border-radius: 18px; overflow: hidden; }
.x-work:hover { color: inherit; }
.x-work img { display: block; width: 100%; height: 220px; object-fit: cover; }
.x-work figcaption { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.x-work strong { font-size: 17px; }
.x-work span { font-size: 14px; color: var(--muted); }

/* Ажлын дэлгэрэнгүй карт (Ажлууд хуудас) */
.x-wgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(520px, 100%), 1fr)); gap: 24px; }
.x-wcard { border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #fff; display: flex; flex-direction: column; }
.x-wcard > button { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; }
.x-wcard img { display: block; width: 100%; height: 300px; object-fit: cover; }
.x-wcard__body { padding: 24px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.x-wcard__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.x-kw { font-size: 14px; font-weight: 800; color: #fff; background: var(--navy); padding: 5px 10px; border-radius: 8px; }
.x-date { font-size: 14px; color: var(--muted); }
.x-wcard h2 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.x-place { display: flex; gap: 8px; align-items: center; font-weight: 600; color: #2C3B57; }
.x-place svg { flex: none; }
.x-list { margin: 0; padding: 14px 16px; list-style: none; background: var(--tint); border-radius: 14px; display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
.x-list li { display: flex; gap: 8px; }
.x-list li::before { content: "•"; color: #E0A800; font-weight: 800; }
.x-wcard p { font-size: 15px; line-height: 1.55; color: var(--body); }

/* Хуудасны толгой (дэд хуудас) */
.x-phead { background: var(--tint); }
.x-phead__in { padding-top: 40px; padding-bottom: 48px; display: flex; flex-direction: column; gap: 16px; }
.x-crumbs { display: flex; gap: 8px; font-size: 15px; color: var(--muted); }
.x-crumbs a { font-weight: 600; }
.x-phead h1 { font-size: 56px; line-height: 1.05; font-weight: 800; letter-spacing: -.035em; }
.x-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.x-chip { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid #C9D1DE; background: #fff; color: var(--navy); font: inherit; font-weight: 700; cursor: pointer; }
.x-chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }

/* Ногоон зээл, брэнд */
.x-loan-in { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr)); gap: 40px; align-items: center; }
.x-loan { background: #E8F5EC; border-radius: 24px; padding: 36px; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.x-loan .x-kicker { color: var(--green); }
.x-loan p { font-size: 17px; line-height: 1.6; color: #2C3B57; }
.x-brands { display: flex; flex-direction: column; gap: 6px; }
.x-brands div { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; border-bottom: 1px solid var(--line); padding: 14px 0; }
.x-brands strong { font-size: 24px; font-weight: 800; }
.x-brands span { font-size: 15px; color: var(--muted); text-align: right; }

/* CTA мөр */
.x-cta { background: var(--navy); color: #fff; border-radius: 24px; padding: 36px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 20px; }
.x-cta h2 { font-size: 32px; font-weight: 800; }
.x-cta p { color: #C9D3E6; }

/* Холбоо барих, хөл */
.x-contact { background: var(--sun); }
.x-contact__in { padding-top: 64px; padding-bottom: 64px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 28px; }
.x-contact p { font-size: 18px; font-weight: 500; }
.x-contact__btns { display: flex; flex-wrap: wrap; gap: 12px; }
.x-contact .x-btn { min-height: 58px; }
.x-contact .x-btn--navy { font-size: 20px; }
.x-ftr { background: var(--navy); color: #C9D3E6; font-size: 14px; }
.x-ftr__in { padding-top: 22px; padding-bottom: 22px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.x-ftr a { color: #fff; }

/* Утасны доод самбар */
.x-bar { display: none; position: sticky; bottom: 0; z-index: 25; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--line); }
.x-bar a { min-height: 50px; border-radius: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.x-bar a:first-child { border: 2px solid var(--navy); color: var(--navy); }
.x-bar a:last-child { background: var(--sun); color: var(--navy); }

/* Lightbox */
.x-lightbox { padding: 0; border: 0; border-radius: 16px; max-width: min(1100px, 94vw); background: #000; }
.x-lightbox::backdrop { background: rgba(6,14,32,.8); }
.x-lightbox img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.x-lightbox div { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; background: #fff; }

/* ---------- Хөдөлгөөн: гүйлгэхэд гарч ирэх, хулгана ---------- */
.x-lift { transition: transform .25s ease, box-shadow .25s ease; }
.x-lift:hover { transform: translateY(-6px); box-shadow: 0 18px 40px rgba(11,31,68,.14); }
.x-zoom { overflow: hidden; }
.x-zoom img { transition: transform .6s ease; }
.x-zoom:hover img { transform: scale(1.05); }
@supports (animation-timeline: view()) {
  .x-rv { animation: x-in linear both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
}

@media (max-width: 900px) {
  .x-hero h1 { font-size: 42px; }
  .x-phead h1 { font-size: 40px; }
  .x-h2 { font-size: 32px; }
  .x-sec { padding: 56px 0; }
  .x-hero__frame img { height: 300px; }
  .x-sun { width: 180px; height: 180px; }
  .x-wcard img { height: 230px; }
  .x-bar { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  .x-page, .x-in, .x-sun, .x-badge, .x-shine, .x-rv { animation: none !important; }
  .x-lift, .x-zoom img, .x-bars span { transition: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
