/* System wizualny w rodzinie Typer Academy */
:root {
  --brand: #43636D;
  --brand-dark: #2E4750;
  --brand-light: #9FB4BB;
  --brand-bg: #EBF0F1;
  --ink: #15171A;
  --ink-soft: #34373C;
  --mute: #83878D;
  --line: #E2E2E0;
  --paper: #F7F7F6;
  --raised: #FFFFFF;
  --green: #1F8A54;
  --green-bg: #E9F6EE;
  --red: #C6362E;
  --red-bg: #FBEAE9;
  --gold: #B8893B;
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 4px 24px rgba(21, 23, 26, .06);
  --shadow-raised: 0 16px 48px rgba(21, 23, 26, .12);
  --ease: cubic-bezier(.16, 1, .3, 1);
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Jost', Inter, -apple-system, system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; }
a { color: var(--brand); }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; line-height: 1.12; margin: 0; }
h1 { font-size: clamp(40px, 6vw, 64px); }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 22px; }
h1 em, h2 em { font-style: normal; color: var(--brand); }
p { margin: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.eyebrow { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--brand); margin-bottom: 16px; display: block; }
.lead { font-size: 18px; color: var(--ink-soft); max-width: 560px; }
.mute { color: var(--mute); }
.small { font-size: 14px; }

