/* ═══ Open Plan Living — luxury architectural showcase ═══ */

@keyframes oplFadeUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.opl-animate > * {
    animation: oplFadeUp .85s cubic-bezier(.22, 1, .36, 1) both;
}

.opl-animate > *:nth-child(1) { animation-delay: .08s; }
.opl-animate > *:nth-child(2) { animation-delay: .16s; }
.opl-animate > *:nth-child(3) { animation-delay: .24s; }
.opl-animate > *:nth-child(4) { animation-delay: .32s; }
.opl-animate > *:nth-child(5) { animation-delay: .4s; }
.opl-animate > *:nth-child(6) { animation-delay: .48s; }

.opl-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .75s cubic-bezier(.22, 1, .36, 1), transform .75s cubic-bezier(.22, 1, .36, 1);
}

.opl-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.opl-pattern {
    position: relative;
    isolation: isolate;
}

.opl-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: .04;
    background-image:
        linear-gradient(rgba(255, 255, 255, .35) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .35) 1px, transparent 1px);
    background-size: 48px 48px;
}

.opl-pattern > * {
    position: relative;
    z-index: 1;
}

.opl-divider {
    width: 3rem;
    height: 2px;
    background: var(--brand-red);
    margin: 1.25rem 0 1.75rem;
}

/* ── Typography ── */
.opl-section-head {
    text-align: center;
    max-width: 40rem;
    margin: 0 auto 2.5rem;
}

.opl-section-head--light {
    margin-bottom: 2.25rem;
}

.opl-section-title {
    margin: 0;
    font-family: var(--font-head);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    line-height: 1.14;
    letter-spacing: -0.03em;
    color: var(--heading);
}

.opl-section-title--light {
    color: var(--heading-on-dark);
}

.opl-section-intro {
    margin: .875rem auto 0;
    max-width: 36rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--text-muted);
}

.opl-section-intro--light {
    color: rgba(255, 255, 255, .78);
}

/* ── Before / After slider ── */
.opl-transform {
    padding: clamp(4rem, 7vw, 6rem) 0;
    background: #071B3B;
    color: var(--text-on-dark);
}

.opl-ba {
    position: relative;
    max-width: 980px;
    margin-inline: auto;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 56px rgba(0, 0, 0, .32);
    aspect-ratio: 16 / 10;
    user-select: none;
    touch-action: none;
}

.opl-ba__after,
.opl-ba__before {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    pointer-events: none;
}

.opl-ba__before-wrap {
    position: absolute;
    inset: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
}

.opl-ba__before {
    position: absolute;
    inset: 0;
    width: 100vw;
    max-width: none;
    height: 100%;
    object-fit: cover;
}

.opl-ba__divider {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: var(--white);
    box-shadow: 0 0 12px rgba(0, 0, 0, .35);
    z-index: 3;
    pointer-events: none;
}

.opl-ba__divider::before,
.opl-ba__divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 10px;
    height: 10px;
    margin-top: -5px;
    border-top: 2px solid #071B3B;
    border-right: 2px solid #071B3B;
}

.opl-ba__divider::before {
    left: -16px;
    transform: rotate(-135deg);
}

.opl-ba__divider::after {
    right: -16px;
    transform: rotate(45deg);
}

.opl-ba__slider {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: ew-resize;
    z-index: 4;
}

.opl-ba__label {
    position: absolute;
    top: 1.25rem;
    z-index: 3;
    padding: .4rem .875rem;
    border-radius: 999px;
    font-family: var(--font-head);
    font-size: .6875rem;
    font-weight: 800;
    letter-spacing: .1em;
    text-transform: uppercase;
    pointer-events: none;
}

.opl-ba__label--before {
    left: 1.25rem;
    background: rgba(7, 27, 59, .88);
    color: var(--white);
}

.opl-ba__label--after {
    right: 1.25rem;
    background: var(--brand-red);
    color: var(--white);
}

.opl-transform__card {
    max-width: 980px;
    margin: 2rem auto 0;
    padding: 1.75rem 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    text-align: center;
}

.opl-transform__card h3 {
    margin: 0 0 .5rem;
    font-family: var(--font-head);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--white);
}

.opl-transform__card p {
    margin: 0;
    font-size: .9375rem;
    font-weight: 500;
    color: rgba(255, 255, 255, .72);
}

.opl-transform__card p span:nth-child(2) {
    margin-inline: .5rem;
    opacity: .5;
}

/* ── Advantages ── */
.opl-advantages {
    padding: clamp(4rem, 7vw, 6rem) 0;
    background: var(--white);
}

.opl-advantages__layout {
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: start;
}

.opl-advantages__intro {
    position: sticky;
    top: 6rem;
}

.opl-advantages__lead {
    margin: 0;
    max-width: 28rem;
    font-size: 1.0625rem;
    line-height: 1.75;
    font-weight: 400;
    color: var(--text);
}

