:root {
    --bg: #050912;
    --card: #0f172a;
    --border: rgba(255, 255, 255, .08);
    --accent: #00d4ff;
    --accent2: #00ff88;
    --text: #f3f4f6;
    --muted: #94a3b8;
}

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

body {
    font-family: 'Inter', Arial, sans-serif;
    background: radial-gradient(circle at top right, rgba(0, 212, 255, .08), transparent 30%),
                radial-gradient(circle at bottom left, rgba(0, 255, 136, .06), transparent 30%),
                #050912;
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.7;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(0, 212, 255, .03) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(0, 212, 255, .03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: -1;
    animation: gridMove 18s linear infinite;
}

@keyframes gridMove {
    0% { transform: translateY(0); }
    100% { transform: translateY(60px); }
}

.container {
    width: 92%;
    max-width: 1450px;
    margin: auto;
}

header {
    position: sticky;
    top: 0;
    background: rgba(5, 9, 18, .86);
    backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border);
    z-index: 999;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 22px 0;
}

.logo {
    font-size: 24px;
    font-weight: 800;
}

.logo span {
    color: var(--accent);
}

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

nav a {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    transition: .3s;
}

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

.hero {
    padding: 120px 0 90px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    width: 900px;
    height: 900px;
    right: -300px;
    top: -300px;
    background: radial-gradient(circle, rgba(0, 212, 255, .12), transparent 60%);
    filter: blur(50px);
    pointer-events: none;
    z-index: 0;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 70px;
    align-items: center;
    position: relative;
    z-index: 5;
}

.badge {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 999px;
    background: rgba(0, 212, 255, .08);
    border: 1px solid rgba(0, 212, 255, .25);
    color: var(--accent);
    font-size: 12px;
    margin-bottom: 24px;
}

h1 {
    font-size: 82px;
    line-height: .92;
    letter-spacing: -4px;
    margin-bottom: 26px;
}

.hero p {
    font-size: 21px;
    max-width: 760px;
    color: var(--muted);
}

.buttons {
    display: flex;
    gap: 18px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 28px;
    border-radius: 18px;
    font-weight: 700;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    color: #000;
}

.btn-secondary {
    border: 1px solid var(--border);
    color: var(--text);
}

.glass {
    background: rgba(15, 23, 42, .72);
    backdrop-filter: blur(18px);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .4);
}

.metric {
    padding: 24px;
    background: #0d1424;
    border: 1px solid var(--border);
    border-radius: 20px;
    margin-bottom: 18px;
}

.metric h3 {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 8px;
}

.metric strong {
    font-size: 36px;
}

.section {
    padding: 100px 0;
}

.section-title {
    font-size: 54px;
    letter-spacing: -2px;
    margin-bottom: 18px;
}

.section-desc {
    font-size: 18px;
    max-width: 850px;
    color: var(--muted);
    margin-bottom: 50px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.card {
    background: linear-gradient(180deg, #0d1424, #101827);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 36px;
    transition: .35s;
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, .25);
}

.card h3 {
    font-size: 26px;
    margin-bottom: 16px;
}

.card p {
    color: var(--muted);
}

/* === RESEARCH GRID (3 kolumny) === */
.research-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.research-card {
    background: linear-gradient(180deg, #0d1424, #101827);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 32px;
    transition: all 0.35s ease;
    display: flex;
    flex-direction: column;
}

.research-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 212, 255, 0.4);
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.12);
}

.research-icon {
    font-size: 48px;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 8px rgba(0, 212, 255, 0.4));
}

.research-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.research-card p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 24px;
    flex-grow: 1;
}

.research-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.research-link:hover {
    color: var(--accent2);
    gap: 10px;
}

.highlight-card {
    border-color: rgba(0, 212, 255, 0.3);
    background: linear-gradient(180deg, #0f1a2e, #0b1220);
}

/* === PHONE SECTION === */
.phone-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 70px;
    align-items: center;
}

.phone {
    width: 340px;
    height: 700px;
    margin: auto;
    border-radius: 48px;
    background: #0c1424;
    border: 2px solid rgba(255, 255, 255, .08);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 100px rgba(0, 212, 255, .18);
}

.phone-screen {
    position: absolute;
    inset: 24px;
    border-radius: 30px;
    background: linear-gradient(180deg, #09111e, #111827);
    overflow: hidden;
    padding: 22px;
}

.pcb {
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .08;
    background-image: linear-gradient(90deg, transparent 48%, rgba(0, 255, 136, .4) 50%, transparent 52%),
                      linear-gradient(transparent 48%, rgba(0, 212, 255, .3) 50%, transparent 52%);
    background-size: 80px 80px;
    animation: pcbMove 12s linear infinite;
}

@keyframes pcbMove {
    0% { transform: translateX(0); }
    100% { transform: translateX(80px); }
}

.phone-layer {
    padding: 14px;
    margin-bottom: 12px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .05);
    background: rgba(255, 255, 255, .03);
    position: relative;
    font-size: 13px;
}

.phone-layer strong {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 15px;
}

.attack {
    position: absolute;
    right: -70px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    padding: 6px 10px;
    background: #09111e;
    border: 1px solid rgba(255, 0, 0, .25);
    color: #ff6b6b;
    border-radius: 12px;
    white-space: nowrap;
}

