/* /foto-taranto/ — the open Taranto photo library.
   Design intent: the photographs ARE the interface. A slightly deeper navy
   than the site base, big picture-tiles with a thin glass border and soft
   radius, one quiet caption bar per tile carrying the licence line. */

.ft-section {
    max-width: 1240px;
    margin: 0 auto;
    padding: 4.5rem 1.4rem 6rem;
    /* full-bleed backdrop one step darker than --bg-base */
    background: #07080d;
    box-shadow: 0 0 0 100vmax #07080d;
    clip-path: inset(0 -100vmax);
}

.ft-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    background: var(--arrow-soft);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin: 2.2rem 0 0.6rem;
    text-align: center;
}

.ft-section h1 {
    font-size: clamp(2rem, 4.6vw, 3rem);
    line-height: 1.08;
    color: var(--text-primary);
    margin: 0 0 0.9rem;
    text-align: center;
}

.ft-standfirst {
    max-width: 62ch;
    color: var(--text-secondary);
    font-size: 1.06rem;
    line-height: 1.65;
    margin: 0 auto 2rem;
    text-align: center;
}

/* ── licence banner ─────────────────────────────────────────────────────── */
.ft-licence {
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: var(--surface);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    padding: 1.1rem 1.3rem;
    margin: 0 auto 2.6rem;
    max-width: 720px;
    text-align: center;
}
.ft-licence-k {
    font-size: 0.74rem; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--text-muted); margin: 0 0 0.35rem;
}
.ft-licence-v { color: var(--text-secondary); font-size: 0.94rem; margin: 0 0 0.4rem; }
.ft-licence-line {
    font-size: 1.02rem; color: var(--text-primary); font-weight: 600;
    margin: 0 0 0.45rem; user-select: all;   /* one click selects the whole line */
}
.ft-licence-n { font-size: 0.8rem; color: var(--text-muted); margin: 0; }
.ft-licence-n a { color: var(--bordeaux); text-decoration: none; }
.ft-licence-n a:hover { text-decoration: underline; }

/* ── the feed ───────────────────────────────────────────────────────────── */
.ft-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr));
    gap: 26px;
}

.ft-tile {
    margin: 0;
    border-radius: 18px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    /* the "glass edge": a 1px light border + a faint inner top highlight */
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09), var(--shadow-card);
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
}
.ft-tile:hover {
    transform: translateY(-4px);
    border-color: var(--border-medium);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16),
                0 30px 64px -26px rgba(0, 0, 0, 0.9);
}

.ft-open {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
    overflow: hidden;
}
.ft-open img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;          /* beat the width/height HTML attributes… */
    aspect-ratio: 3 / 2;   /* …so the tile ratio actually applies */
    object-fit: cover;
    background: #0a0b11;   /* lazy-load placeholder */
    transition: transform 0.6s ease;
}
.ft-tile:hover .ft-open img { transform: scale(1.028); }

.ft-cap {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.72rem 0.95rem 0.78rem;
    background: rgba(255, 255, 255, 0.035);
    border-top: 1px solid rgba(255, 255, 255, 0.07);
}
.ft-cap-title { color: var(--text-primary); font-size: 0.95rem; font-weight: 600; }
.ft-cap-side {
    display: flex; flex-direction: column; align-items: flex-end; gap: 0.15rem;
    text-align: right; flex-shrink: 0;
}
.ft-lic { color: var(--text-muted); font-size: 0.7rem; letter-spacing: 0.02em; }
.ft-dl {
    color: var(--bordeaux); font-size: 0.8rem; font-weight: 600;
    text-decoration: none;
}
.ft-dl:hover { text-decoration: underline; }

.ft-empty {
    border: 1px dashed var(--border-soft);
    border-radius: 18px;
    padding: 3.4rem 1.5rem;
    text-align: center;
    color: var(--text-secondary);
}
.ft-empty p:first-child { font-size: 1.15rem; color: var(--text-primary); margin: 0 0 0.5rem; }
.ft-empty-n { font-size: 0.9rem; color: var(--text-muted); max-width: 52ch; margin: 0 auto; }

/* ── lightbox ───────────────────────────────────────────────────────────── */
.ft-box {
    /* explicit both-axis centering — the site reset strips the UA's
       dialog margin:auto, which is what pinned it to the top */
    position: fixed;
    inset: 0;
    margin: auto;
    width: fit-content;
    height: fit-content;
    max-width: min(1400px, 94vw);
    max-height: 92vh;
    overflow: auto;
    border: 1px solid var(--border-medium);
    border-radius: 18px;
    padding: 0;
    background: #0a0b11;
    box-shadow: 0 40px 120px -30px rgba(0, 0, 0, 0.95);
}
.ft-box::backdrop {
    background: rgba(4, 4, 9, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
.ftb-fig { margin: 0; }
.ftb-img { display: block; max-width: 100%; max-height: 80vh; margin: 0 auto; }
.ftb-cap {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 1rem; padding: 0.8rem 1.1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.ftb-title { color: var(--text-primary); font-weight: 600; }
.ftb-side { display: flex; align-items: baseline; gap: 1.1rem; flex-shrink: 0; }
.ftb-close {
    border: 1px solid var(--border-soft); background: var(--surface);
    color: var(--text-secondary); border-radius: 999px;
    font-size: 0.78rem; padding: 0.3rem 0.8rem; cursor: pointer;
}
.ftb-close:hover { border-color: var(--border-medium); color: var(--text-primary); }

@media (max-width: 640px) {
    .ft-grid { gap: 18px; }
    .ft-cap { flex-direction: column; gap: 0.3rem; }
    .ft-cap-side { align-items: flex-start; text-align: left; }
    .ftb-cap { flex-direction: column; align-items: center; text-align: center; gap: 0.55rem; }
    .ftb-side { flex-direction: column; align-items: center; gap: 0.45rem; }
}

@media (prefers-reduced-motion: reduce) {
    .ft-tile, .ft-open img { transition: none; }
    .ft-tile:hover { transform: none; }
    .ft-tile:hover .ft-open img { transform: none; }
}
