/*
 * Home page ("A · Wall Label"). Loaded only on the front page, after
 * column.css (tokens, fonts, side column).
 * Spec: design/wall-label-home.dc.html
 */



/* ---- Base --------------------------------------------------------------- */

/* Menu links to #work, #play, #small-worlds glide to the section (browser
   speed). Skipped when the visitor's system asks for reduced motion. */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body.tb-home {
    margin: 0;
    background: var(--tb-bg);
    color: var(--tb-ink);
    font-family: var(--tb-sans);
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.tb-home *,
.tb-home *::before,
.tb-home *::after {
    box-sizing: border-box;
}

.tb-home img {
    display: block;
    max-width: 100%;
    height: auto;
}

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

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

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

.tb-home ul[role="list"] {
    list-style: none;
    margin: 0;
    padding: 0;
}

.tb-home .screen-reader-text {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.tb-home [hidden] {
    display: none !important;
}

.tb-skip {
    position: absolute;
    left: 16px;
    top: -100px;
    z-index: 100;
    padding: 10px 16px;
    background: var(--tb-ink);
    color: var(--tb-bg) !important;
    border-radius: 4px;
    text-decoration: none;
}

.tb-skip:focus {
    top: 16px;
}

/* ---- Page layout: side column + content --------------------------------- */

.tb-page {
    display: flex;
    flex-wrap: wrap;
}

/* Same column as every other page: 300px at the left edge, staying in place
   while the content scrolls (see site.css). */
.tb-side {
    flex: 0 0 300px;
    width: 300px;
    padding: 48px 32px 48px 40px;
    align-self: flex-start;
}

@media (min-width: 901px) {
    .tb-side {
        position: sticky;
        top: 0;
        max-height: 100vh;
        overflow-y: auto;
        scrollbar-width: none;
    }

    .admin-bar .tb-side {
        top: 32px;
        max-height: calc(100vh - 32px);
    }
}

.tb-main {
    flex: 1 1 0;
    max-width: 1140px;
    min-width: 0;
    padding: 48px 48px 0 24px;
    display: flex;
    flex-direction: column;
    gap: 120px;
}

.tb-main:focus {
    outline: none;
}

/* ---- Slideshow ----------------------------------------------------------- */

.tb-hero {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    align-items: flex-end;
}

.tb-hero__media {
    flex: 1 1 460px;
    max-width: 640px;
    position: relative;
    aspect-ratio: 4 / 5;
    background: var(--tb-panel);
    border-radius: 4px;
    overflow: hidden;
}

.tb-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.6s ease;
}

.tb-slide.is-active {
    opacity: 1;
}

.tb-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tb-hero__panel {
    flex: 1 1 300px;
    max-width: 420px;
    display: flex;
    flex-direction: column;
    gap: 28px;
    padding-bottom: 8px;
}

.tb-label {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tb-label__meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-family: var(--tb-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--tb-muted);
}

.tb-label__rule {
    flex: 1;
    height: 1px;
    background: var(--tb-rule);
}

.tb-label__head {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.tb-label__title {
    margin: 0;
    font-family: var(--tb-serif);
    font-weight: 400;
    font-size: clamp(42px, 5vw, 60px);
    line-height: 1;
    letter-spacing: -0.01em;
}

/* The title links to the piece, like the main button. No underline; hover
   changes only the color (.tb-home a:hover). */
.tb-home .tb-label__title a {
    text-decoration: none;
}

.tb-label__desc {
    margin: 0;
    font-size: 18px;
    color: var(--tb-text-2);
}

.tb-label__facts {
    margin: 0;
    display: grid;
    grid-template-columns: 110px 1fr;
    row-gap: 10px;
    column-gap: 16px;
    font-size: 14px;
    border-top: 1px solid var(--tb-rule);
    padding-top: 20px;
}

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

.tb-label__facts dd {
    margin: 0;
}

.tb-label__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.tb-btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
}

.tb-home .tb-btn--solid {
    background: var(--tb-ink);
    color: var(--tb-bg);
}

.tb-home .tb-btn--solid:hover {
    background: var(--tb-accent-ink);
    color: var(--tb-bg);
}

.tb-btn--line {
    border: 1px solid var(--tb-ink);
}

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

.tb-dot {
    width: 28px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.tb-dot::before {
    content: '';
    display: block;
    width: 100%;
    height: 1px;
    background: var(--tb-bar);
}

.tb-dot[aria-current="true"]::before {
    height: 3px;
    background: var(--tb-accent);
}

.tb-pause {
    margin-left: 8px;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--tb-rule);
    background: transparent;
    border-radius: 999px;
    font-family: var(--tb-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--tb-text-2);
    cursor: pointer;
}

/* ---- Gallery sections ---------------------------------------------------- */
/* The shared grid and card rules (.tb-grid, .tb-tile, --cards) are in
   column.css, so the [play_cards] grid can use them on other pages. */

.tb-section {
    display: flex;
    flex-direction: column;
    gap: 32px;
    scroll-margin-top: 24px;
}

.tb-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    border-bottom: 1px solid var(--tb-ink);
    padding-bottom: 14px;
}

