/*
|--------------------------------------------------------------------------
| ZQ TEST — публичные страницы: стартовая (index.php) и вход (auth/login.php).
| Vanilla CSS, без внешних шрифтов и библиотек. Адаптивно до 375px.
| Цвета, тени и шрифт — переменные из assets/css/ui.css (подключается раньше).
|--------------------------------------------------------------------------
*/

:root {
    /* Палитра — в assets/css/ui.css (:root, --zq-*). Здесь только псевдонимы публичных страниц. */
    --zq-blue: var(--zq-primary, #2563eb);
    --zq-blue-dark: var(--zq-primary-hover, #1d4ed8);
    --zq-blue-soft: var(--zq-primary-soft, #eff6ff);
    --zq-pub-radius: var(--zq-radius-lg, 16px);
    --zq-pub-radius-lg: var(--zq-radius-xl, 20px);
}

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

html {
    scroll-behavior: smooth;
}

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

.zq a {
    color: inherit;
}

.zq-container {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 0 24px;
}

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


/* ---------- Логотип ---------- */

.zq-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--zq-text);
    text-decoration: none;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.zq-logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, var(--zq-blue) 0%, var(--zq-violet) 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.3);
}


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

.zq-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: var(--zq-blue);
    color: #fff !important;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.zq-btn:hover {
    background: var(--zq-blue-dark);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.25);
}

.zq-btn:active {
    transform: translateY(1px);
}

.zq-btn:focus-visible,
.zq-input:focus-visible,
.zq-nav a:focus-visible,
.zq-faq summary:focus-visible,
.zq-eye:focus-visible,
.zq-burger:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.35);
    outline-offset: 2px;
}

.zq-btn-lg {
    min-height: 52px;
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 14px;
}

.zq-btn-ghost {
    background: var(--zq-surface);
    border-color: var(--zq-border);
    color: var(--zq-text) !important;
}

.zq-btn-ghost:hover {
    background: var(--zq-blue-soft);
    border-color: var(--zq-primary-border, #bfdbfe);
    box-shadow: none;
}

.zq-btn-block {
    width: 100%;
}


/* ---------- Шапка ---------- */

.zq-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255, 255, 255, 0.86);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    -webkit-backdrop-filter: saturate(160%) blur(10px);
    backdrop-filter: saturate(160%) blur(10px);
}

.zq-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
}

.zq-nav {
    display: flex;
    align-items: center;
    gap: 6px;
}

.zq-nav a {
    padding: 8px 14px;
    border-radius: 10px;
    color: var(--zq-muted);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
}

.zq-nav a:hover {
    color: var(--zq-text);
    background: var(--zq-bg);
}

.zq-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.zq-burger {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--zq-border);
    border-radius: 12px;
    background: var(--zq-surface);
    color: var(--zq-text);
    cursor: pointer;
}

.zq-burger svg {
    display: block;
    margin: auto;
}


/* ---------- Hero ---------- */

.zq-hero {
    position: relative;
    overflow: hidden;
    padding: 88px 0 96px;
    background:
        radial-gradient(900px 420px at 85% -10%, rgba(124, 58, 237, 0.12), transparent 60%),
        radial-gradient(800px 480px at 0% 10%, rgba(37, 99, 235, 0.12), transparent 60%),
        linear-gradient(180deg, var(--zq-primary-soft, #eff6ff) 0%, var(--zq-bg) 100%);
}

.zq-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    align-items: center;
    gap: 56px;
}

.zq-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 6px 14px;
    border: 1px solid var(--zq-primary-border, #bfdbfe);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--zq-blue);
    font-size: 13px;
    font-weight: 600;
}

.zq-eyebrow::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--zq-blue);
}

.zq-hero h1 {
    margin: 0 0 20px;
    font-size: 52px;
    line-height: 1.1;
    letter-spacing: -1px;
    font-weight: 800;
}

.zq-hero h1 span {
    background: linear-gradient(90deg, var(--zq-blue), var(--zq-violet));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.zq-hero-text {
    max-width: 540px;
    margin: 0 0 32px;
    color: var(--zq-muted);
    font-size: 18px;
}

.zq-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.zq-hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 28px 0 0;
    padding: 0;
    list-style: none;
    color: var(--zq-muted);
    font-size: 14px;
}

.zq-hero-points li {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.zq-hero-points svg {
    flex: 0 0 auto;
    color: var(--zq-blue);
}


/* Превью экрана тестирования (иллюстрация, не данные) */

.zq-preview {
    padding: 22px;
    border: 1px solid var(--zq-border);
    border-radius: var(--zq-pub-radius-lg);
    background: var(--zq-surface);
    box-shadow: var(--zq-shadow-lg);
}

.zq-preview-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 13px;
    color: var(--zq-muted);
}

.zq-preview-timer {
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--zq-blue-soft);
    color: var(--zq-blue);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.zq-preview-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.zq-preview-tabs span {
    flex: 0 0 auto;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--zq-bg);
    color: var(--zq-muted);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.zq-preview-tabs span.is-active {
    background: var(--zq-text);
    color: #fff;
}

.zq-preview-q {
    margin-bottom: 12px;
    font-weight: 600;
}

