/* NEW PROJECT - Andrzej Brzeziński. Strona zbiorcza portali prawnych.
   Formatka przeniesiona z portali (academy.claude.com): cieply grafit z siatka
   kropek, ocieplona biel, glinkowy akcent, lekkie szeryfowe naglowki (Fraunces),
   tekst Inter, male zaokraglenia. Motyw jasny/ciemny/systemowy bez mrugania.
   Kroje pisma na wlasnym serwerze; strict CSP bez zewnetrznych zaleznosci. */

/* ===== Kroje pisma ===== */
@font-face {
    font-family: 'Fraunces'; font-style: normal; font-weight: 300 500; font-display: swap;
    src: url('fonts/fraunces-latin-ext-v1.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Fraunces'; font-style: normal; font-weight: 300 500; font-display: swap;
    src: url('fonts/fraunces-latin-v1.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url('fonts/inter-latin-ext-v1.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 100 900; font-display: swap;
    src: url('fonts/inter-latin-v1.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ===== Tokeny (jasny to baza; ciemny dokladany) ===== */
:root {
    --bg:#f4f3ed; --surface:#ffffff; --surface-2:#faf9f3;
    --text:#262625; --text-2:#6b6a62; --text-3:#9c9a90;
    --line:#e5e3dc; --line-2:#eceae3;
    --clay:#bd5b39; --mineral:#4f7d6d; --plum:#6d68a4;
    --clay-tlo:#f6e9e2;
    --btn-bg:#b0512f; --btn-tekst:#ffffff;
    --dot:rgba(0,0,0,.045);
    --cien:0 1px 2px #0000000a, 0 12px 26px -16px #0000002e;
    --cien-moc:0 2px 6px #00000012, 0 26px 52px -20px #0000003a;
    --serif:'Fraunces', Georgia, 'Times New Roman', serif;
    --sans:'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --mono:ui-monospace, 'Cascadia Code', 'SF Mono', Consolas, monospace;
    --r:6px; --r-2:10px;
}
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg:#262625; --surface:#2d2d2b; --surface-2:#34332e;
        --text:#f2f0e9; --text-2:#c3c0b6; --text-3:#8a887e;
        --line:rgba(255,255,255,.12); --line-2:rgba(255,255,255,.06);
        --clay:#e08a68; --mineral:#7bb0a0; --plum:#a9a4de;
        --clay-tlo:#3a2a22;
        --btn-bg:#e08a68; --btn-tekst:#2a1a12;
        --dot:rgba(255,255,255,.05);
        --cien:0 1px 2px #0000000d, 0 10px 24px -14px #00000073;
        --cien-moc:0 2px 6px #00000026, 0 26px 54px -18px #000000a6;
    }
}
:root[data-theme="dark"] {
    --bg:#262625; --surface:#2d2d2b; --surface-2:#34332e;
    --text:#f2f0e9; --text-2:#c3c0b6; --text-3:#8a887e;
    --line:rgba(255,255,255,.12); --line-2:rgba(255,255,255,.06);
    --clay:#e08a68; --mineral:#7bb0a0; --plum:#a9a4de;
    --clay-tlo:#3a2a22;
    --btn-bg:#e08a68; --btn-tekst:#2a1a12;
    --dot:rgba(255,255,255,.05);
    --cien:0 1px 2px #0000000d, 0 10px 24px -14px #00000073;
    --cien-moc:0 2px 6px #00000026, 0 26px 54px -18px #000000a6;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    background: var(--bg);
    background-image: radial-gradient(var(--dot) 1px, transparent 1px);
    background-size: 22px 22px;
    color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.6;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
.kontener { max-width: 1040px; margin: 0 auto; padding: 0 24px; }
a { color: var(--clay); }
img, svg { max-width: 100%; }
:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; border-radius: var(--r); }
::selection { background: var(--clay); color: #fff; }

.do-tresci { position: absolute; left: -9999px; top: 0; z-index: 999; background: var(--clay); color: #fff; padding: .7rem 1.1rem; border-radius: 0 0 var(--r) 0; font-weight: 600; text-decoration: none; }
.do-tresci:focus { left: 0; }

/* ===== Gora: marka + przelacznik motywu ===== */
.gora { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0 0; }
.marka { font-family: var(--mono); font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: var(--text-2); text-decoration: none; }
.marka b { color: var(--text); font-weight: 600; }
.motyw { display: inline-flex; gap: 2px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); flex: 0 0 auto; }
.motyw button { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 999px; background: transparent; color: var(--text-3); cursor: pointer; transition: color .15s, background-color .15s; }
.motyw button:hover { color: var(--text-2); }
.motyw button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.motyw svg { width: 16px; height: 16px; }
.gora-narzedzia { display: flex; align-items: center; gap: 8px; }
.jezyk button { width: auto; min-width: 34px; height: 34px; padding: 0 10px; font-family: var(--mono); font-size: .72rem; letter-spacing: .06em; }

/* ===== Hero ===== */
.hero { padding: clamp(.7rem, 1.75vw, 1.2rem) 0 clamp(2.4rem, 5vw, 3.6rem); }
.hero-etykieta { font-family: var(--mono); font-size: .74rem; letter-spacing: .12em; text-transform: uppercase; color: var(--clay); display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1.4rem; }
.hero-etykieta::before { content: ""; width: 22px; height: 1px; background: var(--clay); display: inline-block; }
.hero h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.5rem, 6.2vw, 4.2rem); line-height: 1.06; letter-spacing: -.02em; color: var(--text); max-width: 18ch; }
.hero h1 .akc { color: var(--clay); font-style: italic; }
.hero-lead { font-family: var(--serif); font-weight: 300; font-size: clamp(1.1rem, 2.4vw, 1.44rem); line-height: 1.5; color: var(--text-2); margin-top: 1.3rem; max-width: none; }
.hero-akcje { margin-top: 2.1rem; display: flex; flex-wrap: wrap; gap: .7rem; }
.btn { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; font-family: var(--sans); font-weight: 600; font-size: .95rem; padding: .8rem 1.3rem; border-radius: var(--r); min-height: 46px; transition: transform .15s ease, background-color .18s, border-color .18s, color .18s; }
.btn svg { width: 17px; height: 17px; }
.btn:hover { transform: translateY(-1px); }
.btn-glowny { background: var(--btn-bg); color: var(--btn-tekst); }
.btn-glowny:hover { filter: brightness(1.06); }
.btn-kontur { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-kontur:hover { border-color: var(--text-3); }
.hero-liczby { margin-top: 2.6rem; display: flex; flex-wrap: wrap; gap: 1.4rem 2.6rem; }
.hero-liczba { display: flex; flex-direction: column; gap: .1rem; }
.hero-liczba b { font-family: var(--serif); font-weight: 400; font-size: 1.7rem; color: var(--text); line-height: 1.1; }
.hero-liczba span { font-family: var(--mono); font-size: .72rem; letter-spacing: .04em; color: var(--text-3); }

/* ===== Zegar analogowy (jak w launcherze), gora na wysokosci tytulu H1 ===== */
.hero { position: relative; }
.zegar-blok { position: absolute; right: 0; top: clamp(2.5rem, 6.3vw, 3.8rem); }
.zegar { width: clamp(122px, 14vw, 180px); height: clamp(122px, 14vw, 180px); }
.zegar svg { display: block; width: 100%; height: 100%; overflow: visible; }
@media (max-width: 860px) { .zegar-blok { display: none; } }

/* ===== Sekcje ===== */
section { padding: clamp(2.6rem, 5vw, 4rem) 0; }
.sekcja-glowa { display: flex; align-items: baseline; gap: 14px; padding-bottom: 14px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.sekcja-glowa .kropka { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; align-self: center; background: var(--clay); }
.sekcja-glowa .kropka.clay { background: var(--clay); }
.sekcja-glowa .kropka.mineral { background: var(--mineral); }
.sekcja-glowa .kropka.plum { background: var(--plum); }
.sekcja-glowa h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.01em; color: var(--text); }
.sekcja-glowa .liczba { font-family: var(--mono); font-size: .76rem; color: var(--text-3); margin-left: auto; white-space: nowrap; }
.sekcja-opis { color: var(--text-2); font-size: 1rem; max-width: none; margin: -8px 0 26px; }

/* ===== Siatka kafli portali ===== */
.siatka-kafli { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; --akc: var(--clay); }
.kafel.jakosc { --akc: var(--mineral); }
@media (max-width: 660px) { .siatka-kafli { grid-template-columns: 1fr; } }
.kafel {
    position: relative; display: flex; flex-direction: column; gap: 12px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    padding: 22px 22px 20px; text-decoration: none; color: inherit; box-shadow: var(--cien);
    transition: transform .16s cubic-bezier(0,0,.2,1), border-color .16s, background-color .16s, box-shadow .16s;
}
.kafel::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--akc, var(--clay)); opacity: 0; transition: opacity .16s; border-top-left-radius: var(--r); border-bottom-left-radius: var(--r); }
.kafel:hover, .kafel:focus-visible { transform: translateY(-3px); border-color: color-mix(in srgb, var(--akc, var(--clay)) 55%, var(--line)); background: var(--surface-2); box-shadow: var(--cien-moc); outline: none; }
.kafel:hover::before, .kafel:focus-visible::before { opacity: 1; }
.kafel-gora { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kafel-ikona { width: 46px; height: 46px; flex: 0 0 46px; border-radius: var(--r); background: var(--clay-tlo); color: var(--akc, var(--clay)); display: inline-flex; align-items: center; justify-content: center; }
.kafel-ikona svg { width: 24px; height: 24px; }
.kafel-plakietka { font-family: var(--mono); font-size: .66rem; letter-spacing: .06em; text-transform: uppercase; color: var(--akc, var(--clay)); border: 1px solid color-mix(in srgb, var(--akc, var(--clay)) 40%, transparent); padding: .28rem .55rem; border-radius: 999px; white-space: nowrap; }
.kafel h3 { font-family: var(--sans); font-weight: 600; font-size: 1.14rem; letter-spacing: -.01em; color: var(--text); line-height: 1.3; }
.kafel p { color: var(--text-2); font-size: .9rem; line-height: 1.5; }
.kafel-wejdz { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: .4rem; font-family: var(--mono); font-size: .74rem; letter-spacing: .04em; text-transform: uppercase; color: var(--akc, var(--clay)); }
.kafel-wejdz svg { width: 15px; height: 15px; transition: transform .16s ease; }
.kafel:hover .kafel-wejdz svg, .kafel:focus-visible .kafel-wejdz svg { transform: translate(3px, -3px); }

/* ===== Dlaczego tu ===== */
.pas-siatka { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.pas-poz { display: flex; gap: 14px; align-items: flex-start; }
.pas-poz .ikona { width: 40px; height: 40px; flex: 0 0 40px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); color: var(--mineral); display: inline-flex; align-items: center; justify-content: center; }
.pas-poz .ikona svg { width: 21px; height: 21px; }
.pas-poz h3 { font-family: var(--sans); font-weight: 600; font-size: 1.02rem; color: var(--text); margin-bottom: .25rem; }
.pas-poz p { font-size: .92rem; color: var(--text-2); line-height: 1.55; }

/* ===== Kontakt ===== */
.kontakt-karta { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-2); padding: clamp(1.8rem, 4vw, 2.8rem); box-shadow: var(--cien); }
.kontakt-karta h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(1.5rem, 3vw, 2rem); color: var(--text); letter-spacing: -.01em; }
.kontakt-karta p { color: var(--text-2); margin-top: .7rem; max-width: 56ch; }
.kontakt-akcje { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .7rem; }

/* ===== Stopka ===== */
footer { margin-top: 1rem; padding: 2.2rem 0 3rem; border-top: 1px solid var(--line); }
.stopka-tresc { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.stopka-tresc p { font-size: .82rem; color: var(--text-3); }
.stopka-linki { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.stopka-linki a { font-size: .82rem; color: var(--text-2); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.stopka-linki a:hover { color: var(--text); border-color: var(--text-3); }

/* ===== Strona 404 ===== */
.blad { min-height: 74vh; display: flex; align-items: center; }
.blad-kod { font-family: var(--mono); font-size: .8rem; letter-spacing: .18em; text-transform: uppercase; color: var(--clay); margin-bottom: 1rem; }
.blad h1 { font-family: var(--serif); font-weight: 300; font-size: clamp(2.4rem, 6vw, 3.6rem); letter-spacing: -.02em; color: var(--text); line-height: 1.06; }
.blad p { font-family: var(--serif); font-weight: 300; color: var(--text-2); max-width: 46ch; margin: 1rem 0 1.8rem; font-size: 1.2rem; line-height: 1.5; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; scroll-behavior: auto !important; }
    .kafel:hover, .btn:hover { transform: none; }
}
