/* =========================================================
   PATTERNLAB
   ========================================================= */

* {
    box-sizing: border-box;
}


html,
body {

    margin: 0;

    width: 100%;
    min-height: 100%;

    background: #000;
    color: #eee;

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}


body {

    min-height: 100vh;

    overflow: hidden;
}


button,
input {

    font: inherit;
}


button {

    color: #ddd;

    background: #090909;

    border: 1px solid #242424;

    cursor: pointer;
}


button:hover,
button.active {

    border-color: #8b1d1d;

    background: #140808;
}


/* =========================================================
   APP GRID
   ========================================================= */

.app {

    width: 100vw;
    height: 100vh;

    display: grid;

    grid-template-columns:
        clamp(190px, 13vw, 280px)
        minmax(0, 1fr)
        clamp(220px, 15vw, 320px);

    grid-template-rows:
        54px
        minmax(0, 1fr)
        58px;

    background: #000;
}


/* =========================================================
   HEADER
   ========================================================= */

header {

    grid-column: 1 / -1;

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 20px;

    border-bottom: 1px solid #181818;

    background: #050505;
}


.brand b {

    letter-spacing: 2px;

    font-size: 18px;
}


.brand b span {

    color: #a11;
}


.brand small,
.tag,
.muted {

    color: #666;
}


.tag {

    font-size: 11px;

    letter-spacing: 2px;
}


/* =========================================================
   SIDE PANELS
   ========================================================= */

.left,
.right {

    min-height: 0;

    overflow-y: auto;

    padding: 18px 16px;

    background: #050505;
}


.left {

    border-right: 1px solid #181818;
}


.right {

    border-left: 1px solid #181818;
}


h2,
h3 {

    margin: 0 0 14px;

    color: #777;

    font-size: 11px;

    letter-spacing: 2px;
}


#patterns {

    display: grid;

    gap: 7px;
}


.pattern-button {

    min-height: 38px;

    padding: 0 12px;

    text-align: left;

    display: flex;

    align-items: center;
    justify-content: space-between;
}


.pattern-button small {

    color: #555;
}


#randomize {

    width: 100%;

    margin-top: 14px;

    padding: 11px;
}


/* =========================================================
   PREVIEW
   ========================================================= */

main {

    min-width: 0;
    min-height: 0;

    padding: 18px;

    background: #000;
}


.stage {

    position: relative;

    width: 100%;
    height: 100%;

    min-height: 300px;

    overflow: hidden;

    border: 3px solid #050505;

    background: #000;
}


.pattern-preview {

    position: absolute;

    inset: 0;

    background-color: #000;
}


.demo {

    position: absolute;

    inset: 0;

    z-index: 2;

    display: flex;

    flex-direction: column;

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

    pointer-events: none;

    text-align: center;

    text-shadow:
        0 5px 25px #000;
}


.demo h1 {

    margin: 8px 0;

    font-size:
        clamp(44px, 7vw, 112px);

    letter-spacing: -4px;

    pointer-events: auto;

    outline: none;
}


.demo p {

    margin: 0;

    color: #aaa;
}


.eyebrow {

    color: #8d1b1b;

    font-size: 11px;

    letter-spacing: 4px;
}


.badge {

    position: absolute;

    right: 12px;
    bottom: 12px;

    z-index: 3;

    padding: 7px 10px;

    background: #050505dd;

    border: 1px solid #202020;

    color: #888;

    font-size: 10px;

    letter-spacing: 2px;
}


/* =========================================================
   CONTROLS
   ========================================================= */

.control {

    margin-bottom: 18px;
}


.control label {

    display: flex;

    justify-content: space-between;

    gap: 10px;

    margin-bottom: 8px;

    color: #888;

    font-size: 11px;

    letter-spacing: 1px;
}


.control output {

    color: #ddd;
}


.control input[type="range"] {

    width: 100%;

    accent-color: #991b1b;
}


.control input[type="color"] {

    width: 100%;
    height: 36px;

    padding: 2px;

    background: #090909;

    border: 1px solid #252525;
}


.info {

    margin-top: 26px;
    padding-top: 16px;

    border-top: 1px solid #181818;
}


.info > div {

    display: flex;

    justify-content: space-between;

    margin: 10px 0;

    color: #666;

    font-size: 11px;
}


.info strong {

    color: #aaa;
}


/* =========================================================
   FOOTER
   ========================================================= */

footer {

    grid-column: 1 / -1;

    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 0 18px;

    border-top: 1px solid #181818;

    background: #050505;
}


footer > div {

    display: flex;

    align-items: center;

    gap: 8px;
}


footer button {

    padding: 9px 13px;
}


.chip {

    display: inline-block;

    padding: 5px 8px;

    border: 1px solid #242424;

    color: #aaa;

    font-size: 10px;

    letter-spacing: 1px;
}


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

@media (max-width: 900px) {

    body {

        overflow: auto;
    }


    .app {

        height: auto;
        min-height: 100vh;

        grid-template-columns: 1fr;

        grid-template-rows: auto;
    }


    header,
    footer {

        grid-column: 1;
    }


    header {

        min-height: 54px;
    }


    .tag {

        display: none;
    }


    .left,
    .right {

        border: 0;

        border-bottom:
            1px solid #181818;
    }


    main {

        min-height: 60vh;
    }


    footer {

        flex-wrap: wrap;

        padding-top: 10px;
        padding-bottom: 10px;
    }
}
