/* Tileworks — one-page renovation/construction layout on top of Quark 2 */

/* Central narrow column for text sections */
.tw-column {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.tw-section .tw-h1 {
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

.tw-section .tw-h2 {
    color: var(--q2-accent, #B4552D);
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 1.25rem;
    text-transform: none;
}

.tw-body {
    color: var(--q2-text);
    line-height: 1.7;
}

.tw-body p { margin-bottom: 1rem; }

/* Alternate section tint for rhythm */
.tw-section.tw-alt {
    background: var(--q2-bg-muted);
    border-radius: var(--q2-radius-lg);
}

/* --- Hero --- */
.modular-hero.tw-hero {
    background:
        radial-gradient(1200px 400px at 50% -10%, color-mix(in oklab, var(--q2-accent, #B4552D) 22%, transparent), transparent 70%),
        var(--q2-bg-muted);
    /* after the shorthand, so it isn't reset to auto/0% 0% */
    background-size: cover;
    background-position: center;
}
.modular-hero.tw-hero h1 {
    font-size: clamp(2.75rem, 8vw, 5rem);
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
}
.modular-hero.tw-hero h2 {
    color: var(--q2-accent, #B4552D);
    font-weight: 600;
}

/* --- Projects --- */
.tw-projects-list {
    display: flex;
    flex-direction: column;
    gap: 3.5rem;
    margin-top: 2.5rem;
}

.tw-project {
    background: var(--q2-bg-elev);
    border: 1px solid var(--q2-border-ring);
    border-radius: var(--q2-radius-lg);
    box-shadow: var(--q2-shadow-card);
    padding: 2rem;
}

.tw-project-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--q2-divider);
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
}

.tw-project-title { margin: 0; }

.tw-project-date {
    color: var(--q2-text-muted);
    font-size: 0.95rem;
    white-space: nowrap;
}

.tw-project-desc {
    color: var(--q2-text);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Masonry gallery via CSS columns */
.tw-gallery {
    columns: 3 260px;
    column-gap: 0.75rem;
}

.tw-gallery-item {
    display: block;
    margin-bottom: 0.75rem;
    break-inside: avoid;
    border-radius: var(--q2-radius-md);
    overflow: hidden;
    box-shadow: var(--q2-shadow-card);
    transition: transform .2s ease, filter .2s ease;
}

.tw-gallery-item:hover { transform: translateY(-2px); filter: brightness(0.94); }

.tw-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
}

/* --- Lightweight lightbox --- */
.tw-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.85);
    cursor: zoom-out;
    opacity: 0;
    transition: opacity .2s ease;
}
.tw-lightbox.tw-open { opacity: 1; }
.tw-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: var(--q2-radius-md);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.tw-lightbox button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-size: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: var(--q2-radius-pill);
    cursor: pointer;
}
.tw-lightbox button:hover { background: rgba(255, 255, 255, .25); }
.tw-lightbox .tw-lb-prev { left: 1rem; }
.tw-lightbox .tw-lb-next { right: 1rem; }
.tw-lightbox .tw-lb-close { top: 1rem; right: 1rem; transform: none; font-size: 1.25rem; }

/* Process list */
.tw-steps {
    text-align: left;
    max-width: 40rem;
    margin-inline: auto;
}
.tw-steps li { margin-bottom: 0.9rem; }

/* --- Chrome tweaks --- */
/* Brand logo removed; collapse the empty navbar slot instead of leaving a gap. */
.navbar-section.logo:empty { display: none; }

/* Footer credit removed; element kept for sticky-footer flex layout, hidden when empty. */
#footer:empty { display: none; }
