:root {
    --bg: #ffffff;
    --surface: #ffffff;
    --soft: #f7f6f3;
    --soft-strong: #efede8;
    --line: #dedbd4;
    --line-dark: #a9a39a;
    --ink: #1f1f1f;
    --muted: #68645e;
    --accent: #8d3542;
    --accent-dark: #5f202b;
    --green: #3e6b55;
    --sold: #8d3542;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    background: var(--bg);
    font-family: "Product Sans", "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}

main {
    flex: 1 0 auto;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1,
h2,
h3 {
    color: var(--ink);
    font-weight: 400;
    letter-spacing: 0;
}

h1 {
    max-width: 940px;
    margin-bottom: 22px;
    font-size: 72px;
    line-height: 1.02;
}

h2 {
    margin-bottom: 22px;
    font-size: 42px;
    line-height: 1.08;
}

h3 {
    margin-bottom: 10px;
    font-size: 24px;
    line-height: 1.18;
}

select,
input,
textarea,
button {
    font: inherit;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 32px;
    padding: 18px 42px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--ink);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0;
}

.brand__mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--surface);
    background: var(--ink);
    border: 1px solid var(--ink);
    font-size: 13px;
}

.brand__text {
    color: var(--ink);
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 22px;
    font-size: 14px;
}

.main-nav a {
    color: var(--muted);
    border-bottom: 1px solid transparent;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: var(--ink);
    border-bottom-color: var(--accent);
}

.hero,
.page-hero,
.section,
.artwork-page,
.artist-page,
.place-page {
    width: min(100%, 1280px);
    margin: 0 auto;
    padding: 56px 40px;
}

.hero {
    width: 100%;
    max-width: none;
    min-height: 620px;
    display: flex;
    align-items: center;
    padding-top: 78px;
    padding-bottom: 78px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.9) 45%, rgba(255, 255, 255, 0.32) 100%),
        url("https://aaanya.ru/wp-content/uploads/2021/12/Matreshka-1470x680.webp") center / cover no-repeat;
    border-bottom: 1px solid var(--line);
}

.hero__content {
    width: min(100%, 1240px);
    margin: 0 auto;
}

.hero__content p {
    max-width: 650px;
    margin-bottom: 0;
    color: var(--muted);
    font-size: 19px;
}

.hero__kicker,
.hero__image,
.hero__caption,
.hero__actions {
    display: none;
}

.page-hero {
    display: block;
    padding-top: 36px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--line);
}

.page-hero h1 {
    margin-bottom: 14px;
}

.page-hero p {
    max-width: 760px;
    margin: 0;
    color: var(--muted);
    font-size: 18px;
}

.page-hero + .section {
    padding-top: 34px;
}

.button,
.button--ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    max-width: 100%;
    min-height: 52px;
    padding: 14px 18px;
    color: var(--surface);
    background: var(--ink);
    border: 1px solid var(--ink);
    cursor: pointer;
    font-family: "Product Sans", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.2;
    text-align: center;
}

.button:hover,
.button--ghost:hover {
    color: var(--surface);
    background: var(--accent);
    border-color: var(--accent);
}

.button--full {
    width: 240px;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 28px;
}

.text-link,
.muted-link {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
}

.muted-link {
    display: inline;
    width: fit-content;
    color: var(--muted);
    font-size: 14px;
}

