.ql-project-page {
    background: #f7f2e8;
}

.qlp-hero {
    position: relative;
    min-height: calc(100svh - 82px);
    display: grid;
    align-items: end;
    overflow: hidden;
    isolation: isolate;
}

.qlp-hero-media,
.qlp-hero-overlay {
    position: absolute;
    inset: 0;
}

.qlp-hero-media {
    z-index: -2;
}

.qlp-hero-media picture {
    display: block;
    width: 100%;
    height: 100%;
}

.qlp-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.92) contrast(1.02);
}

.qlp-hero-overlay {
    z-index: -1;
    background:
        radial-gradient(circle at 50% 42%, rgba(255, 251, 243, 0.04), transparent 36%),
        linear-gradient(180deg, rgba(43, 33, 27, 0.24), rgba(43, 33, 27, 0.58) 58%, rgba(43, 33, 27, 0.82)),
        linear-gradient(90deg, rgba(43, 33, 27, 0.68), rgba(43, 33, 27, 0.24), rgba(43, 33, 27, 0.48));
}

.qlp-hero-content {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: clamp(5rem, 14vh, 8.5rem) 0 clamp(3.4rem, 8vh, 5rem);
    color: var(--ql-ivory);
}

.qlp-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.52fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: end;
}

.qlp-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.1rem;
    padding: 0.56rem 0.8rem;
    border: 1px solid rgba(255, 251, 243, 0.24);
    background: rgba(43, 33, 27, 0.34);
    color: rgba(255, 251, 243, 0.9);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    backdrop-filter: blur(14px);
}

.qlp-hero h1 {
    margin: 0;
    color: var(--ql-ivory);
    font-family: var(--ql-serif);
    font-size: clamp(3.8rem, 8.6vw, 7.2rem);
    font-weight: 300;
    line-height: 0.9;
    letter-spacing: 0;
}

.qlp-hero h1.qlp-hero-title-compact {
    font-size: clamp(3.7rem, 7.2vw, 6.2rem);
    white-space: nowrap;
}

.qlp-hero h1.qlp-hero-title-long {
    max-width: 900px;
    font-family: "Playfair Display", serif;
    font-size: clamp(3.45rem, 6.6vw, 5.9rem);
    line-height: 0.95;
}

.qlp-hero .ql-kicker {
    color: rgba(223, 188, 139, 0.92);
}

.qlp-hero-copy {
    max-width: 650px;
    margin: 1.45rem 0 0;
    color: rgba(255, 251, 243, 0.82);
    font-size: clamp(1rem, 1.18vw, 1.12rem);
    line-height: 1.68;
}

.qlp-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 2rem;
}

.qlp-hero-actions .ql-btn {
    min-height: 48px;
    padding: 0.95rem 1.45rem;
    border-color: rgba(255, 251, 243, 0.32);
    background: rgba(255, 251, 243, 0.16);
    color: var(--ql-ivory);
    backdrop-filter: blur(14px);
}

.qlp-hero-actions .ql-btn:hover,
.qlp-hero-actions .ql-btn:focus-visible {
    background: rgba(255, 251, 243, 0.24);
    color: var(--ql-ivory);
}

.qlp-hero-facts {
    display: grid;
    gap: 0;
    border: 1px solid rgba(255, 251, 243, 0.2);
    background: rgba(31, 24, 20, 0.28);
    backdrop-filter: blur(18px);
}

.qlp-fact {
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid rgba(255, 251, 243, 0.14);
}

.qlp-fact:last-child {
    border-bottom: 0;
}

.qlp-fact span {
    display: block;
    margin-bottom: 0.35rem;
    color: rgba(255, 251, 243, 0.58);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.qlp-fact strong {
    display: block;
    color: var(--ql-ivory);
    font-family: var(--ql-serif);
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1.1;
}

.qlp-gallery-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.qlp-hero-gallery-strip {
    overflow: visible;
}

.qlp-gallery-strip button,
.qlp-plan-card button,
.qlp-apartment-card button {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: zoom-in;
}

.qlp-gallery-strip img {
    width: 100%;
    aspect-ratio: 1.22;
    object-fit: cover;
    border: 1px solid rgba(255, 251, 243, 0.18);
    filter: saturate(0.92);
    transition: transform 700ms cubic-bezier(0.22, 1, 0.36, 1), filter 700ms ease;
}

.qlp-gallery-strip button:hover img {
    transform: scale(1.025);
    filter: saturate(1) contrast(1.03);
}

.qlp-section {
    padding: clamp(5rem, 9vw, 8rem) 0;
}

.qlp-muted {
    background:
        linear-gradient(180deg, rgba(255, 251, 243, 0.62), rgba(238, 229, 214, 0.72)),
        #f7f2e8;
}

.qlp-thirtynine-story {
    background: #f7f2e8;
}

.qlp-thirtynine-intro-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1fr);
    gap: clamp(2rem, 6vw, 6.5rem);
    align-items: start;
}

