/* ==========================================================================
   quality.energo24.ru — анкета оценки качества
   Палитра взята с energo24.ru: зелёный #26a65b, ховер #2cbf69, акцент #f9690e.
   ========================================================================== */

:root {
    --green:        #26a65b;
    --green-hover:  #2cbf69;
    --green-dark:   #1e8a4b;
    --green-soft:   #eaf7f0;
    --orange:       #f9690e;

    --text:         #2b3033;
    --text-soft:    #5c656b;
    --muted:        #8b9298;
    --line:         #e3e6e8;
    --line-soft:    #eff1f2;
    --bg:           #f5f7f8;
    --card:         #ffffff;
    --danger:       #d64545;

    --radius:       10px;
    --wrap:         760px;
    --shadow:       0 1px 2px rgba(16,24,32,.05), 0 8px 28px rgba(16,24,32,.06);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
            Arial, "Liberation Sans", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--green-dark); text-decoration: none; }
a:hover { color: var(--green-hover); text-decoration: underline; }

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

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

.hdr {
    background: #fff;
    border-bottom: 3px solid var(--green);
}
.hdr__in {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-top: 14px;
    padding-bottom: 14px;
}
.hdr__logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.hdr__logo:hover { text-decoration: none; }
.hdr__logo img { display: block; border-radius: 6px; }
.hdr__logo-txt { display: flex; flex-direction: column; line-height: 1.25; }
.hdr__logo-txt b { font-size: 20px; color: var(--text); letter-spacing: -.01em; }
.hdr__logo-txt i { font-style: normal; font-size: 13px; color: var(--muted); }

.hdr__phones { text-align: right; line-height: 1.4; }
.hdr__phones a {
    display: block;
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}
.hdr__phones a:hover { color: var(--green); text-decoration: none; }
.hdr__worktime { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ------------------------------------------------------------------ текст */

.main { padding-top: 36px; padding-bottom: 56px; }

.page-title {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -.02em;
}

.lead {
    margin: 0 0 24px;
    font-size: 18px;
    color: var(--text-soft);
}
.lead p { margin: 0 0 8px; }
.lead p:last-child { margin-bottom: 0; }

/* -------------------------------------------------- островок одного вопроса */

.card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 26px 32px 28px;
    margin-bottom: 16px;
}

.q__title {
    margin: 0 0 4px;
    font-size: 20px;
    line-height: 1.4;
    font-weight: 600;
    letter-spacing: -.01em;
}

/* Пометка «необязательный» — приглушённая, чтобы не спорить с самим вопросом. */
.q__opt {
    display: inline-block;
    margin-left: 10px;
    vertical-align: 2px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .02em;
    white-space: nowrap;
    color: var(--muted);
    background: #f2f4f5;
    padding: 2px 9px;
    border-radius: 20px;
}

/* ------------------------------------------------------ шкала 1..10 */

.scale {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 8px;
    margin: 18px 0 8px;
}

.scale__item { position: relative; display: block; cursor: pointer; }

/* Сам radio невидим, но остаётся фокусируемым и работает со стрелками. */
.scale__item input {
    position: absolute;
    width: 1px; height: 1px;
    opacity: 0;
    margin: 0;
    pointer-events: none;
}

.scale__dot {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 52px;
    border: 2px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-soft);
    transition: background .12s, border-color .12s, color .12s, transform .08s;
    user-select: none;
}

.scale__item:hover .scale__dot { border-color: var(--green); color: var(--green-dark); }
.scale__item:active .scale__dot { transform: scale(.94); }

.scale__item input:checked + .scale__dot {
    background: var(--green);
    border-color: var(--green);
    color: #fff;
}
.scale__item input:focus-visible + .scale__dot {
    outline: 3px solid rgba(38,166,91,.35);
    outline-offset: 2px;
}

.scale__legend {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--muted);
}

/* ------------------------------------------------------------------ поля */

.mt { margin-top: 20px; }

input[type="text"], textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 16.5px;
    line-height: 1.5;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    transition: border-color .12s, box-shadow .12s;
}
textarea { resize: vertical; min-height: 118px; }

