/** Mobile First **/

html {
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

ul,
ol {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

html {
    font-family: "Helvetica Neue", Arial, sans-serif;
    min-height: 100%;
}

body {
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: url("images/vines.png") repeat-x fixed,
                url("images/rock.png") center bottom repeat-x fixed,
                #628f8e;
    font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
}

.container {
    margin: 0 .625rem;
    overflow: hidden;
}

/***************************
********  Wrapper **********
****************************/
.wrapper {
    border: 2px solid hsl(0, 0%, 100%);
    border-radius: 0px;
    background: #838383;
    margin-top: 4.625em;
    margin-bottom: 10px;
}

/**************************
********  Header **********
***************************/
.header-main {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    background: url(images/leaves.png) no-repeat 65px center / 50px,
                url(images/leaves.png) no-repeat right center / 50px,
                #3f566d;
    box-shadow: inset 0 2px 4px hsla(0, 0%, 0%, 0.8), 0px 4px 6px 0px hsla(227, 17%, 16%, 0.62);
}

.header-main h1 {
    line-height: 2;
    float: left;
    position: relative;
    left: 50%;
    transform: translateX(calc(-50% + 30px));
    margin: 0;
    color: hsl(0, 0%, 100%);
    font-family: "Myriad Pro Regular", sans-serif;
    font-weight: 200;
    letter-spacing: 4px;
    text-shadow: 0 -2px 2px hsla(0, 0%, 0%, 0.6);
}

.header-main h1 sup {
    font-size: .6em;
}

h2 {
    line-height: 1.7;
    letter-spacing: 2px;
    font-family: 'Montserrat Light', sans-serif;
    text-transform: uppercase;
}

/******************************
********  Navigation **********
*******************************/
.nav-main {
    position: relative;
}

/* hide the check box - input type=checkbox*/
.nav-main-menu-toggle {
    display: none;
}

/* style the checkbox's label */
.nav-main-menu-toggle-icon {
    position: fixed;
    z-index: 200;
    width: 64px;
    height: 64px;
    top: 0;
    left: 0;
    cursor: pointer;
}

/* position the span in the label - this is the hamburger of the hamburger icon */
.nav-main-menu-toggle-icon span {
    width: 80%;
    top: 50%;
    left: 10%;
    transform: translateY(-50%);
}

/**
 * .nav-main-menu-toggle-icon span
 * - build the hamburger icon
 * - ::before and ::after are pseudo elements
 * - they do not exist in the markup but we can style them
 * - every element that has content has ::before and ::after
 * - each line is 6px tall with a 3px border radius
 */
.nav-main-menu-toggle-icon span::before,
.nav-main-menu-toggle-icon span,
.nav-main-menu-toggle-icon span::after {
    background-color: hsl(0, 0%, 100%);
    height: 6px;
    position: absolute;
    content: '';
    transition: all .25s ease-in;
    border-radius: 3px;
}

.nav-main-menu-toggle-icon span::before {
    width: 100%;
    top: -10px;
}

.nav-main-menu-toggle-icon span::after {
    width: 100%;
    top: 10px;
}

/**
 * .element ~ element
 * - is the General sibling combinator
 * - find .nav-main-menu-toggle:checked
 * - when the input is checked...
 * - style the .nav-main-menu-toggle-icon span
 * - a trick to use the input type="checkbox" to trigger changes in our layout
 */
.nav-main-menu-toggle:checked~.nav-main-menu-toggle-icon span {
   /*  background-color: transparent; */
   top: 50px;
}

.nav-main-menu-toggle:checked~.nav-main-menu-toggle-icon span::before,
.nav-main-menu-toggle:checked~.nav-main-menu-toggle-icon span::after {
    top: -12px;
}

.nav-main-menu-toggle:checked~.nav-main-menu-toggle-icon span::before {
    transform: rotate(-135deg);
    left: 19px;
    width: 70%;
}

.nav-main-menu-toggle:checked~.nav-main-menu-toggle-icon span::after {
    transform: rotate(135deg);
    right: 19px;
    width: 70%;
}

/* style the UL left 0 width 0 can not be seen */
.nav-main-menu {
    position: fixed;
    z-index: 50;
    top: 4em;
    left: 0;
    width: 0;
    height: calc(100vh - 3em);
    transition:
        width .5s .25s ease-in,
        box-shadow .25s ease-in;
    background: #fff linear-gradient(to right, #3f566d,rgba(82,97,109,1) 55%,rgba(115,136,153,1) 74%,rgba(143,169,191,0.7) 90%,rgba(160,190,214,0) 100%);
    box-shadow: none;
    overflow-y: auto;
}

/* when input checked show the UL */
.nav-main-menu-toggle:checked~.nav-main-menu {
    width: 60vw;
    box-shadow: 0 0 0 100vw hsla(210, 3%, 23%, 0.40);

}

/* style the anchor */
.nav-main-menu a {
    position: relative;
    display: inline-block;
    width: 100%;
    font-size: 1.5em;
    line-height: 2;
    font-weight: 300;
    color: hsl(0, 0%, 100%);
    text-decoration: none;
    text-indent: 1.25rem;
    margin: 4px 0;
    transition: all .25s ease-in;
}

/* style anchor :hover */
.nav-main-menu a:hover::after {
     width: 100%;
}

/* style the ::before when :hover on anchor */
.nav-main-menu a:hover::before {
    transform: translateX(100vw);
    opacity: 0;
}
.nav-main-menu a::after {
  content: '';
  width: 0px;
  height: 1px;
  display: block;
  background: #fff;
  transition: 300ms;
}
/* End Navigation: Small Screen: 0px and UP */


/*************************
********  Cards **********
**************************/
.cards {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.cards .card {
    flex: 0 0 calc(100% - 20px);
    display: flex;
    margin: 10px;
    min-width: 0;
    background: #628f8e;
}

.cards .card-link {
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    flex: 0 0 100%;
}

.cards .card-figure {
    position: relative;
    margin: 0;
    line-height: 0;
    overflow: hidden;
}

.cards .card-figure-image {
    width: 100%;
    height: 225px;
    object-fit: cover;
    transform-origin: 50% 50%;
    transform: scale(1);
    transition: all 1s;
}

.cards .card-figure-caption {
    padding: 0 10px;
}

.cards .card-link:hover .card-figure-image {
    transform: scale(1.3);
}

.cards .card-link:hover  {
    box-shadow: 2px 2px 10px 1px #fff, -2px -2px 10px 1px #fff;
    transition: box-shadow 1s;
}

.cards .card-figure-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0px;
    background: hsla(228, 3%, 34%, 0.5);
    color: hsla(0, 0%, 100%, 1);
    line-height: 2;
    font-style: italic;
}

.cards .card-section {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 25px;
    background-color: #3f566d;
}

.cards .card-section-title {
    margin-bottom: 10px;
    border-bottom: 2px dotted;
}

.cards .card-section-meta {
    display: flex;
    flex-wrap: wrap;
}

.cards .card-section-meta * {
    flex: 0 0 50%;
    font-size: .95em;
    line-height: 2;
}

.cards .card-section-meta :nth-child(even) {
    text-align: right;
}

.cards .card-section-excerpt {
    flex-grow: 1;
    line-height: 1.4;
    font-size: 1.1em;
}

.cards .card-section-button {
    align-self: center;
    margin: 0px;
    padding: 0 3em;
    border-radius: 0;
    border: 1px solid #3f566d;
    line-height: 3;
    font-weight: 600;
    color: #3f566d;
    font-size: 20px;
    background: #fff;
}

.cards .card-section-button:hover {
    background: #628f8e;
    color: #fff;
    
    transition: all 1s;
}

/************************
********  Form **********
*************************/
.callout {
    font-family: Cambria, serif;
    background: linear-gradient(to right, hsla(207,38%,95%,1) 0%,hsla(210,19%,55%,1) 4%,hsla(210,27%,34%,1) 19%,hsla(210,27%,34%,1) 77%,hsla(210,19%,55%,1) 96%,hsla(205,83%,91%,1) 100%); 
    padding: 30px;
    margin-top: 15px;
}

.callout-heading {
    color: #fff;
    font-size: 1.8em;
    letter-spacing: 2px;
    margin: 0 0;
    text-align: center;
}

p.callout-intro {
    color: #fff;
    font-size: 1.5em;
    margin-top: 15px;
    margin-bottom: 10px;
     text-align: center;
}

.subscribe-newsletter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
    width: 80%;
    margin: 0 auto;
}

.subscribe-newsletter fieldset {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
}

.subscribe-newsletter fieldset:first-child {
    flex: 1 1 auto;
}

.subscribe-newsletter fieldset:last-child::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: url("images/loader-circles-spin.svg") no-repeat center;
    z-index: var(--z-index, -1);
}

