/* General stuff */

:root {
    --background: #475b75;
    --green: #89A194;
    --red: #A14016;
    --navigationLinkColour: var(--background);
    --panelwhite: rgba(255, 255, 255, 0.81);
    --offwhite: #dee2e6;
    --headBannerColour: white;
    --headerFooter: darkslategray;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    height: 100%;
}

body {
    height: 100%;
    display: grid;
    grid-template-rows: minmax(0, 0.33fr) minmax(0, 1fr) minmax(0, max-content);
    grid-template-areas: "header"
                        "pageContent"
                        "navigation";
    background-color: var(--background);
    font-family: 'Open Sans', Arial, Helvetica, sans-serif;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: 80%;
}

ul {
    list-style: none;
    display: grid;
}

@keyframes fadeIn {
    0% {
        transform: translateY(-5vh);
        opacity: 0;
    }
    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Header (document and shredder) stuff */

#header {
    grid-area: header;
    display: grid;
    grid-template-rows: 1fr 0.33fr;
    /* overflow: hidden; */
    min-height: 0;
    min-width: 0;
    z-index: 2;
}

#headerDocFeed {
    height: 113%;
    width: 100%;
    min-height: 0;
    min-width: 0;

    overflow: hidden;
    justify-self: center;

    z-index: -1;
}

.docContainer {
    display: inline-flex;
    height: 100%;
	width: 16%;
	animation: anim 2.5s ease-in-out infinite;
	transform: translateY(-100%);
    justify-content: center;
    user-select: none;
}

#doc1 {
    animation-delay: 0.1s;
}
#doc2 {
    animation-delay: 1.2s;
}
#doc3 {
    animation-delay: 2s;
}
#doc4 {
    animation-delay: 1.4s;
}
#doc5 {
    animation-delay: 2.4s;
}
#doc6 {
    animation-delay: 0.6s;	
}

@keyframes anim{
	0%{
		transform: translateY(-100%);
	}
	100%{
		transform: translateY(100%);
	}
}

#headerBanner {
    display: grid;
    position: relative;
    margin-bottom: 0.66%;
}

#bannerText {
    align-self: center;
    justify-self: center;

    font-size: 2vw;
    text-transform: uppercase;
    letter-spacing: 1.5vw;
    font-weight: 700;
    font-family: 'Economica', 'Arial Narrow', 'Franklin Gothic Medium', Arial, sans-serif;
    color: var(--background);
    z-index: 2;
}

#bannerShape {
    margin-top: 5.6%;
    align-self: center;
    justify-self: center;
    position: absolute;
    max-width: 100%;
    pointer-events: none;
    z-index: 2;
}

#bannerShape>path.a{
    fill: var(--headBannerColour);
    z-index: 2;
}

/* Main body & pageContent stuff */

#pageContent {
    grid-area: pageContent;
    min-height: 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
}

.page {
    display: none;
    opacity: 0;
    animation: fadeIn 1s cubic-bezier(.39,.575,.565,1.000) both;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 100%;
    flex-grow: 1;
    flex-shrink: 1;
    justify-content: center;

    color: #FFFFFF;
    flex-direction: column;
    align-items: center;
}

.activePage {
    display: flex !important;
}

#homePage {
    min-height: 0;
    min-width: 0;
    aspect-ratio: 16/9;
    position: relative;
}

#video {
    min-height: 0;
    min-width: 0;
    filter: grayscale(100%) blur(6px);
    pointer-events: none;
}

#playbutton {
    max-width: 100%;
    max-height: 100%;

    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin-left: auto;
    margin-right: auto;
    margin-top: auto;
    margin-bottom: auto;

    cursor: pointer;
    user-select: none;

    filter: drop-shadow(0 0 1rem black);
}

/* Contact page stuff */
.error {
    color: #FF0000;
    margin-left: auto;
    font-size: 0.75em;
}

#asteriskReminder {
    margin-left: 0;
    margin-right: 1em;
}

#contactPage {
    color: black;
    align-items: initial;
    overflow: visible;
}

#contactPage h2 {
    font-size: 8vh;
    text-transform: uppercase;
    color: var(--background);
    top: 0;
    font-weight: normal;

    margin-left: -0.58em;
    margin-top: -0.85em;
    margin-bottom: 0.3em;
}

#contactPageGridContainer {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(max-content, 2.5fr) minmax(0, 3fr);
    grid-template-areas: "left form right";
}

#contactLeftSpacer {
    grid-area: left;
    position: relative;
}

.formcontainer {
    font-size: 2vh;
    grid-area: form;
    background-color: #FFFFFF;
    padding: 3em;
    padding-right: 0;
    padding-bottom: 4.5em;
}

