/* =============================================
   BESTBIT.PL – CSS
   Motyw: ciemny, złote akcenty (numizmatyka + IT)
   ============================================= */

@font-face {
    font-family: 'CNN';
    src: url('../fonts/CNN.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --gold:       #c9a84c;
    --gold-light: #e8cc80;
    --gold-dark:  #a07830;
    --bg:         #080810;
    --bg2:        #0e0e1a;
    --bg3:        #141425;
    --surface:    #1a1a2e;
    --border:     rgba(201,168,76,.18);
    --text:       #e8e8f0;
    --muted:      #888;
    --nav-h:      68px;
    --radius:     14px;
    --trans:      .35s cubic-bezier(.4,0,.2,1);
    --font-body:  'Inter', sans-serif;
    --font-head:  'Playfair Display', serif;
    --container:  1200px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

.gold { color: var(--gold); }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--gold-dark); border-radius: 3px; }

/* ── CONTAINER ── */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ===================== NAWIGACJA ===================== */
#navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    height: var(--nav-h);
    transition: background var(--trans), box-shadow var(--trans), backdrop-filter var(--trans);
}
#navbar.scrolled {
    background: rgba(8,8,16,.92);
    backdrop-filter: blur(18px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-inner {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.nav-logo {
    font-family: 'CNN', var(--font-head);
    font-size: 3.2rem;
    font-weight: normal;
    color: var(--text);
    text-decoration: none;
    letter-spacing: .04em;
    flex-shrink: 0;
}
.nav-logo span { color: var(--gold); }

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
    align-items: center;
}
.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-size: .92rem;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 8px;
    transition: color var(--trans), background var(--trans);
    letter-spacing: .02em;
}
.nav-links a:hover { color: var(--gold); background: rgba(201,168,76,.08); }

.btn-nav {
    background: var(--gold) !important;
    color: #080810 !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}
.btn-nav:hover { background: var(--gold-light) !important; }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .78rem;
    letter-spacing: .08em;
    padding-left: 8px;
    border-left: 1px solid var(--border);
}
.lang-switch strong {
    color: var(--gold);
    font-weight: 700;
}
.lang-switch a {
    color: var(--muted);
    text-decoration: none;
    transition: color var(--trans);
}
.lang-switch a:hover { color: var(--text); }

/* hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
}
.nav-toggle span {
    display: block; width: 24px; height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--trans), opacity var(--trans);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===================== BUTTONS ===================== */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px;
    border-radius: 50px;
    font-weight: 700; font-size: .95rem;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--trans);
    letter-spacing: .04em;
    white-space: nowrap;
}
.btn-gold {
    background: var(--gold);
    color: #080810;
    border-color: var(--gold);
}
.btn-gold:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201,168,76,.35);
}
.btn-outline {
    background: transparent;
    color: var(--text);
    border-color: rgba(255,255,255,.3);
}
.btn-outline:hover {
    border-color: var(--gold);
    color: var(--gold);
    transform: translateY(-2px);
}

/* ===================== HERO ===================== */
#hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video-wrap {
    position: absolute; inset: 0; z-index: 0;
}
#hero-video {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(8,8,16,.55) 0%,
        rgba(8,8,16,.70) 60%,
        rgba(8,8,16,.98) 100%
    );
}

/* Jeśli brak pliku wideo – gradienty */
#hero-video:not([src]), #hero-video[src="video/bg_pingpong.mp4"]:not([paused]) ~ .hero-overlay { opacity: 1; }
.hero-video-fallback {
    position: absolute; inset: 0;
    background: radial-gradient(ellipse at 60% 40%, #1a1408 0%, var(--bg) 70%);
}

.hero-content {
    position: relative; z-index: 1;
    text-align: center;
    padding: var(--nav-h) 24px 24px;
    max-width: 860px;
}

.hero-eyebrow {
    font-size: .82rem;
    font-weight: 600;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 24px;
}

#hero h1 {
    font-family: var(--font-head);
    font-size: clamp(2.4rem, 7vw, 6rem);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -.01em;
    margin-bottom: 24px;
    text-shadow: 0 2px 40px rgba(0,0,0,.6);
}

.hero-sub {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    color: rgba(232,232,240,.75);
    font-weight: 300;
    margin-bottom: 40px;
    letter-spacing: .06em;
}

