/* --- RESET I USTAWIENIA GLOBALNE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #000000;
    color: #FFFFFF;
    font-family: 'Cinzel', serif;
    text-align: center;
}

section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 20px;
    border-bottom: 1px solid #222;
}

/* --- SCENA I: PRZEDSIONEK --- */
#przedsionEK {
    /* Ta sekcja dziedziczy style z 'section' */
}

#logo-container img {
    max-width: 200px;
    margin-bottom: 40px;
    animation: levitate 8s ease-in-out infinite;
}

#kredo-container {
    font-size: 1.1em;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 1.6;
}

#scroll-arrow {
    margin-top: 40px;
    font-size: 2em;
    color: #D4AF37; /* Złoto */
    animation: pulse 2s infinite;
}

@keyframes levitate {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

/* --- SCENA II: ZBROJOWNIA --- */
#zbrojownia h1 {
    font-size: 3em;
    margin-bottom: 50px;
}

.galeria-sygnetow {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    width: 100%;
    max-width: 1200px;
}

.sygnet {
    aspect-ratio: 1 / 1;
    background-size: cover;
    background-position: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border: 1px solid #222;
}

.sygnet::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sygnet:hover::after {
    opacity: 1;
}

.sygnet h3 {
    position: absolute;
    bottom: 20px; left: 20px; right: 20px;
    font-size: 1.2em;
    transform: translateY(150%);
    transition: transform 0.3s ease;
    text-shadow: 0px 0px 8px rgba(0, 0, 0, 1);
}

.sygnet:hover h3 {
    transform: translateY(0);
}

/* --- SCENA III: OŁTARZ --- */
.oltarz-text p {
    font-size: 1.2em;
    line-height: 1.8;
}

.oltarz-text h2 {
    font-size: 2.5em;
    margin: 40px 0;
}

#wezwanie-form input {
    background: transparent;
    border: 1px solid #555;
    color: #FFFFFF;
    font-family: 'Cinzel', serif;
    font-size: 1em;
    padding: 15px;
    margin: 5px;
    width: 280px;
    text-align: center;
    transition: border-color 0.3s;
}

#wezwanie-form input:focus {
    outline: none;
    border-color: #D4AF37;
}

#wezwanie-form button {
    background: transparent;
    border: 2px solid #D4AF37;
    color: #D4AF37;
    font-family: 'Cinzel', serif;
    font-size: 1.2em;
    font-weight: 700;
    padding: 13px 30px;
    cursor: pointer;
    margin-top: 20px;
    transition: all 0.3s;
}

#wezwanie-form button:hover {
    background-color: #D4AF37;
    color: #000000;
    transform: scale(1.05);
}

/* --- STOPKA --- */
footer {
    padding: 40px;
    font-size: 0.8em;
    color: #444;
}

/* --- MODAL KODEKSU --- */
#kodeks-modal {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.4s ease, visibility 0s linear 0.4s;
}

#kodeks-modal.modal-visible {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.4s ease;
}

#kodeks-content {
    display: flex;
    width: 80%;
    height: 80%;
    max-width: 1400px;
}

#kodeks-image {
    width: 50%;
    height: 100%;
    object-fit: contain;
}

#kodeks-text-container {
    width: 50%;
    height: 100%;
    padding: 40px;
    overflow-y: auto;
    text-align: left;
}

#kodeks-text-container h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37;
}

#kodeks-text-container p {
    font-family: 'Helvetica Neue', sans-serif;
    line-height: 1.7;
    font-size: 1.1em;
    color: #ccc;
    white-space: pre-wrap;
}

#kodeks-close {
    position: absolute;
    top: 30px;
    right: 30px;
    font-size: 2em;
    cursor: pointer;
    color: #555;
    transition: color 0.3s;
}

#kodeks-close:hover {
    color: #fff;
}

/* --- Styl Paska Przewijania --- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #222; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #555; }


/* --- PROTOKÓŁ PŁYNNEJ MOCY (RESPONSYWNOŚĆ) --- */
@media (max-width: 992px) {
    #kodeks-content {
        flex-direction: column;
        width: 90%;
        height: 90%;
    }
    #kodeks-image {
        width: 100%;
        height: 40%;
    }
    #kodeks-text-container {
        width: 100%;
        height: 60%;
        padding: 20px;
    }
}

@media (max-width: 600px) {
    section {
        padding: 50px 15px;
    }
    #logo-container img {
        max-width: 150px;
    }
    #kredo-container {
        font-size: 1em;
    }
    #zbrojownia h1 {
        font-size: 2.5em;
    }
    .galeria-sygnetow {
        grid-template-columns: 1fr;
    }
    .oltarz-text h2 {
        font-size: 2em;
    }
    #wezwanie-form input {
        width: 100%;
    }
    #kodeks-text-container h2 {
        font-size: 1.5em;
    }
    #kodeks-text-container p {
        font-size: 1em;
    }
}