.opl-advantages__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.opl-benefit {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.5rem 1.375rem;
    border-radius: 20px;
    background: var(--warm);
    border: 1px solid transparent;
    transition: transform .35s cubic-bezier(.22, 1, .36, 1), box-shadow .35s ease, border-color .35s ease, background .35s ease;
}

.opl-benefit:hover {
    transform: translateY(-4px);
    background: var(--white);
    border-color: rgba(7, 27, 59, .08);
    box-shadow: 0 16px 40px rgba(7, 27, 59, .08);
}

.opl-benefit__check {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    background: #071B3B;
    color: var(--brand-red);
    font-size: .75rem;
    font-weight: 700;
}

.opl-benefit h3 {
    margin: 0 0 .375rem;
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    color: var(--heading);
}

.opl-benefit p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.65;
    font-weight: 400;
    color: var(--text-muted);
}

/* ── Gallery masonry ── */
.opl-gallery {
    padding: clamp(4rem, 7vw, 6rem) 0;
    background: var(--warm);
}

.opl-gallery__masonry {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(220px, auto);
    gap: 1.25rem;
}

.opl-gallery__tile {
    position: relative;
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    background: #071B3B;
    box-shadow: 0 16px 40px rgba(7, 27, 59, .1);
    transition: box-shadow .35s ease, transform .35s ease;
}

.opl-gallery__tile:hover {
    box-shadow: 0 22px 52px rgba(7, 27, 59, .16);
    transform: translateY(-3px);
}

.opl-gallery__tile--wide {
    grid-column: span 2;
}

.opl-gallery__tile img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 240px;
    object-fit: cover;
    transition: transform .65s cubic-bezier(.25, .46, .45, .94);
}

.opl-gallery__tile--wide img {
    min-height: 280px;
    aspect-ratio: 16 / 9;
}

.opl-gallery__tile:hover img {
    transform: scale(1.05);
}

.opl-gallery__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 27, 59, .72) 0%, transparent 55%);
    opacity: 0;
    transition: opacity .35s ease;
    pointer-events: none;
}

.opl-gallery__tile:hover .opl-gallery__shade {
    opacity: 1;
}

.opl-gallery__tile figcaption {
    position: absolute;
    left: 1.25rem;
    bottom: 1.25rem;
    z-index: 1;
    font-family: var(--font-head);
    font-size: .8125rem;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--white);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .35s ease, transform .35s ease;
}

.opl-gallery__tile:hover figcaption {
    opacity: 1;
    transform: translateY(0);
}

/* ── Why open plan ── */
.opl-why {
    padding: clamp(4rem, 7vw, 6rem) 0;
    background: var(--white);
}

.opl-why__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 980px;
    margin-inline: auto;
}

.opl-why__card {
    padding: 2.25rem 2rem;
    border-radius: 20px;
    background: var(--warm);
    border: 1px solid rgba(7, 27, 59, .06);
    transition: transform .35s ease, box-shadow .35s ease, background .35s ease;
}

.opl-why__card:hover {
    transform: translateY(-4px);
    background: var(--white);
    box-shadow: 0 18px 44px rgba(7, 27, 59, .08);
}

.opl-why__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 3.25rem;
    height: 3.25rem;
    margin-bottom: 1.25rem;
    border-radius: 14px;
    background: linear-gradient(145deg, #071B3B 0%, #0e2d5e 100%);
    box-shadow: 0 8px 20px rgba(7, 27, 59, .16);
    color: var(--white);
    font-size: 1.25rem;
}

.opl-why__icon--light::before { content: '☀'; }
.opl-why__icon--family::before { content: '⌂'; }
.opl-why__icon--value::before { content: '▲'; font-size: 1rem; }

.opl-why__card h3 {
    margin: 0 0 .75rem;
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--heading);
}

.opl-why__card p {
    margin: 0;
    font-size: .9375rem;
    line-height: 1.7;
    font-weight: 400;
    color: var(--text-muted);
}

/* ── Process ── */
.opl-process {
    padding: clamp(4rem, 7vw, 6rem) 0;
    background: var(--warm);
}

.opl-process__track {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
    max-width: 980px;
    margin-inline: auto;
}

.opl-process__line {
    position: absolute;
    top: 2rem;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brand-blue), transparent);
    pointer-events: none;
}

.opl-process__step {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 0 .75rem;
    transition: transform .3s ease;
}

.opl-process__step:hover {
    transform: translateY(-4px);
}

.opl-process__marker {
    margin: 0 auto 1.25rem;
}

.opl-process__num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin-inline: auto;
    border-radius: 50%;
    background: #071B3B;
    border: 2px solid var(--brand-red);
    box-shadow: 0 0 0 5px var(--warm), 0 12px 28px rgba(7, 27, 59, .14);
    font-family: var(--font-head);
    font-size: 1.125rem;
    font-weight: 800;
    color: var(--white);
    transition: box-shadow .3s ease, transform .3s ease;
}