.formcontainer > form {
    display: flex;
    flex-direction: column;
}

.formChunk {
    display: flex;
}

.formSubChunk {
    padding-left: 2em;
    padding-bottom: 2em;
}

.formcontainer label {
    margin-right: 0.5em;
    flex-shrink: 0;
}

.formcontainer input[type=text],
.formcontainer textarea {
    flex-basis: 100%;
    border: 0;
    outline: 0;
    border-bottom: 0.12em solid var(--background);
    min-width: 0;
}

.formcontainer textarea {
    margin-left: 2em;
    resize: none;
}

#contactRightSpacer {
    font-size: 2vh;
    padding-top: 2.4em;
    background-color: white;
    grid-area: right;
    min-width: 0;
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-between;
}

#contactRightSpacer a {
    color: black;
    text-decoration: none;
    transition: 0.3s;
}

#contactRightSpacer a:hover {
    opacity: 0.6;
}

#contactRightSpacer input[type=submit] {
    --marginAmount: 8em;
    margin-left: calc(var(--marginAmount) * -1);
    margin-bottom: 1.5em;
    padding: 0.5em 0.75em;
    border: 0;
    background: none;
    background-color: var(--background);
    box-shadow: none;
    border-radius: 0px;
    color: #FFFFFF;
    font-size: 2vh;
    width: calc(100% + var(--marginAmount));
    text-align: left;
    cursor: pointer;
    transition: 0.3s;
}

#contactRightSpacer input[type=submit]:hover {
    opacity: 0.6;
}


.contactRightHeader {
    padding: 0.5em 0.75em;
    background-color: var(--background);
    color: #FFFFFF;
}

#contactRightEmail {
    --marginAmount: 4em;
    margin-left: var(--marginAmount);
    width: calc(100% - var(--marginAmount));
    text-align: left;
}

#contactRightPhone {
    --marginAmount: 12em;
    margin-left: var(--marginAmount);
    width: calc(100% - var(--marginAmount));
    text-align: left;
}

/* about page stuff */

#aboutPage {
    color: black;
    align-items: initial;
    overflow: visible;
}

#aboutPageGridContainer {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 1fr);
    grid-template-areas: "left right";
    height: 50vh;
}

#aboutMainContent {
    column-gap: 22vh;
}

.aboutHeaderText {
    align-self: center;
    justify-self: center;
    margin-left: 6.5vh;
}

#aboutPage h1 { 
    font-size: 18vh;
    font-weight: 350;
    text-transform: uppercase;
    color: var(--background);
    line-height: 0.8;
}

#aboutWriteup {
    font-size: 3.8vh;
    color: var(--background);

    align-self: center;
    justify-self: center;
    margin-right: 10vh;
    font-weight: 300;
    line-height: 1.1;
}

#aboutButtons {
    grid-area: right;

    /* margin-top: 1.5em; */
    margin-left: 0.8rem;
    margin-right: 32.5%;
    margin-bottom: 21.5em;

    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    row-gap: 0.5em;
}

.aboutButton {
    font-size: 1.5em;
    flex: 1 1 auto;
    background-color: white;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    
    user-select: none;
    color: var(--background);
    text-decoration: none;
    transition: 0.3s;
}

.aboutButton:hover {
    opacity: 0.6;
}

.activeButton {
    color: white;
    background-color: lightslategrey;
    margin-left: -0.8rem;
    margin-right: 0.8rem;
}

.tabContentContainer {
    display: none;
    grid-area: left;
    border: 1em solid white;
    color: white;
    /* column-gap: 44vh; */
    background-color: var(--background);
}

.defaultTab {
    grid-area: left;
    background-color: white;
    border: none;
}

.activeTabContentContainer {
    display: flex;
    overflow: auto;
}

.pictureHolder {
    margin-left: 1.5vh;
    flex-shrink: 0;
}

.experienceText {
    font-size: 2.5vh;
    align-self: center;
    justify-self: center;
    margin-right: 12vh;
    margin-left: 6.5vh;
    font-weight: bold;
}

.subExperienceText {
    font-size: 2.5vh;
    font-weight: 300;
}

.experienceText br {

    display: block;
    margin: 0.4em 0;

}
.experienceText br {
    display: block;
    content: "";
    border-bottom: 0.3em solid transparent;
  }
  @-moz-document url-prefix() {
    .experienceText br {
         margin: 0.4em 0; /* As 'border-bottom' doesn't work in firefox and 'margin-bottom' doesn't work in Chrome. */
    }
  }
/* Navigation stuff */

