/* =========================================================================
   Tetris — блок «Портал застройщика» (developer-links-block)
   Канон: макет «Портал брокеров Tetris v2», ТЗ 10-developer-portal.
   ========================================================================= */

.tt-devlinks {
    background: var(--tt-bg-portal);
    padding: 56px var(--tt-container-pad) 80px;
}
.tt-devlinks__inner {
    max-width: var(--tt-container);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* ---- Заголовок ---- */
.tt-devlinks__head {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 720px;
}
.tt-devlinks__h2 {
    margin: 0;
    font-family: var(--tt-font-head);
    font-size: 40px;
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    color: var(--tt-heading);
    position: relative;
    padding-bottom: 14px;
}
.tt-devlinks__h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 110px;
    height: 3px;
    background: var(--tt-brand);
}
.tt-devlinks__intro {
    margin: 0;
    font-size: 16px;
    line-height: 1.65;
    color: var(--tt-text-2);
}

/* ---- Плитки ---- */
.tt-devlinks__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}
.tt-devlinks__tile {
    position: relative;
    display: block;
    height: 340px;
    border-radius: var(--tt-radius);
    border: 1px solid var(--tt-border);
    overflow: hidden;
    text-decoration: none;
    background: var(--tt-dark);
    transition: transform var(--t-devlinks, 240ms cubic-bezier(0.22, 1, 0.36, 1)),
                box-shadow var(--t-devlinks, 240ms cubic-bezier(0.22, 1, 0.36, 1)),
                border-color 200ms ease;
}
.tt-devlinks__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform 500ms cubic-bezier(0.22, 1, 0.36, 1);
}
.tt-devlinks__overlay {
    position: absolute;
    inset: 0;
    background: rgba(41, 41, 41, 0.28);
    transition: background-color 240ms ease;
}
.tt-devlinks__body {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 24px;
    text-align: center;
}
.tt-devlinks__title {
    font-family: var(--tt-font-head);
    font-size: 30px;
    font-weight: 600;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}
.tt-devlinks__subtitle {
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
}
.tt-devlinks__link {
    position: absolute;
    right: 16px;
    bottom: 14px;
    left: 16px;
    text-align: right;
    max-width: calc(100% - 32px);
    font-family: var(--tt-font-mono);
    font-size: 11px;
    letter-spacing: 0.04em;
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (hover: hover) and (pointer: fine) {
    .tt-devlinks__tile:hover {
        transform: translateY(-4px);
        box-shadow: 0 16px 40px rgba(41, 41, 41, 0.14);
        border-color: var(--tt-action);
    }
    .tt-devlinks__tile:hover .tt-devlinks__bg { transform: scale(1.06); }
    .tt-devlinks__tile:hover .tt-devlinks__overlay { background: rgba(41, 41, 41, 0.42); }
}

/* ---- Кнопка «На главную» ---- */
.tt-devlinks__foot {
    display: flex;
}

/* ---- Адаптив ---- */
@media (max-width: 991px) {
    .tt-devlinks__tile { height: 300px; }
}
@media (max-width: 767px) {
    .tt-devlinks { padding: 40px 20px 56px; }
    .tt-devlinks__grid { gap: 20px; }
    .tt-devlinks__h2 { font-size: 30px; }
}
@media (max-width: 560px) {
    .tt-devlinks__grid { grid-template-columns: 1fr; }
    .tt-devlinks__tile { height: 220px; }
    .tt-devlinks__title { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    .tt-devlinks__tile,
    .tt-devlinks__bg { transition: none; }
    .tt-devlinks__tile:hover { transform: none; }
    .tt-devlinks__tile:hover .tt-devlinks__bg { transform: none; }
}
