/* strojedotanca.pl — one-page. Styl na bazie motywu "stroje" (2009–2019). */

:root {
    --ink: #000;
    --brand: #000070;
    --brand-2: #333066;
    --accent: #7a1fa2;
    --line: #ccc;
    --bar: #ddd;
    --paper: #fff;
    --bg: #fdfdfd;
    --wrap: 1100px;
    --radius: 4px;
    --font: Verdana, Geneva, "DejaVu Sans", sans-serif;
    --font-alt: Georgia, "Times New Roman", serif;
    color-scheme: light;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
    margin: 0;
    font: 15px/1.6 var(--font);
    color: var(--ink);
    background: var(--bg) url("../img/tlo.webp") no-repeat fixed left top / contain;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { line-height: 1.25; }

.wrap { width: min(100% - 2rem, var(--wrap)); margin-inline: auto; }
.visually-hidden, .toggle {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip-path: inset(50%); white-space: nowrap;
}
.skip-link { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--paper); padding: .5rem 1rem; }
.skip-link:focus { left: 1rem; }
.plain { list-style: none; margin: 0; padding: 0; }

/* ---------- Nagłówek ---------- */
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    padding-block: .75rem;
}
.brand { display: flex; align-items: center; gap: 1rem; text-decoration: none; }
.brand__logo { width: 60px; }
.brand__name { width: min(400px, 60vw); }
.header-contact { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; }
.header-contact a { text-decoration: none; color: var(--ink); }
.header-contact a:hover { color: var(--brand); text-decoration: underline; }

.site-nav {
    position: sticky; top: 0; z-index: 50;
    background: rgb(253 253 253 / .94);
    backdrop-filter: blur(6px);
    border-block: 1px solid var(--line);
}
.site-nav ul {
    display: flex; gap: .25rem; margin: 0 auto; padding: 0; list-style: none;
    overflow-x: auto; scrollbar-width: none;
}
.site-nav a {
    display: block; padding: 0 1.25rem; line-height: 3rem; white-space: nowrap;
    font-weight: bold; color: var(--ink); text-decoration: none;
}
.site-nav a:hover, .site-nav a[aria-current="true"] {
    color: var(--brand);
    background: url("../img/menu_pod.png") no-repeat center bottom 4px;
}

/* ---------- Hero ---------- */
.hero { padding-block: 3rem 1rem; text-align: center; }
.hero h1 { margin: 0; font: bold clamp(1.8rem, 4vw, 2.6rem)/1.2 var(--font-alt); color: var(--brand); }
.hero h1 span { display: block; margin-top: .4rem; font: 400 clamp(1rem, 2.2vw, 1.25rem)/1.4 var(--font); color: var(--brand-2); }
.hero__lead { max-width: 46rem; margin: 1rem auto 0; }

/* ---------- Sekcje ---------- */
.section { padding-block: 2.5rem; }
.section__title {
    margin: 0 0 1.5rem; text-align: center; color: var(--brand);
    font: bold 1.6rem/1.3 var(--font-alt);
    padding-bottom: 1.2rem;
    background: url("../img/menu_pod.png") no-repeat center bottom;
}
.section__intro { text-align: center; margin-top: -.5rem; }
.panel {
    background: rgb(255 255 255 / .92); border: 1px solid var(--line); border-radius: var(--radius);
    padding: clamp(1rem, 4vw, 2.5rem);
}
.panel--center { text-align: center; }
.prose { max-width: 50rem; margin-inline: auto; text-align: justify; hyphens: auto; }
.prose h3 { color: var(--brand); text-align: left; margin-top: 2rem; }
.lead { font-size: 1.05rem; }
.steps { padding-left: 1.4rem; }
.steps li { margin-bottom: 1rem; }
.steps p { margin: .25rem 0 0; }
.signature { text-align: right; font-style: italic; }
.offer { padding-left: 1.2rem; }
.offer > li { margin-bottom: .75rem; }
.offer ul { list-style: "– "; margin-top: .25rem; }
.contact-email { font-size: 1.1rem; }