.eyebrow {
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.section {
    position: relative;
}

.section--muted {
    width: 100%;
    max-width: none;
    background: var(--soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section--muted > * {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 28px;
    align-items: end;
    margin-bottom: 30px;
}

.section-head h2 {
    margin: 0;
}

.section-head--row {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 24px;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.steps--wide {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.steps > div {
    min-height: 250px;
    padding: 30px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.steps span {
    display: block;
    margin-bottom: 42px;
    color: var(--accent);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
}

.split {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.split > div {
    min-height: 360px;
    display: flex;
    flex-direction: column;
    padding: 38px;
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split p,
.clean-list,
.lead,
.page-hero p {
    color: var(--muted);
}

.split .button {
    margin-top: auto;
}

.art-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    align-items: stretch;
}

.art-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
}

.art-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 5;
    padding: 14px;
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    transition: border-color 160ms ease, transform 160ms ease;
}

.art-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.art-card:hover .art-card__image {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.art-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    min-height: 320px;
    padding: 18px;
}

.art-card__top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.art-card__id {
    color: var(--muted);
    font-size: 12px;
}

.status {
    flex: 0 0 auto;
    min-height: 22px;
    padding: 2px 8px;
    color: var(--surface);
    background: var(--green);
    font-size: 12px;
}

.status--sold {
    background: var(--sold);
}

.status--available {
    background: var(--green);
}

.art-card h3 {
    margin: 2px 0 0;
    font-size: 26px;
    font-weight: 400;
}

.art-card__meta,
.placement-note {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.placement-note {
    margin-top: auto;
}

.placement-note a,
.small-note a {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
}

.art-card__price {
    margin: 4px 0 0;
    font-size: 17px;
    font-weight: 700;
}

.artwork-price {
    font-size: 30px;
    font-weight: 700;
}

.art-card .button {
    margin-top: 6px;
}

.filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    margin-bottom: 34px;
    color: var(--ink);
    background: var(--line);
    border: 1px solid var(--line);
}

.filters label,
.modal label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 14px;
}

.filters label {
    padding: 16px;
    background: var(--surface);
}

.filters .button {
    width: 100%;
    height: 100%;
    align-self: end;
}

.filters select,
.modal input,
.modal textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 0;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--line-dark);
}

.modal input,
.modal textarea {
    padding: 10px 12px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.artwork-page,
.artist-page,
.place-page {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 0.65fr);
    gap: 58px;
    align-items: start;
    padding-top: 44px;
}

.artwork-info,
.artist-page > div,
.place-page > div,
.legal {
    color: var(--ink);
}

.artwork-gallery__main,
.artist-page > img,
.place-page > img {
    width: 100%;
    padding: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.artwork-gallery__open {
    display: block;
    width: 100%;
    padding: 0;
    background: transparent;
    border: 0;
    cursor: zoom-in;
}

.artwork-gallery__thumbs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.artwork-gallery__thumbs img {
    width: 100%;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.artist-line a {
    color: var(--accent);
    border-bottom: 1px solid currentColor;
}

.details-list {
    display: grid;
    gap: 0;
    margin: 26px 0;
    color: var(--ink);
    border-top: 1px solid var(--line);
}

.details-list div {
    display: grid;
    grid-template-columns: 128px 1fr;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line);
}

.details-list dt {
    color: var(--muted);
}

.details-list dd {
    margin: 0;
}

.warning-note,
.info-band {
    padding: 0;
    color: var(--muted);
    background: transparent;
    border: 0;
}

.info-band {
    display: block;
    max-width: 980px;
    margin-bottom: 26px;
    font-size: 18px;
    line-height: 1.55;
}

.info-band strong,
.warning-note strong {
    color: var(--ink);
}

.person-grid,
.place-grid {
    display: grid;
    gap: 0;
    border-top: 1px solid var(--line);
}

.person-card,
.place-card {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 30px;
    padding: 28px 0;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
}

.person-card img,
.place-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    padding: 10px;
    background: var(--surface);
    border: 1px solid var(--line);
}

.lead {
    font-size: 20px;
}

.clean-list {
    padding-left: 18px;
}

.clean-list li + li {
    margin-top: 10px;
}

.content-text,
.contact-text {
    max-width: 860px;
    color: var(--muted);
    font-size: 20px;
}

.content-text h2 {
    margin-top: 34px;
    margin-bottom: 14px;
}

.content-text h2:first-child {
    margin-top: 0;
}

.content-text p,
.contact-text p {
    margin-bottom: 18px;
}

.content-text .button {
    margin-top: 18px;
}

.contact-text strong {
    color: var(--ink);
}

.contact-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border-top: 1px solid var(--line);
    border-left: 1px solid var(--line);
}

.contact-list div {
    display: grid;
    gap: 8px;
    min-height: 132px;
    padding: 26px;
    color: var(--ink);
    background: var(--surface);
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.contact-list span {
    color: var(--muted);
}

.legal {
    max-width: 920px;
}

.site-footer {
    flex-shrink: 0;
    padding: 52px 40px;
    color: var(--soft);
    background: var(--ink);
    border-top: 1px solid var(--ink);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr repeat(3, 1fr);
    gap: 44px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-grid strong {
    color: var(--surface);
}

.footer-grid a,
.footer-grid span,
.footer-grid p {
    display: block;
    margin: 8px 0 0;
    color: #dedbd4;
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 60;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.modal.is-open {
    display: flex;
}

.modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 31, 31, 0.66);
}

.modal__panel {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    max-height: calc(100vh - 32px);
    margin: 0;
    overflow: auto;
    padding: 38px 38px 24px;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--ink);
}

.modal__panel h2 {
    margin: 0 58px 18px 0;
    font-size: 44px;
    line-height: 1.02;
}

.modal__close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
    cursor: pointer;
    font-size: 26px;
    line-height: 1;
}

