/*
Theme Name: KRSA Kancelaria
Description: Wizytówka kancelarii, rejestr postępowań i ogłoszenia o sprzedaży.
Version: 1.1.4
Requires at least: 6.2
Requires PHP: 7.4
Text Domain: krsa-kancelaria
*/

:root {
    --navy: #20456e;
    --navy-deep: #17334f;
    --ink: #18364f;
    --muted: #516271;
    --paper: #fbfbfa;
    --border: #d8d4c9;
    --accent: #a7cedd;
    --display: "KRSA Montserrat", Arial, sans-serif;
    --sans: "KRSA Inter", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-padding-top: 24px; }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
}
a { color: inherit; text-underline-offset: .2em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
    outline: 3px solid #337ca4; outline-offset: 4px;
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.08; }
h1 { letter-spacing: -.05em; }
h2, h3 { letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 3.3vw, 3.2rem); }
h3 { font-size: clamp(1.45rem, 2.4vw, 2.15rem); }
address { font-style: normal; }
img { display: block; height: auto; max-width: 100%; }
.shell { width: min(100% - 112px, 1240px); margin-inline: auto; }
.skip-link { position: absolute; z-index: 10; top: 8px; left: 8px; background: white; color: var(--ink); padding: .8rem; transform: translateY(-160%); }
.skip-link:focus { transform: none; }

