/* ==========================================
   WALKER LEGAL — стили сайта
   ========================================== */

/* === Шрифты (лежат на сайте, без внешних сервисов) === */

@font-face {
    font-family: "WL Serif";
    src: url("fonts/lora-var.woff") format("woff");
    font-weight: 400 700;
    font-display: swap;
}

@font-face {
    font-family: "WL Sans";
    src: url("fonts/inter-regular.woff") format("woff");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "WL Sans";
    src: url("fonts/inter-medium.woff") format("woff");
    font-weight: 500;
    font-display: swap;
}

@font-face {
    font-family: "WL Sans";
    src: url("fonts/inter-semibold.woff") format("woff");
    font-weight: 600;
    font-display: swap;
}


/* === Цвета и основные настройки === */

:root {
    --bg: #F2F4F1;            /* фон страниц */
    --surface: #FFFFFF;       /* плашки, анкета */
    --band: #E5ECE8;          /* светло-зелёная полоса */
    --ink: #16241E;           /* заголовки */
    --text: #2B3833;          /* основной текст */
    --muted: #5C6B64;         /* второстепенный текст */
    --line: #C9D4CE;          /* тонкие линии и рамки */
    --green: #2E5B4E;         /* кнопки и ссылки */
    --green-dark: #22463C;
    --green-soft: #E3ECE7;    /* выбранный вариант */
    --deep: #1B3A31;          /* тёмные блоки и подвал */
    --on-deep: #DCE6E1;
    --on-deep-muted: #A9C4B8;
    --deep-line: #2F5246;
    --error: #A93226;
    --error-bg: #F8ECEA;

    --serif: "WL Serif", Georgia, "Times New Roman", serif;
    --sans: "WL Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

    --radius: 6px;
    --lift: 0 14px 30px rgba(27, 58, 49, 0.10);
}

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

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

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

a {
    color: inherit;
}

img {
    max-width: 100%;
}

.wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(16px, 5vw, 56px);
    width: 100%;
}


/* === Доступность === */

.skip-link {
    position: absolute;
    left: 16px;
    top: -60px;
    z-index: 200;
    background: var(--surface);
    color: var(--ink);
    padding: 10px 16px;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 12px;
}

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

h1:focus,
h2:focus {
    outline: none;
}


/* === Шапка === */

.hdr {
    position: relative;
    z-index: 100;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    background: var(--bg);
}

.hdr-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    flex-shrink: 0;
}

.brand .mono {
    height: 46px;
    width: auto;
    display: block;
}

.brand .word {
    font-family: var(--serif);
    font-weight: 700;
    font-size: 12.5px;
    letter-spacing: 0.12em;
    line-height: 1.15;
    padding-bottom: 2px;
}

.nav {
    display: flex;
    align-items: center;
    gap: 32px;
    font-size: 15px;
}

.nav a {
    text-decoration: none;
    color: var(--text);
    padding: 4px 0;
}

.nav a:hover {
    color: var(--green);
}

.nav a.active {
    color: var(--green);
    box-shadow: inset 0 -1.5px 0 var(--green);
}

.nav .nav-cta {
    margin-left: 12px;
    padding: 12px 20px;
    color: var(--green);
    box-shadow: none;
}

.nav .nav-cta:hover {
    color: #fff;
}

/* бургер — только на узких экранах */
.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 13px 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
}

