/* ---------- Sekcja ---------- */

.stack-section {
    width: 100%;
    background: #ffffff;
    padding: 80px 20px 120px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.stack-list {
    width: 100%;
    max-width: 1200px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* ---------- Karta ---------- */

.stack-card {
    position: sticky;
    top: calc(90px + var(--i) * 12px);    /* każda kolejna przykleja się trochę niżej → widać krawędzie poprzednich */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    min-height: 460px;
    padding: 16px 16px 16px 56px;
    background: #f7f9f5;
    border: 1px solid #e5ece7;
    border-radius: 24px;
    box-sizing: border-box;
    transform-origin: top center;
    transform: scale(var(--scale, 1));
    will-change: transform;
    box-shadow: 0 -6px 30px rgba(16, 28, 25, 0.04);
}

.stack-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 24px 0;
}

.stack-tag {
    margin: 0;
    padding: 5px 10px;
    border-radius: 6px;
    background: #dcefe3;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 500;
    font-size: 13px;
    line-height: 16px;
    letter-spacing: -0.2px;
    color: #087443;
}

.stack-title {
    margin: 16px 0 0;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 600;
    font-size: 32px;
    line-height: 40px;
    letter-spacing: -1px;
    color: #101c19;
}

.stack-desc {
    margin: 12px 0 0;
    max-width: 440px;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 400;
    font-size: 16px;
    line-height: 25px;
    letter-spacing: -0.2px;
    color: #4b5552;
}

/* Przycisk „Learn More” z kółkiem i strzałką */
.stack-button {
    margin-top: 32px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 6px 6px 18px;
    border-radius: 999px;
    background: #101c19;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: -0.2px;
    transition: background 0.25s;
}

.stack-button-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #ffffff;
    color: #101c19;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
}

.stack-button-icon svg {
    width: 13px;
    height: 13px;
}

.stack-button:hover {
    background: #087443;
}

.stack-button:hover .stack-button-icon {
    transform: rotate(-45deg);
}

/* ---------- Kolorowy panel z makietą ---------- */

