/* Inez Zapora – strona publiczna. Jeden ciemny motyw: prace mają grać, interfejs ma zniknąć. */

@font-face {
    font-family: "Space Grotesk";
    src: url("fonts/space-grotesk-latin-ext.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
    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: "Space Grotesk";
    src: url("fonts/space-grotesk-latin.woff2") format("woff2");
    font-weight: 300 700;
    font-display: swap;
    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;
}

:root {
    --bg: #0b0b0c;
    --surface: #161618;
    --line: #2a2a2e;
    --text: #ecebe8;
    --muted: #96959b;
    --accent: oklch(0.590 0.231 250.5);
    --accent-2: oklch(0.560 0.250 305); /* fiolet, w który wygasa neonowa poświata */
    /* Poświata ikon: ciasny rdzeń w kolorze akcentu, szersza warstwa pośrednia i szeroka
       fioletowa. Kolejne drop-shadow nakładają się na wynik poprzednich, stąd płynne przejście. */
    --glow: drop-shadow(0 0 1.5px var(--accent)) drop-shadow(0 0 5px var(--accent))
            drop-shadow(0 0 10px color-mix(in oklch, var(--accent), var(--accent-2))) drop-shadow(0 0 18px var(--accent-2));
    /* To samo dla tekstu, ale lżej: nagłówki i pozycje otwartego menu. */
    --glow-text: 0 0 4px color-mix(in oklch, var(--accent) 30%, transparent), 0 0 12px color-mix(in oklch, var(--accent) 65%, transparent), 0 0 30px color-mix(in oklch, var(--accent-2) 70%, transparent);
    --gutter: clamp(16px, 4vw, 56px);
    --gap: 6px;
    --row: 260px;
    color-scheme: dark;
}

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

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

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--text);
    font: 400 1rem/1.55 "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
}

main { flex: 1; padding: 0 var(--gutter) 96px; }

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

a { color: inherit; text-decoration-color: var(--muted); text-underline-offset: 0.2em; }
a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

ul { list-style: none; margin: 0; padding: 0; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 10; background: var(--bg); padding: 8px 12px; }

/* --- nagłówek ------------------------------------------------------------------------- */

