/* ============================================
   PORTFOLIO – Piotr Czupryn (CZUUX)
   Ciemny, minimalistyczny, fioletowy akcent
   ============================================ */

/* ---------- Zmienne ---------- */
:root {
    --bg: #0a0a0a;
    --bg-soft: #111111;
    --text: #f5f5f5;
    --text-muted: #a1a1a6;
    --text-dim: #6b6b70;
    --line: rgba(255, 255, 255, 0.09);
    --accent: #8b5cf6;
    --accent-soft: #a78bfa;
    --radius: 4px;
    --container: 1120px;
    --nav-h: 68px;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-h);
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font);
    font-size: 1.0625rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

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

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------- Typografia ---------- */
h1, h2, h3 { line-height: 1.1; letter-spacing: -0.03em; font-weight: 700; }

h1 { font-size: clamp(2.5rem, 7vw, 5.25rem); max-width: 14ch; }
h2 { font-size: clamp(2rem, 4.5vw, 3.25rem); max-width: 18ch; margin-bottom: 40px; }
h3 { font-size: 1.375rem; letter-spacing: -0.02em; }

.section-label,
.eyebrow {
    color: var(--accent-soft);
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.lead {
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    color: var(--text-muted);
    max-width: 38em;
    margin-top: 28px;
}

.section-intro {
    color: var(--text-muted);
    max-width: 40em;
    margin: -16px 0 56px;
}

/* ---------- Przyciski ---------- */
.btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-soft);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px -10px rgba(139, 92, 246, 0.7);
}

.btn-ghost {
    border: 1px solid var(--line);
    color: var(--text);
}
.btn-ghost:hover {
    border-color: var(--accent-soft);
    color: var(--accent-soft);
}

/* ---------- Nawigacja ---------- */
.nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 50;
    height: var(--nav-h);
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
}

.nav-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.logo span { color: var(--accent); }

.nav-menu {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-menu a {
    font-size: 0.975rem;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-menu a:hover { color: var(--text); }

.nav-menu .nav-cta {
    color: var(--text);
    padding: 8px 18px;
    border: 1px solid var(--accent);
    border-radius: var(--radius);
    transition: background 0.2s;
}
.nav-menu .nav-cta:hover { background: var(--accent); }

.nav-toggle { display: none; }

/* ---------- Sekcje ---------- */
.section { padding: 130px 0; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: calc(var(--nav-h) + 110px) 0 90px;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: -260px;
    left: 50%;
    width: 900px;
    height: 700px;
    transform: translateX(-30%);
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.22), transparent);
    pointer-events: none;
}

.hero .container { position: relative; }

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 40px;
}

/* Liczby */
.numbers {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    margin-top: 110px;
    padding-top: 40px;
    border-top: 1px solid var(--line);
}

.numbers dt {
    color: var(--text-dim);
    font-size: 0.8125rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.numbers dd {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin: 6px 0 4px;
}

.numbers small {
    display: block;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

/* ---------- O mnie ---------- */
.about {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 80px;
    align-items: start;
}

.about-photo img {
    width: 100%;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    object-position: center 20%;
    border-radius: var(--radius);
    filter: grayscale(0.15);
}

.about-text p { color: var(--text-muted); max-width: 38em; }
.about-text p + p { margin-top: 20px; }
.about-text strong { color: var(--text); font-weight: 600; }

/* ---------- Statystyki ---------- */
.proof-heading {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.proof-heading:not(:first-of-type) { margin-top: 64px; }

.proof-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: start;
}

.proof {
    position: relative;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--bg-soft);
    transition: border-color 0.25s;
}
.proof:hover { border-color: var(--accent); }

.proof img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    object-position: top;
    border-radius: 0;
    cursor: zoom-in;
}
.proof.tall img { aspect-ratio: 4 / 5; }

.proof::after {
    content: "Powiększ ⤢";
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    font-size: 0.8125rem;
    font-weight: 600;
    background: rgba(10, 10, 10, 0.85);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    pointer-events: none;
}

.proof figcaption {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 18px 20px 20px;
    border-top: 1px solid var(--line);
}
.proof figcaption strong {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    line-height: 1.15;
    letter-spacing: -0.03em;
    color: var(--text);
}
.proof figcaption span { color: var(--text-muted); font-size: 0.95rem; }

/* ---------- Oferta ---------- */
.services { border-top: 1px solid var(--line); }

.services > li {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 16px;
    padding: 40px 0;
    border-bottom: 1px solid var(--line);
}

.num {
    color: var(--accent-soft);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    font-variant-numeric: tabular-nums;
}

.services h3 { margin-bottom: 14px; }

.services ul li {
    color: var(--text-muted);
    padding-left: 20px;
    position: relative;
}
.services ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.85em;
    width: 8px;
    height: 1px;
    background: var(--accent);
}

/* ---------- Realizacje ---------- */
.project {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 64px;
    padding: 64px 0;
    border-top: 1px solid var(--line);
}

