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

:root {
    --bg:           #080808;
    --bg-2:         #0f0f0f;
    --bg-card:      #141414;
    --text:         #F2F2F2;
    --muted:        #787878;
    --accent:       #3B82F6;
    --accent-2:     #7B61FF;
    --border:       rgba(255,255,255,0.07);
    --font:         'Space Grotesk', sans-serif;
}

html { scroll-behavior: smooth; }

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

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 2px; }

/* ─── NAV ─── */
nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 1000;
    padding: 1.6rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: padding .3s, background .3s, border .3s;
}
nav.scrolled {
    padding: 1rem 3rem;
    background: rgba(8,8,8,.92);
    backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}
.nav-logo {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
    text-decoration: none;
}
.nav-logo span { color: var(--accent); }

.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-size: .88rem;
    font-weight: 500;
    letter-spacing: .02em;
    transition: color .2s;
    position: relative;
}
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1px;
    background: var(--accent);
    transition: width .35s ease;
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.hamburger span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }

/* ─── HERO ─── */
#hero {
    min-height: 100svh;
    display: flex; align-items: center; justify-content: center;
    position: relative;
    padding: 7rem 2rem 4rem;
}

.hero-content { position: relative; z-index: 2; text-align: center; max-width: 960px; }

.hero-name {
    font-size: clamp(3.2rem, 11vw, 9rem);
    font-weight: 700;
    letter-spacing: -.05em;
    line-height: .92;
    margin-bottom: 1.5rem;
    animation: fadeUp .9s ease .18s both;
}
.hero-name .grad {
    background: linear-gradient(120deg, var(--accent-2) 0%, var(--accent) 55%, #fff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-cta {
    display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap;
    animation: fadeUp .9s ease .5s both;
}

.btn {
    display: inline-flex; align-items: center; gap: .55rem;
    font-family: var(--font); font-size: .92rem; font-weight: 600;
    padding: .85rem 1.8rem; border-radius: 100px;
    text-decoration: none; border: none; cursor: pointer;
    transition: transform .25s, box-shadow .25s, background .25s, border-color .25s;
    letter-spacing: .01em;
}
.btn-p { background: var(--accent); color: #000; }
.btn-p:hover { transform: translateY(-3px); box-shadow: 0 20px 45px rgba(59,130,246,.28); }
.btn-s { background: transparent; color: var(--text); border: 1px solid var(--border); }
.btn-s:hover { border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.05); transform: translateY(-3px); }

.scroll-hint {
    position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
    display: flex; flex-direction: column; align-items: center; gap: .5rem;
    color: var(--muted); font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
    animation: fadeIn 1s ease 1.2s both;
}
.scroll-hint .line { width: 1px; height: 38px; background: linear-gradient(to bottom, var(--muted), transparent); animation: pulse 2.2s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:.3} 50%{opacity:1} }

/* ─── BACKGROUND CANVAS ─── */
#bg-canvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ─── SHARED ─── */
section { padding: 8rem 2rem; position: relative; z-index: 1; }
footer  { position: relative; z-index: 1; }
.container { max-width: 1100px; margin: 0 auto; }
.label { display: inline-block; color: var(--accent); font-size: .72rem; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; margin-bottom: .9rem; }
.section-title { font-size: clamp(1.9rem, 4.5vw, 3.4rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.08; margin-bottom: 1.2rem; }

/* ─── SCROLL REVEAL ─── */
.r  { opacity: 0; transform: translateY(44px); transition: opacity .75s ease, transform .75s ease; }
.rl { opacity: 0; transform: translateX(-44px); transition: opacity .75s ease, transform .75s ease; }
.rr { opacity: 0; transform: translateX(44px);  transition: opacity .75s ease, transform .75s ease; }
.r.on, .rl.on, .rr.on { opacity: 1; transform: none; }
.d1 { transition-delay: .1s; }
.d2 { transition-delay: .2s; }
.d3 { transition-delay: .3s; }
.d4 { transition-delay: .4s; }

/* ─── ABOUT ─── */
#rolam { background: #0f0f0f !important; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: center; }

.about-text p { color: var(--muted); font-size: 1.05rem; line-height: 1.85; margin-bottom: 1.4rem; }
.about-text strong { color: var(--text); font-weight: 600; }

.about-photo-wrap {
    position: relative;
    display: flex; align-items: center; justify-content: center;
}
.about-photo-wrap::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 26px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    z-index: 0;
    opacity: .5;
    filter: blur(12px);
}
.about-photo {
    position: relative; z-index: 1;
    width: 100%;
    max-width: 420px;
    aspect-ratio: 3/4;
    object-fit: cover;
    object-position: center top;
    border-radius: 24px;
    border: 1px solid var(--border);
    display: block;
}

/* ─── SERVICES ─── */
.svc-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.4rem; margin-top: 3.5rem; }

.svc-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 2.4rem;
    position: relative; overflow: hidden;
    transition: transform .55s cubic-bezier(.23,1,.32,1), border-color .4s, background .4s;
    will-change: transform;
}
.svc-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    transform: scaleX(0); transition: transform .45s ease;
}
.svc-card:hover { border-color: rgba(59,130,246,.14); background: #1b1b1b; }
.svc-card:hover::before { transform: scaleX(1); }

.svc-icon {
    width: 50px; height: 50px;
    background: rgba(59,130,246,.1); border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem; margin-bottom: 1.4rem;
    transition: background .3s, transform .3s;
}
.svc-card:hover .svc-icon { background: rgba(59,130,246,.18); transform: rotate(8deg) scale(1.1); }
.svc-card h3 { font-size: 1.15rem; font-weight: 600; letter-spacing: -.02em; margin-bottom: .7rem; }
.svc-card p { color: var(--muted); font-size: .88rem; line-height: 1.75; }
.svc-num {
    position: absolute; bottom: 1.2rem; right: 1.5rem;
    font-size: 2.8rem; font-weight: 700; letter-spacing: -.06em;
    color: rgba(255,255,255,.03); line-height: 1;
    transition: color .3s;
}
.svc-card:hover .svc-num { color: rgba(59,130,246,.06); }

/* ─── CONTACT ─── */
.contact-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 6rem; align-items: start; }

