@media only screen and (min-width: 768px) {
    body {
        --screen-left-right-margin: 1.5rem;
    }
}

@media only screen and (max-width : 767px) {
    body {
        --screen-left-right-margin: 0.5rem;
    }
}

.primary-fore-color {
    color: rgba(250, 142, 2, 255);
}

.secondary-fore-color {
    color: rgba(255, 255, 255, 255);
}

.tertiary-fore-color {
    color: rgba(180, 180, 180, 255);
}

.primary-typeface {
    font-family: 'Open Sans Condensed', 'Avenir Next Condensed', sans-serif;
}

.medium-font {
    font-size: 1.2rem;
}

.large-font {
    font-size: 2rem;
}

/**************************************************
** Hide initially unused backdrops and compositions off screen on the left
*/
.section-hidden-initially {
    left: -100% !important;
}

/**************************************************
** Animation keyframes assigned in JS for incoming and outgoing backdrops and compositions
*/
.section-animation {
    animation-duration: 1.5s;
    animation-fill-mode: both;
}

@keyframes section-left-out {
    from {
        left: 0;
    }
    to {
        left: -100%;
    }
}

@keyframes section-left-in {
    from {
        left: 100%;
    }
    to {
        left: 0;
    }
}

@keyframes section-right-out {
    from {
        left: 0;
    }
    to {
        left: 100%;
    }
}

@keyframes section-right-in {
    from {
        left: -100%;
    }
    to {
        left: 0;
    }
}

/**************************************************
** Use horizontal scrolling to switch between sections
*/
.sections-scroll {
    position: fixed;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;

    overflow-x: scroll;

    /*hide scroll bar*/
    margin-bottom: -50px;
    padding-bottom: 50px;
}

.section {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;

    overflow: hidden;
}

/**************************************************
** Background layer containing backdrops
*/
.background {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;

    overflow: hidden;
}

.backdrop {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

.backdrop-image {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;

    background-size: cover;
    background-position: center;
}

.home-backdrop-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    background-color: rgba(0, 0, 0, 0.0);
}

.home-backdrop-overlay-init-animation {
    animation-name: home-backdrop-overlay-init;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-delay: 1.5s;

    background-color: rgba(68, 68, 68, 1);
}

@keyframes home-backdrop-overlay-init {
    to {
        background-color: rgba(0, 0, 0, 0.0);
    }
}

/**************************************************
** Header layer containing logo and title
*/
@media only screen and (min-width: 768px) {
    .header {
        height: 4.5rem;
    }

    .title {
        font-size: 2rem;
    }
}

@media only screen and (max-width : 767px) {
    .header {
        height: 3rem;
    }

    .title {
        top: -0.2rem;

        font-size: 1.5rem;
    }
}

.header {
    position: fixed;
    width: 100%;
    left: 0;
    top: 1.5rem;

    display: flex;
}

.logo {
    height: 100%;
}

.ray {
    width: 100%;
}

.ray-init-animation {
    animation-name: ray-init;
    animation-duration: 1s;
    animation-timing-function: ease;
    animation-fill-mode: forwards;
    animation-delay: 0.5s;

    width: 0;
}

@keyframes ray-init {
    to {
        width: 100%;
    }
}

.title {
    position: absolute;
    right: var(--screen-left-right-margin);
}

.title-init-animation {
    animation-name: title-init;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-delay: 1s;

    right: -11rem;
}

@keyframes title-init {
    to {
        right: var(--screen-left-right-margin);
    }
}

/**************************************************
** Footer layer
*/
.footer {
    position: fixed;
    width: 100%;
    left: 0;
    bottom: 1rem;
}

@media only screen and (max-width : 767px) {
    .copyright {
        writing-mode: vertical-lr;
        text-orientation: sideways;
    }
}

.copyright {
    margin-left: var(--screen-left-right-margin);
}

/**************************************************
** Content layer that encloses compositions
*/
@media only screen and (min-width: 768px) {
    .content {
        top: 6rem;
    }
}

@media only screen and (max-width : 767px) {
    .content {
        top: 5rem;
    }
}

.content {
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0;
}

.composition {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
}

/**************************************************
** Home section composition
*/
@media only screen and (min-width : 768px) {
    .intro {
        --intro-width: 70%;
        --intro-height: 50%;
        --intro-left: 15%;
        --intro-top: 20%;

        --line-right-viewport-width: 70%;
    }

    .line-left-viewport {
        display: inline-block;
    }

    .line-right-viewport .name-wrap {
        display: none;
    }

    .name {
        right: 0;

        text-align: right;
    }

    .name-init-animation {
        right: -100%;
    }

    @keyframes name-init {
        to {
            right: 0;
        }
    }

    .tile:hover {
        height: 5.5rem;

        padding: 0 0.15rem 0 0.15rem;
    }

    .instagram:hover {
        width: 1.7rem;
        height: 1.7rem;
        margin-left: 0;
        margin-right: 0.2rem;
        margin-bottom: -0.2rem;
    }

    .link {
        text-decoration-line: none;
    }

    .link:hover {
        text-decoration-line: underline;
        text-decoration-style: solid;
        text-underline-position: below;
    }
}

