/* Страница как студийный фон в цветах логотипа.
   Уголки из логотипа работают как рамка видоискателя, красная точка записи — единственный яркий акцент. */
:root {
    --paper: #ecece9;
    --paper-deep: #e0e0dc;
    --card: #f6f6f4;
    --ink: #1e1e1d;
    --muted: #666666;
    --line: rgba(30, 30, 29, .16);

    --dark: #252524;
    --dark-deep: #1b1b1a;
    --on-dark: #ecece9;
    --on-dark-muted: #a9a9a5;
    --line-dark: rgba(236, 236, 233, .16);

    --logo: #666666;
    --rec: #ff0000;
    --error: #b3261e;

    --font: 'Geologica', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --mono: 'Martian Mono', 'Cascadia Mono', Consolas, 'Courier New', monospace;

    --max: 1640px;
    --gutter: clamp(16px, 3.9vw, 64px);
    --section: clamp(72px, 9vw, 136px);
    --header: 72px;
    --ease: cubic-bezier(.2, .7, .2, 1);

    color-scheme: light;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header) - 1px);
    -webkit-text-size-adjust: 100%;
}

html.menu-open { overflow: hidden; }
html:has(.lightbox[open]) { overflow: hidden; }

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font: 300 1rem/1.6 var(--font);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p, dl, dd, figure { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

.wrap {
    width: 100%;
    max-width: var(--max);
    margin-inline: auto;
    padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
    padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

.section { padding-block: var(--section); }

.section-head {
    display: grid;
    gap: 14px;
    margin-bottom: clamp(36px, 5vw, 72px);
    max-width: 21em;
    font-size: clamp(2.1rem, 4.5vw, 4.1rem);
}

.section-head .label { font-size: 12px; }

h2 {
    font-size: clamp(2.1rem, 4.5vw, 4.1rem);
    font-weight: 300;
    line-height: 1.06;
    letter-spacing: -.035em;
    text-wrap: balance;
}

h3 {
    font-size: 1.15rem;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: -.01em;
}

.label {
    color: var(--muted);
    font: 400 12px/1.5 var(--mono);
    font-stretch: 75%;
    letter-spacing: .02em;
}

.lead {
    max-width: 34em;
    font-size: clamp(1.06rem, 1.35vw, 1.25rem);
    line-height: 1.5;
    text-wrap: pretty;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--ink);
    color: var(--paper);
    transform: translateY(-200%);
}

.skip-link:focus { transform: none; }

/* Кнопки и ссылки */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .7em;
    padding: 1.05em 1.5em;
    border: 1px solid var(--ink);
    background: var(--ink);
    color: var(--paper);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .2s, color .2s;
}

.btn:hover { background: transparent; color: var(--ink); }
.btn:disabled { opacity: .6; cursor: wait; }

.btn__dot {
    flex: none;
    width: .5em;
    height: .5em;
    border-radius: 50%;
    background: var(--rec);
    transition: transform .25s var(--ease);
}

.btn:hover .btn__dot { transform: scale(1.5); }

.btn--small { padding: .8em 1.15em; font-size: .92rem; }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); }
.btn--light { border-color: var(--paper); background: var(--paper); color: var(--ink); }
.btn--light:hover { background: transparent; color: var(--paper); }

.text-link {
    padding-block: .3em;
    border-bottom: 1px solid var(--ink);
    transition: border-color .2s, color .2s;
}

.text-link:hover { border-color: transparent; color: var(--muted); }

/* Уголки логотипа: правый верхний и левый нижний, как на знаке */
.corners {
    --size: clamp(22px, 9%, 48px);
    --weight: 4px;
    position: absolute;
    inset: 14px;
    color: #fff;
    pointer-events: none;
}

.corners::before, .corners::after {
    content: "";
    position: absolute;
    width: var(--size);
    aspect-ratio: 1;
    border: 0 solid currentColor;
}

.corners::before {
    top: 0;
    right: 0;
    border-top-width: var(--weight);
    border-right-width: var(--weight);
}

.corners::after {
    bottom: 0;
    left: 0;
    border-bottom-width: var(--weight);
    border-left-width: var(--weight);
}

.corners--logo {
    --size: clamp(36px, 12%, 72px);
    --weight: clamp(6px, .75vw, 11px);
    inset: calc(var(--weight) * -2);
    color: var(--logo);
}

/* Шапка */
.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    border-bottom: 1px solid transparent;
    transition: background-color .25s, border-color .25s;
}

