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

:root {
    --bg: #09090b;
    --bg2: #111114;
    --text: #eee;
    --dim: #777;
    --accent: #CD6820;
    --accent-l: #e0863f;
    --border: rgba(255,255,255,0.07);
    --r: 12px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.55;
}

a { text-decoration: none; color: inherit; }

/* Cursor glow */
.cursor-glow {
    position: fixed; width: 600px; height: 600px; border-radius: 50%;
    background: radial-gradient(circle, rgba(205,104,32,0.1) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
    transform: translate(-50%, -50%); opacity: 0; transition: opacity 0.4s;
}
body:hover .cursor-glow { opacity: 1; }

/* === Buttons === */
.btn {
    display: inline-flex; align-items: center;
    padding: 12px 28px; border: 1px solid var(--border); border-radius: 8px;
    font: 600 0.9rem/1 'Inter', sans-serif; color: var(--text);
    background: transparent; cursor: pointer; transition: all 0.2s;
}
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-l); border-color: var(--accent-l); }
.btn-sm { padding: 9px 18px; font-size: 0.82rem; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent-l); }

/* === Utils === */
.tag {
    display: block; font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 3px;
    color: var(--accent); margin-bottom: 12px;
}
.text-accent { color: var(--accent); }

/* === Nav pill === */
.pill-nav {
    position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 100;
    display: flex; align-items: center; justify-content: center; gap: 28px;
    padding: 8px 10px 8px 20px;
    background: rgba(240,236,232,0.92); backdrop-filter: blur(16px);
    border: 1px solid rgba(0,0,0,0.08); border-radius: 100px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
/* === H Logo (CSS) === */
.h-logo {
    display: grid; grid-template-columns: 1fr 1fr; gap: 2px;
    position: relative;
}
.h-pin {
    position: relative;
}
/* Each pin: square block + needle */
.h-pin::before {
    content: ''; display: block;
    width: 100%; aspect-ratio: 1; border-radius: 15%;
    background: #222;
}
.h-pin::after {
    content: ''; position: absolute;
    background: #222; border-radius: 1px;
}
/* Needles pointing inward */
.h-pin.tl::after { width: 70%; height: 18%; bottom: -2px; right: -30%; }
.h-pin.tr::after { width: 70%; height: 18%; bottom: -2px; left: -30%; }
.h-pin.bl::after { width: 70%; height: 18%; top: -2px; right: -30%; }
.h-pin.br::after { width: 70%; height: 18%; top: -2px; left: -30%; }
/* Accent pin */
.h-pin.accent::before { background: var(--accent); }
.h-pin.accent::after { background: var(--accent); }

/* Sizes */
.h-logo-sm { width: 28px; gap: 3px; }
.h-logo-card { width: 36px; gap: 3px; position: absolute; top: 20px; left: 24px; z-index: 1; }
.h-logo-preview { width: 28px; gap: 2px; }
.h-logo-footer { width: 28px; gap: 3px; opacity: 0.4; }
.h-logo-footer .h-pin::before, .h-logo-footer .h-pin::after { background: #aaa; }
.h-logo-footer .h-pin.accent::before, .h-logo-footer .h-pin.accent::after { background: var(--accent); }
.pill-links { display: flex; align-items: center; gap: 4px; }
.pill-links a {
    padding: 7px 14px; font-size: 0.8rem; font-weight: 500;
    color: #555; border-radius: 100px; transition: all 0.2s;
}
.pill-links a:hover { color: #111; background: rgba(0,0,0,0.05); }
.pill-cta { background: var(--accent) !important; color: #fff !important; font-weight: 600 !important; }
.pill-cta:hover { background: var(--accent-l) !important; }

/* === Hero — two columns === */
.hero {
    min-height: 100vh;
    display: grid; grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 100px 24px 80px;
    gap: 48px;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-text h1 { font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 900; line-height: 1.15; letter-spacing: -0.03em; white-space: nowrap; }
.h1-line { display: block; }
.h1-accent {
    padding-bottom: 4px;
    background: linear-gradient(135deg, var(--accent), var(--accent-l));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.hero-text p { color: var(--dim); font-size: 1.05rem; line-height: 1.7; margin: 24px 0 36px; max-width: 440px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Hero visual — floating card */
.hero-visual { display: flex; align-items: center; justify-content: center; }

.hero-card {
    width: 320px; height: 195px;
    background: linear-gradient(150deg, #d4d0cc, #e8e4e0);
    border-radius: 16px; border: 1px solid rgba(0,0,0,0.08);
    padding: 28px;
    position: relative; overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.5), 0 0 50px rgba(205,104,32,0.06);
    transform: perspective(800px) rotateY(-15deg) rotateX(5deg);
    transition: transform 0.1s ease-out;
}

.hc-shine {
    position: absolute; inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.08), transparent 60%);
    pointer-events: none; transition: background 0.15s;
}

.hc-sub { position: absolute; bottom: 20px; left: 24px; font-size: 0.65rem; color: #888; letter-spacing: 1px; z-index: 1; }
.hc-qr { position: absolute; bottom: 18px; right: 20px; color: rgba(0,0,0,0.25); z-index: 1; }


/* === Marquee === */
.marquee {
    padding: 16px 0;
    border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
    overflow: hidden; white-space: nowrap;
}
.marquee-track {
    display: inline-flex; align-items: center; gap: 32px;
    animation: scroll 18s linear infinite;
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 2px; color: var(--dim);
}
.dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* === Fridge board (cechy) === */
.bento { padding: 100px 24px; max-width: 1200px; margin: 0 auto; }
.bento-header { margin-bottom: 48px; }
.bento-header h2 { font-size: 2.4rem; font-weight: 800; letter-spacing: -0.02em; line-height: 1.2; }

.fridge-board {
    background: linear-gradient(180deg, #1c1e22, #16171b);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    position: relative;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

/* Handle */
.fridge-board::before {
    content: '';
    position: absolute; top: 16px; right: 20px;
    width: 4px; height: 48px; border-radius: 2px;
    background: rgba(255,255,255,0.06);
}

.fb-card {
    background: var(--bg2); border: 1px solid var(--border); border-radius: 10px;
    padding: 24px; display: flex; flex-direction: column; justify-content: flex-end;
    position: relative; overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s;
    min-height: 170px;
    opacity: 0;
}
.fb-card.stuck {
    opacity: 1;
    animation: stickOn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.fb-card:nth-child(1).stuck { animation-delay: 0s;   --from-x: -60px; --from-y: -40px; --from-r: -12deg; }
.fb-card:nth-child(2).stuck { animation-delay: 0.12s; --from-x: 50px;  --from-y: -50px; --from-r: 8deg; }
.fb-card:nth-child(3).stuck { animation-delay: 0.24s; --from-x: 70px;  --from-y: 30px;  --from-r: -6deg; }
.fb-card:nth-child(4).stuck { animation-delay: 0.36s; --from-x: -50px; --from-y: 50px;  --from-r: 10deg; }
.fb-card:nth-child(5).stuck { animation-delay: 0.48s; --from-x: 0px;   --from-y: -60px; --from-r: -4deg; }

@keyframes stickOn {
    0% {
        opacity: 0;
        transform: translate(var(--from-x), var(--from-y)) rotate(var(--from-r)) scale(0.8);
    }
    60% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1.04);
    }
    80% {
        transform: translate(0, 0) rotate(0deg) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
}

.fb-card:hover {
    transform: rotate(-1deg) translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

.b-num {
    position: absolute; top: 14px; right: 16px;
    font-size: 2.4rem; font-weight: 900; color: var(--accent); opacity: 0.12; line-height: 1.1;
}
.fb-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.fb-card p { color: var(--dim); font-size: 0.85rem; line-height: 1.6; }

.fb-stat {
    grid-column: span 2;
    flex-direction: row; align-items: center; gap: 20px; justify-content: flex-start;
}
.stat-num {
    font-size: 3rem; font-weight: 900; line-height: 1.15;
    background: linear-gradient(135deg, var(--accent), var(--accent-l));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    flex-shrink: 0;
}
.stat-desc { font-size: 0.85rem; color: var(--dim); line-height: 1.5; max-width: 360px; }

/* === Product split === */
.product {
    display: grid; grid-template-columns: 1fr 1fr; min-height: 80vh;
    border-top: 1px solid var(--border);
    max-width: 1200px; margin: 0 auto;
}
.product-left {
    display: flex; flex-direction: column; justify-content: center;
    padding: 72px 56px;
}
.product-left .btn { align-self: flex-start; }
.product-left h2 { font-size: 2.2rem; font-weight: 800; line-height: 1.25; margin-bottom: 32px; }

.specs { margin-bottom: 32px; }
.spec {
    display: flex; justify-content: space-between;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
}
.spec span:first-child { color: var(--dim); }
.spec span:last-child { font-weight: 600; }

.price-table { margin-bottom: 28px; }
.price-option {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}
.po-qty { color: var(--dim); }
.po-price { font-weight: 700; color: var(--accent); }

.product-right {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: var(--bg2); border-left: 1px solid var(--border);
    padding: 60px; gap: 24px;
}

/* Orientation toggle */
.card-orientation { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 4px; }
.orient-btn {
    padding: 8px 20px; border: none; border-radius: 6px;
    font: 600 0.8rem 'Inter', sans-serif; color: var(--dim);
    background: transparent; cursor: pointer; transition: all 0.2s;
}
.orient-btn.active { background: var(--accent); color: #fff; }
.orient-btn:hover:not(.active) { color: var(--text); }

/* Preview card */
.preview-card {
    background: linear-gradient(150deg, #d4d0cc, #e8e4e0);
    border-radius: 14px; border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    transition: width 0.4s cubic-bezier(0.16,1,0.3,1), height 0.4s cubic-bezier(0.16,1,0.3,1);
    color: var(--text); overflow: hidden;
}

/* Vertical — logo, nazwa, telefon u góry, QR na dole */
.preview-card.vertical {
    width: 200px; height: 290px; padding: 28px 24px;
    display: flex; flex-direction: column; align-items: center; justify-content: space-between;
}
.preview-card.vertical .pc-info {
    text-align: center; display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.preview-card.vertical .pc-phone { font-size: 0.95rem; color: #333; font-weight: 600; }
.preview-card.vertical .pc-qr svg { width: 64px; height: 64px; }

/* Horizontal — logo u góry lewej, nazwa+telefon dół lewej, QR centrum prawej */
.preview-card.horizontal {
    width: 310px; height: 190px; padding: 24px 28px;
    display: flex; flex-direction: row; justify-content: space-between; align-items: center;
}
.preview-card.horizontal .pc-info {
    display: flex; flex-direction: column; justify-content: space-between; gap: 0; height: 100%;
}
.preview-card.horizontal .pc-info .pc-logo { margin-bottom: auto; }
.preview-card.horizontal .pc-info .pc-company { margin-top: auto; }
.preview-card.horizontal .pc-info .pc-phone { margin-top: 4px; }
.preview-card.horizontal .pc-qr {
    display: flex; align-items: center;
}

.pc-default {
    display: contents;
}

.pc-uploaded {
    display: none;
    width: 100%; height: 100%;
    object-fit: cover; border-radius: 14px;
    position: absolute; inset: 0;
}
.preview-card.has-image .pc-default { display: none; }
.preview-card.has-image .pc-uploaded { display: block; }
.preview-card { position: relative; }

.upload-btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 18px; border: 1px dashed rgba(255,255,255,0.15);
    border-radius: 8px; font-size: 0.82rem; font-weight: 500;
    color: var(--dim); cursor: pointer; transition: all 0.2s;
}
.upload-btn:hover { border-color: var(--accent); color: var(--accent); }

.pc-logo { line-height: 0; display: flex; }
.pc-company { display: block; font-size: 1rem; font-weight: 800; letter-spacing: 1px; color: #222; }
.pc-qr { color: rgba(0,0,0,0.3); }
.pc-phone { font-size: 0.75rem; color: #555; letter-spacing: 0.5px; }

/* === Process === */
.process { padding: 100px 24px; max-width: 1200px; margin: 0 auto; }
.process-header { margin-bottom: 56px; }
.process-header h2 { font-size: 2.4rem; font-weight: 800; line-height: 1.2; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.step {
    background: var(--bg2); border: 1px solid var(--border); border-radius: var(--r);
    padding: 32px; transition: transform 0.3s cubic-bezier(0.16,1,0.3,1), box-shadow 0.3s, border-color 0.25s;
}
.step:hover { border-color: rgba(205,104,32,0.2); }

.magnet-step {
    opacity: 0;
}
.magnet-step.stuck {
    opacity: 1;
    animation: stepStick 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.magnet-step:nth-child(1).stuck { animation-delay: 0s;   --sx: -50px; --sy: -30px; --sr: -10deg; }
.magnet-step:nth-child(2).stuck { animation-delay: 0.25s; --sx: 0px;   --sy: -50px; --sr: 6deg; }
.magnet-step:nth-child(3).stuck { animation-delay: 0.5s;  --sx: 50px;  --sy: -30px; --sr: -8deg; }
.magnet-step:nth-child(4).stuck { animation-delay: 0.75s; --sx: 40px;  --sy: 30px;  --sr: 7deg; }

@keyframes stepStick {
    0% {
        opacity: 0;
        transform: translate(var(--sx), var(--sy)) rotate(var(--sr)) scale(0.85);
    }
    60% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1.03);
    }
    80% {
        transform: translate(0, 0) rotate(0deg) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translate(0, 0) rotate(0deg) scale(1);
    }
}
.step-num { font-size: 3rem; font-weight: 900; color: var(--accent); opacity: 0.15; line-height: 1.1; margin-bottom: 20px; }
.step h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--dim); font-size: 0.88rem; line-height: 1.6; }

/* === Order — split === */
.order {
    display: grid; grid-template-columns: 0.7fr 1.3fr;
    gap: 64px; padding: 100px 24px;
    border-top: 1px solid var(--border); align-items: start;
    max-width: 1200px; margin: 0 auto;
}
.order-left h2 { font-size: 3rem; font-weight: 900; line-height: 1.2; margin-bottom: 12px; }
.order-left p { color: var(--dim); line-height: 1.6; }

.order-form { display: flex; flex-direction: column; gap: 14px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.f-field { display: flex; flex-direction: column; gap: 5px; }
.f-field label { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; color: var(--dim); }

.f-field input, .f-field select, .f-field textarea {
    padding: 12px 14px; background: var(--bg2); border: 1px solid var(--border);
    border-radius: 8px; color: var(--text); font: 0.9rem 'Inter', sans-serif;
    transition: border-color 0.2s; resize: vertical;
}
.f-field input:focus, .f-field select:focus, .f-field textarea:focus {
    outline: none; border-color: var(--accent);
}
.f-field select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23777' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px;
}

/* Project toggle */
.project-toggle { display: flex; gap: 4px; background: var(--bg); border-radius: 8px; padding: 4px; }
.pt-btn {
    flex: 1; padding: 10px 16px; border: none; border-radius: 6px;
    font: 600 0.8rem 'Inter', sans-serif; color: var(--dim);
    background: transparent; cursor: pointer; transition: all 0.2s;
}
.pt-btn.active { background: var(--accent); color: #fff; }
.pt-btn:hover:not(.active) { color: var(--text); }

.project-fields { transition: all 0.3s; display: flex; flex-direction: column; gap: 14px; }
.project-fields.hidden { display: none !important; }

.file-upload-area {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 24px 16px; border: 1px dashed rgba(255,255,255,0.12);
    border-radius: 8px; cursor: pointer; color: var(--dim);
    font-size: 0.85rem; transition: all 0.2s; text-align: center;
}
.file-upload-area:hover { border-color: var(--accent); color: var(--accent); }
.file-upload-area.has-file { border-color: var(--accent); border-style: solid; color: var(--accent); }

.order-form .btn { align-self: flex-start; margin-top: 4px; }

/* Consent checkbox */
.consent-field { display: flex; align-items: flex-start; gap: 10px; }
.consent-field input[type="checkbox"] {
    width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0;
    accent-color: var(--accent); cursor: pointer;
}
.consent-field label {
    font-size: 0.8rem; color: var(--dim); line-height: 1.5;
    text-transform: none; letter-spacing: 0; font-weight: 400; cursor: pointer;
}
.consent-field a { color: var(--accent); text-decoration: underline; }

/* Legal page */
.legal-page {
    max-width: 740px; margin: 0 auto;
    padding: 120px 24px 80px;
}
.legal-content h1 {
    font-size: 2.2rem; font-weight: 800; margin-bottom: 40px; line-height: 1.2;
}
.legal-content h2 {
    font-size: 1.15rem; font-weight: 700; margin-top: 36px; margin-bottom: 12px; line-height: 1.3;
}
.legal-content p {
    color: var(--dim); font-size: 0.92rem; line-height: 1.7; margin-bottom: 12px;
}
.legal-content a { color: var(--accent); }
.legal-content ul {
    color: var(--dim); font-size: 0.92rem; line-height: 1.7;
    padding-left: 20px; margin-bottom: 12px;
}
.legal-content li { margin-bottom: 4px; }

/* === Footer === */
.footer { padding: 40px 24px 28px; border-top: 1px solid var(--border); max-width: 1200px; margin: 0 auto; }
.footer-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { font-size: 0.82rem; color: var(--dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-contact { display: flex; gap: 20px; font-size: 0.82rem; color: var(--dim); }
.footer-copy { text-align: center; font-size: 0.72rem; color: var(--dim); border-top: 1px solid var(--border); padding-top: 20px; }

/* === Responsive === */
@media (max-width: 900px) {
    .hero { grid-template-columns: 1fr; padding: 120px 20px 60px; }
    .hero-visual { justify-content: center; margin-top: 20px; }
    .hero-card { width: 280px; height: 170px; }
    .product { grid-template-columns: 1fr; }
    .product-right { border-left: none; border-top: 1px solid var(--border); min-height: 260px; }
    .product-left { padding: 56px 20px; }
    .bento { padding: 80px 20px; }
    .fridge-board { grid-template-columns: 1fr 1fr; padding: 24px; }
    .steps { grid-template-columns: 1fr 1fr; }
    .process { padding: 80px 20px; }
    .order { grid-template-columns: 1fr; gap: 32px; padding: 80px 20px; }
}

@media (max-width: 600px) {
    .pill-links a:not(.pill-cta) { display: none; }
    .hero { padding: 100px 16px 48px; }
    .hero-text h1 { font-size: 2.4rem; }
    .hero-card { width: 240px; height: 150px; padding: 20px; }
    .h-logo-card { width: 28px; }
    .fridge-board { grid-template-columns: 1fr; padding: 16px; }
    .fb-stat { grid-column: span 1; flex-direction: column; gap: 10px; }
    .fb-card { min-height: 140px; }
    .f-row { grid-template-columns: 1fr; }
    .footer { padding: 32px 16px 20px; }
    .footer-row { flex-direction: column; gap: 20px; align-items: center; text-align: center; }
    .footer-links { flex-wrap: wrap; justify-content: center; gap: 12px 20px; }
    .footer-contact { flex-direction: column; gap: 6px; align-items: center; }
}