@media only screen and (max-width : 767px) {
    .intro {
        --intro-width: 80%;
        --intro-height: 80%;
        --intro-left: 10%;
        --intro-top: 5%;

        --line-right-viewport-width: 96%;
    }

    .line-left-viewport {
        display: none;
    }

    .line-right-viewport .name-wrap {
        display: block;
    }

    .name {
        left: 0;
    }

    .name-init-animation {
        left: -100%;
    }

    @keyframes name-init {
        to {
            left: 0;
        }
    }
}

.intro {
    /*border-color: red;*/
    /*border-width: 1px;*/
    /*border-style: solid;*/

    position: absolute;
    width: var(--intro-width);
    height: var(--intro-height);
    left: var(--intro-left);
    top: var(--intro-top);
}

.line-left-viewport {
    /*border-color: yellow;*/
    /*border-width: 1px;*/
    /*border-style: solid;*/

    width: 26%;
    height: 100%;

    vertical-align: top;
}

.name-wrap {
    flex-shrink: 0;

    margin-top: 1.5rem;

    overflow: hidden;
}

.name {
    position: relative;
}

.name-init-animation {
    animation-name: name-init;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-delay: 2s;
}

.line {
    display: inline-block;
    width: 1px;
    height: 100%;

    margin-left: 1.3%;
    margin-right: 1.3%;
}

.line-init-animation {
    animation-name: line-init;
    animation-duration: 2.0s;
    animation-fill-mode: forwards;
    animation-delay: 1.5s;
    animation-timing-function: ease-in;

    height: 0;
}

@keyframes line-init {
    to {
        height: 100%;
    }
}

.line-right-viewport {
    /*border-color: pink;*/
    /*border-width: 1px;*/
    /*border-style: solid;*/

    display: inline-block;
    width: var(--line-right-viewport-width);
    height: 100%;

    vertical-align: top;

    overflow: hidden;
}

.line-right-scroll {
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;

    display: flex;
    flex-direction: column;

    overflow-y: scroll;

    /*hide scrollbar*/
    margin-right: -50px;
    padding-right: 50px;
}

.description-wrap {
    flex-shrink: 0;

    margin-top: 4rem;

    overflow: hidden;
}

.description {
    position: relative;
    left: 0;
}

.description-init-animation {
    animation-name: description-init;
    animation-duration: 2s;
    animation-fill-mode: forwards;
    animation-delay: 2.3s;

    left: -100%;
}

@keyframes description-init {
    to {
        left: 0;
    }
}

.tiles-wrap {
    flex-shrink: 0;

    margin-top: 1rem;
    margin-bottom: 2rem;

    overflow: hidden;
}

.tiles {
    position: relative;
    left: 0;
}

.tiles-init-animation {
    animation-name: tiles-init;
    animation-duration: 1.5s;
    animation-fill-mode: forwards;
    animation-delay: 2.4s;

    left: -100%;
}

@keyframes tiles-init {
    to {
        left: 0;
    }
}

.tile {
    position: relative;
    height: 5rem;

    padding: 0.25rem 0.15rem 0.25rem 0.15rem;

    vertical-align: middle;

    transition: height 0.3s, top 0.3s, padding 0.3s;

    cursor: pointer;
}

.contacts-wrap {
    flex-shrink: 0;

    margin-top: auto;

    overflow: hidden;
}

.contacts {
    position: relative;
    left: 0;
}

.contacts-init-animation {
    animation-name: contacts-init;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-delay: 3.3s;

    left: -100%;
}

@keyframes contacts-init {
    to {
        left: 0;
    }
}

.instagram {
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.1rem;
    margin-right: 0.3rem;
    margin-bottom: -0.1rem;

    transition: height 0.3s, width 0.3s, margin 0.3s;
}

/**************************************************
** Magazine section composition
*/
@media only screen and (min-width : 768px) {
    #compositionMagazine .showcase {
        left: 10%;
        top: 0;
        right: 28%;
        /*???*/ bottom: 2rem;

        overflow: visible;      /* disable showcase scrolling because otherwise, as a page is dragged, the top gets cut off */
    }

    #compositionMagazine .showcase-scroll {
        overflow: visible;      /* disable showcase scrolling because otherwise, as a page is dragged, the top gets cut off */
    }

    /* Add padding to allow user to overshoot the spread preview images with the mouse and still keep the hover on */
    /* These dimensions make spreads just barely fit for the narrowest "wide" layout */
    .spread-wrap {
        padding: 1.1rem 0.15rem 1.1rem 0.15rem;

        cursor: pointer;
    }

    /* leave padding room to allow user to "overshoot" with mouse no longer over the image but still keep the hover */
    .spread-wrap-front {
        padding-left: 1.3rem;
    }

    /* leave padding room to allow user to "overshoot" with mouse no longer over the image but still keep the hover */
    .spread-wrap-back {
        padding-right: 1.3rem;
    }

    .spread {
        height: 0.9rem;

        margin: 1.1rem 0 1.1rem 0;

        transition: width 0.2s, left 0.2s, height 0.2s, top 0.2s, margin 0.2s;
    }

    .spread-wrap:hover .spread {
        height: 3.1rem;

        margin: 0;
    }
}

