/* ============================================================
   FONTY — self-hosted woff2 (latin + latin-ext). Zero CDN.
   latin-ext = polskie znaki (ż ą ł ś ę ń...). Galada ma tylko
   latin (font nie zawiera polskich glyphow — dlatego naglowki
   uzywaja slow bez tych liter).
   ============================================================ */
@font-face {
    font-family: 'Galada'; font-style: normal; font-weight: 400; font-display: swap;
    src: url('fonts/galada-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 400 500; font-display: swap;
    src: url('fonts/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Inter'; font-style: normal; font-weight: 400 500; font-display: swap;
    src: url('fonts/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url('fonts/manrope-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Manrope'; font-style: normal; font-weight: 400 700; font-display: swap;
    src: url('fonts/manrope-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
    /* Domyslny motyw = MK5 (jasny, bialo-srebrny) */
    --text-color: #1a1f24;
    --muted-color: rgba(26, 31, 36, 0.7);
    --glass-bg: rgba(0, 0, 0, 0.05);
    --glass-border: rgba(0, 0, 0, 0.12);
    --accent: #f2c14e;          /* bursztynowo-zloty akcent */
    --accent-ink: #241a04;      /* tekst na akcencie */
    --particle-color: rgba(30, 40, 50, 0.85);
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Galada', cursive;

    /* Dynamiczne tlo — domyslnie MK5 (jasne srebro) */
    --bg-inner: #f4f6f8;
    --bg-mid:   #d2dae1;
    --bg-outer: #9aa7b2;
}

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

body {
    background: radial-gradient(circle at center, var(--bg-inner) 0%, var(--bg-mid) 50%, var(--bg-outer) 100%);
    color: var(--text-color);
    font-family: var(--font-main);
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* pod dynamiczne paski przegladarek mobilnych */
}

/* ---------- Czastki ambient ---------- */
#particles-container {
    position: fixed; inset: 0;
    pointer-events: none; z-index: 0; overflow: hidden;
}
.particle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle at center, var(--particle-color) 0%, rgba(255,255,255,0) 70%);
    pointer-events: none;
}
@keyframes floatUpParticle {
    0%   { transform: translateY(0) translateX(0); opacity: 0; }
    10%  { opacity: 0.5; }
    90%  { opacity: 0.5; }
    100% { transform: translateY(-110vh) translateX(30px); opacity: 0; }
}

/* ---------- Header ---------- */
.header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 2rem 4%; position: fixed; top: 0; width: 100%; z-index: 100;
}
.logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 700; font-size: 1.4rem; letter-spacing: 0.15em;
    font-family: var(--font-main); text-transform: uppercase;
}
.nav {
    display: flex; gap: 0.5rem; padding: 0.4rem; border-radius: 100px;
}
.nav.glass {
    position: relative;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
}
.nav-item {
    font-family: 'Manrope', sans-serif; color: var(--muted-color);
    text-decoration: none; font-size: 0.85rem; font-weight: 500;
    padding: 0.5rem 1.2rem; border-radius: 100px; transition: all 0.3s ease;
}
.nav-item:hover, .nav-item.active { background: var(--accent); color: var(--accent-ink); }

.header-actions { display: flex; align-items: center; gap: 1rem; }

