.pi-page {
    position: relative;
    overflow: hidden;
    background: var(--background-color);
    color: var(--white-color);
}

.pi-page article {
    padding: 0;
}

.pi-hero,
.pi-list {
    position: relative;
    isolation: isolate;
    background: var(--background-color);
}

.pi-hero {
    padding: 8rem 0 3.5rem;
}

.pi-list {
    padding: 0 0 5rem;
}

.pi-grid-lines {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: min(71.875rem, calc(100% - 3rem));
    z-index: -1;
    transform: translateX(-50%);
    pointer-events: none;
    background-image: linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
    background-size: 33.3% 100%;
    background-position: center top;
}

.pi-inner {
    position: relative;
    width: min(71.875rem, calc(100% - 3rem));
    margin: 0 auto;
}

.pi-watermark {
    position: absolute;
    left: -3rem;
    top: -3.75rem;
    z-index: -1;
    margin: 0;
    color: rgba(255, 255, 255, 0.035);
    font-family: var(--primary-font);
    font-size: 7rem;
    font-weight: 900;
    line-height: 1;
    pointer-events: none;
    user-select: none;
}

.pi-heading {
    padding: 0 1rem;
}

.pi-heading h1 {
    margin: 0 0 2rem;
    color: var(--white-color);
    font-family: var(--primary-font);
    font-size: 3rem;
    font-weight: 300;
    line-height: 1.16;
    letter-spacing: 0.08em;
}

.pi-heading h1 span,
.pi-heading p span {
    color: var(--primary-color);
}

.pi-heading p {
    max-width: 45rem;
    margin: 0;
    color: var(--white-color);
    font-family: var(--secondary-font);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 0.05em;
}

.pi-property {
    padding: 3.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.pi-property-copy {
    display: grid;
    grid-template-columns: 5rem minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.pi-property-count {
    margin: 0;
    color: var(--primary-color);
    font-family: var(--secondary-font);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1;
}

.pi-property h2 {
    margin: 0 0 0.75rem;
    color: var(--white-color);
    font-family: var(--secondary-font);
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: 0.05em;
}

.pi-property h2 a {
    color: inherit;
    text-decoration: none;
}

.pi-property h2 a:hover {
    color: var(--primary-color);
}

.pi-property-meta {
    margin: 0 0 1rem;
    color: var(--primary-color);
    font-family: var(--secondary-font);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 0.05em;
}

.pi-property-description {
    max-width: 48rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.74);
    font-family: var(--primary-font);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.55;
}

.pi-property-link,
.pi-back-link {
    display: inline-block;
    margin-top: 1.25rem;
    color: var(--primary-color);
    font-family: var(--secondary-font);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}

.pi-property-link:hover,
.pi-back-link:hover {
    color: var(--white-color);
}

.pi-back-link {
    margin: 0 0 1.5rem;
}

.pi-detail-content .pi-property {
    border-top: 0;
    padding-top: 0;
}

.pi-gallery {
    display: grid;
    grid-template-columns: 1.25fr 1fr;
    grid-auto-rows: minmax(13rem, auto);
    gap: 1rem;
    width: min(87.5rem, calc(100vw - 6rem));
    margin-left: 50%;
    transform: translateX(-50%);
}

.pi-gallery-item,
.pi-gallery-placeholder {
    position: relative;
    min-height: 13rem;
    margin: 0;
    overflow: hidden;
    background: #121212;
}

.pi-gallery-item-large {
    grid-row: span 2;
}

.pi-gallery-item img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transition: transform 0.35s ease;
}

.pi-gallery-item:hover img {
    transform: scale(1.035);
}

.pi-gallery-placeholder {
    background:
        linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.42)),
        repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.035) 0 0.125rem, transparent 0.125rem 0.625rem),
        #151515;
}

.pi-gallery-placeholder span {
    position: absolute;
    left: 50%;
    top: 50%;
    color: var(--white-color);
    font-family: var(--secondary-font);
    font-size: 2rem;
    font-weight: 400;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transform: translate(-50%, -50%) rotate(-36deg);
    white-space: nowrap;
}

.pi-detail-section {
    position: relative;
    isolation: isolate;
    padding: 9.125rem 0 5rem;
    background: var(--background-color);
}

.pi-detail-page .pi-inner {
    width: min(71.875rem, calc(100% - 3rem));
}

.pi-detail-page .pi-grid-lines {
    width: min(71.875rem, calc(100% - 3rem));
}

.pi-detail-page .pi-watermark {
    right: -4.5rem;
    left: unset;
    top: 4.65rem;
    font-size: 6.5rem;
}

.pi-detail-heading,
.pi-detail-copy {
    margin-left: 1.25rem;
}

.pi-detail-heading {
    margin-bottom: 4.5rem;
}

.pi-detail-heading h1 {
    margin: 0 0 0.125rem;
    color: var(--white-color);
    font-family: var(--primary-font);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: 10%;
}

.pi-detail-type {
    margin: 0 0 0.45rem;
    color: var(--primary-color);
    font-family: var(--primary-font);
    font-size: 3rem;
    font-weight: 400;
    line-height: 1.12;
    letter-spacing: 10%;
}

