:root {
    --bg: #f7f5f0;
    --surface: #ffffff;
    --surface-soft: #efede6;
    --text: #20251f;
    --text-soft: #60675f;
    --line: #d9d8d1;
    --green: #244a37;
    --green-dark: #173326;
    --green-light: #dfe9e1;
    --gold: #a88345;
    --max-width: 1180px;
    --radius: 22px;
    --shadow: 0 18px 50px rgba(32, 37, 31, 0.08);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.65;
}

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

a {
    color: inherit;
}

.container {
    width: min(calc(100% - 40px), var(--max-width));
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 20px;
    z-index: 1000;
    padding: 10px 14px;
    background: var(--surface);
    color: var(--green-dark);
    border-radius: 8px;
}

.skip-link:focus {
    top: 20px;
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(247, 245, 240, 0.94);
    border-bottom: 1px solid rgba(217, 216, 209, 0.85);
    backdrop-filter: blur(14px);
}

.header-inner {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    text-decoration: none;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border: 1px solid var(--green);
    border-radius: 50%;
    color: var(--green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.25rem;
}

.brand-text {
    display: grid;
    line-height: 1.08;
}

.brand-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.32rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.brand-tagline {
    margin-top: 4px;
    color: var(--text-soft);
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.main-nav ul {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-nav a {
    display: block;
    padding: 10px 12px;
    color: var(--text-soft);
    text-decoration: none;
    border-radius: 10px;
    font-size: 0.94rem;
    font-weight: 650;
}

.main-nav a:hover,
.main-nav a:focus-visible,
.main-nav a[aria-current="page"] {
    background: var(--green-light);
    color: var(--green-dark);
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    margin: 4px auto;
    background: var(--green-dark);
}

.hero {
    min-height: 620px;
    display: flex;
    align-items: end;
    position: relative;
    overflow: hidden;
    background-image:
        linear-gradient(
            180deg,
            rgba(18, 38, 28, 0.14) 5%,
            rgba(18, 38, 28, 0.72) 100%
        ),
        url("../images/hero/iwonicz-panorama.webp");
    background-position: center;
    background-size: cover;
    background-color: #556b5f;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 70% 18%, rgba(255,255,255,0.13), transparent 32%),
        linear-gradient(90deg, rgba(15, 35, 25, 0.25), transparent 62%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 780px;
    padding: 105px 0 78px;
    color: #ffffff;
}

.eyebrow {
    margin: 0 0 14px;
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.hero .eyebrow {
    color: #ead8b1;
}

.hero h1,
.page-hero h1 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 600;
    line-height: 0.98;
}

.hero h1 {
    max-width: 760px;
    font-size: clamp(3.8rem, 10vw, 7.6rem);
    letter-spacing: -0.045em;
}

.hero-lead {
    max-width: 680px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: clamp(1.08rem, 2vw, 1.28rem);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--green);
    color: #ffffff;
    text-decoration: none;
    font-weight: 750;
    transition: transform 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
    background: var(--green-dark);
}

.button--light {
    background: #ffffff;
    color: var(--green-dark);
}

.button--ghost {
    border-color: rgba(255,255,255,0.55);
    background: rgba(255,255,255,0.08);
    color: #ffffff;
}

.section {
    padding: 92px 0;
}

.section--compact {
    padding: 64px 0;
}

.section--white {
    background: var(--surface);
}

.section--dark {
    background: var(--green-dark);
    color: #ffffff;
}

.section-heading {
    display: grid;
    grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
    gap: 60px;
    align-items: end;
    margin-bottom: 42px;
}

.section-heading h2 {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.3rem, 5vw, 4.2rem);
    font-weight: 500;
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.section-heading p {
    max-width: 620px;
    margin: 0;
    color: var(--text-soft);
    font-size: 1.05rem;
}

.section--dark .section-heading p {
    color: rgba(255,255,255,0.72);
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.intro-large {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 3vw, 2.8rem);
    line-height: 1.25;
}

.intro-copy p:first-child {
    margin-top: 0;
}

.cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.card {
    min-height: 330px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 32px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
    text-decoration: none;
}

.card::before {
    content: "";
    width: 180px;
    height: 180px;
    position: absolute;
    right: -44px;
    bottom: -58px;
    border: 1px solid rgba(36, 74, 55, 0.18);
    border-radius: 50%;
}

.card:hover {
    border-color: #b9c8bc;
}

.card-kicker {
    color: var(--gold);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.card h3 {
    max-width: 500px;
    margin: 14px 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(1.75rem, 3vw, 2.45rem);
    font-weight: 500;
    line-height: 1.08;
}

.card p {
    max-width: 500px;
    margin: 0;
    color: var(--text-soft);
}

.card-arrow {
    margin-top: 28px;
    color: var(--green);
    font-weight: 800;
}

.timeline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-top: 50px;
}

.timeline-item {
    position: relative;
    padding: 30px 20px 0 0;
    border-top: 1px solid rgba(255,255,255,0.28);
}

.timeline-item::before {
    content: "";
    width: 11px;
    height: 11px;
    position: absolute;
    top: -6px;
    left: 0;
    border-radius: 50%;
    background: #ffffff;
}

.timeline-year {
    display: block;
    margin-bottom: 7px;
    color: #ead8b1;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
}

.timeline-item p {
    margin: 0;
    padding-right: 18px;
    color: rgba(255,255,255,0.72);
    font-size: 0.91rem;
}

.feature-band {
    display: grid;
    grid-template-columns: 1.12fr 0.88fr;
    min-height: 480px;
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--surface-soft);
}

.feature-image {
    min-height: 420px;
    background-image:
        linear-gradient(135deg, rgba(28,52,39,0.12), rgba(28,52,39,0.35)),
        url("../images/miejsca/kosciol-wszystkich-swietych.webp");
    background-position: center;
    background-size: cover;
    background-color: #8d9b90;
}

.feature-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(38px, 7vw, 78px);
}

.feature-copy h2,
.content-block h2 {
    margin: 0 0 20px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: clamp(2.1rem, 4vw, 3.7rem);
    font-weight: 500;
    line-height: 1.08;
}

.feature-copy p {
    color: var(--text-soft);
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
}

.quick-link {
    padding: 24px;
    border-top: 1px solid var(--line);
    text-decoration: none;
}

.quick-link strong {
    display: block;
    margin-bottom: 4px;
    color: var(--green-dark);
}

.quick-link span {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.page-hero {
    padding: 92px 0 70px;
    background:
        radial-gradient(circle at 80% 15%, rgba(168, 131, 69, 0.12), transparent 27%),
        var(--green-dark);
    color: #ffffff;
}

.page-hero h1 {
    max-width: 900px;
    font-size: clamp(3rem, 8vw, 6rem);
    letter-spacing: -0.035em;
}

.page-hero p {
    max-width: 760px;
    margin: 22px 0 0;
    color: rgba(255,255,255,0.76);
    font-size: 1.1rem;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.68fr) minmax(0, 1.32fr);
    gap: 70px;
}

.content-aside {
    position: sticky;
    top: 118px;
    align-self: start;
}

.content-aside p {
    color: var(--text-soft);
}

.content-block {
    padding-bottom: 46px;
    margin-bottom: 46px;
    border-bottom: 1px solid var(--line);
}

.content-block:last-child {
    padding-bottom: 0;
    margin-bottom: 0;
    border-bottom: 0;
}

.content-block h3 {
    margin: 32px 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
}

.content-block p {
    color: #414840;
}

.facts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.fact {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.fact strong {
    display: block;
    color: var(--green);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
}

.fact span {
    color: var(--text-soft);
    font-size: 0.86rem;
}

.history-list {
    display: grid;
    gap: 0;
}

.history-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 28px;
    padding: 27px 0;
    border-bottom: 1px solid var(--line);
}

.history-row:first-child {
    border-top: 1px solid var(--line);
}

.history-row time {
    color: var(--gold);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.65rem;
    font-weight: 700;
}

.history-row h3 {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.35rem;
}

.history-row p {
    margin: 0;
    color: var(--text-soft);
}

.place-grid,
.institution-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.place-card,
.institution-card {
    min-height: 270px;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--surface);
}

