/* ==========================================
   G L I T C H V E X — style.css
   Redesign pass: tokens, type, layout, motion
========================================== */

:root{
    /* ---- Color tokens ---- */
    --bg:            #06060a;
    --surface:       #0f0f16;
    --surface-2:     #15151f;
    --border:        #24242f;
    --border-soft:   #1a1a24;
    --text:          #f3f3f6;
    --text-muted:    #9797a6;
    --accent:        #ffffff;
    --accent-soft:   rgba(255, 255, 255, .10);
    --accent-2:      #d5d5d5;
    --danger:        #ffffff;

    /* ---- Type scale ---- */
    --font-display:  'Space Grotesk', 'Poppins', sans-serif;
    --font-body:     'Inter', 'Poppins', sans-serif;
    --font-mono:     'JetBrains Mono', 'Courier New', monospace;

    /* ---- Spacing scale ---- */
    --space-1: 8px;
    --space-2: 16px;
    --space-3: 24px;
    --space-4: 40px;
    --space-5: 64px;
    --space-6: 100px;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    font-family:var(--font-body);
    background:var(--bg);
    color:var(--text);
    line-height:1.65;
    position:relative;
    overflow-x:hidden;
    -webkit-font-smoothing:antialiased;
}

::selection{
    background:var(--accent);
    color:#fff;
}

/* ===== BACKGROUND GLOW ===== */

body::before, body::after {
    content: '';
    position: fixed;
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    pointer-events: none;
}

body::before {
    top: -160px;
    left: -160px;
}

body::after {
    bottom: -160px;
    right: -160px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
}

/* ===== SCROLLBAR ===== */

::-webkit-scrollbar{
    width:10px;
}

::-webkit-scrollbar-track{
    background:var(--surface);
}

::-webkit-scrollbar-thumb{
    background:var(--border);
    border-radius:20px;
}

::-webkit-scrollbar-thumb:hover{
    background:var(--accent);
}

/* ===== FOCUS VISIBILITY ===== */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible{
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

/* ===== LINKI ===== */

a{
    color:var(--text);
    text-decoration:none;
}

/* ===== KONTENER ===== */

.container{
    width:90%;
    max-width:1240px;
    margin:auto;
}

/* ===== HEADER ===== */

header{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    background:rgba(6, 6, 10, 0.82);
    backdrop-filter: blur(10px);
    border-bottom:1px solid var(--border-soft);
    z-index:999;
}

/* ===== MENU ===== */

nav{
    height:76px;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.logo{
    font-family:var(--font-display);
    font-size:26px;
    font-weight:700;
    letter-spacing:.5px;
    color:var(--text);
}

.logo span{
    color:var(--accent);
}

nav ul{
    display:flex;
    list-style:none;
    gap:8px;
}

nav ul li a{
    display:block;
    padding:8px 14px;
    border-radius:999px;
    color:var(--text-muted);
    font-weight:500;
    font-size:15px;
    transition:.25s ease;
}

nav ul li a:hover{
    color:var(--text);
    background:var(--surface-2);
}

nav ul li a.active{
    color:var(--text);
    background:var(--accent-soft);
}

.menu-btn{
    display:none;
    font-size:26px;
    cursor:pointer;
    color:var(--text);
}

/* ===== HERO ===== */

.hero{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:140px 20px 60px;
}

.hero-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
    text-align: left;
}

.hero-text {
    flex: 1.1;
}

.hero-decoration {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.eyebrow{
    display:inline-block;
    font-size:14px;
    color:var(--accent-2);
    font-weight:600;
    margin-bottom:18px;
}

.hero h1{
    font-family:var(--font-display);
    font-size:64px;
    font-weight:700;
    line-height:1.08;
    margin-bottom:22px;
    letter-spacing:-1px;
}

.hero p{
    max-width:520px;
    color:var(--text-muted);
    font-size:18px;
}

.hero-buttons{
    margin-top:40px;
    display:flex;
    gap:16px;
    flex-wrap:wrap;
}

/* ===== TERMINAL CARD ===== */

.cyber-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 380px;
    padding: 22px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    animation: floatCard 6s ease-in-out infinite;
}

.card-header {
    display: flex;
    gap: 8px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 12px;
}

.dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.card-body {
    font-family: var(--font-mono);
    color: var(--accent-2);
    font-size: 14px;
    line-height: 1.9;
}

.code-line {
    margin: 6px 0;
}

.code-line.typing {
    border-right: 2px solid var(--accent-2);
    white-space: nowrap;
    overflow: hidden;
    width: 21ch;
    animation: typing 3s steps(21, end) infinite alternate, blink-caret 0.75s step-end infinite;
}

.code-line.glow {
    color: var(--text);
    text-shadow: 0 0 12px rgba(255, 255, 255, .4);
    margin-top: 18px;
    font-weight: 600;
    letter-spacing: 1px;
}

@keyframes typing {
    0%, 20% { width: 0; }
    80%, 100% { width: 21ch; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--accent-2); }
}

