/* Reset / baza */

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    background-color: #f9fafb;
    line-height: 1.6;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    padding-left: 1.2rem;
}

/* Layout */

.container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section {
    padding: 4rem 0;
}

.section-alt {
    padding: 4rem 0;
    background-color: #f3f4f6;
}

.section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.section-intro {
    max-width: 640px;
    margin-bottom: 2rem;
}

.section-note {
    margin-top: 2rem;
    font-size: 0.95rem;
    color: #4b5563;
}

.two-columns {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .two-columns {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Header / top nav */

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background-color: #111827;
    color: #f9fafb;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
}

.logo-main {
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.logo-sub {
    display: block;
    font-size: 0.75rem;
    color: #9ca3af;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.9rem;
}

.nav a {
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.nav a:hover {
    background-color: #f9fafb;
    color: #111827;
}

@media (max-width: 640px) {
    .header-inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

/* Hero */

.hero {
    padding: 4rem 0 3rem;
    background: radial-gradient(circle at top left, #e5e7eb, #f9fafb);
}

.hero-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 2.5rem;
    align-items: center;
}

.hero h1 {
    font-size: clamp(2rem, 4vw, 2.6rem);
    margin-bottom: 1rem;
}

.hero-lead {
    font-size: 1rem;
    color: #374151;
    margin-bottom: 1.25rem;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.badge {
    font-size: 0.8rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background-color: #111827;
    color: #f9fafb;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-primary {
    background-color: #111827;
    color: #f9fafb;
    border-color: #111827;
}

.btn-primary:hover {
    background-color: #f9fafb;
    color: #111827;
}

.btn-outline {
    background-color: transparent;
    color: #111827;
    border-color: #111827;
}

.btn-outline:hover {
    background-color: #111827;
    color: #f9fafb;
}

.info-card {
    background-color: #ffffff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
    font-size: 0.95rem;
}

.info-card h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.info-card ul {
    margin: 0;
    padding-left: 1.1rem;
}

@media (max-width: 900px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Services */

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.service-card {
    background-color: #ffffff;
    border-radius: 0.9rem;
    padding: 1.25rem 1.3rem;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.07);
    font-size: 0.95rem;
}

.service-card h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.service-card ul {
    margin: 0;
}

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Projects */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.project-card {
    background-color: #ffffff;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
    font-size: 0.9rem;
}

.project-card img {
    width: 100%;
    height: auto;
}

.project-card figcaption {
    padding: 0.75rem 1rem 1rem;
    color: #4b5563;
}

@media (max-width: 900px) {
    .projects-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Reviews */

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.review-card {
    background-color: #ffffff;
    border-radius: 0.9rem;
    padding: 1.25rem 1.3rem;
    box-shadow: 0 5px 18px rgba(15, 23, 42, 0.07);
    font-size: 0.95rem;
}

.review-text {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.review-meta {
    margin: 0;
    font-size: 0.85rem;
    color: #6b7280;
}

@media (max-width: 900px) {
    .reviews-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Kontakt */

.contact-columns {
    align-items: flex-start;
}

.contact-list {
    list-style: none;
    padding-left: 0;
}

.contact-list li {
    margin-bottom: 0.4rem;
}

.contact-note {
    font-size: 0.9rem;
    color: #4b5563;
}

/* Stopka */

.site-footer {
    background-color: #111827;
    color: #9ca3af;
    padding: 1.25rem 0;
    font-size: 0.85rem;
}

.footer-inner {
    text-align: center;
}

html {
    scroll-behavior: smooth;
}

/* Animacje pojawiania się */

.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

/* Lightbox */

.lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background-color: rgba(15, 23, 42, 0.9);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 50;
}

.lightbox.is-open {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-inner {
    position: relative;
    max-width: 960px;
    width: 100%;
    max-height: 90vh;          /* nigdy wyżej niż okno */
    background-color: #111827;
    border-radius: 0.75rem;
    padding: 1rem 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    overflow: auto;            /* jeśli treść > 90vh, pojawi się scroll w środku */
}

.lightbox-image {
    width: 100%;
    max-height: 70vh;          /* obrazek dopasowany do viewportu */
    height: auto;
    border-radius: 0.5rem;
    object-fit: contain;       /* zachowuje proporcje bez obcięcia */
}


.lightbox-caption {
    font-size: 0.9rem;
    color: #e5e7eb;
}

.lightbox-close {
    position: absolute;
    top: 0.25rem;
    right: 0.5rem;
    border: none;
    background: none;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    color: #e5e7eb;
}

.lightbox-controls {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
}

.lightbox-prev,
.lightbox-next {
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #e5e7eb;
    padding: 0.25rem 0.5rem;
}

/* Przycisk "do góry" */

.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 999px;
    border: none;
    background-color: #111827;
    color: #f9fafb;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(15, 23, 42, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.back-to-top:not(.is-visible) {
    transform: translateY(8px);
}

/* Aktywny link w nawigacji */

.nav a.nav-link--active {
    background-color: #f9fafb;
    color: #111827;
}
