/* ==========================================================================
   jacekspisak.pl – arkusz stylów
   Kolory i odstępy zmieniasz w sekcji :root (zmienne CSS).
   ========================================================================== */

:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --surface-2: #eef1f5;
    --text: #111a2b;
    --muted: #556070;
    --border: #dfe3ea;
    --accent: #0b7c93;
    --accent-strong: #08637a;
    --accent-soft: #e2f3f6;
    --on-accent: #ffffff;
    --hero-bg: #0b1424;
    --hero-text: #e8edf4;
    --hero-muted: #9fb0c4;
    --hero-accent: #3fc6dc;
    --success: #13795b;
    --success-soft: #e3f4ee;
    --error: #b42318;
    --error-soft: #fdecea;

    --radius: 14px;
    --radius-small: 8px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px rgba(16, 24, 40, .06);
    --container: 1120px;
    --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0a111d;
        --surface: #111b2b;
        --surface-2: #0e1726;
        --text: #e6ebf2;
        --muted: #9aa8b9;
        --border: #22324a;
        --accent: #3fc6dc;
        --accent-strong: #6fd8e8;
        --accent-soft: #10303a;
        --on-accent: #06202a;
        --hero-bg: #070d18;
        --success: #4fd1a5;
        --success-soft: #0f2c24;
        --error: #ff8a80;
        --error-soft: #3a1714;
        --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    }
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main { flex: 1; }

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

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-strong); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); font-weight: 750; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 650; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.visually-hidden {
    position: absolute !important; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0 0 0 0); white-space: nowrap;
}

.skip-link {
    position: absolute; left: 12px; top: -48px; z-index: 100;
    background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--radius-small);
}
.skip-link:focus { top: 12px; }

.icon { width: 1.2em; height: 1.2em; flex-shrink: 0; }

.eyebrow {
    font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
    color: var(--accent); margin-bottom: .75em;
}

