:root {
    --ink: #f5efe3;
    --muted: #cfc0aa;
    --soft: #9f927f;
    --paper: #fffaf0;
    --paper-muted: #eadfcf;
    --wood-950: #100a07;
    --wood-900: #1a0f0a;
    --wood-800: #2a160e;
    --wood-700: #3a2015;
    --brass: #c79a4a;
    --brass-dark: #8f6932;
    --green: #0f6b56;
    --green-dark: #08392f;
    --red: #8f2c21;
    --border: rgba(234, 223, 207, .16);
    --shadow: 0 22px 70px rgba(0, 0, 0, .34);
    --radius: 8px;
    --max: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background:
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(180deg, #120c08 0%, #21130d 42%, #120c08 100%);
    background-size: 72px 72px, auto;
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.6;
}

body.nav-open {
    overflow: hidden;
}

a {
    color: inherit;
    text-decoration-color: rgba(199, 154, 74, .55);
    text-underline-offset: 4px;
}

a:hover {
    color: #fff7e8;
    text-decoration-color: var(--brass);
}

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

button,
input {
    font: inherit;
}

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

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(16, 10, 7, .9);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 14px 36px rgba(0, 0, 0, .24);
    backdrop-filter: blur(14px);
}

.topline {
    display: flex;
    justify-content: center;
    gap: 26px;
    padding: 7px 18px;
    color: var(--muted);
    background: rgba(7, 5, 4, .65);
    font-family: Arial, sans-serif;
    font-size: .84rem;
}

.topline a {
    text-decoration: none;
}

.nav-shell {
    width: min(100% - 36px, var(--max));
    min-height: 74px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 210px;
    text-decoration: none;
}

.brand img {
    width: 48px;
    height: 48px;
}

.brand span {
    display: grid;
    line-height: 1.1;
}

.brand strong {
    font-size: 1.05rem;
    font-weight: 700;
}

.brand small {
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: .78rem;
    text-transform: uppercase;
}

.nav-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-family: Arial, sans-serif;
}

.nav-links a {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    color: var(--muted);
    text-decoration: none;
    border-radius: var(--radius);
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
    color: var(--paper);
    background: rgba(255, 255, 255, .07);
}

.nav-links .nav-cta {
    margin-left: 8px;
    color: #161008;
    background: var(--brass);
    font-weight: 700;
}

.nav-links .nav-cta:hover {
    color: #120c08;
    background: #e0b45d;
}

.nav-toggle {
    display: none;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--paper);
    background: rgba(255, 255, 255, .06);
    cursor: pointer;
}

.nav-toggle span {
    width: 22px;
    height: 2px;
    grid-column: 1;
    grid-row: 1;
    background: currentColor;
    transition: transform .18s ease, opacity .18s ease;
}

.nav-toggle span:nth-child(1) {
    transform: translateY(-7px);
}

.nav-toggle span:nth-child(3) {
    transform: translateY(7px);
}

.nav-toggle b {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.nav-open .nav-toggle span:nth-child(1) {
    transform: rotate(45deg);
}

.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle span:nth-child(3) {
    transform: rotate(-45deg);
}

.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    isolation: isolate;
    background-image: url("/assets/img/hero-drewno-flagi-prodia.jpg");
    background-size: cover;
    background-position: center right;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background:
        linear-gradient(90deg, rgba(10, 7, 5, .96) 0%, rgba(10, 7, 5, .82) 34%, rgba(10, 7, 5, .22) 56%, rgba(10, 7, 5, .04) 78%, rgba(10, 7, 5, .2) 100%),
        linear-gradient(0deg, rgba(16, 10, 7, .9) 0%, rgba(16, 10, 7, .28) 34%, rgba(16, 10, 7, .08) 100%);
}

.hero-inner {
    padding: 82px 0 68px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--brass);
    font-family: Arial, sans-serif;
    font-size: .82rem;
    font-weight: 700;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 760px;
    margin-bottom: 22px;
    font-size: 3.35rem;
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 18px;
    font-size: 2.15rem;
    line-height: 1.16;
    letter-spacing: 0;
}

h3 {
    margin-bottom: 12px;
    font-size: 1.3rem;
    line-height: 1.2;
    letter-spacing: 0;
}

.hero-lead {
    max-width: 660px;
    color: var(--muted);
    font-size: 1.18rem;
}

.hero-actions,
.section-head,
.contact-grid,
.callout-grid,
.split {
    display: flex;
    align-items: center;
    gap: 28px;
}

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

.button {
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: Arial, sans-serif;
    font-weight: 700;
    text-decoration: none;
}

.button.primary {
    color: #160f09;
    background: var(--brass);
}

.button.primary:hover {
    color: #160f09;
    background: #e2b661;
}

