﻿:root {
    --ph-background: #f5f6fa;
    --ph-surface: #ffffff;
    --ph-surface-soft: #f9fafc;
    --ph-text: #181b24;
    --ph-text-muted: #687083;
    --ph-primary: #5b4de3;
    --ph-primary-dark: #493cc4;
    --ph-primary-soft: #eeecff;
    --ph-border: #e2e5ec;
    --ph-border-strong: #d3d7e2;
    --ph-success: #16875d;
    --ph-danger: #d44343;
    --ph-warning: #b97812;
    --ph-radius-sm: 10px;
    --ph-radius: 16px;
    --ph-radius-lg: 24px;
    --ph-shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.04), 0 5px 16px rgba(20, 24, 40, 0.04);
    --ph-shadow: 0 12px 35px rgba(20, 24, 40, 0.08);
}

html {
    position: relative;
    min-height: 100%;
    font-size: 16px;
}

body {
    min-height: 100vh;
    margin: 0;
    background: var(--ph-background);
    color: var(--ph-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--ph-primary);
}

    a:hover {
        color: var(--ph-primary-dark);
    }

.app-container {
    width: min(100% - 32px, 1380px);
    margin-inline: auto;
}

.app-main {
    min-height: calc(100vh - 150px);
    padding-block: 38px 64px;
}

/* Навигация */

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    min-height: 72px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--ph-border);
    backdrop-filter: blur(14px);
}

    .app-navbar .navbar-toggler {
        border-color: var(--ph-border);
        border-radius: var(--ph-radius-sm);
    }

        .app-navbar .navbar-toggler:focus {
            box-shadow: 0 0 0 3px var(--ph-primary-soft);
        }

.app-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ph-text);
    font-size: 1.15rem;
    font-weight: 750;
    letter-spacing: -0.02em;
    text-decoration: none;
}

    .app-brand:hover {
        color: var(--ph-text);
    }

.app-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    color: #ffffff;
    background: var(--ph-primary);
    border-radius: 11px;
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.app-navbar .nav-link {
    position: relative;
    color: var(--ph-text-muted);
    border-radius: 9px;
    font-size: 0.95rem;
    font-weight: 550;
    padding: 9px 12px !important;
}

    .app-navbar .nav-link:hover {
        color: var(--ph-text);
        background: var(--ph-surface-soft);
    }

    .app-navbar .nav-link.active {
        color: var(--ph-primary);
        background: var(--ph-primary-soft);
    }

.account-link {
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Типографика */

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--ph-text);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.display-4,
.display-5,
.display-6 {
    letter-spacing: -0.045em;
}

.text-muted {
    color: var(--ph-text-muted) !important;
}

.page-heading {
    margin-bottom: 28px;
}

    .page-heading h1 {
        margin-bottom: 8px;
    }

    .page-heading p {
        max-width: 720px;
        margin-bottom: 0;
        color: var(--ph-text-muted);
    }

/* Кнопки */

.btn {
    border-radius: 10px;
    font-weight: 600;
    padding: 0.62rem 1rem;
}

.btn-sm {
    border-radius: 9px;
    padding: 0.43rem 0.75rem;
}

.btn-lg {
    border-radius: 12px;
    padding: 0.8rem 1.25rem;
}

.btn-primary {
    --bs-btn-color: #ffffff;
    --bs-btn-bg: var(--ph-primary);
    --bs-btn-border-color: var(--ph-primary);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--ph-primary-dark);
    --bs-btn-hover-border-color: var(--ph-primary-dark);
    --bs-btn-active-bg: var(--ph-primary-dark);
    --bs-btn-active-border-color: var(--ph-primary-dark);
    --bs-btn-disabled-bg: var(--ph-primary);
    --bs-btn-disabled-border-color: var(--ph-primary);
}

.btn-outline-primary {
    --bs-btn-color: var(--ph-primary);
    --bs-btn-border-color: #c9c4fb;
    --bs-btn-hover-color: var(--ph-primary);
    --bs-btn-hover-bg: var(--ph-primary-soft);
    --bs-btn-hover-border-color: var(--ph-primary);
}

.btn-ghost {
    color: var(--ph-text-muted);
    background: transparent;
    border-color: transparent;
}

    .btn-ghost:hover {
        color: var(--ph-text);
        background: var(--ph-surface-soft);
        border-color: var(--ph-border);
    }

/* Формы */

.form-label {
    margin-bottom: 7px;
    color: var(--ph-text);
    font-size: 0.92rem;
    font-weight: 650;
}

.form-control,
.form-select {
    min-height: 44px;
    color: var(--ph-text);
    background-color: var(--ph-surface);
    border-color: var(--ph-border-strong);
    border-radius: 10px;
}

textarea.form-control {
    min-height: auto;
}

.form-control:hover,
.form-select:hover {
    border-color: #babfcd;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--ph-primary);
    box-shadow: 0 0 0 3px var(--ph-primary-soft);
}

.form-control::placeholder {
    color: #9ba1af;
}

.form-check-input:checked {
    background-color: var(--ph-primary);
    border-color: var(--ph-primary);
}

.form-text {
    color: var(--ph-text-muted);
}

/* Карточки */

.card {
    background: var(--ph-surface);
    border-color: var(--ph-border);
    border-radius: var(--ph-radius);
}

    .card.shadow-sm {
        box-shadow: var(--ph-shadow-sm) !important;
    }

.card-body {
    padding: 1.4rem;
}

/* Уведомления */

.alert {
    border-radius: 12px;
}

.alert-info {
    color: #3f369f;
    background: var(--ph-primary-soft);
    border-color: #d9d5ff;
}

.alert-light {
    color: var(--ph-text-muted);
    background: var(--ph-surface-soft);
    border-color: var(--ph-border);
}

/* Бейджи */