/* Подсказка внутри поля несёт смысл, поэтому чуть контрастнее обычного placeholder. */
input[type="text"]::placeholder, textarea::placeholder { color: #99a1a7; }
textarea::placeholder { line-height: 1.55; }

input[type="text"]:hover, textarea:hover { border-color: #cbd1d5; }
input[type="text"]:focus, textarea:focus {
    outline: none;
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(38,166,91,.15);
}

.err { margin: 10px 0 0; font-size: 14px; color: var(--danger); font-weight: 500; }

.scale.is-invalid .scale__dot { border-color: #f0bcbc; }

/* --------------------------------------------- переход к вопросам 2 и 3 */

.bridge {
    margin: 0 0 22px;
    padding: 16px 20px;
    background: var(--green-soft);
    border-left: 4px solid var(--green);
    border-radius: 0 8px 8px 0;
    font-size: 16.5px;
    color: #22513a;
}
.bridge p { margin: 0 0 8px; }
.bridge p:last-child { margin-bottom: 0; }

.rule { border: 0; border-top: 1px solid var(--line-soft); margin: 0; }

/* ------------------------------------------------------------------ кнопка */

.submit { padding-top: 12px; text-align: center; }

.btn {
    display: inline-block;
    min-width: 260px;
    padding: 15px 34px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    background: var(--green);
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, box-shadow .15s, transform .08s;
    box-shadow: 0 2px 8px rgba(38,166,91,.28);
}
.btn:hover:not(:disabled) { background: var(--green-hover); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(38,166,91,.4); outline-offset: 2px; }
.btn:disabled { background: #c3c9cd; box-shadow: none; cursor: not-allowed; }

.btn--ghost {
    min-width: 160px;
    padding: 11px 26px;
    font-size: 16px;
    background: #fff;
    color: var(--green-dark);
    border: 1px solid var(--green);
    box-shadow: none;
}
.btn--ghost:hover:not(:disabled) { background: var(--green-soft); }

.submit__note {
    margin: 12px 0 0;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.5;
}

.form-msg {
    margin: 14px auto 0;
    max-width: 480px;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 15px;
    background: #fdecec;
    color: #9c2b2b;
}
.form-msg.is-info { background: #eef4f8; color: #38566b; }

.privacy {
    margin: 20px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: var(--muted);
}

/* Ловушка для ботов. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ------------------------------------------------------------------ подвал */

.ftr { background: #fff; border-top: 1px solid var(--line); font-size: 15px; color: var(--text-soft); }
.ftr__in { display: flex; gap: 48px; padding-top: 32px; padding-bottom: 28px; flex-wrap: wrap; }
.ftr__col { flex: 1 1 240px; }
.ftr__h { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text); margin-bottom: 10px; }
.ftr__col p { margin: 0 0 12px; line-height: 1.6; }
.ftr__col a { color: var(--text-soft); }
.ftr__col a:hover { color: var(--green); }
.ftr__bottom { border-top: 1px solid var(--line-soft); padding: 14px 0; font-size: 13px; color: var(--muted); }

/* ------------------------------------------------------------------ модалка */

.modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(20,28,34,.55); animation: fade .2s ease; }

.modal__box {
    position: relative;
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 14px;
    padding: 38px 34px 26px;
    text-align: center;
    box-shadow: 0 24px 60px rgba(10,18,24,.28);
    animation: pop .22s cubic-bezier(.2,.8,.3,1);
}
.modal__icon { color: var(--green); margin-bottom: 12px; }
.modal__box h2 { margin: 0 0 20px; font-size: 24px; font-weight: 700; }
.modal__box p { margin: 0 0 20px; color: var(--text-soft); font-size: 16px; }

.modal__x {
    position: absolute; top: 10px; right: 12px;
    width: 40px; height: 40px;
    border: 0; background: none;
    font-size: 30px; line-height: 1; color: var(--muted);
    cursor: pointer; border-radius: 8px;
}
.modal__x:hover { background: #f2f4f5; color: var(--text); }
.modal__x:focus-visible { outline: 3px solid rgba(38,166,91,.4); outline-offset: -2px; }

.contact {
    margin: 0 0 22px;
    padding: 18px 16px 16px;
    background: var(--green-soft);
    border-radius: 10px;
}
.contact__lead {
    margin: 0 0 10px !important;
    font-size: 14.5px;
    line-height: 1.5;
    color: #35604a;
    /* Выравнивает длину строк, чтобы в конце не повисало одинокое слово.
       Браузеры без поддержки просто переносят как обычно. */
    text-wrap: balance;
}
.contact__phone {
    display: inline-block;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--green-dark);
    text-decoration: none;
    white-space: nowrap;
}
.contact__phone:hover { color: var(--green-hover); text-decoration: none; }
.contact__hint { margin: 2px 0 0 !important; font-size: 13.5px; color: #5d7a6b; }

@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop  { from { opacity: 0; transform: translateY(14px) scale(.97) } to { opacity: 1; transform: none } }

@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ------------------------------------------------------------------ мобильные */

@media (max-width: 700px) {
    .hdr__in { flex-wrap: wrap; gap: 10px; }
    .hdr__phones { text-align: left; }
    .hdr__phones a { display: inline-block; margin-right: 14px; font-size: 16px; }
    .hdr__worktime { margin-top: 0; }
}

@media (max-width: 620px) {
    body { font-size: 16px; }
    .wrap { padding: 0 14px; }
    .main { padding-top: 24px; }
    .page-title { font-size: 24px; }
    .lead { font-size: 16.5px; }
    .card { padding: 20px 18px 22px; border-radius: 8px; margin-bottom: 12px; }
    .q__title { font-size: 18px; }
    .q__opt { margin-left: 8px; font-size: 11.5px; }

    /* Шкала в две строки по 5 — точки остаются крупными и не слипаются. */
    .scale { grid-template-columns: repeat(5, 1fr); gap: 10px; }
    .scale__dot { height: 54px; font-size: 19px; }
    /* Шкала в две строки — подписи краёв разносить нечему, ставим их по центру. */
    .scale__legend { justify-content: center; gap: 18px; margin-top: 4px; }

    .bridge { padding: 14px 14px; font-size: 15.5px; margin-bottom: 18px; }
    .contact__phone { font-size: 23px; }
    .btn { width: 100%; min-width: 0; padding: 16px 20px; }
    .ftr__in { gap: 24px; }
    .modal__box { padding: 32px 20px 22px; }
}

@media (max-width: 360px) {
    .scale { gap: 8px; }
    .scale__dot { height: 50px; font-size: 17px; }
}