.stack-visual {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.stack-visual-1 { background: radial-gradient(circle at 80% 85%, #bfe6cd 0%, transparent 55%), linear-gradient(160deg, #eef7f0, #dff0e5); }
.stack-visual-2 { background: radial-gradient(circle at 15% 80%, #f9dcc4 0%, transparent 50%), linear-gradient(160deg, #f4f6f1, #e8efe6); }
.stack-visual-3 { background: radial-gradient(circle at 85% 30%, #c7e3f5 0%, transparent 50%), radial-gradient(circle at 20% 90%, #d6f0c9 0%, transparent 50%), #e9f3f3; }
.stack-visual-4 { background: radial-gradient(circle at 70% 85%, #cfe9d8 0%, transparent 55%), linear-gradient(160deg, #f1f5ed, #e3eee4); }

/* ---------- Makiety ---------- */

.mock {
    position: relative;
    width: 100%;
    max-width: 320px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5ece7;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(16, 28, 25, 0.08);
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-size: 12px;
    line-height: 16px;
    color: #101c19;
    box-sizing: border-box;
}

.mock p { margin: 0; }
.mock ul { margin: 0; padding: 0; list-style: none; }

.mock-head {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.mock-dot {
    width: 8px;
    height: 8px;
    border-radius: 2px;
    background: #087443;
}

.mock-muted {
    display: block;
    color: #7d8783;
    font-size: 11px;
}

/* 1 – kanały */
.mock-total {
    margin-top: 14px;
    padding: 12px;
    border-radius: 10px;
    background: #f7f9f5;
}

.mock-big {
    display: block;
    margin-top: 4px;
    font-size: 22px;
    line-height: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

.mock-up {
    font-style: normal;
    font-size: 11px;
    font-weight: 500;
    color: #087443;
    background: #dcefe3;
    padding: 2px 6px;
    border-radius: 999px;
    vertical-align: middle;
}

.mock .mock-channels { margin-top: 14px; display: grid; gap: 10px; }

.mock-channels li {
    display: grid;
    grid-template-columns: 74px 1fr 32px;
    align-items: center;
    gap: 10px;
}

.mock-channels i {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, #087443 var(--w), #e5ece7 var(--w));
}

.mock-channels b { text-align: right; font-weight: 500; }

/* 2 – alerty */
.mock-badge {
    position: absolute;
    top: -14px;
    right: -14px;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #087443;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 18px rgba(8, 116, 67, 0.3);
}

.mock-badge svg { width: 18px; height: 18px; }

.mock-alert {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #eef2ef;
    border-radius: 10px;
    display: grid;
    grid-template-columns: 28px 1fr auto;
    align-items: center;
    gap: 10px;
}

.mock-alert b { display: block; font-weight: 600; }

.mock-ico {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.mock-ico-red   { background: #fde8e8; color: #d93a3a; }
.mock-ico-green { background: #dcefe3; color: #087443; }
.mock-ico-amber { background: #fdf0d8; color: #c27c0e; }

.mock-pill {
    font-style: normal;
    font-size: 10px;
    font-weight: 500;
    padding: 3px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.mock-pill-red   { background: #fde8e8; color: #d93a3a; }
.mock-pill-green { background: #dcefe3; color: #087443; }
.mock-pill-amber { background: #fdf0d8; color: #c27c0e; }

/* 3 – czat */
.mock-question {
    display: flex;
    align-items: center;
    gap: 10px;
}

.mock-question p {
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f3f2;
    font-weight: 500;
}

.mock-avatar {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #101c19;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mock-avatar-sm {
    width: 22px;
    height: 22px;
    font-size: 8px;
    margin-left: auto;
}

.mock-answer {
    margin-top: 14px;
    padding: 12px;
    border-radius: 12px;
    background: #f7f9f5;
    border: 1px solid #e5ece7;
}

.mock-answer > p + p { margin-top: 6px; color: #3c4643; }

.mock-ai {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #087443;
}

.mock-ai-ico {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    background: #087443;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
}

.mock-spark { display: block; width: 100%; margin-top: 10px; }

.mock-chip {
    display: inline-block;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #e5ece7;
    font-size: 11px;
    font-weight: 500;
}

/* 4 – brief */
.mock-donut-row {
    margin-top: 12px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.mock-donut { width: 96px; height: 96px; transform: rotate(-90deg); }
.mock-donut text { transform: rotate(90deg); transform-origin: 21px 21px; }

.mock-legend { display: grid; gap: 6px; }

.mock-legend li { display: flex; align-items: center; gap: 6px; color: #4b5552; }
.mock-legend i { width: 10px; height: 10px; border-radius: 3px; }

.mock-sub {
    margin-top: 14px !important;
    font-weight: 600;
    font-size: 13px;
}

.mock .mock-tasks { margin-top: 8px; display: grid; gap: 4px; }

.mock-tasks li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    border-bottom: 1px solid #eef2ef;
}

.mock-tasks li:last-child { border-bottom: none; }

.mock-check {
    width: 14px;
    height: 14px;
    border-radius: 4px;
    border: 1.5px solid #c9d4cc;
    flex-shrink: 0;
}

.mock-tasks .is-done .mock-check {
    background: #087443 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 8l3 3 5-6' stroke='white' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center / 12px no-repeat;
    border-color: #087443;
}

.mock-tasks .is-done { color: #7d8783; text-decoration: line-through; }

/* ---------- Responsywność ---------- */

@media (max-width: 900px) {
    .stack-card {
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 12px;
        min-height: 0;
    }

    .stack-text {
        padding: 24px 16px 16px;
    }
}

/* Na telefonie karty są za wysokie, żeby się sensownie nakładać → zwykła lista */
@media (max-width: 640px) {
    .stack-section {
        padding: 60px 16px;
    }

    .stack-list {
        gap: 16px;
    }

    .stack-card {
        position: relative;
        top: auto;
        transform: none;
    }

    .stack-title {
        font-size: 26px;
        line-height: 32px;
    }

    .stack-visual {
        padding: 32px 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .stack-card { transform: none; }
    .stack-button, .stack-button-icon { transition: none; }
}