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

.demo-section {
    width: 100%;
    background: #F1F5ED;
    padding: 90px 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    box-sizing: border-box;
}

.demo-top {
    width: 100%;
    max-width: 720px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.demo-title {
    margin: 0;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 600;
    font-size: 56px;
    line-height: 64px;
    letter-spacing: -2px;
    color: #101c19;
}

.demo-lead {
    margin: 20px 0 0;
    max-width: 480px;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-size: 17px;
    line-height: 26px;
    letter-spacing: -0.2px;
    color: #3f4a46;
}

/* ---------- Formularz ---------- */

.demo-form {
    margin-top: 36px;
    width: 100%;
    max-width: 420px;
    display: flex;
    gap: 8px;
}

.demo-field {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 50px;
    background: #ffffff;
    border: 1px solid #e5ece7;
    border-radius: 10px;
    color: #7d8783;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.demo-field svg { width: 16px; height: 16px; flex-shrink: 0; }

.demo-field:focus-within {
    border-color: #087443;
    box-shadow: 0 0 0 3px rgba(8, 116, 67, 0.12);
}

.demo-field input {
    flex: 1;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-size: 15px;
    color: #101c19;
}

.demo-field input::placeholder { color: #8a948f; }

.demo-form.has-error .demo-field {
    border-color: #d93a3a;
    box-shadow: 0 0 0 3px rgba(217, 58, 58, 0.1);
}

.demo-submit {
    position: relative;
    height: 50px;
    padding: 0 22px;
    border: none;
    border-radius: 10px;
    background: #087443;
    color: #ffffff;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-weight: 500;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}

.demo-submit:hover { background: #065c35; }

.demo-submit:disabled { cursor: wait; }

.demo-spinner {
    display: none;
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: demo-spin 0.7s linear infinite;
}

.demo-form.is-sending .demo-submit-text { visibility: hidden; }
.demo-form.is-sending .demo-spinner { display: block; }

@keyframes demo-spin { to { transform: rotate(360deg); } }

.demo-honey {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.demo-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.demo-note {
    margin: 16px 0 0;
    font-family: 'Inter', 'Inter Fallback', Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
    color: #4b5552;
    transition: color 0.2s;
}

.demo-note.is-success { color: #087443; font-weight: 500; }
.demo-note.is-error   { color: #d93a3a; font-weight: 500; }

/* ---------- Scena z monitorem ---------- */

.demo-stage {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin-top: 40px;
    height: 520px;
}

.demo-curves {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.demo-curves path {
    stroke: #b9cbb9;
    stroke-width: 1.5;
    stroke-dasharray: 6 6;
    vector-effect: non-scaling-stroke;
    animation: demo-dash 20s linear infinite;
}

@keyframes demo-dash { to { stroke-dashoffset: -240; } }

.demo-monitor {
    position: absolute;
    left: 50%;
    top: 40px;
    transform: translateX(-50%);
    width: 520px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.demo-screen {
    width: 100%;
    aspect-ratio: 16 / 10;
    padding: 10px;
    background: #101c19;
    border-radius: 14px;
    box-sizing: border-box;
    box-shadow: 0 30px 60px rgba(16, 28, 25, 0.18);
}

.demo-screen img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    border-radius: 6px;
    background: #ffffff;
}

.demo-neck {
    width: 110px;
    height: 80px;
    background: linear-gradient(to right, #c9cfcb, #eef1ef 50%, #c9cfcb);
}

.demo-foot {
    width: 220px;
    height: 10px;
    border-radius: 6px 6px 2px 2px;
    background: #c9cfcb;
}

/* ---------- Pływające karty ---------- */

.demo-float {
    position: absolute;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5ece7;
    border-radius: 14px;
    box-shadow: 0 18px 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;
    animation: demo-float 6s ease-in-out infinite;
}

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

.demo-float-left   { left: 40px;  top: 230px; width: 220px; }
.demo-float-right  { right: 40px; top: 30px;  width: 220px; animation-delay: -2s; }
.demo-float-bottom { right: 110px; top: 330px; width: 190px; animation-delay: -4s; }

@keyframes demo-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

.df-title  { font-weight: 600; font-size: 13px; }
.df-small  { color: #7d8783; font-size: 10.5px; }
.df-strong { font-weight: 500; margin-top: 2px !important; }

.df-big {
    margin-top: 10px !important;
    font-size: 26px;
    line-height: 32px;
    font-weight: 600;
    letter-spacing: -0.6px;
}

.df-big span { font-size: 11px; font-weight: 400; color: #7d8783; letter-spacing: 0; }

.df-segments {
    margin-top: 12px;
    display: flex;
    gap: 2px;
    height: 5px;
}

.df-segments i { width: var(--w); border-radius: 2px; }
.df-segments i:nth-child(1), .df-legend li:nth-child(1) i { background: #087443; }
.df-segments i:nth-child(2), .df-legend li:nth-child(2) i { background: #4fa673; }
.df-segments i:nth-child(3), .df-legend li:nth-child(3) i { background: #9fd3b2; }
.df-segments i:nth-child(4), .df-legend li:nth-child(4) i { background: #d6e4da; }

.df-legend { margin-top: 12px !important; display: grid; gap: 8px; }
.df-legend li { display: flex; align-items: center; gap: 8px; color: #4b5552; }
.df-legend i { width: 10px; height: 10px; border-radius: 3px; }

.df-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-top: 1px solid #eef2ef;
}

.df-row.df-head { border-top: none; padding-top: 0; }
.df-row > div { flex: 1; }

.df-dot {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #101c19;
    flex-shrink: 0;
}

.df-up {
    padding: 2px 6px;
    border-radius: 999px;
    background: #dcefe3;
    color: #087443;
    font-size: 10px;
    font-weight: 600;
}

.df-pill {
    padding: 2px 8px;
    border-radius: 999px;
    background: #101c19;
    color: #ffffff;
    font-size: 10px;
    font-weight: 600;
    margin-right: auto;
}

.df-circle {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid #101c19;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    margin-left: auto;
}

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

.df-bar {
    margin-top: 4px;
    padding-left: 10px;
    border-left: 3px solid #101c19;
}

.df-bar b { display: block; font-size: 20px; line-height: 24px; }

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

@media (max-width: 1024px) {
    .demo-float-left   { left: 0; }
    .demo-float-right  { right: 0; }
    .demo-float-bottom { right: 40px; }
    .demo-monitor      { width: 440px; }
}

@media (max-width: 820px) {
    .demo-float,
    .demo-curves { display: none; }

    .demo-stage { height: auto; }

    .demo-monitor {
        position: static;
        transform: none;
        width: 100%;
        max-width: 520px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .demo-section { padding: 60px 16px 0; }

    .demo-title {
        font-size: 38px;
        line-height: 44px;
        letter-spacing: -1.2px;
    }

    .demo-lead { font-size: 16px; line-height: 24px; }

    .demo-form { flex-direction: column; }

    .demo-field { flex: none; }   /* w kolumnie flex: 1 ściskał pole do zera */

    .demo-submit { width: 100%; }

    .demo-neck { height: 50px; width: 80px; }
    .demo-foot { width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
    .demo-float,
    .demo-curves path { animation: none; }
}