.hero-cta {
    display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

/* scroll indicator */
.scroll-down {
    position: absolute; bottom: 36px; left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px;
}
.scroll-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--gold);
    animation: scrollBounce 1.8s ease-in-out infinite;
}
@keyframes scrollBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    60% { transform: translateY(12px); opacity: .4; }
}

/* ===================== SECTIONS COMMON ===================== */
section { padding: 100px 0; }

.section-header { margin-bottom: 60px; }
.section-tag {
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
}
.section-header h2 {
    font-family: var(--font-head);
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
}

/* ===================== O NAS ===================== */
#about { background: var(--bg2); }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-text p { color: rgba(232,232,240,.8); margin-bottom: 20px; font-size: 1.05rem; }
.about-text strong { color: var(--text); }

.about-facts {
    list-style: none;
    margin-top: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.about-facts li {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: .97rem;
}
.about-facts li i { color: var(--gold); width: 20px; text-align: center; }
.about-facts strong { color: var(--gold); }

.about-cards {
    display: grid;
    grid-template-columns: repeat(2, max-content);
    justify-content: end;
    gap: 12px;
}

.pill-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 500;
    transition: all var(--trans);
    cursor: default;
}
.pill-card i { color: var(--gold); font-size: 1rem; }
.pill-card:hover {
    border-color: var(--gold);
    background: rgba(201,168,76,.08);
    transform: translateY(-2px);
}

/* ===================== REALIZACJE ===================== */
#realizacje { background: var(--bg); }

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.project-card {
    --cp-x: 28px;
    --cp-y: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--cp-y) var(--cp-x);
    display: flex;
    flex-direction: column;
    gap: 20px;
    transition: all var(--trans);
    animation-delay: var(--delay, 0s);
    position: relative;
    overflow: hidden;
}

.project-thumb {
    margin: calc(-1 * var(--cp-y)) calc(-1 * var(--cp-x)) 4px;
    height: 190px;
    overflow: hidden;
    border-radius: var(--radius) var(--radius) 0 0;
    flex-shrink: 0;
    cursor: zoom-in;
}
.project-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: transform .45s ease;
}
.project-card:hover .project-thumb img { transform: scale(1.06); }

/* ===================== LIGHTBOX ===================== */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 16px;
    padding: 24px;
    cursor: zoom-out;
}
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img {
    max-width: min(960px, 100%);
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0,0,0,.7);
    cursor: default;
}
.lightbox-caption {
    color: rgba(232,232,240,.8);
    font-size: 1rem;
    font-family: var(--font-head);
    font-weight: 700;
    letter-spacing: .04em;
    text-align: center;
}
.lightbox-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none;
    border: none;
    color: rgba(232,232,240,.6);
    font-size: 2.4rem;
    line-height: 1;
    cursor: pointer;
    transition: color var(--trans);
    padding: 4px 8px;
}
.lightbox-close:hover { color: var(--gold); }
.project-card::before {
    content: '';
    position: absolute; top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-dark), var(--gold), var(--gold-dark));
    transform: scaleX(0);
    transition: transform var(--trans);
}
.project-card:hover::before { transform: scaleX(1); }
.project-card:hover {
    border-color: rgba(201,168,76,.45);
    transform: translateY(-6px);
    box-shadow: 0 20px 50px rgba(0,0,0,.4);
}

.project-card--cta {
    border-style: dashed;
    border-color: rgba(201,168,76,.5);
    background: rgba(201,168,76,.04);
}
.project-card--cta h3 { color: var(--gold); }
.project-card--cta:hover {
    border-color: var(--gold);
    background: rgba(201,168,76,.08);
}

.project-icon {
    width: 52px; height: 52px;
    background: rgba(201,168,76,.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: var(--gold);
    flex-shrink: 0;
}

.project-year {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--gold);
}

.project-body { flex: 1; }
.project-body h3 {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 6px 0 12px;
    line-height: 1.25;
}
.project-body p { font-size: .93rem; color: rgba(232,232,240,.72); line-height: 1.65; }

.project-tags {
    display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px;
}
.project-tags span {
    font-size: .73rem;
    font-weight: 600;
    letter-spacing: .08em;
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(201,168,76,.1);
    color: var(--gold);
    border: 1px solid rgba(201,168,76,.2);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--muted);
    text-decoration: none;
    transition: color var(--trans);
    letter-spacing: .03em;
    margin-top: auto;
}
.project-link:hover { color: var(--gold); }

