/* Gospodarstwo Rolno-Nasienne Ziętarscy — single stylesheet, no framework */

/* Montserrat + Roboto Slab are loaded from Google Fonts in the page <head>. */

/* ---------- Tokens ---------- */
:root {
    --dark: #212529;
    --green: #1c6814;
    --green-bright: #1f7a16;
    --gold: #ffc800;
    --light: #f8f9fa;
    --muted: #5a6169;
    --border: #e9ecef;
    --text: #212529;
    --header-h: 4.5rem;

    /* focus ring colour; flipped to gold by the dark-background blocks below */
    --focus: var(--dark);

    --font-head: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    --font-serif: "Roboto Slab", Georgia, "Times New Roman", serif;
}

.site-header,
.masthead,
.section--dark,
.site-footer {
    --focus: var(--gold);
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: var(--font-head);
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    background: #fff;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* wrapper must not affect layout; every sizing rule targets the inner <img> */
picture {
    display: contents;
}

a {
    color: var(--green);
}

h1,
h2,
h3 {
    font-family: var(--font-head);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 1rem;
}

.container {
    width: min(100% - 2rem, 1140px);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 200;
    padding: 0.75rem 1.25rem;
    background: var(--gold);
    color: var(--dark);
    font-weight: 700;
    text-decoration: none;
}

.skip-link:focus {
    left: 0;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 3px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.9rem 2rem;
    border-radius: 0.2rem;
    background: var(--green);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.0625em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}

.btn:hover {
    background: var(--green-bright);
}

.btn--ghost {
    background: transparent;
    color: var(--green);
    box-shadow: inset 0 0 0 2px currentColor;
}

.btn--ghost:hover {
    background: var(--green);
    color: #fff;
}

.btn__icon {
    flex: none;
    width: 1.1em;
    height: 1.1em;
    fill: currentColor;
}

/* ---------- Header ---------- */
.site-header {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    background: var(--dark);
    transition: background-color 0.3s ease-in-out, padding 0.3s ease-in-out;
}

.site-header__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    min-height: var(--header-h);
}

.brand {
    margin-right: auto;
    min-width: 0;
}

.brand img {
    width: clamp(7.5rem, 38vw, 13rem);
    height: auto;
    transition: height 0.3s ease-in-out;
}

.header-phone {
    padding: 0.6rem 0.9rem;
    font-size: 0.8rem;
}

/* below 26em both header controls go icon-only so the row cannot wrap; aria-label names them */
.header-phone__label,
.nav-toggle__label {
    display: none;
}