.subscribe-newsletter input:not([type="radio"]):not([type="checkbox"]) {
    -webkit-appearance: none;
    border: none;
    border-radius: 0;
}

.subscribe-newsletter input {
    position: relative;
    font-family: inherit;
    font-size: 1.2em;
    line-height: 2.4;
    letter-spacing: 0.05em;
    padding: 0em .5em;
    color: #000;
}

.subscribe-newsletter input[type=email] {
    background: hsla(0, 0%, 100%, 0.90);
}

.subscribe-newsletter input[type=email]:focus {
    outline: none;
    box-shadow: inset 0 0 0 3px #628f8e;
}

.subscribe-newsletter input::placeholder {
    position: relative;
    color: #000;
    opacity: .3;
}

.subscribe-newsletter input:focus::placeholder {
    opacity: 0;
}

.subscribe-newsletter input[type=submit],
.subscribe-newsletter input[type=submit]:invalid {
    background: #628f8e;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    margin: 10px 0 0 0;
    padding: 5px;
    padding: 0 1em;
    box-shadow: 0 0 0px 0px hsla(0, 0%, 00%, 0.60);
}

.subscribe-newsletter:valid input[type=submit] { 
    color: #fff;
    background: linear-gradient(135deg, hsla(207,38%,95%,1) 0%,hsla(179,19%,47%,1) 25%,hsla(179,19%,47%,1) 77%,hsla(205,83%,91%,1) 100%); 
    box-shadow: -2px 2px 8px hsla(0, 0%, 100%, 0.80), -2px -2px 8px hsla(0, 0%, 100%, 0.60);
    transition: all 1s .5s ease-in;
}