@media only screen and (max-width : 767px) {
    .spread {
        height: 1.2rem;
    }

    .spread-active {
        margin: 0;
    }

    .spread-inactive {
        margin: 0.2rem;
    }
}

/* turn.js manipulates .flipbook css so need another element to position flipbook without interference */
.magazine {
    position: relative;
    left: 50%;
}

/* turn.js populates this element */
.flipbook {
}

/* transition between single and double page spreads */
.flipbook-animated {
    transition: margin-left 1s;
}

.flipbook .page {
    background-color: white;
    background-repeat: no-repeat;
    background-size: 100% 100%;
}

/* shadow in the fold of the spread */
.flipbook .even .gradient{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;

    background: linear-gradient(left, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0.2) 100%);
}

.flipbook .odd .gradient{
    position:absolute;
    top:0;
    left:0;
    width:100%;
    height:100%;

    background: linear-gradient(right, rgba(0, 0, 0, 0) 95%, rgba(0, 0, 0, 0.15) 100%);
}

.flipbook .loader{
    background-image: url(loader.gif);
    background-size: contain;
    width: 4rem;
    height: 4rem;
    position: absolute;
    top: 50%;
    left : 50%;
    margin-top: -2rem;
    margin-left: -2rem;
}

.spreads {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;

    text-align: center;
}

.spread {
    vertical-align: middle;
}

.spread-active {
    border: rgba(250, 142, 2, 255) solid 0.2rem;
}

.magazine-name {
    font-style: italic;
}

/**************************************************
** Both showcase sections compositions
*/
@media only screen and (min-width : 768px) {
    .showcase {
        left: 22%;
        top: -6rem;
        right: 28%;
        /*???*/ bottom: 3.1rem;
    }

    .showcase .about {
        display: none;
    }

    .showcase .endorsement {
        display: none;
    }
}

@media only screen and (max-width : 767px) {
    .showcase {
        left: 12%;
        top: 0;
        right: 12%;
        /*???*/ bottom: 3.1rem;
    }

    .showcase .about {
        display: block;
    }

    .showcase .endorsement {
        display: block;

        margin-top: auto;
        margin-bottom: 0.7rem;
    }
}

.showcase {
    position: absolute;

    overflow: hidden;
}

.showcase-scroll {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;

    overflow-x: hidden;     /* turn.js sometimes makes flipbook a lot wider than it needs to be causing horizontal scroll bar */
    overflow-y: scroll;

    /*hide scrollbar*/
    margin-right: -50px;
    padding-right: 50px;
}

.showcase-item {
    display: block;

    max-width: 100%;
    max-height: 90%;

    margin: 1.5rem auto 1.5rem auto;
}

/**************************************************
** Info on the right of any section's composition that includes info
*/
@media only screen and (min-width : 768px) {
    .info {
        position: absolute;
        width: calc(25% - var(--screen-left-right-margin));
        right: var(--screen-left-right-margin);
        height: 100%;

        display: flex;
        flex-direction: column;

        text-align: right;
    }

    .info .endorsement {
        margin-top: auto;
        /*???*/ margin-bottom: 4.1rem;
    }
}

@media only screen and (max-width : 767px) {
    .info {
        display: none;
    }
}

.about {
    flex-shrink: 0;
}

.topic {
    margin-bottom: 1rem;
}

.summary {
    white-space: pre-wrap;
}

.endorsement {
    flex-shrink: 0;
}

.testimonial {
    white-space: pre-wrap;
}

.signature {
    font-style: italic;
}

/**************************************************
** Scroll arrows layer
*/
@media only screen and (min-width : 768px) {
    .arrow-left:hover {
        background-image: url(arrow-left-filled.png);
    }

    .arrow-right:hover {
        background-image: url(arrow-right-filled.png);
    }
}

.arrow {
    position: fixed;
    width: 22px;
    height: 77px;
    top: 50%;

    cursor: pointer;
}

.arrow-left {
    left: var(--screen-left-right-margin);

    background-image: url(arrow-left-blank.png);
}

.arrow-right {
    right: var(--screen-left-right-margin);

    background-image: url(arrow-right-blank.png);
}

.arrow-right-init-animation {
    animation-name: arrow-right-init;
    animation-duration: 1s;
    animation-fill-mode: forwards;
    animation-delay: 3.9s;

    right: calc(-22px - var(--screen-left-right-margin));
}

@keyframes arrow-right-init {
    to {
        right: var(--screen-left-right-margin);
    }
}