.site-header.is-stuck::before {
    background: rgba(236, 236, 233, .86);
    border-color: var(--line);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: clamp(16px, 2vw, 32px);
    min-height: var(--header);
}

.site-logo { flex: none; margin-right: auto; color: var(--logo); }
.site-logo svg { display: block; width: auto; height: 50px; }
.site-header__cta { display: none; }
.site-phone { display: none; white-space: nowrap; font-weight: 400; }

.site-nav {
    position: fixed;
    inset: 0;
    z-index: -1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: calc(var(--header) + 40px) max(var(--gutter), env(safe-area-inset-right, 0px)) 40px max(var(--gutter), env(safe-area-inset-left, 0px));
    background: var(--paper);
    font-size: clamp(2rem, 9vw, 3rem);
    font-weight: 300;
    letter-spacing: -.03em;
    visibility: hidden;
    opacity: 0;
    transition: opacity .2s, visibility .2s;
}

.menu-open .site-nav { visibility: visible; opacity: 1; }
.site-nav__phone { margin-top: auto; font-size: 1.25rem; letter-spacing: 0; }

.nav-toggle {
    position: relative;
    flex: none;
    width: 44px;
    height: 44px;
    margin-right: -8px;
    padding: 0;
    border: 0;
    background: none;
}

.nav-toggle span {
    position: absolute;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--ink);
    transition: transform .2s var(--ease), top .2s var(--ease);
}

.nav-toggle span:first-child { top: 17px; }
.nav-toggle span:last-child { top: 25px; }
.menu-open .nav-toggle span:first-child { top: 21px; transform: rotate(45deg); }
.menu-open .nav-toggle span:last-child { top: 21px; transform: rotate(-45deg); }

@media (min-width: 720px) {
    .site-header__cta { display: inline-flex; }
}

@media (min-width: 1080px) {
    .nav-toggle { display: none; }
    .site-logo { margin-right: clamp(16px, 3vw, 56px); }
    .site-phone { display: block; }

    .site-nav {
        position: static;
        z-index: auto;
        flex-direction: row;
        gap: clamp(18px, 2.2vw, 36px);
        margin-right: auto;
        padding: 0;
        background: none;
        font-size: .96rem;
        font-weight: 400;
        letter-spacing: 0;
        visibility: visible;
        opacity: 1;
    }

    .site-nav__phone { display: none; }

    .site-nav a {
        position: relative;
        padding-block: .4em;
        transition: color .2s;
    }

    .site-nav a::before {
        content: "";
        position: absolute;
        top: 50%;
        left: -.8em;
        width: 6px;
        height: 6px;
        margin-top: -3px;
        border-radius: 50%;
        background: var(--rec);
        transform: scale(0);
        transition: transform .25s var(--ease);
    }

    .site-nav a:hover { color: var(--muted); }
    .site-nav a.is-current::before { transform: scale(1); }
}

/* Первый экран */
.hero { padding-top: clamp(20px, 3vw, 40px); padding-bottom: clamp(40px, 5vw, 72px); }

.hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
    gap: 28px 12px;
    align-items: end;
}

.hero__heading, .hero__body { grid-column: 1 / -1; min-width: 0; }
.hero__heading { display: grid; gap: 14px; }
.hero__body { order: 1; }

.hero__title {
    font-size: clamp(3.3rem, 20.5vw, 7.4rem);
    font-weight: 300;
    line-height: .96;
    letter-spacing: -.05em;
}

.hero__title span { display: block; }

.hero__body { display: grid; gap: 28px; }
.hero__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

.hero__facts {
    display: grid;
    grid-template-columns: repeat(3, auto);
    justify-content: space-between;
    gap: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.hero__facts dt {
    font-size: clamp(1rem, 4.2vw, 1.3rem);
    font-weight: 400;
    letter-spacing: -.02em;
    white-space: nowrap;
}

.hero__facts dd { max-width: 11em; color: var(--muted); font-size: .84rem; line-height: 1.35; }

.hero__shot { display: grid; gap: 10px; min-width: 0; }
.hero__frame { position: relative; aspect-ratio: 3 / 4; background: var(--paper-deep); }
.hero__frame img { width: 100%; height: 100%; object-fit: cover; }

.rec {
    position: absolute;
    top: 14px;
    left: 14px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--ink);
    font: 500 11px/1 var(--mono);
    font-stretch: 75%;
    letter-spacing: .08em;
}

