/* Базовые стили статического сайта De Facto (версия для модерации эквайринга).
   Адаптация app.css портала: убраны компоненты приложения (формы, модалки, степпер),
   добавлены навигация, список услуг и типографика документов. Mobile-first. */

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

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--text-m);
    line-height: 1.55;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    margin: 0 0 var(--gap-m);
    color: var(--text);
}

h1 {
    font-size: var(--text-xxl);
}

h2 {
    font-size: var(--text-xl);
}

h3 {
    font-size: var(--text-l);
}

p {
    margin: 0 0 var(--gap-m);
}

a {
    color: var(--accent);
}

a:hover {
    text-decoration: none;
}

ul,
ol {
    padding-left: var(--gap-l);
}

/* --- каркас --- */

.container {
    width: 100%;
    max-width: 64rem;
    margin: 0 auto;
    padding: 0 var(--gap-m);
}

.site-main {
    flex: 1 0 auto;
    padding: var(--gap-l) 0 var(--gap-xl);
}

/* --- шапка --- */

.site-header {
    border-bottom: 1px solid var(--line);
    background: var(--surface);
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--gap-s) var(--gap-m);
    padding: var(--gap-m) 0;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: var(--text-l);
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

.site-logo span {
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: var(--text-s);
    display: block;
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-s) var(--gap-m);
    font-size: var(--text-s);
}

.site-nav a {
    color: var(--text-muted);
    text-decoration: none;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
    color: var(--accent);
}

.site-header__phone {
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    white-space: nowrap;
}

/* --- подвал --- */

.site-footer {
    flex-shrink: 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: var(--gap-l) 0;
    color: var(--text-muted);
    font-size: var(--text-s);
}

.site-footer__grid {
    display: grid;
    gap: var(--gap-l);
}

.site-footer h3 {
    font-size: var(--text-m);
    color: var(--text);
}

.site-footer ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: var(--gap-s);
}

.site-footer__note {
    margin-top: var(--gap-l);
    padding-top: var(--gap-m);
    border-top: 1px solid var(--line);
    color: var(--text-faint);
}

/* --- герой --- */

.hero {
    padding: var(--gap-xl) 0 var(--gap-l);
}

.hero__title {
    max-width: 40rem;
}

.hero__lead {
    color: var(--text-muted);
    font-size: var(--text-l);
    max-width: 40rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-s);
    margin-top: var(--gap-l);
}

/* --- секции --- */

.section {
    padding: var(--gap-l) 0;
}

.section__title {
    margin-bottom: var(--gap-l);
}

/* --- каталог услуг --- */

.catalog-grid {
    display: grid;
    gap: var(--gap-m);
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: var(--gap-l);
    display: flex;
    flex-direction: column;
    gap: var(--gap-s);
}

.service-card__title {
    margin: 0;
    font-size: var(--text-l);
}

.service-card__desc {
    color: var(--text-muted);
    font-size: var(--text-s);
    flex: 1 0 auto;
}

.service-card__price {
    font-weight: 600;
    font-size: var(--text-l);
    color: var(--accent);
}

/* --- блок «напишите нам» --- */

.write-us {
    background: var(--surface-raised);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: var(--gap-l);
    display: grid;
    gap: var(--gap-m);
}

.write-us__title {
    margin: 0;
}

.write-us__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap-s);
}

/* --- кнопки --- */

.c-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap-s);
    min-height: var(--control-height);
    padding: 0 var(--control-padding-x);
    border-radius: var(--radius-m);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    width: 100%; /* mobile-first: кнопка на всю ширину */
}

.c-btn--primary {
    background: var(--accent);
    color: var(--accent-contrast);
}

.c-btn--primary:hover {
    filter: brightness(1.08);
}

.c-btn--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--text);
}

.c-btn--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* --- плашка --- */

.c-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--gap-xs);
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    font-size: var(--text-s);
    font-weight: 600;
    border: 1px solid var(--accent);
    color: var(--accent);
}

/* --- реквизиты --- */

.requisites {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-l);
    padding: var(--gap-l);
}

.requisites dl {
    margin: 0;
    display: grid;
    gap: var(--gap-s);
}

.requisites dt {
    color: var(--text-faint);
    font-size: var(--text-s);
}

.requisites dd {
    margin: 0;
}

/* --- документ (оферта, политика) --- */

.doc {
    max-width: 48rem;
}

.doc h2 {
    font-size: var(--text-l);
    margin-top: var(--gap-xl);
}

.doc p,
.doc li {
    color: var(--text-muted);
}

.doc .doc__updated {
    color: var(--text-faint);
    font-size: var(--text-s);
}

/* --- десктоп --- */

@media (min-width: 48rem) {
    :root {
        --text-xxl: 2.5rem;
        --text-xl: 1.75rem;
    }

    .c-btn {
        width: auto;
    }

    .site-footer__grid {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .catalog-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-card .c-btn {
        align-self: flex-start;
    }
}
