/* АСУ СП «Мегаполис» — сайт-визитка */

:root {
    --bg: #f8fafc;
    --surface: #ffffff;
    --primary: #1e3a8a;
    --primary-hover: #1e40af;
    --accent: #0891b2;
    --text: #1f2937;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --green: #16a34a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PT Sans", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* === Header === */
header.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
}

.brand {
    display: flex;
    flex-direction: column;
    gap: 2px;
    text-decoration: none;
    color: var(--text);
}

.brand:hover {
    text-decoration: none;
}

.brand-name {
    font-weight: 700;
    font-size: 18px;
    color: var(--primary);
}

.brand-tagline {
    font-size: 12px;
    color: var(--text-muted);
}

nav.site-nav {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    font-size: 15px;
}

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

nav.site-nav a:hover {
    color: var(--primary);
}

/* === Hero === */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #0891b2 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
}

.hero-inner {
    max-width: 900px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 38px;
    line-height: 1.25;
    margin: 0 0 16px;
    font-weight: 700;
}

.hero p.subtitle {
    font-size: 19px;
    opacity: 0.92;
    margin: 0 0 32px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    text-decoration: none;
    font-size: 15px;
    transition: background 120ms ease, transform 120ms ease;
}

.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
}

.btn-primary {
    background: white;
    color: var(--primary);
}

.btn-primary:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.btn-secondary {
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    color: white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

/* === Container === */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 60px 24px;
}

.container.narrow {
    max-width: 820px;
}

section h2 {
    font-size: 28px;
    color: var(--text);
    margin: 0 0 24px;
    font-weight: 700;
}

section h3 {
    font-size: 21px;
    color: var(--text);
    margin: 28px 0 12px;
    font-weight: 600;
}

section p,
section li {
    color: var(--text);
}

section li {
    margin-bottom: 8px;
}

/* === Cards === */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 24px;
    box-shadow: var(--shadow);
}

.card h3 {
    margin-top: 0;
    color: var(--primary);
    font-size: 18px;
}

.card p {
    margin: 0;
    color: var(--text-muted);
    font-size: 15px;
}

/* === Pricing tariffs === */
.tariffs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}

.tariff {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 28px 24px;
    box-shadow: var(--shadow);
}

.tariff.recommended {
    border: 2px solid var(--primary);
    transform: scale(1.02);
}

.tariff-name {
    font-weight: 700;
    color: var(--primary);
    font-size: 20px;
    margin-bottom: 4px;
}

.tariff-desc {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 16px;
}

.tariff-price {
    font-size: 30px;
    font-weight: 700;
    color: var(--text);
    margin: 16px 0 4px;
}

.tariff-period {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.tariff-features {
    list-style: none;
    padding: 0;
    margin: 16px 0;
    font-size: 14px;
}

.tariff-features li {
    padding-left: 24px;
    position: relative;
    color: var(--text);
}

.tariff-features li::before {
    content: "✓";
    color: var(--green);
    font-weight: 700;
    position: absolute;
    left: 0;
}

/* === Tables (markdown style) === */
.markdown-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
    font-size: 14.5px;
}

.markdown-content th,
.markdown-content td {
    padding: 10px 14px;
    border: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.markdown-content th {
    background: #f1f5f9;
    font-weight: 600;
}

.markdown-content tr:nth-child(even) td {
    background: #fafbfc;
}

.markdown-content code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.92em;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.markdown-content pre {
    background: #0f172a;
    color: #f1f5f9;
    padding: 16px;
    border-radius: 6px;
    overflow-x: auto;
    line-height: 1.5;
}

.markdown-content pre code {
    background: transparent;
    color: inherit;
    padding: 0;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary);
    background: #f1f5f9;
    margin: 18px 0;
    padding: 12px 18px;
    color: var(--text);
}

/* === Footer === */
footer.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 48px 24px 32px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 32px;
}

.footer-section h4 {
    color: white;
    font-size: 14px;
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.footer-section a {
    display: block;
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 6px;
}

.footer-section a:hover {
    color: white;
    text-decoration: none;
}

.footer-bottom {
    max-width: 1100px;
    margin: 32px auto 0;
    padding-top: 24px;
    border-top: 1px solid #1e293b;
    color: #64748b;
    font-size: 13px;
    text-align: center;
}

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

    .hero p.subtitle {
        font-size: 16px;
    }

    nav.site-nav {
        gap: 16px;
        font-size: 14px;
    }
}