.qlp-thirtynine-title {
    margin: 0;
    color: var(--ql-espresso);
    font-size: clamp(3.1rem, 6.1vw, 5.8rem);
    font-weight: 400;
    line-height: 0.94;
}

.qlp-thirtynine-subtitle {
    max-width: 420px;
    margin: 1.35rem 0 0;
    color: var(--ql-bronze);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.75;
    text-transform: uppercase;
}

.qlp-thirtynine-copy p {
    margin: 0 0 1.25rem;
    color: var(--ql-muted);
    font-size: 1rem;
    line-height: 1.82;
}

.qlp-thirtynine-copy p:last-child {
    margin-bottom: 0;
}

.qlp-su-misura-note {
    margin-top: 1.65rem;
    padding: clamp(1.15rem, 2vw, 1.55rem);
    border: 1px solid rgba(179, 145, 98, 0.34);
    border-left: 3px solid rgba(179, 145, 98, 0.78);
    background: rgba(255, 251, 243, 0.54);
}

.qlp-su-misura-note strong {
    display: block;
    margin-bottom: 0.65rem;
    color: var(--ql-espresso);
    font-family: var(--ql-serif);
    font-size: clamp(1.35rem, 2vw, 1.7rem);
    font-weight: 600;
    line-height: 1.05;
}

.qlp-su-misura-note p {
    margin: 0;
}

.qlp-thirtynine-copy-intro p:first-child {
    color: var(--ql-espresso);
    font-family: var(--ql-serif);
    font-size: clamp(1.55rem, 2.25vw, 2.05rem);
    line-height: 1.18;
}

.qlp-thirtynine-image {
    position: relative;
    margin: clamp(3.2rem, 7vw, 6.3rem) 0;
    overflow: hidden;
    box-shadow: 0 26px 70px rgba(43, 33, 27, 0.14);
}

.qlp-thirtynine-image img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    clip-path: inset(7% 0 0 0);
    filter: saturate(0.9);
    transition: clip-path 950ms cubic-bezier(0.22, 1, 0.36, 1), filter 600ms ease;
}

.reveal.is-visible.qlp-thirtynine-image img {
    clip-path: inset(0 0 0 0);
}

.qlp-thirtynine-copy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(2rem, 6vw, 6.5rem);
}

.qlp-thirtynine-manifest {
    max-width: 940px;
    margin: clamp(3rem, 6vw, 5rem) auto 0;
    padding: clamp(2rem, 4vw, 3.4rem);
    border-top: 1px solid var(--ql-line);
    border-bottom: 1px solid var(--ql-line);
    text-align: center;
}

.qlp-thirtynine-manifest p {
    max-width: 780px;
    margin: 0 auto;
    color: var(--ql-muted);
    line-height: 1.82;
}

.qlp-thirtynine-manifest .qlp-thirtynine-statement {
    max-width: 820px;
    margin-bottom: 1.1rem;
    color: var(--ql-espresso);
    font-family: var(--ql-serif);
    font-size: clamp(1.8rem, 3.2vw, 2.7rem);
    line-height: 1.12;
}

.qlp-thirtynine-signature {
    position: absolute;
    right: clamp(1rem, 3vw, 2.2rem);
    bottom: clamp(1rem, 3vw, 2.2rem);
    z-index: 2;
    display: grid;
    gap: 0.5rem;
    max-width: min(480px, calc(100% - 2rem));
    padding: 1rem 1.2rem 1.05rem;
    border-left: 1px solid rgba(179, 145, 98, 0.58);
    background: rgba(247, 242, 232, 0.88);
    box-shadow: 0 20px 55px rgba(43, 33, 27, 0.16);
    backdrop-filter: blur(12px);
}

