:root {
    --bg-color-main: #f9f9f9;
    --text-color-main: #000;
    --text-color-secondary: #0000004d;
    --text-color-primary: #ff8906;
    --text-color-primary-pale: #ffa138;
    --text-color-primary-pale-pale: #ffe5c9;
    --bg-color-white: #fff;
    --text-color-black: #1b1b1c;
    --text-color-placeholder: #adadad;
    --bg-color-grey: #ededed;
    --bg-color-grey-light: #f3f3f3;
    --bg-color-grey-light-light: #e3e3e3;
    --border-radius: 20px;
    --border-radius-sm: 12px;
    --header-shadow: 1px 3px 15px 0 #0000000d;
    --card-shadow-hover: 0 12px 40px 0 #00000012;
    --gradient-hero: linear-gradient(135deg, #fff 0%, #fffaf5 45%, #fff5eb 100%);
    --gradient-accent: linear-gradient(135deg, var(--text-color-primary) 0%, var(--text-color-primary-pale) 100%);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--bg-color-main) !important;
    color: var(--text-color-black);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    position: relative;
    overflow-x: hidden;
}

body::before,
body::after {
    content: '';
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
    filter: blur(80px);
    opacity: 0.45;
}

body::before {
    width: 520px;
    height: 520px;
    top: -180px;
    right: -120px;
    background: radial-gradient(circle, var(--text-color-primary-pale-pale) 0%, transparent 70%);
}

body::after {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: -100px;
    background: radial-gradient(circle, var(--bg-color-grey) 0%, transparent 70%);
}

a {
    text-decoration: none !important;
    transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.site-wrapper {
    min-height: 100vh;
    padding-bottom: 48px;
}

.site-container {
    max-width: 1140px;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 1400px) {
    .site-container {
        max-width: 1320px;
    }
}

/* Header */

.site-header {
    padding-top: 12px;
    margin-bottom: 36px;
    animation: fadeDown 0.5s ease both;
}

.site-header__inner {
    width: 100%;
}

.site-header__card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background-color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: var(--border-radius);
    padding: 18px 22px;
    box-shadow: var(--header-shadow);
    border: 1px solid rgba(255, 255, 255, 0.8);
}

@media (min-width: 768px) {
    .site-header__card {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 24px;
        padding: 20px 28px;
    }
}

.site-header__logo {
    flex-shrink: 0;
    margin: 0;
}

.site-header__logo a {
    display: inline-flex;
    align-items: center;
}

.site-header__logo img {
    max-width: 135px;
    max-height: 50px;
    width: auto;
    height: auto;
    transition: transform 0.25s ease;
}

.site-header__logo a:hover img {
    transform: scale(1.03);
}

.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

@media (min-width: 768px) {
    .site-nav {
        justify-content: flex-end;
    }
}

.site-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color-black);
    border-radius: 10px;
    white-space: nowrap;
}

.site-nav__link:hover {
    color: var(--text-color-primary);
    background-color: var(--bg-color-grey-light);
}

.site-nav__link.active {
    color: var(--text-color-primary);
    font-weight: 600;
    background-color: var(--text-color-primary-pale-pale);
    box-shadow: inset 0 0 0 1px rgba(255, 137, 6, 0.15);
}

.site-nav__link--external::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ADADAD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6'/%3E%3Cpolyline points='15 3 21 3 21 9'/%3E%3Cline x1='10' y1='14' x2='21' y2='3'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.site-nav__link--external:hover::after {
    opacity: 1;
}

/* Hero */

.page-hero {
    position: relative;
    margin: 0 auto 48px;
    padding: 48px 36px;
    text-align: center;
    background: var(--gradient-hero);
    border-radius: var(--border-radius);
    box-shadow: var(--header-shadow);
    border: 1px solid rgba(255, 137, 6, 0.08);
    overflow: hidden;
    animation: fadeUp 0.6s ease 0.1s both;
}

