@import url('fonts.css');

:root {
    --canvas: #FFFFFF;
    --canvas-deep: #F4F6F9;
    --ink: #16222E;
    --ink-soft: #515C68;
    --ink-faint: #8792A0;
    --accent: #1A334A;
    --rule: #DCE2E8;
    --rule-soft: #EBEFF3;

    --serif: 'Lora', Georgia, 'Times New Roman', serif;
    --sans: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;

    --gutter: 32px;
    --measure: 660px;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { animation: none !important; transition: none !important; }
}

body {
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 17px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
p { margin: 0 0 1.15em; }
a { color: inherit; }

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

.skip-link {
    position: absolute; left: -9999px; top: 0; z-index: 100;
    background: var(--ink); color: var(--canvas); padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* Шапка */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--rule-soft); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }

.wordmark {
    font-family: var(--serif); font-size: 1.05rem; font-weight: 600;
    letter-spacing: 0.14em; text-transform: uppercase; text-decoration: none;
    white-space: nowrap;
}

.site-nav ul { display: flex; gap: 36px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
    font-size: 0.82rem; letter-spacing: 0.06em; text-decoration: none;
    color: var(--ink-soft); padding-bottom: 3px; border-bottom: 1px solid transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}
.site-nav a:hover { color: var(--ink); border-bottom-color: var(--accent); }

.burger {
    display: none; width: 40px; height: 40px; padding: 0;
    background: none; border: none; cursor: pointer;
}
.burger span {
    display: block; width: 22px; height: 1px; margin: 5px auto;
    background: var(--ink); transition: transform 0.3s ease, opacity 0.2s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Обложка */
.hero { padding: 132px 0 120px; }
.hero__eyebrow {
    font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--accent); margin-bottom: 30px;
}
.hero__title {
    font-size: clamp(2.4rem, 5.2vw, 3.9rem); line-height: 1.14;
    max-width: 15ch; margin-bottom: 28px;
}
.hero__lead {
    font-size: 1.16rem; color: var(--ink-soft); max-width: 46ch; margin-bottom: 44px;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Кнопки */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    font-family: var(--sans); font-size: 0.92rem; font-weight: 500;
    padding: 15px 30px; border: 1px solid var(--accent); border-radius: 2px;
    text-decoration: none; cursor: pointer; transition: background 0.25s ease, color 0.25s ease;
}
.btn--solid { background: var(--accent); color: #FFFFFF; }
.btn--solid:hover { background: #0D1A24; }
.btn--ghost { background: transparent; color: var(--accent); }
.btn--ghost:hover { background: var(--accent); color: #FFFFFF; }
.btn[disabled] { opacity: 0.5; cursor: default; }

/* Секции */
.section { padding: 96px 0; border-top: 1px solid var(--rule-soft); }
.section--tint { background: var(--canvas-deep); }

.section__label {
    font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase;
    color: var(--ink-faint); margin-bottom: 22px;
}
.section__title { font-size: clamp(1.6rem, 3vw, 2.15rem); line-height: 1.25; margin-bottom: 26px; max-width: 20ch; }
.section__lead { font-size: 1.05rem; color: var(--ink-soft); max-width: 56ch; }

/* Критерии */
.criteria { list-style: none; margin: 44px 0 0; padding: 0; }
.criteria li {
    padding: 24px 0 24px 46px; border-top: 1px solid var(--rule);
    position: relative; font-size: 1.04rem;
}
.criteria li:last-child { border-bottom: 1px solid var(--rule); }
.criteria li::before {
    content: ''; position: absolute; left: 8px; top: 35px;
    width: 18px; height: 1px; background: var(--accent);
}

/* Форматы участия */
.formats {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr));
    gap: 1px; margin-top: 48px; background: var(--rule); border: 1px solid var(--rule);
}
.formats > div { background: var(--canvas); padding: 32px 28px; }
.section--tint .formats > div { background: var(--canvas-deep); }
.formats h3 { font-size: 1.12rem; margin-bottom: 12px; }
.formats p { font-size: 0.95rem; color: var(--ink-soft); margin: 0; }

/* Порядок рассмотрения */
.steps { list-style: none; counter-reset: step; margin: 48px 0 0; padding: 0; }
.steps li {
    counter-increment: step; position: relative;
    padding: 0 0 40px 76px; border-left: 1px solid var(--rule); margin-left: 15px;
}
.steps li:last-child { padding-bottom: 0; border-left-color: transparent; }
.steps li::before {
    content: counter(step, decimal-leading-zero);
    position: absolute; left: -15px; top: -4px;
    width: 30px; height: 30px; border-radius: 50%;
    background: var(--canvas); border: 1px solid var(--rule);
    font-family: var(--serif); font-size: 0.76rem; color: var(--accent);
    display: flex; align-items: center; justify-content: center;
}
.section--tint .steps li::before { background: var(--canvas-deep); }
.steps h3 { font-size: 1.12rem; margin-bottom: 8px; }
.steps p { font-size: 0.97rem; color: var(--ink-soft); margin: 0; max-width: 52ch; }

/* Положение о конфиденциальности */
.statement {
    font-family: var(--serif); font-size: clamp(1.3rem, 2.6vw, 1.75rem);
    line-height: 1.45; max-width: 24ch; margin: 0;
}
.statement + p { margin-top: 28px; color: var(--ink-soft); max-width: 54ch; }

/* Форма и контакты */
.contact-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 72px; align-items: start; }

