/* ===========================================================================
   RKFocus — single photograph. Loads after css/base.css.

   One picture, as large as the viewport allows, and everything else quiet
   enough to stay out of its way.
   ======================================================================== */

.photo-page main {
    max-width: var(--measure);
    margin: 0 auto;
    padding: clamp(28px, 3.5vw, 46px) var(--pad-x) clamp(50px, 7vw, 100px);
}

.photo__crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faint);
}

.photo__crumbs a {
    transition: color 0.4s ease;
}

.photo__crumbs a:hover {
    color: var(--ivory);
}

.photo__crumbs [aria-current] {
    color: var(--muted);
}

/* ===========================================================================
   The photograph
   ======================================================================== */

.photo__figure {
    margin: clamp(22px, 3vw, 40px) 0 0;
}

.photo__stage {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Capped against the viewport so the whole frame is visible without scrolling,
   and against --frame-max, the capture's own pixel width, so a small frame is
   shown at its true size rather than blown up soft. */
.photo__img {
    width: auto;
    height: auto;
    max-width: min(100%, var(--frame-max, 100%));
    max-height: calc(100svh - 260px);
    object-fit: contain;
}

/* ===========================================================================
   Caption
   ======================================================================== */

.photo__info {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: clamp(22px, 3vw, 56px);
    margin-top: clamp(24px, 3vw, 40px);
    padding-top: clamp(18px, 2.2vw, 28px);
    border-top: 1px solid var(--line);
}

.photo__title {
    font-family: var(--serif);
    font-weight: 400;
    font-size: clamp(32px, 4.6vw, 64px);
    line-height: 1.02;
    letter-spacing: -0.012em;
}

.photo__where {
    display: inline-block;
    margin-top: 10px;
    padding-bottom: 4px;
    border-bottom: 1px solid transparent;
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faint);
    transition: color 0.4s ease, border-color 0.4s ease;
}

.photo__where:hover {
    color: var(--ivory);
    border-bottom-color: var(--gold);
}

/* --- specs --- */

.photo__specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2px 32px;
    margin: 0;
    grid-column: 1;
    max-width: 460px;
}

.photo__specs > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding: 9px 0;
    border-bottom: 1px solid var(--line-soft);
}

.photo__specs dt {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--faint);
}

.photo__specs dd {
    margin: 0;
    font-family: var(--mono);
    font-size: 12px;
    letter-spacing: 0.06em;
    color: var(--ivory);
    white-space: nowrap;
}

/* --- actions --- */

.photo__acts {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
    grid-column: 2;
    grid-row: 1 / span 2;
}

.photo__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 30px;
    border: 1px solid var(--ivory);
    background: var(--ivory);
    color: var(--ink);
    font-family: var(--mono);
    font-size: 11px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    white-space: nowrap;
    transition: background 0.4s ease, border-color 0.4s ease;
}

.photo__cta:hover,
.photo__cta:focus-visible {
    background: var(--gold);
    border-color: var(--gold);
}

/* ===========================================================================
   Neighbours
   ======================================================================== */

.photo__hops {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(16px, 2.5vw, 40px);
    margin-top: clamp(48px, 6vw, 90px);
    padding-top: clamp(20px, 2.4vw, 30px);
    border-top: 1px solid var(--line);
}

.hop {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}

.hop--prev {
    grid-column: 1;
}

/* Right-aligned so it reads as forward motion, even when it is the only one. */
.hop--next {
    grid-column: 2;
    flex-direction: row-reverse;
    text-align: right;
}

.hop img {
    flex: 0 0 auto;
    width: 92px;
    height: 66px;
    object-fit: cover;
    border: 1px solid var(--line-soft);
    filter: brightness(0.88);
    transition: filter 0.6s ease, border-color 0.6s ease;
}

.hop:hover img {
    filter: brightness(1);
    border-color: rgba(242, 239, 232, 0.24);
}

.hop__text {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.hop__dir {
    font-family: var(--mono);
    font-size: 10px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--faint);
}

.hop__name {
    font-family: var(--serif);
    font-size: clamp(18px, 2vw, 26px);
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.4s ease;
}

.hop:hover .hop__name {
    color: var(--gold);
}

/* ===========================================================================
   Not found
   ======================================================================== */

.photo__missing {
    padding: clamp(40px, 7vw, 100px) 0;
}

.photo__missing p {
    margin: 16px 0 26px;
    color: var(--muted);
    font-size: 15px;
}

/* ===========================================================================
   Responsive
   ======================================================================== */

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

    .photo__specs,
    .photo__acts {
        grid-column: 1;
    }

    .photo__acts {
        grid-row: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        gap: 18px 28px;
        margin-top: 6px;
    }

    .photo__img {
        max-height: calc(100svh - 210px);
    }
}

@media (max-width: 620px) {
    .photo__specs {
        grid-template-columns: 1fr;
        max-width: none;
    }

    .photo__hops {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .hop--prev,
    .hop--next {
        grid-column: 1;
    }

    .hop--next {
        flex-direction: row;
        text-align: left;
    }

    .photo__cta {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    .hop img,
    .hop__name,
    .photo__cta,
    .photo__where {
        transition: none;
    }
}