.subscribe-newsletter fieldset input[type=submit]:disabled {
    background: hsla(0, 0%, 100%, 0.90);
    color: black;
    box-shadow: 0 0 0px 0px hsla(0, 0%, 100%, 0.60);
}

.subscribe-newsletter label {
    color: #fff;
    line-height: 1.625em;
    font-size: 1.2em;
    font-weight: 600;
}
label.subscribe-newsletter-message {
    color: #fff;
    font-size: .9em;
    text-align: center;
    font-weight: 300;
}

.subscribe-newsletter .subscribe-newsletter-message-error {
    background: #fff;
}

.subscribe-newsletter .subscribe-newsletter-message-success {
    background: #628f8e;
    color: #fff;
    font-size: 2em;
    flex: 1;
    text-align: center;
    padding-top: 1em;
    padding-bottom: 1em;
}

/**************************
********  Footer **********
***************************/
footer {
    clear: both;
    overflow: auto;
    margin: 0 20px;
    padding: 50px 0 20px;
    color: hsl(0, 0%, 100%);
}

footer a[href^="javascript"] {
    position: relative;
    color: hsl(0, 0%, 0%);
    display: block;
    line-height: 2em;
    font-size: 0.625em;
    background-color: hsl(0, 0%, 100%);
    border-radius: 3px;
    margin: 0 0 0 10px;
    padding: 0 10px;
    float: right;
    text-decoration: none;
    box-shadow: 0 2px 2px hsl(0, 0%, 0%);
}