.contact-side dl { margin: 0; }
.contact-side dt {
    font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase;
    color: var(--ink-faint); margin-bottom: 7px;
}
.contact-side dd { margin: 0 0 26px; font-size: 1.02rem; }
.contact-side a { text-decoration: none; border-bottom: 1px solid var(--rule); transition: border-color 0.2s ease; }
.contact-side a:hover { border-bottom-color: var(--accent); }

.field { margin-bottom: 22px; }
.field label {
    display: block; font-size: 0.72rem; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--ink-faint); margin-bottom: 9px;
}
.field input, .field textarea {
    width: 100%; font-family: var(--sans); font-size: 1rem; color: var(--ink);
    background: transparent; border: none; border-bottom: 1px solid var(--rule);
    padding: 11px 2px; transition: border-color 0.2s ease;
}
.field textarea { resize: vertical; min-height: 92px; line-height: 1.6; }
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--accent); }
.field input::placeholder, .field textarea::placeholder { color: #AAB3BE; }

.field-hint { font-size: 0.84rem; color: var(--ink-faint); margin: -8px 0 26px; }

.consent { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 30px; }
.consent input { flex-shrink: 0; width: 17px; height: 17px; margin-top: 3px; accent-color: var(--accent); cursor: pointer; }
.consent label { font-size: 0.85rem; line-height: 1.5; color: var(--ink-soft); cursor: pointer; }
.consent a { color: var(--ink); }

.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-status { margin-top: 18px; font-size: 0.92rem; min-height: 1.4em; }
.form-status[data-state="pending"] { color: var(--ink-faint); }
.form-status[data-state="success"] { color: #2F6B45; }
.form-status[data-state="error"] { color: #A33A32; }

/* Подвал */
.site-footer { border-top: 1px solid var(--rule); padding: 60px 0 44px; font-size: 0.88rem; color: var(--ink-soft); }
.site-footer__top { display: flex; flex-wrap: wrap; gap: 40px; justify-content: space-between; margin-bottom: 40px; }
.site-footer__legal { max-width: 42ch; line-height: 1.7; }
.site-footer__bottom {
    display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between;
    border-top: 1px solid var(--rule-soft); padding-top: 22px; font-size: 0.82rem; color: var(--ink-faint);
}
.site-footer a { text-decoration: none; border-bottom: 1px solid transparent; }
.site-footer a:hover { border-bottom-color: var(--accent); }

/* Юридическая страница */
.legal { padding: 80px 0 96px; }
.legal h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 36px; }
.legal h2 { font-size: 1.22rem; margin: 44px 0 14px; }
.legal p, .legal li { color: var(--ink-soft); }
.legal ul, .legal ol { padding-left: 22px; }
.legal li { margin-bottom: 8px; }

/* Адаптив */
@media (max-width: 900px) {
    .contact-grid { grid-template-columns: 1fr; gap: 52px; }
}

@media (max-width: 720px) {
    :root { --gutter: 22px; }
    body { font-size: 16px; }
    .site-header__inner { height: 64px; }
    .burger { display: block; }
    .site-nav {
        position: fixed; inset: 64px 0 auto; background: var(--canvas);
        border-bottom: 1px solid var(--rule); padding: 8px 0 20px;
        transform: translateY(-130%); transition: transform 0.32s ease; visibility: hidden;
    }
    .site-nav.is-open { transform: translateY(0); visibility: visible; }
    .site-nav ul { flex-direction: column; gap: 0; }
    .site-nav a { display: block; padding: 15px var(--gutter); font-size: 1rem; border-bottom: none; }
    .hero { padding: 76px 0 72px; }
    .hero__title { max-width: none; }
    .section { padding: 66px 0; }
    .steps li { padding-left: 58px; }
    .site-footer__top { flex-direction: column; gap: 30px; }
}