.qlp-thirtynine-signature strong {
    color: var(--ql-espresso);
    font-family: "Playfair Display", serif;
    font-size: clamp(1.35rem, 2.1vw, 1.85rem);
    font-weight: 400;
}

.qlp-thirtynine-signature span {
    color: var(--ql-bronze);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    line-height: 1.7;
    text-transform: uppercase;
}

.qlp-section-head {
    max-width: 760px;
    margin-bottom: 3rem;
}

.qlp-section-head.centered {
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.qlp-section-head h2 {
    margin: 0;
    color: var(--ql-espresso);
    font-family: var(--ql-serif);
    font-size: clamp(2.6rem, 5vw, 4.7rem);
    font-weight: 400;
    line-height: 0.96;
}

.qlp-section-head p:not(.ql-kicker) {
    margin: 1rem 0 0;
    color: var(--ql-muted);
    font-size: 1rem;
    line-height: 1.75;
}

.qlp-story-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.62fr) minmax(0, 1fr);
    gap: clamp(2rem, 5vw, 5rem);
    align-items: start;
}

.qlp-story-text {
    max-width: 780px;
}

.qlp-story-text p {
    color: var(--ql-muted);
    font-size: 1rem;
    line-height: 1.82;
}

.qlp-story-text p:first-child {
    color: var(--ql-espresso);
    font-family: var(--ql-serif);
    font-size: clamp(1.55rem, 2.25vw, 2.05rem);
    line-height: 1.18;
}

.qlp-note {
    margin-top: 2rem;
    padding: 1.4rem 1.6rem;
    border-left: 1px solid var(--ql-bronze);
    background: rgba(255, 251, 243, 0.48);
    color: var(--ql-espresso);
    font-weight: 600;
}

.qlp-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    border: 1px solid rgba(82, 66, 52, 0.13);
    background: rgba(82, 66, 52, 0.13);
}

.qlp-detail-card {
    padding: clamp(1.7rem, 3vw, 2.6rem);
    background: rgba(255, 251, 243, 0.64);
}

.qlp-detail-card h3,
.qlp-plan-card h3,
.qlp-apartment-card h3 {
    margin: 0 0 1rem;
    color: var(--ql-espresso);
    font-family: var(--ql-serif);
    font-size: clamp(1.45rem, 2.15vw, 2rem);
    font-weight: 400;
    line-height: 1.08;
}

.qlp-detail-card p {
    color: var(--ql-muted);
    line-height: 1.75;
}

.qlp-list {
    display: grid;
    gap: 0.85rem;
    margin: 1.4rem 0 0;
    padding: 0;
    list-style: none;
}

.qlp-list li {
    position: relative;
    padding-left: 1.45rem;
    color: var(--ql-muted);
    line-height: 1.65;
}

.qlp-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--ql-bronze);
}

.qlp-plan-grid,
.qlp-apartment-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.2rem;
}

.qlp-apartment-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.qlp-image-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.qlp-image-card {
    display: block;
    width: 100%;
    padding: 0;
    border: 1px solid rgba(82, 66, 52, 0.13);
    background: rgba(255, 251, 243, 0.66);
    cursor: zoom-in;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(43, 33, 27, 0.06);
}

.qlp-image-card img {
    width: 100%;
    aspect-ratio: 1.25;
    object-fit: cover;
    filter: saturate(0.94);
    transition: transform 720ms cubic-bezier(0.22, 1, 0.36, 1), filter 720ms ease;
}

.qlp-image-card:hover img,
.qlp-image-card:focus-visible img {
    transform: scale(1.035);
    filter: saturate(1) contrast(1.03);
}

.qlp-image-grid.portrait .qlp-image-card img {
    aspect-ratio: 0.76;
}

.qlp-mobile-gallery {
    overflow: visible;
}

.qlp-mobile-gallery .swiper-slide {
    height: auto;
}

.qlp-mobile-gallery-pagination {
    display: none;
}

.qlp-plan-card,
.qlp-apartment-card {
    padding: 1rem;
    border: 1px solid rgba(82, 66, 52, 0.13);
    background: rgba(255, 251, 243, 0.68);
    box-shadow: 0 20px 60px rgba(43, 33, 27, 0.06);
}

