@import url('https://fonts.googleapis.com/css2?family=Jersey+20&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    /* color */
    --bg-void: #0b141b;
    --card-glass: rgba(255, 255, 255, 0.14);
    --card-border: rgba(255, 255, 255, 0.35);
    --teal: #63e6e2;
    --teal-strong: #a5fffa;
    --teal-ink: #062b35;
    --indigo: #263b73;
    --indigo-strong: #344f91;
    --brass: #c9a25a;
    --ink: #ffffff;
    --ink-muted: rgba(255, 255, 255, 0.82);
    --paper: #efe8d8;
    --paper-line: rgba(32, 26, 18, 0.08);
    --paper-ink: #221c12;
    --paper-ink-muted: #57503f;

    /* type */
    --font-display: "Jersey 20", sans-serif;
    --font-body: "Outfit", sans-serif;
}

* {
    margin: 0px;
    padding: 0px;
    box-sizing: border-box;
}

body {
    background: var(--bg-void);
    font-family: var(--font-body);
}

html {
    scroll-behavior: smooth;
}

/* ---------- hero ---------- */

main {
    position: relative;
    min-height: 100vh;
    background-image: url("img/zamek2.png");
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-color: var(--bg-void);
}

main::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 14, 20, 0.2), rgba(5, 14, 20, 0.5));
    pointer-events: none;
}

nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    min-height: 76px;
    padding: 0 28px;
    background-color: rgba(5, 14, 20, 0.48);
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

#logo {
    display: flex;
    align-items: center;
}

#logo img {
    width: 84px;
}

#navigation {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
}

nav a {
    padding: 10px 20px;
    text-decoration: none;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 24px;
    border-radius: 12px;
    transition: background 180ms ease, color 180ms ease;
}

#navigation a + a {
    margin-left: 8px;
}

nav a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

#language-toggle {
    position: absolute;
    top: 50%;
    right: 76px;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    color: var(--teal-ink);
    background: var(--teal);
    border: 1px solid var(--teal-strong);
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 180ms ease, transform 180ms ease;
}

#language-toggle:hover {
    background: var(--teal-strong);
    transform: translateY(calc(-50% - 2px));
}

#nav-toggle {
    grid-column: 3;
    justify-self: end;
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
}

#nav-toggle span {
    display: block;
    height: 2px;
    background: var(--ink);
    border-radius: 2px;
    transition: transform 200ms ease, opacity 200ms ease;
}

.main-text {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(880px, calc(100% - 32px));
    padding: 28px 32px 32px;
    box-sizing: border-box;
    transform: translate(-50%, -50%);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 28px;
    text-align: center;
    background: var(--card-glass);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(6px);
}

.main-text::before {
    content: "";
    position: absolute;
    top: 0;
    left: 14%;
    right: 14%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--brass), transparent);
}

.main-text > h1 {
    grid-column: 1 / -1;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(48px, 7vw, 70px);
    letter-spacing: 1px;
}

.recruit-badge {
    grid-column: 1 / -1;
    justify-self: center;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 18px;
    border-radius: 999px;
    background: rgba(255, 223, 64, 0.18);
    border: 1px solid rgba(255, 235, 92, 0.8);
    color: #fff34f;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.recruit-badge::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff34f;
    box-shadow: 0 0 4px 1px rgba(255, 243, 79, 0.35);
    animation: recruit-ping 1.8s ease-out infinite;
}

@keyframes recruit-ping {
    0%, 100% {
        opacity: 0.75;
        box-shadow: 0 0 4px 1px rgba(255, 243, 79, 0.35);
    }
    50% {
        opacity: 1;
        box-shadow: 0 0 8px 2px rgba(255, 243, 79, 0.8);
    }
}

@media (prefers-reduced-motion: reduce) {
    .recruit-badge::before {
        animation: none;
    }
}

.brand-accent {
    color: rgb(12, 255, 255);
}

#main-text-map,
#main-text-reg {
    min-width: 0;
    padding: 12px 18px;
    color: var(--ink);
    text-align: center;
}

#main-text-map h2 {
    margin-bottom: 12px;
    font-family: var(--font-display);
    font-size: 40px;
    letter-spacing: 0.5px;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.3);
}

#main-text-map p,
#main-text-reg p {
    margin-bottom: 8px;
    font-size: 17px;
    line-height: 1.45;
    color: var(--ink-muted);
}

#main-text-reg {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-left: 1px solid rgba(255, 255, 255, 0.18);
}

.discord-icon {
    display: block;
    width: 11
    6px;
    height: 116px;
    margin: 0 auto -10px;
    object-fit: contain;
}

#main-text-map a,
#main-text-reg a {
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    margin-top: 22px;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.2px;
    transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

#main-text-map a {
    color: var(--teal-ink);
    background: var(--teal);
    border: 1px solid var(--teal-strong);
    box-shadow: 0 8px 24px rgba(40, 229, 224, 0.3);
    animation: button-pulse 5s ease-in-out infinite;
}

#main-text-map a::after {
    content: "";
    position: absolute;
    top: 0;
    left: -35%;
    width: 22%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.75), transparent);
    filter: blur(2px);
    transform: translateX(-250%);
    animation: button-shine 5s ease-in-out infinite;
    pointer-events: none;
}

#main-text-map a:hover {
    background: var(--teal-strong);
    box-shadow: 0 10px 30px rgba(40, 229, 224, 0.5);
    transform: translateY(-3px);
}

#main-text-reg a {
    color: var(--ink);
    background: var(--indigo);
    border: 1px solid #7187c4;
    box-shadow: 0 8px 24px rgba(38, 59, 115, 0.35);
}