.badge {
    border-radius: 7px;
    font-weight: 650;
    padding: 0.4em 0.65em;
}

.text-bg-light {
    color: #505769 !important;
    background: #f0f2f6 !important;
}

.text-bg-info {
    color: #315a75 !important;
    background: #e1f3fd !important;
}

.text-bg-success {
    background: var(--ph-success) !important;
}

.text-bg-danger {
    background: var(--ph-danger) !important;
}

/* Текст промптов */

pre {
    margin: 0;
    color: var(--ph-text);
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
    font-size: 0.91rem;
    line-height: 1.65;
}

.prompt-text-block {
    padding: 20px;
    background: var(--ph-surface-soft);
    border: 1px solid var(--ph-border);
    border-radius: 12px;
    white-space: pre-wrap;
}

/* Главная */

.hero-section {
    padding-block: 52px 68px;
}

.hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
    gap: 56px;
    align-items: center;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 20px;
    padding: 7px 11px;
    color: var(--ph-primary);
    background: var(--ph-primary-soft);
    border-radius: 8px;
    font-size: 0.84rem;
    font-weight: 700;
}

.hero-title {
    max-width: 760px;
    margin-bottom: 22px;
    font-size: clamp(2.6rem, 6vw, 5rem);
    line-height: 0.98;
    letter-spacing: -0.065em;
}

.hero-description {
    max-width: 690px;
    margin-bottom: 30px;
    color: var(--ph-text-muted);
    font-size: 1.16rem;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.hero-preview {
    position: relative;
    padding: 26px;
    background: linear-gradient( 145deg, rgba(91, 77, 227, 0.09), rgba(255, 255, 255, 0.85) );
    border: 1px solid #dcd8ff;
    border-radius: var(--ph-radius-lg);
    box-shadow: var(--ph-shadow);
}

    .hero-preview::before {
        position: absolute;
        inset: 14px -14px -14px 14px;
        z-index: -1;
        content: "";
        background: #eae8ff;
        border-radius: var(--ph-radius-lg);
    }

.hero-preview-window {
    overflow: hidden;
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    border-radius: 15px;
}

.hero-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid var(--ph-border);
}

.hero-preview-label {
    color: var(--ph-text-muted);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.hero-preview-body {
    padding: 20px;
}

    .hero-preview-body p {
        margin-bottom: 12px;
        line-height: 1.65;
    }

.hero-preview-variable {
    display: inline-block;
    padding: 2px 7px;
    color: var(--ph-primary);
    background: var(--ph-primary-soft);
    border-radius: 6px;
    font-weight: 650;
}

.home-features {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-block: 34px;
    border-top: 1px solid var(--ph-border);
    border-bottom: 1px solid var(--ph-border);
}

.home-feature {
    padding-inline: 30px;
}

    .home-feature:first-child {
        padding-left: 0;
    }

    .home-feature:last-child {
        padding-right: 0;
    }

    .home-feature + .home-feature {
        border-left: 1px solid var(--ph-border);
    }

.home-feature-title {
    margin-bottom: 8px;
    font-size: 1rem;
}

.home-feature-text {
    margin: 0;
    color: var(--ph-text-muted);
    line-height: 1.6;
}

/* Footer */

.app-footer {
    padding-block: 24px;
    color: var(--ph-text-muted);
    background: var(--ph-surface);
    border-top: 1px solid var(--ph-border);
    font-size: 0.9rem;
}

.app-footer-content {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.validation-summary-valid {
    display: none;
}

.field-validation-error {
    display: block;
    margin-top: 5px;
    font-size: 0.84rem;
}

/* Cookie consent */

.cookie-consent {
    position: fixed;
    right: 20px;
    bottom: 20px;
    left: 20px;
    z-index: 1080;
    pointer-events: none;
}

.cookie-consent-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(100%, 980px);
    margin: 0 auto;
    padding: 18px 20px;
    background: var(--ph-surface);
    border: 1px solid var(--ph-border);
    border-radius: var(--ph-radius-lg);
    box-shadow: var(--ph-shadow);
    pointer-events: auto;
}

.cookie-consent-text {
    max-width: 650px;
    line-height: 1.55;
}

    .cookie-consent-text strong {
        display: block;
        margin-bottom: 4px;
    }

.cookie-consent-actions {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
    margin-left: 24px;
}

    .cookie-consent-actions form {
        margin: 0;
    }

@media (max-width: 767.98px) {
    .cookie-consent {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }

    .cookie-consent-content {
        align-items: stretch;
        flex-direction: column;
        gap: 16px;
    }

    .cookie-consent-actions {
        flex-direction: column-reverse;
        margin-left: 0;
    }

        .cookie-consent-actions form,
        .cookie-consent-actions .btn {
            width: 100%;
        }
}


/* Адаптивность */

@media (max-width: 991.98px) {
    .app-navbar {
        min-height: auto;
    }

        .app-navbar .navbar-collapse {
            padding-block: 16px;
        }

        .app-navbar .navbar-nav {
            align-items: stretch !important;
        }

    .hero-layout {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .hero-preview {
        max-width: 680px;
    }

    .home-features {
        grid-template-columns: 1fr;
    }

    .home-feature {
        padding: 24px 0;
    }

        .home-feature + .home-feature {
            border-top: 1px solid var(--ph-border);
            border-left: 0;
        }
}

@media (max-width: 575.98px) {
    .app-container {
        width: min(100% - 22px, 1380px);
    }

    .app-main {
        padding-top: 26px;
    }

    .hero-section {
        padding-block: 26px 44px;
    }

    .hero-title {
        font-size: 2.7rem;
    }

    .hero-description {
        font-size: 1.04rem;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-preview {
        padding: 14px;
    }

    .app-footer-content {
        flex-direction: column;
    }
}