.qlp-plan-card img,
.qlp-apartment-card img {
    width: 100%;
    aspect-ratio: 1.3;
    object-fit: contain;
    margin-bottom: 1.2rem;
    background: #fffaf0;
}

.qlp-apartment-card img {
    aspect-ratio: 1.08;
}

.qlp-sold {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: #7d4032;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.qlp-plan-actions {
    display: flex;
    gap: 0.55rem;
    margin: 1rem 0 0.9rem;
}

.qlp-plan-actions button {
    flex: 1 1 0;
    min-height: 42px;
    border: 1px solid rgba(82, 66, 52, 0.18);
    background: rgba(255, 251, 243, 0.72);
    color: var(--ql-espresso);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    transition: background 260ms ease, border-color 260ms ease, transform 260ms ease;
}

.qlp-plan-actions button:hover,
.qlp-plan-actions button:focus-visible {
    border-color: rgba(179, 144, 93, 0.58);
    background: rgba(223, 188, 139, 0.22);
    transform: translateY(-1px);
}

.qlp-lightbox .modal-dialog {
    max-width: min(1180px, calc(100vw - 2rem));
}

.qlp-lightbox .modal-dialog.modal-fullscreen {
    width: 100vw;
    max-width: none;
    height: 100%;
    margin: 0;
}

.qlp-lightbox .modal-fullscreen .modal-content,
.qlp-lightbox .modal-fullscreen .modal-body,
.qlp-lightbox .modal-fullscreen .swiper-image-modal {
    width: 100vw;
}

.qlp-lightbox .modal-fullscreen .modal-content,
.qlp-lightbox .modal-fullscreen .modal-body,
.qlp-lightbox .modal-fullscreen .swiper-image-modal,
.qlp-lightbox .modal-fullscreen .swiper-wrapper,
.qlp-lightbox .modal-fullscreen .swiper-slide,
.qlp-lightbox .modal-fullscreen .swiper-zoom-container {
    min-height: 100vh;
}

