/* ==========================================
   Millie OS System
========================================== */

.system-section {
    position: relative;
    padding: 3rem 0;
    overflow: hidden;
}

/* ==========================================
   Intro — centered
========================================== */

.system-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.system-intro {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}


/* ==========================================
   Eyebrow
========================================== */

.system-intro .section-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .75rem;

    width: fit-content;
    margin: 0 auto 2rem;

    color: #55a2f6;
    font-size: 13.6px;
    font-weight: 600;
    letter-spacing: .08em;
    line-height: 1;
    text-transform: uppercase;
}

.system-intro .section-eyebrow .accent-line {
    display: block;

    width: 36px;
    height: 2px;

    flex-shrink: 0;

    background: #f28c28;
}


/* ==========================================
   Main Title
========================================== */

.system-title {
    width: 100%;
    max-width: none;

    margin: 0 auto;

    font-size: clamp(3rem, 4.5vw, 5rem);
    letter-spacing: -.045em;

    text-align: center;
}

.system-title-line {
    display: block;

    width: 100%;

    white-space: nowrap;

    color: var(--color-white, #fff);
}

.system-title-accent {
    color: var(--color-primary);
}


/* ==========================================
   Description
========================================== */

.system-description {
    max-width: 720px;
    margin: 1.5rem auto 1.5rem;

    color: var(--color-text-muted);
    font-size: 1rem;
    line-height: 1.7;
}


/* ==========================================
   Buttons
========================================== */

.system-buttons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.system-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
}

.system-btn-orange {
    border-color: var(--color-accent);
    color: var(--color-text);
    box-shadow: 0 0 25px rgba(242,140,40,.08);
}

.system-btn-orange:hover {
    background: rgba(242,140,40,.08);
}


/* ==========================================
   Diagram
========================================== */

.system-diagram {
    position: relative;

    width: 100%;
    max-width: 1050px;

    margin: 5rem auto 0;

    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}


/* ==========================================
   Central Core
========================================== */

.system-core {
    position: relative;
    z-index: 5;

    width: 190px;
    height: 190px;

    margin: 0 auto 4rem;

    display: flex;
    align-items: center;
    justify-content: center;

    grid-column: 1 / -1;
    grid-row: 1;
}

.system-core-ring {
    position: relative;

    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(77,124,255,.55);
    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(77,124,255,.22),
            rgba(3,11,22,.97) 68%
        );

    box-shadow:
        0 0 40px rgba(242 140 40 / 80%),
        0 0 110px rgba(242,140,40,.16),
        0 0 200px rgba(242,140,40,.08),
        inset 0 0 30px rgba(77,124,255,.12);
}

/* obręcz wewnętrzna — pomarańczowa */

.system-core-ring::before {
    content: "";

    position: absolute;
    inset: 9px;

    border: 1px solid rgba(242,140,40,.5);
    border-radius: 50%;
}


/* obręcz zewnętrzna — pomarańczowa poświata */

.system-core-ring::after {
    content: "";

    position: absolute;
    inset: -120px;
    z-index: -1;

    border-radius: 50%;

    background: radial-gradient(
        circle,
        rgba(242,140,40,.16) 0%,
        rgba(242,140,40,.07) 38%,
        transparent 70%
    );

    pointer-events: none;
}

.system-core-inner {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.system-core-icon {
    width: 38px;
    height: 38px;

    margin-bottom: .65rem;
}

.system-core strong {
    font-size: 1.45rem;
    line-height: 1;
}

.system-core span {
    margin-top: .55rem;

    color: var(--color-text-muted);
    font-size: .55rem;
    line-height: 1.4;
    letter-spacing: .08em;

    text-align: center;
}

/* ==========================================
   Cards Grid
========================================== */

.system-diagram > .system-card {
    width: 100%;
}

.system-card-01 {
    grid-column: 1;
    grid-row: 2;
}

.system-card-02 {
    grid-column: 2;
    grid-row: 2;
}

.system-card-03 {
    grid-column: 1;
    grid-row: 3;
}

.system-card-04 {
    grid-column: 2;
    grid-row: 3;
}

.system-radar {
    grid-column: 1 / -1;
    grid-row: 4;
}


/* =========================================================
   KARTA
========================================================= */

.system-card {
    position: relative;

    display: flex;
    flex-direction: column;

    padding: 2.25rem 2rem;

    overflow: hidden;

    border: 1px solid rgba(77, 124, 255, .3);
    border-radius: 20px;

    background:
        radial-gradient(
            circle at 100% 100%,
            rgba(242, 140, 40, .09),
            transparent 55%
        ),
        linear-gradient(
            180deg,
            rgba(26, 51, 100, .82),
            rgba(8, 19, 39, .95)
        );

    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07);

    transition:
        border-color .3s ease,
        transform .3s ease;
}


