/* =========================================================
   WRATH64 STUDIOS
   RELAY SECTION
   ========================================================= */


/* =========================================================
   TERMINAL
   ========================================================= */

.relay-terminal {
    position: relative;

    width: 100%;
}


.relay-terminal .terminal-content {
    position: relative;
}


.relay-intro {
    margin-bottom: 26px;
}



/* =========================================================
   SYSTEM INFORMATION ROWS
   ========================================================= */

.relay-system-line {
    display: flex;

    align-items: baseline;

    gap: 9px;

    min-height: 1.35em;

    margin-bottom: 6px;
}


.relay-system-line p,
.relay-system-line .terminal-title,
.relay-system-line .relay-socials-title {
    margin: 0;
}


.relay-system-title {
    margin-bottom: 13px;
}


.relay-line-icon {
    flex:
        0 0 auto;

    width:
        16px;

    color:
        #ffffff;

    font-size:
        13px;

    line-height:
        1;

    text-align:
        center;

    text-shadow:
        0 0 2px #ffffff,
        0 0 6px rgba(0, 255, 102, 0.72);
}


.relay-destination-line
.relay-line-icon {
    text-shadow:
        0 0 3px #ffffff,
        0 0 8px rgba(0, 255, 102, 0.85);
}


.relay-warning-line {
    margin-top:
        12px;
}


.relay-warning {
    color:
        #d9ffe7;

    text-shadow:
        0 0 3px rgba(0, 255, 102, 0.65);
}



/* =========================================================
   TYPEWRITER
   ========================================================= */

.relay-type-item {
    min-height:
        1em;
}


.relay-type-item .typing-cursor,
.relay-terminal .typing-cursor {
    display:
        inline-block;

    width:
        0.58em;

    height:
        1em;

    margin-left:
        2px;

    vertical-align:
        -0.12em;

    background:
        #00ff66;

    box-shadow:
        0 0 3px #00ff66,
        0 0 8px rgba(0, 255, 102, 0.65);

    animation:
        relay-cursor-blink
        0.75s
        steps(1)
        infinite;
}


@keyframes relay-cursor-blink {

    0%,
    45% {
        opacity:
            1;
    }

    46%,
    100% {
        opacity:
            0;
    }

}



/* =========================================================
   FORM
   ========================================================= */

.relay-form {
    position:
        relative;

    width:
        100%;

    max-width:
        760px;

    margin:
        30px
        0
        34px
        0;
}


.relay-field {
    position:
        relative;

    margin-bottom:
        18px;
}



/* =========================================================
   FIELD LABELS
   ========================================================= */

.relay-label {
    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    margin-bottom:
        6px;

    color:
        #d9ffe7;

    font:
        inherit;

    letter-spacing:
        0.04em;

    text-shadow:
        0 0 3px rgba(0, 255, 102, 0.55);

    cursor:
        default;
}


.relay-field-icon {
    width:
        15px;

    color:
        #ffffff;

    font-size:
        13px;

    line-height:
        1;

    text-align:
        center;

    text-shadow:
        0 0 3px rgba(255, 255, 255, 0.5),
        0 0 6px rgba(0, 255, 102, 0.5);
}



/* =========================================================
   WINDOWS 95 STYLE INPUT SHELL
   ========================================================= */

.relay-input-shell {
    position:
        relative;

    width:
        100%;

    background:
        #050706;

    border-style:
        solid;

    border-width:
        2px;

    border-top-color:
        #343a36;

    border-left-color:
        #343a36;

    border-right-color:
        #c3c8c5;

    border-bottom-color:
        #c3c8c5;

    box-shadow:
        inset 1px 1px 0 #000000,
        inset -1px -1px 0 #777d79,
        0 0 0 1px #090b0a;

    transition:
        border-color 100ms linear,
        box-shadow 100ms linear;
}


