/* ===== Шрифты (раздаются с вашего сервера) ===== */
@font-face { font-family: "Montserrat"; font-weight: 500 800; font-style: normal; font-display: swap; src: url("../fonts/Montserrat.woff") format("woff"); }
@font-face { font-family: "Onest"; font-weight: 400 700; font-style: normal; font-display: swap; src: url("../fonts/Onest.woff") format("woff"); }

/* ===== Токены бренда GRITZ =====
   Тёмно-синий — основа, красный — единственный акцент (кнопки, выделение, красный квадрат логотипа).
   Красный не используется для мелкого текста на тёмном фоне: там он не проходит по контрасту. */
:root {
  --navy: #081937;
  --navy-2: #0f2550;
  --red: #de1123;
  --red-deep: #b50d1c;
  --ink: var(--navy);
  --muted: #545b6e;
  --line: #e1e5ee;
  --line-strong: #c3c9d6;
  --soft: #f3f5f9;
  --bg: #ffffff;
  --on-navy: rgba(255, 255, 255, .86);

  --display: "Montserrat", "Onest", system-ui, sans-serif;
  --font: "Onest", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r: 12px;
  --r-btn: 4px;
  --maxw: 1320px;
  --wide: 1320px;
  --gut: clamp(16px, 4vw, 40px);
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; color-scheme: light; scrollbar-color: var(--navy) var(--soft); scrollbar-width: thin; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.55; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: hidden; caret-color: var(--red); }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: var(--red); color: #fff; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; border-radius: 4px; }
.board :focus-visible, .topbar :focus-visible, .close :focus-visible { outline-color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--soft); }
::-webkit-scrollbar-thumb { background: var(--navy); border-radius: 10px; border: 2px solid var(--soft); }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