/* świetlista krawędź u góry */

.system-card::before {
    content: "";

    position: absolute;
    top: 0;
    left: 12%;

    width: 76%;
    height: 1px;

    background: linear-gradient(
        90deg,
        transparent,
        rgba(133, 176, 255, .5),
        transparent
    );
}

.system-card:hover {
    border-color: rgba(77, 124, 255, .55);

    transform: translateY(-4px);
}


/* warianty kolorystyczne — wyrównane do jednego tła */

.system-card-blue,
.system-card-orange {
    border-color: rgba(77, 124, 255, .3);

    background:
        radial-gradient(
            circle at 100% 100%,
            rgba(242, 140, 40, .09),
            transparent 55%
        ),
        linear-gradient(
            180deg,
            rgba(26, 51, 100, .82),
            rgba(8, 19, 39, .95)
        );
}


/* =========================================================
   NUMER
========================================================= */

.system-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    align-self: flex-start;

    width: 46px;
    height: 46px;

    margin-bottom: 1.75rem;

    border: 1px solid rgba(242, 140, 40, .7);
    border-radius: 12px;

    background: rgba(242, 140, 40, .07);

    color: var(--color-accent);

    font-size: .95rem;
    font-weight: 700;
    line-height: 1;
}


/* =========================================================
   IKONA
========================================================= */

.system-card-icon {
    position: absolute;
    top: 2.25rem;
    right: 2rem;

    width: 45px;
    height: 45px;

    object-fit: contain;

    filter: brightness(0) saturate(100%) invert(63%) sepia(72%)
            saturate(1352%) hue-rotate(340deg) brightness(97%) contrast(92%);
}


/* =========================================================
   TYTUŁ I TEKST
========================================================= */