.relay-input-shell:focus-within {
    border-top-color:
        #252a27;

    border-left-color:
        #252a27;

    border-right-color:
        #edf5f0;

    border-bottom-color:
        #edf5f0;

    box-shadow:
        inset 1px 1px 0 #000000,
        inset -1px -1px 0 #767d79,
        0 0 4px rgba(0, 255, 102, 0.34),
        0 0 10px rgba(0, 255, 102, 0.12);
}



/* =========================================================
   INPUTS
   ========================================================= */

.relay-input,
.relay-textarea {
    display:
        block;

    width:
        100%;

    box-sizing:
        border-box;

    margin:
        0;

    border:
        0;

    outline:
        0;

    border-radius:
        0;

    background:
        #050706;

    color:
        #d9ffe7;

    font:
        inherit;

    line-height:
        1.45;

    text-shadow:
        0 0 2px rgba(0, 255, 102, 0.45);

    appearance:
        none;

    -webkit-appearance:
        none;

    caret-color:
        #00ff66;
}


.relay-input {
    min-height:
        38px;

    padding:
        8px
        10px;
}


.relay-textarea {
    min-height:
        180px;

    padding:
        10px;

    resize:
        vertical;
}



/* =========================================================
   PLACEHOLDERS
   ========================================================= */

.relay-input::placeholder,
.relay-textarea::placeholder {
    color:
        rgba(190, 222, 201, 0.38);

    opacity:
        1;

    text-shadow:
        none;
}



/* =========================================================
   SELECTION
   ========================================================= */

.relay-input::selection,
.relay-textarea::selection {
    background:
        #00ff66;

    color:
        #000000;
}



/* =========================================================
   TEXTAREA
   ========================================================= */

.relay-textarea-shell {
    min-height:
        180px;
}



/* =========================================================
   HONEYPOT
   ========================================================= */

.relay-honeypot {
    position:
        absolute !important;

    left:
        -99999px !important;

    top:
        -99999px !important;

    width:
        1px !important;

    height:
        1px !important;

    overflow:
        hidden !important;

    opacity:
        0 !important;

    pointer-events:
        none !important;
}



/* =========================================================
   STATUS
   ========================================================= */

.relay-status {
    display:
        flex;

    align-items:
        center;

    gap:
        7px;

    min-height:
        22px;

    margin:
        22px
        0
        14px
        0;

    color:
        #aab8af;

    font:
        inherit;
}


.relay-status-icon {
    color:
        #ffffff;

    font-size:
        13px;

    text-shadow:
        0 0 4px rgba(255,255,255,.5),
        0 0 7px rgba(0,255,102,.55);
}


.relay-status-prefix {
    color:
        #00ff66;

    text-shadow:
        0 0 5px rgba(0, 255, 102, 0.75);
}


.relay-status-text {
    color:
        #c9d8ce;
}


.relay-status.is-working
.relay-status-icon {
    animation:
        relay-status-icon-pulse
        650ms
        steps(2)
        infinite;
}


.relay-status.is-working
.relay-status-text {
    color:
        #d9ffe7;

    animation:
        relay-status-pulse
        650ms
        steps(2)
        infinite;
}


.relay-status.is-success
.relay-status-text {
    color:
        #00ff66;
}


.relay-status.is-error
.relay-status-text {
    color:
        #eeeeee;

    text-shadow:
        1px 0 0 rgba(0, 255, 102, 0.5);
}


@keyframes relay-status-pulse {

    0%,
    49% {
        opacity:
            1;
    }

    50%,
    100% {
        opacity:
            0.45;
    }

}


@keyframes relay-status-icon-pulse {

    0%,
    49% {
        opacity:
            1;
    }

    50%,
    100% {
        opacity:
            0.25;
    }

}



/* =========================================================
   BUTTON BASE
   ========================================================= */

.relay-submit,
.relay-social-button,
.relay-popup-button {
    border-radius:
        0;

    background:
        #1a1d1b;

    color:
        #ffffff;

    border-style:
        solid;

    border-width:
        2px;

    border-top-color:
        #d5dbd7;

    border-left-color:
        #d5dbd7;

    border-right-color:
        #363a38;

    border-bottom-color:
        #363a38;

    box-shadow:
        inset -1px -1px 0 #090a09,
        inset 1px 1px 0 #777d79;

    font:
        inherit;

    text-decoration:
        none;

    cursor:
        pointer;

    user-select:
        none;

    -webkit-user-select:
        none;
}


