/* эТОИР — blog & demo-request styles. Reuses design tokens from landing.css (:root). */

/* ===== Blog page header ===== */
.blog-page-header {
    padding: 144px 0 48px;
    text-align: center;
}

.blog-page-header h1 {
    font-size: clamp(36px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    color: var(--text);
    margin-bottom: 16px;
}

.blog-page-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

/* ===== Blog card grid ===== */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    padding-bottom: 96px;
}

@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .blog-grid { grid-template-columns: 1fr; gap: 24px; }
}

.blog-card {
    display: flex;
    flex-direction: column;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    color: var(--text);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--card-shadow-hover);
    border-color: transparent;
    color: var(--text);
}

.blog-card-cover {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-alt);
}

.blog-card-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card:hover .blog-card-cover img {
    transform: scale(1.05);
}

.blog-card-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, var(--accent) 130%);
}

.blog-card-cover-placeholder::after {
    content: "";
    width: 56px;
    height: 56px;
    background-color: rgba(255, 255, 255, 0.85);
    -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M7 3h7l4 4v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cline x1='8.5' y1='12' x2='15.5' y2='12'/%3E%3Cline x1='8.5' y1='15.5' x2='15.5' y2='15.5'/%3E%3Cline x1='8.5' y1='9' x2='11' y2='9'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M7 3h7l4 4v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cline x1='8.5' y1='12' x2='15.5' y2='12'/%3E%3Cline x1='8.5' y1='15.5' x2='15.5' y2='15.5'/%3E%3Cline x1='8.5' y1='9' x2='11' y2='9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.blog-card-title {
    font-size: 19px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text);
    padding: 20px 20px 0;
}

.blog-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
    padding: 10px 20px 0;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-meta {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-light);
    padding: 16px 20px 20px;
    border-top: 1px solid var(--border);
    margin-top: 16px;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
    padding: 100px 0 0;
    font-size: 14px;
    color: var(--text-light);
}

.breadcrumbs a {
    color: var(--text-secondary);
}

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

.breadcrumbs-separator {
    margin: 0 8px;
    color: var(--border);
}

.breadcrumbs-current {
    color: var(--text-light);
}

/* ===== Article (post detail) ===== */
.post {
    padding: 24px 0 80px;
}

.post-cover {
    aspect-ratio: 21 / 9;
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
    background: var(--bg-alt);
}

.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.post-cover-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 55%, var(--accent) 130%);
}

.post-cover-placeholder::after {
    content: "";
    width: 96px;
    height: 96px;
    background-color: rgba(255, 255, 255, 0.85);
    -webkit-mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M7 3h7l4 4v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cline x1='8.5' y1='12' x2='15.5' y2='12'/%3E%3Cline x1='8.5' y1='15.5' x2='15.5' y2='15.5'/%3E%3Cline x1='8.5' y1='9' x2='11' y2='9'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6'%3E%3Cpath d='M7 3h7l4 4v13a1 1 0 0 1-1 1H7a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1z'/%3E%3Cpath d='M14 3v4h4'/%3E%3Cline x1='8.5' y1='12' x2='15.5' y2='12'/%3E%3Cline x1='8.5' y1='15.5' x2='15.5' y2='15.5'/%3E%3Cline x1='8.5' y1='9' x2='11' y2='9'/%3E%3C/svg%3E") center / contain no-repeat;
}

.post h1 {
    font-size: clamp(30px, 4.5vw, 44px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text);
    max-width: 70ch;
    margin-bottom: 16px;
}

.post-meta {
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--text-light);
    margin-bottom: 40px;
}

.post-body {
    max-width: 70ch;
    font-size: 18px;
    line-height: 1.75;
    color: var(--text);
}

.post-body h2 {
    font-size: 28px;
    font-weight: 800;
    margin: 48px 0 16px;
    color: var(--text);
}

.post-body h3 {
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 14px;
    color: var(--text);
}

.post-body p {
    margin-bottom: 20px;
}

.post-body ul,
.post-body ol {
    margin: 0 0 20px;
    padding-left: 24px;
}

.post-body li {
    margin-bottom: 8px;
}

.post-body a {
    color: var(--primary);
    text-decoration: underline;
    text-decoration-color: var(--primary-light);
}

.post-body a:hover {
    color: var(--primary-dark);
}

.post-body img {
    border-radius: var(--radius);
    margin: 32px 0;
}

.post-body blockquote {
    border-left: 3px solid var(--accent);
    background: var(--bg-alt);
    padding: 16px 24px;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
    margin: 28px 0;
}

.post-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

/* ===== Related posts ===== */
.related-posts {
    padding: 0 0 96px;
}

.related-posts h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 32px;
}

/* ===== Demo request — split pitch / form ===== */
.demo-split {
    padding: 144px 0 96px;
}

.demo-split-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

@media (max-width: 900px) {
    .demo-split-inner {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.demo-pitch {
    padding-top: 8px;
}

/* Заголовок блока формы. Был h1, стал h2: h1 страницы /demo/ теперь у стенда
   выше по документу, а второго h1 на странице быть не должно. */
.demo-pitch-title {
    font-size: clamp(32px, 4.5vw, 44px);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 16px;
}

.demo-pitch-intro {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.demo-pitch h2:not(.demo-pitch-title) {
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 20px;
}

.demo-pitch-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 36px;
}

.demo-pitch-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.demo-pitch-item strong {
    color: var(--text);
}

.demo-pitch-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-top: 2px;
    background: var(--primary);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.demo-trust-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 24px;
    border-top: 1px solid var(--border);
}

.demo-trust-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--text-secondary);
}

.demo-trust-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
}

.demo-form-card {
    position: relative;
    overflow: hidden;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--card-shadow);
    padding: 40px;
    min-height: 420px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.demo-form-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
}

.demo-form-card form p {
    margin-bottom: 18px;
}

.demo-form-card form label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.demo-form-card form input[type="text"],
.demo-form-card form input[type="email"],
.demo-form-card form input[type="tel"],
.demo-form-card form textarea {
    width: 100%;
    font-family: var(--font);
    font-size: 15px;
    color: var(--text);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 14px;
    transition: border-color var(--transition), box-shadow var(--transition), background-color var(--transition);
}

.demo-form-card form input[type="text"]:focus,
.demo-form-card form input[type="email"]:focus,
.demo-form-card form input[type="tel"]:focus,
.demo-form-card form textarea:focus {
    outline: none;
    background: var(--card-bg);
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.demo-form-card form textarea {
    min-height: 96px;
    resize: vertical;
}

.demo-form-card form p:has(input[type="checkbox"]) {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.demo-form-card form p:has(input[type="checkbox"]) label {
    margin-bottom: 0;
    font-weight: 500;
    order: 2;
}

.demo-form-card form p:has(input[name="consent_marketing"]) label {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-light);
}

.demo-form-card form input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    order: 1;
}

.demo-form-card form button[type="submit"] {
    width: 100%;
    justify-content: center;
    margin-top: 14px;
    background: var(--primary);
    border: none;
    transition: transform var(--transition), box-shadow var(--transition);
}

.demo-form-card form button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-shadow-hover);
}

.demo-success {
    text-align: center;
    margin: auto 0;
}

.demo-success-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.demo-success h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 12px;
}

.demo-success p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 28px;
}