.contact-left h2 { font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 700; letter-spacing: -.04em; line-height: 1.1; margin-bottom: 1.3rem; }
.contact-left p { color: var(--muted); font-size: 1rem; line-height: 1.85; margin-bottom: 2.2rem; }

.contact-email {
    display: inline-flex; align-items: center; gap: .7rem;
    color: var(--accent); text-decoration: none;
    font-size: 1.05rem; font-weight: 500;
    margin-bottom: 2.2rem;
    transition: gap .3s;
}
.contact-email:hover { gap: 1.2rem; }
.contact-email svg { transition: transform .3s; }
.contact-email:hover svg { transform: translateX(4px); }

.socials { display: flex; gap: .9rem; }
.soc {
    width: 44px; height: 44px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: var(--muted); text-decoration: none;
    transition: all .3s;
}
.soc:hover { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.3); color: var(--accent); transform: translateY(-4px); }

.contact-form-box {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 24px; padding: 2.4rem;
}
.fg { margin-bottom: 1.2rem; }
.fg label { display: block; font-size: .76rem; font-weight: 600; color: var(--muted); letter-spacing: .07em; text-transform: uppercase; margin-bottom: .55rem; }
.fg input, .fg textarea {
    width: 100%;
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: .82rem 1.15rem;
    color: var(--text);
    font-family: var(--font); font-size: .92rem;
    outline: none; resize: none;
    transition: border-color .3s, background .3s;
}
.fg input::placeholder, .fg textarea::placeholder { color: rgba(255,255,255,.18); }
.fg input:focus, .fg textarea:focus { border-color: rgba(59,130,246,.4); background: rgba(59,130,246,.04); }
.fg textarea { height: 118px; }
.form-btn {
    width: 100%;
    background: var(--accent); color: #000;
    font-family: var(--font); font-size: .92rem; font-weight: 700;
    padding: .88rem; border: none; border-radius: 12px;
    cursor: pointer; transition: transform .25s, box-shadow .25s;
    margin-top: .3rem;
}
.form-btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px rgba(59,130,246,.24); }

/* ─── FOOTER ─── */
footer {
    border-top: 1px solid var(--border);
    padding: 1.8rem 2rem;
    text-align: center;
    color: var(--muted); font-size: .82rem;
}
footer a { color: var(--accent); text-decoration: none; }

/* ─── KEYFRAMES ─── */
@keyframes fadeIn   { from{opacity:0} to{opacity:1} }
@keyframes fadeUp   { from{opacity:0;transform:translateY(32px)} to{opacity:1;transform:none} }
@keyframes fadeDown { from{opacity:0;transform:translateY(-18px)} to{opacity:1;transform:none} }

/* ─── INTRO OVERLAY ─── */
#intro {
    position: fixed; inset: 0; z-index: 9999;
    background: #000;
    transition: opacity .6s ease;
}
#intro.out { opacity: 0; pointer-events: none; }
#intro-cv  { display: block; width: 100%; height: 100%; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
    .about-grid, .contact-wrap { grid-template-columns: 1fr; gap: 3rem; }
    .svc-grid { grid-template-columns: 1fr 1fr; }
    nav { padding: 1.4rem 1.8rem; }
    nav.scrolled { padding: .9rem 1.8rem; }
}
@media (max-width: 620px) {
    .svc-grid { grid-template-columns: 1fr; }
    .nav-links {
        display: none;
        position: fixed; inset: 0;
        background: rgba(8,8,8,.97);
        flex-direction: column; align-items: center; justify-content: center;
        gap: 2.4rem; z-index: 999;
    }
    .nav-links.open { display: flex; }
    .nav-links a { font-size: 1.4rem; }
    .hamburger { display: flex; z-index: 1000; }
    section { padding: 5rem 1.4rem; }
}
/* ─── TEXT COLOUR REVEAL ─── */
.rv-word { color: #787878; transition: color 0.15s ease; }
/* ─── STATS ─── */
#statisztika { padding: 5rem 2rem; }
.stats-grid { display: flex; justify-content: center; max-width: 700px; margin: 0 auto; }
.stat-item { flex: 1; text-align: center; padding: 2.5rem 3rem; position: relative; }
.stat-item:not(:last-child)::after { content: ''; position: absolute; right: 0; top: 15%; bottom: 15%; width: 1px; background: var(--border); }
.stat-number { display: flex; align-items: baseline; justify-content: center; line-height: 1; margin-bottom: .9rem; }
.stat-num { font-size: clamp(4.5rem, 9vw, 7.5rem); font-weight: 700; letter-spacing: -.05em; background: linear-gradient(120deg, var(--accent-2) 0%, var(--accent) 60%, #fff 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.stat-suffix { font-size: clamp(2.2rem, 4.5vw, 3.8rem); font-weight: 700; letter-spacing: -.03em; background: linear-gradient(120deg, var(--accent-2) 0%, var(--accent) 60%, #fff 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-left: .1rem; }
.stat-label { color: var(--muted); font-size: .9rem; font-weight: 500; line-height: 1.55; max-width: 160px; margin: 0 auto; }
@media (max-width: 620px) { .stat-item { padding: 2rem 1.4rem; } }