.zq-preview-q small {
    display: block;
    margin-bottom: 4px;
    color: var(--zq-muted);
    font-size: 12px;
    font-weight: 500;
}

.zq-option {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
    padding: 11px 14px;
    border: 1px solid var(--zq-border);
    border-radius: 12px;
    font-size: 14px;
}

.zq-option b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--zq-bg);
    font-size: 12px;
}

.zq-option.is-selected {
    border-color: var(--zq-blue);
    background: var(--zq-blue-soft);
}

.zq-option.is-selected b {
    background: var(--zq-blue);
    color: #fff;
}

.zq-preview-map {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-top: 16px;
}

.zq-preview-map span {
    height: 8px;
    border-radius: 4px;
    background: var(--zq-border);
}

.zq-preview-map span.done {
    background: #93c5fd;
}

.zq-preview-map span.now {
    background: var(--zq-blue);
}


/* ---------- Секции ---------- */

.zq-section {
    padding: 96px 0;
}

.zq-section.is-white {
    background: var(--zq-surface);
}

.zq-section-head {
    max-width: 640px;
    margin: 0 auto 48px;
    text-align: center;
}

.zq-section-label {
    display: inline-block;
    margin-bottom: 12px;
    color: var(--zq-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.zq-section-head h2 {
    margin: 0 0 14px;
    font-size: 38px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    font-weight: 800;
}

.zq-section-head p {
    margin: 0;
    color: var(--zq-muted);
    font-size: 17px;
}


/* Карточки возможностей */

.zq-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.zq-feature {
    padding: 28px;
    border: 1px solid var(--zq-border);
    border-radius: var(--zq-pub-radius-lg);
    background: var(--zq-surface);
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.zq-feature:hover {
    border-color: var(--zq-primary-border, #bfdbfe);
    box-shadow: var(--zq-shadow-lg);
    transform: translateY(-2px);
}

.zq-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: 14px;
    background: var(--zq-blue-soft);
    color: var(--zq-blue);
}

.zq-feature h3 {
    margin: 0 0 10px;
    font-size: 19px;
    line-height: 1.3;
}

.zq-feature p {
    margin: 0;
    color: var(--zq-muted);
    font-size: 15px;
}


/* FAQ */

.zq-faq {
    max-width: 800px;
    margin: 0 auto;
}

.zq-faq details {
    margin-bottom: 12px;
    border: 1px solid var(--zq-border);
    border-radius: var(--zq-pub-radius);
    background: var(--zq-surface);
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.zq-faq details[open] {
    border-color: var(--zq-primary-border, #bfdbfe);
    box-shadow: var(--zq-shadow);
}

.zq-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 24px;
    border-radius: var(--zq-pub-radius);
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    list-style: none;
}

.zq-faq summary::-webkit-details-marker {
    display: none;
}

.zq-faq summary::after {
    content: "+";
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--zq-blue-soft);
    color: var(--zq-blue);
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    transition: transform 0.2s ease;
}

.zq-faq details[open] summary::after {
    transform: rotate(45deg);
}

.zq-faq-body {
    padding: 0 24px 22px;
    color: var(--zq-muted);
    font-size: 15px;
}

.zq-faq-body p {
    margin: 0;
}


/* Призыв войти */

.zq-cta {
    padding: 0 0 96px;
}

.zq-cta-box {
    padding: 56px 40px;
    border-radius: 28px;
    background: linear-gradient(135deg, var(--zq-blue) 0%, #4f46e5 55%, var(--zq-violet) 100%);
    color: #fff;
    text-align: center;
    box-shadow: 0 24px 60px rgba(37, 99, 235, 0.25);
}

.zq-cta-box h2 {
    margin: 0 0 12px;
    font-size: 34px;
    line-height: 1.2;
}

.zq-cta-box p {
    margin: 0 0 28px;
    opacity: 0.9;
    font-size: 17px;
}

.zq-cta-box .zq-btn {
    background: #fff;
    color: var(--zq-blue) !important;
}

.zq-cta-box .zq-btn:hover {
    background: #f1f5ff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
}


/* Подвал */

.zq-footer {
    padding: 48px 0 32px;
    border-top: 1px solid var(--zq-border);
    background: var(--zq-surface);
}

.zq-footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px 48px;
}

.zq-footer-about {
    max-width: 360px;
    margin: 12px 0 0;
    color: var(--zq-muted);
    font-size: 14px;
}

.zq-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zq-footer-links a {
    color: var(--zq-muted);
    font-size: 15px;
    text-decoration: none;
}

.zq-footer-links a:hover {
    color: var(--zq-blue);
}

.zq-footer-bottom {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid var(--zq-border);
    color: var(--zq-muted);
    font-size: 13px;
}


/* ---------- Вход ---------- */

.zq-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px 16px;
    background:
        radial-gradient(700px 400px at 100% 0%, rgba(124, 58, 237, 0.16), transparent 60%),
        radial-gradient(700px 500px at 0% 100%, rgba(37, 99, 235, 0.18), transparent 60%),
        linear-gradient(160deg, #eef3ff 0%, #f6f3ff 100%);
}

.zq-auth-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 36px 32px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 28px;
    background: var(--zq-surface);
    box-shadow: var(--zq-shadow-lg);
}

.zq-auth-card .zq-logo {
    margin-bottom: 28px;
}

.zq-auth-card h1 {
    margin: 0 0 6px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: -0.5px;
    font-weight: 800;
}

.zq-auth-lead {
    margin: 0 0 28px;
    color: var(--zq-muted);
    font-size: 15px;
}

.zq-auth-error {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 12px 14px;
    border: 1px solid var(--zq-bad-border, #fecaca);
    border-radius: 12px;
    background: var(--zq-bad-bg);
    color: var(--zq-bad);
    font-size: 14px;
}

.zq-field {
    margin-bottom: 18px;
}

.zq-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.zq-input-wrap {
    position: relative;
}

.zq-input-icon {
    position: absolute;
    top: 50%;
    left: 14px;
    color: var(--zq-faint, #64748b);
    transform: translateY(-50%);
    pointer-events: none;
}

.zq-input {
    display: block;
    width: 100%;
    height: 52px;
    padding: 0 16px 0 46px;
    border: 1px solid var(--zq-border);
    border-radius: 14px;
    background: var(--zq-bg);
    color: var(--zq-text);
    font: inherit;
    font-size: 16px;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.zq-input::placeholder {
    color: var(--zq-faint, #64748b);
}

.zq-input:focus {
    border-color: var(--zq-blue);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
    outline: none;
}

.zq-input.has-eye {
    padding-right: 52px;
}

.zq-eye {
    position: absolute;
    top: 50%;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--zq-muted, #526075);
    cursor: pointer;
    transform: translateY(-50%);
}

.zq-eye:hover {
    background: var(--zq-soft-2, #f1f5f9);
    color: var(--zq-text);
}

.zq-eye .icon-hide {
    display: none;
}

.zq-eye[aria-pressed="true"] .icon-show {
    display: none;
}

.zq-eye[aria-pressed="true"] .icon-hide {
    display: block;
}

.zq-field-hint {
    margin: 8px 0 0;
    color: var(--zq-muted);
    font-size: 13px;
}

.zq-auth-forgot {
    margin: -4px 0 22px;
    color: var(--zq-muted);
    font-size: 13px;
}

.zq-auth-forgot strong {
    color: var(--zq-text);
    font-weight: 600;
}

.zq-auth .zq-btn-block {
    min-height: 52px;
    font-size: 16px;
    border-radius: 14px;
}

.zq-auth-foot {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
}

.zq-auth-foot a {
    color: var(--zq-muted);
    text-decoration: none;
}

.zq-auth-foot a:hover {
    color: var(--zq-blue);
}

.zq-auth-copy {
    margin-top: 24px;
    color: var(--zq-muted);
    font-size: 13px;
}


/* ---------- Адаптив ---------- */

@media (max-width: 980px) {

    .zq-hero {
        padding: 64px 0 72px;
    }

    .zq-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .zq-hero h1 {
        font-size: 42px;
    }

    .zq-features {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {

    .zq-burger {
        display: inline-flex;
        align-items: center;
    }

    .zq-nav {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 8px 16px 16px;
        border-bottom: 1px solid var(--zq-border);
        background: #fff;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
    }

    .zq-nav.is-open {
        display: flex;
    }

    .zq-nav a {
        padding: 12px 14px;
        font-size: 16px;
    }

    .zq-section {
        padding: 64px 0;
    }

    .zq-section-head {
        margin-bottom: 32px;
    }

    .zq-section-head h2 {
        font-size: 30px;
    }

    .zq-features {
        grid-template-columns: 1fr;
    }

    .zq-cta {
        padding-bottom: 64px;
    }

    .zq-cta-box {
        padding: 40px 24px;
        border-radius: 22px;
    }

    .zq-cta-box h2 {
        font-size: 26px;
    }
}

@media (max-width: 480px) {

    .zq-container {
        padding: 0 16px;
    }

    .zq-header-inner {
        min-height: 64px;
        gap: 12px;
    }

    .zq-header-actions .zq-btn {
        min-height: 40px;
        padding: 8px 16px;
    }

    .zq-hero {
        padding: 44px 0 56px;
    }

    .zq-hero h1 {
        font-size: 32px;
        letter-spacing: -0.5px;
    }

    .zq-hero-text {
        font-size: 16px;
    }

    .zq-hero-actions .zq-btn {
        width: 100%;
    }

    .zq-preview {
        padding: 16px;
    }

    .zq-feature {
        padding: 22px;
    }

    .zq-faq summary {
        padding: 16px 18px;
        font-size: 16px;
    }

    .zq-faq-body {
        padding: 0 18px 18px;
    }

    .zq-auth {
        justify-content: flex-start;
        padding-top: 28px;
    }

    .zq-auth-card {
        padding: 28px 20px 24px;
        border-radius: 22px;
    }

    .zq-auth-card h1 {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {

    html {
        scroll-behavior: auto;
    }

    .zq-feature,
    .zq-btn,
    .zq-faq summary::after {
        transition: none;
    }
}
