:root {
    --bg-color: 29, 38, 45;
    --bg-color: 30,39,74;
    --text-color: 255, 255, 255;
    --base-font-size: 16px;
    --footer-size: 1.25rem;
}

@font-face {
    font-family: 'Source Sans Pro';
       src: url('SourceSansPro-Light.ttf');
    font-weight: 300;
    font-style: normal;
 }

 @font-face {
    font-family: 'Cormorant Garamond';
        src: url('CormorantGaramond-Light.ttf');
    font-weight: 300;
    font-style: normal;
 }

* {
    margin: 0;
    padding: 0;
}

html, 
body {
    height: 100%;
    width: 100%;
}

body {
    background-color: rgb(var(--bg-color));  
    color: rgba(var(--text-color),.7); 
    font-size: var(--base-font-size);
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 300;
    position: relative;
    padding: 2.5rem;
    box-sizing: border-box;
}

.app {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100%;
    -webkit-user-select: none; 
    -ms-user-select: none; 
    user-select: none;
}

/*
 * HEADER 
 */
.header {
    align-items: center;
    display: flex;
    justify-content: center;
    flex-grow: 1;
}
.header .logo {
    animation: neon-flicker 2500ms infinite alternate; 
    max-width: 50%;
    margin-left: 12%;
}
/*
body:not(.open) .header {
    animation: neon-flicker 2500ms infinite alternate; 
}
*/
.open .header {
    flex-grow: 1;
}

@keyframes neon-flicker {
    
    0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
        filter: drop-shadow(0 0 10px white); 
    }
    
    20%, 24%, 55% {        
        filter: drop-shadow(0 0 10px rgb(var(--bg-color)));
    }    
}

/*
 * SPACER
 */
 .spacer {
    display: flex;
    flex-grow: 0;
 }
.open .spacer {
    flex-grow: 1;
}

/*
 * MENU 
 */

.menu {
    display: none;
    margin: 1rem 0;
}
.open .menu {
    display: flex;
    flex-grow: 0;
    flex-direction: column;
}


.category:not(:last-child) {
    padding-bottom: 1rem;
}
.category > h2 {
    margin-bottom: 1.5rem;
    font-size: 4rem;
    line-height: 1;
    font-weight: 300;
    color: rgba(var(--text-color),.9);
    background: linear-gradient(0deg, rgba(var(--text-color),.25) 2px, transparent 1px);
    background-position: 100% -9px;
    background-repeat: repeat-x;
    background-size: 88%;
}
.category > h2 > span {
    background: rgb(var(--bg-color));
    padding-right: 1rem;
}

.products {
    columns: 2;
    column-fill: balance;
    justify-content:baseline;
    grid-column-gap: 25px;
    column-gap: 25px;
}
.product {
    break-inside: avoid;
    margin-bottom: 1.5rem;
    display: inline-block;
    width: 100%;
}
.product > h3 {
    font-size: 2rem;
    font-family: 'Cormorant Garamond';
    color: rgba(var(--text-color),.8);
}

.allergens {
    list-style: none;
}
.allergen {
    display: inline-block;
    border: 1px solid rgba(255,255,255,.25);
    padding: .3rem .5rem;
    border-radius: .5rem;
    margin-top: .5rem;
    font-size: .85rem;
}
.allergen:not(:last-child) {
    margin-right: .5rem;
}

/*
 * BEAUTIFY JSON INPUT
 */
 .category > h2:first-letter,
 .product > h3:first-letter,
 .allergen:first-letter {
     text-transform: uppercase;
 }

/*
 * FOOTER 
 */
.footer {
    border-top: 1px solid rgba(255,255,255,.25);
    padding-top: 1rem;
    font-size: var(--footer-size);
    min-height: var(--footer-size);
    line-height: var(--footer-size);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
}

/*
 * LOADER
 */
.loader {
    opacity: 0;
    transition: opacity 500ms ease;
}
.loading .loader {
    opacity: 1;
    transform: rotate(45deg);
}

.loader:before {
    content: '';
    display: block;
    box-sizing: border-box;
    border: .100rem solid rgba(255,255,255,1);
    border-top-color: transparent;
    border-bottom-color: transparent;
    border-radius: 50%;
    width: var(--footer-size);
    height: var(--footer-size);
    animation: loading-bar-spinner 500ms ease infinite;
}

@keyframes loading-bar-spinner {
    0%   { transform: rotate(0); }
    100% { transform: rotate(1turn); }    
}

.indicator {
    position: fixed;
}

.indicator {
    width: 0px;
    height: 0px;
    border: 10px solid rgba(255,255,255,.25);
    border-left-color: transparent;
    border-top-color: transparent;
    bottom: 0;
    right: 0;
    z-index: 5;
}
.indicator.offline {
    border-right-color: rgba(220,20,60,.5);
    border-bottom-color:  rgba(220,20,60,.5);
}
.indicator.active {
    border-right-color: rgba(255,255,255,.75);
    border-bottom-color:  rgba(255,255,255,.75);
}
.indicator.active.offline {
    border-right-color: rgba(220,20,60,.75);
    border-bottom-color:  rgba(220,20,60,.75);
}