/* Shared look of the inner pages (dziedziny i projekty): the same grid, header,
   cursor and page fade as the home page. */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { background: #ffffff; color: #000000; -ms-overflow-style: none; scrollbar-width: none; }
body { font-family: 'DM Sans', sans-serif; overflow-x: hidden; cursor: none; }
* { cursor: none !important; }
::-webkit-scrollbar { display: none; width: 0; }
a { color: inherit; }
img { display: block; max-width: 100%; }

:root { --line: rgba(0, 0, 0, 0.10); --dot: rgba(0, 0, 0, 0.30); --ease: cubic-bezier(0.25, 1, 0.5, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1); }

/* --- page fade --- */
.veil { position: fixed; inset: 0; z-index: 50; background: #ffffff; pointer-events: none; transition: opacity 0.9s var(--ease); }
body.ready .veil { opacity: 0; }
body.leaving .veil { opacity: 1; transition-duration: 0.45s; }

/* --- cursor, plus the "Zobacz projekt" bubble over project images --- */
.cursor-inner, .cursor-outer { position: fixed; top: 0; left: 0; border-radius: 50%; transform: translate(-50%, -50%); pointer-events: none; mix-blend-mode: difference; }
.cursor-inner { width: 6px; height: 6px; border: 2px solid #ffffff; z-index: 9999; }
.cursor-outer { width: 40px; height: 40px; border: 1.5px solid rgba(255, 255, 255, 0.8); z-index: 9998; transition: width 0.3s, height 0.3s, opacity 0.3s; }
.cursor-inner { transition: opacity 0.3s; }
body.hovering .cursor-outer { width: 64px; height: 64px; }
.cursor-label { position: fixed; top: 0; left: 0; z-index: 9997; width: 116px; height: 116px; padding: 0 22px; border-radius: 50%; background: #000000; color: #ffffff; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; line-height: 1.3; letter-spacing: 1.2px; text-transform: uppercase; pointer-events: none; transform: translate(-50%, -50%) scale(0); transition: transform 0.45s var(--ease); }
body.cursor-view .cursor-label { transform: translate(-50%, -50%) scale(1); }
body.cursor-view .cursor-outer, body.cursor-view .cursor-inner { opacity: 0; }

/* --- grid: 5 vertical lines, one under the header, drifting dots --- */
.grid-horizontal-line { position: fixed; top: 70px; left: 0; right: 0; height: 1px; background: var(--line); z-index: 15; pointer-events: none; transform: scaleX(0); transform-origin: left; transition: transform 1.4s var(--ease-out) 0.1s; }
.grid-lines { position: fixed; top: 0; left: 40px; right: 40px; height: 100vh; display: flex; justify-content: space-between; z-index: 5; pointer-events: none; }
.grid-line { position: relative; width: 1px; height: 100%; background: var(--line); transform: scaleY(0); transform-origin: top; transition: transform 1.6s var(--ease-out); }
.grid-line:nth-child(3) { margin-top: 70px; height: calc(100vh - 70px); }
.grid-line:nth-child(2) { transition-delay: 0.08s; }
.grid-line:nth-child(3) { transition-delay: 0.16s; }
.grid-line:nth-child(4) { transition-delay: 0.24s; }
.grid-line:nth-child(5) { transition-delay: 0.32s; }
.grid-dot { position: absolute; left: 50%; transform: translate(-50%, -50%); width: 6px; height: 6px; border-radius: 50%; background: var(--dot); opacity: 0; transition: opacity 1s 1s; }
body.ready .grid-line { transform: scaleY(1); }
body.ready .grid-horizontal-line { transform: scaleX(1); }
body.ready .grid-dot { opacity: 1; }

/* --- header (same as home), white backdrop once the page scrolls --- */
.main-header { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; height: 70px; padding: 0 60px; transition: background 0.4s; }
body.scrolled .main-header { background: rgba(255, 255, 255, 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.brand { display: block; line-height: 0; }
.brand img { width: 150px; height: auto; }
.header-nav { display: flex; align-items: center; gap: 44px; }
.nav-link { position: relative; text-decoration: none; font-size: 15px; letter-spacing: 0.2px; }
.nav-link::after { content: ''; position: absolute; left: 0; bottom: -3px; width: 100%; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform 0.5s var(--ease); }
.nav-link:hover::after, .nav-link[aria-current="page"]::after { transform: scaleX(1); transform-origin: left; }

/* --- type pieces --- */
.split .char { display: inline-block; opacity: 0; transform: translateY(50px); filter: blur(12px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease); }
.split .word { display: inline-block; white-space: nowrap; }
body.ready .split .char { opacity: 1; transform: none; filter: none; }
.kicker { font-family: 'Unbounded', sans-serif; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: #555555; }
.btn { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; text-decoration: none; padding: 9px 20px; border: 1px solid #000000; border-radius: 40px; transition: background 0.3s, color 0.3s; }
.btn:hover, .btn:focus-visible { background: #000000; color: #ffffff; outline: none; }
.btn.solid { background: #000000; color: #ffffff; }
.btn.solid:hover, .btn.solid:focus-visible { background: #ffffff; color: #000000; }

.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); transition-delay: 0.6s; }
body.ready .fade-up { opacity: 1; transform: none; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* --- bottom navigation + footer --- */
.page-nav { position: relative; z-index: 6; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding: 34px 60px; border-top: 1px solid var(--line); background: #ffffff; }
.page-nav a { text-decoration: none; font-family: 'Unbounded', sans-serif; font-size: 13px; letter-spacing: 1.2px; text-transform: uppercase; }
.page-nav a:hover { text-decoration: underline; text-underline-offset: 5px; }
.site-footer { position: relative; z-index: 6; padding: 26px 60px 27px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 12px; letter-spacing: 1px; color: #6b6b6b; background: #ffffff; }

@media (max-width: 900px) {
    .main-header { padding: 0 20px; }
    .brand img { width: 120px; }
    .header-nav { gap: 18px; }
    .nav-link { font-size: 13px; }
    .grid-lines { left: 12px; right: 12px; }
    .grid-line:nth-child(2), .grid-line:nth-child(4) { display: none; }
    .page-nav { padding: 26px 20px; }
    .site-footer { padding: 22px 20px; flex-direction: column; gap: 6px; }
}
@media (max-width: 560px) {
    .header-nav { gap: 12px; }
    .nav-link { font-size: 12px; }
    .brand img { width: 96px; }
}
@media (hover: none), (pointer: coarse) {
    * { cursor: auto !important; }
    .cursor-inner, .cursor-outer, .cursor-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .split .char, .fade-up, .reveal, .grid-line, .grid-horizontal-line { opacity: 1; transform: none; filter: none; transition: none; }
}
