/* ═══════════ PROJECTS INDEX ═══════════
   A quiet gallery of the work. Each garden is a tile: its cover photo,
   the place name, and the line that names its mood. Dark, calm, scrollable. */

/* The deck/show pages lock scrolling; this page is a document — let it breathe. */
html, body {
    overflow: auto;
    height: auto;
    min-height: 100%;
}

.projects {
    min-height: 100vh;
    padding: calc(var(--topbar-h) + clamp(20px, 4vh, 44px)) 8vw clamp(72px, 10vh, 120px);
    background: var(--bark);
}

/* ── page heading ── */
.projects-head {
    max-width: 60ch;
    margin: 0 auto clamp(44px, 6vh, 76px);
    text-align: center;
    color: var(--linen);
}

.projects-head .eyebrow {
    display: block;
    margin-bottom: 20px;
    color: var(--moss);
}

.projects-head .display {
    font-size: clamp(44px, 8vw, 92px);
    font-weight: 300;
}

.projects-head .lede {
    margin-top: 18px;
    color: var(--stone);
    font-weight: 300;
}

/* ── tile grid ── */
.tiles {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: clamp(16px, 2.4vw, 30px);
    max-width: 1360px;
    margin: 0 auto;
    list-style: none;
}

.tile {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: var(--moss-shadow);
    text-decoration: none;
    color: var(--linen);
}

.tile img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 1.2s cubic-bezier(.2,.7,.2,1);
}

/* gradient so the caption always sits on legible ground */
.tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(20,17,12,0) 32%,
        rgba(20,17,12,0.28) 62%,
        rgba(20,17,12,0.82) 100%);
    transition: background .5s ease;
}

.tile:hover img,
.tile:focus-visible img { transform: scale(1.08); }

.tile:focus-visible {
    outline: 2px solid var(--linen);
    outline-offset: 3px;
}

.tile-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    padding: 28px 30px 26px;
    text-shadow: 0 1px 3px rgba(20,17,12,0.7), 0 2px 20px rgba(20,17,12,0.5);
}

.tile-caption .place {
    display: block;
    font-size: clamp(30px, 4vw, 44px);
    font-weight: 300;
    letter-spacing: 0.01em;
}

.tile-caption .rule {
    display: block;
    width: 42px;
    height: 1px;
    margin: 14px 0 12px;
    background: rgba(244,241,234,0.7);
    transform-origin: left;
    transform: scaleX(0.7);
    transition: transform .5s cubic-bezier(.2,.7,.2,1);
}

.tile:hover .rule,
.tile:focus-visible .rule { transform: scaleX(1); }

.tile-caption .sub {
    display: block;
    font-size: 12px;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    font-weight: 500;
    color: rgba(244,241,234,0.92);
}

@media (max-width: 600px) {
    .tiles { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
    .tile img { transition: none; }
    .tile:hover img, .tile:focus-visible img { transform: scale(1.02); }
}
