:root {
    --bg: #f8fafc;
    --text: #0f172a;
    --muted: #475569;
    --line: #e2e8f0;
    --card: #ffffff;
    --dark: #111827;
    --accent: #1f2937;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.section { padding: 72px 0; }
@media (min-width: 769px) {
    .hero {
       position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(circle at 82% 18%, rgba(37, 99, 235, 0.045), transparent 24%),
        radial-gradient(circle at 20% 10%, rgba(148, 163, 184, 0.05), transparent 22%),
        linear-gradient(180deg, #f8fafc 0%, #f5f7fa 100%);
    }
}
.grid { display: grid; gap: 24px; }
.hero-grid { grid-template-columns: 1.2fr 0.8fr; align-items: center; }
.lead-grid { grid-template-columns: 1.1fr .9fr; }
.badge {
    display: inline-block;
    padding: 10px 16px;
    background: #f1f5f9;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 14px;
}

h1, h2, h3 { margin: 0 0 16px; line-height: 1.2; }
h1 { font-size: 48px; max-width: 760px; }
h2 { font-size: 34px; }
h3 { font-size: 22px; }
p { margin: 0 0 14px; color: var(--muted); }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.btn {
    display: inline-block;
    padding: 14px 22px;
    border-radius: 16px;
    font-weight: 700;
    border: 1px solid transparent;
}
.btn-dark { background: var(--dark); color: #fff; }
.btn-light {
    background: #fff;
    border-color: #cbd5e1;
    color: var(--text);
}

button.btn,
input.btn,
button.btn-light,
input.btn-light,
button.btn-dark,
input.btn-dark {
    -webkit-appearance: none;
    appearance: none;
    font: inherit;
    line-height: 1.2;
}

button.btn-light,
input.btn-light {
    color: var(--text);
}

button.btn-dark,
input.btn-dark {
    color: #fff;
}

.stats, .cards { display: grid; gap: 18px; }
.stats { grid-template-columns: repeat(3, 1fr); margin-top: 28px; }
.stat, .card {
    background: var(--card);
    border-radius: 24px;
    padding: 24px;
    border: 1px solid var(--line);
}

.dark-card {
    background: var(--dark);
    color: #fff;
    border-radius: 24px;
    padding: 26px;
}
.dark-card p, .dark-card .muted { color: #cbd5e1; }

.hero-aside {
    display: grid;
    gap: 14px;
}
.photo-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.photo-card img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 22px;
}
.photo-caption {
    margin-top: 14px;
}

.photo-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.photo-role {
    margin-top: 6px;
    font-size: 14px;
    color: var(--muted);
    line-height: 1.5;
}
.hero-photo-mobile {
    display: none;
    margin: 20px 0 0;
}
.desktop-photo { display: block; }

.services {
    grid-template-columns: repeat(2, 1fr);
}
.cases {
    grid-template-columns: repeat(3, 1fr);
}
.case { background: #e2e8f0; border: 0; }
.step { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex: 0 0 40px;
}

form input, form textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid #334155;
    background: rgba(255,255,255,.08);
    color: #fff;
    margin-top: 8px;
}
form textarea { min-height: 120px; resize: vertical; }
form label {
    display: block;
    font-size: 14px;
    color: #cbd5e1;
    margin-top: 14px;
}

.flash {
    padding: 14px 18px;
    border-radius: 16px;
    background: #dcfce7;
    color: #166534;
    margin-bottom: 18px;
    border: 1px solid #86efac;
}

.admin-box {
    max-width: 1120px;
    margin: 40px auto;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 24px;
}
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-box input, .admin-box textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    margin-top: 6px;
    color: #0f172a;
    background: #fff;
}
.admin-box input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #111827;
}

table { width: 100%; border-collapse: collapse; margin-top: 20px; }
th, td {
    border-bottom: 1px solid var(--line);
    padding: 12px 10px;
    text-align: left;
    vertical-align: top;
}
.footer { background: #fff; border-top: 1px solid var(--line); }

@media (max-width: 900px) {
    h1 { font-size: 36px; }
    h2 { font-size: 28px; }
    .hero-grid, .services, .cases, .stats, .admin-grid { grid-template-columns: 1fr; }
    .section { padding: 56px 0; }
}

@media (max-width: 768px) {
    body { font-size: 16px; }
    .container { width: min(100% - 24px, 1120px); }
    .section { padding: 44px 0; }
    h1 { font-size: 32px; line-height: 1.15; }
    h2 { font-size: 26px; }
    h3 { font-size: 20px; }
    p[style*="font-size:20px"] { font-size: 17px !important; }
    .badge { font-size: 13px; padding: 8px 12px; }
    .buttons { flex-direction: column; align-items: stretch; }
    .btn { width: 100%; text-align: center; padding: 14px 18px; }
    .stats, .cards, .services, .cases, .admin-grid { grid-template-columns: 1fr; }
    .lead-grid { grid-template-columns: 1fr; }
    .stat, .card, .dark-card, .photo-card { padding: 20px; border-radius: 20px; }
    .photo-card { padding: 12px; }
    .hero-aside { gap: 14px; }
    .hero-grid { grid-template-columns: 1fr; gap: 20px; }
    .step { gap: 12px; }
    .step-num { width: 36px; height: 36px; flex-basis: 36px; }
    table, thead, tbody, th, td, tr { display: block; }
    thead { display: none; }
    table { margin-top: 14px; }
    tr {
        border: 1px solid var(--line);
        border-radius: 16px;
        padding: 10px;
        margin-bottom: 12px;
        background: #fff;
    }
    td {
        border: 0;
        padding: 6px 0;
    }
    td::before {
        content: attr(data-label) ': ';
        font-weight: 700;
        color: #0f172a;
    }
    .desktop-photo { display: none; }
    .hero-photo-mobile { display: block; }
    #lead-form { padding: 18px; }
    .photo-name {
        font-size: 18px;
    }

    .photo-role {
        font-size: 13px;
    }
}

@media (max-width: 560px) {
    .container { width: min(100% - 20px, 1120px); }
    .section { padding: 36px 0; }
    h1 { font-size: 28px; }
    h2 { font-size: 24px; }
    .badge { line-height: 1.4; }
    .stat, .card, .dark-card { padding: 18px; }
    form input, form textarea { padding: 12px 14px; }
    .admin-box { margin: 20px 10px; padding: 18px; border-radius: 18px; }
    #lead-form { padding: 16px; }
}
.yandex-direct-inline {
    display: inline-block;
    white-space: nowrap;
    vertical-align: baseline;
}

.yandex-direct-inline img {
    width: 0.82em;
    height: 0.82em;
    display: inline-block;
    vertical-align: -0.08em;
    margin: 0 0.06em;
}
.about-me-block {
    background: #ffffff;
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 36px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}
.about-me-block a {
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.about-me-block a:hover {
    opacity: 0.85;
}

.about-me-content {
    max-width: 820px;
}

.about-me-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #eef2f7;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.about-me-block h2 {
    margin-bottom: 18px;
}

.about-me-block p {
    font-size: 18px;
    line-height: 1.75;
    margin-bottom: 14px;
}

@media (max-width: 768px) {
    .about-me-block {
        padding: 24px;
        border-radius: 22px;
    }

    .about-me-block p {
        font-size: 16px;
        line-height: 1.65;
    }
}

.hero-about-me {
    margin-top: 18px;
}

.hero-about-me-left {
    max-width: 760px;
}

.hero-about-me-left .about-me-content {
    max-width: 100%;
}

.hero-about-me-left h2 {
    font-size: 28px;
    line-height: 1.2;
    margin-bottom: 16px;
}

.hero-about-me-left p {
    font-size: 17px;
    line-height: 1.7;
}