/*
 * Wall Label: color tokens, fonts and the shared side column.
 * Loaded on every page (front page included). Rules are scoped to .tb-side so
 * they win over Made's header styles on the other pages.
 * Spec: design/wall-label-home.dc.html
 */

:root {
    --tb-bg: #F5F4F0;
    --tb-ink: #1A1A1A;
    --tb-text-2: #3D3B37;
    --tb-muted: #5E5B55;
    --tb-rule: #D9D6CE;
    --tb-accent: #C8402B;
    --tb-accent-ink: #B23A26;
    --tb-bar: #8C887F;
    --tb-panel: #E6E3DC;
    --tb-card: #FFFFFF;
    --tb-serif: 'Instrument Serif', Georgia, serif;
    --tb-sans: 'Inter Tight', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --tb-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

/* ---- Side column --------------------------------------------------------- */

.tb-side {
    display: flex;
    flex-direction: column;
    gap: 40px;
    color: var(--tb-ink);
    font-family: var(--tb-sans);
    font-size: 16px;
    line-height: 1.55;
    text-align: left;
}

.tb-side a {
    color: var(--tb-ink);
}

.tb-side a:hover {
    color: var(--tb-accent-ink);
}

.tb-side :focus-visible {
    outline: 2px solid var(--tb-accent);
    outline-offset: 3px;
}

.tb-side .tb-brand {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-decoration: none;
}

.tb-side .tb-brand__row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tb-side .tb-brand__stamp {
    flex: none;
    display: block;
}

/* Uploaded logo: same height as the stamp, any shape. */
.tb-side .tb-brand__logo {
    flex: none;
    display: block;
    width: auto;
    height: 58px;
    max-width: 140px;
    object-fit: contain;
}

.tb-side .tb-brand__name {
    margin: 0;
    padding: 0;
    font-family: var(--tb-serif);
    font-weight: 400;
    font-size: 38px;
    line-height: 0.95;
    letter-spacing: -0.01em;
    text-transform: none;
    color: var(--tb-ink);
}

.tb-side .tb-brand__tagline {
    font-family: var(--tb-mono);
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--tb-muted);
}

.tb-side .tb-nav__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 19px;
    font-weight: 500;
}

.tb-side .tb-nav__list li {
    margin: 0;
    padding: 0;
}

.tb-side .tb-nav__list a {
    display: inline-block;
    padding: 6px 0;
    text-decoration: none;
    font-family: var(--tb-sans);
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
    letter-spacing: normal;
}

.tb-side .tb-nav__list .current-menu-item > a,
.tb-side .tb-nav__list .current-menu-ancestor > a,
.tb-side .tb-nav__list .current_page_parent > a {
    color: var(--tb-accent-ink);
}

.tb-side .tb-intro {
    border-top: 1px solid var(--tb-rule);
    padding-top: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 15px;
    color: var(--tb-text-2);
}

.tb-side .tb-intro p {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: inherit;
}

/* Made's gallery description / caption / controls inside the column. */
.tb-side .tb-intro .gallery__description {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: static;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
}

/* ---- Card grid: home page sections and [play_cards] (inc/play.php) ------- */
/* Home-only layouts (square, portrait) are in home.css; in-content overrides
   against Made's .entry__content styles are in site.css. */

.tb-grid {
    display: grid;
}

.tb-grid--cards {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 24px;
}

.tb-tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 100%;
    text-decoration: none;
}

.tb-tile__media {
    display: block;
    background: var(--tb-panel);
    border-radius: 3px;
    overflow: hidden;
}

/* Two classes, to beat home.css's later `.tb-home img { height: auto }`. */
.tb-tile .tb-tile__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tb-tile__title {
    font-weight: 500;
}

.tb-grid--cards .tb-tile {
    gap: 14px;
    padding: 24px;
    background: var(--tb-card);
    border: 1px solid var(--tb-rule);
    border-radius: 6px;
}

.tb-grid--cards .tb-tile__media {
    aspect-ratio: 16 / 10;
    background: var(--tb-bg);
    border-radius: 4px;
}

.tb-tile__eyebrow {
    font-family: var(--tb-mono);
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tb-muted);
}

.tb-grid--cards .tb-tile__title {
    font-family: var(--tb-serif);
    font-weight: 400;
    font-size: 30px;
    line-height: 1;
}

.tb-tile__text {
    color: var(--tb-text-2);
    font-size: 15px;
}

@media (max-width: 520px) {
    .tb-grid--cards .tb-tile {
        padding: 20px;
    }
}

/* ---- Footer line (parts/site-footer.php), shared by every page ----------- */

.tb-footer {
    border-top: 1px solid var(--tb-rule);
    padding: 28px 0 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-family: var(--tb-mono);
    font-size: 12px;
    line-height: 1.55;
    color: var(--tb-muted);
    text-align: left;
}

.tb-footer a {
    color: var(--tb-muted);
}

.tb-footer a:hover {
    color: var(--tb-accent-ink);
}

/* ---- Narrow screens: column stacks above the content --------------------- */

@media (max-width: 900px) {
    .tb-side {
        gap: 24px;
    }

    .tb-side .tb-nav__list {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0 20px;
        font-size: 18px;
    }

    .tb-side .tb-intro {
        padding-top: 20px;
    }
}
