/* ===================================
   Design Refresh — контраст, типографика,
   ритм и удаление «AI-паттернов»
   Подключается последним, переопределяет
   base/layout/components/utilities.
   =================================== */

:root {
    /* Контраст: вторичный и приглушённый текст
       теперь проходят WCAG AA на #080808 и #0f0f0f */
    --text-secondary: #a9a49b;
    --text-muted: #8f8a82;

    /* Отдельный «чернильный» цвет для текста на золоте */
    --accent-ink: #14120c;

    /* Более спокойный, кириллический текстовый шрифт */
    --font-body: 'Golos Text', 'Inter', system-ui, sans-serif;
}

body {
    font-family: var(--font-body);
    line-height: 1.65;
    letter-spacing: 0.005em;
}

/* Заголовки: аккуратные переносы без «сирот» */
h1, h2, h3, h4,
.hero-title-seo,
.section-title,
.rnd-title,
.manifesto-title,
.faq-title {
    text-wrap: balance;
}

/* ---------- Контраст ---------- */

.hero-description,
.section-desc,
.faq-description,
.rnd-description,
.manifesto-description,
.card p,
.faq-answer-content {
    color: var(--text-secondary);
}

/* Кнопки: тёмный текст на золотом фоне (было белым, 2.3:1) */
.btn-primary,
.cookie-btn-primary {
    color: var(--accent-ink);
}

.carousel-dot {
    color: var(--text-muted);
}

.carousel-dot.active {
    color: var(--accent-ink);
}

/* Номера манифеста были почти невидимы (1.1:1) */
.manifesto-card-number {
    position: static;
    display: inline-block;
    top: auto;
    right: auto;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    color: var(--accent);
    margin-bottom: 14px;
}

.manifesto-card:hover .manifesto-card-number {
    color: var(--accent-light);
    transform: none;
}

/* ---------- Убираем градиентный текст ---------- */

.gradient-text,
.hero-accent,
.logo-text,
.footer-logo-text,
h1 .gradient,
.stat-value,
.metric-value {
    background: none !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
    -webkit-text-fill-color: currentColor !important;
    color: var(--accent-light);
}

/* ---------- Убираем декоративные «живые» индикаторы ---------- */

.cursor-blink {
    display: none !important;
}

.hero-badge::before {
    animation: none !important;
}

/* Декоративный глобальный grid-фон — типичный признак генерации */
.grid-pattern {
    display: none;
}

.rnd-grid,
.faq-grid {
    display: none;
}

.rnd-glow,
.faq-glow {
    opacity: 0.35;
}

/* ---------- Ритм и вертикальные отступы ---------- */

.section,
.rnd-section,
.manifesto-section,
.faq-section {
    padding: 96px 0;
}

.section-header {
    margin-bottom: 48px;
}

.hero {
    min-height: auto;
    padding: 136px 0 88px;
}

/* ---------- Читаемость строк ---------- */

.hero-description {
    max-width: 56ch;
}

.rnd-description {
    max-width: 68ch;
}

.manifesto-description {
    max-width: 64ch;
}

.section-desc {
    max-width: 58ch;
    margin-left: auto;
    margin-right: auto;
}

.rnd-card-description,
.card p,
.faq-answer-content {
    max-width: 70ch;
    text-wrap: pretty;
}

.manifesto-card-text {
    max-width: 46ch;
}

/* ---------- Карточки: иконка рядом с заголовком,
              а не «плитка над заголовком» ---------- */

.carousel-card.service-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 14px;
    align-items: start;
}

.carousel-card.service-card .card-icon,
.carousel-card.service-card .card-icon-image {
    grid-column: 1;
    grid-row: 1;
    width: 44px;
    height: 44px;
    margin: 0;
    background: none;
    border-radius: 0;
    font-size: 26px;
    align-self: center;
    justify-self: start;
}

.carousel-card.service-card .card-icon-image img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.carousel-card.service-card h3 {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
}

.carousel-card.service-card > p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 14px;
}

.carousel-card.service-card > div:last-child {
    grid-column: 1 / -1;
    grid-row: 3;
}

.rnd-card {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 16px;
    align-items: start;
}

.rnd-card .rnd-card-icon {
    grid-column: 1;
    grid-row: 1;
    width: 48px;
    height: 48px;
    margin: 0;
    background: none;
    border-radius: 0;
    align-self: center;
}

