/* CSS Document */
@import url('https://fonts.googleapis.com/css2?family=Island+Moments&family=Playfair+Display+SC&display=swap');

html {
    box-sizing: border-box;
}

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

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

sup {
    line-height: 0;
}

.cf:before,
.cf:after {
    content: " ";
    display: table;
}

.cf:after {
    clear: both;
}

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

body {
    min-height: 100%;
    margin: 0;
    background: url(images/ghost.png) no-repeat left 5% center / 275px 275px fixed, 
                url(images/tombstone.png) no-repeat right 5% center / 275px 275px fixed,
                #000 linear-gradient(to bottom,  rgba(196,116,74,1) 0%,rgba(51,37,37,1) 100%) fixed;
}

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

.wrapper {
    border: 2px solid white;
    border-radius: 10px;
    background: #393B3D;
    margin-top: 4.625em;
    margin-bottom: 10px;
    width: 90%;
    margin-left: auto;
    margin-right: auto;
}

/**
 * .header-main fixed
 * - wrapper will slide under fixed nav
 * - attach to top, right and left edge of screen
 * - z-index is the stacking order - eg. layers in Photoshop
 * - larger higher in the stack / negative lower in the stack
 * - 100 is an arbitrary location with room below
 */
.header-main {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    background: #000 linear-gradient(to bottom, rgba(196,116,74,1), rgb(87 44 22));
    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% + 32px));
    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;
}

.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: '';
    border-radius: 3px;
}

.nav-main-menu-toggle-icon span {
    transition: all .5s ease-in;
}

.nav-main-menu-toggle-icon span::before,
.nav-main-menu-toggle-icon span::after {
    transition: top .5s ease-in,
                transform .75s .5s ease-in;
}

.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;
}

.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: 0;
}

.nav-main-menu-toggle:checked~.nav-main-menu-toggle-icon span::before {
    transform: rotate(-135deg);
}

.nav-main-menu-toggle:checked~.nav-main-menu-toggle-icon span::after {
    transform: rotate(135deg);
}

.nav-main-menu-toggle:not(:checked)~.nav-main-menu-toggle-icon span::before,
.nav-main-menu-toggle:not(:checked)~.nav-main-menu-toggle-icon span::after {
    transition: transform .75s ease-in,
                top .5s .75s ease-in;
}

.nav-main-menu-toggle:not(:checked)~.nav-main-menu-toggle-icon span {
    transition: all .5s .75s ease-in;
}

/* 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 .5s ease-in;
    background-color: hsla(210, 3%, 23%, 0.96);
    box-shadow: none;
    overflow-y: auto;
    margin: 0;
}

/* when input checked show the UL */
.nav-main-menu-toggle:checked~.nav-main-menu {
    width: 50vw;
    box-shadow: 0 0 0 100vw hsla(20, 60%, 21%, 0.30);

}

/* style the anchor */
.nav-main-menu a {
    position: relative;
    display: block;
    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;
}

/* create and style the anchor's ::before pseudo element */
.nav-main-menu a::before {
    position: absolute;
    z-index: -1;
    top: 0;
    bottom: 0;
    transform: translateX(-280%);
    content: "";
    display: inline-block;
    width: 10px;
    background: hsl(0, 0%, 100%);
    transition: inherit;
}

/* style anchor :hover */
.nav-main-menu a:hover {
    text-indent: 1.5rem;
    background: hsla(21, 51%, 53%, 0.4);
}

/* style the ::before when :hover on anchor */
.nav-main-menu a:hover::before {
    transform: translateX(100vw);
    opacity: 0;
}

/* End Navigation: Small Screen: 0px and UP */

/* .header-secondary */

header.header-secondary {
    display: flex;
    border-radius: 10px;
    border: 2px solid gray;
    margin: 20px;
    background: url(images/zombie-hand.png) no-repeat right bottom / 100px 100px,
                url(images/bats.png) no-repeat top 10px left 10px / 50px 50px,
                url(images/halloween-hero-sm.png) no-repeat center center / cover,
                #000 linear-gradient(to bottom,  rgba(196,116,74,1) 0%,rgba(51,37,37,1) 100%);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.8);
}

header.header-secondary h1 {
    line-height: 5;
    text-align: center;
    flex: 1 0 auto;
    margin: 0;
    color: #fff;
    font-family: "Myriad Pro Regular", sans-serif;
    font-weight: 200;
    letter-spacing: 4px;
    text-shadow: 0 -2px 2px rgba(0, 0, 0, 0.6);
    background: transparent linear-gradient(to bottom, hsl(0deg 62% 80% / 70%) 1px, hsl(21deg 51% 49% / 70%) 2px, hsla(218, 62%, 8%, 1.00));
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
}

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

section {
    overflow: hidden;
    margin: 20px;
    border: 2px solid white;
    border-radius: 10px;
    padding: 10px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.8);
    background: #fff linear-gradient(to bottom, rgba(196, 117, 74, 0.60) 3%, rgba(0, 0, 0, 0.90) 8%);
	color: white;
}