.rec__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--rec);
    animation: rec-blink 2s steps(1) infinite;
}

@keyframes rec-blink {
    0%, 62% { opacity: 1; }
    63%, 100% { opacity: .2; }
}

/* Уголки один раз «наводятся на резкость» при загрузке */
.hero .corners--logo::before { animation: lock-tr .9s var(--ease) .15s both; }
.hero .corners--logo::after { animation: lock-bl .9s var(--ease) .15s both; }

@keyframes lock-tr { from { transform: translate(-46px, 46px); opacity: 0; } }
@keyframes lock-bl { from { transform: translate(46px, -46px); opacity: 0; } }

@media (min-width: 620px) {
    .hero__title span { display: inline; }
    .hero__title { font-size: clamp(4rem, 12.4vw, 7.4rem); }
    .hero__title-last { display: block !important; }
}

@media (min-width: 960px) {
    .hero__grid {
        grid-template-columns: minmax(0, 4.7fr) minmax(0, 3fr) minmax(0, 5.3fr);
        grid-template-rows: auto 1fr;
        gap: 0 clamp(12px, 1.4vw, 24px);
    }

    .hero__heading { grid-column: 1 / 3; grid-row: 1; padding-bottom: 32px; }
    .hero__title { font-size: clamp(4rem, 7.15vw, 7.6rem); }
    .hero__body { grid-column: 1; grid-row: 2; align-self: end; padding-right: clamp(0px, 2vw, 40px); padding-bottom: 28px; }
    .hero__shot--mid { grid-column: 2; grid-row: 2; align-self: end; }
    .hero__shot--tall { grid-column: 3; grid-row: 1 / 3; }
}

/* Услуги и цены */
.services { display: grid; gap: 48px; }
.services__preview { display: none; }

.services__frame {
    position: relative;
    aspect-ratio: 3 / 4;
    background: var(--paper-deep);
    overflow: hidden;
}

.services__frame img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.03);
    transition: opacity .45s var(--ease), transform .9s var(--ease);
}

.services__frame img.is-active { opacity: 1; transform: none; }

.services__list { display: grid; gap: clamp(40px, 5vw, 72px); min-width: 0; }

.prices { border-bottom: 1px solid var(--line); }

.price {
    position: relative;
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    grid-template-areas:
        "thumb name cost"
        "thumb note min";
    gap: 2px 14px;
    align-items: baseline;
    padding-block: 14px;
    border-top: 1px solid var(--line);
}

.price__thumb {
    grid-area: thumb;
    align-self: start;
    width: 54px;
    height: 72px;
    object-fit: cover;
}

.price__name { grid-area: name; font-size: clamp(1.1rem, 2.1vw, 1.7rem); font-weight: 400; line-height: 1.2; letter-spacing: -.02em; }
.price__note { grid-area: note; color: var(--muted); font-size: .84rem; line-height: 1.35; }

.price__cost {
    grid-area: cost;
    font-size: clamp(1.02rem, 1.7vw, 1.4rem);
    font-weight: 400;
    letter-spacing: -.02em;
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.price__cost small { display: block; color: var(--muted); font-size: .84rem; font-weight: 300; line-height: 1.35; letter-spacing: 0; }

.price__min {
    grid-area: min;
    color: var(--muted);
    font-size: .84rem;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
}

.price__name, .price__note { transition: transform .3s var(--ease); }

.extras { display: grid; gap: 18px; }
.extras h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); font-weight: 300; letter-spacing: -.02em; }

.extras__table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.extras__table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

.extras__table tr {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 16px;
    padding-block: 12px;
    border-top: 1px solid var(--line);
}

.extras__table th { font-weight: 400; text-align: left; }
.extras__table td { padding: 0; color: var(--muted); font-size: .84rem; }
.extras__table td:nth-child(2) { grid-column: 1; grid-row: 2; }
.extras__price { grid-column: 2; grid-row: 1; color: var(--ink) !important; font-size: .95rem !important; font-weight: 400; text-align: right; white-space: nowrap; }

@media (min-width: 620px) {
    .price__cost small { display: inline; }
}

