/* =====================================================================
   BLANDS — system designu
   Ciemny grafit, jasna typografia, dwa akcenty dziedzinowe:
   --logi (fiolet) = logistyka, --code (zieleń marki) = programowanie.
   ===================================================================== */
:root {
    --bg: #0a0b0b;
    --bg-2: #0f1111;
    --surface: #141716;
    --surface-2: #1a1e1c;
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .16);
    --text: #eef1ef;
    --muted: #9aa39e;
    --dim: #6b736f;
    --code: #03e86a;
    --code-soft: rgba(3, 232, 106, .12);
    --logi: #8b7cff;
    --logi-soft: rgba(139, 124, 255, .12);
    --danger: #ff6b6b;
    --radius: 14px;
    --radius-sm: 9px;
    --container: 1200px;
    --ease: cubic-bezier(.2, .8, .2, 1);
    --font-display: 'Space Grotesk', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

@view-transition { navigation: auto; }
::view-transition-old(root) { animation: vt-out .28s var(--ease) both; }
::view-transition-new(root) { animation: vt-in .45s var(--ease) both; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font: 400 16px/1.65 var(--font-body);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--code); color: #04130a; }
:focus-visible { outline: 2px solid var(--code); outline-offset: 3px; border-radius: 4px; }
.container { width: min(calc(100% - 48px), var(--container)); margin-inline: auto; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: -60px; left: 16px; z-index: 200; padding: 10px 16px; background: var(--code); color: #04130a; border-radius: 8px; font-weight: 600; transition: top .2s; }
.skip-link:focus { top: 16px; }

/* Ziarno + poświata tła */
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background:
        radial-gradient(60rem 40rem at 85% -10%, rgba(3, 232, 106, .07), transparent 60%),
        radial-gradient(50rem 35rem at -10% 20%, rgba(139, 124, 255, .05), transparent 60%);
}
body::after {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Typografia ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; letter-spacing: -.035em; line-height: 1.05; }
h1 { font-size: clamp(44px, 7.2vw, 104px); }
h2 { font-size: clamp(34px, 4.6vw, 64px); }
h3 { font-size: clamp(20px, 1.8vw, 24px); letter-spacing: -.02em; line-height: 1.2; }
p { color: var(--muted); }
.lead { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.7; max-width: 640px; }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: .04em; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 12px/1 var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.eyebrow::before { content: ''; width: 22px; height: 1px; background: currentColor; opacity: .6; }
.eyebrow--logi { color: var(--logi); }
.eyebrow--code { color: var(--code); }
.t-logi { color: var(--logi); }
.t-code { color: var(--code); }
.grad-text { background: linear-gradient(100deg, var(--text) 30%, #8c958f); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Nagłówek / nawigacja ---------- */
.site-header { position: fixed; inset: 0 0 auto; z-index: 100; transition: background .35s, border-color .35s, transform .4s var(--ease); border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgba(10, 11, 11, .78); backdrop-filter: blur(16px) saturate(1.4); border-color: var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--font-display); letter-spacing: .12em; }
.logo-mark { width: 32px; height: 32px; border-radius: 8px; background: url(/assets/img/logo-b.svg) center / cover; transition: transform .5s var(--ease), filter .5s; }
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.08); filter: drop-shadow(0 0 10px rgba(3, 232, 106, .45)); }
.nav-menu { display: flex; align-items: center; gap: 8px; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-links a { position: relative; display: block; padding: 9px 14px; font-size: 14px; color: var(--muted); border-radius: 8px; transition: color .2s; }
.nav-links a::after { content: ''; position: absolute; left: 14px; right: 14px; bottom: 4px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .35s var(--ease); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a:hover::after, .nav-links a[aria-current="page"]::after { transform: scaleX(1); }
.nav-links a[data-domain="logi"][aria-current="page"] { color: var(--logi); }
.nav-links a[data-domain="code"][aria-current="page"] { color: var(--code); }
.nav-cta { margin-left: 8px; }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line-strong); border-radius: 10px; background: transparent; cursor: pointer; position: relative; }
.nav-toggle span { position: absolute; left: 12px; right: 12px; height: 1.5px; background: var(--text); transition: transform .35s var(--ease), opacity .2s; }
.nav-toggle span:nth-child(1) { top: 16px; } .nav-toggle span:nth-child(2) { top: 21px; } .nav-toggle span:nth-child(3) { top: 26px; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(5px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-5px) rotate(-45deg); }