h2.section-header {
    margin: 85px 0 15px;
	font-family: 'Playfair Display SC', serif;
	font-size: 2.25rem;
}

p.section-paragraph {
    margin: 24px 10px 10px;
    line-height: 1.5;
    text-indent: 12px;
	font-family: 'Island Moments', cursive;
	font-size: 2rem;
}

img {
    width: 100%;
}

a.cta {
    display: inline-block;
    line-height: 3;
    padding: 0 2em;
    margin: 10px;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid hsl(0, 0%, 0%);
    color: hsl(0, 0%, 100%);
    box-shadow: 0px 2px 6px rgba(100,100,100,1);
    background: linear-gradient( to bottom, hsla(0, 0%, 100%, 0.8) 0px, rgba(196,116,74,1) 2px, rgba(51,37,37,1) );
    font-weight: bold;
}

a.cta:hover {
    box-shadow: none;
}

a.cta:active {
    box-shadow: inset 0 2px 4px hsl(0deg 0% 0%);
}

/* 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: transparent;
    border: 3px solid rgba(196,116,74,.5);
}

.cards .card-link {
    text-decoration: none;
    color: inherit;
    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: calc(100% + 20px);
    height: 200px;
    object-fit: cover;
    transform-origin: 80% 12%;
    transform: translateX(0) scale(1);
    transition: all 1.5s;
    filter: grayscale(100) blur(2px);
}

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

.cards .card-link:hover .card-figure-image {
    transform: translateX(10px) scale(1.05);
    filter: grayscale(0) blur(0px);
}

.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: 10px;
    background: white;
    overflow: hidden;
    margin: 0;
    border-radius: 0;
    box-shadow: none;
    transition: all .33s linear;
    color: black;
}

.cards .card-link:hover .card-section {
    box-shadow: inset 0 0 3px 6px rgba(0, 0, 0, 0.15);
}

.cards .card-section-title {
    margin-bottom: 0;
    border-bottom: 1px solid;
    padding-bottom: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 300;
}

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

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

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

.cards .card-section-excerpt {
    flex-grow: 1;
    font-family: 'Source Sans Pro', sans-serif;
}

.cards .card-section-button {
    align-self: flex-end;
    margin: 10px;
    padding: 0 1em;
    border-radius: .5em;
    border: 1px solid;
    line-height: 2;
    transition: all .25s linear;
    background: transparent;
    color: inherit;
}

.cards .card-section-button:hover {
    background: rgba(0, 0, 0, 0.085);
}

/* form */

.section-newsletter {
    background: transparent;
    border: none;
    padding: 0;
}

.callout {
    font-family: sans-serif;
    background: linear-gradient(30deg, rgba(87,44,22,1) 0%, rgba(196,116,74,1) 70%);
    padding: 12px;
}

.callout-heading {
    color: white;
    font-size: 3em;
    text-transform: uppercase;
    margin: 0 0 32px;
}

.callout-intro {
    color: white;
    font-size: 1.5em;
    margin: 0 0 16px;
}

.subscribe-newsletter {
    --color-white-20: hsla(0, 0%, 100%, 0.20);
    --color-white-40: hsla(0, 0%, 100%, 0.40);
    --color-white-60: hsla(0, 0%, 100%, 0.60);
    --color-white-80: hsla(0, 0%, 100%, 0.80);
    --color-black-20: hsla(0, 0%, 0%, 0.20);
    --color-black-40: hsla(0, 0%, 0%, 0.40);
    --color-black-60: hsla(0, 0%, 0%, 0.60);
    --color-black-80: hsla(0, 0%, 0%, 0.80);
    --color-button-dark: hsla(266, 47%, 30%, 1.00);
    --color-button-light: hsla(54, 86%, 58%, 1.00);
    --z-index: -1;
}

.subscribe-newsletter {
    transition: all 1s ease-in;
}

.subscribe-newsletter {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    overflow: hidden;
}

.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: 0 .5em;
    margin: 0;
    color: var(--color-button-dark);
}

.subscribe-newsletter input[type=email] {
    background: transparent;
    box-shadow: inset 0 0 0 2px white;
    margin: 10px 0;
}

.subscribe-newsletter input[type=email]:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px black;
}

.subscribe-newsletter input::placeholder {
    position: relative;
    color: white;
    opacity: .4;
}

.subscribe-newsletter input::placeholder {
    transition: all .5s ease-in;
    transform: scale(1);
    opacity: .4;
}

.subscribe-newsletter input:focus::placeholder {
    transform: scale(0);
    opacity: 0;
}

.subscribe-newsletter input:focus,
.subscribe-newsletter input:not(:focus) {
    color: white;
}

.subscribe-newsletter input[type=submit] {
    margin: 10px 0;
}

.subscribe-newsletter input[type=submit],
.subscribe-newsletter input[type=submit]:invalid {
    background: linear-gradient(45deg, rgba(147,141,255,0.4) 0%, rgba(0,200,241,0.5) 90%);
    font-weight: bold;
    text-transform: uppercase;
    transition: all .5s ease-in;
    text-indent: 0;
    color: hsl(0, 0%, 100%);
    border: 2px solid hsl(0, 0%, 100%);
    border-radius: 10px;
    box-shadow: 0px 0px 7px currentColor;
    background: transparent;
    margin: 15px 5px;
    transform: scale(1);
}

