:root {
    --bg: #ffffff;
    --bg-alt: #f2f5f7;
    --surface: #ffffff;
    --text: #1b2630;
    --muted: #55636f;
    --border: #dde3e8;
    --brand: #0f2a3d;
    --brand-contrast: #ffffff;
    --accent: #e07a1f;
    --accent-hover: #c4660f;
    --radius: 10px;
    --shadow: 0 2px 10px rgba(15, 42, 61, 0.08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #11181e;
        --bg-alt: #172129;
        --surface: #1c2832;
        --text: #e6ecf0;
        --muted: #a2b0bb;
        --border: #2b3a46;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

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

h1, h2, h3 { line-height: 1.25; margin: 0 0 0.5em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
a { color: inherit; }

.container { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--brand);
    color: var(--brand-contrast);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 64px;
    flex-wrap: wrap;
}
.logo { display: flex; align-items: center; }
.logo img { display: block; height: 44px; width: auto; }
.nav { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.nav a {
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    opacity: 0.9;
}
.nav a:hover { opacity: 1; background: rgba(255, 255, 255, 0.1); }
.nav .nav-cta { background: var(--accent); opacity: 1; }
.nav .nav-cta:hover { background: var(--accent-hover); }

/* Hero */
.hero {
    background:
        linear-gradient(120deg, rgba(15, 42, 61, 0.96), rgba(15, 42, 61, 0.82)),
        repeating-linear-gradient(90deg, #8a99a5 0 2px, #b8c3cb 2px 6px);
    color: var(--brand-contrast);
    padding: clamp(56px, 10vw, 110px) 0;
}
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); max-width: 22ch; }
.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.85rem;
    color: #f3b277;
    font-weight: 600;
}
.lead { font-size: 1.15rem; max-width: 60ch; opacity: 0.92; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

.btn {
    display: inline-block;
    padding: 12px 22px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.6); color: #fff; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Sections */
.section { padding: clamp(48px, 8vw, 80px) 0; }
.section-alt { background: var(--bg-alt); }
.section-lead { color: var(--muted); max-width: 65ch; margin-bottom: 32px; }

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.grid-4 { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }

.card, .feature {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.card { border-top: 4px solid var(--brand); }
.card p, .feature p { color: var(--muted); margin: 0; }
.card-accent { border-top-color: var(--accent); }
.card-link {
    display: inline-block;
    margin-top: 12px;
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}
.feature { border-left: 4px solid var(--accent); }

@media (prefers-color-scheme: dark) {
    .card { border-top-color: #7f8f9c; }
    .card-accent { border-top-color: var(--accent); }
}

/* Industries */
.industries {
    list-style: none;
    padding: 0;
    margin: 32px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.industries li {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}
.industries p { color: var(--muted); margin: 4px 0 0; }
.icon { font-size: 1.6rem; line-height: 1; }

/* Steps */
.steps {
    list-style: none;
    counter-reset: step;
    padding: 0;
    margin: 32px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
}
.steps li { counter-increment: step; position: relative; padding-top: 52px; }
.steps li::before {
    content: counter(step);
    position: absolute;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
}
.steps p { color: var(--muted); margin: 4px 0 0; }

@media (prefers-color-scheme: dark) {
    .steps li::before { background: var(--accent); }
}

/* Contact */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}
.contact-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-decoration: none;
    transition: transform 0.15s, border-color 0.15s;
    overflow-wrap: anywhere;
}
.contact-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.contact-label { color: var(--muted); font-size: 0.9rem; }

/* Footer */
.site-footer {
    background: var(--brand);
    color: rgba(255, 255, 255, 0.8);
    padding: 24px 0;
    text-align: center;
    font-size: 0.9rem;
}
.site-footer p { margin: 0; }
.footer-logo { height: 36px; width: auto; margin-bottom: 10px; opacity: 0.9; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, 0.15); opacity: 1; }

/* Blog */
.page-hero { padding: clamp(40px, 7vw, 72px) 0; }
.page-hero h1 { max-width: 28ch; }
.posts {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.post-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border);
    border-top: 4px solid var(--accent);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.post-card h2 { font-size: 1.2rem; }
.post-card h2 a { text-decoration: none; }
.post-card h2 a:hover { color: var(--accent); }
.post-card p { color: var(--muted); }
.post-card .card-link { margin-top: auto; }
.post-meta { color: var(--muted); font-size: 0.875rem; margin-bottom: 0.75em; }
.tag {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    font-size: 0.8rem;
    margin-right: 6px;
}

.article { max-width: 72ch; margin: 0 auto; }
.article h2 { font-size: 1.45rem; margin-top: 1.8em; }
.article h3 { margin-top: 1.4em; }
.article ul, .article ol { padding-left: 1.3em; }
.article li { margin-bottom: 0.4em; }
.back-link { display: inline-block; margin-bottom: 20px; color: var(--accent); font-weight: 600; text-decoration: none; }
.article table { width: 100%; border-collapse: collapse; margin: 1em 0 1.5em; font-size: 0.95rem; }
.article th, .article td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; vertical-align: top; }
.article th { background: var(--bg-alt); }
.table-wrap { overflow-x: auto; }
.callout {
    background: var(--bg-alt);
    border-left: 4px solid var(--accent);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 1.5em 0;
}
.callout p:last-child { margin: 0; }
.article-cta {
    margin-top: 2.5em;
    padding: 24px;
    border-radius: var(--radius);
    background: var(--brand);
    color: #fff;
}
.article-cta p { opacity: 0.9; }

@media (max-width: 600px) {
    .header-inner { padding-top: 8px; padding-bottom: 8px; }
    .nav a { padding: 6px 8px; font-size: 0.95rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .contact-card { transition: none; }
}

/* Stopka: dane firmy */
.footer-nap { font-style: normal; margin-bottom: 8px; }
.footer-nap a { color: #fff; }

/* FAQ */
.faq { display: grid; gap: 12px; max-width: 80ch; }
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0 20px;
}
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    padding: 16px 0;
    list-style-position: inside;
}
.faq-item p { color: var(--muted); }
.faq-item a, .faq-more a, .article a:not(.btn):not(.back-link) { color: var(--accent); }
.faq-more { margin-top: 24px; }

/* Breadcrumbs i powiązane artykuły */
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 16px; font-size: 0.9rem; color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; }
.breadcrumbs a { color: var(--accent); text-decoration: none; }
.related { margin-top: 2.5em; }
.related ul { padding-left: 1.2em; }