@media (min-width: 26em) {
    .header-phone__label,
    .nav-toggle__label {
        display: inline;
    }
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    padding: 0.6rem 0.9rem;
    border: 0;
    border-radius: 0.2rem;
    background: var(--green);
    color: #fff;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

.nav-toggle__icon {
    width: 1.1rem;
    height: 1.1rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
}

.site-nav {
    display: none;
    flex-basis: 100%;
}

.site-nav.is-open {
    display: block;
}

.site-nav ul {
    list-style: none;
    margin: 0;
    padding: 0 0 1rem;
}

.site-nav a {
    display: block;
    padding: 0.75rem 0;
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.0625em;
    text-transform: uppercase;
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.site-nav a:hover,
.site-nav a.is-active {
    color: var(--gold);
}

@media (min-width: 62em) {
    .site-header {
        /* scrim keeps the reverse logo legible against a bright sky before scroll */
        background: linear-gradient(rgb(0 0 0 / 55%), rgb(0 0 0 / 0%));
        padding-block: 0.75rem;
    }

    .site-header.is-scrolled {
        background: var(--dark);
        padding-block: 0;
    }

    .brand img {
        width: auto;
        height: 2.25rem;
    }

    .site-header.is-scrolled .brand img {
        height: 1.75rem;
    }

    .nav-toggle {
        display: none;
    }

    .site-nav {
        display: block;
        flex-basis: auto;
    }

    .site-nav ul {
        display: flex;
        gap: 2rem;
        padding: 0;
    }

    .site-nav a {
        padding: 0;
    }

    /* pushed past the nav so the call action is the last thing in the header */
    .header-phone {
        order: 1;
        margin-left: 2rem;
    }
}

/* ---------- Masthead ---------- */
.masthead {
    padding: calc(var(--header-h) + 5rem) 0 5rem;
    text-align: center;
    color: #fff;
    background-color: var(--dark);
    background-image: linear-gradient(rgb(0 0 0 / 45%), rgb(0 0 0 / 45%)), url("../img/hero.jpg");
    background-image: linear-gradient(rgb(0 0 0 / 45%), rgb(0 0 0 / 45%)),
        image-set(url("../img/hero.webp") type("image/webp"), url("../img/hero.jpg") type("image/jpeg"));
    background-position: center;
    background-size: cover;
}

.masthead__subheading {
    margin: 0 0 1.5rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: clamp(1.15rem, 3vw, 2.25rem);
    line-height: 1.3;
}

.masthead__heading {
    margin: 0 0 2.5rem;
    font-size: clamp(1.9rem, 6vw, 4rem);
    text-transform: uppercase;
}

@media (min-width: 62em) {
    .masthead {
        padding: 17rem 0 12.5rem;
    }
}

/* ---------- Sections ---------- */
.section {
    padding: 5rem 0;
}

.section--light {
    background: var(--light);
}

.section__heading {
    margin: 0 0 3rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    text-align: center;
    text-transform: uppercase;
}

.section__heading::after {
    content: "";
    display: block;
    width: 3rem;
    height: 3px;
    margin: 1.25rem auto 0;
    background: var(--gold);
}

.section__heading:has(+ .section__lead) {
    margin-bottom: 1.5rem;
}

.section__lead {
    max-width: 40rem;
    margin: 0 auto 2.5rem;
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    text-align: center;
}

/* ---------- Offer ---------- */
.offer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* flex, not grid: only flex centres an incomplete final row */
    /* flex-start, not stretch: expanding one card must not pad out its row neighbours */
    align-items: flex-start;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.offer__item {
    position: relative;
    display: flex;
    /* no grow: cards keep one width whether their line holds 1, 2 or 3 */
    flex: 0 1 21rem;
    flex-direction: column;
    cursor: pointer;
    background: #fff;
    border-radius: 0.25rem;
    overflow: hidden;
    box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
    transition: box-shadow 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.offer__item:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.75rem 1.5rem rgb(0 0 0 / 14%);
}

/* the whole card is the toggle, so the ring belongs on the card, not the summary */
@supports selector(:has(*)) {
    .offer__item:has(summary:focus-visible) {
        outline: 3px solid var(--focus);
        outline-offset: 3px;
    }

    .offer__details summary:focus-visible {
        outline: none;
    }
}

/* clips the hover zoom so it cannot spill onto the card text */
.offer__media {
    overflow: hidden;
}

.offer__item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    transition: transform 0.3s ease-in-out;
}

.offer__item:hover img {
    transform: scale(1.04);
}

.offer__body {
    padding: 1.5rem;
}

.offer__name {
    margin: 0 0 0.25rem;
    font-size: 1.5rem;
    text-align: center;
}

.offer__lead {
    /* two-line floor keeps the disclosure rows aligned across a row of cards */
    min-height: 3.4rem;
    margin: 0 0 1.25rem;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--muted);
    text-align: center;
}

.offer__details {
    border-top: 1px solid var(--border);
    padding-top: 1rem;
}

.offer__details summary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 2.75rem;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 0.0625em;
    text-transform: uppercase;
    color: var(--green);
    list-style: none;
}

.offer__details summary::-webkit-details-marker {
    display: none;
}

.offer__details summary::before {
    content: "";
    width: 0.45rem;
    height: 0.45rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-25%) rotate(45deg);
    transition: transform 0.2s ease-in-out;
}

.offer__details[open] summary::before {
    transform: translateY(25%) rotate(-135deg);
}

/* stretches the summary's hit area over the whole card, so any click toggles it */
.offer__details summary::after {
    content: '';
    position: absolute;
    inset: 0;
}

.offer__item:hover summary,
.offer__details summary:focus-visible {
    color: var(--green-bright);
}

.offer__specs {
    /* lifted above the card-wide hit area so the text stays selectable */
    position: relative;
    z-index: 1;
    margin: 1rem 0 0;
    padding-left: 1.25rem;
    font-size: 0.95rem;
    cursor: auto;
}

.offer__specs li::marker {
    color: var(--green);
}

.offer__specs li + li {
    margin-top: 0.5rem;
}

.offer__note {
    margin: 0 0 1.5rem;
    font-family: var(--font-serif);
    font-style: italic;
    text-align: center;
    color: var(--muted);
}

