/* Site Map: every page as a card — the top of the page in a picture, its name, one line on what
   it holds and its file — grouped like the footer. Built on inner.css + flow.css (.p-hero). */

.sm-page {
    padding-bottom: var(--section-space);
}

.sm-group {
    margin-top: var(--section-space);
}

.sm-group .h2 {
    margin-bottom: var(--title-gap);
}

.sm-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));   /* 4 + 4 pages; a group of 3: .sm-grid-3 */
    gap: 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sm-card {
    --scale: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: var(--radius-card);
    background: var(--card);
    overflow: hidden;
    box-shadow: 2px 4px 12px rgb(0 0 0 / .08);
    transform: scale(var(--scale));
    transition: transform .3s cubic-bezier(0, 0, .5, 1), box-shadow .3s cubic-bezier(0, 0, .5, 1);
}

.sm-card:hover {
    --scale: 1.015;
    box-shadow: 2px 4px 16px rgb(0 0 0 / .16);
}

.sm-card img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    object-position: top;
    border-bottom: 1px solid var(--g200);
}

.sm-text {
    display: grid;
    gap: 6px;
    padding: 24px 28px 28px;
}

.sm-text strong {
    color: var(--g900);
    font-size: 21px;
    font-weight: 600;
    line-height: 1.3;
}

.sm-text span {
    color: var(--g700);
    font-size: 15px;
    line-height: 1.55;
}

.sm-text .sm-file {
    margin-top: 6px;
    color: var(--red-ink);
    font-size: 13px;
    font-weight: 600;
}

.sm-file::after {
    content: " ›";
}

/* a group of three (SPIDTECH: About, Partners, Contact) sits in one row */
.sm-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------- the error pages: one small tile each, the code large ---------- */
.sm-lead {
    margin: calc(var(--title-gap) * -.5) 0 var(--title-gap);
    max-width: 40ch;
}

.sm-errors {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));   /* 11 pages: 6 + 5, 4 + 4 + 3, 3 + 3 + 3 + 2 */
    gap: 16px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sm-err {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 24px 24px 22px;
    border-radius: var(--radius-card);
    background: var(--card);
    transition: background-color .25s var(--ease);
}

.sm-err:hover {
    background: var(--g200);
}

.sm-err strong {
    color: var(--g900);
    font-size: 40px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.sm-err span {
    color: var(--g700);
    font-size: 15px;
    line-height: 1.45;
}

.sm-err .sm-file {
    margin-top: auto;
    padding-top: 10px;
    color: var(--red-ink);
    font-size: 13px;
    font-weight: 600;
}

@media (max-width: 1068px) {
    .sm-grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .sm-errors {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 734px) {
    .sm-group {
        margin-top: var(--section-space);
    }

    .sm-grid,
    .sm-grid-3 {
        grid-template-columns: minmax(0, 1fr);
        gap: 16px;
    }

    .sm-errors {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 10px;
    }

    .sm-err {
        padding: 18px 16px 16px;
    }

    .sm-err strong {
        font-size: 28px;
    }

    .sm-err span {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sm-card {
        transition: none;
    }
}

/* Button levels (2026-10-25): the page addresses read as links (level 4, information blue) */
.sm-text .sm-file,
.sm-err .sm-file {
    color: var(--info, #0066CC);
}

/* ===== phones and tablets (2026-11-07), everything here sits inside a width query, the desktop stays as it was ===== */
@media (max-width: 734px) {
    /* «Unauthorized» broke in two and the arrow fell to its own line: two columns have the room */
    .sm-errors {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
/* ===== end of phones and tablets ===== */
