/* =============================================
   fakturownia-kod.pl – Design System 2026
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --primary: #1a56db;
    --primary-dark: #1341b0;
    --primary-light: #ebf0ff;
    --green: #16a34a;
    --green-light: #dcfce7;
    --text: #111827;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg: #f3f4f6;
    --white: #ffffff;
    --radius: 14px;
    --radius-sm: 8px;
    --shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.10);
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* ── HERO ─────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
    color: var(--white);
    text-align: center;
    padding: 72px 20px 80px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 70% 0%, rgba(99, 102, 241, .25) 0%, transparent 70%);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    color: #93c5fd;
    padding: 6px 18px;
    border-radius: 50px;
    font-size: .85rem;
    font-weight: 600;
    letter-spacing: .03em;
    margin-bottom: 24px;
}

.hero h1 {
    font-size: clamp(1.9rem, 5vw, 3rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -.02em;
    margin-bottom: 16px;
    color: var(--white);
}

.hero h1 span {
    color: #60a5fa;
}

.hero-sub {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, .75);
    max-width: 520px;
    margin: 0 auto 40px;
}

/* ── BENEFITS BAR ─────────────────────────── */
.benefits-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.benefit-pill {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: .9rem;
    font-weight: 500;
    color: var(--white);
}

.benefit-pill .icon {
    font-size: 1rem;
}

/* ── CODE BOX ─────────────────────────────── */
.code-wrapper {
    margin: 0 auto 36px;
    max-width: 340px;
}

.code-label {
    font-size: .8rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .5);
    margin-bottom: 10px;
}

.code-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, .08);
    border: 2px dashed rgba(255, 255, 255, .35);
    border-radius: var(--radius-sm);
    padding: 16px 22px;
    cursor: pointer;
    transition: border-color .2s, background .2s;
    gap: 12px;
}

.code-box:hover {
    border-color: #60a5fa;
    background: rgba(96, 165, 250, .12);
}

.code-text {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: .05em;
    color: var(--white);
    user-select: all;
}

.copy-btn {
    flex-shrink: 0;
    background: #1a56db;
    border: none;
    color: #fff;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #1341b0;
}

/* ── CTA BUTTON ───────────────────────────── */
.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: var(--white);
    padding: 18px 44px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 10px 30px rgba(22, 163, 74, .4);
    transition: transform .2s, box-shadow .2s;
    letter-spacing: -.01em;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(22, 163, 74, .5);
}

.cta-note {
    font-size: .8rem;
    color: rgba(255, 255, 255, .45);
    margin-top: 14px;
}

/* ── MAIN CONTENT ─────────────────────────── */
.content {
    max-width: 860px;
    margin: 0 auto;
    padding: 72px 20px;
}

/* ── SECTION TITLES ───────────────────────── */
.section-title {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 8px;
    letter-spacing: -.02em;
}

.section-sub {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 36px;
}

section {
    margin-bottom: 72px;
}

/* ── STEPS ────────────────────────────────── */
.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

.step-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 28px 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    position: relative;
    transition: transform .2s, box-shadow .2s;
}

.step-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.step-num {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 16px;
}

.step-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.step-card p {
    font-size: .9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

/* ── BENEFITS SECTION ─────────────────────── */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.benefit-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: transform .2s;
}

.benefit-card:hover {
    transform: translateY(-3px);
}