/* ---------- Przyciski ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5em;
    padding: .8em 1.4em; border-radius: 999px; border: 1.5px solid var(--accent);
    background: var(--accent); color: var(--on-accent);
    font: inherit; font-weight: 650; font-size: 1rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s, border-color .15s, transform .15s;
}
.btn:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { opacity: .7; cursor: progress; }
.btn-small { padding: .55em 1.1em; font-size: .95rem; }
.btn-ghost { background: transparent; color: var(--hero-text); border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn-light { background: #fff; border-color: #fff; color: #08394a; }
.btn-light:hover { background: #e6f6f9; border-color: #e6f6f9; color: #08394a; }

/* ---------- Nagłówek i menu ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--surface) 88%, transparent);
    backdrop-filter: saturate(1.4) blur(10px);
    -webkit-backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--border);
}
@supports not (background: color-mix(in srgb, red 50%, blue)) {
    .site-header { background: var(--surface); }
}

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

.brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand:hover { color: var(--text); }
.brand-mark {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    background: var(--hero-bg); color: var(--hero-accent);
    font-weight: 800; font-size: .95rem; letter-spacing: .02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.brand-sub { font-size: .75rem; color: var(--muted); }

.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
.nav-link {
    display: block; padding: .5em .9em; border-radius: 999px;
    color: var(--text); text-decoration: none; font-weight: 550;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.is-current { color: var(--accent); }
.site-nav .btn.is-current { background: var(--accent-strong); border-color: var(--accent-strong); }

.nav-toggle {
    display: none; background: none; border: 1px solid var(--border); border-radius: 10px;
    color: var(--text); padding: 8px; cursor: pointer; line-height: 0;
}
.nav-toggle .icon { width: 24px; height: 24px; }
.nav-toggle-close { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-open { display: none; }
.nav-toggle[aria-expanded="true"] .nav-toggle-close { display: inline; }

@media (max-width: 720px) {
    .brand-sub { display: none; }
    .js .nav-toggle { display: block; }
    .js .site-nav {
        position: absolute; left: 0; right: 0; top: 100%;
        background: var(--surface); border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow); display: none;
    }
    .js .site-nav.is-open { display: block; }
    .js .site-nav ul { flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 4px; }
    .js .site-nav .btn { display: flex; justify-content: center; margin-top: 8px; }
    .hero-waves { opacity: .3; }
    .no-js .header-inner { flex-wrap: wrap; padding-block: 10px; }
}

/* ---------- Hero (strona główna) ---------- */
.hero {
    position: relative; overflow: hidden;
    background: radial-gradient(1200px 500px at 85% -10%, #12345a 0%, transparent 60%), var(--hero-bg);
    color: var(--hero-text);
    padding: clamp(56px, 9vw, 110px) 0 40px;
}
.hero .eyebrow { color: var(--hero-accent); }
.hero h1 { color: #fff; margin-bottom: .3em; }
.hero-inner { position: relative; display: grid; grid-template-columns: 1.35fr 1fr; gap: 48px; align-items: center; }
.hero-lead { font-size: 1.2rem; color: var(--hero-muted); max-width: 36em; }
.hero-lead strong { color: var(--hero-text); font-weight: 650; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.hero-photo { justify-self: center; position: relative; }
.hero-photo::before {
    content: ""; position: absolute; inset: -14px; border-radius: 50%;
    border: 1.5px dashed rgba(63, 198, 220, .45);
}
.hero-photo img {
    width: min(340px, 70vw); aspect-ratio: 1; object-fit: cover; border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, .08); box-shadow: 0 20px 60px rgba(0, 0, 0, .45);
}

.hero-facts {
    position: relative; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
    margin: 64px 0 0; background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius); overflow: hidden;
}
.hero-facts div { background: rgba(11, 20, 36, .85); padding: 20px 24px; }
.hero-facts dt { font-size: 1.5rem; font-weight: 750; color: #fff; }
.hero-facts dd { margin: 0; color: var(--hero-muted); font-size: .95rem; }

.hero-waves { position: absolute; inset: 0; opacity: .5; pointer-events: none; }
.hero-waves svg { width: 200%; height: 100%; }
.wave { fill: none; stroke-width: 1.5; animation: wave-move 18s linear infinite; }
.wave-1 { stroke: rgba(63, 198, 220, .35); }
.wave-2 { stroke: rgba(63, 198, 220, .18); animation-duration: 26s; }
.wave-3 { stroke: rgba(160, 190, 220, .14); animation-duration: 12s; }
@keyframes wave-move { from { transform: translateX(0); } to { transform: translateX(-300px); } }

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

@media (max-width: 860px) {
    .hero-inner { grid-template-columns: 1fr; text-align: center; }
    .hero-photo { order: -1; }
    .hero-photo img { width: min(220px, 60vw); }
    .hero-lead { margin-inline: auto; }
    .hero-actions { justify-content: center; }
}
@media (max-width: 560px) {
    .hero-facts { grid-template-columns: 1fr; }
    .hero-facts div { padding: 14px 20px; display: flex; align-items: baseline; gap: 12px; }
    .hero-facts dt { font-size: 1.2rem; }
}

/* ---------- Nagłówek podstron ---------- */
.page-hero {
    background: radial-gradient(900px 300px at 90% -20%, #12345a 0%, transparent 60%), var(--hero-bg);
    color: var(--hero-text);
    padding: clamp(48px, 7vw, 84px) 0 clamp(40px, 6vw, 64px);
}
.page-hero h1 { color: #fff; }
.page-hero .eyebrow { color: var(--hero-accent); }
.page-lead { font-size: 1.15rem; color: var(--hero-muted); max-width: 40em; margin-bottom: 0; }
.page-hero-center { text-align: center; padding-block: clamp(72px, 12vw, 140px); }
.page-hero-center .page-lead { margin: 0 auto 2em; }

/* ---------- Sekcje ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--surface-2); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head p:last-child { color: var(--muted); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.split p { color: var(--muted); }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 24px; } }

/* Kafelki */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 28px 24px; box-shadow: var(--shadow);
    transition: transform .2s, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--accent) 40%, var(--border)); }
.card p { color: var(--muted); margin: 0; font-size: 1rem; }
.card-icon {
    display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
    background: var(--accent-soft); color: var(--accent); margin-bottom: 18px;
}
.card-icon .icon { width: 26px; height: 26px; }

/* Tagi */
.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.tags li {
    padding: .55em 1.1em; border-radius: 999px; background: var(--surface);
    border: 1px solid var(--border); font-weight: 600; font-size: .98rem;
}

/* Pasek CTA */
.cta-band {
    display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
    padding: clamp(28px, 5vw, 48px); border-radius: calc(var(--radius) + 6px);
    background: linear-gradient(120deg, #08637a, #0b3d62);
    color: #fff;
}
.cta-band h2 { color: #fff; margin-bottom: .25em; }
.cta-band p { margin: 0; color: #cfe8ef; }

/* Treść tekstowa */
.prose { max-width: 70ch; }
.prose h2 { font-size: 1.45rem; margin-top: 1.8em; }
.prose h2:first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .3em; }
.prose s { color: var(--muted); }

/* ---------- O mnie ---------- */
.about { display: grid; grid-template-columns: 1fr 320px; gap: 56px; align-items: start; }
.about-aside {
    position: sticky; top: 92px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; box-shadow: var(--shadow);
}
.about-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius-small); margin-bottom: 20px; }
.facts { margin: 0; display: grid; gap: 14px; }
.facts dt { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.facts dd { margin: 0; font-weight: 600; }
@media (max-width: 860px) {
    .about { grid-template-columns: 1fr; }
    .about-aside { position: static; display: grid; grid-template-columns: 140px 1fr; gap: 20px; align-items: center; }
    .about-photo { margin: 0; }
}
@media (max-width: 480px) { .about-aside { grid-template-columns: 1fr; } .about-photo { max-width: 200px; } }

/* Oś czasu */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; max-width: 760px; }
.timeline::before {
    content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px; background: var(--border);
}
.timeline li { position: relative; padding: 0 0 36px 44px; }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
    content: ""; position: absolute; left: 0; top: 6px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--surface); border: 3px solid var(--accent);
}
.timeline-when { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); }
.timeline h3 { margin: .25em 0 .35em; }
.timeline p { color: var(--muted); margin: 0; }