#navListContainer {
    font-size: 1vh;
    grid-area: navigation;
    padding: 2.75em 0em 2.75em 0em;
    z-index: 99;

    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;

    background-color: white;
    position: relative;

    overflow: hidden;
}

#navListContainer a {
    text-transform: uppercase;
    font-size: 1rem;
    color: var(--navigationLinkColour);
    text-decoration: none;
}

#triangle {
    width: 0;
    height: 0;
    border: 2rem solid transparent;
    border-top: 0;
    border-top: 2rem solid #475b75;

    transition: transform 0.5s ease-in-out;
    will-change: transform;
    backface-visibility: hidden;

    position: absolute;
    top: 0;    
  }

#navList {
    position: relative;

    display: grid;
    grid-template-columns: 1fr 2fr 1fr;

    justify-items: center;
    align-items: center;
}

a[href="#home"]>img {
    height: auto; 
    width: auto; 
    max-width: 300px; 
    max-height: 300px;
}

/* MOBILE MODE CHANGES */
@media only screen and (max-width: 600px), only screen and (orientation : landscape) and (max-height: 600px){

    /* body {
        grid-template-rows: minmax(0, 0.33fr) minmax(0, 1fr) minmax(0, 0.4fr);
    } */

    .docContainer {
        width: 15%;
    }

    #headerDocFeed {
        max-width: 91%;
    }

    #bannerShape {
        margin-top: -2.4%;
        align-self: start;
        height: 15vh;
    }
    
    #bannerText {
        align-self: end;
        font-size: 5vw;
    }

    #navListContainer {
        padding: 3.5em 0em 2.75em 0em;
    }

    a[href="#home"]>img {
        content: url("/img/sv.png");
        height: 65.5px;
    }

    #contactPage {
        overflow: auto;
        height: 100%;
    }


    /* about us page */
    #aboutPage {
        overflow: auto;
        height: 100%;
    }
    
    #aboutPageGridContainer {
        grid-template-areas: "left"
                            "right";
        height: 100%;
        grid-template-columns: unset;
        grid-template-rows: 1fr max-content 1em;
    }
    
    #aboutButtons {
        margin-left: 0;
        margin-right: 0;
        margin-bottom: 0;
        flex-flow: row wrap;
        row-gap: 0.3em;
        column-gap: 0.5em;
        margin-top: 0.5em;
    }
    
    #aboutMainContent {
        column-gap: unset;
        height: 100%;
    }
    
    .activeTabContentContainer {
        flex-flow: column nowrap;
        flex-grow: 1;
    }

    .aboutHeaderText {
        margin-left: 0;
        display: flex;
        column-gap: 1em;
    }
    
    #aboutPage h1 { 
        font-size: 3.5em;
        line-height: unset;
    }

    .aboutHeaderText br {
        display: none;
    }
    
    #aboutWriteup {
        margin-left: 1em;
        margin-right: 1em;
        display: flex;
        text-align: center;
        margin-top: auto;
        margin-bottom: auto;
    }

    .activeButton {
        margin-top: -0.5rem;
        margin-bottom: 0.5rem;
        margin-left: unset;
        margin-right: unset;
    }

    .experienceText {
        margin: 1em;
    }

    /* contact page */
    #contactPageGridContainer {
        grid-template-columns: unset;
        grid-template-rows: 0px min-content min-content;
        grid-template-areas: "left"
                             "form"
                             "right";
        height: 100%;
    }

    #contactLeftSpacer {
        visibility: hidden;
    }

    .formcontainer {
        padding: 0;
        padding-bottom: 0.65em;
    }

    .formcontainer > form {
        margin-left: 1em;
        margin-right: 1em;
    }

    .formSubChunk {
        padding-bottom: 1em;
    }

    #contactPage h2 {
        font-size: 3.5em;
        margin: 0;
        display: flex;
        justify-content: center;
    }

    #contactRightSpacer {
        padding: 0;
        flex-direction: column-reverse;
    }

    #contactRightSpacer input[type="submit"] {
        margin: 0;
        margin-bottom: 3vh;
        width: unset;
    }

    #contactRightEmail {
        margin-bottom: 5px;
    }

    #contactRightPhone {
        margin-bottom: 3px;
    }

    @keyframes fadeIn {
        0% {
            transform: translateY(5vh);
            opacity: 0;
        }
        100% {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

@media only screen and (orientation : landscape) and (max-height: 600px){
    #header {
        display: none;
    }

    body {
        grid-template-rows: minmax(0, 1fr) minmax(0, max-content);
        grid-template-areas: "pageContent" "navigation ";
    }
}