/* === GALERIA ZDJĘĆ === */
.image-container {
    background: #0a0f1a;
    border-radius: 8px;
    padding: 10px;
    border: 1px solid #2a3a4a;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 180px;
    overflow: hidden;
}

.image-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.image-caption {
    font-size: 0.8rem;
    margin-top: 8px;
    text-align: center;
    color: var(--muted);
}

/* === FORMULARZ === */
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px;
    margin-top: 8px;
    background: #0b1220;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 14px;
    color: white;
}

/* === FOOTER === */
footer {
    padding: 70px 0;
    margin-top: 80px;
    border-top: 1px solid var(--border);
    color: var(--muted);
}

/* === FULLSCREEN MODAL === */
.firmware-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: .25s ease;
    padding: 40px;
}

.firmware-modal.active {
    opacity: 1;
    visibility: visible;
}

.firmware-modal img {
    max-width: 95vw;
    max-height: 92vh;
    border-radius: 20px;
    box-shadow: 0 0 60px rgba(0, 255, 255, .25);
}

.firmware-close {
    position: absolute;
    top: 24px;
    right: 40px;
    color: #fff;
    font-size: 42px;
    cursor: pointer;
}

/* === ARCHITECTURE MODAL === */
.phone-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.architecture-image {
    max-width: 520px;
    width: 100%;
    height: auto;
    border-radius: 24px;
    cursor: pointer;
    transition: transform .25s ease, box-shadow .25s ease;
    box-shadow: 0 0 40px rgba(0, 180, 255, .18);
}

.architecture-image:hover {
    transform: scale(1.02);
}

.architecture-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .92);
    justify-content: center;
    align-items: center;
    padding: 40px;
    cursor: pointer;
}

.architecture-modal-image {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 0 60px rgba(0, 180, 255, .25);
}

/* === PGP & WHATSAPP === */
.gg-footer-ai {
    padding-top: 30px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.gg-footer-brand {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 1px;
}

.gg-footer-whatsapp {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #25D366;
}

.gg-status-dot {
    width: 10px;
    height: 10px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 0 15px #25D366;
    animation: ggpulse 2s infinite;
}

@keyframes ggpulse {
    0% { opacity: 1; }
    50% { opacity: .3; }
    100% { opacity: 1; }
}

.pgp-full-block {
    margin-top: 30px;
    padding: 25px;
    border-radius: 18px;
    background: #09111f;
    overflow: auto;
    font-size: 12px;
    line-height: 1.6;
    border: 1px solid rgba(0, 255, 255, .15);
}

.pgp-full-block pre {
    white-space: pre-wrap;
    color: #7ee7ff;
}

.pgp-secure-contact-box {
    margin-top: 40px;
    padding: 35px;
    border-radius: 24px;
    background: #09111f;
    border: 1px solid rgba(0, 255, 255, .12);
}

.pgp-fingerprint {
    margin-top: 20px;
    margin-bottom: 20px;
    color: #7ee7ff;
    line-height: 1.8;
}

/* === TELEMETRY / SERVICE CARDS === */
.telemetry-card,
.service-card,
.case-card {
    transition: all .25s ease;
}

.telemetry-card:hover,
.service-card:hover,
.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 0 35px rgba(0, 255, 255, .12);
}

/* === RESPONSYWNOŚĆ === */
@media (max-width: 1200px) {
    .research-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 980px) {
    .hero-grid,
    .phone-section {
        grid-template-columns: 1fr;
    }
    nav ul {
        display: none;
    }
    h1 {
        font-size: 54px;
        line-height: 1;
    }
    .phone {
        width: 100%;
        max-width: 340px;
        height: 680px;
    }
    .section-title {
        font-size: 42px;
    }
    .mobile-toggle {
        display: block;
        cursor: pointer;
        color: #fff;
        font-size: 28px;
    }
    .main-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: #050816;
        padding: 20px;
        border-top: 1px solid rgba(0, 255, 255, .12);
    }
    .main-nav.active {
        display: block;
    }
    .main-nav ul {
        flex-direction: column;
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .research-grid {
        grid-template-columns: 1fr;
    }
    .image-container {
        height: 150px;
    }
    .research-card {
        padding: 28px;
    }
    .research-icon {
        font-size: 40px;
    }
    .research-card h3 {
        font-size: 22px;
    }
    .section {
        padding: 60px 0;
    }
    .hero {
        padding: 80px 0 50px;
    }
}
/* === SOON BADGE DLA RESEARCH CARD === */
.research-soon {
    display: inline-block;
    margin-top: 20px;
    padding: 6px 14px;
    background: rgba(0, 212, 255, 0.1);
    border: 1px solid rgba(0, 212, 255, 0.4);
    border-radius: 40px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.5px;
    text-align: center;
    align-self: flex-start;
}

@media (max-width: 480px) {
    .image-container {
        height: 120px;
    }
    .container {
        width: 95%;
    }
    h1 {
        font-size: 42px;
        letter-spacing: -2px;
    }
    .section-title {
        font-size: 32px;
    }
    .btn {
        padding: 12px 20px;
    }
}