.nav-toggle-bar {
    display: block;
    height: 1.5px;
    background: var(--ink);
    transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


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

.btn {
    display: inline-block;
    font: 500 15px/1.2 var(--sans);
    padding: 16px 30px;
    border-radius: 2px;
    text-decoration: none;
    text-align: center;
    border: 1.5px solid var(--green);
    background: transparent;
    color: var(--green);
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.btn:hover {
    background: var(--green);
    color: #fff;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary,
.btn-solid {
    background: var(--green);
    color: #fff;
}

.btn-primary:hover,
.btn-solid:hover {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.btn-primary:disabled {
    background: #AFC2B9;
    border-color: #AFC2B9;
    color: #fff;
    cursor: not-allowed;
    transform: none;
}

.btn-sm {
    padding: 12px 20px;
    font-size: 14px;
}


/* === Типографика === */

.h-display {
    font-family: var(--serif);
    font-weight: 500;
    color: var(--ink);
    letter-spacing: -0.01em;
}

h1.h-display {
    font-size: clamp(34px, 4.6vw, 58px);
    line-height: 1.08;
    max-width: 22ch;
}

h2.h-display {
    font-size: clamp(28px, 3.2vw, 44px);
    line-height: 1.12;
}

.lead {
    font-size: 19px;
    color: var(--muted);
    max-width: 62ch;
}


/* === Первый экран главной === */

.hero {
    padding: 112px 0 104px;
}

.hero h1 {
    font-size: clamp(36px, 5.4vw, 68px);
    line-height: 1.06;
    max-width: 20ch;
}

.hero .lead {
    margin: 30px 0 42px;
}


/* === Заголовок внутренних страниц === */

.phead {
    padding: 80px 0 48px;
}

.phead .lead {
    margin-top: 18px;
}


/* === Секции === */

.sec {
    padding: 72px 0;
}

.sec-tight {
    padding-top: 8px;
}

.sec-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 32px;
    margin-bottom: 36px;
    flex-wrap: wrap;
}

.sec-head p {
    color: var(--muted);
    max-width: 46ch;
}

.split {
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 64px;
    align-items: start;
}

.split p {
    margin-bottom: 18px;
    max-width: 64ch;
}

.split .btn {
    margin-top: 8px;
}


/* === Плашки (кликабельные карточки) === */

.tile {
    position: relative;
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 30px 30px 28px;
    color: var(--text);
    text-decoration: none;
    transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
}

a.tile:hover,
.tile.is-hover:hover {
    transform: translateY(-4px);
    border-color: var(--green);
    box-shadow: var(--lift);
}

a.tile:active,
.tile.is-hover:active {
    transform: translateY(-1px) scale(0.99);
    box-shadow: 0 6px 14px rgba(27, 58, 49, 0.08);
}

/* зелёная полоска сверху при наведении */
.tile::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 30px;
    right: 30px;
    height: 3px;
    background: var(--green);
    border-radius: 0 0 2px 2px;
    opacity: 0;
    transition: opacity 0.22s;
}

a.tile:hover::before,
.tile.is-hover:hover::before {
    opacity: 1;
}

.tile h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 25px;
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 10px;
}

.tile p {
    color: var(--muted);
    font-size: 16px;
}

.tile .more {
    margin-top: auto;
    padding-top: 22px;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--green);
}

.tile .more::after {
    content: "";
    display: inline-block;
    width: 18px;
    height: 1.5px;
    background: currentColor;
    vertical-align: middle;
    margin-left: 10px;
    transition: width 0.22s;
}

.tile:hover .more::after {
    width: 30px;
}

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

.grid2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}


/* === Пакеты === */

.pack ul {
    list-style: none;
    margin: 20px 0 4px;
    border-top: 1px solid var(--line);
}

.pack li {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
    font-size: 15.5px;
    color: var(--text);
}

.pack .foot {
    margin-top: auto;
    padding-top: 24px;
}


/* === Партнёр === */

.portrait {
    background: var(--deep);
    color: var(--on-deep);
}

.portrait .wrap {
    display: grid;
    grid-template-columns: 5fr 7fr;
    padding: 0;
}

.portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    filter: grayscale(1) contrast(1.05);
    aspect-ratio: 4 / 5;
}

.bio {
    padding: 72px clamp(24px, 5vw, 72px);
    align-self: center;
}

.bio .eyebrow {
    font-size: 14px;
    color: var(--on-deep-muted);
    margin-bottom: 18px;
}

.bio h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 40px;
    line-height: 1.15;
    color: #fff;
}

.bio .role {
    color: var(--on-deep-muted);
    margin: 8px 0 34px;
}

.bio dl {
    display: grid;
    gap: 22px;
    border-top: 1px solid var(--deep-line);
    padding-top: 26px;
}

.bio dt {
    font-size: 14px;
    color: var(--on-deep-muted);
    margin-bottom: 4px;
}

.bio dd {
    max-width: 56ch;
}


/* === Призыв к действию === */

.cta {
    padding: 88px 0;
    background: var(--band);
}

.cta .wrap {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 40px;
    flex-wrap: wrap;
}

.cta h2 {
    max-width: 18ch;
}

.cta p {
    color: var(--muted);
    margin-top: 16px;
    max-width: 50ch;
}


/* === Контакты === */

.ctile .k {
    font-size: 14px;
    color: var(--muted);
    margin-bottom: 8px;
}