.benefit-icon {
    width: 44px;
    height: 44px;
    background: var(--green-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.benefit-card h3 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.benefit-card p {
    font-size: .85rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* ── FAQ ──────────────────────────────────── */
.faq-list {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    overflow: hidden;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 24px 28px;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.faq-item h3::before {
    content: 'Q';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: 6px;
    font-size: .75rem;
    font-weight: 800;
    flex-shrink: 0;
    margin-top: 1px;
}

.faq-item p {
    font-size: .93rem;
    color: var(--text-muted);
    line-height: 1.65;
    padding-left: 34px;
}

/* ── BANNER ───────────────────────────────── */
.banner-wrap {
    text-align: center;
    margin: 0 0 72px;
}

.banner-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

/* ── FOOTER ───────────────────────────────── */
footer {
    background: #0f172a;
    color: rgba(255, 255, 255, .5);
    padding: 40px 20px;
    text-align: center;
    font-size: .85rem;
}

.footer-inner {
    max-width: 860px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 20px;
}

.footer-links a {
    color: rgba(255, 255, 255, .45);
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover {
    color: rgba(255, 255, 255, .85);
}

.footer-partner {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 20px;
    margin-bottom: 20px;
    font-size: .8rem;
    color: rgba(255, 255, 255, .3);
}

.footer-partner a {
    color: rgba(255, 255, 255, .35);
    text-decoration: none;
}

.footer-partner a:hover {
    color: rgba(255, 255, 255, .7);
}

.footer-copy {
    color: rgba(255, 255, 255, .25);
    font-size: .8rem;
    line-height: 1.7;
}

/* ── COPY TOAST ───────────────────────────── */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #111827;
    color: #fff;
    padding: 12px 28px;
    border-radius: 50px;
    font-size: .9rem;
    font-weight: 600;
    opacity: 0;
    transition: transform .3s, opacity .3s;
    pointer-events: none;
    z-index: 999;
    white-space: nowrap;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 600px) {
    .hero {
        padding: 48px 16px 56px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .cta-button {
        padding: 16px 28px;
        font-size: 1rem;
    }

    .code-text {
        font-size: 1.5rem;
    }

    .content {
        padding: 48px 16px;
    }

    .section-title {
        font-size: 1.35rem;
    }

    .steps {
        grid-template-columns: 1fr 1fr;
    }

    .faq-item {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .steps {
        grid-template-columns: 1fr;
    }
}

/* ── TRUST LIST (pod CTA w hero) ─────────────────── */
.trust-list {
    list-style: none;
    padding: 0;
    margin: 16px auto 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 18px;
}

.trust-list li {
    font-size: .8rem;
    color: rgba(255, 255, 255, .5);
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
}

.trust-list li::before {
    content: '✔';
    color: #4ade80;
    font-size: .75rem;
}

/* ── FOMO LINE ─────────────────────────────── */
.fomo-line {
    font-size: .78rem;
    color: rgba(255, 255, 255, .3);
    margin-top: 12px;
    font-style: italic;
    letter-spacing: .01em;
}

/* ── SAVINGS BLOCK ─────────────────────────── */
.savings-block {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
    padding: 28px 36px;
    margin-bottom: 72px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.savings-label h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.savings-label p {
    font-size: .82rem;
    color: var(--text-muted);
}

.savings-prices {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

.price-old {
    font-size: 1rem;
    color: var(--text-muted);
    text-decoration: line-through;
}

.price-new {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--green);
}

.savings-badge {
    background: var(--green-light);
    color: var(--green);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: .82rem;
    font-weight: 700;
    white-space: nowrap;
}

@media (max-width: 580px) {
    .savings-block {
        padding: 20px;
        flex-direction: column;
    }

    .price-new {
        font-size: 1.25rem;
    }
}

/* ── STEPS LIST (6 kroków pionowo) ────────── */
.steps-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.step-list-item {
    display: flex;
    align-items: flex-start;
    gap: 18px;
    background: var(--white);
    border-radius: var(--radius-sm);
    padding: 18px 22px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform .15s, box-shadow .15s;
}

.step-list-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-md);
}

.step-list-item .step-num {
    flex-shrink: 0;
    margin-bottom: 0;
}

.step-list-item .step-content h3 {
    font-size: .95rem;
    font-weight: 700;
    margin-bottom: 3px;
}

.step-list-item .step-content p {
    font-size: .88rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin: 0;
}

/* ── STEP WARNING ──────────────────────────── */
.step-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-left: 4px solid #f97316;
    border-radius: var(--radius-sm);
    padding: 14px 18px;
    font-size: .88rem;
    color: #92400e;
    margin-top: 16px;
    line-height: 1.6;
}

/* ── CHECKOUT PREVIEW ──────────────────────── */
.checkout-preview-wrap {
    margin-bottom: 60px;
}

.checkout-caption {
    font-size: .95rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 16px;
    text-align: center;
}

.checkout-preview {
    background: var(--white);
    border: 1px solid #e0e7ef;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 28px;
    max-width: 560px;
    margin: 0 auto 16px;
    font-size: .9rem;
}

.checkout-preview-title {
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
    color: var(--text);
}

.checkout-preview-title svg {
    color: #3b82f6;
}

.checkout-product-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 4px;
}

.checkout-product-name {
    font-weight: 700;
    font-size: .92rem;
}

.checkout-product-meta {
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.checkout-product-pricing {
    text-align: right;
}

.checkout-product-pricing .p-old {
    text-decoration: line-through;
    color: var(--text-muted);
    font-size: .82rem;
    margin-right: 6px;
}

.checkout-product-pricing .p-current {
    font-size: 1.1rem;
    font-weight: 700;
}

.checkout-product-pricing .p-tag {
    color: var(--green);
    font-size: .8rem;
    font-weight: 700;
    display: block;
    text-align: right;
}

.checkout-code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid var(--border);
    padding: 12px 0;
    margin: 10px 0;
    gap: 10px;
    flex-wrap: wrap;
}

.checkout-code-chip {
    background: #f1f5f9;
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 5px 14px;
    font-size: .82rem;
    font-weight: 600;
    color: var(--text);
}

.checkout-active-tag {
    background: var(--green-light);
    color: var(--green);
    border-radius: var(--radius-sm);
    padding: 4px 14px;
    font-size: .82rem;
    font-weight: 700;
}

.checkout-lines {
    border-top: 1px solid var(--border);
    padding-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.checkout-line {
    display: flex;
    justify-content: space-between;
    font-size: .88rem;
    color: var(--text-muted);
}

.checkout-line.rabat {
    color: var(--green);
    font-weight: 700;
}

.checkout-line.netto {
    color: var(--text);
    font-weight: 600;
}

.checkout-line .chip-small {
    background: var(--green-light);
    color: var(--green);
    border-radius: 50px;
    padding: 1px 8px;
    font-size: .76rem;
    margin-left: 6px;
    font-weight: 700;
}

.checkout-total-row {
    display: flex;
    justify-content: space-between;
    border-top: 2px solid var(--border);
    margin-top: 14px;
    padding-top: 14px;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text);
}

.checkout-pay-btn {
    background: #2563eb;
    color: white;
    text-align: center;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 700;
    margin-top: 18px;
    font-size: .95rem;
    letter-spacing: .01em;
}

.checkout-note {
    text-align: center;
    font-size: .8rem;
    color: var(--text-muted);
    margin-top: 10px;
    font-style: italic;
}

/* Redirect Overlay */
.redirect-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.redirect-overlay.show {
    opacity: 1;
    pointer-events: auto;
}
.redirect-box {
    background: #ffffff;
    padding: 30px 40px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 90%;
    width: 400px;
    animation: scaleUp 0.3s ease;
}
.redirect-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 15px 0 5px;
}
.redirect-text strong {
    color: #2563eb;
}
.redirect-sub {
    font-size: 1rem;
    color: #555;
    margin-bottom: 0;
}
.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #2563eb;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
@keyframes scaleUp {
    0% { transform: scale(0.9); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.copy-helper {
    display: block;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 8px;
    font-weight: 500;
    text-align: center;
}