.site-header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px 32px;
    padding: 24px var(--gutter);
    /* Przyklejony i bez tła: treść przewija się pod spodem, a „difference" z białym tekstem
       odwraca kolory – na ciemnym tle napisy są jasne, na jasnym zdjęciu ciemne.
       Dlatego w nagłówku nie ma koloru akcentu, tylko biel i przezroczystość. */
    position: sticky; top: 0; z-index: 30;
    color: #fff;
    mix-blend-mode: difference;
}
/* otwarte menu mobilne ma własne tło – mieszanie by je odwróciło */
.menu-open .site-header { mix-blend-mode: normal; }
.site-header a:hover { color: #fff; }

.brand { font-weight: 600; font-size: 1.125rem; letter-spacing: 0.01em; text-decoration: none; white-space: nowrap; }

.nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.nav a { opacity: 0.65; text-decoration: none; padding: 4px 0; }
.nav a:hover { opacity: 1; }
.nav a[aria-current] { opacity: 1; box-shadow: 0 2px 0 currentColor; }

/* --- menu mobilne: pełnoekranowa lista działów (tylko z JS – bez niego menu się zawija) --- */

.nav-toggle, .nav-social { display: none; }
/* Ikony (Phosphor Light): cienka kreska + neonowa poświata (--glow). Dla SVG robi to
   drop-shadow, bo text-shadow działa tylko na tekst. */
.icon { display: block; width: 1.5em; height: 1.5em; filter: var(--glow); }

@media (max-width: 760px) {
    .js .site-header { flex-wrap: nowrap; align-items: center; }
    .js .brand { position: relative; z-index: 21; }
    /* wysokość nagłówka = wysokość przycisku, żeby przycisk (fixed) leżał w jego osi */
    .js .site-header { min-height: 80px; padding-block: 20px; padding-right: calc(var(--gutter) + 60px); }
    .js .nav-toggle {
        position: fixed; top: 18px; right: var(--gutter); z-index: 40;
        display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
        border: 0; border-radius: 50%;
        background: rgb(11 11 12 / 0.55);
        -webkit-backdrop-filter: blur(10px) saturate(1.4); backdrop-filter: blur(10px) saturate(1.4);
        color: #fff; font: inherit; font-size: 0.9375rem; cursor: pointer;
    }
    .js .nav-toggle .icon { width: 22px; height: 22px; }
    /* dwie ikony w przycisku: pierwsza = menu, druga = krzyżyk */
    .js .nav-toggle .icon:last-child, .js .nav-toggle[aria-expanded="true"] .icon:first-child { display: none; }
    .js .nav-toggle[aria-expanded="true"] .icon:last-child { display: block; }
    .js .nav-toggle[aria-expanded="true"] { background: rgb(255 255 255 / 0.1); }
    .js .nav {
        position: fixed; inset: 0; z-index: 20;
        display: none; flex-direction: column; flex-wrap: nowrap; justify-content: center; gap: 4px;
        padding: 88px var(--gutter) 32px; overflow-y: auto;
        background: var(--bg);
    }
    .js .nav.is-open { display: flex; }
    .js .nav a { font-size: clamp(2rem, 10vw, 3.25rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; color: var(--text); opacity: 1; text-shadow: var(--glow-text); }
    .js .nav a:hover, .js .nav a[aria-current] { color: var(--accent); box-shadow: none; }
    .js .nav-social { display: flex; gap: 8px; margin: 28px 0 0 -10px; }
    .js .nav .nav-social a { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; font-size: 1.3rem; text-shadow: none; }
    .menu-open { overflow: hidden; }
}

/* --- strona główna: wideo w tle + siatka pikseli ------------------------------------------ */

/* fixed zamiast sticky: nagłówek nie zajmuje miejsca, więc wideo zaczyna się od samej góry */
.home .site-header { position: fixed; inset: 0 0 auto 0; }

.hero {
    position: relative; isolation: isolate; overflow: hidden;
    display: flex; align-items: flex-end;
    min-height: 100svh;
    margin: 0 calc(var(--gutter) * -1) var(--gap);
    padding: 120px var(--gutter) clamp(40px, 7vw, 88px);
    background: #000;
}
.hero-video { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
/* Nakładka: siatka ciemnych linii co 3 px (efekt ekranu LED, maskuje kompresję wideo)
   + przyciemnienie od dołu, żeby nazwisko było czytelne na jasnych kadrach. */
.hero::after {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background:
        linear-gradient(rgb(11 11 12 / 0.15), rgb(11 11 12 / 0.25) 45%, rgb(11 11 12 / 0.92)),
        linear-gradient(rgb(0 0 0 / 0.5) 1px, transparent 1px) 0 0 / 3px 3px,
        linear-gradient(90deg, rgb(0 0 0 / 0.5) 1px, transparent 1px) 0 0 / 3px 3px;
}
.hero-text { text-shadow: 0 2px 24px rgb(0 0 0 / 0.5); }
.hero h1 { text-shadow: 0 2px 24px rgb(0 0 0 / 0.5), var(--glow-text); }
.hero-tagline { color: var(--text); opacity: 0.8; }
.hero h1 { margin: 0; font-size: clamp(3.25rem, 13vw, 11rem); font-weight: 600; line-height: 0.9; letter-spacing: -0.04em; }
.hero-alias { margin: 0 0 16px; color: var(--accent); font-size: 0.875rem; letter-spacing: 0.18em; text-transform: uppercase; }
.hero-tagline { margin: 28px 0 0; max-width: 34ch; font-size: clamp(1.05rem, 1.6vw, 1.35rem); }

/* --- nagłówek podstrony ---------------------------------------------------------------- */

.page-head { padding: clamp(24px, 5vw, 64px) 0 clamp(24px, 4vw, 48px); }
.page-head h1 { text-shadow: var(--glow-text); margin: 0; font-size: clamp(2.5rem, 8vw, 5.5rem); font-weight: 600; line-height: 0.95; letter-spacing: -0.03em; }
.lead { margin: 20px 0 0; max-width: 52ch; color: var(--muted); font-size: 1.125rem; }
.crumb { margin: 0 0 12px; font-size: 0.875rem; letter-spacing: 0.14em; text-transform: uppercase; }
.crumb a { color: var(--muted); text-decoration: none; }
.crumb a::before { content: "← "; }

.block + .block, .tiles + .block { margin-top: 88px; }
.block h2 { text-shadow: var(--glow-text); margin: 0 0 24px; font-size: clamp(1.5rem, 3vw, 2.25rem); font-weight: 600; letter-spacing: -0.02em; }

/* --- kafle (działy, kolekcje) ---------------------------------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: var(--gap); }
.tiles--home { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }

.tile { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--surface); text-decoration: none; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, opacity 0.3s ease; opacity: 0.82; }
.tile:hover img, .tile:focus-visible img { transform: scale(1.03); opacity: 1; }
.tile-label {
    position: absolute; inset: auto 0 0 0;
    padding: 56px 20px 16px;
    background: linear-gradient(transparent, rgb(0 0 0 / 0.78));
    color: #fff; font-size: 1.375rem; font-weight: 600; letter-spacing: -0.01em;
}
.tile-label small { margin-left: 6px; color: rgb(255 255 255 / 0.6); font-size: 0.8125rem; font-weight: 400; }
.tile:hover { color: #fff; }

/* --- galeria: wyrównane rzędy bez JS ---------------------------------------------------
   Każdy element rośnie proporcjonalnie do swojego formatu (--r = szerokość / wysokość),
   więc zdjęcia w rzędzie mają tę samą wysokość i żadne nie jest przycinane. */

.gallery { display: flex; flex-wrap: wrap; gap: var(--gap); }
.gallery::after { content: ""; flex-grow: 1000; }

.g-item {
    flex-grow: calc(var(--r) * 100);
    flex-basis: calc(var(--r) * var(--row));
    min-width: 0;
    max-width: 100%;
    background: var(--surface);
    text-decoration: none;
}
.g-item img { width: 100%; aspect-ratio: var(--r); object-fit: cover; transition: opacity 0.2s ease; }
.g-item:hover img { opacity: 0.85; }

.gallery--captions { --row: 300px; row-gap: 28px; }
/* plakaty: bez rozciągania na całą szerokość, gdy w rzędzie zostaje jeden poziomy */
.gallery--captions .g-item { background: none; max-width: min(100%, calc(var(--r) * var(--row) * 1.4), calc(var(--row) * 2.2)); }
.g-caption { display: block; padding-top: 8px; color: var(--muted); font-size: 0.875rem; line-height: 1.35; }
.g-caption strong { display: block; color: var(--text); font-weight: 500; }

@media (max-width: 600px) {
    :root { --row: 150px; }
    .gallery--captions { --row: 220px; }
}

/* --- filmy ---------------------------------------------------------------------------- */

.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 380px), 1fr)); gap: 28px var(--gap); }
.video { display: block; text-decoration: none; }
.video-frame { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface); }
.video-frame img, .video-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border: 0; }
.video-preview { opacity: 0; transition: opacity 0.25s ease; }
.video-preview.is-playing { opacity: 1; }
.video-play {
    position: absolute; inset: 50% auto auto 50%; translate: -50% -50%;
    width: 64px; height: 64px; border-radius: 50%;
    background: rgb(0 0 0 / 0.55); transition: background 0.2s ease;
}
.video-play::after {
    content: ""; position: absolute; inset: 50% auto auto 54%; translate: -50% -50%;
    border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent #fff;
}
.video:hover .video-play { background: var(--accent); }
.video-title { display: block; padding-top: 10px; font-weight: 500; }