@media (min-width: 720px) {
    .extras__table thead { position: static; width: auto; height: auto; clip-path: none; }
    .extras__table thead tr { padding-block: 0 10px; border-top: 0; }
    .extras__table thead th { color: var(--muted); font: 400 12px/1.5 var(--mono); font-stretch: 75%; }
    .extras__table thead th:last-child { text-align: right; }
    .extras__table tr { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 7.5em; }
    .extras__table td:nth-child(2) { grid-column: 2; grid-row: 1; font-size: .9rem; }
    .extras__price { grid-column: 3; }
}

@media (min-width: 960px) {
    .services { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
    .services__preview { display: block; position: sticky; top: calc(var(--header) + 32px); }
    .price { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name cost" "note min"; padding-block: 18px; }
    .price__thumb { display: none; }

    .price::before {
        content: "";
        position: absolute;
        top: 30px;
        left: 0;
        width: 8px;
        height: 8px;
        border-radius: 50%;
        background: var(--rec);
        transform: scale(0);
        transition: transform .25s var(--ease);
    }

    .price.is-active::before { transform: scale(1); }
    .price.is-active .price__name, .price.is-active .price__note { transform: translateX(20px); }
}

/* Почему мы */
.why { background: var(--dark); color: var(--on-dark); padding-block: var(--section); }
.why .label, .why .why__note { color: var(--on-dark-muted); }

.why__grid { display: grid; gap: 40px; }
.why__shot { position: relative; aspect-ratio: 3 / 4; background: var(--dark-deep); }
.why__shot img { width: 100%; height: 100%; object-fit: cover; }

.mark {
    position: absolute;
    left: var(--x);
    top: var(--y);
    width: var(--w);
    height: var(--h);
    transition: opacity .25s;
}

.mark .corners { inset: 0; --size: clamp(14px, 32%, 34px); --weight: 3px; transition: inset .3s var(--ease); }

.mark__num {
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    background: var(--ink);
    color: #fff;
    font: 500 11px/1 var(--mono);
    font-stretch: 75%;
}

.why__shot.has-active .mark { opacity: .35; }
.why__shot.has-active .mark.is-active { opacity: 1; }
.mark.is-active .corners { inset: -6px; }

.why__text { display: grid; gap: 20px; align-content: start; min-width: 0; }
.why__text h2 { margin-bottom: 4px; }

.perks { margin-top: 12px; border-bottom: 1px solid var(--line-dark); }

.perk {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 2px 8px;
    padding-block: 16px;
    border-top: 1px solid var(--line-dark);
    outline-offset: -2px;
    cursor: default;
}

.perk__num { grid-row: span 2; color: var(--on-dark-muted); font: 400 12px/1.9 var(--mono); font-stretch: 75%; }
.perk p { color: var(--on-dark-muted); font-size: .95rem; line-height: 1.45; text-wrap: pretty; }
.perk.is-active .perk__num { color: var(--rec); }

.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 20px;
    margin-top: 12px;
}

.facts dt { font-size: 1.15rem; font-weight: 400; letter-spacing: -.01em; }
.facts dd { color: var(--on-dark-muted); font-size: .9rem; line-height: 1.4; }
.why__note { font-size: .84rem; }

@media (min-width: 960px) {
    .why__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6.4fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
    .why__shot { position: sticky; top: calc(var(--header) + 24px); }
}

/* Портфолио */
.filters {
    display: flex;
    gap: 0 clamp(18px, 2.2vw, 32px);
    margin-bottom: 24px;
    padding-bottom: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.filters::-webkit-scrollbar { display: none; }

.filter {
    flex: none;
    padding: .55em 0;
    border: 0;
    border-bottom: 2px solid transparent;
    background: none;
    color: var(--muted);
    font-size: .95rem;
    font-weight: 400;
    white-space: nowrap;
    transition: color .2s, border-color .2s;
}

.filter sup { font: 400 10px/1 var(--mono); font-stretch: 75%; }
.filter:hover { color: var(--ink); }
.filter.is-active { border-color: var(--ink); color: var(--ink); }

.works {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 6px;
}

.work { position: relative; aspect-ratio: 3 / 4; background: var(--paper-deep); overflow: hidden; }
.work--lg { grid-column: span 2; grid-row: span 2; aspect-ratio: auto; }
.js .work--extra { display: none; }

.work a { position: absolute; inset: 0; display: block; }

.work img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .8s var(--ease);
}

.work .corners { mix-blend-mode: difference; opacity: 0; transform: scale(1.04); transition: opacity .25s, transform .4s var(--ease); }

.work__title {
    position: absolute;
    left: 28px;
    bottom: 26px;
    padding: 3px 6px;
    background: var(--ink);
    color: #fff;
    font: 400 11px/1.3 var(--mono);
    font-stretch: 75%;
    opacity: 0;
    transition: opacity .25s;
}

.work a:hover img, .work a:focus-visible img { transform: scale(1.03); }
.work a:hover .corners, .work a:focus-visible .corners { opacity: 1; transform: none; }
.work a:hover .work__title, .work a:focus-visible .work__title { opacity: 1; }
.work a:focus-visible { outline-offset: -4px; outline-color: #fff; }

.works-more { display: flex; justify-content: center; margin-top: 32px; }

@media (min-width: 900px) {
    .works { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
    .works[data-columns="3"] { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (hover: none) {
    .work__title { display: none; }
}

/* Просмотр фото */
.lightbox {
    position: fixed;
    inset: 0;
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: var(--dark-deep);
    color: var(--on-dark);
    overflow: hidden;
}

.lightbox::backdrop { background: var(--dark-deep); }

.lightbox__stage {
    position: absolute;
    inset: 56px clamp(12px, 7vw, 96px) 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }

.lightbox__caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    color: var(--on-dark-muted);
    text-align: center;
}

.lightbox__btn {
    position: absolute;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 0;
    background: none;
    color: var(--on-dark);
    font-size: 1.6rem;
    line-height: 1;
    transition: color .2s;
}

.lightbox__btn:hover { color: var(--on-dark-muted); }
.lightbox__btn--close { top: 6px; right: 8px; }
.lightbox__btn--prev { top: calc(50% - 24px); left: 8px; }
.lightbox__btn--next { top: calc(50% - 24px); right: 8px; }

@media (max-width: 719px) {
    .lightbox__stage { inset: 56px 12px 64px; }
    .lightbox__btn--prev { top: auto; bottom: 6px; left: 8px; }
    .lightbox__btn--next { top: auto; bottom: 6px; right: 8px; }
}

/* Контакты */
.contacts { background: var(--paper-deep); }

.contacts__grid { display: grid; gap: 48px; }
.contacts__info { display: grid; gap: 18px; align-content: start; min-width: 0; }

.contact-list { display: grid; margin-top: 16px; border-bottom: 1px solid var(--line); }

.contact-list > div {
    display: grid;
    grid-template-columns: minmax(0, 8em) minmax(0, 1fr);
    gap: 12px;
    padding-block: 12px;
    border-top: 1px solid var(--line);
}

.contact-list dt { color: var(--muted); font: 400 12px/2 var(--mono); font-stretch: 75%; }
.contact-list dd { font-weight: 400; overflow-wrap: anywhere; }
.contact-list a { border-bottom: 1px solid var(--line); transition: border-color .2s; }
.contact-list a:hover { border-color: var(--ink); }

.lead-box {
    position: relative;
    min-width: 0;
    padding: clamp(22px, 3.4vw, 48px);
    background: var(--card);
}

.lead-box .corners--logo { inset: -10px; --weight: 6px; --size: clamp(30px, 8%, 56px); }

.lead-form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }

.lead-form__trap {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.field { display: grid; gap: 4px; align-content: start; min-width: 0; }
.field label { color: var(--muted); font: 400 12px/1.5 var(--mono); font-stretch: 75%; }

.field input:not([type="checkbox"]), .field select, .field textarea {
    width: 100%;
    padding: .55em 0;
    border: 0;
    border-bottom: 1px solid var(--muted);
    border-radius: 0;
    background: transparent;
    font-size: 1.05rem;
    font-weight: 400;
    outline: 0;
    transition: border-color .2s, box-shadow .2s;
    -webkit-appearance: none;
    appearance: none;
}

.field select {
    padding-right: 1.5em;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='none' stroke='%23666' stroke-width='1.5' d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right .2em center;
    cursor: pointer;
}

.field textarea { min-height: 3.4em; resize: vertical; line-height: 1.45; }

.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--ink);
    box-shadow: 0 1px 0 var(--ink);
}

.field.has-error input:not([type="checkbox"]), .field.has-error select { border-color: var(--error); box-shadow: 0 1px 0 var(--error); }
.field__error { color: var(--error); font-size: .84rem; line-height: 1.35; }
.field__error:empty { display: none; }

.field--check {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 4px 10px;
    align-items: start;
}

.field--check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--ink); }
.field--check label { color: var(--ink); font: 300 .9rem/1.45 var(--font); }
.field--check label a { border-bottom: 1px solid currentColor; }
.field--check .field__error { grid-column: 2; }

