/* ===== Радуга маркет — стили ===== */
:root {
  /* цвета логотипа */
  --red: #dd3130;
  --orange: #f5892d;
  --yellow: #fbcf38;
  --green: #339d47;
  --blue: #3ba3dd;
  --black: #222222;
  --purple: #7445ab;

  --text: #1d1d1f;
  --muted: #62646a;
  --line: #e7e7ea;
  --bg: #ffffff;
  --bg-soft: #f6f6f8;
  --radius: 14px;
  --container: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: "Manrope", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

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

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

/* полоска цветов логотипа */
.rainbow {
  height: 4px;
  background: linear-gradient(90deg,
    var(--red) 0 14.28%, var(--orange) 0 28.57%, var(--yellow) 0 42.85%,
    var(--green) 0 57.14%, var(--blue) 0 71.42%, var(--black) 0 85.71%, var(--purple) 0);
}

/* ===== шапка ===== */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.header__inner { display: flex; align-items: center; gap: 24px; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 20px; letter-spacing: -.01em; }
.logo img { width: 40px; height: 40px; }
.nav { display: flex; gap: 28px; margin-left: auto; }
.nav a { text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; transition: color .2s; }
.nav a:hover, .nav a.active { color: var(--text); }
.header__phone { text-decoration: none; font-weight: 700; font-size: 15px; white-space: nowrap; }
.burger { display: none; margin-left: auto; width: 44px; height: 44px; border: 0; background: none; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; margin: 5px auto; background: var(--text); transition: .2s; }

/* ===== кнопки ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 12px; border: 2px solid var(--black);
  background: var(--black); color: #fff; font: inherit; font-weight: 700; font-size: 16px;
  text-decoration: none; cursor: pointer; transition: transform .15s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-1px); background: #000; }
.btn--light { background: transparent; color: var(--text); }
.btn--light:hover { background: var(--bg-soft); }
.btn--sm { padding: 10px 18px; font-size: 15px; }
.btn:disabled { opacity: .6; cursor: default; transform: none; }

/* ===== секции ===== */
.section { padding: 80px 0; }
.section--soft { background: var(--bg-soft); }
.section__title { font-size: clamp(26px, 3.4vw, 36px); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; margin-bottom: 14px; }
.section__lead { color: var(--muted); max-width: 640px; margin-bottom: 40px; }

/* главный экран */
.hero { padding: 90px 0 80px; }
.hero__inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hero__badge { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--bg-soft); font-size: 14px; font-weight: 600; color: var(--muted); margin-bottom: 20px; }
.hero h1 { font-size: clamp(32px, 5vw, 54px); line-height: 1.1; font-weight: 800; letter-spacing: -.03em; margin-bottom: 20px; }
.hero p { font-size: 19px; color: var(--muted); max-width: 560px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__logo { justify-self: center; width: min(100%, 360px); }

/* заголовок внутренних страниц */
.page-head { padding: 64px 0 24px; }
.page-head h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.15; font-weight: 800; letter-spacing: -.02em; margin-bottom: 12px; }
.page-head p { color: var(--muted); font-size: 19px; max-width: 680px; }

/* карточки */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.section--soft .card { border-color: transparent; }
.card__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 18px; color: #fff; font-weight: 800; }
.card h3 { font-size: 19px; line-height: 1.3; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 16px; }

.c-red { background: var(--red); }
.c-orange { background: var(--orange); }
.c-yellow { background: var(--yellow); color: var(--text) !important; }
.c-green { background: var(--green); }
.c-blue { background: var(--blue); }
.c-black { background: var(--black); }
.c-purple { background: var(--purple); }

/* шаги */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: step; }
.step { position: relative; padding-top: 56px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: 0; left: 0; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; background: var(--black); color: #fff;
}
.step h3 { font-size: 18px; margin-bottom: 6px; }
.step p { color: var(--muted); font-size: 16px; }

/* текстовые блоки */
.text { max-width: 760px; }
.text p { margin-bottom: 16px; }
.text h2 { font-size: 24px; margin: 36px 0 12px; }
.text ul { margin: 0 0 16px 22px; }
.text li { margin-bottom: 6px; }

/* призыв к действию */
.cta { background: var(--black); color: #fff; border-radius: 24px; padding: 56px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; position: relative; overflow: hidden; }
.cta .rainbow { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; }
.cta h2 { font-size: clamp(24px, 3vw, 32px); line-height: 1.2; margin-bottom: 8px; }
.cta p { color: #c9c9cf; }
.cta .btn { background: #fff; color: var(--black); border-color: #fff; }

/* контакты */
.contacts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.contact { display: block; text-decoration: none; padding: 28px; border-radius: var(--radius); border: 1px solid var(--line); transition: border-color .2s, transform .15s; }
.contact:hover { border-color: var(--text); transform: translateY(-2px); }
.contact__label { color: var(--muted); font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.contact__value { font-size: 20px; font-weight: 700; word-break: break-word; }

/* ===== форма ===== */
.form-wrap { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; align-items: start; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 700; }
.field label .req { color: var(--red); }
.field input, .field textarea {
  font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid #d5d5da; border-radius: 10px;
  background: #fff; color: var(--text); transition: border-color .2s, box-shadow .2s;
}
.field textarea { min-height: 130px; resize: vertical; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,163,221,.2); }
.field input.invalid, .field textarea.invalid { border-color: var(--red); }
.check { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; accent-color: var(--black); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form__actions { grid-column: 1 / -1; }
.form__msg { grid-column: 1 / -1; padding: 14px 16px; border-radius: 10px; font-weight: 600; display: none; }
.form__msg.ok { display: block; background: #e8f5eb; color: #1f6b30; }
.form__msg.err { display: block; background: #fdeaea; color: #a32323; }
.aside { background: var(--bg-soft); border-radius: var(--radius); padding: 28px; }
.aside h3 { font-size: 19px; margin-bottom: 12px; }
.aside ol { margin-left: 20px; color: var(--muted); }
.aside li { margin-bottom: 8px; }
.aside .contact-line { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 15px; }
.aside .contact-line a { font-weight: 700; text-decoration: none; }

/* ===== подвал ===== */
.footer { border-top: 1px solid var(--line); padding: 40px 0 28px; font-size: 15px; color: var(--muted); }
.footer__inner { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; }
.footer__links, .footer__contacts { display: flex; flex-direction: column; gap: 6px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--text); }
.footer__bottom { margin-top: 28px; font-size: 13px; }

/* ===== адаптив ===== */
@media (max-width: 960px) {
  .hero__inner, .form-wrap { grid-template-columns: 1fr; }
  .hero__logo { display: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .header__phone { display: none; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .section { padding: 56px 0; }
  .hero { padding: 56px 0; }
  .burger { display: block; }
  .header .btn { display: none; }
  .nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 20px 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 17px; border-bottom: 1px solid var(--line); }
  .nav .nav__cta { display: block; color: var(--text); font-weight: 800; border-bottom: 0; }
  .form { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .cta { padding: 36px 24px; }
}

@media (min-width: 761px) { .nav .nav__cta { display: none; } }