/* --- sąsiednie kolekcje, o mnie, stopka -------------------------------------------------- */

.siblings { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 72px; padding-top: 24px; border-top: 1px solid var(--line); }
.siblings a { color: var(--muted); text-decoration: none; }
.siblings a:hover, .siblings a[aria-current] { color: var(--text); }

.about { display: grid; gap: 40px; max-width: 70ch; }
.about-text p { margin: 0 0 1em; font-size: 1.125rem; }
.contact { display: grid; grid-template-columns: max-content 1fr; gap: 10px 32px; margin: 0; font-size: 1.125rem; }
.contact dt { color: var(--muted); }
.contact dd { margin: 0; overflow-wrap: anywhere; }

.site-footer {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 32px;
    padding: 24px var(--gutter); border-top: 1px solid var(--line);
    color: var(--muted); font-size: 0.875rem;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.footer-links a { text-decoration: none; }

/* --- lightbox (PhotoSwipe, style bazowe w assets/photoswipe/photoswipe.css) ------------ */

.pswp { --pswp-bg: #050506; --pswp-placeholder-bg: var(--surface, #18181b); font-family: inherit; }
/* ikony Phosphor z tą samą poświatą co w menu; overflow, żeby przycisk jej nie przycinał */
.pswp__button { overflow: visible; }
.pswp__icn { fill: #fff; filter: var(--glow); }
.pswp__button--arrow .pswp__icn { width: 44px; height: 44px; margin-top: -22px; }
.pswp__video { background: #000; }
.pswp__video iframe, .pswp__video video { display: block; width: 100%; height: 100%; border: 0; }
.pswp__caption {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 12px var(--gutter) 16px; text-align: center;
    color: var(--text); font-size: 0.875rem; line-height: 1.35; pointer-events: none;
}
.pswp__caption:empty { display: none; }

@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; }
}
