/* =========================================================================
   Tetris — design tokens (canon: docs/design/tokens.md, макет «Портал брокеров Tetris v2»)
   Единый источник переменных для фасада (шапка, футер, ACF-блоки главной).
   ========================================================================= */

:root {
    /* ---- Палитра ---- */
    --tt-brand:        #914A2B;
    --tt-brand-hover:  #C95320;
    --tt-brand-light:  #C08464;
    --tt-brand-dark:   #6E3820;
    --tt-action:       #1A693C;
    --tt-action-hover: #018F3E;

    --tt-bg:        #FFFFFF;
    --tt-bg-muted:  #F5F5F5;
    --tt-bg-portal: #FAFAFA;
    --tt-dark:      #292929;

    --tt-heading:    #292929;
    --tt-text:       #292929;
    --tt-text-2:     #4A4A4A;
    --tt-text-muted: #8A8A8A;
    --tt-on-brand:   #F0DED5;

    --tt-border:       #E5E5E5;
    --tt-border-warm:  #EAE2DC;
    --tt-border-input: #DCDCDC;
    --tt-border-dark:  #3A3A3A;
    --tt-input-bg:     #FAFAFA;

    /* ---- Статусы лотов / бейджи (§1 tokens.md — статус «Продан») ---- */
    --tt-status-sold-bg:     #EFEFEF;
    --tt-status-sold-border: #DDDDDD;
    --tt-status-sold-text:   #A8A8A8;

    /* ---- Шрифты ---- */
    --tt-font-head: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --tt-font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --tt-font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

    /* ---- Радиусы ---- */
    --tt-radius:    8px;
    --tt-radius-lg: 12px;
    --tt-radius-sm: 6px;

    /* ---- Тени ---- */
    --tt-shadow-card:          0 1px 2px rgba(41,41,41,0.05), 0 6px 18px rgba(41,41,41,0.07);
    --tt-shadow-card-hover:    0 2px 6px rgba(41,41,41,0.08), 0 26px 56px rgba(41,41,41,0.18);
    --tt-shadow-hero-img:      0 30px 70px rgba(0,0,0,0.35);
    --tt-shadow-popup:         0 6px 20px rgba(41,41,41,0.06);

    /* ---- Сетка / контейнер ---- */
    --tt-container:     1340px;
    --tt-container-pad: 20px;

    /* ---- Отступы ---- */
    --tt-space-1:  4px;
    --tt-space-2:  8px;
    --tt-space-3:  12px;
    --tt-space-4:  16px;
    --tt-space-5:  20px;
    --tt-space-6:  24px;
    --tt-space-8:  32px;
    --tt-space-12: 48px;
    --tt-space-16: 64px;
    --tt-space-20: 80px;
    --tt-space-28: 112px;

    /* ---- Transition ---- */
    --tt-t-fast: 160ms ease;
    --tt-t-base: 200ms ease;
    --tt-t-card: 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================================================================
   Базовые утилиты фасада (общие для блоков)
   ========================================================================= */

.tt-section { padding: var(--tt-space-28) 0; }
.tt-section--muted { background: var(--tt-bg-muted); }
.tt-section--white { background: var(--tt-bg); }

.tt-container {
    width: 100%;
    max-width: var(--tt-container);
    margin: 0 auto;
    padding: 0 var(--tt-container-pad);
}

/* Заголовок секции с терракотовым подчёркиванием */
.tt-h2 {
    font-family: var(--tt-font-head);
    font-weight: 600;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    color: var(--tt-heading);
    margin: 0;
}
.tt-h2::after {
    content: "";
    display: block;
    width: 90px;
    height: 3px;
    margin-top: 16px;
    background: var(--tt-brand);
}

/* Моно-eyebrow */
.tt-eyebrow {
    font-family: var(--tt-font-mono);
    font-weight: 400;
    font-size: 12px;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tt-brand);
    margin: 0;
}

/* ---- Кнопки ---- */
.tt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--tt-font-body);
    font-weight: 500;
    font-size: 16px;
    line-height: 1;
    border-radius: var(--tt-radius);
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    touch-action: manipulation;
    transition: background-color var(--tt-t-base), border-color var(--tt-t-base), transform var(--tt-t-base), color var(--tt-t-base);
}
.tt-btn--action {
    padding: 0.95em 1.9em;
    background: var(--tt-action);
    color: #fff;
}
.tt-btn--outline-white {
    padding: 0.95em 1.9em;
    background: transparent;
    border-color: rgba(255,255,255,0.3);
    color: #fff;
}
.tt-btn--outline-brand {
    padding: 0.9em 1.8em;
    background: transparent;
    border-color: #D9C4B8;
    color: var(--tt-brand);
    font-size: 14px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.tt-btn--outline-action {
    padding: 0.85em 1.6em;
    background: transparent;
    border-color: var(--tt-action);
    color: var(--tt-action);
    font-size: 15px;
}

@media (hover: hover) and (pointer: fine) {
    .tt-btn--action:hover      { background: var(--tt-action-hover); transform: translateY(-2px); }
    .tt-btn--outline-white:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.8); }
    .tt-btn--outline-brand:hover { border-color: var(--tt-brand); background: #FBF6F3; }
    .tt-btn--outline-action:hover { background: var(--tt-action); color: #fff; }
}

/* ---- Лого-плитка (тетрамино 2×2) ---- */
.tt-logo-tile {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
    flex-shrink: 0;
}
.tt-logo-tile span { display: block; border-radius: 1px; }
.tt-logo-tile span:nth-child(1) { background: var(--tt-brand-light); }
.tt-logo-tile span:nth-child(2) { background: var(--tt-brand); }
.tt-logo-tile span:nth-child(3) { background: var(--tt-brand); }
.tt-logo-tile span:nth-child(4) { background: var(--tt-brand-dark); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    /* Бегущая строка проектов не должна полностью останавливаться — только замедляется */
    .tt-marquee__track {
        animation-duration: 120s !important;
        animation-iteration-count: infinite !important;
    }
}