/* ---------- Przyciski ---------- */
.btn {
    display: inline-block; cursor: pointer; border: 0; border-radius: var(--radius);
    padding: .7rem 1.4rem; font: bold 1rem var(--font);
    background: #aaa; color: #fff; text-decoration: none;
}
.btn:hover { background: #888; color: #fff; }
.btn--ghost { background: transparent; color: var(--brand-2); border: 1px solid var(--line); }
.btn--ghost:hover { background: #eee; color: var(--brand); }
.btn--link { background: none; padding: 0; color: var(--brand); font-weight: normal; text-decoration: underline; }
.btn--link:hover { background: none; color: var(--accent); }
.more { text-align: center; margin-top: 1.5rem; }
.more__hide { display: none; }
.toggle:checked ~ .more .more__show,
.section:has(.toggle:checked) .more__show { display: none; }
.section:has(.toggle:checked) .more__hide { display: inline; }
.toggle:focus-visible ~ .more .btn, .section:has(.toggle:focus-visible) .more .btn { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---------- Filtry ---------- */
.filters { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin: 0 0 1.5rem; }
.chip {
    padding: .2rem .7rem; border: 1px solid var(--line); border-radius: 999px;
    background: var(--paper); color: var(--brand-2); font-size: .85rem; text-decoration: none;
}
.chip:hover, .chip[aria-current="true"] { background: var(--brand-2); border-color: var(--brand-2); color: #fff; }

/* ---------- Karty realizacji ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.card {
    display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line);
    border-radius: var(--radius); overflow: hidden;
}
.card[hidden] { display: none; }
.section:has(#more-projects:not(:checked)) .cards:not(.is-filtered) .card--extra { display: none; }
.card__title {
    margin: 0; padding: .7rem .8rem; min-height: 3.6rem; display: grid; place-items: center;
    background: var(--bar); border-bottom: 1px solid var(--line);
    text-align: center; font-size: 1rem; color: var(--brand);
}
.card__media { position: relative; }
.card__media img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: opacity .2s; }
.card__media a:hover img { opacity: .9; }
.card__count {
    position: absolute; right: .5rem; bottom: .5rem; padding: .1rem .5rem; border-radius: var(--radius);
    background: rgb(0 0 0 / .6); color: #fff; font-size: .8rem;
}
.card__excerpt { margin: .8rem .8rem .4rem; text-align: center; }
.card__more { margin: 0 .8rem .4rem; font-size: .9rem; }
.card__more summary { cursor: pointer; color: var(--brand-2); text-align: center; }
.card__more p { margin: .5rem 0; }
.card__meta, .card__tags { margin: .2rem .8rem; font-size: .8rem; color: var(--brand-2); text-align: center; }
.card__tags { margin-bottom: .8rem; margin-top: auto; padding-top: .2rem; }
.card__tags a { color: var(--brand-2); text-decoration: none; }
.card__tags a:not(:last-child)::after { content: ","; }
.card__tags a:hover { text-decoration: underline; }

/* ---------- Galeria ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .5rem; }
.gallery a { display: block; border: 1px solid var(--line); background: var(--paper); padding: 4px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.section:has(#more-gallery:not(:checked)) .gallery__extra { display: none; }

/* ---------- Stopka ---------- */
.site-footer { border-top: 1px solid var(--line); background: rgb(255 255 255 / .9); margin-top: 2rem; }
.footer-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; padding-block: 1.5rem; }
.footer-box { border: 1px solid var(--line); padding: 1rem; text-align: center; }
.footer-box h2 { font-size: 1rem; margin: 0 0 .75rem; }
.footer-box p { margin: .3rem 0; }
.tagcloud { display: flex; flex-wrap: wrap; justify-content: center; gap: .2rem .6rem; }
.tagcloud a { text-decoration: none; }
.tagcloud a:hover { text-decoration: underline; }
.privacy { padding-block: .5rem 1rem; font-size: .85rem; }
.privacy summary { cursor: pointer; text-align: center; font-weight: bold; color: var(--brand-2); }
.colophon { padding: 1rem; text-align: center; font-size: .85rem; border-top: 1px solid var(--line); }
.colophon a { color: var(--ink); text-decoration: none; }

/* ---------- Komunikat cookies ---------- */
.cookie {
    position: fixed; inset: auto 0 0; z-index: 9999; padding: 1rem;
    background: #fff; border-top: 5px solid #25064b; box-shadow: 0 -4px 20px rgb(0 0 0 / .15);
    font: .8rem/1.5 var(--font-alt); color: #514706; text-align: center;
}
.cookie p { max-width: 60rem; margin: .25rem auto; }
.cookie a { color: #25064b; font-weight: bold; }
.cookie__actions { display: flex; gap: .5rem; justify-content: center; flex-wrap: wrap; }

/* ---------- PhotoSwipe: podpis ---------- */
.pswp__caption {
    position: absolute; left: 50%; bottom: 1rem; transform: translateX(-50%);
    max-width: min(90%, 40rem); padding: .4rem .8rem; border-radius: var(--radius);
    background: rgb(0 0 0 / .55); color: #fff; font-size: .9rem; text-align: center;
}
.pswp__caption:empty { display: none; }

/* ---------- Responsywność ---------- */
@media (max-width: 700px) {
    body { background-size: 140% auto; background-position: -40vw 0; }
    .brand__logo { display: none; }
    .site-header__inner { flex-direction: column; text-align: center; }
    .header-contact { align-items: center; flex-direction: row; gap: 1rem; }
    .site-nav a { padding: 0 .8rem; }
    .prose { text-align: left; }
}

@media print {
    .site-nav, .cookie, .filters, .more, .toggle { display: none !important; }
    body { background: none; }
}