/* Тема «Светлая»: та же разметка, что и default, другая палитра. */
:root {
    color-scheme: light;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --text: #0d2235;
    --muted: #46607a;
    --accent: #0a6fc2;
    --line: #d5e1ec;
    --code-bg: #eef3f8;
    --pre-bg: #0d2235;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
    width: min(1120px, calc(100% - 48px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 32px 0 24px;
}

.site-header { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 28px; }
.brand { font-size: 18px; font-weight: 760; letter-spacing: -0.02em; color: var(--accent); text-decoration: none; }
nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 18px; }
nav a { color: var(--muted); font-weight: 650; text-decoration: none; }
nav a:hover { color: var(--accent); }
main { display: flex; align-items: center; }

.hero, .page-content {
    align-self: center;
    width: min(760px, 100%);
    padding: clamp(32px, 7vw, 72px);
    background: var(--surface);
    border: 1px solid var(--line);
    border-left: 6px solid var(--accent);
    box-shadow: 0 18px 50px rgba(13, 34, 53, .08);
}

.eyebrow { margin: 0 0 26px; color: var(--accent); font-weight: 700; }
h1 { margin: 0; font-size: clamp(48px, 10vw, 96px); line-height: 0.95; letter-spacing: -0.07em; }
.tagline { max-width: 620px; margin: 30px 0 0; font-size: clamp(22px, 4vw, 34px); line-height: 1.2; letter-spacing: -0.025em; }
.body-copy { max-width: 650px; margin: 24px 0 0; color: var(--muted); font-size: 18px; line-height: 1.65; white-space: pre-line; }

.contact {
    display: inline-block;
    margin-top: 36px;
    padding: 12px 18px;
    border: 1px solid var(--accent);
    color: var(--text);
    text-decoration: none;
    font-weight: 720;
}

.contact:hover { color: #fff; background: var(--accent); }
.contact:focus-visible { outline: 3px solid var(--text); outline-offset: 4px; }
footer { padding-top: 24px; color: #5f7a92; font-size: 14px; }
.contacts { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 10px; white-space: pre-line; }
.contacts a { color: var(--muted); }
.page-content { margin: 40px 0; }
.page-content h1 { font-size: clamp(42px, 8vw, 74px); }
.page-content .body-copy { white-space: pre-wrap; }
.rich-body { max-width: 650px; margin-top: 30px; color: var(--muted); font-size: 18px; line-height: 1.7; overflow-wrap: anywhere; }
.rich-body > :first-child { margin-top: 0; }
.rich-body > :last-child { margin-bottom: 0; }
.rich-body h2, .rich-body h3, .rich-body h4 { color: var(--text); line-height: 1.15; letter-spacing: -0.025em; }
.rich-body h2 { margin: 1.7em 0 .6em; font-size: 34px; }
.rich-body h3 { margin: 1.55em 0 .55em; font-size: 27px; }
.rich-body h4 { margin: 1.4em 0 .5em; font-size: 21px; }
.rich-body p { margin: 1em 0; }
.rich-body a { color: var(--accent); text-underline-offset: 3px; }
.rich-body blockquote { margin: 1.4em 0; padding: 4px 0 4px 20px; border-left: 4px solid var(--accent); color: var(--text); }
.rich-body img { display: block; max-width: 100%; height: auto; margin: 28px auto; border: 1px solid var(--line); }
.rich-body hr { margin: 32px 0; border: 0; border-top: 1px solid var(--line); }
.rich-body .align-center { text-align: center; }
.rich-body .align-right { text-align: right; }
.content-table { max-width: 100%; margin: 26px 0; overflow-x: auto; }
.content-table table { width: 100%; min-width: 520px; border-collapse: collapse; color: var(--text); }
.content-table th, .content-table td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.content-table th { background: var(--code-bg); }
.rich-body code { padding: .15em .35em; border-radius: 4px; background: var(--code-bg); color: #b4235f; font: .88em/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.rich-body pre { overflow-x: auto; margin: 24px 0; padding: 18px; border: 1px solid var(--line); background: var(--pre-bg); color: #e8f1ff; }
.rich-body pre code { padding: 0; background: transparent; color: inherit; }
.rich-body .hljs-keyword, .rich-body .hljs-selector-tag, .rich-body .hljs-literal { color: #ff88b5; }
.rich-body .hljs-string, .rich-body .hljs-title, .rich-body .hljs-section { color: #8fe5b5; }
.rich-body .hljs-number, .rich-body .hljs-attribute, .rich-body .hljs-variable { color: #ffd479; }
.rich-body .hljs-comment, .rich-body .hljs-quote { color: #8198b3; font-style: italic; }

@media (max-width: 600px) {
    .shell { width: min(100% - 28px, 1120px); padding-top: 20px; }
    .site-header { display: block; }
    nav { justify-content: flex-start; gap: 10px 16px; margin-top: 16px; }
    .hero, .page-content { padding: 28px 22px; border-left-width: 4px; }
    .eyebrow { margin-bottom: 20px; }
    h1 { font-size: clamp(44px, 17vw, 70px); }
    .tagline { font-size: 24px; }
    .body-copy { font-size: 16px; }
    .rich-body { font-size: 16px; }
    .rich-body h2 { font-size: 28px; }
    .rich-body h3 { font-size: 23px; }
    .contact { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; }
}
.not-found .contact { margin-top: 28px; }