.opl-process__step:hover .opl-process__num {
    transform: scale(1.06);
    box-shadow: 0 0 0 5px var(--warm), 0 16px 36px rgba(7, 27, 59, .18);
}

.opl-process__step h3 {
    margin: 0 0 .625rem;
    font-family: var(--font-head);
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--heading);
}

.opl-process__step p {
    margin: 0 auto;
    max-width: 14rem;
    font-size: .9375rem;
    line-height: 1.65;
    font-weight: 400;
    color: var(--text-muted);
}

/* ── Featured project ── */
.opl-featured {
    padding: clamp(4rem, 7vw, 6rem) 0;
    background: var(--white);
}

.opl-featured__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
    gap: clamp(2.5rem, 5vw, 4rem);
    align-items: center;
}

.opl-featured__media {
    border-radius: 22px;
    overflow: hidden;
    background: #071B3B;
    box-shadow: 0 24px 56px rgba(7, 27, 59, .14);
    transition: box-shadow .4s ease;
}

.opl-featured__media:hover {
    box-shadow: 0 32px 64px rgba(7, 27, 59, .18);
}

.opl-featured__media img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform .65s cubic-bezier(.25, .46, .45, .94);
}

.opl-featured__media:hover img {
    transform: scale(1.035);
}

.opl-featured__copy {
    max-width: 26rem;
}

.opl-featured__name {
    margin: 0 0 1.5rem;
    font-family: var(--font-head);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--heading);
}

.opl-featured__meta {
    display: grid;
    gap: 1rem;
    margin: 0 0 2rem;
}

.opl-featured__meta div {
    display: grid;
    grid-template-columns: 6.5rem 1fr;
    gap: .75rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--warm-mid);
}

.opl-featured__meta div:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.opl-featured__meta dt {
    margin: 0;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.opl-featured__meta dd {
    margin: 0;
    font-size: .9375rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--heading);
}

/* ── CTA ── */
.opl-cta {
    padding: clamp(4.5rem, 8vw, 6rem) 0;
    background: #071B3B;
    color: var(--text-on-dark);
}

.opl-cta__inner {
    text-align: center;
    max-width: 640px;
    margin-inline: auto;
}

.opl-cta__title {
    margin: 0 0 1rem;
    font-family: var(--font-head);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 800;
    line-height: 1.12;
    letter-spacing: -0.03em;
    color: var(--heading-on-dark);
}

.opl-cta__lead {
    margin: 0 0 2.25rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    font-weight: 400;
    color: rgba(255, 255, 255, .82);
}

.opl-cta__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ── Footer ── */
body:has(.open-plan-page) .site-footer {
    border-top: 1px solid rgba(255, 255, 255, .08);
}

body:has(.open-plan-page) .site-footer__main {
    padding: clamp(3rem, 5vw, 4rem) min(32px, 4vw) clamp(2.5rem, 4vw, 3.25rem);
}

body:has(.open-plan-page) .site-footer__logo img {
    height: 104px;
}

body:has(.open-plan-page) .site-footer__desc {
    font-size: .9375rem;
    line-height: 1.7;
    max-width: 24rem;
}

body:has(.open-plan-page) .site-footer__links a {
    transition: color .2s ease, padding-left .2s ease;
}

body:has(.open-plan-page) .site-footer__links a:hover {
    padding-left: .25rem;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
    .opl-advantages__layout {
        grid-template-columns: 1fr;
    }

    .opl-advantages__intro {
        position: static;
    }

    .opl-why__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
    }

    .opl-process__track {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem 1.5rem;
    }

    .opl-process__line {
        display: none;
    }

    .opl-featured__layout {
        grid-template-columns: 1fr;
    }

    .opl-featured__copy {
        max-width: none;
    }
}

@media (max-width: 768px) {
    .opl-cta__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .opl-cta__actions .btn {
        width: 100%;
        justify-content: center;
    }

    .opl-advantages__grid {
        grid-template-columns: 1fr;
    }

    .opl-gallery__masonry {
        grid-template-columns: 1fr;
    }

    .opl-gallery__tile--wide {
        grid-column: span 1;
    }

    .opl-process__track {
        grid-template-columns: 1fr;
        max-width: 320px;
    }

    .opl-ba {
        aspect-ratio: 4 / 3;
    }

    .opl-featured__meta div {
        grid-template-columns: 1fr;
        gap: .25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .opl-animate > *,
    .opl-reveal {
        animation: none;
        opacity: 1;
        transform: none;
        transition: none;
    }

    .opl-hero__photo,
    .opl-benefit:hover,
    .opl-gallery__tile:hover,
    .opl-gallery__tile:hover img,
    .opl-featured__media:hover img,
    .opl-why__card:hover {
        transform: none !important;
    }
}