.place-card h2,
.institution-card h2 {
    margin: 12px 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.8rem;
    font-weight: 500;
}

.place-card p,
.institution-card p {
    color: var(--text-soft);
}

.tag {
    display: inline-block;
    padding: 5px 9px;
    border-radius: 999px;
    background: var(--green-light);
    color: var(--green-dark);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.text-link {
    color: var(--green);
    font-weight: 750;
    text-underline-offset: 3px;
}

.source-box {
    margin-top: 46px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--text-soft);
    font-size: 0.9rem;
}

.source-box ul {
    margin-bottom: 0;
}

.site-footer {
    padding: 52px 0 32px;
    background: #101f18;
    color: rgba(255,255,255,0.72);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr;
    gap: 50px;
}

.site-footer .brand {
    color: #ffffff;
}

.site-footer .brand-tagline {
    color: rgba(255,255,255,0.58);
}

.site-footer h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: 0.95rem;
}

.site-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.site-footer li + li {
    margin-top: 7px;
}

.site-footer a {
    text-decoration: none;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.82rem;
}

@media (max-width: 900px) {
    .nav-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 78px;
        left: 0;
        right: 0;
        padding: 12px 20px 22px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
    }

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

    .main-nav ul {
        display: grid;
    }

    .main-nav a {
        padding: 12px;
    }

    .section-heading,
    .intro-grid,
    .content-grid,
    .feature-band,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .content-aside {
        position: static;
    }

    .timeline {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .timeline-item {
        padding: 20px 0 20px 30px;
        border-top: 0;
        border-left: 1px solid rgba(255,255,255,0.28);
    }

    .timeline-item::before {
        top: 29px;
        left: -6px;
    }

    .place-grid,
    .institution-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .container {
        width: min(calc(100% - 28px), var(--max-width));
    }

    .brand-tagline {
        display: none;
    }

    .hero {
        min-height: 560px;
    }

    .hero-content {
        padding-bottom: 54px;
    }

    .hero h1 {
        font-size: clamp(3.5rem, 20vw, 5.2rem);
    }

    .section {
        padding: 68px 0;
    }

    .section-heading {
        gap: 20px;
    }

    .cards,
    .quick-links,
    .facts {
        grid-template-columns: 1fr;
    }

    .card {
        min-height: 275px;
    }

    .history-row {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .feature-image {
        min-height: 300px;
    }

    .footer-bottom {
        flex-direction: column;
    }
}

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

    *,
    *::before,
    *::after {
        transition: none !important;
    }
}