/* =========================================================
   ARCTEC — SYSTEM / ERROR PAGES
   ========================================================= */

.system-page {
    position: relative;
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid var(--color-border);
}

.system-page::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: var(--page-gutter);
    width: 1px;
    background: linear-gradient(
        to bottom,
        transparent,
        var(--color-border) 20%,
        var(--color-border) 80%,
        transparent
    );
    opacity: 0.45;
    pointer-events: none;
}

.system-page__layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns:
        minmax(10rem, 0.35fr)
        minmax(0, 1fr);
    gap: clamp(3rem, 8vw, 10rem);
    align-items: center;
    padding-top: clamp(5rem, 9vh, 8rem);
    padding-bottom: clamp(5rem, 9vh, 8rem);
}


/* =========================================================
   STATUS CODE
   ========================================================= */

.system-page__code {
    position: relative;
    min-height: 19rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-left: clamp(1.5rem, 3vw, 3rem);
    border-left: 1px solid var(--color-primary-bright);
}

.system-page__code::before,
.system-page__code::after {
    content: "";
    position: absolute;
    left: -0.4rem;
    width: 0.75rem;
    height: 0.75rem;
    border: 1px solid var(--color-primary-bright);
    background: var(--color-background);
    transform: rotate(45deg);
}

.system-page__code::before {
    top: 0;
}

.system-page__code::after {
    bottom: 0;
}

.system-page__code span {
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.16em;
}

.system-page__code strong {
    margin-top: 1rem;
    color: var(--color-primary-bright);
    font-family: var(--font-sans);
    font-size: clamp(5rem, 10vw, 10rem);
    font-weight: 700;
    line-height: 0.8;
    letter-spacing: -0.07em;
}


/* =========================================================
   CONTENT
   ========================================================= */

.system-page__content {
    max-width: 68rem;
}

.system-page__content h1 {
    max-width: 11ch;
    margin: clamp(1.8rem, 3vw, 3rem) 0 2rem;
    color: var(--color-text);
    font-size: clamp(3.5rem, 6.5vw, 7.5rem);
    font-weight: 700;
    line-height: 0.88;
    letter-spacing: -0.065em;
}

.system-page__content h1 span {
    display: block;
    color: var(--color-primary-bright);
}

.system-page__content > p {
    max-width: 44rem;
    margin: 0;
    color: var(--color-text-muted);
    font-size: clamp(1rem, 1.25vw, 1.2rem);
    line-height: 1.75;
}

.system-page__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-top: clamp(2.5rem, 4vw, 4rem);
}

.system-page__text-link {
    margin-left: 0.75rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition:
        color var(--transition-fast);
}

.system-page__text-link:hover,
.system-page__text-link:focus-visible {
    color: var(--color-primary-bright);
}


/* =========================================================
   SYSTEM STATUS
   ========================================================= */

.system-page__status {
    position: absolute;
    z-index: 0;
    right: var(--page-gutter);
    bottom: 2rem;
    left: var(--page-gutter);
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.system-page__status i {
    height: 1px;
    flex: 1;
    background: var(--color-border);
}

.system-page__status strong {
    color: var(--color-primary-bright);
    font-size: inherit;
}


/* =========================================================
   COMING SOON VARIANT
   ========================================================= */

.system-page--construction .system-page__code strong {
    font-size: clamp(4rem, 8vw, 8rem);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 900px) {

    .system-page {
        min-height: auto;
    }

    .system-page__layout {
        grid-template-columns: 1fr;
        gap: 3rem;
        padding-top: 5rem;
        padding-bottom: 7rem;
    }

    .system-page__code {
        min-height: 0;
        display: grid;
        grid-template-columns: auto 1fr;
        gap: 1rem;
        align-items: baseline;
        padding: 1.5rem 0 1.5rem 1.5rem;
    }

    .system-page__code strong {
        font-size: clamp(3.5rem, 12vw, 6rem);
    }

    .system-page--construction .system-page__code strong {
        font-size: clamp(3rem, 10vw, 5rem);
    }

    .system-page__content h1 {
        font-size: clamp(3.5rem, 10vw, 6rem);
    }

}


@media (max-width: 600px) {

    .system-page::before {
        display: none;
    }

    .system-page__layout {
        padding-top: 4rem;
        padding-bottom: 7rem;
    }

    .system-page__content h1 {
        font-size: clamp(3rem, 15vw, 4.8rem);
    }

    .system-page__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .system-page__actions .button {
        width: 100%;
        text-align: center;
    }

    .system-page__text-link {
        margin: 0.75rem 0 0;
        text-align: center;
    }

    .system-page__status {
        gap: 0.65rem;
        font-size: 0.55rem;
    }

}