.tb-section__title {
    margin: 0;
    font-family: var(--tb-serif);
    font-weight: 400;
    font-size: clamp(38px, 4.5vw, 48px);
    line-height: 1;
}

.tb-section__intro {
    margin: 0;
    max-width: 520px;
    color: var(--tb-text-2);
}

.tb-section__all {
    font-family: var(--tb-mono);
    font-size: 12px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.tb-grid--square {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 40px 28px;
}

.tb-grid--portrait {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.tb-grid--square .tb-tile__media {
    aspect-ratio: 1;
}

.tb-grid--portrait .tb-tile {
    gap: 8px;
}

.tb-grid--portrait .tb-tile__media {
    aspect-ratio: 3 / 4;
}

.tb-tile__caption {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.tb-grid--portrait .tb-tile__title {
    font-size: 15px;
}

.tb-tile__kind {
    font-family: var(--tb-mono);
    font-size: 12px;
    color: var(--tb-muted);
    text-align: right;
}

/* ---- From the zug + newsletter ------------------------------------------- */

.tb-writing {
    display: flex;
    flex-wrap: wrap;
    gap: 48px;
    padding-bottom: 40px;
    scroll-margin-top: 24px;
}

.tb-writing__list {
    flex: 2 1 420px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tb-writing__title {
    border-bottom: 1px solid var(--tb-ink);
    padding-bottom: 14px;
}

.tb-post {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--tb-rule);
    font-size: 18px;
    text-decoration: none;
}

.tb-post__label {
    flex: none;
    font-family: var(--tb-mono);
    font-size: 12px;
    color: var(--tb-muted);
    padding-top: 4px;
}

.tb-news {
    flex: 1 1 300px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px;
    background: var(--tb-ink);
    color: var(--tb-bg);
    border-radius: 6px;
    scroll-margin-top: 24px;
}

.tb-news p {
    margin: 0;
}

.tb-news__title {
    font-family: var(--tb-serif);
    font-size: 32px;
    line-height: 1.05;
}

.tb-news__text {
    font-size: 15px;
    color: #D6D3CC;
}

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

.tb-news input {
    min-height: 44px;
    padding: 0 14px;
    border: 1px solid var(--tb-muted);
    background: #262624;
    color: var(--tb-bg);
    border-radius: 4px;
    font: inherit;
}

.tb-news input::placeholder {
    color: #9C988F;
}

.tb-news button {
    min-height: 44px;
    border: 0;
    background: var(--tb-bg);
    color: var(--tb-ink);
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tb-news :focus-visible {
    outline-color: var(--tb-bg);
}

.tb-news__fields {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tb-news button:disabled {
    opacity: 0.6;
    cursor: progress;
}

/* Mailchimp's bot trap: off-screen, never shown. */
.tb-news__trap {
    position: absolute;
    left: -5000px;
}

.tb-news__status:empty {
    display: none;
}

.tb-news__status {
    font-size: 15px;
    color: var(--tb-bg);
}

.tb-news__status.is-error {
    color: #F2B8AC;
}

.tb-news__status:focus {
    outline: none;
}

/* ---- Footer -------------------------------------------------------------- */

/* .tb-footer: see column.css (shared by every page). */

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

@media (max-width: 900px) {
    .tb-side {
        flex-basis: 100%;
        width: auto;
        padding: 32px 16px 0;
    }

    .tb-main {
        padding: 48px 16px 0;
        gap: 88px;
    }

    .tb-hero {
        gap: 32px;
    }

    .tb-hero__media {
        flex-basis: 100%;
        max-width: none;
    }

    .tb-hero__panel {
        max-width: none;
    }
}

@media (max-width: 520px) {
    .tb-grid--square {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 28px 16px;
    }

    .tb-grid--portrait {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 16px;
    }

    .tb-tile__caption {
        flex-direction: column;
        gap: 2px;
    }

    .tb-tile__kind {
        text-align: left;
    }

    .tb-writing__list,
    .tb-news {
        flex-basis: 100%;
    }

    .tb-post {
        font-size: 17px;
    }
}

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

.tb-hero.is-instant .tb-slide {
    transition: none;
}