.page-hero::after {
    content: '';
    position: absolute;
    top: -60px;
    right: -60px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 137, 6, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.page-hero--compact {
    padding: 36px 32px;
    margin-bottom: 40px;
}

.page-hero .display-4,
.page-hero .display-6,
.page-hero h1,
.page-hero h3 {
    position: relative;
    color: var(--text-color-black);
    font-weight: 400;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.page-hero .display-4,
.page-hero h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    background: linear-gradient(135deg, var(--text-color-black) 0%, #404040 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-hero .display-6,
.page-hero h3 {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    color: var(--text-color-black);
    -webkit-text-fill-color: unset;
    background: none;
}

.page-hero .lead {
    position: relative;
    color: var(--text-color-black);
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.75;
    margin-bottom: 16px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.page-hero .lead:last-of-type {
    margin-bottom: 28px;
}

.page-hero .btn {
    position: relative;
    margin-top: 8px;
}

.pricing-header {
    max-width: 900px;
    margin: 0 auto 48px;
    padding: 48px 36px !important;
    text-align: center;
    background: var(--gradient-hero);
    border-radius: var(--border-radius);
    box-shadow: var(--header-shadow);
    border: 1px solid rgba(255, 137, 6, 0.08);
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.6s ease 0.1s both;
}

.pricing-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-accent);
}

.pricing-header .display-4,
.pricing-header .display-6,
.pricing-header h1,
.pricing-header h3 {
    color: var(--text-color-black);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -0.03em;
}

.pricing-header .display-4,
.pricing-header h1 {
    font-size: clamp(2rem, 5vw, 2.75rem);
    background: linear-gradient(135deg, var(--text-color-black) 0%, #404040 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.pricing-header .display-6,
.pricing-header h3 {
    font-size: clamp(1.35rem, 3.5vw, 1.85rem);
    color: var(--text-color-black);
    -webkit-text-fill-color: unset;
    background: none;
}

.pricing-header .lead {
    color: var(--text-color-black);
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.pricing-header .lead:last-of-type {
    margin-bottom: 28px;
}

/* Info panel (connect page) */

.info-panel {
    margin: 0 auto;
    padding: 32px 36px;
    background: var(--bg-color-white);
    border-radius: var(--border-radius);
    box-shadow: var(--header-shadow);
    border-left: 4px solid var(--text-color-primary);
    animation: fadeUp 0.6s ease 0.2s both;
}

.info-panel .lead {
    margin-bottom: 0;
    font-size: 1.05rem;
    line-height: 1.75;
    color: var(--text-color-black);
}

/* Feature cards */

.features-section {
    animation: fadeUp 0.6s ease 0.25s both;
}

.feature-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin-bottom: 16px;
}

@media (min-width: 768px) {
    .feature-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.feature-card {
    position: relative;
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--bg-color-white);
    box-shadow: var(--header-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 4px;
    border-radius: 14px;
    background: var(--text-color-primary-pale-pale);
    color: var(--text-color-primary);
}

.feature-card__icon svg {
    width: 26px;
    height: 26px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.feature-card--security .feature-card__icon {
    background: var(--bg-color-grey);
    color: var(--text-color-black);
}

.feature-card--speed .feature-card__icon {
    background: #dff4e3;
    color: #23a73a;
}

.feature-card .card-header {
    background: transparent;
    border-bottom: none;
    padding: 28px 28px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
}

.feature-card .card-header h4 {
    color: var(--text-color-black);
    font-weight: 500 !important;
    font-size: 1.15rem;
    margin: 0;
}

.feature-card .card-body {
    padding: 16px 28px 28px;
    color: var(--text-color-black);
    font-size: 15px;
    line-height: 1.7;
}

/* Headings */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
    color: var(--text-color-black);
    font-weight: 600;
}

.h3, h3 {
    color: var(--text-color-primary);
}

/* Buttons */

.btn-outline-primary {
    color: var(--text-color-primary);
    border-color: var(--text-color-primary);
    border-radius: 50px;
    padding: 12px 32px;
    font-weight: 600;
    font-size: 15px;
    border-width: 2px;
    letter-spacing: 0.01em;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    color: var(--bg-color-white) !important;
    background: var(--gradient-accent) !important;
    border-color: var(--text-color-primary) !important;
    box-shadow: 0 6px 20px rgba(255, 137, 6, 0.35);
    transform: translateY(-1px);
}

.btn-primary {
    background: var(--gradient-accent);
    border-color: var(--text-color-primary);
    border-radius: 50px;
    font-weight: 600;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background: linear-gradient(135deg, var(--text-color-primary-pale) 0%, var(--text-color-primary) 100%) !important;
    border-color: var(--text-color-primary-pale) !important;
    box-shadow: 0 6px 20px rgba(255, 137, 6, 0.35);
}

.btn-lg {
    padding: 14px 36px;
}

/* Generic cards */

.card {
    border: none;
    border-radius: var(--border-radius);
    background-color: var(--bg-color-white);
    box-shadow: var(--header-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--card-shadow-hover);
}

.card-header {
    background-color: var(--bg-color-white);
    border-bottom: 1px solid var(--bg-color-grey-light-light);
    padding: 20px 24px;
}

.card-header h4 {
    color: var(--text-color-primary);
    font-weight: 600;
    margin: 0;
}

.card-body {
    padding: 24px;
    color: var(--text-color-black);
    font-size: 15px;
    line-height: 1.7;
}

.card-deck {
    gap: 24px;
}

.card-deck .card {
    margin-bottom: 0 !important;
}

.box-shadow {
    box-shadow: var(--header-shadow) !important;
}

/* Documentation */

.docs-layout {
    animation: fadeUp 0.6s ease 0.2s both;
}

.docs-sidebar {
    position: sticky;
    top: 20px;
}

.docs-sidebar .list-group {
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--header-shadow);
    border: 1px solid var(--bg-color-grey-light-light);
}

.list-group-item {
    border-color: var(--bg-color-grey-light-light);
    padding: 14px 20px 14px 24px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-color-black);
    position: relative;
    border-left: 3px solid transparent;
}

.list-group-item-action:hover:not(.active):not(.disabled) {
    background-color: var(--bg-color-grey-light);
    color: var(--text-color-primary);
    border-left-color: var(--text-color-primary-pale);
}

.list-group-item.active {
    z-index: 2;
    color: var(--bg-color-white);
    background: var(--gradient-accent);
    border-color: var(--text-color-primary);
    border-left-color: var(--text-color-primary-pale);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(255, 137, 6, 0.25);
}

.list-group-item.disabled {
    color: var(--text-color-placeholder);
    background-color: var(--bg-color-grey-light);
    opacity: 0.75;
}

.docs-content {
    background-color: var(--bg-color-white);
    border-radius: var(--border-radius);
    padding: 36px 40px;
    box-shadow: var(--header-shadow);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

@media (max-width: 575px) {
    .docs-content {
        padding: 24px 20px;
    }
}

.docs-content h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--text-color-primary-pale-pale);
    color: var(--text-color-black);
}

.docs-content h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--text-color-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.docs-content h2::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: var(--gradient-accent);
    border-radius: 2px;
    flex-shrink: 0;
}

.docs-content p,
.docs-content li {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text-color-black);
}

