/* Compact offer cards share the theme's neutral palette and outlined controls. */
.hero--offers .hero-bg {
    background: var(--color-dark);
    animation: none;
}
.hero--offers .hero-bg-img { animation: none; opacity: .4; filter: brightness(.8) saturate(.8); }
.hero--offers .hero-bg-overlay {
    background: linear-gradient(90deg, rgba(34, 34, 30, .9), rgba(34, 34, 30, .45) 56%, rgba(34, 34, 30, .08)),
                linear-gradient(0deg, rgba(34, 34, 30, .45), transparent 70%);
}
.hero-offers-scenery {
    position: absolute;
    inset: auto 0 0 auto;
    /* The cutout has transparent space at the left; retain the entire building. */
    width: calc(100% - var(--hero-padding-inline) - var(--hero-offers-width) - 24px);
    aspect-ratio: 1672 / 1270.35;
    overflow: visible;
    z-index: 1;
    pointer-events: none;
}
.hero-offers-scenery img {
    position: absolute;
    right: 0;
    bottom: 0;
    display: block;
    width: 135%;
    max-width: none;
    height: auto;
    aspect-ratio: 1672 / 941;
    object-fit: contain;
    /* Feather the diagonal lawn cut as well as the bottom edge into the backdrop. */
    -webkit-mask-image:
        linear-gradient(199deg, #000 77%, rgba(0, 0, 0, .85) 79%, rgba(0, 0, 0, .35) 82%, transparent 84%),
        linear-gradient(180deg, #000 90%, rgba(0, 0, 0, .75) 94%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(199deg, #000 77%, rgba(0, 0, 0, .85) 79%, rgba(0, 0, 0, .35) 82%, transparent 84%),
        linear-gradient(180deg, #000 90%, rgba(0, 0, 0, .75) 94%, transparent 100%);
    mask-composite: intersect;
}
.hero--offers .hero-offers-content {
    --hero-padding-inline: 40px;
    --hero-offers-width: clamp(630px, 51vw, 700px);
    display: grid;
    grid-template-columns: minmax(0, var(--hero-offers-width)) minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    grid-template-areas: "intro ." "offers ." "contact .";
    align-content: center;
    align-items: stretch;
    gap: 24px;
    min-height: 780px;
    height: auto;
    padding: 40px;
    text-align: left;
}
.hero-offers-intro { grid-area: intro; position: relative; z-index: 2; max-width: 710px; }
.hero-offers-heading {
    color: var(--color-light);
    font-family: var(--font-heading);
    font-size: clamp(40px, 3.7vw, 53px);
    font-weight: 400;
    line-height: 1.08;
    letter-spacing: -1.2px;
}
.hero-offers-heading span { display: block; }
.hero-offers-heading span:last-child { color: #dfc8b4; }
.hero-offers-intro > p {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--color-light);
}
.hero-offers-intro strong { font-weight: 500; }
.hero-offers-grid {
    grid-area: offers;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
    gap: 12px;
    width: 100%;
    max-width: none;
}
.hero-offer {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 15px;
    background: #f8f7f3;
    color: var(--color-dark);
    box-shadow: 0 4px 18px rgba(0, 0, 0, .07);
}
.hero-offer-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 7px;
    padding: 15px 14px 0;
    font-family: var(--font-heading);
    font-size: 19px;
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -.45px;
}
.hero-offer-title > span {
    color: #746454;
    font-family: var(--font-primary);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0;
    white-space: nowrap;
}
.hero-offer-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 9px;
    padding: 10px 14px 14px;
}
.hero-offer-summary { min-height: 61px; }
.hero-offer-type {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    line-height: 1.4;
    color: #56544f;
}
.hero-offer-type svg { flex: 0 0 17px; width: 17px; height: 17px; }
.hero-offer-status { display: flex; flex-direction: column; gap: 3px; margin-top: 7px; }
.hero-offer-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: #4c5942;
}
.hero-offer-badge::before {
    content: "";
    flex: 0 0 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
}
.hero-offer-badge--unavailable { color: var(--color-sold); }
.hero-offer-badge--last { padding: 2px 6px; border-radius: 5px; background: #f6e6e1; color: #a13f33; }
.hero-offer-detail { padding-left: 11px; font-size: 12px; line-height: 1.4; color: #68645e; }
.hero-offer-presale { margin-top: 7px; font-size: 12px; line-height: 1.5; color: #746454; }
.hero-offer-price {
    display: flex;
    align-items: baseline;
    gap: 4px;
    font-family: var(--font-heading);
    font-size: 29px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.7px;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}
.hero-offer-price > span { font-size: 14px; font-weight: 400; letter-spacing: 0; }
.hero-offer-price > span:empty { display: none; }
.hero-offer-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 5px 18px;
    padding-bottom: 9px;
    border-bottom: 1px solid #dedbd3;
}
.hero-offer-specs dt { margin-bottom: 3px; font-size: 12px; line-height: 1.3; color: #6a665f; }
.hero-offer-specs dd { font-size: 16px; font-weight: 500; line-height: 1.3; white-space: nowrap; }
.hero-offer-specs dd > span { font-size: 12px; font-weight: 400; }
.hero-offer-timing { color: #56544f; font-size: 12px; line-height: 1.5; }
.hero-offer-timing > p { display: flex; align-items: center; gap: 5px; min-height: 18px; }
.hero-offer-timing svg { width: 14px; height: 14px; flex-shrink: 0; color: #82715e; }
.hero-offer-image {
    height: 66px;
    flex: 0 0 auto;
    overflow: hidden;
    margin-top: 1px;
    border-radius: 8px;
    background: #e4e1d8;
}
.hero-offer-image > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 52%; }
.hero-offer .hero-offer-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 44px;
    padding: 8px 13px;
    margin-top: auto;
    border-color: #aaa397;
    background: transparent;
    color: var(--color-dark);
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-decoration: none;
}
.hero-offer-link > span, .hero-presentation-link > span { font-size: 18px; font-weight: 400; line-height: 1; }
.hero-offer .hero-offer-link:hover { border-color: var(--color-dark); background: var(--color-dark); color: white; }
.hero-offer-link:focus-visible, .hero-presentation-link:focus-visible { outline: 3px solid #b69b86; outline-offset: 3px; }
.hero-offers-footer { grid-area: contact; position: relative; z-index: 2; display: flex; justify-content: flex-start; }
.hero-presentation-link {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 38px;
    min-height: 46px;
    padding: 11px 24px;
    border: 1px solid #d2bda8;
    border-radius: 24px;
    background: #d2bda8;
    color: #25241f;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}
.hero-presentation-link:hover { border-color: #e2d0be; background: #e2d0be; }
#mieszkania, #sloneczne-baranowice, #kontakt { scroll-margin-top: 100px; }

/* Show the complete nearer home and a small part of the other half on desktop. */
@media (min-width: 1101px) {
    .hero-offers-scenery {
        width: calc((100% - var(--hero-padding-inline) - var(--hero-offers-width) - 24px) * 1.4);
    }
}

@media (min-width: 961px) and (max-width: 1150px) {
    .hero--offers .hero-offers-content { --hero-padding-inline: 26px; padding-right: 26px; padding-left: 26px; }
    .hero-offers-grid { max-width: 715px; gap: 10px; }
    .hero-offer-title { font-size: 18px; }
}
@media (max-width: 1100px) {
    .hero--offers .hero-offers-content {
        --hero-padding-inline: 24px;
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: repeat(4, auto);
        grid-template-areas: "intro" "house" "offers" "contact";
        align-content: start;
        min-height: 0;
        padding: 34px 24px 30px;
    }
    .hero-offers-scenery {
        grid-area: house;
        position: relative;
        inset: auto;
        justify-self: end;
        width: min(calc(100% + var(--hero-padding-inline) * 2), 580px);
        margin-right: calc(-1 * var(--hero-padding-inline));
    }
    .hero--offers .hero-bg-img {
        height: clamp(500px, 130vw, 780px);
        -webkit-mask-image: linear-gradient(180deg, #000 80%, transparent);
        mask-image: linear-gradient(180deg, #000 80%, transparent);
    }
    .hero-offers-grid { max-width: none; }
}
@media (max-width: 960px) {
    .hero--offers .hero-offers-content { min-height: 0; height: auto; padding: 34px 24px 30px; gap: 24px; }
    .hero-offers-heading { font-size: clamp(34px, 5vw, 46px); }
    .hero-offers-intro > p { max-width: 480px; font-size: 13px; }
    .hero-offers-grid { max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .hero-offer-title { min-height: 57px; padding: 14px 12px 0; font-size: 18px; align-content: flex-start; }
    .hero-offer-body { padding: 10px 12px 12px; }
    .hero-offer-price { font-size: 27px; gap: 3px; }
    .hero-offer-specs { gap: 6px 12px; }
}
@media (max-width: 740px) and (min-width: 601px) {
    .hero-offers-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
    .hero-offer-title { min-height: 0; }
    .hero-offer:last-child { grid-column: 1 / -1; }
    .hero-offer:last-child .hero-offer-body {
        display: grid;
        grid-template-columns: 1fr 1fr;
        align-items: start;
        column-gap: 22px;
    }
    .hero-offer:last-child .hero-offer-summary { grid-column: 1; grid-row: 1 / 3; }
    .hero-offer:last-child .hero-offer-price, .hero-offer:last-child .hero-offer-specs, .hero-offer:last-child .hero-offer-timing { grid-column: 1; }
    .hero-offer:last-child .hero-offer-image { grid-column: 2; grid-row: 1 / 6; height: 100%; min-height: 150px; margin-top: 0; }
    .hero-offer:last-child .hero-offer-link { grid-column: 1 / -1; }
}
@media (max-width: 600px) {
    .hero--offers .hero-offers-content { --hero-padding-inline: 16px; padding: 28px 16px 24px; gap: 22px; }
    .hero-offers-heading { font-size: clamp(31px, 8vw, 43px); letter-spacing: -.6px; }
    .hero-offers-intro > p { max-width: 320px; margin-top: 10px; font-size: 12px; }
    .hero-offers-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
    .hero-offer-title { min-height: 0; padding: 16px 16px 0; font-size: 21px; }
    .hero-offer-title > span { font-size: 12px; }
    .hero-offer-body {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 96px;
        align-items: start;
        gap: 11px 14px;
        padding: 10px 16px 16px;
    }
    .hero-offer-summary { grid-column: 1 / -1; min-height: 0; }
    .hero-offer-type { font-size: 14px; }
    .hero-offer-status { flex-direction: row; flex-wrap: wrap; gap: 3px 9px; margin-top: 7px; }
    .hero-offer-badge, .hero-offer-detail, .hero-offer-presale { font-size: 12px; }
    .hero-offer-detail { padding-left: 0; }
    .hero-offer-price { grid-column: 1 / -1; font-size: 30px; }
    .hero-offer-specs { grid-column: 1 / -1; gap: 8px 28px; padding-bottom: 10px; }
    .hero-offer-specs dd { font-size: 18px; }
    .hero-offer-timing { grid-column: 1 / -1; font-size: 12px; }
    .hero-offer-image { grid-column: 2; grid-row: 5; height: 56px; margin: 0; }
    .hero-offer .hero-offer-link { grid-column: 1; grid-row: 5; align-self: center; padding: 8px 11px; font-size: 12px; white-space: normal; }
    .hero-presentation-link { width: 100%; min-height: 48px; }
}
@media (max-width: 360px) {
    .hero-offer-body { grid-template-columns: minmax(0, 1fr) 80px; column-gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
    .hero-offer-link, .hero-presentation-link { transition: none; }
}

/* Entrance sequence: house, three offers, then the presentation link. */
@keyframes vh-hero-house-enter {
    from { opacity: 0; transform: translate3d(100%, 0, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes vh-hero-offer-enter {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@media (prefers-reduced-motion: no-preference) {
    .hero-offers-scenery {
        animation: vh-hero-house-enter 1s cubic-bezier(.22, 1, .36, 1) .1s both;
    }
    .hero-offer {
        animation: vh-hero-offer-enter .45s cubic-bezier(.22, 1, .36, 1) 1.15s both;
    }
    .hero-offer:nth-child(2) { animation-delay: 1.65s; }
    .hero-offer:nth-child(3) { animation-delay: 2.15s; }
    .hero-offers-footer {
        animation: vh-hero-offer-enter .45s cubic-bezier(.22, 1, .36, 1) 2.7s both;
    }
    .hero-offer:focus-within,
    .hero-offers-footer:focus-within { opacity: 1 !important; transform: none !important; }
}