.lead-form__error { color: var(--error); font-size: .92rem; }
.lead-form__submit { justify-content: center; width: 100%; }

.lead-done { display: grid; gap: 8px; outline: 0; padding-block: 24px; }
.lead-done h3 { font-size: clamp(1.7rem, 3vw, 2.4rem); font-weight: 300; letter-spacing: -.03em; }
.lead-done p { color: var(--muted); }
.lead-done__dot { width: 12px; height: 12px; margin-bottom: 8px; border-radius: 50%; background: var(--rec); }

@media (min-width: 620px) {
    .lead-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 28px; }
    .field--wide, .lead-form__error, .lead-form__submit { grid-column: 1 / -1; }
    .lead-form__submit { justify-self: start; width: auto; }
}

@media (min-width: 960px) {
    .contacts__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 6.4fr); gap: clamp(40px, 6vw, 112px); align-items: start; }
}

/* Документы */
.document { padding-top: clamp(24px, 4vw, 56px); padding-bottom: var(--section); }
.document__grid { display: grid; gap: 40px; }
.document__head { display: grid; gap: 14px; align-content: start; justify-items: start; min-width: 0; }

.document__head h1 {
    font-size: clamp(2.1rem, 4.2vw, 3.7rem);
    font-weight: 300;
    line-height: 1.06;
    letter-spacing: -.035em;
    text-wrap: balance;
}