.project-info { position: sticky; top: calc(var(--nav-h) + 32px); align-self: start; }
.project-info h3 { font-size: clamp(2rem, 4vw, 2.75rem); margin: 8px 0 12px; }
.project-info p { color: var(--text-muted); }
.project-info .tag {
    color: var(--accent-soft);
    font-size: 0.9rem;
    margin-bottom: 18px;
}
.project-info .result {
    margin-top: 20px;
    color: var(--text);
    font-weight: 600;
    font-size: 0.95rem;
}

.media-row { display: grid; gap: 16px; }
.media-row + .media-row { margin-top: 16px; }
.media-row.two { grid-template-columns: repeat(2, 1fr); }
.media-row.three { grid-template-columns: repeat(3, 1fr); }
.media-row.single { grid-template-columns: 1fr; }

figure img,
figure video {
    width: 100%;
    background: var(--bg-soft);
    border-radius: var(--radius);
}
figure img { cursor: zoom-in; transition: opacity 0.25s; }
figure img:hover { opacity: 0.85; }

figcaption {
    color: var(--text-dim);
    font-size: 0.875rem;
    margin-top: 10px;
    line-height: 1.4;
}

figure.vertical { max-width: 300px; }
.media-row.single img { max-width: 440px; }

/* Inne współprace */
.more { padding-top: 64px; border-top: 1px solid var(--line); }
.more h3 { margin-bottom: 32px; }

.more-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    align-items: start;
}

/* ---------- Kontakt ---------- */
.contact { position: relative; overflow: hidden; }
.contact::before {
    content: "";
    position: absolute;
    bottom: -300px;
    left: -100px;
    width: 800px;
    height: 600px;
    background: radial-gradient(closest-side, rgba(139, 92, 246, 0.16), transparent);
    pointer-events: none;
}
.contact .container { position: relative; }

.mail {
    display: inline-block;
    font-size: clamp(1.5rem, 4.5vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    word-break: break-word;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 6px;
    transition: color 0.25s;
}
.mail:hover { color: var(--accent-soft); }

.socials {
    display: flex;
    flex-wrap: wrap;
    gap: 14px 40px;
    margin-top: 56px;
}
.socials a {
    color: var(--text);
    font-weight: 600;
    transition: color 0.2s;
}
.socials a span { color: var(--text-dim); font-weight: 400; margin-left: 6px; }
.socials a:hover { color: var(--accent-soft); }

/* ---------- Stopka ---------- */
.footer {
    border-top: 1px solid var(--line);
    padding: 32px 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}
.footer-inner { display: flex; justify-content: space-between; gap: 16px; }
.footer a:hover { color: var(--text); }

/* ---------- Powiększenie zdjęć ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.92);
    cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: var(--radius); }
.lightbox-close {
    position: absolute;
    top: 14px;
    right: 22px;
    font-size: 2.5rem;
    line-height: 1;
    color: var(--text);
}

/* ---------- Animacje wejścia ---------- */
.js .reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.visible { opacity: 1; transform: none; }

/* ---------- Tablet ---------- */
@media (max-width: 960px) {
    .section { padding: 100px 0; }

    .numbers { grid-template-columns: repeat(2, 1fr); margin-top: 80px; }

    .about { grid-template-columns: 200px 1fr; gap: 48px; }

    .proof-grid { grid-template-columns: 1fr; max-width: 520px; }

    .project { grid-template-columns: 1fr; gap: 32px; }
    .project-info { position: static; }

    .more-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Telefon ---------- */
@media (max-width: 720px) {
    body { font-size: 1rem; }
    .container { padding: 0 20px; }
    .section { padding: 80px 0; }
    h2 { margin-bottom: 32px; }

    /* Hamburger */
    .nav-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 7px;
        width: 44px;
        height: 44px;
        margin-right: -10px;
        align-items: center;
    }
    .nav-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background: var(--text);
        transition: transform 0.3s;
    }
    .nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
    .nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }

    .nav-menu {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 20px 24px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    }
    .nav-menu.open { opacity: 1; transform: none; visibility: visible; }

    .nav-menu a {
        font-size: 1.25rem;
        color: var(--text);
        padding: 16px 0;
        border-bottom: 1px solid var(--line);
    }
    .nav-menu .nav-cta {
        margin-top: 20px;
        text-align: center;
        background: var(--accent);
        border: 0;
        border-radius: var(--radius);
    }

    .hero { padding: calc(var(--nav-h) + 64px) 0 64px; }
    .hero-actions .btn { flex: 1 1 100%; text-align: center; }
    .numbers { gap: 28px 20px; margin-top: 64px; }

    .about { grid-template-columns: 1fr; gap: 32px; }
    .about-photo { max-width: 180px; }


    .services > li { grid-template-columns: 1fr; gap: 8px; padding: 32px 0; }

    .project { padding: 48px 0; }
    .media-row.two,
    .media-row.three { grid-template-columns: 1fr; }
    .media-row.three figure { max-width: 420px; }

    .more-grid { grid-template-columns: 1fr; }
    .more-grid figure { max-width: 420px; }

    .footer-inner { flex-direction: column; }
}

/* ---------- Ograniczenie ruchu ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }

    .js .reveal { opacity: 1; transform: none; }
    .btn-primary:hover { transform: none; }
}