.system-card h3,
.system-card-title {
    margin: 0 0 .9rem;

    color: var(--color-white, #fff);

    font-size: 1.45rem;
    font-weight: 700;
    line-height: 1.25;

    letter-spacing: -.02em;
}

.system-card p,
.system-card-text {
    margin: 0 0 1.5rem;

    color: var(--color-text-muted);

    font-size: 1rem;
    line-height: 1.7;
}


/* =========================================================
   TABLETKI
========================================================= */

.system-tags {
    display: flex;
    flex-wrap: wrap;

    gap: .6rem;

    margin-bottom: 1.75rem;
}

.system-tags span {
    display: inline-flex;
    align-items: center;

    padding: .5rem 1rem;

    border: 1px solid rgba(242, 140, 40, .4);
    border-radius: 999px;

    background: rgba(242, 140, 40, .06);

    color: var(--color-accent);

    font-size: .82rem;
    font-weight: 600;
    line-height: 1;

    white-space: nowrap;
}


/* =========================================================
   LINK
========================================================= */

.system-link {
    display: inline-flex;
    align-items: center;

    align-self: flex-start;

    gap: .6rem;

    margin-top: auto;

    color: #55a2f6;
    text-decoration: none;

    font-size: .95rem;
    font-weight: 600;
    line-height: 1;

    transition: gap .3s ease;
}

.system-link:hover {
    gap: 1rem;

    color: #86b0ff;
}

/* ==========================================
   Radar
========================================== */

.system-radar {
    grid-column: 1 / -1;
    grid-row: 4;

    display: grid;
    grid-template-columns: .85fr 1.15fr;

    align-items: center;
    gap: 2rem;

    min-height: 260px;
    padding: 1.7rem;

    border: 1px solid rgba(242,140,40,.42);
    border-radius: 22px;

    background: #030B16;

    box-shadow:
        0 0 40px rgba(242,140,40,.07),
        inset 0 0 30px rgba(242,140,40,.025);

    z-index: 3;
}


/* ==========================================
   Radar content
========================================== */

.system-radar-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.system-radar-heading {
    display: flex;
    align-items: center;
    gap: .8rem;

    margin-bottom: 1rem;
}

.system-radar h3 {
    margin: 0;

    font-size: 1.25rem;
    line-height: 1.1;
}

.system-radar strong {
    display: block;

    margin-top: .25rem;

    color: var(--color-accent);
    font-size: .75rem;
}

.system-radar p {
    max-width: 430px;

    margin: 0 0 1rem;

    color: var(--color-text-muted);

    font-size: .8rem;
    line-height: 1.55;
}


/* ==========================================
   Radar image
========================================== */

.system-radar-image {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    height: 100%;

    min-width: 0;

    overflow: hidden;

    border-radius: 14px;
}

.system-radar-image img {
    display: block;

    width: 100%;
    max-width: 100%;
    max-height: 225px;

    height: auto;

    object-fit: contain;

    border-radius: 14px;
}


/* ==========================================
   System Bottom
========================================== */

.system-bottom {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    max-width: 760px;

    margin: 3rem auto 0;
    padding: 1rem 4rem;

    color: #55a2f6;

    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.5;

    text-align: center;
}

.system-bottom::before {
    content: "";

    position: absolute;
    left: 0;
    top: 50%;

    width: 90px;
    height: 1px;

    transform: translateY(-50%);

    background: linear-gradient(
        90deg,
        transparent,
        rgba(77,124,255,.75)
    );

    box-shadow:
        0 0 8px rgba(77,124,255,.45);
}

.system-bottom::after {
    content: "";

    position: absolute;
    right: 0;
    top: 50%;

    width: 90px;
    height: 1px;

    transform: translateY(-50%);

    background: linear-gradient(
        90deg,
        rgba(77,124,255,.75),
        transparent
    );

    box-shadow:
        0 0 8px rgba(77,124,255,.45);
}

.system-bottom span {
    position: relative;
    z-index: 2;
}

.system-bottom span::before,
.system-bottom span::after {
    content: "";

    position: absolute;
    top: 50%;

    width: 5px;
    height: 5px;

    transform: translateY(-50%);

    border-radius: 50%;

    background: #4d7cff;

    box-shadow:
        0 0 8px rgba(77,124,255,.9),
        0 0 16px rgba(77,124,255,.45);
}

.system-bottom span::before {
    left: -4rem;
}

.system-bottom span::after {
    right: -4rem;
}


/* ==========================================
   RESPONSIVE — TABLET
========================================== */

@media (max-width: 800px) {

    /* ------------------------------------------
       SECTION
    ------------------------------------------ */

    .system-section {
        padding: 7rem 0;
    }


    /* ------------------------------------------
       INTRO
    ------------------------------------------ */

    .system-intro {
        max-width: 100%;
    }

    .system-title {
        font-size: clamp(3rem, 8vw, 4.5rem);
    }

    .system-description {
        max-width: 620px;
    }


    /* ------------------------------------------
       DIAGRAM
    ------------------------------------------ */

    .system-diagram {
        display: grid;
        grid-template-columns: 1fr;

        gap: 1.25rem;

        margin-top: 4rem;
    }


    /* ------------------------------------------
       CORE
    ------------------------------------------ */

    .system-core {
        grid-column: 1;
        grid-row: 1;

        margin-bottom: 2.5rem;
    }


    /* ------------------------------------------
       SERVICE CARDS
    ------------------------------------------ */

    .system-card-01,
    .system-card-02,
    .system-card-03,
    .system-card-04 {
        grid-column: 1;
    }

    .system-card-01 {
        grid-row: 2;
    }

    .system-card-02 {
        grid-row: 3;
    }

    .system-card-03 {
        grid-row: 4;
    }

    .system-card-04 {
        grid-row: 5;
    }


    .system-card {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }


    /* ------------------------------------------
       RADAR
    ------------------------------------------ */

    .system-radar {
        grid-column: 1;
        grid-row: 6;

        display: grid !important;
        grid-template-columns: 1fr !important;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        box-sizing: border-box;

        gap: 2rem;

        padding: 1.5rem;
    }


    .system-radar-content {
        width: 100%;
        max-width: 100%;
        min-width: 0;

        box-sizing: border-box;
    }


    .system-radar-heading {
        display: flex;
        align-items: flex-start;

        gap: 1rem;
    }


    .system-radar-heading > div {
        min-width: 0;
    }


    .system-radar-heading h3 {
        margin: 0;

        font-size: 1.4rem;
        line-height: 1.15;
    }


    .system-radar-heading strong {
        display: block;

        margin-top: .35rem;

        font-size: .8rem;
        line-height: 1.3;
    }


    .system-radar-content > p {
        margin: 1.2rem 0 0;

        font-size: .85rem;
        line-height: 1.6;
    }


    /* ------------------------------------------
       RADAR IMAGE
    ------------------------------------------ */

    .system-radar-image {
        width: 100%;
        max-width: 100%;

        height: auto !important;
        min-height: 0 !important;

        margin: 0;
        padding: 0;

        overflow: hidden;

        box-sizing: border-box;
    }


    .system-radar-image img {
        display: block;

        width: 100%;
        max-width: 100%;

        height: auto !important;
        max-height: none !important;

        object-fit: contain;

        margin: 0 auto;
    }


    /* ------------------------------------------
       TAGS
    ------------------------------------------ */

    .system-tags {
        display: flex;
        flex-wrap: wrap;

        gap: .5rem;
    }


    /* ------------------------------------------
       BOTTOM LINE
    ------------------------------------------ */

    .system-bottom {
        margin-top: 2rem;
    }

}


/* ==========================================
   RESPONSIVE — MOBILE
========================================== */

@media (max-width: 600px) {

    /* ------------------------------------------
       SECTION
    ------------------------------------------ */

    .system-section {
        padding: 5rem 0 0;
    }


    /* ------------------------------------------
       INTRO
    ------------------------------------------ */

    .system-intro {
        width: 100%;
        max-width: 100%;
    }


    .system-title {
        width: 100%;

        font-size: clamp(2.7rem, 12vw, 4rem);
        line-height: .96;

        letter-spacing: -.04em;
    }


    .system-title-line {
        white-space: normal;
    }


    .system-description {
        width: 100%;
        max-width: 100%;

        margin: 1.75rem auto 2.25rem;

        font-size: .95rem;
        line-height: 1.6;
    }


    /* ------------------------------------------
       BUTTONS
    ------------------------------------------ */

    .system-buttons {
        display: flex;
        flex-direction: column;

        width: 100%;
        gap: .75rem;
    }


    .system-buttons .btn {
        width: 100%;

        justify-content: center;

        box-sizing: border-box;
    }


    /* ------------------------------------------
       DIAGRAM
    ------------------------------------------ */

    .system-diagram {
        display: grid;

        grid-template-columns: 1fr;

        gap: 1rem;

        width: 100%;
        max-width: 100%;

        margin-top: 3rem;
    }


    /* ------------------------------------------
       CORE
    ------------------------------------------ */

    .system-core {
        grid-column: 1;
        grid-row: 1;

        width: 160px;
        height: 160px;

        margin: 0 auto 2rem;
    }


    .system-core-icon {
        width: 30px;
        height: 30px;
    }


    .system-core strong {
        font-size: 1.15rem;
    }


    /* ------------------------------------------
       SERVICE CARDS
    ------------------------------------------ */

    .system-card {
        grid-column: 1 !important;

        min-height: auto;

        width: 100%;
        max-width: 100%;
        min-width: 0;

        padding: 1.25rem;

        box-sizing: border-box;
    }


    .system-card-01 {
        grid-row: 2;
    }

    .system-card-02 {
        grid-row: 3;
    }

    .system-card-03 {
        grid-row: 4;
    }

    .system-card-04 {
        grid-row: 5;
    }


    /* ------------------------------------------
       RADAR — MAIN CARD
    ------------------------------------------ */

    .system-radar {
        grid-column: 1 !important;
        grid-row: 6 !important;

        display: flex !important;
        flex-direction: column !important;

        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        gap: 1.5rem;

        padding: 1.25rem !important;

        box-sizing: border-box;
    }


    /* ------------------------------------------
       RADAR CONTENT
    ------------------------------------------ */

    .system-radar-content {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;

        box-sizing: border-box;
    }


    .system-radar-heading {
        display: flex !important;
        align-items: flex-start !important;

        gap: .8rem !important;

        width: 100%;
    }


    .system-radar-heading > div {
        flex: 1;

        min-width: 0;
    }


    .system-radar-heading h3 {
        margin: 0 !important;

        font-size: 1.2rem !important;
        line-height: 1.15 !important;
    }


    .system-radar-heading strong {
        display: block !important;

        margin-top: .3rem !important;

        font-size: .72rem !important;
        line-height: 1.3 !important;
    }


    .system-radar-content > p {
        width: 100%;

        margin: 1rem 0 0 !important;

        font-size: .78rem !important;
        line-height: 1.55 !important;
    }


    /* ------------------------------------------
       RADAR TAGS
    ------------------------------------------ */

    .system-radar .system-tags {
        display: flex !important;
        flex-wrap: wrap !important;

        gap: .4rem !important;

        margin-top: 1rem !important;
    }


    .system-radar .system-tags span {
        font-size: .65rem !important;

        padding: .3rem .6rem !important;
    }


    /* ------------------------------------------
       RADAR LINK
    ------------------------------------------ */

    .system-radar .system-link {
        display: inline-flex !important;

        margin-top: 1rem !important;

        font-size: .75rem !important;
    }


    /* ------------------------------------------
       RADAR IMAGE
    ------------------------------------------ */

    .system-radar-image {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        height: auto !important;
        min-height: 0 !important;

        margin: 0 !important;
        padding: 0 !important;

        overflow: hidden !important;

        box-sizing: border-box !important;
    }


    .system-radar-image img {
        display: block !important;

        width: 100% !important;
        max-width: 100% !important;

        height: auto !important;
        max-height: none !important;

        object-fit: contain !important;

        margin: 0 auto !important;
    }


    /* ------------------------------------------
       SYSTEM BOTTOM
    ------------------------------------------ */

    .system-bottom {
        width: 100%;

        margin-top: 1.5rem;

        padding: 1rem 2rem;

        font-size: .85rem;

        box-sizing: border-box;
    }


    .system-bottom::before,
    .system-bottom::after {
        width: 30px;
    }


    .system-bottom span::before {
        left: -1.75rem;
    }


    .system-bottom span::after {
        right: -1.75rem;
    }

}