.document__date { color: var(--muted); font-size: .92rem; }
.document__back { margin-top: 4px; }

.document__text { display: grid; gap: clamp(32px, 4vw, 48px); max-width: 46rem; min-width: 0; line-height: 1.6; }
.document__text section { display: grid; gap: 12px; min-width: 0; scroll-margin-top: 24px; }
.document__text h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 400; line-height: 1.2; letter-spacing: -.02em; }
.document__text strong { font-weight: 400; }
.document__text p a { border-bottom: 1px solid currentColor; transition: color .2s; }
.document__text p a:hover { color: var(--muted); }
.document__text ul { display: grid; gap: 6px; padding-left: 1.2em; list-style: disc; }
.document__text .contact-list { margin-top: 0; }
.document__text .contact-list dd { font-weight: 300; }
.document__purpose { display: grid; gap: 10px; margin-top: 8px; }

.legal-gap { padding: 0 .25em; background: rgba(179, 38, 30, .1); color: var(--error); font-weight: 400; }

@media (min-width: 960px) {
    .document__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 96px); align-items: start; }
    .document__head { position: sticky; top: calc(var(--header) + 32px); }
}

/* Уведомление о cookie */
.cookie-notice {
    position: fixed;
    right: max(16px, env(safe-area-inset-right, 0px));
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    left: max(16px, env(safe-area-inset-left, 0px));
    z-index: 40;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
    padding: 16px 18px;
    border: 1px solid var(--line-dark);
    background: var(--dark);
    color: var(--on-dark);
    font-size: .9rem;
    line-height: 1.45;
}

.cookie-notice p { flex: 1 1 15rem; min-width: 0; text-wrap: pretty; }
.cookie-notice a { border-bottom: 1px solid currentColor; transition: color .2s; }
.cookie-notice a:hover { color: var(--on-dark-muted); }

@media (min-width: 720px) {
    .cookie-notice { right: auto; width: 31rem; }
}

/* Подвал */
.site-footer {
    background: var(--dark-deep);
    color: var(--on-dark);
    padding-top: clamp(32px, 4vw, 56px);
    padding-bottom: max(clamp(24px, 3vw, 44px), env(safe-area-inset-bottom, 0px));
}

.site-footer__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px 40px;
    margin-bottom: clamp(32px, 5vw, 72px);
}

.site-footer__nav { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.site-footer__nav a { transition: color .2s; }
.site-footer__nav a:hover { color: var(--on-dark-muted); }
.site-footer__legal { display: flex; flex-wrap: wrap; gap: 4px 24px; color: var(--on-dark-muted); font-size: .9rem; }
.site-footer__legal a { transition: color .2s; }
.site-footer__legal a:hover { color: var(--on-dark); }

.site-footer__logo { display: block; color: #3d3d3b; transition: color .3s; }
.site-footer__logo:hover { color: #4a4a48; }
.site-footer__logo svg { display: block; width: 100%; height: auto; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
