/* =====================================================================
   MarketGIS · Шерегеш — performance landing
   Mobile first. Без внешних шрифтов и библиотек.
   ===================================================================== */

:root {
  --ink:        #0e1014;
  --ink-soft:   #171a20;
  --ink-line:   #2a2f38;
  --paper:      #ffffff;
  --sand:       #f6f5f2;
  --line:       #e6e4df;
  --text:       #14171c;
  --muted:      #6b7280;
  --accent:     #d2603a;
  --accent-dk:  #b84f2c;
  --accent-sft: #fbeee8;

  --radius:     18px;
  --radius-sm:  12px;
  --gap:        20px;
  --maxw:       1120px;

  --shadow:     0 1px 2px rgba(16,24,40,.05), 0 12px 32px -16px rgba(16,24,40,.18);

  color-scheme: light;
}

* { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--paper);
  overflow-x: hidden;              /* никакого горизонтального скролла */
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
p  { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }

a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 20px;
}
.container--narrow { max-width: 760px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: #fff; padding: 12px 18px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

.note-mark { color: var(--muted); font-weight: 400; }

/* ------------------------------------------------------------- кнопки */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 600; letter-spacing: .01em;
  padding: 14px 24px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, transform .12s ease, border-color .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dk); }

.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #000; }

.btn--ghost {
  background: transparent; color: var(--muted); border-color: var(--line);
  padding: 11px 18px; font-weight: 500;
}
.btn--ghost:hover { color: var(--text); border-color: #cfccc5; }

.btn--lg  { padding: 17px 30px; font-size: 17px; }
.btn--block { display: flex; width: 100%; }

.btn[disabled] { opacity: .6; cursor: default; }

:where(button, a, input, select, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ------------------------------------------------------------- шапка */

.topbar {
  background: var(--ink);
  color: #fff;
  padding: 14px 0;
}
.topbar__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo__mark {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  background: linear-gradient(135deg, var(--accent) 0%, #e8a06f 100%);
}
.logo__text { font-weight: 700; letter-spacing: .04em; font-size: 16px; }

.topbar__loc {
  font-size: 13px; color: #9aa3af; letter-spacing: .06em; text-transform: uppercase;
}

/* ------------------------------------------------------------- hero */

/* Первый экран держим компактным: кнопка подбора должна попадать
   в видимую область даже в невысоком окне (проверено на 614x632). */
.hero {
  background: var(--ink);
  color: #fff;
  padding: 26px 0 0;
  position: relative;
}
.hero__inner { padding-bottom: 24px; }

.hero__eyebrow {
  font-size: 11px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--accent); font-weight: 600; margin-bottom: 12px;
}

.hero__title {
  font-size: clamp(27px, 6.4vw, 54px);
  line-height: 1.12;
  margin-bottom: 12px;
}

.hero__subtitle {
  font-size: clamp(15px, 3.6vw, 19px);
  color: #b9c0ca;
  max-width: 54ch;
  margin-bottom: 18px;
}

.hero__points {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 18px;
}
.hero__points li {
  font-size: 13px; color: #e4e7eb;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 7px 14px;
  background: rgba(255,255,255,.03);
}

.hero__price { font-size: 15px; color: #9aa3af; margin-bottom: 16px; }
.hero__price strong { color: #fff; font-size: 20px; font-weight: 700; letter-spacing: -.01em; }

.hero__cta { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.hero__cta .btn { width: 100%; }
.hero__hint { font-size: 14px; color: #8b93a0; }

.hero__disclaimer { margin-top: 14px; font-size: 11px; color: #6f7784; }

.hero__media {
  height: 130px;
  background:
    linear-gradient(180deg, rgba(14,16,20,0) 0%, rgba(14,16,20,.75) 100%),
    url("../img/sheregesh-winter-sm.webp") center/cover no-repeat;
  border-top: 1px solid var(--ink-line);
}

/* совсем низкое окно — ужимаем ещё */
@media (max-height: 640px) {
  .hero { padding-top: 18px; }
  .hero__eyebrow { display: none; }
  .hero__title { font-size: clamp(25px, 5.8vw, 44px); }
  .hero__points { margin-bottom: 14px; }
  .hero__price { margin-bottom: 12px; }
}

/* ------------------------------------------------------------- квиз */

.quiz {
  background: var(--sand);
  padding: 28px 0 44px;
  scroll-margin-top: 0;
}
.quiz__container { padding-inline: 14px; }

.quiz__card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px 18px;
  max-width: 720px;
  margin-inline: auto;
}

.quiz__progress { margin-bottom: 22px; }
.quiz__progress-head {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-bottom: 10px;
}
.quiz__step-label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.quiz__percent    { font-size: 13px; font-weight: 700; color: var(--accent); }

.progress {
  height: 6px; border-radius: 999px; background: #eceae5; overflow: hidden;
}
.progress__bar {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, #e89a6d 100%);
  transition: width .32s cubic-bezier(.4,0,.2,1);
}

.quiz__title {
  font-size: clamp(22px, 5.4vw, 30px);
  margin-bottom: 16px;
}
.quiz__subtitle { font-size: 19px; margin: 26px 0 14px; }
.quiz__lead  { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.quiz__text  { color: #4b5563; margin-bottom: 14px; }

.quiz__screen { animation: fade .26s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* варианты ответа */
.options { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: left;
  padding: 16px 18px;
  font: inherit; color: var(--text);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
  -webkit-tap-highlight-color: transparent;
}
.option:hover { border-color: var(--accent); background: #fffdfc; }
.option:active { transform: scale(.995); }

.option__dot {
  width: 22px; height: 22px; flex: none;
  border-radius: 50%; border: 2px solid #d6d3cc;
  position: relative;
  transition: border-color .15s ease;
}
.option:hover .option__dot { border-color: var(--accent); }

.option[aria-pressed="true"] { border-color: var(--accent); background: var(--accent-sft); }
.option[aria-pressed="true"] .option__dot { border-color: var(--accent); }
.option[aria-pressed="true"] .option__dot::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent);
}
.option__label { font-size: 16px; font-weight: 500; }

/* подвал квиза */
.quiz__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 22px; padding-top: 16px; border-top: 1px solid var(--line);
}
.quiz__foot[hidden] { display: none; }

.quiz__dots { display: inline-flex; gap: 6px; }
.quiz__dots i {
  width: 7px; height: 7px; border-radius: 50%; background: #ddd9d2; display: block;
}
.quiz__dots i.is-done { background: var(--accent); }

/* сводка ответов */
.summary { margin: 0 0 20px; display: grid; gap: 1px; background: var(--line);
           border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.summary > div { background: var(--paper); padding: 13px 16px;
                 display: flex; flex-wrap: wrap; gap: 4px 12px; justify-content: space-between; }
.summary dt { font-size: 13px; color: var(--muted); }
.summary dd { margin: 0; font-size: 15px; font-weight: 600; text-align: right; }
.summary--compact { margin-top: 18px; }

/* форма */
.form { margin-top: 6px; }
.field { margin-bottom: 16px; }
.field__label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.field__input {
  width: 100%;
  padding: 16px 18px;
  font: inherit; font-size: 16px;            /* 16px — iOS не зумит при фокусе */
  color: var(--text);
  background: #fbfaf8;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  transition: border-color .15s ease, background-color .15s ease;
}
.field__input:focus { outline: none; border-color: var(--accent); background: #fff; }
.field__input.is-invalid { border-color: #d14343; background: #fff7f7; }
.field__error, .form__error { color: #c0392b; font-size: 13px; margin-top: 7px; }
.form__error { margin-top: 12px; text-align: center; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.consent {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--muted); line-height: 1.45;
  margin: 4px 0 18px; cursor: pointer;
}
.consent input { margin: 2px 0 0; width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.consent a { color: var(--accent); }

/* экран «готово» */
.quiz__screen--done { text-align: center; padding: 10px 0 6px; }
.done__icon { color: var(--accent); display: flex; justify-content: center; margin-bottom: 16px; }
.quiz__screen--done .summary dd { text-align: right; }
.quiz__screen--done .summary > div { text-align: left; }

/* ------------------------------------------------------------- секции */

.section { padding: 56px 0; }
.section--sand { background: var(--sand); }

.section__title { font-size: clamp(25px, 6.2vw, 38px); margin-bottom: 14px; }
.section__lead  { color: var(--muted); font-size: 17px; max-width: 58ch; margin-bottom: 30px; }

.grid { display: grid; gap: var(--gap); }
.grid--2 { grid-template-columns: 1fr; }
.grid--4 { grid-template-columns: 1fr; }

.tile {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.tile__title { font-size: 18px; margin-bottom: 8px; }
.tile__text  { color: var(--muted); font-size: 15px; }

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.card__kicker {
  font-size: 11px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin: 18px 0 6px;
}
.card__title { font-size: 26px; margin-bottom: 14px; }
.card__list { margin-bottom: 22px; display: flex; flex-direction: column; gap: 9px; }
.card__list li {
  color: #4b5563; font-size: 15px; padding-left: 20px; position: relative;
}
.card__list li::before {
  content: ""; position: absolute; left: 0; top: 9px;
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
}
.card__list strong { color: var(--text); font-size: 17px; }
.card .btn { margin-top: auto; }

.media {
  margin: 0; border-radius: var(--radius-sm); overflow: hidden; background: #ece9e3;
  aspect-ratio: 8 / 5;
}
.media img { width: 100%; height: 100%; object-fit: cover; }
.media--wide { margin-top: 30px; aspect-ratio: 2 / 1; border-radius: var(--radius); }

.disclaimer { margin-top: 22px; font-size: 13px; color: var(--muted); }

/* таблица сравнения */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
}
.compare { border-collapse: collapse; width: 100%; min-width: 560px; font-size: 15px; }
.compare th, .compare td { padding: 15px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.compare thead th {
  font-size: 12px; text-transform: uppercase; letter-spacing: .07em;
  color: var(--muted); background: #fbfaf8; font-weight: 600;
}
.compare tbody th {
  font-weight: 600; color: var(--text); width: 210px;
  background: #fbfaf8; position: sticky; left: 0;
}
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare td { color: #4b5563; }

/* FAQ */
.faq {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 10px;
  overflow: hidden;
}
.faq__q {
  padding: 18px 50px 18px 20px;
  font-size: 16px; font-weight: 600; cursor: pointer;
  list-style: none; position: relative;
}
.faq__q::-webkit-details-marker { display: none; }
.faq__q::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 22px; font-weight: 400; color: var(--accent); line-height: 1;
}
.faq[open] .faq__q::after { content: "–"; }
.faq__a { padding: 0 20px 18px; color: var(--muted); font-size: 15px; display: grid; gap: 10px; }

/* финальный CTA */
.final { background: var(--ink); color: #fff; padding: 64px 0; text-align: center; }
.final__title { font-size: clamp(26px, 6.4vw, 40px); margin-bottom: 14px; }
.final__text  { color: #b9c0ca; margin-bottom: 28px; }
.final__inner .btn { width: 100%; max-width: 360px; }

/* подвал */
.footer { background: var(--ink-soft); color: #9aa3af; padding: 36px 0; font-size: 14px; }
.footer__inner { display: grid; gap: 18px; }
.footer__logo { color: #fff; font-weight: 700; letter-spacing: .04em; margin-bottom: 4px; }
.footer__links { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer__links a { color: #c7ccd3; text-decoration: underline; text-underline-offset: 3px; }
.footer__legal a { color: #c7ccd3; }
.footer__legal { font-size: 12px; color: #6f7784; max-width: 64ch; }

/* ------------------------------------------------------- планшет/десктоп */

@media (min-width: 640px) {
  .grid--2 { grid-template-columns: 1fr 1fr; }
  .grid--4 { grid-template-columns: 1fr 1fr; }
  .hero__cta { flex-direction: row; align-items: center; gap: 20px; }
  .hero__cta .btn { width: auto; }
  .quiz__card { padding: 30px 32px 24px; }
  .card { padding: 22px; }
  .option { padding: 18px 22px; }
}

@media (min-width: 900px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
  .hero { padding-top: 64px; }
  .hero__inner { padding-bottom: 56px; max-width: 760px; }
  .hero__title { max-width: 16ch; }
  .hero__media {
    height: 260px;
    background-image:
      linear-gradient(180deg, rgba(14,16,20,0) 0%, rgba(14,16,20,.75) 100%),
      url("../img/sheregesh-winter.webp");
  }
  .section { padding: 84px 0; }
  .quiz { padding: 44px 0 64px; }
  .compare { min-width: 0; }
}

@media (min-width: 1100px) {
  .hero { padding-bottom: 0; }
  .hero__media { height: 300px; }
}

/* --------------------------------------------------- доступность/печать */

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