#main-text-reg a:hover {
    background: var(--indigo-strong);
    box-shadow: 0 10px 30px rgba(38, 59, 115, 0.5);
    transform: translateY(-3px);
}

@keyframes button-shine {
    0%, 65% { transform: translateX(-250%); }
    85%, 100% { transform: translateX(650%); }
}

@keyframes button-pulse {
    0%, 55%, 100% {
        scale: 1;
        box-shadow: 0 8px 24px rgba(40, 229, 224, 0.3);
    }
    75% {
        scale: 1.035;
        box-shadow: 0 10px 30px rgba(40, 229, 224, 0.55);
    }
}

@media (prefers-reduced-motion: reduce) {
    #main-text-map a,
    #main-text-map a::after {
        animation: none;
    }
}

/* ---------- about ---------- */

#onas {
    position: relative;
    scroll-margin-top: 76px;
    background:
        repeating-linear-gradient(0deg, var(--paper-line) 0 1px, transparent 1px 64px),
        repeating-linear-gradient(90deg, var(--paper-line) 0 1px, transparent 1px 64px),
        var(--paper);
    padding: 88px 28px;
}

#onas::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: var(--brass);
}

.onas-intro {
    max-width: 640px;
    margin: 0 auto 56px;
    text-align: center;
}
.onas-intro a {
    text-decoration: none;
    color: var(--brass);
}
.onas-intro a:hover {
    text-decoration: none;
    color: #c08e31;
}
.onas-intro h2 {
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 48px);
    color: var(--paper-ink);
    letter-spacing: 0.5px;
    margin-bottom: 18px;
}

.onas-intro p {
    font-size: 17px;
    line-height: 1.65;
    color: var(--paper-ink-muted);
}

.onas-features {
    max-width: 980px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
}

.feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 0 12px;
}

.feature-icon {
    display: block;
    width: 72px;
    height: 72px;
    margin-bottom: 14px;
    image-rendering: pixelated;
    object-fit: contain;
    object-position: center;
}

.feature h3 {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 18px;
    color: var(--paper-ink);
    margin-bottom: 8px;
}

.feature p {
    font-size: 15px;
    line-height: 1.55;
    color: var(--paper-ink-muted);
}

/* ---------- sources ---------- */

#zrodla {
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.42)), url("img/kamienica1.png");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    padding: 88px 28px;
    border-top: 1px solid rgba(32, 26, 18, 0.08);
}

#zrodla .sources-intro,
#zrodla .sources-list {
    position: relative;
    z-index: 1;
}

.sources-intro {
    max-width: 640px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-kicker {
    margin-bottom: 10px;
    color: var(--brass);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.sources-intro h2 {
    margin-bottom: 14px;
    color: var(--ink);
    font-family: var(--font-display);
    font-size: clamp(36px, 4vw, 48px);
    text-shadow: 0 3px 14px rgba(0, 0, 0, 0.65);
}

.sources-intro > p:last-child {
    color: var(--ink);
    font-size: 17px;
    line-height: 1.6;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.65);
}

.sources-list {
    max-width: 780px;
    margin: 0 auto;
    display: grid;
    gap: 14px;
}

.source-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 18px;
    padding: 20px 22px;
    color: var(--paper-ink);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(32, 26, 18, 0.14);
    border-radius: 4px;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(32, 26, 18, 0.08);
    transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.source-item:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(201, 162, 90, 0.55);
    box-shadow: 0 12px 24px rgba(32, 26, 18, 0.12);
    transform: translateY(-3px);
}

.source-number {
    color: var(--brass);
    font-family: var(--font-display);
    font-size: 24px;
}

.source-item strong,
.source-item small {
    display: block;
}

.source-item strong {
    margin-bottom: 4px;
    font-size: 17px;
}

.source-item small {
    color: var(--paper-ink-muted);
    font-size: 14px;
}

.source-arrow {
    color: var(--brass);
    font-size: 24px;
}

/* ---------- footer ---------- */

footer {
    background: var(--bg-void);
    padding: 40px 28px;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    font-family: var(--font-display);
    font-size: 22px;
    color: var(--ink);
    letter-spacing: 0.5px;
}

.footer-brand span {
    color: var(--ink-muted);
    font-family: var(--font-body);
    font-size: 14px;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    grid-column: 2;
    grid-row: 1;
    transform: translateY(8px);
}

.footer-links a {
    min-width: 76px;
    padding: 8px 10px;
    color: var(--ink-muted);
    text-decoration: none;
    font-size: 15px;
    text-align: center;
    border-radius: 8px;
    transition: color 180ms ease;
}

.footer-links a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, 0.1);
}

.footer-note {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.4);
}

/* ---------- responsive ---------- */

@media (max-width: 780px) {
    #navigation {
        position: fixed;
        z-index: 30;
        top: 76px;
        left: 0;
        right: 0;
        grid-column: unset;
        flex-direction: column;
        background: rgba(5, 14, 20, 0.92);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        padding: 12px;
        transform: translateY(-12px);
        opacity: 0;
        pointer-events: none;
        transition: transform 200ms ease, opacity 200ms ease;
    }

    #navigation.is-open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    #navigation a + a {
        margin-left: 0;
    }

    nav a {
        padding: 14px 16px;
        text-align: center;
    }

    #nav-toggle {
        display: flex;
    }

    #language-toggle {
        right: 60px;
    }

    #nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    #nav-toggle.is-open span:nth-child(2) { opacity: 0; }
    #nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    .main-text {
        grid-template-columns: 1fr;
    }

    .main-text > h1 {
        font-size: 52px;
    }

    #main-text-reg {
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.18);
        padding-top: 20px;
    }

    .onas-features {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    footer {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-links,
    .footer-note {
        grid-column: auto;
        justify-self: center;
    }
}