.relay-submit:hover,
.relay-social-button:hover,
.relay-popup-button:hover {
    color:
        #ffffff;

    background:
        #202421;

    text-shadow:
        0 0 2px #ffffff,
        0 0 5px rgba(0, 255, 102, 0.9),
        0 0 12px rgba(0, 255, 102, 0.42);
}


.relay-submit:focus-visible,
.relay-social-button:focus-visible,
.relay-popup-button:focus-visible {
    outline:
        1px dotted #00ff66;

    outline-offset:
        3px;
}



/* =========================================================
   PRESSED BUTTON
   ========================================================= */

.relay-submit:active,
.relay-social-button:active,
.relay-popup-button:active {
    border-top-color:
        #353a37;

    border-left-color:
        #353a37;

    border-right-color:
        #d7ddd9;

    border-bottom-color:
        #d7ddd9;

    box-shadow:
        inset 1px 1px 0 #050605;

    transform:
        translate(1px, 1px);
}



/* =========================================================
   TRANSMIT
   ========================================================= */

.relay-controls {
    display:
        flex;

    justify-content:
        flex-start;

    margin-top:
        12px;
}


.relay-submit {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        9px;

    min-width:
        190px;

    min-height:
        39px;

    padding:
        7px
        16px;

    text-align:
        center;
}


.relay-submit-icon {
    color:
        #ffffff;

    font-size:
        14px;

    text-shadow:
        0 0 4px rgba(0,255,102,.6);
}


.relay-submit:disabled {
    opacity:
        0.5;

    cursor:
        wait;

    transform:
        none;
}



/* =========================================================
   EXTERNAL RELAY CHANNELS
   ========================================================= */

.relay-socials {
    width:
        100%;

    max-width:
        760px;

    margin:
        34px
        0
        26px
        0;

    padding-top:
        16px;

    border-top:
        1px dashed rgba(190, 225, 201, 0.25);
}


.relay-social-heading {
    margin-bottom:
        13px;
}


.relay-socials-title {
    color:
        #d9ffe7;

    text-shadow:
        0 0 4px rgba(0, 255, 102, 0.5);
}



/* =========================================================
   SOCIAL ICON BUTTONS
   ========================================================= */

.relay-social-buttons {
    display:
        flex;

    flex-wrap:
        wrap;

    align-items:
        center;

    gap:
        8px;
}


.relay-social-button {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    width:
        35px;

    height:
        31px;

    box-sizing:
        border-box;

    padding:
        0;

    color:
        #ffffff !important;

    font-size:
        15px;

    line-height:
        1;

    text-decoration:
        none !important;
}


.relay-social-button i {
    display:
        block;

    color:
        #ffffff;

    line-height:
        1;

    text-shadow:
        0 0 2px rgba(255,255,255,.65);
}


.relay-social-button:hover i {
    color:
        #ffffff;

    text-shadow:
        0 0 3px #ffffff,
        0 0 7px #00ff66,
        0 0 12px rgba(0,255,102,.7);
}



/* =========================================================
   TERMINAL FOOTER
   ========================================================= */

.relay-terminal-footer {
    display:
        flex;

    align-items:
        baseline;

    margin-top:
        28px;

    color:
        #00ff66;

    text-shadow:
        0 0 4px rgba(0, 255, 102, 0.66);
}


.relay-final-cursor {
    display:
        inline-block;

    margin-left:
        3px;

    color:
        #00ff66;

    line-height:
        1;

    text-shadow:
        0 0 3px #00ff66,
        0 0 7px rgba(0, 255, 102, 0.72);

    animation:
        relay-final-cursor-blink
        0.72s
        steps(1)
        infinite;
}


@keyframes relay-final-cursor-blink {

    0%,
    48% {
        opacity:
            1;
    }

    49%,
    100% {
        opacity:
            0;
    }

}



