/*
Theme Name: Велес — регионы
Version: 1.0.0
*/

@import url("fonts/fonts.css");

:root {
    color-scheme: light;
    --ink: #25261f;
    --header: #20211b;
    --paper: #ffffff;
    --cream: #f5f2e9;
    --white: #fffaf2;
    --gold: #d8b681;
    --muted: #706b60;
    --edge: #e8e1d4;
    --radius: 24px;
    --wide: 1320px;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 Onest, Arial, sans-serif; }
a { color: inherit; text-underline-offset: .18em; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3 { margin: 0 0 .55em; line-height: 1.08; letter-spacing: -.035em; text-wrap: balance; }
h2 { font-size: clamp(1.65rem, 4vw, 2.75rem); }
p { margin: 0 0 1rem; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #a97c3d; outline-offset: 4px; }
.wrap { width: min(calc(100% - 40px), var(--wide)); margin-inline: auto; }
.skip { position: fixed; top: 1rem; left: 1rem; z-index: 10; background: var(--cream); padding: .6rem; transform: translateY(-230%); }
.skip:focus { transform: translateY(0); }

.site-header { position: relative; z-index: 3; max-width: var(--wide); width: calc(100% - 40px); margin: 16px auto 0; background: var(--header); color: var(--white); border-radius: 20px; box-shadow: 0 10px 30px #24231a22; }
.header-row { position: relative; display: flex; align-items: center; gap: clamp(.65rem, 1.25vw, 1.15rem); min-height: 86px; padding: 12px 17px; }
.brand { flex: 0 0 auto; display: inline-block; }
.brand img { width: clamp(100px, 11vw, 146px); }
.header-row a, .header-row summary, .menu-button { text-decoration: none; font-weight: 650; }
.city, .header-nav details { position: relative; }
.city { color: #e5dccb; }
.header-row summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: .55rem; list-style: none; }
.header-row summary::-webkit-details-marker { display: none; }
.header-row summary::after { content: ""; width: .38rem; height: .38rem; border: solid currentColor; border-width: 0 1px 1px 0; transform: rotate(45deg) translateY(-2px); }
.header-row details[open] > summary::after { transform: rotate(225deg); }
.header-row summary:hover, .header-nav > a:hover, .phone:hover { color: var(--gold); }
.header-nav { display: flex; align-items: center; gap: clamp(.6rem, 1.2vw, 1.15rem); font-size: .875rem; }
.dropdown { position: absolute; min-width: 14rem; max-width: min(19rem, 78vw); max-height: min(60dvh, 28rem); overflow: auto; top: calc(100% + .85rem); left: 0; display: grid; gap: .1rem; padding: .55rem; background: var(--header); border: 1px solid #555345; border-radius: 14px; box-shadow: 0 10px 28px #17181048; }
.dropdown a { padding: .45rem .75rem; border-radius: 8px; }
.dropdown a:hover { color: var(--gold); background: #ffffff10; }
.phone { margin-left: auto; white-space: nowrap; font-size: .92rem; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .8rem 1.15rem; color: var(--ink); background: var(--gold); border: 1px solid transparent; border-radius: 13px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; }
.button:hover { background: #ebcca1; }
.button-light { background: var(--white); }
.button-light:hover { background: #eee3d0; }
.nav-cta { white-space: nowrap; font-size: .78rem; }
.menu-button { display: none; color: var(--white); background: #ffffff12; border: 1px solid #ffffff44; border-radius: 11px; width: 42px; height: 42px; align-content: center; justify-items: center; gap: 5px; cursor: pointer; }
.menu-button span { width: 16px; height: 2px; background: currentColor; }

.home-cover { position: relative; isolation: isolate; width: min(calc(100% - 24px), 1680px); margin: 12px auto 0; border-radius: 27px; background: #31332a; color: var(--white); }
.cover-photo { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; object-position: center; }
.home-cover .cover-photo { position: absolute; z-index: -2; width: 100%; height: 100%; border-radius: 27px; }
.home-cover::before { content: ""; position: absolute; z-index: -1; inset: 0; border-radius: inherit; background: linear-gradient(90deg, #1b1d17e8, #20231ac0 42%, #27282350 100%); }
.home-cover .site-header { position: static; box-shadow: none; width: min(calc(100% - clamp(40px, 9vw, 140px)), var(--wide)); background: transparent; border-bottom: 1px solid #fffaf23c; border-radius: 0; margin-top: 0; }
.home-cover .header-row { position: static; padding-inline: 0; min-height: 89px; }
.home-cover .nav-cta { display: none; }
.home-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); align-items: start; gap: clamp(22px, 5vw, 78px); width: min(calc(100% - clamp(40px, 9vw, 140px)), var(--wide)); margin-inline: auto; min-height: min(590px, 72svh); padding: clamp(1rem, 3vw, 2.75rem) 0 clamp(2.25rem, 8vw, 6.8rem); }
.eyebrow { color: #e8c999; text-transform: uppercase; letter-spacing: .105em; font-weight: 700; font-size: .79rem; }
.home-copy h1 { font-size: clamp(2.55rem, 5.3vw, 5.3rem); line-height: .99; max-width: 15ch; margin-bottom: .35em; letter-spacing: -.055em; }
.home-intro { max-width: 45ch; font-size: clamp(1rem, 1.8vw, 1.38rem); line-height: 1.45; color: #f6edde; }
.material-links, .hero-links, .catalog-index { display: flex; flex-wrap: wrap; gap: .65rem; margin-bottom: .9rem; }
.material-links a, .catalog-index a { padding: .9rem 1rem; border-radius: 13px; border: 1px solid #fffaf25e; font-size: .93rem; font-weight: 650; text-decoration: none; }
.material-links a:hover { background: #fffaf227; }
.material-links a::after { content: "↗"; margin-left: .6rem; }
.hero-links .button { min-height: clamp(3.3rem, 5.6vw, 5rem); min-width: min(100%, 13rem); }
.heritage-link { color: #f1dfc6; font-size: .95rem; }
.heritage-link a::after { content: " ↗"; }

.page-head { padding-top: clamp(1.5rem, 3vw, 2.65rem); }
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; font-size: .88rem; color: var(--muted); margin: 0 clamp(0px, 2.5vw, 32px) clamp(1.25rem, 3vw, 2.45rem); }
.breadcrumbs a { text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs [aria-current] { font-weight: 650; }
.page-head h1 { padding: clamp(1.35rem, 3.1vw, 2.4rem) clamp(1.2rem, 2.2vw, 2rem); background: var(--cream); border: 1px solid var(--edge); border-radius: var(--radius); font-size: clamp(2rem, 4vw, 3.7rem); margin: 0; }
.page-cover { margin: clamp(1.15rem, 2.6vw, 2rem) clamp(0px, 1.8vw, 24px) 0; border-radius: var(--radius); border: 1px solid var(--edge); overflow: hidden; background: var(--cream); }
.page-cover img { width: 100%; max-height: min(540px, 65svh); object-fit: contain; }
.content { padding-block: clamp(1.5rem, 3.3vw, 3rem) clamp(2rem, 6vw, 5rem); }
.content > :is(p, ul, ol), .editorial > :is(p, ul, ol) { max-width: 75ch; }
.content > :is(h2, h3):not(:first-child) { margin-top: 2.1rem; }
.content li + li { margin-top: .45rem; }
.publication-list { display: grid; gap: 1rem; list-style: none; margin: 1.5rem 0 0; padding: 0; }
.publication-list li { padding: 1.25rem 1.5rem; border-radius: 16px; border: 1px solid var(--edge); background: var(--cream); }
.publication-list h2 { font-size: clamp(1.18rem, 2vw, 1.6rem); }
.publication-list p { margin-bottom: 0; }
.project-video { display: block; max-width: 100%; border-radius: 16px; margin: 1rem 0; }
.editorial { background: var(--cream); border: 1px solid var(--edge); border-radius: var(--radius); padding: clamp(1.2rem, 3vw, 2.4rem); margin-bottom: clamp(1.4rem, 4vw, 2.8rem); }
.editorial :last-child { margin-bottom: 0; }
.home-catalog, .photo-section { margin-top: clamp(2rem, 4vw, 4rem); }
.section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.catalog-index { margin-bottom: 1.7rem; }
.catalog-index a { background: var(--cream); border-color: var(--edge); }
.catalog-index a:hover { border-color: var(--gold); }
.catalog-index a span { margin-left: .4rem; }
.catalog-group + .catalog-group { margin-top: clamp(2.25rem, 6vw, 5rem); }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(12px, 2vw, 26px); margin: 0; padding: 0; list-style: none; }
.grid > li { margin: 0; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--edge); background: var(--cream); }
.grid a { display: block; height: 100%; text-decoration: none; }
.grid a:focus-visible { outline-offset: -4px; }
.grid img { width: 100%; aspect-ratio: 1.28; object-fit: cover; }
.card-copy { padding: clamp(1.15rem, 2.4vw, 2rem); display: grid; gap: .9rem; }
.card-copy strong { font-size: clamp(1.15rem, 2vw, 1.62rem); line-height: 1.2; }
.card-more { font-weight: 650; font-size: .92rem; }
.card-more span { margin-left: .2rem; }
.catalog-card a:hover .card-more { text-decoration: underline; }

.lead-section { margin-block: 0 clamp(2rem, 5vw, 4rem); padding: clamp(1.25rem, 3vw, 2.5rem); border: 1px solid var(--edge); border-radius: var(--radius); color: var(--ink); background: var(--cream); }
.home-layout .lead-section { width: 100%; margin: .4rem 0 0; padding: clamp(1.25rem, 2.5vw, 2rem); background: #f8f5ec; }
.home-layout .lead-section h2 { font-size: clamp(1.7rem, 2.9vw, 2.3rem); }
.lead-form { display: grid; gap: .68rem; max-width: 42rem; }
.lead-form + h2 { margin-top: 2rem; }
.lead-form label { display: grid; gap: .2rem; font-size: .87rem; }
.lead-form input:not([type=checkbox]), .lead-form textarea { width: 100%; padding: .52rem .7rem; min-height: 44px; border: 1px solid #d8cebd; border-radius: 11px; background: #fffdf9; color: var(--ink); font: inherit; }
.home-layout textarea { max-height: 72px; min-height: 56px; }
.lead-form .lead-trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.lead-form .lead-consent { display: flex; gap: .55rem; align-items: start; color: var(--muted); }
.lead-form .button { justify-content: center; }
.lead-status { color: #374f2d; }

.site-footer { background: var(--ink); color: #f5f0e7; }
.footer-row { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1fr 1.3fr; gap: clamp(1rem, 2.5vw, 2.1rem); padding-block: clamp(2rem, 5vw, 3.75rem); }
.footer-row p { margin: 1.1rem 0 0; color: #d0c9b9; font-size: .9rem; }
.footer-row strong { display: block; color: var(--gold); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 1rem; }
.footer-row a { display: block; margin-bottom: .55rem; font-size: .89rem; text-decoration: none; overflow-wrap: anywhere; }
.footer-row a:hover { color: var(--gold); }

@media (max-width: 1080px) {
    .nav-cta { display: none; }
    .header-row { gap: .75rem; }
}

@media (max-width: 860px) {
    .site-header, .wrap { width: calc(100% - 24px); }
    .header-row { min-height: 68px; flex-wrap: wrap; }
    .home-cover .header-row { min-height: 68px; }
    .has-menu-button .menu-button { display: grid; }
    .header-nav { width: 100%; order: 5; flex-wrap: wrap; padding-block: .5rem; }
    .header-nav .dropdown { position: static; margin-top: .5rem; }
    .has-menu-button:not(.menu-open) .header-nav { display: none; }
    .home-cover .site-header, .home-layout { width: calc(100% - 40px); }
    .home-layout { gap: 1rem; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .header-row { gap: .5rem; padding-inline: .7rem; }
    .site-header { margin-top: 12px; }
    .header-row .phone, .city { font-size: .77rem; }
    .brand img { width: 94px; }
    .city .dropdown { left: auto; right: 0; }
    .menu-button { width: 33px; height: 33px; }
    .dropdown { min-width: 12rem; }
    .home-layout { grid-template-columns: 1fr; padding-top: 1.35rem; }
    .home-layout .lead-section { margin-top: .6rem; }
    .home-copy h1 { max-width: 100%; }
    .hero-links .button { min-width: 0; }
    .breadcrumbs { gap: .45rem; }
    .footer-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-contacts { grid-column: 1 / -1; }
}

@media (max-width: 380px) {
    .brand img { width: 78px; }
    .header-row .city { font-size: .72rem; }
    .grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
    .header-row .phone { display: grid; place-items: center; width: 31px; height: 33px; font-size: 0; color: var(--gold); }
    .header-row .phone::before { content: "☎"; font-size: 1.1rem; }
}