.docs-content ul {
    margin-bottom: 24px;
    padding-left: 1.4rem;
}

.docs-content li {
    margin-bottom: 8px;
}

.docs-content li::marker {
    color: var(--text-color-primary);
}

.docs-content strong {
    color: var(--text-color-black);
    font-weight: 600;
}

.docs-content pre {
    position: relative;
    background: linear-gradient(160deg, #2a2a2a 0%, var(--text-color-black) 100%);
    color: #f0f0f0;
    border-radius: var(--border-radius-sm);
    padding: 22px 26px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.65;
    overflow-x: auto;
    margin: 20px 0 28px;
    border: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.15);
}

.docs-content pre::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
    opacity: 0.85;
}

.docs-content pre {
    padding-top: 44px;
}

/* Placeholder — раздел в разработке */

.docs-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 24px;
    padding: 56px 32px;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, #fff 0%, #fffaf5 50%, #fff5eb 100%);
    border: 1px solid rgba(255, 137, 6, 0.35);
    position: relative;
    overflow: hidden;
}


.docs-placeholder::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 137, 6, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.docs-placeholder__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-bottom: 20px;
    border-radius: 18px;
    background: var(--text-color-primary-pale-pale);
    color: var(--text-color-primary);
    position: relative;
    z-index: 1;
    animation: placeholderPulse 2.5s ease-in-out infinite;
}