.wrap { width: min(var(--wide), 100% - 2 * var(--gut)); margin-inline: auto; }
.container { width: min(var(--maxw), 100% - 2 * var(--gut)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ===== Шапка: всегда тёмно-синяя, с логотипом ===== */
.topbar { position: fixed; z-index: 50; top: 0; left: 0; right: 0; padding-top: env(safe-area-inset-top, 0px); background: var(--navy); color: #fff; transform: translateZ(0); }
.topbar__inner { width: min(var(--wide), 100% - 2 * var(--gut)); margin-inline: auto; height: 68px; display: flex; align-items: center; gap: 28px; }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand img { height: 34px; width: auto; }
.topbar__nav { margin-left: auto; display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.topbar__nav a { position: relative; padding: 6px 0; }
.topbar__nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--red); transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.topbar__nav a:hover::after { transform: scaleX(1); }
.topbar__cta { flex: none; display: inline-flex; align-items: center; height: 42px; padding: 0 20px; border-radius: var(--r-btn); background: var(--red); color: #fff; font-size: 14px; font-weight: 600; transition: background-color .2s, transform .25s var(--ease); }
.topbar__cta:hover { background: var(--red-deep); }
.topbar__cta:active { transform: scale(.97); }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; display: none; }
.has-progress .progress { display: block; }
.progress i { display: block; height: 100%; background: var(--red); transform: scaleX(0); transform-origin: 0 50%; }

/* ===== Кнопки ===== */
.btn { display: inline-flex; align-items: center; gap: 12px; min-height: 52px; padding: 14px 22px; border-radius: var(--r-btn); font-size: 16px; font-weight: 600; line-height: 1.3; border: 1.5px solid transparent; transition: transform .25s var(--ease), background-color .2s, border-color .2s, color .2s; }
.btn svg { flex: none; }
.btn span { flex: 1; }
.btn i { display: inline-flex; font-style: normal; transition: transform .3s var(--ease); }
.btn:hover i { transform: translateX(4px); }
.btn:active { transform: scale(.98); }
.btn--red { background: var(--red); color: #fff; }
.btn--red:hover { background: var(--red-deep); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--soft); }
.btn--ink { background: var(--navy); color: #fff; }
.btn--ink:hover { background: var(--red); }
.btn--line { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--line:hover { background: rgba(255, 255, 255, .12); border-color: #fff; }

/* ===== Тёмный фон блоков бренда ===== */
.board { background-color: var(--navy); color: #fff; }

/* ===== Консультация ===== */
.close { position: relative; overflow: hidden; margin-top: clamp(72px, 9vw, 128px); padding: clamp(56px, 8vw, 112px) 0; }
.close__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: start; position: relative; z-index: 1; }
.close h2 { font-family: var(--display); font-weight: 800; font-size: clamp(34px, 5.2vw, 72px); line-height: 1.04; letter-spacing: -.02em; text-wrap: balance; }
.close__text > p, .close h2 + p, .close .cta-lead { margin-top: 24px; max-width: 34em; font-size: 17px; line-height: 1.6; color: var(--on-navy); text-wrap: pretty; }

.close__panel { position: relative; margin-top: 28px; }
.req { background: #fff; color: var(--navy); border-radius: var(--r); padding: clamp(20px, 2.6vw, 32px); }
.req__head { padding-right: 92px; }
.req__title { font-family: var(--display); font-weight: 800; font-size: clamp(22px, 2.2vw, 28px); line-height: 1.15; letter-spacing: -.02em; }
.req__sub { margin-top: 6px; font-size: 15px; line-height: 1.5; color: var(--muted); }
.req__topic { margin-top: 16px; padding: 10px 14px; border-radius: var(--r-btn); background: var(--soft); font-size: 14px; line-height: 1.4; box-shadow: inset 0 0 0 1px var(--line-strong); }
.req__topic b { font-weight: 700; }
.req__form { margin-top: 20px; display: grid; gap: 16px; }
.req__lab { display: block; margin-bottom: 6px; padding: 0; font-size: 13.5px; font-weight: 600; line-height: 1.3; }
.req input[type="text"] { display: block; width: 100%; height: 52px; padding: 0 14px; border: 1.5px solid var(--navy); border-radius: var(--r-btn); background: #fff; color: var(--navy); font: inherit; font-size: 16px; caret-color: var(--red); transition: box-shadow .2s; }
.req input[type="text"]::placeholder { color: #667087; }
.req input[type="text"]:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.req input[aria-invalid="true"] { border-color: var(--red-deep); box-shadow: inset 0 0 0 1px var(--red-deep); }
.req__channels { margin: 0; padding: 0; border: 0; min-width: 0; }
.req__opts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.req__opt { position: relative; display: block; }
.req__opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.req__opt span { display: grid; place-items: center; min-height: 48px; padding: 6px 4px; border: 1.5px solid var(--navy); border-radius: var(--r-btn); font-size: 14.5px; font-weight: 600; line-height: 1.2; text-align: center; transition: background-color .2s, color .2s; }
.req__opt:hover span { background: var(--soft); }
.req__opt input:checked + span { background: var(--navy); color: #fff; }
.req__opt input:focus-visible + span { outline: 3px solid var(--red); outline-offset: 2px; }
.req__trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.req__send { width: 100%; }
.req__send:disabled { opacity: .6; cursor: progress; }
.req__legal { margin: -4px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.req__status { min-height: 0; font-size: 14px; line-height: 1.45; font-weight: 600; }
.req__status:empty { display: none; }
.req__status.is-error { color: var(--red-deep); }
.req__done { margin-top: 20px; padding: 18px 20px; border-radius: var(--r-btn); background: var(--soft); box-shadow: inset 0 0 0 1.5px var(--navy); }
.req__done b { display: block; font-family: var(--display); font-weight: 800; font-size: 20px; }
.req__done p { margin-top: 6px; font-size: 15px; line-height: 1.5; color: #2b3144; }
.req__or { margin: 20px 0 14px; display: flex; align-items: center; gap: 14px; font-size: 14px; color: var(--muted); }
.req__or::before, .req__or::after { content: ""; flex: 1; height: 1px; background: var(--line-strong); }
.req__tg { width: 100%; }
.cta-opts { margin-top: 32px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 46em; }
.cta-opt { padding: 18px 20px; border-radius: var(--r); background: rgba(255, 255, 255, .08); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); }
.cta-opt b { display: block; font-size: 16px; font-weight: 600; }
.cta-opt span { display: block; margin-top: 6px; font-size: 14px; line-height: 1.5; color: var(--on-navy); }
.close .cta-meta { margin-top: 24px; font-size: 13.5px; color: var(--on-navy); }
.close__legal { position: relative; z-index: 1; margin-top: clamp(32px, 4vw, 56px); max-width: 52em; font-size: 13.5px; line-height: 1.55; color: var(--on-navy); }

/* ===== Подвал ===== */
.footer { padding: 56px 0 36px; }
.footer__inner { display: grid; grid-template-columns: 1.4fr .9fr 1.1fr .9fr; gap: 40px; }
.footer .brand { margin-bottom: 16px; }
.footer__brand p { max-width: 24em; font-size: 15px; color: var(--muted); }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font-family: var(--display); font-size: 14px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px; }
.footer__col a { font-size: 15px; width: fit-content; background: linear-gradient(var(--red), var(--red)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.footer__col a:hover { background-size: 100% 1.5px; }
.footer__legal { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* ===== Появление блоков при прокрутке (контент виден по умолчанию) ===== */
.js .rv { opacity: 0; transform: translateY(16px); }
.js .rv.in { opacity: 1; transform: none; transition: opacity .7s var(--ease) var(--rd, 0ms), transform .7s var(--ease) var(--rd, 0ms); }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translate(-50%, 12px); width: max-content; max-width: calc(100% - 32px); padding: 12px 18px; border-radius: var(--r-btn); background: var(--navy); color: #fff; font-size: 14px; line-height: 1.4; opacity: 0; pointer-events: none; transition: opacity .3s, transform .4s var(--ease); z-index: 80; }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .topbar__nav { display: none; }
  .topbar__cta { margin-left: auto; }
  .close__grid { grid-template-columns: minmax(0, 1fr); }
  .cta-opts { grid-template-columns: 1fr; }
  .footer__inner { grid-template-columns: 1fr 1fr; }
  .footer__brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .req__opts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar__inner { height: 60px; }
  .brand img { height: 30px; }
  .topbar__cta { height: 40px; padding: 0 16px; }
  .footer__inner { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
