/* Font Faces */
@font-face {
  font-family: 'title';
  src: url(./fonts/Tagesschrift-Regular.ttf)
}

@font-face {
  font-family: 'initial';
  src: url(./fonts/capo_verso.ttf)
}

@font-face {
  font-family: 'text';
  src: url(./fonts/IMFellDWPica-Regular.ttf)
}

@font-face {
  font-family: 'itallics';
  src: url(./fonts/IMFellDWPica-Italic.ttf)
}

/* Global */
a {
    text-decoration: none;
    color: black;
}

body {
    align-items: center;
    background-image: url("/images/background.png");
    background-repeat: repeat;
    background-size: auto;
    font-family: 'itallics';
    font-size: 30px;
    height: 100%;
    justify-items: center;
    min-height: 500px;

/* Css variables - Main layout */

    --container-height: 94vh;
    --container-width: calc(var(--container-height) * 18 / 9);
}

/* Container - CSS Variables */
.container {

    /* Position variables for interactive elements */
    --dovecot-right: 10%;
    --dovecot-bottom: 18%;
    --house-left: 2%;
    --house-bottom: 24%;
    --sun-left: 30%;
    --sun-top: 30%;
    
    position: relative;
    top: 2vh;
    height: var(--container-height);
    margin: auto;
    min-height: 800px;
    max-height: 1000px;
    min-width: 1420px;
    max-width: 1750px;
    overflow: hidden;
    width: var(--container-width);
    z-index: 100;
}

.frame {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    z-index: 20;
}

.frame img {
    width: 100%;
    height: 100%;
}

/* Shared Caption Styles */
.caption {
    align-content: center;
    background-image: url(./images/background.png);
    border: #eabb2d solid 3px;
    line-height: 1.3;
    padding: 12px;
    text-align: center;
    font-size: 1em;
}

/* Shared Interactive Link Styles */
.house-hover a,
.hive-hover a {
    pointer-events: none;
}

.house-wrapper:hover .house-hover a,
.house-wrapper:focus-within .house-hover a,
.hive-wrapper:hover .hive-hover a,
.hive-wrapper:focus-within .hive-hover a {
    pointer-events: auto;
}

/* =================
   LAYOUT ELEMENTS
   ================= */

/* Arches */
.arches {
    position: absolute;
    align-items: center;
    bottom: 10%;
    left: -5px;
    height: 900px;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    pointer-events: none;
    z-index: 8;
}

.arches img {
    height: 100%;
    max-height: 150%;
}

/* Clouds */
.cloud-1 {
    position: absolute;
    left: 5%;
    top: 20%;
    height: 20%;
    z-index: 0;
}

.cloud-1 img {
    height: 25vh;
    min-height: 150px;
}

.cloud-2 {
    position: absolute;
    right: 8%;
    top: 28%;
    height: 20%;
    z-index: 0;
}

.cloud-2 img {
    height: 24vh;
    min-height: 150px;
}

/* Floor */
.floor {
    position: absolute;
    top: 85%;
    align-items: center;
    max-height: 15%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    z-index: 5;
}

.floor img {
    width: 100%;
}

/* Flowers */
.flowers {
    position: absolute;
    left: 15%;
    bottom: 14%;
    z-index: 5;
}

.flowers img {
    height: 175px;
}

/* Garden */
.garden {
    position: absolute;
    left: 0;
    bottom: 18%;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: hidden;
    z-index: 2;
}

.garden img {
    height: 20vh;
    min-height: 150px;
}

/* Hills */
.hill-1 {
    position: absolute;
    left: 0;
    bottom: 27%;
    overflow-x: hidden;
    overflow-y: hidden;
    z-index: 1;
}

.hill-1 img {
    height: 25vh;
    min-height: 250px;
    width: auto;
}

.hill-2 {
    position: absolute;
    right: 0;
    bottom: 20%;
    overflow-x: hidden;
    overflow-y: hidden;
    z-index: 0;
}

.hill-2 img {
    height: 25vh;
    min-height: 250px;
    width: auto;
}

/* Sky */
.sky {
    max-height: 100%;
    max-width: 100%;
    opacity: 0;
    overflow: hidden;
}

/* Trees */
.trees {
    position: absolute;
    right: 32%;
    bottom: 20%;
    z-index: 3;
}

.trees img {
    height: 450px;
}

/* =================
   INTERACTIVE ELEMENTS
   ================= */

/* Dovecot */
.dovecot-wrapper {
    position: absolute;
    right: var(--dovecot-right);
    bottom: var(--dovecot-bottom);
    height: 300px;
    width: 250px;
    z-index: 9;
}

.dovecot-still {
    position: absolute;
    left: 0;
    top: 0;
}

.dovecot-still img {
    height: 50vh;
    min-height: 450px;
}

.dovecot-hover {
    position: absolute;
    left: 0;
    top: 0;
}

.dovecot-hover img {
    display: none;
    height: 50vh;
    min-height: 450px;
}

