@font-face {
    font-family: Manrope;
    src: url("fonts/manrope-cyrillic.woff2") format("woff2");
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
    font-family: Manrope;
    src: url("fonts/manrope-latin-ext.woff2") format("woff2");
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: Manrope;
    src: url("fonts/manrope-latin.woff2") format("woff2");
    font-style: normal;
    font-weight: 200 800;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
:root {
    color-scheme: light;
    --ink: #152238;
    --brand-blue: #234c72;
    --blue-hover: #193956;
    --deep: #101e32;
    --gold: #f0c987;
    --gold-border: #bd9151;
    --gold-ink: #765018;
    --paper: #f5f8fc;
    --line: #dbe4ef;
    --muted: #4b5d73;
    --panel-radius: 1.2rem;
    --panel-shadow: 0 2px 5px #152b4510, 0 14px 36px #152b450e;
    font-family: Manrope, "Segoe UI", system-ui, sans-serif;
    color: var(--ink);
    background: var(--paper);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; line-height: 1.55; }
a { color: inherit; text-underline-offset: .22em; }
img { display: block; width: 100%; object-fit: cover; }
h1, h2, h3, p, figure, blockquote { margin: 0; }
h1, h2, h3 { line-height: 1.1; font-weight: 720; }
h1 { font-size: clamp(2.35rem, 5.5vw, 5rem); letter-spacing: -.055em; }
h2 { font-size: clamp(2.2rem, 4.5vw, 4rem); letter-spacing: -.045em; }
h3 { font-size: clamp(1.4rem, 2vw, 1.85rem); letter-spacing: -.025em; }
:focus-visible { outline: 3px solid #bd782b; outline-offset: 4px; }
.wrap { width: min(100% - 3rem, 76rem); margin-inline: auto; }
.skip { position: absolute; transform: translateY(-150%); z-index: 3; padding: .5rem 1rem; background: white; }
.skip:focus { transform: translateY(0); }
.header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row, .footer-row { min-height: 5.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; }
.brand { display: inline-flex; align-items: center; gap: .8rem; text-decoration: none; font-size: 1.12rem; font-weight: 750; line-height: 1.12; }
.brand small { display: block; font-size: .82rem; font-weight: 450; line-height: 1.5; opacity: .85; }
.brand-mark {
    display: grid;
    place-items: center;
    width: 2.75rem;
    aspect-ratio: 1;
    flex: none;
    border: 1px solid var(--gold-border);
    border-radius: 50%;
    background: radial-gradient(circle at 28% 18%, var(--brand-blue), var(--deep) 82%);
    color: var(--gold);
    box-shadow: inset 0 0 0 2px var(--deep), inset 0 0 0 3px #edc47e65;
}
.brand-mark svg { width: 64%; height: 64%; }
.nav { display: flex; flex-wrap: wrap; gap: .25rem clamp(.35rem, 1.35vw, 1.25rem); }
.nav a, .header-phone { text-decoration: none; font-weight: 600; white-space: nowrap; }
.nav a { padding: .45rem .65rem; border-radius: .55rem; }
.nav a:hover, .header-phone:hover { background: #eaf1f8; color: var(--blue-hover); }
.header-phone { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: .7rem; }
.header-contacts, .header-messengers { display: flex; align-items: center; gap: .25rem; }
.header-contacts { flex-wrap: wrap; gap: .35rem .5rem; }
.header-messengers a { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: .45rem; }
.header-messengers a:hover { background: #eaf1f8; }
.header-messengers img { width: 1.25rem; height: 1.25rem; object-fit: contain; }
.header-messengers img[src="svg/Max_logo.svg"] { background: #6554df; border-radius: .3rem; padding: .2rem; }
.hero, .contact-section { background: var(--brand-blue); color: var(--paper); }
.hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 88% 5%, #254b68, transparent 62%),
        linear-gradient(115deg, #0c1728, #142b44);
}
.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image: linear-gradient(90deg, #a8d8ff24 1px, transparent 1px),
        linear-gradient(#a8d8ff24 1px, transparent 1px);
    background-size: 44px 44px;
    mask-image: linear-gradient(115deg, transparent 22%, #0008 60%, #000);
}
.hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    inset: -20% -15%;
    pointer-events: none;
    background: radial-gradient(ellipse at 70% 70%, #4b93bd35, transparent 43%);
    animation: hero-glow 18s ease-in-out infinite alternate;
}
@keyframes hero-glow {
    from { transform: translate(-6%, 6%); }
    to { transform: translate(8%, -10%); }
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(2rem, 5vw, 5rem); align-items: center; padding-block: clamp(3rem, 6.5vw, 6.5rem); }
.eyebrow { color: #b4cfe4; text-transform: uppercase; font-size: .875rem; letter-spacing: .14em; font-weight: 650; margin-bottom: 1.5rem; }
.hero h1 { font-size: clamp(2.35rem, 5.2vw, 4.65rem); }
.hero h1 em { color: var(--gold); font-style: normal; font-weight: 590; }
.intro { max-width: 33rem; color: #edf0ff; font-size: 1.125rem; margin-top: 1.6rem; }
.actions { display: flex; gap: .7rem; flex-wrap: wrap; margin-top: 2rem; }
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 3.25rem;
    padding: .75rem 1.2rem;
    border: 1px solid transparent;
    border-radius: .75rem;
    font: inherit;
    font-weight: 750;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.primary { background: linear-gradient(180deg, #ffe0a8, var(--gold)); color: var(--deep); box-shadow: 0 4px 0 #946c3d, 0 8px 22px #0a172630; }
.button.primary { position: relative; }
.outline { border-color: #afcde56b; color: var(--paper); background: #bfddff12; }
.outline:hover { background: #bfddff24; }
.dark { background: var(--brand-blue); color: white; box-shadow: 0 4px 0 #112c46, 0 8px 20px #142c4920; }
.dark:hover { background: var(--blue-hover); }
.button:not(:disabled):active { transform: translateY(3px); box-shadow: 0 1px 2px #101e3250; }
.hero-photo {
    padding: .6rem;
    border: 1px solid #abcee24d;
    border-radius: 1.45rem;
    background: #bddfff14;
    box-shadow: 0 24px 50px #050c1855, inset 0 1px #ffffff22;
}
.hero-photo-frame { overflow: hidden; border-radius: 1rem; }
.hero-photo img { aspect-ratio: 1.23; height: auto; object-position: 53% center; }
.hero-photo figcaption { padding: .85rem .5rem .5rem; color: #e1edf8; text-align: center; font-size: .92rem; }
.section { padding-block: clamp(3.4rem, 7vw, 7rem); }
.section-heading { margin-bottom: 2rem; }
.section-heading p { margin-top: .75rem; max-width: 37rem; color: var(--muted); font-size: 1.08rem; }
.section-heading .button { margin-top: 1.5rem; }
.service-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.25rem; }
.service-card, .review, .yandex-reviews, .detail-side {
    border: 1px solid var(--line);
    border-radius: var(--panel-radius);
    background: #fff;
    box-shadow: var(--panel-shadow);
}
.service-card { transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.service-card:hover, .service-card:focus-within { border-color: #829fb8; box-shadow: 0 16px 34px #17365224; }
.service-card a { display: flex; flex-direction: column; height: 100%; border-radius: inherit; overflow: hidden; text-decoration: none; }
.service-card img {
    aspect-ratio: 1.9;
    filter: brightness(var(--photo-brightness, 1)) saturate(var(--photo-saturation, 1));
}
.service-card img[src$="/practice-arbitration.jpg"] { --photo-brightness: 1.12; --photo-saturation: .85; }
.service-card img[src$="/practice-bankruptcy.jpg"] { --photo-brightness: 1.04; --photo-saturation: .78; }
.service-card img[src$="/practice-civil-rights.jpg"] { --photo-brightness: 1.12; --photo-saturation: .9; }
.service-card img[src$="/practice-deregistration.jpg"] { --photo-brightness: 1.05; --photo-saturation: .83; }
.service-card img[src$="/practice-family.jpg"] { --photo-brightness: 1.06; --photo-saturation: .78; }
.service-card img[src$="/practice-inheritance.jpg"] { --photo-brightness: 1.03; --photo-saturation: .88; }
.service-card img[src$="/practice-property-registration.jpg"] { --photo-brightness: 1.06; --photo-saturation: .8; }
.service-card img[src$="/practice-real-estate.jpg"] { --photo-brightness: 1.03; --photo-saturation: .84; }
.card-copy { padding: 1.2rem; display: flex; flex-direction: column; flex: 1; }
.card-copy p { color: var(--muted); margin: .75rem 0 1.2rem; }
.more { align-self: flex-start; margin-top: auto; padding: .45rem .7rem; border-radius: .55rem; background: #edf3f9; color: var(--brand-blue); font-weight: 750; font-size: .9rem; }
.service-card a:hover .more, .service-card a:focus-visible .more { background: var(--brand-blue); color: #fff; }
.tinted { background: linear-gradient(135deg, #e7eff8, #f1f5fb); border-block: 1px solid var(--line); }
.split { display: grid; grid-template-columns: .72fr 1.28fr; gap: clamp(2rem, 6vw, 6rem); }
.price-list { margin: 0; align-self: start; padding-inline: clamp(1rem, 3vw, 1.75rem); border: 1px solid var(--line); border-radius: var(--panel-radius); background: #fff; box-shadow: var(--panel-shadow); }
.price-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem 1.2rem; padding: 1.1rem 0; }
.price-row + .price-row { border-top: 1px solid var(--line); }
.price-row dt span { display: block; color: var(--muted); margin-top: .25rem; }
.price-row dd { margin: 0; font-weight: 700; color: var(--brand-blue); }
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.yandex-reviews { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem 2rem; margin-top: 1.5rem; padding: clamp(1rem, 3vw, 2rem); }
.yandex-rating { margin-top: .5rem; color: var(--muted); }
.yandex-rating strong { color: var(--brand-blue); font-size: 2.25rem; line-height: 1.1; }
.yandex-rating-badge { display: block; width: 150px; max-width: 100%; height: 100px; border: 0; }
.review { padding: clamp(1.25rem, 3vw, 2rem); display: flex; flex-direction: column; gap: 1rem; }
.stars { color: var(--gold-ink); letter-spacing: .12em; }
.review blockquote { white-space: pre-line; }
.review figcaption { margin-top: auto; font-weight: 650; }
.review figcaption span { margin-left: .8rem; font-weight: 400; color: var(--muted); }
.contact-section { background: radial-gradient(ellipse at 85% 15%, #2a506d, transparent 65%), var(--deep); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 7vw, 6rem); }
.contact-copy > a { display: block; width: fit-content; }
.contact-phone { font-size: clamp(1.6rem, 4vw, 2.7rem); font-weight: 650; text-decoration: none; margin: 1rem 0 .25rem; color: var(--gold); }
.contact-copy address { margin-top: 1.5rem; font-style: normal; }
.contact-copy p { margin-top: 1rem; }
.messengers { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1.5rem; }
.messengers a { padding: .5rem .7rem; border: 1px solid #b2cce177; border-radius: .65rem; text-decoration: none; background: #aacdf216; }
.messengers a:hover { background: var(--blue-hover); }
.feedback { background: var(--paper); color: var(--ink); padding: clamp(1.2rem, 4vw, 2.25rem); display: grid; gap: .85rem; scroll-margin-top: 1rem; }
.contact-section .feedback { background: #fff; border-radius: var(--panel-radius); box-shadow: 0 20px 50px #040d204d; }
.feedback h3 { margin-bottom: .4rem; }
.feedback label { display: grid; gap: .3rem; font-weight: 600; }
.feedback input, .feedback textarea { width: 100%; border: 1px solid #879ab0; border-radius: .6rem; background: #f8fafd; color: var(--ink); font: inherit; font-weight: 400; padding: .65rem .75rem; }
.feedback input:focus, .feedback textarea:focus { background: #fff; }
.feedback textarea { resize: vertical; }
.form-note { color: var(--muted); font-size: .9rem; }
.feedback button { justify-self: start; }
.feedback button:disabled { opacity: .65; cursor: wait; }
#form-status[data-error] { color: #932c20; }
.footer { background: var(--deep); color: var(--paper); }
.footer-row { padding-block: 1.2rem; flex-wrap: wrap; }
.detail { padding-block: 3rem 6rem; min-height: 70vh; }
.detail h1 { margin: 1.1rem 0 2rem; overflow-wrap: anywhere; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .85fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.detail-text { max-width: 68ch; font-size: 1.1rem; overflow-wrap: anywhere; }
.detail-side img { aspect-ratio: 1.65; border-radius: var(--panel-radius) var(--panel-radius) 0 0; }
.detail-side div { padding: 1.25rem; }
.detail-side h2 { font-size: 1.7rem; margin-bottom: 1rem; }
.detail-phone { display: block; margin-top: .85rem; }
.admin h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); }
.admin h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-top: 1.5rem; }
.admin-error { padding: .75rem; color: #8b231b; border: 1px solid currentColor; margin-block: 1rem; }
.admin-form { padding-inline: 0; max-width: 42rem; }
.admin-toolbar, .admin-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem; }
.admin-toolbar { justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 1rem; }
.admin-toolbar .nav { order: 0; width: auto; }
.admin-toolbar [aria-current] { text-decoration: underline; }
.admin-actions { margin-top: .8rem; }
.admin-list { padding: 0; list-style: none; }
.admin-list li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.admin-delete { margin-top: 1rem; color: #8b231b; }
.admin-delete summary { cursor: pointer; }
.admin-delete button { margin-top: .5rem; border-color: currentColor; }
@media (max-width: 64rem) {
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .header-row { flex-wrap: wrap; padding-block: 1rem; gap: .7rem 1rem; }
    .nav { order: 3; width: 100%; }
}
@media (max-width: 45rem) {
    .hero::before { mask-image: linear-gradient(165deg, transparent 42%, #000 100%); }
    .wrap { width: calc(100% - 2rem); }
    .hero-grid, .split, .contact-grid, .detail-grid { grid-template-columns: 1fr; }
    .hero-photo img { aspect-ratio: 1.6; }
    .review-grid { grid-template-columns: 1fr; }
    .nav { gap: .25rem .65rem; }
    .nav a { padding: .4rem .35rem; }
}
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .messengers a { position: relative; transition: transform .18s ease; }
    .button:not(:disabled):hover:not(:active), .service-card:hover, .messengers a:hover:not(:active) { transform: translateY(-2px); }
    /* Keep the original bottom edge inside the hover area during the lift. */
    .button.primary:not(:disabled):hover:not(:active)::after, .messengers a:hover:not(:active)::after {
        content: "";
        position: absolute;
        inset: 100% -1px auto;
        height: 3px;
    }
}
@media (prefers-reduced-motion: reduce) {
    .hero::after { animation: none; }
    .button, .service-card { transition: none; }
    .button:not(:disabled):active { transform: none; }
}
@media (max-width: 31rem) {
    .service-grid, .price-row { grid-template-columns: 1fr; }
    .actions { flex-direction: column; align-items: stretch; }
    .header-phone { font-size: .9rem; }
    .brand { font-size: 1.05rem; gap: .45rem; }
    .brand-mark { width: 2rem; }
}