/* =========================================================
   TRANSMISSION OVERLAY
   ========================================================= */

.relay-transmission-overlay {
    position:
        fixed;

    inset:
        0;

    z-index:
        99990;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        24px;

    box-sizing:
        border-box;

    background:
        rgba(0, 0, 0, 0.82);

    backdrop-filter:
        blur(1px);

    -webkit-backdrop-filter:
        blur(1px);

    opacity:
        0;

    visibility:
        hidden;

    pointer-events:
        none;

    transition:
        opacity 130ms linear,
        visibility 130ms linear;
}


.relay-transmission-overlay.is-open {
    opacity:
        1;

    visibility:
        visible;

    pointer-events:
        auto;
}



/* =========================================================
   POPUP
   ========================================================= */

.relay-transmission-popup {
    position:
        relative;

    width:
        min(580px, 100%);

    box-sizing:
        border-box;

    overflow:
        hidden;

    background:
        #080a09;

    color:
        #d9ffe7;

    border:
        1px solid #aeb8b2;

    box-shadow:
        0 0 0 1px #000000,
        0 0 0 2px #414844,
        8px 8px 0 rgba(0, 0, 0, 0.75),
        0 0 24px rgba(0, 255, 102, 0.08);

    outline:
        none;
}


.relay-transmission-popup::before {
    content:
        "";

    position:
        absolute;

    inset:
        0;

    z-index:
        10;

    pointer-events:
        none;

    background:
        repeating-linear-gradient(
            to bottom,
            rgba(255, 255, 255, 0.025) 0,
            rgba(255, 255, 255, 0.025) 1px,
            rgba(0, 0, 0, 0.07) 2px,
            rgba(0, 0, 0, 0.07) 4px
        );

    opacity:
        0.45;
}


.relay-transmission-popup::after {
    content:
        "";

    position:
        absolute;

    inset:
        0;

    z-index:
        11;

    pointer-events:
        none;

    background:
        linear-gradient(
            90deg,
            rgba(255, 0, 0, 0.015),
            rgba(0, 255, 102, 0.025),
            rgba(0, 80, 255, 0.015)
        );
}



/* =========================================================
   POPUP HEADER
   ========================================================= */

.relay-popup-header {
    position:
        relative;

    z-index:
        2;

    display:
        flex;

    align-items:
        center;

    gap:
        8px;

    padding:
        6px
        9px;

    background:
        #181c19;

    color:
        #ffffff;

    border-bottom:
        1px solid #69716c;

    text-shadow:
        0 0 4px rgba(0, 255, 102, 0.6);

    user-select:
        none;
}



/* =========================================================
   POPUP BODY
   ========================================================= */

.relay-popup-body {
    position:
        relative;

    z-index:
        2;

    padding:
        23px;
}


.relay-popup-title {
    margin-bottom:
        7px;

    color:
        #ffffff;

    font-weight:
        bold;

    letter-spacing:
        0.04em;

    text-shadow:
        0 0 3px #ffffff,
        0 0 7px rgba(0, 255, 102, 0.68);
}


.relay-popup-separator {
    width:
        100%;

    overflow:
        hidden;

    margin-bottom:
        19px;

    color:
        #56645b;

    white-space:
        nowrap;
}


.relay-popup-line {
    margin:
        0
        0
        7px
        0;

    color:
        #d9ffe7;

    line-height:
        1.45;

    text-shadow:
        0 0 3px rgba(0, 255, 102, 0.42);
}


.relay-popup-processing {
    margin:
        17px
        0;

    color:
        #a9b8ae;
}


.relay-popup-final {
    margin-top:
        19px;

    color:
        #ffffff;

    text-shadow:
        0 0 3px #ffffff,
        0 0 7px rgba(0, 255, 102, 0.64);
}



/* =========================================================
   POPUP BUTTON
   ========================================================= */

.relay-popup-controls {
    display:
        flex;

    justify-content:
        flex-end;

    margin-top:
        25px;
}


.relay-popup-button {
    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    gap:
        7px;

    min-width:
        150px;

    min-height:
        34px;

    padding:
        5px
        12px;
}