.dovecot-caption-wrapper {
    position: absolute;
    right: calc(var(--dovecot-right) + 100px);
    bottom: calc(var(--dovecot-bottom) - 100px);
    height: 300px;
    padding: 10px;
    width: 150px;
}

.dovecot-caption {
    position: absolute;
    left: 0;
    top: 0;
    display: none;
    z-index: 9;
}

.dovecot-wrapper:hover .dovecot-hover img,
.dovecot-wrapper:focus-within .dovecot-hover img {
    display: block;
}

.dovecot-wrapper:hover .dovecot-still img,
.dovecot-wrapper:focus-within .dovecot-still img {
    display: none;
}

.dovecot-wrapper:hover + .dovecot-caption-wrapper .dovecot-caption,
.dovecot-wrapper:focus-within + .dovecot-caption-wrapper .dovecot-caption {
    display: block;
    z-index: 8;
}

/* House */
.house-wrapper {
    position: absolute;
    left: var(--house-left);
    bottom: var(--house-bottom);
    height: 220px;
    z-index: 4;
}

.house-still {
    position: absolute;
    left: 0;
    top: 0;
}

.house-still img, .house-hover img {
    height: 220px;
    width: auto;
}

.house-hover {
    position: absolute;
    left: 0;
    top: 0;
}

.house-hover img {
    display: none;
}

.house-caption-wrapper {
    position: absolute;
    left: calc(var(--house-left) + 250px); 
    bottom: calc(var(--house-bottom));
    height: 220px;
    width: 150px;
    display: none;
    z-index: 9;
}

.house-caption {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 9;
}

.house-link {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.house-wrapper:hover .house-hover img,
.house-wrapper:focus-within .house-hover img {
    display: block;
}

.house-wrapper:hover ~ .house-caption-wrapper,
.house-wrapper:focus-within ~ .house-caption {
    display: block;
}

.house-wrapper:hover .house-still img,
.house-wrapper:focus-within .house-still img {
    display: none;
}

/* Sun */
.sun-wrapper {
    position: absolute;
    left: var(--sun-left);
    top: var(--sun-top);
    height: 120px;
    width: 120px;
}

.sun-still {
    position: absolute;
    left: 0;
    top: 0;
}

.sun-still img {
    height: 18vh;
    min-height: 120px;
}

.sun-hover {
    position: absolute;
    left: 0;
    top: 0;
}

.sun-hover img {
    display: none;
    height: 18vh;
    min-height: 120px;
}

.sun-caption-wrapper {
    position: absolute;
    left: calc(var(--sun-left) + 175px);
    top: calc(var(--sun-top) - 20px); 
    width: 180px;
    z-index: 9;
}

.sun-caption {
    display: none;
    padding: 10px 0;
}

.sun-wrapper:hover .sun-hover img,
.sun-wrapper:focus-within .sun-hover img {
    display: block;
}

.sun-wrapper:hover + .sun-caption-wrapper .sun-caption,
.sun-wrapper:focus-within + .sun-caption-wrapper .sun-caption {
    display: block;
}

/* Media Queries */
@media screen and (max-width: 950px) {
    
    html {
        height: 100vh;
        max-height: 100vh;
        min-height: 100vh;
        overflow-y: hidden;
    }
    
    body {
        height: 100vh;
        max-height: 100vh;
        min-height: 100vh;
        overflow-y: hidden;
    }
    
    p {
        margin-bottom: 10px;
    }
    
    /* Update container variables */
    .container {
        --hive-left: 68%;
        --hive-bottom: 15%;
        --dovecot-right: 5%;
        --house-bottom: 16%;
    }
    
    .arches {
        top: auto;
        bottom: 7%;
        height: 800px;
    }

    .arches img {
        max-height: 130%;
    }

    .caption {
        font-size: 20px;
        max-width: 100px;
    }
    
    .cloud-1 {
        left: 2%;
        top: 10%;
    }

    .cloud-1 img, .cloud-2 img {
        height: 100px;
    }

    .cloud-2 {
        right: 2%;
        top: 14%;
    }

    .container {
        height: 95vh;
        max-height: 95vh;
        min-height: 95vh;
        border: none;
        margin: none;
    }
    
    .flowers {
        left: 20%;
    }

    .flowers img {
        height: 150px;
    }

    .garden {
        bottom: 17%;
    }

    .hive-wrapper {
        left: var(--hive-left);
        bottom: var(--hive-bottom);
    }
    
    .hive-hover img, .hive-still img {
        height: 100px;
        width: 78px;
    }

    .hive-caption-wrapper {
        left: calc(var(--hive-left) - 110px);
        bottom: calc(var(--hive-bottom) + 50px);
    }

    .hive-caption {
        font-size: 14px;
    }

    .house-caption-wrapper {
        left: calc(var(--house-left) + 220px)
    }

    .house-still img, .house-hover img {
        height: 190px;
    }

    .house-wrapper:hover .house-hover img {
        display: none;
    }

    .sun-caption-wrapper {
        left: calc(var(--sun-left) + 130px)
    }

    .sun-caption {
        font-size: 18px;
    }

    .trees img {
        height: 350px;
    }
}