.rnd-card .rnd-card-icon .icon-wrapper {
    width: 36px;
    height: 36px;
}

.rnd-card:hover .rnd-card-icon {
    transform: none;
    box-shadow: none;
}

.rnd-card .rnd-card-title {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    margin: 0;
}

.rnd-card > p {
    grid-column: 1 / -1;
    grid-row: 2;
    margin-top: 16px;
}

.rnd-card .rnd-card-result {
    grid-column: 1 / -1;
    grid-row: 3;
}

/* Результат — не вложенная карточка, а спокойная строка */
.rnd-card-result {
    background: none;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0;
    padding: 16px 0 0;
    margin-top: 16px;
}

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

/* Боковые/верхние «полоски-акценты» удалены из layout.css */

/* ---------- Мелкая типографика ---------- */

.manifesto-card-title {
    font-size: clamp(13px, 1.6vw, 14px);
    min-height: 0;
}

.rnd-card-title .card-label {
    display: inline-block;
    margin-top: 4px;
}

/* ---------- Hero: карточка проекта вместо «фейкового кода» ---------- */

.hero-visual {
    width: 440px;
    height: auto;
    top: 50%;
    transform: translateY(-50%);
}

.brief-card {
    background: var(--bg-secondary);
    border: 1px solid rgba(201, 169, 110, 0.22);
    border-radius: 12px;
    padding: 24px;
    color: var(--text);
    position: relative;
    overflow: hidden;
}

.brief-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.brief-kicker {
    font-family: var(--font-display);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--accent);
}

.brief-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    padding: 4px 10px;
}

.brief-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.brief-rows {
    display: grid;
    gap: 10px;
    margin: 0 0 20px;
}

.brief-rows > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brief-rows dt {
    font-size: 13px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.brief-rows dd {
    margin: 0;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    color: var(--text);
}

.brief-result {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 10px;
    background: rgba(201, 169, 110, 0.1);
}

.brief-result-value {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 700;
    color: var(--accent-light);
    line-height: 1;
}

.brief-result-label {
    font-size: 12px;
    line-height: 1.45;
    color: var(--text-secondary);
}

/* ---------- Внутренние страницы ---------- */

.seo-content p {
    max-width: 70ch !important;
    text-wrap: pretty;
}

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

/* Карточки услуг: заголовок теперь h2 ради иерархии */
.service-card h2 {
    font-size: 26px;
    line-height: 1.2;
    margin-bottom: 12px;
}

/* Кейсы: тег и заголовок-карточка */
.case-tag {
    font-size: 11px !important;
}

.case-card h2 {
    font-family: var(--font-display);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--text);
}

/* Технологии: категория и заголовок-карточка */
.tech-category {
    font-size: 11px !important;
}

.tech-card h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 14px;
    color: var(--text);
    letter-spacing: -0.5px;
    transition: color 0.3s;
}

/* Блог: единый брендовый цвет категорий вместо случайных */
.featured-category,
.post-category {
    color: var(--accent) !important;
    background: rgba(201, 169, 110, 0.1) !important;
    border-color: rgba(201, 169, 110, 0.22) !important;
}

.popular-rank {
    color: rgba(201, 169, 110, 0.7) !important;
}

/* ---------- Продукты: одна карточка не теряется в пустой сетке ---------- */

.products-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
}

.products-grid > .card {
    flex: 0 1 380px;
    width: 100%;
    max-width: 380px;
}

/* ---------- Адаптив ---------- */

@media (max-width: 1200px) {
    .hero-visual {
        display: none;
    }
}

@media (max-width: 1024px) {
    .section,
    .rnd-section,
    .manifesto-section,
    .faq-section {
        padding: 76px 0;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .case-card h2 {
        font-size: 32px;
    }

    .tech-card h2 {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .terminal-hint {
        display: none !important;
    }

    .section,
    .rnd-section,
    .manifesto-section,
    .faq-section {
        padding: 64px 0;
    }

    .hero {
        padding: 96px 0 56px;
    }

    .section-header {
        margin-bottom: 32px;
    }

    .carousel-card.service-card,
    .rnd-card {
        grid-template-columns: auto 1fr;
    }

    .case-card h2 {
        font-size: 28px;
    }
}

@media (max-width: 640px) {
    .tech-card h2 {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cursor-blink,
    .hero-badge::before {
        animation: none !important;
    }
}
