:root {
    --bg: #12100D;
    --bg-alt: #1B1712;
    --bg-card: #1E1A14;
    --line: rgba(232, 196, 140, 0.14);
    --line-strong: rgba(232, 196, 140, 0.28);
    --gold: #D9A441;
    --gold-deep: #B9832D;
    --teal: #4C9186;
    --discord: #5865F2;
    --discord-hover: #4752C4;
    --text: #F3EEE4;
    --text-muted: #A79C8D;
    --text-dim: #6E6455;

    --font-display: 'Oswald', sans-serif;
    --font-body: 'Work Sans', sans-serif;
    --font-mono: 'Space Mono', monospace;
}

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

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

h1, h2, h3, .logo, .footer-logo {
    font-family: var(--font-display);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

a { color: inherit; }

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2c2419; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-deep); }

/* --- Grain, subtelna tekstura zamiast animowanych blobów --- */
.grain {
    position: fixed; inset: 0;
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="120" height="120"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
    opacity: 0.035;
    z-index: 1000;
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* --- Nawigacja --- */
.navbar {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 22px 0;
    z-index: 900;
    transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease;
    border-bottom: 1px solid transparent;
}

.navbar.scrolled {
    background: rgba(18, 16, 13, 0.92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
    padding: 14px 0;
}

.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo, .footer-logo {
    font-size: 22px; font-weight: 700; letter-spacing: 1px;
    text-decoration: none;
}
.logo span, .footer-logo span { color: var(--gold); }

.nav-links { list-style: none; display: flex; gap: 34px; }

.nav-links a {
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--gold); }

/* --- Przyciski --- */
.btn {
    padding: 11px 22px;
    border-radius: 2px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 1px solid transparent;
}

.btn-large { padding: 16px 28px; font-size: 13px; }

.btn-discord-outline {
    background: transparent;
    color: var(--text);
    border-color: var(--discord);
}
.btn-discord-outline:hover { background: rgba(88, 101, 242, 0.12); }

.btn-discord {
    background: var(--discord);
    color: #fff;
    border-color: var(--discord);
}
.btn-discord:hover {
    background: var(--discord-hover);
    border-color: var(--discord-hover);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--line-strong);
}
.btn-ghost:hover { color: var(--gold); border-color: var(--gold); }

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 140px 24px 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute; inset: 0;
    background: url('screen.png') center 35%/cover no-repeat;
    transform: scale(1.04);
    z-index: 1;
}

.hero-overlay {
    position: absolute; inset: 0;
    background:
        linear-gradient(180deg, rgba(18,16,13,0.55) 0%, rgba(18,16,13,0.75) 45%, var(--bg) 96%),
        linear-gradient(90deg, rgba(18,16,13,0.9) 0%, rgba(18,16,13,0.15) 45%, rgba(18,16,13,0.15) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.status-tag {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    background: rgba(18,16,13,0.6);
    border: 1px solid var(--line-strong);
    padding: 7px 14px;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 28px;
}

.pulse-dot {
    width: 7px; height: 7px;
    background: var(--teal);
    border-radius: 50%;
    box-shadow: 0 0 8px var(--teal);
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.hero h1 {
    font-size: 60px;
    font-weight: 700;
    line-height: 1.02;
    margin-bottom: 22px;
    letter-spacing: -0.5px;
}
.hero h1 span { color: var(--gold); }

.hero-lede {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 520px;
    margin: 0 auto 36px;
}

/* Permit / plakietka daty startu — element sygnaturowy */
.permit {
    position: relative;
    display: inline-block;
    background: rgba(27, 23, 18, 0.75);
    backdrop-filter: blur(6px);
    border: 1px dashed var(--line-strong);
    padding: 16px 24px 14px;
    margin-bottom: 40px;
}

.permit::before, .permit::after {
    content: '';
    position: absolute;
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--bg);
    border: 1px dashed var(--line-strong);
    top: 50%;
    transform: translateY(-50%);
}
.permit::before { left: -6px; }
.permit::after { right: -6px; }

.permit-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-dim);
    margin-bottom: 6px;
}

.permit-row--bottom {
    margin-top: 8px;
    margin-bottom: 0;
    padding-top: 8px;
    border-top: 1px dashed var(--line);
    font-size: 10px;
    color: var(--text-dim);
}

.glitch-date {
    font-family: var(--font-mono);
    font-size: 32px;
    font-weight: 700;
    color: var(--gold);
    letter-spacing: 2px;
    cursor: default;
}

.hero-buttons { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }

/* --- Pasek "tablicy rejestracyjnej" (statystyki) --- */
.plate-strip {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    padding: 36px 0;
    position: relative;
    z-index: 10;
}

.plate-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 28px;
}

.plate-item {
    text-align: center;
    padding: 0 24px;
    position: relative;
}

.plate-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -14px; top: 50%;
    transform: translateY(-50%);
    width: 1px; height: 34px;
    background-image: linear-gradient(var(--line-strong) 50%, transparent 0%);
    background-size: 1px 8px;
}

.plate-number {
    font-family: var(--font-mono);
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
}

.plate-plus { font-family: var(--font-mono); font-size: 22px; color: var(--gold); }

.plate-label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
}

/* --- Ogólne sekcje --- */
.section { padding: 110px 24px; position: relative; z-index: 5; }
.section-container { max-width: 1300px; margin: 0 auto; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 16px;
}

.section-title { margin-bottom: 56px; max-width: 640px; }
.section-title h2 { font-size: 34px; line-height: 1.15; margin-bottom: 18px; }
.section-title h2 span { color: var(--gold); }
.section-title p { color: var(--text-muted); font-size: 16px; }

/* --- Karty (O serwerze) --- */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.card {
    background: var(--bg);
    padding: 38px;
    transition: background 0.25s ease;
}
.card:hover { background: var(--bg-card); }

.card-tag {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--teal);
    border: 1px solid rgba(76, 145, 134, 0.4);
    padding: 3px 9px;
    margin-bottom: 20px;
}

.card h3 { font-family: var(--font-body); font-size: 19px; font-weight: 600; text-transform: none; margin-bottom: 12px; letter-spacing: 0; }
.card p { color: var(--text-muted); font-size: 15px; }

/* --- Split layout (mechaniki) --- */
.image-section {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.split-text h2 { font-size: 34px; margin-bottom: 20px; line-height: 1.15; }
.split-text h2 span { color: var(--gold); }
.split-text > p { color: var(--text-muted); margin-bottom: 40px; font-size: 16px; max-width: 480px; }

.feature-list { list-style: none; display: flex; flex-direction: column; gap: 26px; }
.feature-list li { display: flex; gap: 16px; }

.feature-marker {
    flex-shrink: 0;
    width: 8px; height: 8px;
    margin-top: 7px;
    background: var(--gold);
    transform: rotate(45deg);
}

.feature-list h3 { font-family: var(--font-body); font-size: 16px; font-weight: 600; text-transform: none; letter-spacing: 0; margin-bottom: 6px; color: var(--text); }
.feature-list p { color: var(--text-muted); font-size: 14px; }

.split-image { width: 100%; min-height: 460px; position: relative; }

.image-placeholder {
    width: 100%; height: 100%; min-height: 460px;
    background: url('screen.png') center/cover no-repeat;
    border: 1px solid var(--line-strong);
    position: relative;
}

.image-tag {
    position: absolute;
    left: 16px; bottom: 16px;
    background: rgba(18,16,13,0.8);
    backdrop-filter: blur(4px);
    border: 1px solid var(--line-strong);
    padding: 6px 12px;
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--text-muted);
}

/* --- Footer --- */
footer {
    border-top: 1px solid var(--line);
    padding: 50px 24px 36px;
    background: var(--bg);
    position: relative; z-index: 10;
}

.footer-container { max-width: 1300px; margin: 0 auto; }

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.footer-discord-link {
    display: inline-flex; align-items: center; gap: 8px;
    text-decoration: none;
    font-family: var(--font-mono);
    color: var(--text-muted); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
    transition: color 0.2s;
}
.footer-discord-link:hover { color: var(--discord); }

.footer-bottom { color: var(--text-dim); font-size: 12px; font-family: var(--font-mono); }

/* --- Animacje --- */
.fade-up { animation: fadeUpAnim 0.9s ease-out forwards; }
@keyframes fadeUpAnim {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal { opacity: 0; transform: translateY(24px); transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* --- Responsywność --- */
@media (max-width: 992px) {
    .split-layout { grid-template-columns: 1fr; }
    .split-image { min-height: 300px; }
    .image-placeholder { min-height: 300px; }
    .hero h1 { font-size: 46px; }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn-discord-outline { display: none; }
    .hero { padding-top: 120px; }
    .hero h1 { font-size: 38px; }
    .plate-container { justify-content: flex-start; }
    .plate-item { text-align: left; padding: 0; width: 45%; }
    .plate-item::after { display: none; }
    .footer-top { flex-direction: column; gap: 20px; align-items: flex-start; }
}