.ctile .v {
    font-family: var(--serif);
    font-size: 27px;
    color: var(--ink);
    overflow-wrap: anywhere;
}

.cbox {
    margin-top: 20px;
    background: var(--deep);
    color: var(--on-deep);
    border-radius: var(--radius);
    padding: 40px 44px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 32px;
    flex-wrap: wrap;
}

.cbox h2,
.cbox h3 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 28px;
    color: #fff;
    margin-bottom: 6px;
}

.cbox p {
    color: var(--on-deep-muted);
}

.cbox .btn {
    background: #fff;
    color: var(--deep);
    border-color: #fff;
}

.cbox .btn:hover {
    background: var(--green-soft);
    border-color: var(--green-soft);
}

.req {
    margin-top: 28px;
    color: var(--muted);
    font-size: 15.5px;
}


/* === Юридические документы === */

.legal {
    max-width: 800px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 48px 56px;
}

.legal h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 24px;
    line-height: 1.25;
    color: var(--ink);
    margin: 40px 0 12px;
}

.legal > h2:first-child {
    margin-top: 0;
}

.legal p,
.legal li {
    margin-bottom: 10px;
}

.legal ul {
    padding-left: 22px;
    margin-bottom: 12px;
}

.legal a {
    color: var(--green);
}


/* === Анкета === */

.quiz {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 48px 52px 44px;
    max-width: 820px;
    min-height: 460px;
    display: flex;
    flex-direction: column;
    scroll-margin-top: 24px;
}

.quiz-step {
    display: none;
}

.quiz-step.active {
    display: block;
}

.quiz h2 {
    font-family: var(--serif);
    font-weight: 500;
    font-size: 30px;
    line-height: 1.2;
    color: var(--ink);
    margin-bottom: 26px;
}

.quiz p {
    color: var(--muted);
}

/* варианты ответа — плашки */
.quiz-buttons {
    display: grid;
    gap: 10px;
}

.quiz-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 17px 20px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: 400 17px/1.4 var(--sans);
    color: var(--text);
    text-align: left;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s;
}

.quiz-btn:hover {
    transform: translateY(-3px);
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 10px 22px rgba(27, 58, 49, 0.09);
}

.quiz-btn:active {
    transform: translateY(0) scale(0.99);
}

.quiz-btn.package-btn {
    color: var(--green);
    font-weight: 500;
}

.quiz-btn.selected {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--ink);
    font-weight: 500;
    box-shadow: inset 3px 0 0 var(--green);
}

.quiz-btn.selected::after {
    content: "✓";
    color: var(--green);
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 14px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.quiz-step > .btn {
    margin-top: 24px;
}

/* поля */
.quiz-form {
    display: grid;
    gap: 20px;
}

.quiz-field > label,
.checkbox-group legend {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--ink);
    margin-bottom: 8px;
}

.quiz-form input:not([type="checkbox"]),
.quiz-form select,
.quiz-form textarea {
    width: 100%;
    font: 400 16px/1.4 var(--sans);
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--bg);
    color: var(--text);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.quiz-form textarea {
    min-height: 110px;
    resize: vertical;
}

.quiz-form input::placeholder,
.quiz-form textarea::placeholder {
    color: #6F7D77;
}

.quiz-form input:focus,
.quiz-form select:focus,
.quiz-form textarea:focus {
    outline: none;
    border-color: var(--green);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(46, 91, 78, 0.14);
}

.required-star {
    color: var(--error);
}

input.error,
select.error,
textarea.error {
    border-color: var(--error) !important;
    background: var(--error-bg) !important;
}

.checkbox-group {
    border: 1px solid transparent;
    border-radius: var(--radius);
    display: grid;
    gap: 10px;
}

.checkbox-group.error {
    border-color: var(--error);
    background: var(--error-bg);
    padding: 12px 14px;
}

.checkbox-option {
    display: flex;
    gap: 12px;
    align-items: center;
    cursor: pointer;
}

.checkbox-option input,
.consent-label input {
    accent-color: var(--green);
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.consent-label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    font-size: 15px;
    line-height: 1.5;
    color: var(--muted);
    cursor: pointer;
}

.consent-label input {
    margin-top: 2px;
}

.consent-label a {
    color: var(--green);
}