.pi-detail-location {
    margin: 0;
    color: var(--white-color);
    font-family: var(--secondary-font);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: 20%;
}

.pi-detail-copy {
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.78);
    font-family: var(--primary-font);
}

.pi-detail-investor {
    margin: 0 0 1rem;
    color: var(--white-color);
    font-family: var(--secondary-font);
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 5%;
}

.pi-detail-investor span {
    color: var(--primary-color);
}

.pi-detail-copy h2 {
    margin: 0 0 1rem;
    color: var(--white-color);
    font-family: var(--primary-font);
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 5%;
}

.pi-detail-label {
    margin: 0 0 1rem;
    color: rgba(255, 255, 255, 0.86);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 5%;
}

.pi-detail-copy > p:last-child {
    margin: 0;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.35;
    letter-spacing: 5%;
}

.pi-detail-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: auto;
    gap: 0.75rem;
    width: min(87.5rem, calc(100vw - 6rem));
    margin-left: 50%;
    transform: translateX(-50%);
}

.pi-detail-gallery .pi-gallery-item,
.pi-detail-gallery .pi-gallery-placeholder {
    min-height: auto;
    aspect-ratio: 1.45 / 1;
}

.pi-detail-gallery .pi-gallery-item-large {
    grid-row: auto;
}

@media (max-width: 1199px) {
    .pi-grid-lines,
    .pi-inner {
        width: min(53.75rem, calc(100% - 2.5rem));
    }

    .pi-heading h1 {
        font-size: 2.5rem;
    }

    .pi-gallery {
        width: calc(100vw - 2.5rem);
    }
}

@media (max-width: 991px) {
    .pi-hero {
        padding: 7rem 0 3rem;
    }

    .pi-property-copy {
        grid-template-columns: 4rem minmax(0, 1fr);
        gap: 1.25rem;
    }

    .pi-property h2 {
        font-size: 1.75rem;
    }

    .pi-property-description {
        font-size: 1.15rem;
    }
}

@media (max-width: 767px) {
    .pi-grid-lines,
    .pi-inner {
        width: min(35rem, calc(100% - 2rem));
        background-size: 33.3% 100%;
    }

    .pi-hero {
        padding: 6.25rem 0 2.5rem;
    }

    .pi-watermark {
        left: -1rem;
        top: -2.5rem;
        font-size: 4.5rem;
    }

    .pi-heading {
        padding: 0;
    }

    .pi-heading h1 {
        font-size: 2rem;
        letter-spacing: 0.05em;
    }

    .pi-heading p {
        font-size: 1.35rem;
    }

    .pi-property {
        padding: 2.5rem 0;
    }

    .pi-property-copy {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0;
    }

    .pi-property-count {
        font-size: 1.5rem;
    }

    .pi-property h2 {
        font-size: 1.75rem;
    }

    .pi-property-meta {
        font-size: 1.35rem;
    }

    .pi-property-description {
        font-size: 1.3rem;
    }

    .pi-gallery {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
        width: calc(100vw - 2rem);
    }

    .pi-gallery-item,
    .pi-gallery-placeholder {
        min-height: auto;
        aspect-ratio: 1.45 / 1;
    }

    .pi-gallery-item-large {
        grid-row: auto;
    }

    .pi-detail-section {
        padding: 6.5rem 0 4rem;
    }

    .pi-detail-page .pi-inner,
    .pi-detail-page .pi-grid-lines {
        width: min(35rem, calc(100% - 2rem));
    }

    .pi-detail-page .pi-watermark {
        left: -0.75rem;
        top: -1.5rem;
        font-size: 4.25rem;
    }

    .pi-detail-heading,
    .pi-detail-copy {
        width: 100%;
        margin-left: 0;
    }

    .pi-detail-heading h1 {
        font-size: 2.2rem;
    }

    .pi-detail-type {
        font-size: 1.8rem;
        letter-spacing: 0.08em;
    }

    .pi-detail-location,
    .pi-detail-copy h2,
    .pi-detail-label,
    .pi-detail-copy > p:last-child {
        font-size: 1.3rem;
    }

    .pi-detail-investor {
        font-size: 1.15rem;
    }

    .pi-detail-gallery {
        grid-template-columns: 1fr;
        width: calc(100vw - 2rem);
    }
}

@media (max-width: 479px) {
    .pi-grid-lines,
    .pi-inner {
        width: calc(100% - 1.75rem);
    }

    .pi-heading p,
    .pi-property-meta {
        font-size: 1.4rem;
    }

    .pi-property-description {
        font-size: 1.4rem;
    }

    .pi-gallery {
        width: calc(100vw - 1.75rem);
    }

    .pi-detail-page .pi-inner,
    .pi-detail-page .pi-grid-lines {
        width: calc(100% - 1.75rem);
    }

    .pi-detail-heading h1 {
        font-size: 2.4rem;
    }

    .pi-detail-type {
        font-size: 1.9rem;
    }

    .pi-detail-location,
    .pi-detail-copy h2,
    .pi-detail-label,
    .pi-detail-copy > p:last-child {
        font-size: 1.4rem;
    }

    .pi-detail-investor {
        font-size: 1.25rem;
    }

    .pi-detail-gallery {
        width: calc(100vw - 1.75rem);
    }
}