@keyframes floatCard {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-14px); }
}

/* ===== PRZYCISKI ===== */

.button{
    display:inline-block;
    padding:14px 32px;
    border:1px solid var(--border);
    border-radius:999px;
    background:transparent;
    color:var(--text);
    transition:.25s ease;
    font-weight:600;
    font-size:15px;
}

.button:hover{
    border-color:var(--accent);
    background:var(--accent-soft);
}

.secondary{
    background:var(--accent);
    color:#000;
    border-color:var(--accent);
}

.secondary:hover{
    background:#d5d5d5;
    border-color:#d5d5d5;
}

/* ===== SEKCJE ===== */

section{
    padding:var(--space-6) 0;
    background:var(--bg);
}

h2{
    font-family:var(--font-display);
    font-size:36px;
    font-weight:700;
    margin-bottom:var(--space-4);
    text-align:left;
    letter-spacing:-.5px;
}

/* ===== KARTY (info panel) ===== */

.card{
    background:var(--surface);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    padding:42px;
}

.card h2{
    margin-bottom:16px;
}

.card p{
    color:var(--text-muted);
}

/* ===== GRID ===== */

.services-grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:1px;
    background:var(--border);
    border:1px solid var(--border);
    border-radius:var(--radius-lg);
    overflow:hidden;
}

/* ===== SERVICE CARD (refined: quiet list-in-grid, accent on hover only) ===== */

.service-card{
    background:var(--surface);
    padding:36px 32px;
    text-align:left;
    transition:.25s ease;
    border-top:2px solid transparent;
}

.service-card:hover{
    background:var(--surface-2);
    border-top-color:var(--accent);
}

.service-card h3{
    margin-bottom:18px;
}

.icon{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:44px;
    height:44px;
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
}

.icon svg{
    width:22px;
    height:22px;
    stroke:var(--text);
    fill:none;
    stroke-width:1.5;
    stroke-linecap:round;
    stroke-linejoin:round;
}

.card h2 .icon{
    width:34px;
    height:34px;
    vertical-align:middle;
    margin-right:10px;
}

.card h2 .icon svg{
    width:18px;
    height:18px;
}

.service-card h4{
    font-family:var(--font-display);
    font-size:20px;
    font-weight:600;
    margin-bottom:10px;
}

.service-card p{
    color:var(--text-muted);
    font-size:15px;
}

/* ===== FORMULARZ ===== */

form{
    width:100%;
    max-width:640px;
    margin:var(--space-4) auto 0;
    display:flex;
    flex-direction:column;
    gap:14px;
}

input,
textarea{
    width:100%;
    padding:15px 16px;
    background:var(--surface);
    color:var(--text);
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    outline:none;
    font-size:15px;
    font-family:var(--font-body);
    transition:.2s ease;
}

input::placeholder,
textarea::placeholder{
    color:var(--text-muted);
}

input:focus,
textarea:focus{
    border-color:var(--accent);
    box-shadow:0 0 0 3px var(--accent-soft);
}

textarea{
    min-height:160px;
    resize:vertical;
}

button{
    padding:15px;
    background:var(--accent);
    color:#000;
    border:none;
    border-radius:var(--radius-sm);
    font-size:16px;
    font-weight:600;
    cursor:pointer;
    transition:.2s ease;
}

button:hover{
    background:#d5d5d5;
}

/* ===== FOOTER ===== */

footer{
    margin-top:var(--space-5);
    padding:var(--space-5) 0 var(--space-3);
    border-top:1px solid var(--border-soft);
    background:var(--surface);
}

footer h2{
    margin-bottom:8px;
    text-align:center;
}