/* ---------- Przyciski ---------- */
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--line-strong); background: transparent; font: 500 14px/1 var(--font-body); cursor: pointer; overflow: hidden; isolation: isolate; transition: transform .3s var(--ease), border-color .3s, color .3s, background .3s; }
.btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 255, 255, .14), transparent 70%); opacity: 0; transition: opacity .3s; }
.btn:hover::before { opacity: 1; }
.btn:hover { transform: translateY(-2px); border-color: rgba(255, 255, 255, .3); }
.btn:active { transform: translateY(0) scale(.98); }
.btn .arrow { transition: transform .35s var(--ease); }
.btn:hover .arrow { transform: translateX(4px); }
.btn--primary { background: var(--text); color: #0a0b0b; border-color: var(--text); }
.btn--primary:hover { border-color: #fff; background: #fff; }
.btn--primary::before { background: radial-gradient(120px circle at var(--mx, 50%) var(--my, 50%), rgba(0, 0, 0, .1), transparent 70%); }
.btn--logi { border-color: rgba(139, 124, 255, .45); color: var(--logi); }
.btn--logi:hover { background: var(--logi-soft); border-color: var(--logi); }
.btn--code { border-color: rgba(3, 232, 106, .45); color: var(--code); }
.btn--code:hover { background: var(--code-soft); border-color: var(--code); }
.btn--sm { min-height: 38px; padding: 0 14px; font-size: 13px; border-radius: 8px; }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* ---------- Sekcje ---------- */
main { display: block; }
.section { position: relative; padding-block: clamp(90px, 12vw, 160px); }
.section-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .8fr); gap: 40px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 80px); }
.section-head h2 { margin-top: 18px; }
.section-head > p { padding-bottom: 6px; }
.divider { height: 1px; background: linear-gradient(90deg, transparent, var(--line-strong), transparent); }
.page-hero { padding: clamp(150px, 18vw, 220px) 0 clamp(60px, 8vw, 100px); position: relative; overflow: hidden; }
.page-hero h1 { font-size: clamp(42px, 6.4vw, 88px); max-width: 15ch; margin-top: 22px; }
.page-hero .lead { margin-top: 26px; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font: 500 12px/1 var(--font-mono); color: var(--dim); letter-spacing: .06em; }
.breadcrumbs a:hover { color: var(--text); }
.breadcrumbs span[aria-hidden] { opacity: .5; }

/* ---------- Karty ---------- */
.card { position: relative; display: flex; flex-direction: column; padding: 28px; background: linear-gradient(180deg, var(--surface), var(--bg-2)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; isolation: isolate; transition: transform .45s var(--ease), border-color .35s; }
.card::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), var(--glow, rgba(255, 255, 255, .06)), transparent 65%); }
.card:hover { transform: translateY(-4px); border-color: var(--line-strong); }
.card:hover::before { opacity: 1; }
.card[data-domain="logi"] { --glow: rgba(139, 124, 255, .11); }
.card[data-domain="code"] { --glow: rgba(3, 232, 106, .1); }
.card-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 11px; border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .02); margin-bottom: 26px; transition: transform .5s var(--ease), border-color .3s; }
.card-icon svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.card[data-domain="logi"] .card-icon { color: var(--logi); }
.card[data-domain="code"] .card-icon { color: var(--code); }
.card:hover .card-icon { transform: translateY(-3px) rotate(-6deg); border-color: currentColor; }
.card h3 { margin-bottom: 10px; }
.card p { font-size: 15px; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 26px; }
.card-link { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; }
.card-link .arrow { transition: transform .35s var(--ease); }
.card:hover .card-link .arrow { transform: translateX(4px); }
.card-cover { position: absolute; inset: 0; z-index: 1; }
.card a, .card button { position: relative; z-index: 2; }
.badge { display: inline-flex; align-items: center; gap: 7px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line-strong); font: 500 11px/1 var(--font-mono); letter-spacing: .04em; color: var(--muted); white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge--live { color: var(--code); border-color: rgba(3, 232, 106, .35); }
.badge--live::before { box-shadow: 0 0 0 0 rgba(3, 232, 106, .6); animation: pulse 2.2s infinite; }
.badge--wip { color: var(--logi); border-color: rgba(139, 124, 255, .35); }
.badge--planned { color: var(--dim); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.tag { padding: 4px 9px; border-radius: 6px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); font: 500 11px/1.4 var(--font-mono); color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- Filtry ---------- */
.filters { position: relative; display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; margin-bottom: 32px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg-2); }
.filter { position: relative; z-index: 1; padding: 9px 16px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; transition: color .25s; }
.filter:hover { color: var(--text); }
.filter.is-active { color: #0a0b0b; }
.filter-pill { position: absolute; z-index: 0; top: 5px; height: calc(100% - 10px); border-radius: 8px; background: var(--text); transition: transform .45s var(--ease), width .45s var(--ease); }
.is-filtered-out { display: none !important; }
.filter-enter { animation: fade-up .5s var(--ease) both; }

/* ---------- Formularze ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field label, .field .label { font-size: 13px; color: var(--muted); }
.input { width: 100%; min-height: 50px; padding: 13px 15px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--bg-2); transition: border-color .25s, box-shadow .25s, background .25s; }
.input::placeholder { color: var(--dim); }
.input:hover { border-color: rgba(255, 255, 255, .26); }
.input:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); background: var(--surface); }
textarea.input { min-height: 160px; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
.field.has-error .input { border-color: var(--danger); }
.field-error { min-height: 18px; font-size: 13px; color: var(--danger); }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--muted); font-size: 14px; cursor: pointer; transition: all .25s; }
.segmented input:checked + label { color: var(--text); border-color: var(--text); background: rgba(255, 255, 255, .05); }
.segmented input:focus-visible + label { outline: 2px solid var(--code); outline-offset: 2px; }
.form-status { display: none; padding: 16px 18px; border-radius: 10px; border: 1px solid; font-size: 15px; }
.form-status.is-visible { display: block; animation: fade-up .5s var(--ease); }
.form-status--ok { color: var(--code); border-color: rgba(3, 232, 106, .35); background: var(--code-soft); }
.form-status--err { color: var(--danger); border-color: rgba(255, 107, 107, .35); background: rgba(255, 107, 107, .08); }

/* ---------- Footer ---------- */
.site-footer { position: relative; border-top: 1px solid var(--line); padding: 80px 0 36px; margin-top: 40px; overflow: hidden; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 40px; }
.footer-grid h4 { font: 500 12px/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--dim); margin-bottom: 18px; }
.footer-grid ul { list-style: none; display: grid; gap: 10px; }
.footer-grid a { color: var(--muted); font-size: 14px; transition: color .2s; }
.footer-grid a:hover { color: var(--text); }
.footer-brand p { margin-top: 16px; max-width: 320px; font-size: 14px; }
.footer-word { margin-top: 70px; font: 700 clamp(70px, 19vw, 280px)/.8 var(--font-display); letter-spacing: -.06em; color: transparent; -webkit-text-stroke: 1px rgba(255, 255, 255, .07); user-select: none; white-space: nowrap; text-align: center; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); font-size: 13px; color: var(--dim); }