.modal__subtitle {
    max-width: 500px;
    margin-bottom: 24px;
    color: var(--muted);
}

.modal label + label,
.placement-fields,
.check-line,
.form-message {
    margin-top: 18px;
}

.check-line {
    display: flex !important;
    grid-template-columns: none !important;
    align-items: flex-start;
    gap: 10px !important;
}

.check-line input {
    width: 18px;
    min-height: 18px;
    margin-top: 3px;
}

.modal__panel .button--full {
    margin: 30px auto 0;
}

.form-message {
    min-height: 0;
    margin-top: 12px;
    margin-bottom: 0;
    color: var(--accent);
}

.image-viewer {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.image-viewer.is-open {
    display: flex;
}

.image-viewer__overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 31, 31, 0.82);
}

.image-viewer__panel {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto 1fr;
    width: min(1100px, 100%);
    height: min(760px, calc(100vh - 48px));
    background: var(--surface);
    border: 1px solid var(--ink);
}

.image-viewer__tools {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px;
    border-bottom: 1px solid var(--line);
}

.image-viewer__tools button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    border: 1px solid var(--line);
    cursor: pointer;
    font-family: "Product Sans", "Segoe UI", Arial, sans-serif;
    font-size: 20px;
    line-height: 1;
}

.image-viewer__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
    padding: 18px;
    touch-action: none;
    cursor: grab;
    user-select: none;
}

.image-viewer__stage.is-dragging {
    cursor: grabbing;
}

.image-viewer__stage img {
    max-width: 100%;
    max-height: 100%;
    transform-origin: center center;
    will-change: transform;
    pointer-events: none;
    transition: transform 80ms ease;
}

@media (max-width: 1050px) {
    h1 {
        font-size: 58px;
    }

    h2 {
        font-size: 36px;
    }

    .site-header,
    .artwork-page,
    .artist-page,
    .place-page {
        grid-template-columns: 1fr;
    }

    .site-header {
        position: static;
    }

    .main-nav {
        justify-content: flex-start;
    }

    .art-grid,
    .steps,
    .steps--wide,
    .split,
    .footer-grid,
    .contact-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    h1 {
        font-size: 42px;
    }

    h2 {
        font-size: 30px;
    }

    .modal__panel h2 {
        font-size: 34px;
    }

    .hero {
        min-height: 560px;
        padding: 56px 20px;
        background:
            linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.84) 100%),
            url("https://aaanya.ru/wp-content/uploads/2021/12/Matreshka-1470x680.webp") center / cover no-repeat;
    }

    .page-hero,
    .section,
    .artwork-page,
    .artist-page,
    .place-page {
        padding: 34px 20px;
    }

    .site-header,
    .site-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .art-grid,
    .steps,
    .steps--wide,
    .split,
    .filters,
    .footer-grid,
    .contact-list,
    .person-card,
    .place-card,
    .details-list div {
        grid-template-columns: 1fr;
    }

    .section-head,
    .section-head--row {
        display: block;
    }

    .split > div {
        min-height: 0;
    }
}