footer .container > p{
    text-align:center;
    color:var(--text-muted);
    margin-bottom: 8px;
}

.copyright{
    margin-top:var(--space-3);
    text-align:center;
    color:var(--text-muted);
    font-size:14px;
}

/* ===== ENTRY MOTION (single, quiet) ===== */

.hero{
    animation:fadeUp .7s ease;
}

@keyframes fadeUp{
    from{
        opacity:0;
        transform:translateY(24px);
    }
    to{
        opacity:1;
        transform:translateY(0);
    }
}

.reveal{
    opacity:0;
    transform:translateY(28px);
    transition:opacity .6s ease, transform .6s ease;
}

.reveal.is-visible{
    opacity:1;
    transform:translateY(0);
}

@media (prefers-reduced-motion: reduce){
    *{
        animation-duration:0.001ms !important;
        animation-iteration-count:1 !important;
        transition-duration:0.001ms !important;
    }
}

/* ===== RESPONSYWNOŚĆ ===== */

@media (max-width:1000px){
    .services-grid{
        grid-template-columns:1fr 1fr;
    }
}

@media (max-width:768px){
    .menu-btn{
        display:block;
    }

    nav{
        position:relative;
    }

    nav ul{
        display:none;
        position:absolute;
        top:70px;
        right:0;
        width:220px;
        background:var(--surface);
        border:1px solid var(--border);
        border-radius:var(--radius-md);
        flex-direction:column;
        gap:6px;
        padding:16px;
    }

    nav ul.open{
        display:flex;
    }

    nav ul li a{
        display:block;
    }

    .hero{
        min-height:80vh;
        padding-top:130px;
    }

    .hero-layout {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .hero-text{
        max-width:none;
    }

    .hero p{
        margin:0 auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero h1{
        font-size:42px;
    }

    .hero p{
        font-size:16px;
    }

    .cyber-card {
        max-width: 100%;
        animation: none;
    }

    h2{
        font-size:28px;
        text-align:center;
    }

    .services-grid{
        grid-template-columns:1fr;
    }

    .service-card{
        text-align:center;
    }

    .card{
        padding:28px;
    }

    .button{
        width:100%;
        text-align:center;
    }
}

@media (max-width:480px){
    .logo{
        font-size:22px;
    }

    .hero h1{
        font-size:34px;
    }

    .hero p{
        font-size:15px;
    }

    h2{
        font-size:24px;
    }

    input,
    textarea,
    button{
        font-size:15px;
    }

    footer{
        padding:50px 0 25px;
    }
}

/* ===== EFEKT GLITCH ===== */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg);
    overflow: hidden;
}

.glitch-text::before {
    left: 3px;
    text-shadow: -2px 0 var(--danger);
    animation: glitch-anim-1 4s infinite linear alternate-reverse;
}

.glitch-text::after {
    left: -3px;
    text-shadow: 2px 0 var(--accent-2);
    animation: glitch-anim-2 3.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
    0% { clip-path: inset(10% 0 60% 0); transform: translate(-3px, 0); }
    5% { clip-path: inset(80% 0 5% 0); transform: translate(3px, 0); }
    10% { clip-path: inset(40% 0 30% 0); transform: translate(-3px, 0); }
    15% { clip-path: inset(20% 0 80% 0); transform: translate(3px, 0); }
    20%, 90% { clip-path: inset(0% 0 100% 0); transform: translate(0, 0); }
    95% { clip-path: inset(30% 0 50% 0); transform: translate(3px, 0); }
    100% { clip-path: inset(10% 0 60% 0); transform: translate(-3px, 0); }
}

@keyframes glitch-anim-2 {
    0% { clip-path: inset(20% 0 80% 0); transform: translate(3px, 0); }
    5% { clip-path: inset(10% 0 60% 0); transform: translate(-3px, 0); }
    10% { clip-path: inset(80% 0 5% 0); transform: translate(3px, 0); }
    15% { clip-path: inset(40% 0 30% 0); transform: translate(-3px, 0); }
    20%, 92% { clip-path: inset(0% 0 100% 0); transform: translate(0, 0); }
    96% { clip-path: inset(60% 0 10% 0); transform: translate(-3px, 0); }
    100% { clip-path: inset(70% 0 20% 0); transform: translate(-3px, 0); }
}
/* ===== KONIEC ===== */