/* =========================================================
   POPUP GLITCH
   ========================================================= */

.relay-transmission-popup.is-glitching {
    animation:
        relay-popup-glitch
        75ms
        steps(2)
        infinite;
}


.relay-transmission-popup.is-glitching
.relay-corrupt {
    animation:
        relay-text-glitch
        85ms
        steps(2)
        infinite;

    text-shadow:
        -2px 0 rgba(255, 255, 255, 0.45),
        2px 0 rgba(0, 255, 102, 0.7),
        0 0 6px rgba(0, 255, 102, 0.65);
}


@keyframes relay-popup-glitch {

    0% {
        transform:
            translate(0, 0)
            skewX(0deg);
    }

    20% {
        transform:
            translate(-2px, 1px)
            skewX(-0.5deg);
    }

    40% {
        transform:
            translate(3px, -1px)
            skewX(0.8deg);
    }

    60% {
        transform:
            translate(-1px, 0)
            skewX(-0.3deg);
    }

    80% {
        transform:
            translate(2px, 1px)
            skewX(0.4deg);
    }

    100% {
        transform:
            translate(0, 0)
            skewX(0deg);
    }

}


@keyframes relay-text-glitch {

    0% {
        transform:
            translateX(0);
    }

    33% {
        transform:
            translateX(-1px);
    }

    66% {
        transform:
            translateX(1px);
    }

    100% {
        transform:
            translateX(0);
    }

}



/* =========================================================
   STRONG SIGNAL INTERRUPTION
   ========================================================= */

.relay-transmission-popup.is-signal-broken {
    animation:
        relay-signal-break
        120ms
        steps(2)
        infinite;
}


@keyframes relay-signal-break {

    0% {
        transform:
            translate(0, 0);

        filter:
            contrast(1);
    }

    25% {
        transform:
            translate(-5px, 0);

        filter:
            contrast(1.4);
    }

    50% {
        transform:
            translate(4px, 1px);

        filter:
            contrast(0.8);
    }

    75% {
        transform:
            translate(-2px, -1px);

        filter:
            contrast(1.6);
    }

    100% {
        transform:
            translate(0, 0);

        filter:
            contrast(1);
    }

}



/* =========================================================
   RESPONSIVE
   ========================================================= */

@media
(max-width: 760px) {

    .relay-form,
    .relay-socials {
        max-width:
            100%;
    }


    .relay-system-line {
        gap:
            7px;
    }


    .relay-line-icon {
        width:
            14px;

        font-size:
            12px;
    }


    .relay-input {
        min-height:
            40px;
    }


    .relay-textarea {
        min-height:
            165px;
    }


    .relay-popup-body {
        padding:
            18px;
    }


    .relay-transmission-overlay {
        padding:
            16px;
    }

}



@media
(max-width: 520px) {

    .relay-form {
        margin-top:
            24px;
    }


    .relay-field {
        margin-bottom:
            15px;
    }


    .relay-submit {
        width:
            100%;

        min-width:
            0;
    }


    .relay-social-buttons {
        gap:
            7px;
    }


    .relay-social-button {
        width:
            34px;

        height:
            30px;

        font-size:
            14px;
    }


    .relay-popup-header {
        padding:
            5px
            7px;
    }


    .relay-popup-body {
        padding:
            15px;
    }


    .relay-popup-controls {
        justify-content:
            stretch;
    }


    .relay-popup-button {
        width:
            100%;
    }

}



/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media
(prefers-reduced-motion: reduce) {

    .relay-type-item .typing-cursor,
    .relay-terminal .typing-cursor,
    .relay-final-cursor,
    .relay-status.is-working .relay-status-text,
    .relay-status.is-working .relay-status-icon,
    .relay-transmission-popup.is-glitching,
    .relay-transmission-popup.is-glitching
    .relay-corrupt,
    .relay-transmission-popup.is-signal-broken {
        animation:
            none !important;
    }


    .relay-final-cursor {
        opacity:
            1;
    }

}