.botcheck {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.quiz-message {
    margin-top: 18px;
    padding: 12px 16px;
    background: var(--error-bg);
    color: var(--error);
    border-radius: var(--radius);
    font-weight: 500;
}

.quiz-message[hidden] {
    display: none;
}

/* прогресс */
.progress {
    margin-top: auto;
    padding-top: 40px;
}

.progress::before {
    content: "";
    display: block;
    height: 2px;
    background: var(--line);
}

.progress-bar {
    height: 2px;
    width: 0;
    margin-top: -2px;
    background: var(--green);
    transition: width 0.3s ease;
}


/* === Страница 404 === */

.not-found .actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 32px;
}


/* === Подвал === */

.ftr {
    background: var(--deep);
    color: var(--on-deep-muted);
    padding: 56px 0 40px;
    font-size: 14px;
}

.ftr .wrap {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 40px;
}

.ftr .brand {
    color: #fff;
}

.ftr a {
    color: #D9E4DF;
    text-decoration: none;
}

.ftr a:hover {
    color: #fff;
    text-decoration: underline;
}

.ftr .col {
    display: grid;
    gap: 10px;
    align-content: start;
}

.ftr .company {
    margin-top: 14px;
}

.ftr .copy {
    grid-column: 1 / -1;
    border-top: 1px solid var(--deep-line);
    padding-top: 22px;
    margin-top: 16px;
    color: #93AEA2;
}


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

@media (max-width: 960px) {
    .nav-toggle {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        padding: 4px clamp(16px, 5vw, 56px) 20px;
        box-shadow: 0 14px 24px rgba(27, 58, 49, 0.10);
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 14px 0;
        font-size: 17px;
        border-bottom: 1px solid var(--line);
    }

    .nav a.active {
        box-shadow: none;
    }

    .nav .nav-cta {
        margin: 18px 0 0;
        padding: 15px 20px;
        border-bottom: 1.5px solid var(--green);
        background: var(--green);
        color: #fff;
    }

    .grid3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .split,
    .portrait .wrap {
        grid-template-columns: 1fr;
    }

    .split {
        gap: 16px;
    }

    .portrait img {
        aspect-ratio: 1 / 1;
        max-height: 560px;
    }
}

@media (max-width: 700px) {
    body {
        font-size: 16px;
    }

    .hdr {
        padding: 14px 0;
    }

    .brand .mono {
        height: 40px;
    }

    .hero {
        padding: 48px 0 56px;
    }

    .hero .lead,
    .phead .lead,
    .lead {
        font-size: 17px;
    }

    .hero .lead {
        margin: 18px 0 28px;
    }

    .hero .btn,
    .cta .btn,
    .cbox .btn {
        width: 100%;
    }

    .phead {
        padding: 40px 0 24px;
    }

    .sec {
        padding: 40px 0;
    }

    .sec-tight {
        padding-top: 8px;
    }

    .sec-head {
        margin-bottom: 22px;
        gap: 12px;
    }

    .grid3,
    .grid2 {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .tile {
        padding: 22px 20px 20px;
    }

    .tile::before {
        left: 20px;
        right: 20px;
    }

    .tile h3 {
        font-size: 22px;
    }

    .tile .more {
        padding-top: 14px;
    }

    .bio {
        padding: 36px 20px 44px;
    }

    .bio h2 {
        font-size: 30px;
    }

    .ctile .v {
        font-size: 22px;
    }

    .cbox {
        padding: 26px 20px;
    }

    .legal {
        padding: 26px 20px;
    }

    .legal h2 {
        font-size: 21px;
        margin-top: 30px;
    }

    .quiz {
        padding: 26px 18px 24px;
        min-height: 0;
    }

    .quiz h2 {
        font-size: 23px;
        margin-bottom: 18px;
    }

    .quiz-btn {
        padding: 16px;
        font-size: 16px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
    }

    .cta {
        padding: 48px 0;
    }

    .ftr .wrap {
        grid-template-columns: 1fr;
        gap: 28px;
    }
}


/* === Меньше движения для тех, кто это отключил === */

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

/* Если блок партнёра стоит в конце страницы, отделяем его от тёмного подвала */
main > .portrait:last-child {
    margin-bottom: 72px;
}

@media (max-width: 700px) {
    main > .portrait:last-child {
        margin-bottom: 40px;
    }
}

/* === Логотип (файлы logo.svg и logo-light.svg) === */

.brand img {
    display: block;
    height: 62px;
    width: auto;
}

.ftr .brand img {
    height: 66px;
}

@media (max-width: 700px) {
    .brand img {
        height: 52px;
    }
}