.qlp-lightbox .modal-fullscreen .swiper-slide,
.qlp-lightbox .modal-fullscreen .swiper-zoom-container {
    width: 100vw !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qlp-lightbox .modal-fullscreen img {
    width: auto !important;
    max-width: calc(100vw - 2rem) !important;
    max-height: calc(100vh - 5rem) !important;
    margin: auto !important;
}

.qlp-lightbox .swiper-image-modal,
.qlp-lightbox .swiper-wrapper,
.qlp-lightbox .swiper-slide,
.qlp-lightbox .swiper-zoom-container {
    overflow: visible !important;
}

.qlp-lightbox img {
    max-height: 86vh;
    object-fit: contain;
}

@media (max-width: 991px) {
    .qlp-hero-grid,
    .qlp-story-grid,
    .qlp-thirtynine-intro-grid,
    .qlp-thirtynine-copy-grid,
    .qlp-card-grid,
    .qlp-image-grid,
    .qlp-plan-grid,
    .qlp-apartment-grid {
        grid-template-columns: 1fr;
    }

    .qlp-hero {
        min-height: calc(100svh - 66px);
    }

    .qlp-hero-content {
        padding-bottom: 2.2rem;
    }
}

@media (max-width: 767px) {
    .qlp-hero {
        min-height: auto;
    }

    .qlp-hero-media img {
        object-position: 42% center;
    }

    .qlp-hero-overlay {
        background:
            linear-gradient(180deg, rgba(43, 33, 27, 0.32), rgba(43, 33, 27, 0.62) 42%, rgba(43, 33, 27, 0.86)),
            linear-gradient(90deg, rgba(43, 33, 27, 0.7), rgba(43, 33, 27, 0.32));
    }

    .qlp-hero-content {
        width: min(calc(100% - 2rem), 540px);
        justify-self: center;
        padding: 5.4rem 0 2rem;
    }

    .qlp-hero-grid {
        gap: 1.7rem;
    }

    .qlp-hero h1 {
        font-size: clamp(3.35rem, 18vw, 5rem);
    }

    .qlp-hero h1.qlp-hero-title-compact {
        font-size: clamp(3rem, 15.2vw, 4.35rem);
    }

    .qlp-hero h1.qlp-hero-title-long {
        max-width: 11ch;
        font-size: clamp(3.15rem, 16vw, 4.3rem);
        line-height: 0.92;
    }

    .qlp-hero-copy {
        margin-top: 1.25rem;
        font-size: 0.98rem;
        line-height: 1.72;
    }

    .qlp-hero-actions {
        margin-top: 1.55rem;
    }

    .qlp-hero-actions .ql-btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
        font-size: 0.68rem;
    }

    .qlp-hero-facts {
        grid-template-columns: 1fr;
    }

    .qlp-gallery-strip {
        gap: 0.75rem;
    }

    .qlp-gallery-strip img {
        aspect-ratio: 1.35;
    }

    .qlp-header-strip-desktop {
        display: none;
    }

    .qlp-section {
        padding: clamp(3.8rem, 13vw, 5.4rem) 0;
    }

    .qlp-section-head {
        margin-bottom: 2rem;
    }

    .qlp-section-head.centered {
        text-align: left;
    }

    .qlp-section-head h2 {
        font-size: clamp(2.8rem, 14vw, 4.2rem);
    }

    .qlp-thirtynine-title {
        font-size: clamp(3rem, 15vw, 4.5rem);
    }

    .qlp-thirtynine-subtitle {
        margin-top: 1rem;
        font-size: 0.66rem;
        line-height: 1.8;
    }

    .qlp-thirtynine-copy-intro {
        margin-top: 0.3rem;
    }

    .qlp-thirtynine-copy-intro p:first-child {
        font-size: clamp(1.6rem, 8vw, 2.05rem);
    }

    .qlp-thirtynine-image {
        margin: 3rem 0;
    }

    .qlp-thirtynine-manifest {
        margin-top: 3rem;
        padding-right: 0;
        padding-left: 0;
        text-align: left;
    }

    .qlp-thirtynine-manifest p {
        margin-right: 0;
        margin-left: 0;
    }

    .qlp-thirtynine-signature span {
        max-width: 31ch;
    }

    .qlp-thirtynine-image .qlp-thirtynine-signature {
        right: 0.75rem;
        bottom: 0.75rem;
        max-width: calc(100% - 1.5rem);
        gap: 0.3rem;
        padding: 0.72rem 0.85rem 0.78rem;
    }

    .qlp-thirtynine-image .qlp-thirtynine-signature strong {
        font-size: 1.08rem;
        line-height: 1.12;
    }

    .qlp-thirtynine-image .qlp-thirtynine-signature span {
        max-width: none;
        font-size: 0.56rem;
        letter-spacing: 0.12em;
        line-height: 1.55;
    }

    .qlp-story-text p:first-child {
        font-size: clamp(1.6rem, 9vw, 2.15rem);
    }

    .qlp-mobile-gallery {
        margin-right: 0;
        margin-left: 0;
        padding: 0 0 2.35rem;
        overflow: hidden;
    }

    .qlp-mobile-gallery .qlp-image-grid {
        display: flex;
        gap: 0;
    }

    .qlp-mobile-gallery .qlp-gallery-strip {
        display: flex;
        gap: 0;
        margin-top: 0;
    }

    .qlp-mobile-gallery .swiper-slide {
        width: auto;
    }

    .qlp-hero-gallery-strip {
        width: 100%;
        margin-top: 1.6rem;
    }

    .qlp-hero-gallery-strip img {
        aspect-ratio: 1.18;
    }

    .qlp-mobile-gallery .qlp-image-card {
        height: 100%;
        box-shadow: 0 18px 46px rgba(43, 33, 27, 0.08);
    }

    .qlp-mobile-gallery .qlp-image-card img {
        aspect-ratio: 1.08;
    }

    .qlp-mobile-gallery .qlp-image-grid.portrait .qlp-image-card img {
        aspect-ratio: 0.82;
    }

    .qlp-mobile-gallery-pagination {
        display: flex;
        justify-content: center;
        bottom: 0 !important;
    }

    .qlp-mobile-gallery-pagination .swiper-pagination-bullet {
        width: 7px;
        height: 7px;
        margin: 0 4px !important;
        background: rgba(82, 66, 52, 0.26);
        opacity: 1;
    }

    .qlp-mobile-gallery-pagination .swiper-pagination-bullet-active {
        width: 22px;
        border-radius: 999px;
        background: var(--ql-bronze);
    }

    .qlp-detail-card,
    .qlp-plan-card,
    .qlp-apartment-card {
        padding: 1.25rem;
    }
}