/* ---------- nawigacja ---------- */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(247, 247, 246, .82); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s var(--ease); }
.nav.scrolled { border-color: var(--line); }
.nav .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo img { display: block; width: auto; transition: opacity .25s; }
.logo:hover img { opacity: .8; }
.logo-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--brand); display: grid; place-items: center; color: #fff; }
.logo-text { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: .02em; }
.logo-text small { display: block; font-family: var(--sans); font-size: 9px; letter-spacing: .3em; color: var(--mute); font-weight: 500; margin-top: -2px; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { color: var(--ink); text-decoration: none; font-size: 14px; font-weight: 500; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -4px; height: 1.5px; background: var(--brand); transition: right .35s var(--ease); }
.nav-links a:hover::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 12px; }
.nav-actions .link { font-size: 14px; font-weight: 600; color: var(--brand); text-decoration: none; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ---------- przyciski ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 28px; border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), color .25s var(--ease); white-space: nowrap; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); box-shadow: 0 10px 28px rgba(67, 99, 109, .32); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-white { background: #fff; color: var(--ink); }
.btn-sm { padding: 9px 18px; font-size: 13px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }

/* ---------- sekcje i karty ---------- */
.section { padding: 112px 0; }
.section.tint { background: var(--brand-bg); }
.section-head { max-width: 680px; margin-bottom: 56px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head p { margin-top: 16px; color: var(--ink-soft); font-size: 18px; }
.card { background: var(--raised); border-radius: var(--radius-lg); padding: 32px; border: 1px solid var(--line); box-shadow: var(--shadow-soft); transition: transform .4s var(--ease), box-shadow .4s var(--ease); }
.card.hover:hover { transform: translateY(-6px); box-shadow: var(--shadow-raised); }
.grid { display: grid; gap: 24px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } .section { padding: 72px 0; } .card { padding: 24px; } }

.icon { width: 48px; height: 48px; border-radius: 14px; background: var(--brand-bg); color: var(--brand); display: grid; place-items: center; margin-bottom: 20px; }
.icon svg { width: 24px; height: 24px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--brand-bg); color: var(--brand); }
.pill.green { background: var(--green-bg); color: var(--green); }
.pill.gold { background: #F6EEDF; color: var(--gold); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); display: inline-block; box-shadow: 0 0 0 4px var(--green-bg); }

/* ---------- formularze ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink-soft); }
.input { width: 100%; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); background: #fff; font: 400 16px var(--sans); color: var(--ink); transition: border-color .2s, box-shadow .2s; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(67, 99, 109, .14); }
.field { margin-bottom: 16px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--ink-soft); font-weight: 400; }
.check input { margin-top: 3px; accent-color: var(--brand); }
.search { display: flex; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 6px 6px 22px; box-shadow: var(--shadow-soft); transition: box-shadow .3s var(--ease), border-color .3s; }
.search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 5px rgba(67, 99, 109, .12), var(--shadow-soft); }
.search input { flex: 1; border: 0; outline: 0; font: 400 16px var(--sans); background: transparent; min-width: 0; }

/* ---------- animacje ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.stagger > * { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.stagger.in > * { opacity: 1; transform: none; }
.stagger.in > *:nth-child(2) { transition-delay: .08s; }
.stagger.in > *:nth-child(3) { transition-delay: .16s; }
.stagger.in > *:nth-child(4) { transition-delay: .24s; }
.stagger.in > *:nth-child(5) { transition-delay: .32s; }
.stagger.in > *:nth-child(6) { transition-delay: .40s; }
.stagger.in > *:nth-child(7) { transition-delay: .48s; }
.stagger.in > *:nth-child(8) { transition-delay: .56s; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(31, 138, 84, .45); } 100% { box-shadow: 0 0 0 12px rgba(31, 138, 84, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .reveal, .stagger > * { opacity: 1; transform: none; transition: none; } * { animation: none !important; } }

/* ---------- modal i powiadomienia ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(21, 23, 26, .45); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.modal.open { opacity: 1; pointer-events: auto; }
.modal .card { width: 100%; max-width: 460px; transform: translateY(20px) scale(.98); transition: transform .45s var(--ease); position: relative; }
.modal.open .card { transform: none; }
.modal .close { position: absolute; top: 16px; right: 16px; background: var(--paper); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 18px; color: var(--mute); }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 14px 22px; border-radius: 999px; font-size: 14px; opacity: 0; transition: all .4s var(--ease); z-index: 200; pointer-events: none; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { width: 18px; height: 18px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }

/* ---------- stopka ---------- */
.footer { background: var(--ink); color: #c9ccd0; padding: 72px 0 40px; font-size: 14px; }
.footer a { color: #c9ccd0; text-decoration: none; }
.footer a:hover { color: #fff; }
.footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 40px; margin-bottom: 48px; }
.footer h4 { color: #fff; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
.footer ul { list-style: none; padding: 0; margin: 0; line-height: 2.1; }
.footer .logo-text { color: #fff; }
.footer .bottom { border-top: 1px solid #2c2f34; padding-top: 24px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; color: var(--mute); }
@media (max-width: 760px) { .footer .cols { grid-template-columns: 1fr 1fr; } }

/* ---------- tabele (panele) ---------- */
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-weight: 600; color: var(--mute); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line); }
.table td { padding: 14px 12px 14px 0; border-bottom: 1px solid var(--line); }
.table tr:last-child td { border-bottom: 0; }
.stat .num { font-family: var(--serif); font-size: 36px; color: var(--brand); line-height: 1.1; }
.stat .lbl { font-size: 13px; color: var(--mute); margin-top: 4px; }
code, pre { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 13px; }
pre { background: var(--ink); color: #e8eaed; padding: 20px; border-radius: var(--radius-md); overflow-x: auto; line-height: 1.6; margin: 0; }
.copy pre { white-space: pre-wrap; word-break: break-all; padding-right: 96px; }

/* liczby w cenach i statystykach - cyfry tabelaryczne zamiast nautycznych */
.price, .stat .num, .hero-stats .num, .om-price b, .num { font-variant-numeric: lining-nums tabular-nums; }

/* prosty układ podstron */
.page { padding: 64px 0 112px; min-height: 70vh; }
.page-narrow { max-width: 560px; margin: 0 auto; }
.page-head { margin-bottom: 40px; }
.page-head h1 { font-size: clamp(34px, 4.5vw, 48px); margin-top: 4px; }
.status-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 20px; background: var(--brand-bg); color: var(--brand); }
.status-icon.ok { background: var(--green-bg); color: var(--green); }
.status-icon.err { background: var(--red-bg); color: var(--red); }
.bar { height: 8px; background: var(--brand-bg); border-radius: 99px; overflow: hidden; margin: 22px 0 10px; }
.bar span { display: block; height: 100%; width: 4%; background: linear-gradient(90deg, var(--brand), var(--brand-light)); border-radius: 99px; transition: width .6s var(--ease); }
.list-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.list-files a { display: block; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); font-size: 14px; transition: border-color .2s, transform .25s var(--ease); }
.list-files a:hover { border-color: var(--brand); transform: translateY(-2px); }
.tabs { display: flex; gap: 6px; background: var(--raised); border: 1px solid var(--line); padding: 5px; border-radius: 999px; width: fit-content; margin-bottom: 28px; flex-wrap: wrap; }
.tabs button { border: 0; background: transparent; padding: 10px 18px; border-radius: 999px; font: 600 14px var(--sans); color: var(--ink-soft); cursor: pointer; transition: background .25s var(--ease), color .25s; }
.tabs button.active { background: var(--brand); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* formularz danych do faktury */
.seg { display: flex; gap: 6px; background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 4px; margin-bottom: 16px; }
.seg label { flex: 1; margin: 0; text-align: center; padding: 9px 12px; border-radius: 999px; cursor: pointer; font-size: 14px; color: var(--ink-soft); transition: background .25s var(--ease), color .25s; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--brand); color: #fff; }
.b-row { display: grid; grid-template-columns: 130px 1fr; gap: 12px; }
.modal .card { max-height: calc(100vh - 32px); overflow-y: auto; }
.invoice-note { font-size: 12px; color: var(--mute); margin: -4px 0 14px; }
