:root {
    --grid-gap: 20px;
}

body { padding-top: 100px; }

/* ── Hero ───────────────────────────────────────────────────────────────── */

@keyframes slideUp {
    from { opacity: 0; transform: translateY(60px); }
    to   { opacity: 1; transform: translateY(0); }
}

.project-hero {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px 100px;
}

.project-title-wrapper { margin-bottom: 60px; }

.project-title {
    font-size: clamp(52px, 6vw, 80px);
    font-weight: 600;
    line-height: 0.9;

    margin: 0;

    opacity: 0;
    transform: translateY(60px);
    animation: slideUp 0.7s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.project-hero-body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 80px;
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 0.7s cubic-bezier(0.25, 1, 0.5, 1) 0.2s forwards;
}

.project-intro {
    display: flex;
    flex-direction: column;
    gap: 18px;
    width: 280px;
    flex-shrink: 0;
}

.project-symbol {
    font-size: 12px;
    color: #fff;
}

.project-intro p {
    font-size: 18px;
    font-weight: 300;
    line-height: 1.6;
    margin: 0;
}

.project-hero-img {
    margin-top: 150px;
    flex-shrink: 0;
}

.project-hero-img img {
    width: 30vw;
    height: auto;
    aspect-ratio: 8 / 5;
    object-fit: cover;
    display: block;
}

/* ── Grid ───────────────────────────────────────────────────────────────── */

.catalogue-grid-section {
    width: 100%;
    padding: 100px 16px 100px;
    box-sizing: border-box;
}

.catalogue-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--grid-gap);
}

.catalogue-grid-item {
    display: block;
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #0a0a0a;
    aspect-ratio: 3 / 2;
}

.catalogue-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.6s ease, transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.catalogue-grid-item:hover img {
    filter: contrast(1.1);
    transform: scale(1.03);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 1100px) {
    .catalogue-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .project-hero { padding: 40px 24px 60px; }
    .project-hero-body { flex-direction: column; align-items: flex-start; gap: 32px; }
    .project-intro { width: 100%; }
    .project-hero-img { margin-top: 0; }
    .project-hero-img img { width: 100%; }
    .catalogue-grid-section { padding: 0 8px 120px; }
}

@media (max-width: 480px) {
    :root { --grid-gap: 5px; }
    .catalogue-grid { grid-template-columns: repeat(2, 1fr); }
    .catalogue-grid-section { padding: 0 5px 80px; }
}

/* ── Lightbox ────────────────────────────────────────────────────────────── */

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;

    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;
    box-sizing: border-box;

    cursor: zoom-out;

    opacity: 0;
    pointer-events: none;
    transition:
        opacity 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        background 0.35s cubic-bezier(0.25, 1, 0.5, 1),
        backdrop-filter 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-overlay.is-open {
    opacity: 1;
    pointer-events: all;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.lightbox-img-wrap {
    position: relative;
    width: 80vw;
    height: 80vh;
    overflow: hidden;

    transform: scale(0.92);
    transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-overlay.is-open .lightbox-img-wrap {
    transform: scale(1);
}

.lightbox-img-wrap img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    cursor: default;
    user-select: none;
    -webkit-user-drag: none;
}

.lightbox-close {
    position: fixed;
    top: 24px;
    right: 28px;
    z-index: 1001;

    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;

    color: rgba(255, 255, 255, 0.5);
    font-size: 28px;
    line-height: 1;
    font-family: inherit;

    transition: color 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover {
    color: #fff;
    transform: rotate(90deg);
}

/* Nawigacja strzałkami */

.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;

    background: none;
    border: none;
    cursor: pointer;
    padding: 16px 20px;

    color: rgba(255, 255, 255, 0.35);
    font-size: 24px;
    line-height: 1;
    font-family: inherit;

    transition: color 0.2s ease, transform 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

.lightbox-nav:hover {
    color: #fff;
}

.lightbox-nav--prev {
    left: 12px;
}

.lightbox-nav--prev:hover {
    transform: translateY(-50%) translateX(-4px);
}

.lightbox-nav--next {
    right: 12px;
}

.lightbox-nav--next:hover {
    transform: translateY(-50%) translateX(4px);
}

/* Counter */

.lightbox-counter {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;

    font-size: 11px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 300;
    pointer-events: none;
}

/* Kursor na itemach gridu */
.catalogue-grid-item {
    cursor: zoom-in;
}

/* ── Responsive lightbox ─────────────────────────────────────────────────── */

@media (max-width: 768px) {

    .lightbox-img-wrap {
        width: 95vw;
        height: auto;
        aspect-ratio: 3 / 2;
    }

    .lightbox-nav {
        padding: 12px 14px;
        font-size: 20px;
    }

    .lightbox-nav--prev { left: 2px; }
    .lightbox-nav--next { right: 2px; }

    .lightbox-close {
        top: 16px;
        right: 16px;
        font-size: 24px;
    }

    .lightbox-overlay {
        padding: 16px;
    }
}