.docs-placeholder__icon svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.docs-placeholder__text {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-color-black);
    letter-spacing: 0.01em;
    position: relative;
    z-index: 1;
}

@keyframes placeholderPulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 137, 6, 0.15);
    }
    50% {
        transform: scale(1.04);
        box-shadow: 0 0 0 12px rgba(255, 137, 6, 0);
    }
}

/* Legacy col-sm selectors */

.col-sm-8 h1 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--text-color-primary-pale-pale);
    color: var(--text-color-black);
}

.col-sm-8 h2 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-top: 36px;
    margin-bottom: 16px;
    color: var(--text-color-primary);
}

.col-sm-8 p,
.col-sm-8 li {
    font-size: 15px;
    line-height: 1.75;
}

.col-sm-8 pre {
    background: linear-gradient(160deg, #2a2a2a 0%, var(--text-color-black) 100%);
    color: #f0f0f0;
    border-radius: var(--border-radius-sm);
    padding: 44px 26px 22px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.65;
    overflow-x: auto;
    margin: 20px 0 28px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 4px 16px rgba(0, 0, 0, 0.15);
    position: relative;
}

.col-sm-8 pre::before {
    content: '';
    position: absolute;
    top: 14px;
    left: 18px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #ff5f57;
    box-shadow: 16px 0 0 #febc2e, 32px 0 0 #28c840;
    opacity: 0.85;
}

.col-sm-4 {
    margin-bottom: 24px;
}

@media (min-width: 576px) {
    .col-sm-8:not(.docs-content) {
        background-color: var(--bg-color-white);
        border-radius: var(--border-radius);
        padding: 36px 40px;
        box-shadow: var(--header-shadow);
    }

    .col-sm-4 .list-group {
        position: sticky;
        top: 20px;
    }
}

.container > .row {
    margin-top: 8px;
}

/* Footer */

.site-footer {
    margin-top: 64px;
    padding: 32px 0 16px;
    border-top: 1px solid var(--bg-color-grey-light-light);
    text-align: center;
    animation: fadeUp 0.6s ease 0.3s both;
}

.site-footer__logo {
    display: inline-block;
    margin-bottom: 12px;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.site-footer__logo:hover {
    opacity: 1;
    transform: scale(1.02);
}

.site-footer__logo img {
    max-width: 120px;
    height: auto;
}

.site-footer__line {
    width: 48px;
    height: 3px;
    margin: 0 auto 16px;
    border-radius: 2px;
    background: var(--gradient-accent);
}

/* Legacy */

.p-2.text-dark.active {
    font-weight: 600;
    color: var(--text-color-primary) !important;
}

.p-2.text-dark:hover {
    color: var(--text-color-primary) !important;
}

footer:not(.site-footer) {
    margin-top: 48px;
}

/* Animations */

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive tweaks */

@media (max-width: 767px) {
    .page-hero,
    .pricing-header {
        padding: 32px 22px !important;
        margin-bottom: 32px;
    }

    .info-panel {
        padding: 24px 22px;
    }

    .site-header__card {
        padding: 16px 18px;
    }

    .site-nav__link {
        padding: 8px 12px;
        font-size: 13px;
    }
}