.site-header { background: var(--paper); position: relative; }
.masthead { min-height: 87px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; }
.site-nav { display: flex; align-items: center; gap: clamp(.9rem, 2.3vw, 2.3rem); flex-wrap: wrap; }
.site-nav a { font-size: .91rem; font-weight: 600; text-decoration: none; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; }
.site-nav a:last-child { border: 1px solid #a6afb2; padding: .48rem .95rem; }
.menu-toggle { display: none; }

.hero { background: var(--navy-deep); color: var(--paper); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(0, 1fr); min-height: 560px; gap: clamp(1.8rem, 6.4vw, 6.3rem); align-items: center; }
.hero-copy { min-width: 0; padding-block: 3.15rem 3.5rem; }
.eyebrow { color: var(--muted); font-size: .73rem; font-weight: 720; line-height: 1.4; letter-spacing: .088em; text-transform: uppercase; }
.hero-copy .eyebrow { color: var(--accent); display: flex; align-items: center; gap: .65rem; }
.hero-copy .eyebrow span { display: inline-block; width: 24px; height: 1px; background: currentColor; flex: none; }
.hero h1 { margin: 1.2rem 0 1.3rem; font-size: clamp(5.1rem, 9.4vw, 9.15rem); line-height: .82; font-weight: 400; }
.hero-lead { max-width: 500px; color: #e8eaf0; font-size: clamp(1.05rem, 1.45vw, 1.32rem); line-height: 1.48; margin-bottom: 1.8rem; }
.button { border: 1px solid transparent; display: inline-flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-radius: .15rem; padding: .71rem 1.02rem; font-weight: 690; font-size: .91rem; text-decoration: none; }
.button-accent { background: var(--accent); color: var(--navy-deep); }
.button-accent:hover { background: #c6e0ea; }
.button-dark { background: var(--navy); color: white; }
.button-dark:hover { background: #27475d; }


.entrypoints { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--border); border-top: 0; }
.entrypoints a { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.3rem 1.65rem; text-decoration: none; }
.entrypoints a + a { border-left: 1px solid var(--border); }
.entrypoints a:hover { background: #eeeadf; }
.entrypoints strong { display: block; font-weight: 700; }
.entrypoints small { color: var(--muted); font-size: .86rem; }
.entrypoints a > span:last-child { color: #315e76; font-size: 1.25rem; }

.home-experience { padding-block: clamp(3rem, 6vw, 5.4rem); }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.6rem; }
.text-link, .back-link { font-size: .89rem; font-weight: 670; text-decoration: underline; text-decoration-color: #8593a0; }
.text-link span { margin-left: .35rem; }
.study-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.study { border: 1px solid var(--border); border-top: 3px solid #537d91; padding: 1.25rem; }
.study:nth-child(2) { border-top-color: #6b8e81; }
.study:nth-child(3) { border-top-color: #a28b64; }
.study h3 { margin: .65rem 0 1.3rem; }
.study h3 a { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; text-decoration: none; }
.study h3 a:hover { text-decoration: underline; }
.study h3 span { font: 500 .95rem var(--sans); color: #4d6676; }
.study-number { display: flex; flex-direction: column; gap: .2rem; }
.study-number strong { font: 400 clamp(1.65rem, 3vw, 3.1rem)/1.08 var(--display); letter-spacing: -.05em; color: var(--ink); }
.study-number > span { color: var(--muted); font-size: .86rem; }
.study-summary { border-top: 1px solid var(--border); padding-top: .82rem; margin-top: 1rem; font-size: .9rem; }
.service { background: #eae6dc; }
.service-grid { display: grid; grid-template-columns: .83fr 1fr; gap: clamp(1.25rem, 5vw, 4rem); align-items: start; padding-block: 3.4rem; }
.service h2 { max-width: 455px; }
.service p { max-width: 64ch; margin-bottom: .95rem; }

.page-heading { color: var(--paper); background: var(--navy-deep); padding: clamp(2.4rem, 5.3vw, 5.4rem) 0; }
.page-heading .eyebrow { color: var(--accent); margin-bottom: .9rem; }
.page-heading h1 { font-size: clamp(2.65rem, 6.3vw, 6rem); max-width: 18ch; overflow-wrap: anywhere; }
.page-heading p:not(.eyebrow) { color: #dbe4e8; font-size: clamp(1rem, 1.7vw, 1.27rem); margin-top: .85rem; max-width: 65ch; }
.page-heading .text-link { display: inline-block; margin-top: .7rem; }
.back-link { display: inline-block; color: var(--accent); margin-bottom: .8rem; }

.layout-split { display: grid; grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr); gap: clamp(1.2rem, 6vw, 6rem); }
.profile { padding-block: clamp(2.35rem, 5vw, 4.3rem); }
.profile + .profile { border-top: 1px solid var(--border); }
.listing { padding-block: clamp(2.3rem, 4.8vw, 4.35rem); }
.list-row { padding-block: 1.2rem; border-top: 1px solid var(--border); }
.list-row:last-child { border-bottom: 1px solid var(--border); }
.list-row .eyebrow { margin-bottom: .4rem; }
.list-row p:not(.eyebrow) { color: var(--muted); margin-top: .45rem; }
.list-row h2, .list-row h3 { font-size: clamp(1.5rem, 2.3vw, 2.2rem); }
.list-row h2 a, .list-row h3 a { text-decoration: none; }
.list-row h2 a:hover, .list-row h3 a:hover { text-decoration: underline; }
.directory-row { display: flex; align-items: center; justify-content: space-between; gap: 1.3rem; }
.row-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.study-detail { padding: 1.65rem 0; border-top: 1px solid var(--border); scroll-margin-top: 1rem; }
.study-detail .eyebrow { margin-bottom: .5rem; }
.study-detail .study-number { margin-bottom: .7rem; }
.tender-group + .tender-group { margin-top: 2.65rem; }
.tender-group h2 { margin-bottom: 1rem; }
.empty { padding: 1.2rem; border: 1px solid var(--border); color: var(--muted); }
.directory-search { padding: 1.15rem; background: #eeebe2; margin-bottom: 1.5rem; }
.directory-search label { display: block; font-weight: 675; margin-bottom: .5rem; }
.directory-search > div { display: flex; align-items: stretch; flex-wrap: wrap; gap: .5rem; }
.directory-search input { width: min(100%, 500px); background: white; color: var(--ink); border: 1px solid #a9adb0; border-radius: .15rem; padding: .6rem .75rem; }
.article-shell { max-width: 910px; padding-block: clamp(2rem, 5vw, 4rem); }
.record-summary { background: #eeebe2; border-left: 3px solid #527b91; padding: clamp(1rem, 3.5vw, 2.1rem); margin-bottom: 2rem; }
.record-summary h2 { margin-bottom: .9rem; font-size: clamp(1.5rem, 2.9vw, 2.4rem); }
.record-summary p { margin-bottom: .55rem; }
.record-summary p:last-child { margin-bottom: 0; }
.details { display: grid; gap: .45rem; margin: .75rem 0 1rem; }
.details > div { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: .7rem; border-bottom: 1px solid var(--border); padding-bottom: .42rem; }
.details dt { color: var(--muted); }
.details dd { font-weight: 650; }
.record-summary .button + p { margin-top: .75rem; }
.case-history h2 { margin-bottom: 1.25rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1.2rem; border-left: 1px solid #78909e; }
.timeline li { position: relative; padding-bottom: 1.5rem; }
.timeline li::before { content: ""; position: absolute; top: .27rem; left: calc(-1.2rem - 5px); width: 9px; height: 9px; background: #49748c; border-radius: 50%; }
.timeline .eyebrow { margin-bottom: .42rem; }
.timeline h3 { margin-bottom: .38rem; }
.timeline h3 a { text-decoration: none; }
.timeline h3 a:hover { text-decoration: underline; }
.case-background { margin-top: 1.4rem; }
.case-background > h3:first-child { margin-bottom: .8rem; }
.rich { overflow-wrap: anywhere; }
.rich :where(p, ul, ol, figure, table, blockquote, details) { margin-bottom: 1rem; }
.rich :where(p, ul, ol, figure, table, blockquote, details):last-child { margin-bottom: 0; }
.rich :where(h2, h3, h4) { margin-bottom: .7rem; }
.rich table { max-width: 100%; }
.rich td, .rich th { border: 1px solid var(--border); padding: .45rem; }
.rich details { border: 1px solid var(--border); padding: .7rem 1rem; }
.rich summary { cursor: pointer; font-weight: 650; }
.rich hr { border: 0; border-top: 1px solid var(--border); margin: 1rem 0; }

.site-footer { background: var(--navy-deep); color: #dce6eb; }
.footer-grid { display: grid; grid-template-columns: 1.25fr 1fr 1fr minmax(0, .8fr); gap: 1.3rem; padding-block: 2.25rem; font-size: .88rem; }

@media (max-width: 1040px) {
    .shell { width: min(100% - 64px, 1240px); }
    .masthead { gap: 1.1rem; }
    .site-nav { gap: 1rem; }
}
@media (max-width: 790px) {
    .shell { width: min(100% - 40px, 1240px); }
    .masthead { flex-wrap: wrap; padding-block: .95rem; min-height: 67px; }
    .menu-toggle { display: inline-block; border: 1px solid #8999a1; background: none; color: var(--ink); padding: .32rem .65rem; }
    .site-nav { flex-basis: 100%; }
    .menu-toggle:not([hidden]) ~ .site-nav:not(.is-open) { display: none; }
    .site-nav.is-open { display: flex; }
    .hero-grid { min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, .75fr); gap: 1.25rem; }
    .hero h1 { font-size: clamp(4rem, 12vw, 6.5rem); }
    .study-grid { gap: .65rem; }
    .study { padding: .75rem; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 550px) {
    .shell { width: min(100% - 32px, 1240px); }
    .hero-grid, .entrypoints, .service-grid, .layout-split, .study-grid { grid-template-columns: 1fr; }
    .hero-grid { gap: 0; padding-bottom: 1.35rem; }
    .hero-copy { padding-block: 2.35rem 1.25rem; }
    .hero-lead { margin-bottom: 1rem; }
    .hero h1 { font-size: clamp(4rem, 15vw, 6rem); margin: .85rem 0 .95rem; }
    .entrypoints a + a { border-left: 0; border-top: 1px solid var(--border); }
    .entrypoints a { padding: .85rem; }
    .section-title { align-items: flex-start; flex-direction: column; }
    .study { padding: 1rem; }
    .study h3 { margin-bottom: .75rem; }
    .directory-row { align-items: flex-start; flex-direction: column; gap: .45rem; }
    .details > div { grid-template-columns: 1fr; gap: 0; }
    .footer-grid { grid-template-columns: 1fr; gap: .95rem; }
}

.arrow-icon { position: relative; display: inline-block; width: .85em; height: .85em; flex: none; vertical-align: -.04em; }
.arrow-icon::before { content: ""; position: absolute; top: .07em; right: .06em; width: .49em; height: .49em; border: solid currentColor; border-width: 1px 1px 0 0; }
.arrow-icon::after { content: ""; position: absolute; top: .39em; left: .03em; width: .86em; border-top: 1px solid currentColor; transform: rotate(-45deg); }
.arrow-back { transform: rotate(225deg); margin-right: .35rem; }

@font-face {
    font-family: "KRSA Montserrat";
    src: url("assets/fonts/montserrat-latin-wght-normal.woff2") format("woff2");
    font-style: normal; font-weight: 100 900; font-display: swap;
}
@font-face {
    font-family: "KRSA Montserrat";
    src: url("assets/fonts/montserrat-latin-ext-wght-normal.woff2") format("woff2");
    font-style: normal; font-weight: 100 900; font-display: swap;
    unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB;
}
@font-face {
    font-family: "KRSA Inter";
    src: url("assets/fonts/inter-latin-wght-normal.woff2") format("woff2");
    font-style: normal; font-weight: 100 900; font-display: swap;
}
@font-face {
    font-family: "KRSA Inter";
    src: url("assets/fonts/inter-latin-ext-wght-normal.woff2") format("woff2");
    font-style: normal; font-weight: 100 900; font-display: swap;
    unicode-range: U+0100-024F, U+1E00-1EFF, U+2020, U+20A0-20AB;
}
h2, h3 { font-weight: 610; letter-spacing: -.045em; }
.study-number strong { font-weight: 610; }

.hero-gpw { isolation: isolate; position: relative; background: #1b2530; overflow: hidden; }
.hero-photo, .hero-gpw::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-photo { z-index: -2; object-fit: cover; object-position: center 20%; }
.hero-gpw::before { z-index: -1; content: ""; background: linear-gradient(90deg, #101c2aed 0%, #132337a8 33%, #11223835 60%, #14243a06 100%); }
.hero-gpw .hero-grid { display: flex; min-height: clamp(465px, 42vw, 620px); }
.hero-gpw .hero-copy { max-width: 620px; }
.hero-gpw h1 { font-size: clamp(4.4rem, 8.6vw, 8.5rem); letter-spacing: -.075em; line-height: .86; text-transform: uppercase; }
.hero-gpw h1 strong { font-weight: 750; }
.hero-gpw .eyebrow { color: #ebf3ff; }
.hero-gpw .hero-lead { color: #fff; font-size: clamp(1.05rem, 1.45vw, 1.24rem); }
.hero-gpw .button-accent { background: #e7eff9; color: var(--navy-deep); }

.knowledge-tools { display: flex; flex-wrap: wrap; gap: .55rem 1.3rem; align-items: center; margin-bottom: 1.1rem; }
.knowledge-tools a[aria-current] { font-weight: 740; }
.knowledge-links { display: flex; flex-wrap: wrap; gap: .85rem 1.4rem; margin-top: 1.6rem; }
.knowledge-links .button { white-space: normal; }
.analysis-row .eyebrow { color: #305779; }
@media (max-width: 700px) {
    .hero-gpw .hero-grid { min-height: 490px; }
    .hero-photo { object-position: 35% 44%; }
    .hero-gpw::before { background: linear-gradient(90deg, #101c2ae8 0%, #132337a8 55%, #11223859 100%); }
    .hero-gpw h1 { font-size: clamp(3.6rem, 12.75vw, 6.7rem); }
}

.krsa-editable-profile #tresc > :where(p, ul, ol, blockquote) {
    width: min(100% - 32px, 1240px);
    margin-inline: auto;
    margin-bottom: 1rem;
}

.hero-gpw h1.hero-lead {
    margin: 0 0 1.6rem;
    max-width: 23ch;
    color: #fff;
    font-size: clamp(1.9rem, 3.9vw, 4rem);
    font-weight: 620;
    line-height: 1.13;
    letter-spacing: -.045em;
    text-transform: none;
}
.hero-gpw .hero-copy { max-width: 670px; }
.home-experience .study-grid {
    --study-gap: 1rem;
    position: relative;
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 2 * var(--study-gap)) / 3);
    gap: var(--study-gap);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.home-experience .study { scroll-snap-align: start; min-width: 0; }
.study-controls { display: flex; justify-content: flex-end; gap: .55rem; margin-top: .85rem; }
.study-controls button {
    display: inline-grid;
    place-items: center;
    width: 2.65rem;
    height: 2.65rem;
    border-radius: .15rem;
    border: 1px solid #aeb7bc;
    background: transparent;
    color: var(--navy);
    font-size: 1.2rem;
}
.study-controls button:hover:not(:disabled) { background: #e8eef4; }
.study-controls button:disabled { opacity: .4; cursor: default; }
@media (max-width: 790px) {
    .home-experience .study-grid { --study-gap: .65rem; grid-auto-columns: calc((100% - var(--study-gap)) / 2); }
}
@media (max-width: 550px) {
    .home-experience .study-grid { grid-auto-columns: 100%; }
}

.wordmark {
    --brand-line: 1.38rem;
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: .62rem;
    color: var(--navy);
    text-decoration: none;
}
.wordmark:hover { text-decoration: none; }
.wordmark-sign {
    display: block;
    width: calc(2 * var(--brand-line));
    height: calc(2 * var(--brand-line));
    flex: none;
}
.wordmark-name {
    display: grid;
    grid-template-rows: repeat(2, var(--brand-line));
    align-items: center;
    font-family: var(--display);
    text-transform: uppercase;
    white-space: nowrap;
}
.wordmark-name strong { font-size: 1.42rem; line-height: 1; font-weight: 740; }
.wordmark-name > span { font-size: .89rem; line-height: 1; font-weight: 460; }
.site-footer .wordmark { color: var(--paper); }
@media (max-width: 550px) {
    .wordmark { --brand-line: 1.15rem; gap: .48rem; }
    .wordmark-name strong { font-size: 1.16rem; }
    .wordmark-name > span { font-size: .74rem; }
}
