@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@300;400;500&family=Source+Serif+4:wght@400;500;600&display=swap');

/*
==========================================================
MICHAŁ MACURA — NOTATKI Z TERENU
GŁÓWNY ARKUSZ STYLÓW
==========================================================

Wspólne style strony głównej, portfolio, galerii,
Notatek z terenu, kontaktu, menu i lightboxa.
*/


/* ==========================================================
   1. ZMIENNE I PODSTAWY
   ========================================================== */

:root {
    --background: #fafafa;
    --text: #2d2d2d;
    --line: #d8d2c8;

    --max-width: 900px;

    /* Rozmiar klasycznego hero-image na starszych podstronach. */
    --hero-size: 80%;
}

* {
    box-sizing: border-box;
}

html {
    font-size: 18px;
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    margin: 0;

    display: flex;
    flex-direction: column;

    background: var(--background);
    color: var(--text);

    font-family: "Manrope", sans-serif;
    line-height: 1.7;
}

h1,
h2,
h3 {
    margin-top: 0;
    font-weight: 500;
    line-height: 1.3;
}

h1 {
    margin-bottom: 2rem;
    text-align: center;
}

p {
    margin-bottom: 1.4rem;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    opacity: 0.7;
}


/* ==========================================================
   2. GŁÓWNY KONTENER PODSTRON
   ========================================================== */

main {
    flex: 1;

    width: 100%;
    max-width: var(--max-width);

    margin: 0 auto;
    padding: 3rem 1.5rem;
}


/* ==========================================================
   3. KLASYCZNE MENU
   ========================================================== */

.site-header {
    padding: 1rem 1.5rem;
}

.site-header::after {
    content: "";
    display: block;

    height: 1px;
    max-width: var(--max-width);

    margin: 1rem auto 0;

    background: linear-gradient(
        to right,
        transparent,
        var(--line),
        transparent
    );
}

.navigation {
    display: flex;

    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;

    font-size: 0.95rem;
    text-transform: lowercase;
}


/* ==========================================================
   4. MENU HAMBURGEROWE I PODPIS
   ========================================================== */

.home-header,
.page-header {
    width: 100%;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 1.5rem 2rem;
}

.home-header {
    position: absolute;

    top: 0;
    left: 0;

    z-index: 100;
}

.page-header {
    position: relative;
}

.signature-logo {
    display: block;
    width: 220px;
}

.signature-logo img {
    display: block;

    width: 100%;
    height: auto;
}

.menu-toggle {
    position: relative;
    z-index: 102;

    width: 44px;
    height: 44px;

    padding: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 6px;

    border: 0;
    background: transparent;

    cursor: pointer;
}