.subscribe-newsletter:valid input[type=submit] {
    animation: shake .125s;
    animation-iteration-count: 3;
    box-shadow: 0px 0px 7px black;
    border-radius: 5px;
    cursor: pointer;
}

/* animation for submit input when form is valid */
@keyframes shake {
    0% {
        transform: rotate(0deg);
    }
    
    33% {
       transform: rotate(-2deg); 
    }
    66% {
       transform: rotate(2deg); 
    }
    99% {
       transform: rotate(0deg); 
    }
}

.subscribe-newsletter fieldset input[type=submit]:disabled {
    background: var(--color-white-80);
    color: black;
    transform: scale(1);
    box-shadow: 0 0 0px 0px var(--color-black-60);
}

.subscribe-newsletter label {
    color: var(--color-white-80);
    line-height: 1.625em;
}

.subscribe-newsletter.sending {
    background: transparent;
}

.subscribe-newsletter.received {
    background: transparent;
}

.subscribe-newsletter .subscribe-newsletter-message-error {
    background: rgba(0, 0, 0, 0.4);
    width: 275px;
    padding: 5px 10px;
    border-radius: 5px;
}

.subscribe-newsletter .subscribe-newsletter-message-success {
    background: transparent;
    color: white;
    font-size: 1.6em;
    flex: 1;
    text-align: center;
    border: 2px solid white;
    transition: all .5s ease;
}

.subscribe-newsletter .subscribe-newsletter-message-success:hover {
    background: white;
    color: var(--color-button-dark);
    border-color: var(--color-button-dark);
}

footer {
    clear: both;
    overflow: auto;
    margin: 0 20px;
    padding: 0 0 20px;
    color: #fff;
}

footer a:first-child {
	color: white;
}

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

footer a[href^=http]: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: 48rem) {
    .container {
        width: 96%;
        max-width: 800px;
        margin: 20px auto;
    }
    
    .wrapper {
        width: 80%;
        max-width: 1000px;
    }
    
    h2.section-header {
        text-align: center;
    }
    
    /*  override size and position of header */
    .header-main {
        position: static;
        height: 120px;
        border-radius: 10px;
        border: 2px solid hsl(0, 0%, 50%);
        margin: 20px;
    }

    .header-main h1 {
        line-height: 120px;
        font-size: 2.75em;
        transform: translateX(-50%);
    }
    
    /*  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-between;
        position: relative;
        z-index: 0;
        top: auto;
        left: auto;
        width: auto;
        height: auto;
        transition: none;
        background-color: transparent;
        box-shadow: none;
        overflow: hidden;
        padding: 0 20px;
    }

    /*  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 rgba(255, 255, 255, 0.75);
        border-radius: 10px;
        transition: all .33s 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;
        background: transparent;
        color: hsl(0, 0%, 100%);
        box-shadow: inset 0 0px 4px transparent;
        border-color: rgba(196,116,74,1);
        font-weight: 300;
    }

    .nav-main-menu a:active {
        text-indent: 0;
        color: hsl(0, 0%, 100%);
        box-shadow: inset 0 0px 4px currentColor;
        border-color: rgba(255, 255, 255, 0.75);
    }

    header.header-secondary {
        height: 400px;
        background: url(images/zombie-hand.png) no-repeat right bottom -7px / 200px 200px,
                    url(images/bats.png) no-repeat top 10px left 10px / 100px 100px,
                    url(images/halloween-hero-sm.png) no-repeat center center / cover,
                    #000 linear-gradient(to bottom,  rgba(196,74,84,1) 0%,rgba(51,37,37,1) 100%);
    }

    /* line-height and font-size of 0 removes background color from secondary header */
    header.header-secondary h1 {
        line-height: 0;
        font-size: 0;
        align-self: flex-end;
        border-top-left-radius: 0px;
        border-top-right-radius: 0px;

    }
    
    .cards .card {
        flex: 0 0 calc(25% - 20px);
        flex: 0 0 calc(33.333% - 20px);
        flex: 0 0 calc(50% - 20px);
    }
    .cards .card:first-child {
        /* flex: 1 1 auto; */
    }
    .cards .card:nth-child(n+4) {
        /* flex: 0 0 calc(33.333% - 20px); */
    }
    
    .cards .card-link:hover .card-figure-image {
        transform: translateX(10px) scale(1);
        filter: grayscale(0) blur(0px);
    }
    
    .callout {
        padding: 80px;
    }
    
    .subscribe-newsletter input[type=submit] {
        width: 200px;
    }
    
    /* change location of svg on desktop screens */
    .subscribe-newsletter fieldset:last-child::after {
        background: url("images/loader-circles-spin.svg") no-repeat 66px;
    }

    img {
        width: auto;
        float: right;
        margin: 0 0 10px 10px;
    }
}