/* ---------- Kontakt ---------- */
.contact { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } .contact-aside { order: -1; } }

.contact-form-wrap { scroll-margin-top: 90px; }
.contact-form {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow);
}
.field { margin-bottom: 20px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
@media (max-width: 600px) { .field-row { grid-template-columns: 1fr; } }

.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field input[type="text"], .field input[type="email"], .field textarea {
    width: 100%; padding: .75em .9em; font: inherit; font-size: 1rem; color: var(--text);
    background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--radius-small);
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 150px; }
.field input:focus, .field textarea:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.field [aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error); font-size: .9rem; margin: 6px 0 0; }
.req { color: var(--error); }
.optional { color: var(--muted); font-weight: 400; }

.field-check { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; align-items: start; }
.field-check input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--accent); }
.field-check label { font-weight: 400; font-size: .92rem; color: var(--muted); margin: 0; }
.field-check .field-error { grid-column: 2; }

.form-note { font-size: .85rem; color: var(--muted); margin: 14px 0 0; }

/* Pułapka na boty – ukryta dla ludzi */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert {
    display: flex; gap: 14px; align-items: flex-start;
    padding: 16px 20px; border-radius: var(--radius-small); margin-bottom: 20px; border: 1px solid;
}
.alert .icon { width: 24px; height: 24px; margin-top: 2px; }
.alert p { margin: 0; }
.alert-success { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.alert-success strong { display: block; }
.alert-error { background: var(--error-soft); color: var(--error); border-color: color-mix(in srgb, var(--error) 30%, transparent); }

.contact-aside { display: grid; gap: 14px; }
.contact-card {
    display: flex; align-items: center; gap: 16px; padding: 18px 20px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text); text-decoration: none; box-shadow: var(--shadow);
    transition: border-color .2s, transform .2s;
}
a.contact-card:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }
.contact-card .card-icon { margin: 0; flex-shrink: 0; }
.contact-card-label { display: block; font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 700; }
.contact-card-value { display: block; font-weight: 600; word-break: break-word; }