.offer__cta {
    margin-top: 3rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    background: #fff;
    border-radius: 0.25rem;
    border-top: 3px solid var(--green);
    box-shadow: 0 1px 3px rgb(0 0 0 / 12%);
}

.offer__cta-heading {
    margin: 0 0 0.75rem;
    font-size: 1.5rem;
}

.offer__cta-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin: 0;
}

/* ---------- Timeline ---------- */
.timeline {
    position: relative;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 2.5rem;
    width: 2px;
    margin-left: -1px;
    background: var(--border);
}

.timeline__item {
    position: relative;
    min-height: 5rem;
    margin-bottom: 3rem;
    padding-left: 6.5rem;
}

.timeline__item:last-child {
    margin-bottom: 0;
}

.timeline__image {
    position: absolute;
    top: 0;
    left: 0;
    width: 5rem;
    height: 5rem;
    border: 7px solid var(--border);
    border-radius: 50%;
    overflow: hidden;
    background: var(--green);
}

.timeline__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.timeline__panel h3 {
    margin: 0 0 0.25rem;
    font-size: 1.25rem;
}

.timeline__subheading {
    margin: 0 0 0.75rem;
    font-family: var(--font-serif);
    font-style: italic;
    color: var(--green);
    font-size: 1.1rem;
}

.timeline__panel p {
    margin: 0;
    color: var(--muted);
}

.timeline__item--final {
    padding-left: 0;
}

.timeline__image--text {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 8rem;
    height: 8rem;
    margin: 0 auto;
    padding: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 0.85rem;
    line-height: 1.25;
    text-align: center;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out;
}

.timeline__image--text:hover {
    background: var(--green-bright);
}

@media (min-width: 48em) {
    .timeline::before {
        left: 50%;
    }

    .timeline__item {
        display: flex;
        min-height: 11rem;
        margin-bottom: 3.5rem;
        padding-left: 0;
    }

    .timeline__image {
        left: 50%;
        width: 10rem;
        height: 10rem;
        transform: translateX(-50%);
    }

    .timeline__panel {
        width: calc(50% - 7rem);
    }

    /* panels alternate sides but text stays left-aligned; ragged-left copy is hard to read */
    .timeline__item:nth-child(odd) .timeline__panel {
        margin-right: auto;
    }

    .timeline__item:nth-child(even) .timeline__panel {
        margin-left: auto;
    }

    .timeline__item--final {
        justify-content: center;
    }

    .timeline__image--text {
        width: 10rem;
        height: 10rem;
        border: 7px solid var(--border);
        border-radius: 50%;
        background: var(--green);
        transform: none;
        font-size: 1rem;
    }
}

/* ---------- Contact ---------- */
.section--dark {
    color: #fff;
    text-align: center;
    background-color: var(--dark);
    background-image: linear-gradient(rgb(33 37 41 / 88%), rgb(33 37 41 / 88%)), url("../img/kontakt-bg.jpg");
    background-image: linear-gradient(rgb(33 37 41 / 88%), rgb(33 37 41 / 88%)),
        image-set(url("../img/kontakt-bg.webp") type("image/webp"), url("../img/kontakt-bg.jpg") type("image/jpeg"));
    background-position: center;
    background-size: cover;
}

.contact__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
    gap: 1rem;
    max-width: 46rem;
    margin: 0 auto;
    font-style: normal;
    text-align: left;
}

.contact__item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin: 0;
    padding: 1.125rem 1.25rem;
    background: rgb(255 255 255 / 8%);
    border: 1px solid rgb(255 255 255 / 14%);
    border-radius: 0.25rem;
    color: #fff;
    font-size: 1.0625rem;
    line-height: 1.4;
    text-decoration: none;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease-in-out;
}

a.contact__item:hover {
    background: rgb(255 255 255 / 16%);
    transform: translateY(-2px);
}

.contact__icon {
    flex: none;
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: var(--gold);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.contact__map {
    display: block;
    width: 100%;
    height: 400px;
    margin-top: 3rem;
    border: 0;
    border-radius: 0.25rem;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 1.75rem 0;
    font-size: 0.9rem;
    text-align: center;
    color: rgb(255 255 255 / 75%);
    background: var(--dark);
    border-top: 1px solid rgb(255 255 255 / 12%);
}

.site-footer__legal {
    margin: 0;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