.menu-toggle span {
    display: block;

    width: 32px;
    height: 2px;

    background: #ffffff;

    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* Ciemna wersja hamburgera na jasnych podstronach. */
.page-header .menu-toggle span {
    background: var(--text);
    box-shadow: none;
}


/* ==========================================================
   5. ROZWIJANE MENU
   ========================================================== */

.home-navigation {
    position: fixed;

    top: 0;
    right: 0;

    width: min(420px, 85vw);
    height: 100vh;

    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;

    padding: 3rem;

    background: rgba(250, 250, 250, 0.97);

    transform: translateX(100%);
    transition: transform 0.35s ease;

    z-index: 101;
}

.home-navigation.is-open {
    transform: translateX(0);
}

.home-navigation a {
    font-size: 1.4rem;
    font-weight: 300;
    letter-spacing: 0.02em;
}


/* ==========================================================
   6. STOPKA
   ========================================================== */

.site-footer {
    width: 100%;

    padding: 2rem 1.5rem;

    text-align: center;
    font-size: 0.9rem;
}

.site-footer::before {
    content: "";
    display: block;

    height: 1px;
    max-width: var(--max-width);

    margin: 0 auto 2rem;

    background: linear-gradient(
        to right,
        transparent,
        var(--line),
        transparent
    );
}

.site-footer p {
    margin: 0;
}


/* ==========================================================
   7. KLASYCZNA STRONA GŁÓWNA — HERO I INTRO
   ========================================================== */

.hero-image {
    width: 100%;
    margin: 0 auto 2rem;
}

.hero-image img {
    display: block;

    width: min(100%, var(--hero-size));
    height: auto;

    margin: 0 auto;
}

.intro-text {
    max-width: 700px;
    margin: 0 auto;
}


/* ==========================================================
   8. PORTFOLIO I GALERIE
   ========================================================== */

.photo-grid {
    display: grid;

    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.photo-grid img {
    display: block;

    width: 100%;
    aspect-ratio: 4 / 3;

    object-fit: cover;

    cursor: pointer;
}


/* ==========================================================
   9. NOTATKI Z TERENU — LISTA WPISÓW
   ========================================================== */

.journal-entry {
    display: grid;

    grid-template-columns: 220px 1fr;
    gap: 1.5rem;

    align-items: start;

    margin-bottom: 2rem;
}

.journal-entry img {
    display: block;
    width: 100%;
}

.journal-entry h2 {
    margin-bottom: 0.5rem;
}


/* ==========================================================
   10. NOTATKI Z TERENU — POJEDYNCZY WPIS
   ========================================================== */

.journal-post {
    max-width: 800px;
    margin: 0 auto;
}

.journal-post h1 {
    margin-bottom: 2rem;
}

.journal-post p,
.journal-post figure {
    margin: 2rem 0;
}

.journal-post img {
    display: block;
    width: 100%;
}

.journal-post figcaption {
    margin-top: 0.5rem;

    font-size: 0.9rem;
    opacity: 0.7;
}


/* ==========================================================
   11. KONTAKT
   ========================================================== */

.contact-layout {
    display: grid;

    grid-template-columns: 2fr 1fr;
    gap: 4rem;

    align-items: start;

    max-width: 800px;
    margin: 2rem auto 0;
}

.contact-text {
    max-width: 500px;
}

.contact-text p:first-child {
    margin-top: 0;
}

.contact-text a {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-photo {
    max-width: 260px;
    margin-left: auto;
}

.contact-photo img {
    display: block;

    width: 100%;
    aspect-ratio: 1 / 1;
}


/* ==========================================================
   12. LOGO ZPFP
   ========================================================== */

.zpfp-logo {
    display: flex;
    justify-content: center;

    margin-top: 2rem;
}

.zpfp-logo img {
    width: 180px;
    height: auto;

    transition: opacity 0.2s ease;
}

.zpfp-logo img:hover,
.home-zpfp:hover img {
    opacity: 0.75;
}


/* ==========================================================
   13. LIGHTBOX
   ========================================================== */

.lightbox {
    position: fixed;
    inset: 0;

    display: none;

    align-items: center;
    justify-content: center;

    z-index: 1000;

    padding: 4rem 5rem;

    background: rgba(20, 20, 20, 0.78);
    backdrop-filter: blur(12px) saturate(40%);
}

.lightbox.is-open {
    display: flex;
}

.lightbox-image {
    display: block;

    width: auto;
    height: auto;

    max-width: 90vw;
    max-height: 88vh;

    object-fit: contain;

    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.lightbox-close,
.lightbox-previous,
.lightbox-next {
    position: absolute;

    z-index: 1001;

    border: 0;
    background: transparent;

    color: #ffffff;

    cursor: pointer;

    font-family: Arial, sans-serif;
}

.lightbox-close {
    top: 1rem;
    right: 1.5rem;

    font-size: 2.2rem;
    line-height: 1;
}

.lightbox-previous,
.lightbox-next {
    top: 50%;

    font-size: 2.5rem;
}

.lightbox-previous {
    left: 1.2rem;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 1.2rem;
    transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-previous:hover,
.lightbox-next:hover {
    opacity: 0.65;
}

body.lightbox-open {
    overflow: hidden;
}


/* ==========================================================
   14. LIGHTBOX — PRZEJŚCIA MIĘDZY ZDJĘCIAMI
   ========================================================== */

.lightbox-image.slide-left {
    animation: slideInFromRight 0.55s ease;
}

.lightbox-image.slide-right {
    animation: slideInFromLeft 0.55s ease;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-25px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ==========================================================
   15. STRONA GŁÓWNA — NOWY UKŁAD
   ========================================================== */

.home-page {
    background: var(--background);
}

.home-page main {
    width: 100%;
    max-width: none;

    margin: 0;
    padding: 0;
}


/* ==========================================================
   16. STRONA GŁÓWNA — ZDJĘCIA
   ========================================================== */

.home-image-section {
    width: 100%;
    margin: 0;

    overflow: hidden;
}

.home-image-section img {
    display: block;

    width: 100%;
    height: auto;
}


/* ==========================================================
   17. STRONA GŁÓWNA — PIERWSZE HERO
   ========================================================== */

.home-hero {
    height: 100vh;
    min-height: 600px;
}

.home-hero img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;
}


/* ==========================================================
   18. STRONA GŁÓWNA — SEKCJE TEKSTOWE
   ========================================================== */

.home-text-section {
    padding: 8rem 1.5rem;
}

.home-text {
    max-width: 850px;
    margin: 0 auto;

    text-align: center;

    font-size: clamp(1rem, 2vw, 1.65rem);
    font-weight: 300;

    line-height: 1.7;
    letter-spacing: 0.01em;
}

.home-text p {
    margin: 0 0 2rem;
}

.home-text-ending {
    margin-top: 3rem !important;
    font-size: 1.1em;
}

.home-text h2 {
    margin-bottom: 3rem;

    font-family: "Source Serif 4", serif;

    font-size: clamp(2.2rem, 5vw, 4rem);
    font-weight: 400;

    line-height: 1.1;
    text-transform: lowercase;
}

.home-link {
    display: inline-block;

    margin-top: 1.5rem;
    padding-bottom: 0.25rem;

    font-size: 0.9em;

    border-bottom: 1px solid currentColor;
}


/* ==========================================================
   19. STRONA GŁÓWNA — SEKCJA KOŃCOWA
   ========================================================== */

.home-contact {
    padding: 6rem 1.5rem 4rem;
}

.home-contact-content {
    max-width: 700px;
    margin: 0 auto;

    display: flex;
    flex-direction: column;
    align-items: center;

    text-align: center;

    font-size: 1.2rem;
    font-weight: 300;
}

.home-contact-content a {
    display: inline-block;

    margin-top: 1rem;

    text-decoration: underline;
    text-underline-offset: 4px;
}

.home-signature {
    display: block;

    width: 220px;
    height: auto;

    margin: 2rem auto 3rem;
}

.home-zpfp {
    display: block;
}

.home-zpfp img {
    display: block;

    width: 160px;
    height: auto;

    margin: 0 auto;

    transition: opacity 0.2s ease;
}

.home-page .site-footer {
    padding-top: 1rem;
}


/* ==========================================================
   20. FADE-IN PODCZAS PRZEWIJANIA
   ========================================================== */

.fade-in {
    opacity: 0;

    transform: translateY(20px);

    transition:
        opacity 1.2s ease,
        transform 1.2s ease;
}

.fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* ==========================================================
   21. RESPONSYWNOŚĆ — TABLET
   ========================================================== */

@media (max-width: 900px) {
    .photo-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ==========================================================
   22. RESPONSYWNOŚĆ — TELEFON
   ========================================================== */

@media (max-width: 700px) {

    main {
        padding: 2rem 1rem;
    }

    .home-header,
    .page-header {
        padding: 1.25rem;
    }

    .signature-logo {
        width: 160px;
    }

    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .journal-entry {
        grid-template-columns: 1fr;
    }

    .contact-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-photo {
        max-width: 280px;

        margin: 0 auto;

        order: -1;
    }

    .contact-text {
        max-width: none;
    }

    .lightbox {
        padding: 3.5rem 2.5rem;
    }

    .lightbox-image {
        max-width: 94vw;
        max-height: 84vh;
    }

    .lightbox-close {
        top: 0.75rem;
        right: 0.9rem;

        font-size: 2rem;
    }

    .lightbox-previous {
        left: 0.3rem;
        font-size: 2rem;
    }

    .lightbox-next {
        right: 0.3rem;
        font-size: 2rem;
    }

    .home-text-section {
        padding: 5rem 1.25rem;
    }

    .home-text {
        font-size: 1.3rem;
    }

    .home-text h2 {
        margin-bottom: 2rem;
    }

    .home-contact {
        padding: 4rem 1.25rem 3rem;
    }

    /*
    Pierwsze hero na telefonie:
    pokazuje całe zdjęcie bez przycinania.
    */
    .home-hero {
        height: auto;
        min-height: 0;
    }

    .home-hero img {
        width: 100%;
        height: auto;

        object-fit: contain;
    }

    .home-signature {
        width: 180px;
    }

    .home-zpfp img {
        width: 140px;
    }
}


/* ==========================================================
   23. RESPONSYWNOŚĆ — BARDZO MAŁY EKRAN
   ========================================================== */

@media (max-width: 500px) {
    html {
        font-size: 17px;
    }

    .navigation {
        gap: 1rem;
    }
}