/* ===================== KONTAKT ===================== */
#kontakt { background: var(--bg2); }

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 64px;
    align-items: start;
}

.contact-info h3 {
    font-family: var(--font-head);
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.contact-info p { color: rgba(232,232,240,.75); margin-bottom: 32px; }

.contact-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.contact-list li {
    display: flex; align-items: center; gap: 14px;
    font-size: .97rem; color: rgba(232,232,240,.75);
}
.contact-list li i { color: var(--gold); width: 20px; text-align: center; }
.contact-list a { color: var(--gold); text-decoration: none; transition: color var(--trans); }
.contact-list a:hover { color: var(--gold-light); }

/* Formularz */
.contact-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.form-group {
    display: flex; flex-direction: column; gap: 8px;
}
.form-group label {
    font-size: .83rem; font-weight: 600; letter-spacing: .06em;
    color: rgba(232,232,240,.7);
}
.form-group input,
.form-group textarea {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 10px;
    color: var(--text);
    font-family: var(--font-body);
    font-size: .95rem;
    padding: 13px 16px;
    width: 100%;
    transition: border-color var(--trans), box-shadow var(--trans);
    outline: none;
    resize: vertical;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: rgba(255,255,255,.25); }
.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201,168,76,.15);
}
.contact-form .btn { align-self: flex-start; }

.form-alert {
    padding: 14px 18px;
    border-radius: 10px;
    font-size: .9rem;
    font-weight: 500;
    display: flex; align-items: center; gap: 10px;
}
.form-alert--ok  { background: rgba(52,211,153,.12); border: 1px solid rgba(52,211,153,.3); color: #6ee7b7; }
.form-alert--err { background: rgba(239,68,68,.12);  border: 1px solid rgba(239,68,68,.3);  color: #fca5a5; }

/* ===================== FOOTER ===================== */
footer {
    background: #050508;
    border-top: 1px solid var(--border);
    padding: 36px 0;
}
.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}
.footer-logo {
    font-family: var(--font-body);
    font-size: 2.5rem;
    font-weight: normal;
    color: var(--gold);
    text-decoration: none;
}
.footer-logo span { color: var(--gold); }
.footer-copy { font-size: .85rem; color: var(--muted); }
.footer-tags {
    display: flex; gap: 8px; flex-wrap: wrap;
}
.footer-tags span {
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .08em;
    padding: 5px 12px;
    border-radius: 50px;
    background: rgba(201,168,76,.08);
    color: var(--gold);
    border: 1px solid rgba(201,168,76,.2);
}
.footer-links { display: flex; gap: 16px; }
.footer-links a {
    color: var(--muted);
    font-size: 1.15rem;
    text-decoration: none;
    transition: color var(--trans);
}
.footer-links a:hover { color: var(--gold); }

/* ===================== ANIMACJE REVEAL ===================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .65s ease, transform .65s ease;
}
.reveal.delay-1 { transition-delay: .1s; }
.reveal.delay-2 { transition-delay: .2s; }
.reveal.delay-3 { transition-delay: .3s; }
.reveal.visible { opacity: 1; transform: none; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 1024px) {
    .projects-grid { grid-template-columns: repeat(2, 1fr); }
    .about-grid { grid-template-columns: 1fr; gap: 40px; }
    .about-cards { justify-content: start; }
}

@media (max-width: 768px) {
    :root { --nav-h: 60px; }
    section { padding: 72px 0; }

    .nav-toggle { display: flex; }
    .nav-links {
        position: fixed; inset: var(--nav-h) 0 0 0;
        background: rgba(8,8,16,.97);
        backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 8px;
        transform: translateX(100%);
        transition: transform var(--trans);
    }
    .nav-links.open { transform: translateX(0); }
    .nav-links a { font-size: 1.15rem; padding: 14px 32px; }

    .projects-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; gap: 40px; }
    .form-row { grid-template-columns: 1fr; }
    .contact-form { padding: 28px 20px; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn { justify-content: center; }
    .footer-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 480px) {
    .section-header h2 { font-size: 1.75rem; }
    .project-card { --cp-x: 20px; --cp-y: 24px; }
}

/* ===================== SELECTION ===================== */
::selection { background: rgba(201,168,76,.3); color: var(--gold-light); }
