:root {
    --white: #E9EAEB;
    --black: #151515;
    --grey: #1E1E1E;
    --light-grey: #2B2B2B;
    --red: #B41A1A;
    --blue: #23238E;

    --pad: clamp(1rem, 4vw, 2rem);
    --pad-small: clamp(0.85rem, 4vw, 1rem);
    --border-radius: clamp(0.25rem, 1vw, 0.5rem);

    --logo-size: clamp(1.15rem, 5vw, 2.25rem);
    --title-size: clamp(1.25rem, 5vw, 1.5rem);
    --default-size: clamp(1rem, 5vw, 1.25rem);
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: var(--pad);
    
    display: flex;
    flex-direction: column;
    gap: var(--pad);
    
    color: var(--white);
    font-family: 'Patua One', serif;
    
    background-color: var(--black);
}

header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    
    #logo {
        margin: 0;
        padding: 0;
        
        font-size: var(--logo-size);
        letter-spacing: 0.5rem;
        text-transform: uppercase;
    }
}

a, a:hover, a:active {
    color: var(--white);
    text-decoration: none;
}

.horizontal-divider {
    width: 100%;
    height: 3px;

    background-color: var(--light-grey);
    border-radius: var(--border-radius);
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.btn {
    margin: 0;
    padding: 0.75rem;
    
    display: flex;
    justify-content: center;
    align-items: center;
    
    text-align: center;
    
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: opacity 175ms ease-in-out;
}

.btn:hover {
    opacity: 0.8;
}

main {
    gap: var(--pad);
}

.section {
    padding: var(--pad-small);
    
    display: flex;
    flex-wrap: wrap;
    gap: var(--pad-small);
    
    font-size: var(--default-size);
    
    background-color: var(--grey);
    border-radius: var(--border-radius);
    box-sizing: border-box;
}

.sub-section {
    gap: var(--pad-small);
}

.section-title {
    width: max-content;
    font-size: var(--title-size);
}

.section-title::after {
    content: '';
    
    display: block;
    width: 100%;
    height: 3px;
    
    background-color: var(--white);
    border-radius: 1rem;
}

/* product section */

.product {
    align-items: flex-start;
    
    .preview {
        flex: 3 1 60%;
        min-width: 275px;
        
        img {
            width: 100%;
            height: auto;
            
            display: block;
            object-fit: contain;
            
            border-radius: var(--border-radius);
        }
    }
    
    .info-container {
        flex: 1 1 35%;
        min-width: 275px;
        display: flex;
        gap: var(--pad-small);
    }
    
    .info {
        padding: var(--pad-small);
        height: max-content;
        
        gap: var(--pad-small);
        
        border: 3px solid var(--light-grey);
        border-radius: var(--border-radius);
    }
    
    #title {
        font-size: var(--title-size);
    }
    
    #description {
        gap: var(--pad-small);
    }
    
    .learn-more-btn {
        background-color: var(--light-grey);
    }
    
    #purchase-btn {
        background-color: var(--red);
    }
}

/* demo */

.demo {
    display: flex;
    align-items: stretch;
    flex-wrap: wrap;
    gap: var(--pad);
    
    .upload-container, .canvas-container {
        max-width: 100%;
        min-width: 0;
    }

    .upload-container {
        min-width: 275px;
        flex: 1 1 30%;
        box-sizing: border-box;
    }
    
    .canvas-container {
        max-width: 100%;
        min-width: 300px;
        position: relative;
        
        flex: 2 1 65%;
        overflow: hidden;
        border-radius: var(--border-radius);
        
        #webgl-canvas {
            width: 100%;
            min-height: 100%;
            background-color: #000000;
        }
        
        #rotate-toggle-btn {
            margin: 0;
            padding: 0;
            
            position: absolute;
            top: 1rem;
            right: 1rem;
            
            background-color: transparent;
            border: none;
            box-sizing: border-box;
        }
    }
}


#upload-form {
    padding: var(--pad-small);
    
    justify-content: center;
    align-items: center;
    flex: 1;
    gap: var(--pad-small);
    
    border: 4px dotted var(--white);
    border-radius: var(--border-radius);
    
    .upload-form-info {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: var(--pad-small);
        
        text-align: center;
    }
    
    .file-input-btn {
        background-color: var(--red);
    }
    
    .file-input-btn:disabled {
        background-color: var(--grey);
        cursor: default;
    }
}

#file-selection {
    padding: var(--pad-small);
    
    display: none;
    flex-direction: column;
    gap: var(--pad-small);
    
    border: 4px solid var(--white);
    border-radius: var(--border-radius);
    
    .file-info, .file-info-head {
        display: flex;
        gap: 0.5rem;
    }
    
    .file-info {
        justify-content: space-between;
    }
    
    .file-info-head {
        min-width: 0;
        overflow: hidden;
    }
    
    .file-info-name {
        min-width: 0;
        flex: 1 1 auto;
        
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
    }
    
    .file-info-size {
        flex: 0 0 auto;
        white-space: nowrap;
    }
    
    #progress-icon {
        display: flex;
        justify-content: center;
        align-items: center;
    }
}

/* toggle */

.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}
    
.switch input { 
    opacity: 0;
    width: 0;
    height: 0;
}
    
.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--light-grey);
    -webkit-transition: .4s;
    transition: .4s;
}
    
.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: var(--white);
    -webkit-transition: .4s;
    transition: .4s;
}
    
input:checked + .slider {
    background-color: var(--red);
}
    
input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}
    
input:checked + .slider:before {
    -webkit-transform: translateX(26px);
    -ms-transform: translateX(26px);
    transform: translateX(26px);
}
    
.slider.round {
    border-radius: 34px;
}
    
.slider.round:before {
    border-radius: 50%;
}

/*#file-selection {*/
/*    margin: 0 1.5rem 1.5rem 1.5rem;*/
/*    padding: 0.75rem;*/
/*}*/