.lang-toggle {
    display: flex; align-items: center; gap: 0.35rem;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    color: var(--muted-color); border-radius: 100px;
    padding: 0.6rem 1rem; cursor: pointer; font-family: 'Manrope', sans-serif;
    font-size: 0.8rem; font-weight: 700; backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.lang-opt { transition: color 0.3s ease; }
.lang-opt.active { color: var(--accent); }
.lang-sep { opacity: 0.4; }

.contact-btn {
    background: rgba(0,0,0,0.5); color: white; border: none;
    padding: 0.9rem 2rem; border-radius: 100px; font-weight: 600;
    font-size: 0.85rem; cursor: pointer; transition: all 0.3s ease;
}
.contact-btn:hover { background: rgba(0,0,0,0.7); transform: translateY(-2px); }

/* ---------- Hero ---------- */
.hero {
    height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center;
    padding: 0 4%; padding-top: 5rem;
}
.hero-content {
    display: flex; justify-content: space-between; align-items: stretch;
    width: 100%; max-width: 100%; padding: 0; height: 100%; position: relative;
}
.main-title, .side-title {
    font-family: var(--font-heading);
    font-size: clamp(4rem, 9vw, 11rem);
    line-height: 1.05; font-weight: 400; text-transform: none;
    white-space: nowrap; color: var(--text-color); letter-spacing: normal;
}
.outline { color: var(--text-color); opacity: 0.55; }

/* Lewa kolumna */
.hero-left {
    display: flex; flex-direction: column; height: 100%;
    padding: 6rem 0; gap: 2rem; z-index: 100;
}
.description { color: var(--muted-color); font-size: 1.1rem; line-height: 1.6; max-width: 420px; }

/* Srodkowe auto */
.hero-center {
    display: flex; justify-content: center; align-items: center;
    position: absolute; inset: 0; width: 100%; height: 100%;
    z-index: 1; opacity: 0;
    animation: float 6s ease-in-out infinite;
    transition: opacity 1.2s ease-out;
    pointer-events: none;
    background: radial-gradient(circle at center, rgba(255,255,255,0.06) 0%, transparent 70%);
}
.hero-center.revealed { opacity: 1; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }

.main-product-3d {
    width: 85vw; height: 80vh; outline: none;
    --progress-bar-color: transparent; --poster-color: transparent;
    z-index: 1; position: fixed; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.main-product-3d[camera-controls] { pointer-events: auto; }

/* Prawa kolumna */
.hero-right {
    display: flex; flex-direction: column; justify-content: space-between;
    align-items: flex-end; text-align: right; height: 100%;
    padding: 6rem 0; z-index: 100; width: 460px; pointer-events: none;
}
.product-carousel {
    display: flex; flex-direction: column; gap: 1.5rem; align-items: flex-end;
    pointer-events: auto;
}
.carousel-cards { display: flex; gap: 0.8rem; }
.card {
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    padding: 1.5rem 0.8rem 1rem; border-radius: 24px;
    display: flex; flex-direction: column; align-items: center; gap: 1.2rem;
    cursor: pointer; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    width: 132px; position: relative; backdrop-filter: blur(10px); text-align: center;
}
.card:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.4); }
.card.active { border-color: var(--accent); background: var(--glass-bg); }
.card-badge {
    color: white; opacity: 0.9; transition: transform 0.5s cubic-bezier(0.34,1.56,0.64,1);
    will-change: transform;
}
.card:hover .card-badge { transform: translateY(-6px) rotate(-8deg) scale(1.1); }
.card-info { display: flex; flex-direction: column; gap: 0.2rem; font-size: 0.72rem; width: 100%; word-wrap: break-word; }
.card-info span:first-child { font-weight: 600; }
.card-info span:last-child { color: var(--muted-color); }
.carousel-nav { display: flex; gap: 1rem; }
.nav-arrow {
    background: var(--glass-bg); border: 1px solid var(--glass-border); color: white;
    width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: background 0.3s;
}
.nav-arrow:hover { background: rgba(255,255,255,0.1); }
.side-title { align-self: flex-end; text-align: right; }

/* Przyciski w hero (zamiast Konfiguruj) */
.hero-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; }
.ghost-btn {
    font-family: 'Manrope', sans-serif; font-weight: 700; font-size: 0.85rem;
    color: var(--text-color); background: var(--glass-bg);
    border: 1px solid var(--glass-border); border-radius: 100px;
    padding: 0.85rem 1.8rem; cursor: pointer; backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}
.ghost-btn:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); transform: translateY(-2px); }