/* ---------- Animacje wejścia ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.reveal.is-in { opacity: 1; transform: none; }
.split .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .08em; }
.split .w > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); transition-delay: calc(var(--i) * 55ms + var(--d, 0s)); }
.split.is-in .w > span { transform: none; }
.line-grow { transform: scaleX(0); transform-origin: left; transition: transform 1.2s var(--ease); }
.line-grow.is-in { transform: scaleX(1); }
.parallax { will-change: transform; }

/* ---------- Strona: wejście ---------- */
.page-enter { animation: page-in .7s var(--ease) both; }

@keyframes vt-out { to { opacity: 0; transform: translateY(-8px); } }
@keyframes vt-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes page-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(3, 232, 106, .55); } 70% { box-shadow: 0 0 0 7px rgba(3, 232, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(3, 232, 106, 0); } }
@keyframes mark-slide { 50% { transform: translateX(120%); } 51% { transform: translateX(-120%); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift { 50% { transform: translate3d(0, -14px, 0); } }

/* ---------- Responsywność ---------- */
@media (max-width: 1080px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
    .nav-toggle { display: block; z-index: 2; }
    .nav-menu { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: center; gap: 28px; padding: 100px 28px 40px; background: rgba(10, 11, 11, .97); backdrop-filter: blur(20px); opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s; }
    .nav-open .nav-menu { opacity: 1; visibility: visible; }
    .nav-links { flex-direction: column; align-items: flex-start; gap: 4px; }
    .nav-links a { font: 600 34px/1.1 var(--font-display); letter-spacing: -.03em; padding: 8px 0; color: var(--text); opacity: 0; transform: translateY(16px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
    .nav-links a::after { display: none; }
    .nav-open .nav-links a { opacity: 1; transform: none; }
    .nav-open .nav-links li:nth-child(2) a { transition-delay: .05s; } .nav-open .nav-links li:nth-child(3) a { transition-delay: .1s; }
    .nav-open .nav-links li:nth-child(4) a { transition-delay: .15s; } .nav-open .nav-links li:nth-child(5) a { transition-delay: .2s; }
    .nav-cta { margin: 0; align-self: flex-start; }
    body.nav-open { overflow: hidden; }
    .section-head { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 640px) {
    .container { width: min(calc(100% - 32px), var(--container)); }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 32px; }
    .card { padding: 24px; }
    .btn { width: 100%; }
    .filters { display: flex; overflow-x: auto; flex-wrap: nowrap; width: 100%; scrollbar-width: none; }
    .segmented { grid-template-columns: 1fr; }
}
@media (hover: none) { .card:hover { transform: none; } }
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
    .reveal, .split .w > span { opacity: 1; transform: none; }
}