/* ---------- Projekt: rejestracja i pobieranie ---------- */
.download { display: grid; grid-template-columns: 1fr 400px; gap: 56px; align-items: start; }
.download-card {
    position: sticky; top: 92px; scroll-margin-top: 90px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: clamp(22px, 4vw, 32px); box-shadow: var(--shadow);
}
.download-card h2 { font-size: 1.45rem; }
.download-intro { color: var(--muted); }
.download-meta {
    display: flex; align-items: center; gap: 12px; margin: 0 0 20px; padding: 14px 16px;
    background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-small);
    font-weight: 600; word-break: break-all;
}
.download-meta .icon { width: 28px; height: 28px; color: var(--accent); }
.download-meta small { color: var(--muted); font-weight: 400; }
.form-plain { background: none; border: 0; padding: 0; box-shadow: none; }
.btn-block { width: 100%; justify-content: center; }
.btn-outline { background: transparent; color: var(--accent-strong); border-color: var(--accent); }
.btn-outline:hover { background: var(--accent-soft); color: var(--accent-strong); }
.trial-box {
    margin: 20px 0 0; padding: 16px; background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius-small);
}
.trial-box p { margin: 0 0 12px; }
.trial-box small { color: var(--muted); }
.trial-box .form-note { margin: 12px 0 0; }
.trial-expired { color: var(--error); }

/* ---------- Przełącznik języka PL / EN ---------- */
.lang-switch a {
    display: inline-flex; align-items: center; justify-content: center; min-width: 2.4em; padding: .3em .55em;
    border: 1px solid var(--border); border-radius: var(--radius-small); font-size: .85rem; font-weight: 700;
    letter-spacing: .05em; color: var(--muted); text-decoration: none;
}
.lang-switch a:hover { color: var(--accent-strong); border-color: var(--accent); }
.lang-switch .lang-full { display: none; }
@media (max-width: 720px) {
    .js .lang-switch a { width: 100%; padding: .7em 1em; font-size: 1rem; letter-spacing: 0; font-weight: 600; }
    .js .lang-switch .lang-short { display: none; }
    .js .lang-switch .lang-full { display: inline; }
}
.btn-large { padding: 1em 1.4em; font-size: 1.1rem; }
@media (max-width: 900px) {
    .download { grid-template-columns: 1fr; gap: 40px; }
    .download-card { position: static; }
    .download-card:not(.is-form) { order: -1; }
}

/* ---------- Stopka ---------- */
.site-footer { background: var(--hero-bg); color: var(--hero-muted); padding: 48px 0 24px; font-size: .95rem; }
.site-footer a { color: var(--hero-text); text-decoration: none; }
.site-footer a:hover { color: var(--hero-accent); }
.footer-inner { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; }
.footer-bottom { position: relative; }
.footer-bottom::before { content: ""; position: absolute; top: 0; left: 20px; right: 20px; border-top: 1px solid rgba(255, 255, 255, .1); }
.footer-name { color: #fff; font-weight: 700; font-size: 1.1rem; margin-bottom: .2em; }
.footer-tagline { margin: 0; }
.footer-contact { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-contact a { display: inline-flex; align-items: center; gap: 10px; }
.footer-bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 20px; }

/* ---------- Druk ---------- */
@media print {
    .site-header, .site-footer, .hero-waves, .cta-band, .contact-form { display: none; }
    .hero, .page-hero { background: none; color: #000; }
    .hero h1, .page-hero h1 { color: #000; }
}
