/* Эрчим Инвест — нийтийн хуудсуудын загвар */
:root {
  /* Нэг загварын өнгө, хэмжээ: нийтийн хуудас, захиалга, админ бүгд эндээс авна */
  --sky: #2E62C9;
  --navy: #0B1F44;
  --sun: #FFC531;
  --ink: #0B1F44;
  --muted: #5A6780;
  --line: #E6EAF1;
  --tint: #F4F6FA;
  --white: #ffffff;
  --radius: 20px;
  --radius-btn: 12px;
  --wrap: 1280px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Onest', 'Segoe UI', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
}
h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
a { color: var(--sky); text-underline-offset: 5px; }
a:hover { color: var(--navy); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip { position: absolute; left: -9999px; top: 0; padding: 12px 16px; background: var(--sun); color: var(--navy); font-weight: 700; z-index: 20; }
.skip:focus { left: 8px; top: 8px; }

/* Туршилтын горимын мөр */
.demo-bar { display: none; padding: 8px 24px; background: var(--sun); color: var(--navy); font-size: 14px; font-weight: 500; text-align: center; }
.is-demo .demo-bar { display: block; }

/* Товч */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px;
  border: 2px solid transparent; border-radius: var(--radius-btn);
  font: inherit; font-weight: 800; font-size: 16px; text-decoration: none; cursor: pointer;
}
.btn--lg { min-height: 56px; padding: 0 30px; font-size: 18px; }
.btn--sun { background: var(--sun); color: var(--navy); }
.btn--sun:hover { background: #ffd65c; color: var(--navy); }
.btn--dark { background: var(--navy); color: var(--white); }
.btn--dark:hover { background: var(--sky); color: var(--white); }
.btn--white { background: var(--white); color: var(--navy); }
.btn--white:hover { background: var(--sun); color: var(--navy); }
.btn--ghost { border-color: var(--white); color: var(--white); background: rgba(6, 30, 80, 0.35); }
.btn--ghost:hover { background: var(--white); color: var(--navy); }
.btn--line { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--line:hover { background: var(--navy); color: var(--white); }

/* Толгой */
.site-header {
  position: relative; z-index: 2;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px;
  padding-top: 20px; padding-bottom: 20px;
}
.brand { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 800; font-size: 21px; letter-spacing: -0.02em; text-decoration: none; }
.brand__sun { width: 26px; height: 26px; border-radius: 50%; background: var(--sun); flex: none; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0 28px; font-weight: 500; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; text-decoration: none; border-bottom: 3px solid transparent; }
.site-nav a[aria-current="page"] { border-bottom-color: var(--sun); }
.on-photo, .on-photo a { color: var(--white); }
.on-photo .site-nav a:hover, .on-photo .brand:hover { color: var(--sun); }
.on-photo .btn--white { color: var(--navy); }

/* Нүүрний том зураг */
.hero { position: relative; overflow: hidden; display: flex; flex-direction: column; min-height: 780px; background: var(--sky); }
.hero__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center bottom; }
.hero__shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(6, 30, 80, 0.5) 0%, rgba(6, 30, 80, 0.22) 50%, rgba(6, 30, 80, 0) 78%); }
.hero__copy { position: relative; z-index: 1; padding-top: 64px; padding-bottom: 320px; }
.hero__inner { max-width: 760px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.hero h1 { font-size: 84px; line-height: 1; font-weight: 800; letter-spacing: -0.035em; }
.hero__text { max-width: 500px; font-size: 20px; text-wrap: pretty; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px 16px; padding-top: 4px; }

/* Сонголтын мөр */
.choices { border-bottom: 1px solid var(--line); }
.choices__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.choice { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 20px; color: var(--ink); text-decoration: none; border-top: 4px solid var(--navy); }
.choice:nth-child(1) { border-top-color: var(--sun); }
.choice:nth-child(2) { border-top-color: var(--sky); }
.choice:hover { background: var(--tint); color: var(--ink); }
.choice__title { display: block; font-size: 20px; font-weight: 700; letter-spacing: -0.01em; }
.choice__text { display: block; font-size: 15px; color: var(--muted); }
.choice svg { flex: none; }

/* Хэсэг */
.section { padding: 96px 0; }
.section--tint { background: var(--tint); }
.section__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 32px; margin-bottom: 40px; }
.section h2, .contact h2 { font-size: 44px; line-height: 1.1; font-weight: 800; letter-spacing: -0.025em; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.empty { padding: 40px 24px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* Зарын карт */
.ad-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 40px 28px; }
.ad { display: flex; flex-direction: column; gap: 16px; }
.ad__img { display: block; width: 100%; height: 240px; object-fit: cover; border-radius: var(--radius); background: var(--tint); }
.ad__body { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; }
.ad__type { font-size: 15px; font-weight: 500; color: var(--muted); }
.ad__title { font-size: 26px; line-height: 1.2; font-weight: 800; letter-spacing: -0.02em; }
.ad__summary { font-size: 16px; color: #33435f; text-wrap: pretty; }
.ad__specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ad__specs dt { font-size: 14px; color: var(--muted); }
.ad__specs dd { font-weight: 700; }
.ad__foot { margin-top: auto; padding-top: 6px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.ad__price { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }
.ad__price--ask { font-size: 17px; font-weight: 500; letter-spacing: 0; color: var(--muted); }

/* Шүүлтүүр */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 40px; }
.filter { min-height: 44px; padding: 0 18px; border: 2px solid var(--line); border-radius: 999px; background: var(--white); color: var(--ink); font: inherit; font-weight: 500; font-size: 16px; cursor: pointer; }
.filter:hover { border-color: var(--navy); }
.filter[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: var(--white); }

/* Суурилуулалтын хэсэг */
.split { display: flex; flex-wrap: wrap; align-items: center; gap: 40px 64px; }
.split__img { display: block; flex: 1 1 460px; min-width: 0; width: 100%; height: 520px; object-fit: cover; border-radius: var(--radius); }
.split__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }
.split__copy p { max-width: 460px; font-size: 19px; line-height: 1.55; color: #33435f; text-wrap: pretty; }

/* Суурилуулсан ажлууд */
.work { position: relative; overflow: hidden; border-radius: var(--radius); background: var(--tint); }
.work__btn { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.work img { display: block; width: 100%; height: 100%; object-fit: cover; }
.work figcaption { position: absolute; left: 12px; bottom: 12px; right: 12px; width: fit-content; max-width: calc(100% - 24px); padding: 6px 12px; background: rgba(10, 31, 68, 0.82); color: var(--white); font-size: 15px; font-weight: 500; border-radius: 12px; pointer-events: none; }
.mosaic { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 230px; gap: 16px; }
.mosaic .work:first-child { grid-column: span 2; grid-row: span 2; }
.work-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); grid-auto-rows: 280px; gap: 20px; }

/* Зураг томруулах */
.lightbox { width: min(1100px, calc(100vw - 32px)); max-height: calc(100vh - 32px); padding: 0; border: 0; border-radius: var(--radius); background: var(--navy); color: var(--white); overflow: hidden; }
.lightbox::backdrop { background: rgba(4, 14, 34, 0.86); }
.lightbox img { display: block; width: 100%; max-height: calc(100vh - 120px); object-fit: contain; background: #04102a; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 12px 10px 20px; }
.lightbox__close { min-height: 44px; padding: 0 16px; border: 2px solid var(--white); border-radius: var(--radius-btn); background: none; color: var(--white); font: inherit; font-weight: 700; cursor: pointer; }
.lightbox__close:hover { background: var(--white); color: var(--navy); }

/* Дотор хуудасны толгой */
.page-head { background: var(--navy); }
.page-head__title { padding-top: 40px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 12px; }
.page-head h1 { font-size: 60px; line-height: 1.05; font-weight: 800; letter-spacing: -0.03em; }
.page-head p { max-width: 600px; font-size: 19px; color: #d5def0; text-wrap: pretty; }

/* Холбоо барих */
.contact { position: relative; overflow: hidden; display: flex; align-items: center; min-height: 440px; background: var(--navy); }
.contact__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 30%; }
.contact__shade { position: absolute; inset: 0; background: rgba(10, 31, 68, 0.72); }
.contact__inner { position: relative; z-index: 1; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 32px 64px; padding-top: 72px; padding-bottom: 72px; }
.contact__lead { font-size: 20px; font-weight: 500; }
.contact__phone { display: block; margin-top: 8px; font-size: 72px; font-weight: 800; line-height: 1.15; letter-spacing: -0.03em; color: var(--sun); text-decoration: none; }
.contact__phone:hover { color: var(--white); }
.contact__list { display: flex; flex-direction: column; font-weight: 500; list-style: none; margin: 0; padding: 0; }
.contact__list li { display: flex; align-items: center; min-height: 44px; }
.contact__list a:hover { color: var(--sun); }

/* Хөл */
.site-footer { background: var(--navy); color: #c4d0e6; font-size: 14px; }
.site-footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 32px; padding-top: 12px; padding-bottom: 12px; }
.site-footer a { display: inline-flex; align-items: center; min-height: 44px; color: var(--white); text-decoration: none; }
.site-footer a:hover { color: var(--sun); }

@media (max-width: 900px) {
  .mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 180px; }
  .split__img { height: 380px; }
}
@media (max-width: 760px) {
  body { font-size: 16px; }
  .site-nav { gap: 0 20px; font-size: 15px; }
  .hero { min-height: 640px; }
  .hero h1 { font-size: 44px; }
  .hero__copy { padding-top: 32px; padding-bottom: 220px; }
  .hero__text { font-size: 18px; }
  .section { padding: 64px 0; }
  .section h2, .contact h2 { font-size: 30px; }
  .section__head { margin-bottom: 28px; }
  .page-head h1 { font-size: 38px; }
  .page-head__title { padding-top: 24px; padding-bottom: 40px; }
  .contact__phone { font-size: 38px; }
  .mosaic { grid-auto-rows: 140px; gap: 10px; }
  .work-grid { grid-auto-rows: 240px; }
  .split__img { height: 280px; }
}

/* ---------- Захиалгын хуудас ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.status { padding: 12px 16px; border-radius: 12px; background: var(--navy); color: var(--white); font-weight: 500; }
.status--error { background: #8c1d14; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 15px; font-weight: 700; }
.field__hint { font-size: 14px; color: var(--muted); }
.field input, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 12px;
  border: 1px solid #C9D1DE; border-radius: 12px;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--white);
}
.field textarea { resize: vertical; }

.order { max-width: 880px; display: flex; flex-direction: column; gap: 24px; }
.stepper { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.stepper li { flex: 1 1 0; display: flex; align-items: center; gap: 8px; padding-top: 12px; border-top: 4px solid var(--line); color: var(--muted); font-size: 15px; font-weight: 500; }
.stepper__n { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; background: var(--tint); font-weight: 700; color: var(--ink); }
.stepper li[aria-current="step"] { border-top-color: var(--sun); color: var(--ink); font-weight: 700; }
.stepper li[aria-current="step"] .stepper__n { background: var(--sun); }
.stepper li.is-done { border-top-color: var(--sky); color: var(--ink); }
.stepper li.is-done .stepper__n { background: var(--sky); color: var(--white); }
.order__ad { padding: 12px 16px; border-radius: 10px; background: var(--tint); }

.step { display: flex; flex-direction: column; gap: 28px; }
.step h2 { font-size: 34px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; outline: none; }
.step h3 { font-size: 22px; line-height: 1.25; font-weight: 800; letter-spacing: -0.01em; }
.q { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.q legend { padding: 0; margin-bottom: 12px; font-size: 18px; font-weight: 700; }
.q__hint { font-size: 15px; color: var(--muted); text-wrap: pretty; }
.opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); gap: 10px; }
.opts--wide { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.opt { position: relative; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 56px; padding: 12px 16px; border: 2px solid var(--line); border-radius: 12px; background: var(--white); cursor: pointer; }
.opt:hover { border-color: #9AA8C2; }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt:has(input:checked) { border-color: var(--navy); background: #eef3fb; box-shadow: inset 0 0 0 1px var(--navy); }
.opt:has(input:focus-visible) { outline: 3px solid var(--sun); outline-offset: 2px; }
.opt__title { font-weight: 700; }
.opt__text { font-size: 14px; color: var(--muted); }
.step__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.appl { display: grid; grid-template-columns: minmax(0, 1fr) 140px 110px 110px; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.appl--head { padding-top: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.appl__name { font-weight: 500; }
.appl__label { display: none; }
.num { width: 100%; min-height: 44px; padding: 8px 10px; border: 1px solid #C9D1DE; border-radius: 12px; font: inherit; font-size: 16px; color: var(--ink); background: var(--white); }
.qty { display: flex; align-items: center; }
.qty__btn { flex: none; width: 44px; height: 44px; border: 1px solid #C9D1DE; background: var(--tint); color: var(--ink); font: inherit; font-size: 20px; font-weight: 700; cursor: pointer; }
.qty__btn:first-child { border-radius: 12px 0 0 12px; }
.qty__btn:last-child { border-radius: 0 12px 12px 0; }
.qty__btn:hover { background: var(--line); }
.num--qty { border-radius: 0; border-left: 0; border-right: 0; text-align: center; min-width: 0; }
#appl-add { margin-top: 16px; }
.live-total { font-size: 20px; font-weight: 800; }

.result { padding: 28px; border-radius: var(--radius); background: var(--navy); color: var(--white); display: flex; flex-direction: column; gap: 16px; }
.result__kicker { color: #c4d0e6; font-weight: 500; }
.result h2 { color: var(--white); }
.result__specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.result__row { padding: 12px 14px; border-radius: 10px; background: rgba(255, 255, 255, 0.08); }
.result__row dt { font-size: 14px; color: #c4d0e6; }
.result__row dd { font-size: 19px; font-weight: 700; }
.result__price { display: flex; flex-direction: column; gap: 4px; padding-top: 8px; border-top: 1px solid #2a4273; }
.result__price-label { color: #c4d0e6; font-size: 15px; }
.result__price-value { font-size: 36px; line-height: 1.15; font-weight: 800; letter-spacing: -0.02em; color: var(--sun); }
.result__price-ask { font-size: 22px; font-weight: 700; }
.result__price-demo { margin-top: 4px; font-size: 14px; color: var(--sun); }
.result__notes { margin: 0; padding-left: 20px; color: #dbe3f2; font-size: 15px; }
.result__basis { font-size: 14px; color: #c4d0e6; text-wrap: pretty; }
.done a { color: var(--sun); }

.matches { display: flex; flex-direction: column; gap: 12px; }
.matches__list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.match { display: flex; align-items: center; gap: 14px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); text-decoration: none; }
.match:hover { border-color: var(--navy); color: var(--ink); }
.match img { flex: none; width: 88px; height: 64px; object-fit: cover; border-radius: 12px; }
.match__body { display: flex; flex-direction: column; }
.match__title { font-weight: 700; }
.match__meta { font-size: 14px; color: var(--muted); }

.order-form { display: flex; flex-direction: column; gap: 16px; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); }
.order-form > p { color: var(--muted); text-wrap: pretty; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }


@media (max-width: 760px) {
  .step h2 { font-size: 26px; }
  .stepper li { font-size: 13px; }
  .appl { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr); gap: 6px 8px; align-items: end; }
  .qty__btn { width: 38px; }
  .appl--head { display: none; }
  .appl__name, .appl__name-input { grid-column: 1 / -1; }
  .appl__label { display: block; font-size: 13px; color: var(--muted); }
  .result, .order-form { padding: 20px; }
  .result__price-value { font-size: 28px; }
}
.q__label { font-size: 18px; font-weight: 700; }
.select { width: 100%; max-width: 420px; min-height: 52px; padding: 0 14px; border: 1px solid #C9D1DE; border-radius: 12px; font: inherit; font-size: 17px; color: var(--ink); background: var(--white); }
.select:focus-visible { border-color: var(--navy); }
.result__source { font-size: 13px; color: #c4d0e6; }
.result__source a { color: var(--white); }
picture { display: contents; }