.button.ghost,
.button.secondary {
    color: var(--paper);
    border-color: rgba(199, 154, 74, .5);
    background: rgba(255, 255, 255, .05);
}

.button.ghost:hover,
.button.secondary:hover {
    background: rgba(199, 154, 74, .16);
}

.hero-facts {
    max-width: 790px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    margin: 42px 0 0;
    border: 1px solid var(--border);
    background: var(--border);
    box-shadow: var(--shadow);
}

.hero-facts div {
    min-height: 104px;
    padding: 20px;
    background: rgba(16, 10, 7, .72);
}

.hero-facts dt {
    color: var(--paper);
    font-size: 1.35rem;
    font-weight: 700;
}

.hero-facts dd {
    margin: 4px 0 0;
    color: var(--muted);
    font-family: Arial, sans-serif;
    font-size: .9rem;
}

.section {
    padding: 86px 0;
}

.intro-band {
    background:
        linear-gradient(180deg, rgba(255, 250, 240, .035), rgba(255, 250, 240, .02)),
        #1a0f0a;
}

.split {
    align-items: center;
    justify-content: space-between;
}

.split > * {
    flex: 1 1 0;
}

.split p {
    color: var(--muted);
}

.split.reverse {
    flex-direction: row-reverse;
}

.portrait-frame {
    max-width: 390px;
    margin: 0;
    justify-self: end;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, rgba(199,154,74,.22), rgba(15,107,86,.12));
    box-shadow: var(--shadow);
}

.portrait-frame img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: 50% 18%;
    filter: saturate(.94) contrast(1.05);
}

.section-head {
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 34px;
}

.section-head h2 {
    max-width: 680px;
    margin-bottom: 0;
}

.section-head a {
    font-family: Arial, sans-serif;
    font-weight: 700;
}

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

.service-grid.compact {
    grid-template-columns: repeat(3, 1fr);
}

.service-card,
.term-card,
.mediation-grid article,
.map-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background:
        linear-gradient(180deg, rgba(255, 250, 240, .055), rgba(255, 250, 240, .025)),
        rgba(34, 20, 13, .82);
    box-shadow: 0 18px 52px rgba(0, 0, 0, .22);
}

.service-card {
    position: relative;
    min-height: 430px;
    padding: 26px;
    overflow: hidden;
}

.service-mark {
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid rgba(199, 154, 74, .45);
    color: var(--brass);
    background: rgba(199, 154, 74, .08);
    font-size: 1.45rem;
}

.service-card p,
.term-card p,
.mediation-grid p,
.map-card p {
    color: var(--muted);
}

.service-card ul {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

.service-card li {
    position: relative;
    padding: 8px 0 8px 20px;
    color: var(--paper-muted);
    border-top: 1px solid rgba(234, 223, 207, .09);
}

.service-card li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    width: 7px;
    height: 7px;
    border: 1px solid var(--brass);
    transform: rotate(45deg);
}

.dark-callout {
    background:
        linear-gradient(90deg, rgba(15, 107, 86, .18), rgba(143, 44, 33, .13)),
        #120c08;
    border-block: 1px solid var(--border);
}

.callout-grid {
    align-items: flex-start;
    justify-content: space-between;
}

.callout-grid > div:first-child {
    max-width: 650px;
}

.callout-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
    max-width: 430px;
}

.callout-list span,
.term-strip a {
    min-height: 38px;
    display: inline-flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid rgba(199, 154, 74, .36);
    border-radius: var(--radius);
    color: var(--paper);
    background: rgba(255, 255, 255, .045);
    font-family: Arial, sans-serif;
    font-size: .9rem;
    text-decoration: none;
}

.term-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.contact-panel,
.contact-page {
    background:
        linear-gradient(180deg, rgba(255, 250, 240, .045), rgba(255, 250, 240, .02)),
        #21130d;
}

.contact-grid {
    justify-content: space-between;
    align-items: stretch;
}

address {
    min-width: 340px;
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 28px;
    border-left: 4px solid var(--brass);
    color: var(--paper);
    background: rgba(16, 10, 7, .58);
    font-style: normal;
    box-shadow: var(--shadow);
}

address strong {
    font-size: 1.25rem;
}

address a {
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.page-hero {
    padding: 90px 0 74px;
    background:
        linear-gradient(90deg, rgba(16, 10, 7, .94), rgba(26, 15, 10, .72)),
        url("/assets/img/hero-drewno-flagi-prodia.jpg") center right / cover;
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    max-width: 850px;
}

.page-hero p {
    max-width: 760px;
    color: var(--muted);
    font-size: 1.12rem;
}

.document-section {
    background: #1a0f0a;
}

.steps {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: steps;
}

.steps li {
    position: relative;
    min-height: 92px;
    padding: 20px 22px 18px 76px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .04);
    counter-increment: steps;
}