footer a[href^="javascript"]:active {
    top: 2px;
    box-shadow: none;
}

/*
Start Media Query
    if screen is 48rem or larger (can use px or em)
    rem is based on font size of root element
        (16px * 48 = 768)
    use the following rules
*/
@media (min-width: 768px) {
    
    .container {
        width: 96%;
        max-width: 1100px;
        margin: 20px auto;
    }

    /**************************
    ********  Header **********
    ***************************/
    .header-main {
        position: static;
        height: 175px;
        border-radius: 0px;
        border: 2px solid hsl(0, 0%, 50%);
        margin: 20px;
        background: url(images/leavesflip.png) no-repeat right top / 75px,
        url(images/leavesflip.png) no-repeat left top / 75px,
        url(images/leaves.png) no-repeat right bottom / 75px,
        url(images/leaves.png) no-repeat left bottom / 75px,
        #3f566d;
        
    }

    .header-main h1 {
        line-height: 175px; /*200px*/
        font-size: 4em;
        transform: translateX(-50%);
    }
    
    /*******************************
    ********  Navigation **********
    *******************************/
    /*  hide the checkbox and the hamburger */
    .nav-main-menu-toggle,
    .nav-main-menu-toggle-icon {
        display: none;
    }

    /*  override and reset to no style */
    .nav-main-menu {
        display: flex;
        justify-content: space-around;
        position: relative;
        z-index: 0;
        top: auto;
        left: auto;
        width: auto;
        height: auto;
        
        transition: none;
        background: none;
        box-shadow: none;
        overflow: hidden;
        padding: 0 150px;
    }

    /*  override and reset to no style */
    .nav-main-menu-toggle:checked~.nav-main-menu {
        width: auto;
        box-shadow: none;
    }

    /*  override and basic style for navigation large screen */
    .nav-main-menu a {
        position: static;
        display: block;
        text-indent: 0;
        padding: 0 1em;
        border: 2px solid hsl(0, 0%, 100%);
        border-radius: 0;
        transition: all .25s linear;
        box-shadow: 0 0px 4px currentColor;
    }

    /*  hide the a:::before */
    .nav-main-menu a::before {
        display: none;
    }

    /*  basic style for navigation large screen */
    .nav-main-menu a:hover {
        text-indent: 0;
        color: hsl(0, 0%, 100%);
        background-color: #3f566d;
        box-shadow: 0 0px 0px currentColor;
        border-radius: 0 25px 0 25px;
        transition: all 1.2s ease;
    }
    .nav-main-menu a:hover::after {
        width: 0;
    }
    .nav-main-menu a:active {
        text-indent: 0;
        color: #3f566d;
        background-color: hsl(0, 0%, 100%);
        box-shadow: inset 0 0px 4px currentColor;
    }
    
    /**************************
    ********  Cards **********
    ***************************/
    .cards .card {
        flex: 0 0 calc(50% - 40px);
        margin: 20px;
    }
    
    /************************
    ********  Form **********
    *************************/
    .callout {
        padding: 40px;
    }
    .subscribe-newsletter {
        flex-direction: row;
        height: 8em;
        align-items: center;
    }
    .subscribe-newsletter input[type=submit] {
        margin-left: 10px;
        margin-top: 7px;
    }
    .subscribe-newsletter .subscribe-newsletter-message-success {
        line-height: 3em;
    }
    label.subscribe-newsletter-message {
    text-align: left;
    }
        
    img {
        width: auto;
        float: right;
        margin: 0 0 2px 4px;
    }
}

/* Close: @media (min-width: 48rem) */