/* ---------- Modal (Osiagi / Opinie) ---------- */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    display: flex; align-items: center; justify-content: center; padding: 1.5rem;
    background: rgba(6, 8, 12, 0.6); backdrop-filter: blur(8px);
    opacity: 0; visibility: hidden; transition: opacity 0.35s ease, visibility 0.35s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-card {
    width: 100%; max-width: 620px; max-height: 84vh; overflow-y: auto;
    background: rgba(18, 20, 26, 0.92); color: #fff;
    border: 1px solid rgba(255,255,255,0.12); border-radius: 24px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.55);
    padding: 2.2rem; position: relative;
    transform: translateY(24px) scale(0.98); transition: transform 0.35s cubic-bezier(0.2,0.8,0.2,1);
}
.modal-overlay.open .modal-card { transform: none; }
.modal-close {
    position: absolute; top: 1.1rem; right: 1.1rem;
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
    color: #fff; font-size: 1.3rem; line-height: 1; cursor: pointer; transition: background 0.3s;
}
.modal-close:hover { background: rgba(255,255,255,0.2); }
.modal-eyebrow {
    font-family: 'Manrope', sans-serif; font-size: 0.72rem; letter-spacing: 0.18em;
    text-transform: uppercase; color: var(--accent);
}
.modal-title {
    /* Inter, nie Galada — Galada nie ma polskich znakow (np. "ą" w "Osiągi") */
    font-family: var(--font-main); font-weight: 700; font-size: 2rem; line-height: 1.1;
    letter-spacing: -0.01em; margin: 0.3rem 0 1.4rem; color: #fff;
}
/* Osiagi — tabela */
.spec-row {
    display: flex; justify-content: space-between; gap: 1rem;
    padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.spec-row:last-child { border-bottom: none; }
.spec-k { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.spec-v { font-weight: 600; text-align: right; font-size: 0.95rem; }
/* Opinie — karty */
.review-item { padding: 1rem 0; border-bottom: 1px solid rgba(255,255,255,0.08); }
.review-item:last-child { border-bottom: none; }
.review-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; }
.review-src { font-weight: 700; font-size: 0.92rem; }
.review-stars { color: var(--accent); font-size: 0.9rem; letter-spacing: 0.1em; }
.review-text { color: rgba(255,255,255,0.82); font-size: 0.92rem; line-height: 1.55; }
.modal-foot {
    margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.72rem; color: rgba(255,255,255,0.45); line-height: 1.5;
}
.modal-foot a { color: rgba(255,255,255,0.6); }

/* ---------- Credits (CC BY) ---------- */
.credits {
    position: fixed; left: 0; right: 0; bottom: 0.7rem;
    text-align: center; font-family: 'Manrope', sans-serif;
    font-size: 0.68rem; color: var(--muted-color);
    z-index: 90; pointer-events: none; padding: 0 1rem; line-height: 1.4;
}
.credits a { color: var(--text-color); text-decoration: underline; text-underline-offset: 2px; pointer-events: auto; opacity: 0.85; }
.credits a:hover { color: var(--accent); opacity: 1; }

/* ============================================================
   RESPONSYWNOSC
   Na wezszych ekranach: tytul u gory, auto na srodku (fixed),
   karty na dole. Boczny tytul (nowrap, 9vw) chowany, bo wychodzi
   poza ekran i sie przycina.
   ============================================================ */

/* ---- Tablet / small laptop (<=1200px) ---- */
@media (max-width: 1200px) {
    .nav { display: none; }
    .header { padding: 1.4rem 4%; }
    .hero { padding: 0; }
    .hero-content { display: block; position: relative; height: 100%; }

    .hero-left {
        position: absolute; top: 5.5rem; left: 0; right: 0;
        height: auto; padding: 0 6%; gap: 1.2rem;
        align-items: center; text-align: center; z-index: 100;
    }
    .main-title { font-size: clamp(3rem, 9vw, 5.5rem); text-align: center; }
    .description { display: none; }
    .hero-actions { justify-content: center; }
    .side-title { display: none; }

    .hero-right {
        position: absolute; bottom: 3.8rem; left: 0; right: 0;
        width: auto; height: auto; padding: 0 4%;
        flex-direction: column; align-items: center; z-index: 100;
    }
    .product-carousel { align-items: center; }

    .main-product-3d { width: 100vw; height: 50vh; top: 47%; }
}

/* ---- Mobile (<=720px) ---- */
@media (max-width: 720px) {
    .header { padding: 1rem 5%; }
    .logo { font-size: 1.05rem; letter-spacing: 0.1em; }
    .contact-btn { padding: 0.55rem 1.05rem; font-size: 0.72rem; }
    .lang-toggle { padding: 0.45rem 0.7rem; font-size: 0.72rem; }

    .hero-left { top: 4.2rem; gap: 0.9rem; padding: 0 5%; }
    .main-title { font-size: clamp(2.5rem, 13vw, 3.8rem); }
    .ghost-btn { padding: 0.7rem 1.25rem; font-size: 0.78rem; }

    .main-product-3d { width: 112vw; height: 44vh; top: 46%; }

    .hero-right { bottom: 4.2rem; }
    .carousel-cards { gap: 0.5rem; }
    .card { width: 96px; padding: 0.9rem 0.5rem 0.7rem; border-radius: 18px; gap: 0.6rem; }
    .card-badge svg { width: 48px; height: 22px; }
    .card-info { font-size: 0.62rem; }
    .carousel-nav { display: none; }

    .credits { font-size: 0.56rem; bottom: 0.5rem; padding: 0 0.6rem; line-height: 1.35; }

    .modal-card { padding: 1.6rem 1.3rem; }
    .modal-title { font-size: 2rem; }
    .modal-eyebrow { font-size: 0.66rem; }
}

/* ---- Small mobile (<=400px) ---- */
@media (max-width: 400px) {
    .contact-btn { display: none; }
    .main-title { font-size: clamp(2.1rem, 12.5vw, 2.9rem); }
    .card { width: 88px; }
    .card-info { font-size: 0.57rem; }
    .card-badge svg { width: 44px; height: 20px; }
}

/* ---- Niska wysokosc / landscape (telefon poziomo) ---- */
@media (max-height: 520px) and (max-width: 1200px) {
    .hero-left { top: 3.4rem; gap: 0.6rem; }
    .main-title { font-size: 2.2rem; }
    .main-product-3d { width: 100vw; height: 72vh; top: 50%; }
    .hero-right { bottom: 0.9rem; }
    .card { width: 82px; padding: 0.7rem 0.4rem 0.6rem; }
    .credits { display: none; }
}

/* ---- A11y: widoczny fokus klawiatury ---- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---- Reduced motion: zero ruchu (obrot/unoszenie/tranzycje) ----
   Reszta wygaszana w JS (drift kamery, czastki, spin przy zmianie). */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
    .hero-center { animation: none; transition: none; }
}