.steps li::before {
    content: counter(steps);
    position: absolute;
    left: 20px;
    top: 20px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    color: #150f09;
    background: var(--brass);
    font-family: Arial, sans-serif;
    font-weight: 700;
}

.steps strong,
.steps span {
    display: block;
}

.steps span {
    color: var(--muted);
}

.search-box {
    max-width: 560px;
    display: grid;
    gap: 8px;
    margin-top: 28px;
    color: var(--muted);
    font-family: Arial, sans-serif;
}

.search-box input {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid rgba(199, 154, 74, .38);
    border-radius: var(--radius);
    color: var(--paper);
    background: rgba(16, 10, 7, .72);
    outline: none;
}

.search-box input:focus {
    border-color: var(--brass);
    box-shadow: 0 0 0 3px rgba(199, 154, 74, .18);
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.term-card {
    min-height: 210px;
    padding: 24px;
}

.term-card h2 {
    font-size: 1.35rem;
}

.term-card[hidden] {
    display: none;
}

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

.mediation-grid article {
    min-height: 290px;
    padding: 26px;
}

.map-card {
    padding: 28px;
}

.footer {
    padding-top: 70px;
    color: var(--muted);
    background: #0d0806;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr;
    gap: 34px;
}

.footer h2,
.footer h3 {
    color: var(--paper);
}

.footer-eagle {
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
    color: var(--brass);
}

.account {
    color: var(--paper);
    font-family: Arial, sans-serif;
    overflow-wrap: anywhere;
}

.footer-bottom {
    margin-top: 46px;
    padding: 18px;
    text-align: center;
    color: var(--soft);
    border-top: 1px solid var(--border);
    font-family: Arial, sans-serif;
    font-size: .9rem;
}

@media (min-width: 1120px) {
    .hero {
        min-height: 690px;
    }
}

@media (max-width: 980px) {
    .topline {
        justify-content: flex-start;
        overflow-x: auto;
        white-space: nowrap;
    }

    .nav-toggle {
        display: grid;
        position: relative;
    }

    .nav-links {
        position: fixed;
        inset: 111px 0 auto 0;
        display: none;
        max-height: calc(100svh - 111px);
        padding: 18px;
        overflow-y: auto;
        background: rgba(13, 8, 6, .98);
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav-open .nav-links {
        display: grid;
        gap: 8px;
    }

    .nav-links a {
        width: 100%;
        min-height: 48px;
        justify-content: center;
    }

    .nav-links .nav-cta {
        margin-left: 0;
    }

    h1 {
        font-size: 2.55rem;
    }

    h2 {
        font-size: 1.85rem;
    }

    .hero {
        min-height: 620px;
        background-position: 63% center;
    }

    .hero-overlay {
        background:
            linear-gradient(90deg, rgba(10, 7, 5, .94), rgba(10, 7, 5, .66)),
            linear-gradient(0deg, rgba(16, 10, 7, .94), transparent 44%);
    }

    .hero-facts,
    .service-grid,
    .service-grid.compact,
    .glossary-grid,
    .mediation-grid,
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .split,
    .split.reverse,
    .contact-grid,
    .callout-grid {
        flex-direction: column;
        align-items: flex-start;
    }

    .portrait-frame,
    .term-strip,
    .callout-list,
    address {
        width: 100%;
        max-width: none;
        justify-content: flex-start;
    }
}

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

    .brand {
        min-width: 0;
    }

    .brand strong {
        font-size: .96rem;
    }

    .brand small {
        font-size: .7rem;
    }

    .topline span {
        display: none;
    }

    .hero {
        min-height: auto;
        background-position: 58% center;
    }

    .hero-inner {
        padding: 72px 0 54px;
    }

    h1 {
        font-size: 2.05rem;
        line-height: 1.1;
    }

    h2 {
        font-size: 1.55rem;
    }

    .hero-lead,
    .page-hero p {
        font-size: 1rem;
    }

    .hero-actions {
        gap: 12px;
    }

    .button {
        width: 100%;
    }

    .hero-facts,
    .service-grid,
    .service-grid.compact,
    .glossary-grid,
    .mediation-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero-facts div {
        min-height: auto;
    }

    .section {
        padding: 58px 0;
    }

    .section-head {
        display: grid;
        gap: 14px;
    }

    .service-card,
    .term-card,
    .mediation-grid article,
    .map-card,
    address {
        min-height: 0;
        padding: 22px;
    }

    .page-hero {
        padding: 62px 0 52px;
    }

    .steps li {
        padding-left: 66px;
    }
}
