/* ===== RESET ===== */
:root {
    --page-bg: #f7f3ed;
    --surface: #fffdf9;
    --header-bg: #f1e4d4;
    --text: #252321;
    --muted: #675f56;
    --accent: #a8764b;
    --accent-dark: #825a38;
    --line: #dfd2c3;
    --shadow: 0 10px 28px rgba(49, 38, 28, 0.09);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Lato", Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background-color: var(--page-bg);
}

/* ===== GLOBAL ===== */
section {
    padding: 60px 20px;
    max-width: 1100px;
    margin: 0 auto;
}

h1, h2, h3 {
    margin-bottom: 15px;
}

h1, h2, h3 {
    line-height: 1.2;
}

h2 {
    color: #211f1c;
    font-weight: 900;
}

h3 {
    color: #332d27;
}

p {
    margin-bottom: 15px;
    color: var(--muted);
}

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

/* ===== NAVBAR ===== */
header {
    background: var(--header-bg);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

nav {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;

    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    margin-bottom: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand-logo {
    display: block;
    width: 86px;
    height: auto;
}

.form-disabled {
  position: relative;
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.overlay {
  position: absolute;
  inset: 0;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(255,255,255,0.4);
  font-size: 20px;
  font-weight: bold;
  backdrop-filter: blur(2px);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
}

nav a:hover {
    color: var(--accent);
}

/* ===== HERO ===== */
#hero {
    text-align: center;
    padding: 110px 20px 95px;
}

#hero h2 {
    font-size: 32px;
    margin-bottom: 18px;
}

#hero p {
    max-width: 600px;
    margin: 0 auto 20px;
}

#hero a {
    display: inline-block;
    padding: 12px 25px;
    background: var(--accent);
    color: white;
    border-radius: 5px;
    transition: 0.3s;
    font-weight: 700;
}

#hero a:hover {
    background: var(--accent-dark);
}

/* ===== OFERTA ===== */
#oferta article {
    background: var(--surface);
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

#oferta h2 {
    grid-column: 1 / -1;
}

/* ===== REALIZACJE ===== */
#realizacje {
    display: block;
}

#realizacje article {
    background: var(--surface);
    padding: 10px;
    border-radius: 8px;
}

#realizacje img {
    width: 100%;
    border-radius: 5px;
}

.portfolio-preview {
    display: block;
}

.auto-carousel {
    position: relative;
    overflow: hidden;
    background: var(--surface);
    border-radius: 8px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-slide {
    min-width: 100%;
}

.carousel-slide img {
    display: block;
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.carousel-slide p {
    padding: 15px;
    margin-bottom: 0;
    font-weight: bold;
}

.gallery-page {
    background-color: var(--page-bg);
}

.gallery-nav {
    min-height: 62px;
}

.gallery-nav h1 {
    margin-bottom: 0;
}

.back-link {
    display: inline-block;
    padding: 8px 14px;
    background: var(--accent);
    color: white;
    border-radius: 5px;
}

.back-link:hover {
    background: var(--accent-dark);
    color: white;
}

.gallery-page header nav a {
    font-weight: bold;
}

.realization-side-nav {
    display: none;
    position: fixed;
    top: 92px;
    right: 20px;
    z-index: 900;
    width: 240px;
    padding: 18px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.realization-side-nav nav {
    display: block;
    max-width: none;
    padding: 0;
}

.realization-side-nav h2 {
    margin-bottom: 12px;
    font-size: 18px;
}

.realization-side-nav ul {
    display: grid;
    gap: 10px;
    list-style: none;
}

.realization-side-nav a {
    display: block;
    font-size: 14px;
    line-height: 1.35;
}

.realization-side-nav a:hover {
    color: var(--accent);
}

.realization-section {
    max-width: 1100px;
    padding: 70px 20px;
}

.realization-section + .realization-section {
    border-top: 1px solid var(--line);
}

.realization-section h2 {
    margin-bottom: 25px;
}

.realization-carousel .carousel-slide img {
    height: 620px;
}

.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    font-size: 28px;
    line-height: 1;
    background: rgba(168, 118, 75, 0.92);
}

.carousel-button:hover {
    background: rgba(130, 90, 56, 0.95);
}

.carousel-button.prev {
    left: 15px;
}

.carousel-button.next {
    right: 15px;
}

/* ===== WSPÓŁPRACA ===== */
#wspolpraca ol {
    padding-left: 20px;
}

/* ===== KONTAKT ===== */
form {
    margin-top: 20px;
}

input, textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 5px;
    font-size: 14px;
    background: var(--surface);
    color: var(--text);
}

input:focus, textarea:focus {
    border-color: var(--accent);
    outline: 2px solid rgba(168, 118, 75, 0.18);
}

button {
    padding: 12px 20px;
    border: none;
    background: var(--accent);
    color: white;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 700;
}

button:hover {
    background: var(--accent-dark);
}

/* ===== MATERIAŁY ===== */
.materials-section {
    max-width: 1100px;
    padding-top: 35px;
    padding-bottom: 35px;
    text-align: center;
}

.materials-section h2 {
    margin-bottom: 8px;
    font-size: 24px;
}

.materials-section p {
    max-width: 620px;
    margin: 0 auto 22px;
    font-size: 15px;
}

.secret-game-link {
    color: inherit;
}

.logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 18px 28px;
    padding: 22px;
    background: rgba(255, 253, 249, 0.58);
    border: 1px solid rgba(223, 210, 195, 0.7);
    border-radius: 8px;
}

.logos img {
    display: block;
    max-width: 120px;
    max-height: 42px;
    object-fit: contain;
    filter: grayscale(1);
    opacity: 0.68;
    transition: opacity 0.2s ease, filter 0.2s ease;
}

.logos img:hover {
    filter: grayscale(0);
    opacity: 0.95;
}

/* ===== FOOTER ===== */
footer {
    text-align: center;
    padding: 20px;
    background: #e9ddcf;
    margin-top: 40px;
}

/* ===== RESPONSYWNOŚĆ ===== */
@media (min-width: 768px) {

    #hero h2 {
        font-size: 42px;
    }

    #oferta {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }

    .carousel-slide img {
        height: 520px;
    }

}

@media (min-width: 1024px) {

    #oferta {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .preview-carousel .carousel-slide img {
        height: 580px;
    }

    .realization-side-nav {
        display: block;
    }

    .gallery-page main {
        padding-right: 280px;
    }

    .gallery-page .realization-section {
        max-width: 980px;
    }

}

@media (max-width: 767px) {

    nav {
        align-items: flex-start;
        gap: 15px;
        flex-direction: column;
    }

    nav ul {
        flex-wrap: wrap;
        gap: 10px 15px;
    }

    .gallery-page .gallery-nav {
        align-items: center;
        flex-direction: row;
        gap: 12px;
        min-height: 56px;
        padding: 10px 20px;
    }

    .gallery-page .gallery-nav h1 {
        line-height: 1;
    }

    .brand-logo {
        width: 72px;
    }

    .gallery-page .back-link {
        padding: 7px 12px;
        white-space: nowrap;
    }

    .carousel-slide img,
    .realization-carousel .carousel-slide img {
        height: 320px;
    }

    .carousel-button {
        width: 38px;
        height: 38px;
        font-size: 24px;
    }

    .materials-section {
        padding-top: 28px;
        padding-bottom: 28px;
    }

    .logos {
        gap: 16px 22px;
        padding: 18px;
    }

    .logos img {
        max-width: 96px;
        max-height: 34px;
    }

}