/* Galeria realizacji */
.gallery {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.gallery-item a {
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-alt);
    box-shadow: var(--shadow);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center bottom;
    display: block;
    transition: transform 0.25s;
}
.gallery-item a:hover img, .gallery-item a:focus-visible img { transform: scale(1.04); }
.gallery-more { display: none; }
.gallery.show-all .gallery-more { display: block; }
.gallery-toggle { margin-top: 24px; }
.btn-outline { border-color: var(--accent); color: var(--accent); background: transparent; cursor: pointer; font: inherit; font-weight: 600; }
.btn-outline:hover { background: var(--accent); color: #fff; }
@media (max-width: 600px) {
    .gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

.lightbox {
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 100vw;
    max-height: 100vh;
    width: 100vw;
    height: 100vh;
}
.lightbox::backdrop { background: rgba(5, 12, 18, 0.97); }
.lightbox figure {
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 16px 16px;
}
.lightbox img { max-width: 100%; max-height: calc(100vh - 110px); object-fit: contain; border-radius: 6px; }
.lightbox figcaption { color: #e6ecf0; margin-top: 12px; text-align: center; font-size: 0.95rem; }
.lb-btn {
    position: fixed;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border: 0;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}
.lb-btn:hover { background: var(--accent); }
.lb-close { top: 12px; right: 12px; }
.lb-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lb-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (prefers-reduced-motion: reduce) { .gallery-item img { transition: none; } }

/* Okienko z informacją o cookies */
.cookie-bar {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 50;
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-left: 5px solid var(--accent);
    border-radius: var(--radius);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}
.cookie-bar p { margin: 0; font-size: 0.95rem; }
.cookie-bar a { color: var(--accent); }
.cookie-bar .btn { flex-shrink: 0; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
@media (max-width: 600px) {
    .cookie-bar { flex-direction: column; align-items: stretch; text-align: left; }
}

/* Polityka prywatności */
.legal { max-width: 72ch; margin: 0 auto; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal a { color: var(--accent); }
.footer-links { margin: 6px 0; }
.footer-links a { color: #fff; }
