@import url("/styles/modules/system-primitives.css");

.pht-sys.v2 {

    /* ---------- FEATURED HERO ---------- */
    .feat {
        position: relative;
        overflow: hidden;
        text-decoration: none;
        color: inherit;
        aspect-ratio: 16 / 6;
        box-shadow:
            0 20px 50px -15px hsl(from var(--text-color) h s l / 0.35),
            0 0 0 1px hsl(from var(--text-color) h s l / 0.05);
        transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    }

    .feat:hover {
        transform: translateY(-2px);
    }

    @media (max-width: 768px) {
        .feat {
            aspect-ratio: 4 / 3;
        }
    }

    .feat-img,
    .feat-img > img,
    .feat-placeholder {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Typography from `fnt_t-4`; bg + color from `.bg-bx ulk-bg` in HTML. */
    .feat-badge {
        position: absolute;
        top: 0;
        left: 0;
        padding: 0.625em 1em;
        z-index: 2;
    }

    /* `.bg-bx ulk-bg` in HTML flips the palette; gradient terminates at
       --background (palette-aware) so the deep end always contrasts. */
    .feat-overlay {
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(transparent 40%, var(--background) 100%);
    }

    .feat-title {
        letter-spacing: -0.015em;
        color: inherit;
        margin: 0;
    }

    .feat-desc {
        max-width: 48ch;
    }

    /* ---------- ARCHIVE GRID ---------- */
    .search-wrap {
        align-items: flex-end;
    }

    @media (max-width: 768px) {
        .search-wrap {
            align-items: flex-start;
            width: 100%;
        }
    }

    .grid {
        list-style: none;
        padding: 0;
    }

    /* ---------- RECENTLY ADDED HORIZONTAL SCROLL ---------- */
    .recent-list {
        list-style: none;
        padding: 0;
    }

    .recent-item {
        flex: 0 0 auto;
        width: clamp(200px, 22vw, 280px);
    }

    .recent-card {
        text-decoration: none;
        color: inherit;
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    }

    .recent-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px hsl(from var(--text-color) h s l / 0.08);
    }

    .recent-cover {
        aspect-ratio: 5 / 4;
        overflow: hidden;
        background: hsl(from var(--text-color) h s l / 0.08);
    }

    .recent-img,
    .recent-img > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    .recent-date {
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: hsl(from var(--text-color) h s l / 0.55);
        font-size: 0.75rem;
    }

    .eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 0.875em;
        color: var(--link-color);
    }

    .eyebrow::before {
        content: "";
        width: 1.5rem;
        height: 2px;
        background: var(--link-color);
        flex-shrink: 0;
    }

    /* ---------- COVER PLACEHOLDER (no-image fallback) ---------- */
    .card-placeholder,
    .feat-placeholder {
        background: linear-gradient(135deg, hsl(from var(--text-color) h s l / 0.08) 0%, hsl(from var(--text-color) h s l / 0.25) 100%);
    }

    /* ---------- CARD CHROME (used by parent grid + recent scroll) ---------- */
    .card {
        text-decoration: none;
        color: inherit;
        overflow: hidden;
        transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
    }

    .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 24px hsl(from var(--text-color) h s l / 0.08);
    }

    .card-cover {
        aspect-ratio: 4 / 3;
        overflow: hidden;
        background: hsl(from var(--text-color) h s l / 0.08);
    }

    .card-img,
    .card-img > img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    /* Typography from `fnt_t-4`; bg + color from `.bg-bx ulk-bg` in HTML. */
    .card-badge {
        position: absolute;
        top: 0;
        left: 0;
        padding: 0.5em 0.875em;
        z-index: 2;
    }

    .card-cta {
        letter-spacing: 0.06em;
        text-transform: uppercase;
        color: var(--link-color);
    }

    .card-cta::after {
        content: " →";
    }

    /* ---------- SEARCH INPUT (system-specific width override) ---------- */
    .search {
        max-width: 22rem;
    }

    /* ---------- FILTER CHIPS ---------- */
    .chip {
        display: inline-flex;
        align-items: center;
        gap: 0.4em;
        padding: 0.45em 0.85em;
        background: var(--main-bg);
        color: var(--text-color);
        border: 1.5px solid var(--bdr-clr);
        border-radius: 2px;
        font: inherit;
        font-size: 0.8125rem;
        cursor: pointer;
        white-space: nowrap;
        transition: border-color 0.15s, background 0.15s, color 0.15s;
    }

    .chip:hover {
        border-color: var(--text-color);
    }

    .chip.active {
        background: var(--text-color);
        color: var(--main-bg);
        border-color: var(--text-color);
    }

    .filter-label {
        font-size: 0.6875rem;
        letter-spacing: 0.14em;
        text-transform: uppercase;
        color: hsl(from var(--text-color) h s l / 0.6);
    }

    /* ---------- CTA BLOCK ---------- */
    .cta {
        position: relative;
        overflow: hidden;
    }

    .cta::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        width: 6px;
        height: 100%;
        background: var(--link-color);
    }

    /* `.cta-eyebrow` typography delegated to kicker — apply
       `fnt_t-4` alongside `cta-eyebrow`. */
    .cta-eyebrow {
        display: inline-flex;
        align-items: center;
        gap: 0.75em;
        color: hsl(from var(--link-color) h s l / 0.9);
    }

    .cta-eyebrow::before {
        content: "";
        width: 1.5rem;
        height: 2px;
        background: var(--link-color);
        flex-shrink: 0;
    }

    .cta-title {
        max-width: 22ch;
        letter-spacing: -0.015em;
    }

    .cta-desc {
        max-width: 54ch;
    }

    /* ---------- REDUCED MOTION ---------- */
    @media (prefers-reduced-motion: reduce) {
        .card,
        .feat,
        .recent-card,
        .photo-btn,
        .lightbox-nav,
        .search-input,
        .chip {
            transition: none;
        }

        .card:hover,
        .feat:hover,
        .recent-card:hover,
        .photo-btn:hover,
        .lightbox-nav:hover {
            transform: none;
        }
    }
}
