:root {
    --gray: #404040;
    --gold: #af8e45;
    --tan: #efe8da;
    --serif: 'PT Serif', Portrait, Times New Roman, serif;
    --sans: 'Open Sans', Verdana, Arial, sans-serif;
}

* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

html, body {
    font-family: var(--sans);
	font-size: 12px;
	color: black;
	font-weight: 400;
    margin: auto;
    padding: 0;
}

a {
	color: var(--tan);
    font-weight: bold;
	transition: all .2s;
}

a:hover {
	
}

hr {
    margin: 2em auto;
    padding: 0;
    border: none;
    height: 1px;
    background: #CCC;
    
}

main {
    width: 100%;
	box-sizing: border-box;
	margin: 0 auto;
    clear: both;
}

main:after {
    content: '';
    display: block;
    clear: both;
}


/***************************

MAIN BOOK SECTIONS

****************************/

.section {
    width: 100%;
    max-width: 100rem;
    margin: auto;
}

.section:after {
    content: '';
    display: block;
    clear: both;
}



/***************************

TITLE + AUTHOR

****************************/

h1, h2, h3 {
	margin: auto;
    font-weight: normal;
    line-height: 1.1em;
}

header {
    background: black url('../img/spiration-dark.png');
    color: white;
	text-align: center;
	margin: auto;
    padding: 4em 0;
}

header h1, header h2 {
    text-transform: uppercase;
}

/* AUTHOR */

header h1 {
    font-family: var(--serif);
    letter-spacing: .1em;
    font-size: 8em;
}

/* SUBTITLE */

header h2 {
    font-size: 1.5em;
    letter-spacing: .2em;
}


/* SUBTITLE */

header h3 {
    text-transform: uppercase;
    font-size: 1.5em;
    letter-spacing: .5em;
    margin: 1em 0;
}


#book {
    background: var(--tan);
}

#book .section {
    padding: 4em 10em 2em 7em;
    text-align: center;
}

#tp {
    background: var(--gold) url('../img/spiration-gold.png');
}

#tp .section {
    padding: 4em 5em 2em 22em;
    text-align: center;
}

/* LEFT MARGIN: Bookshot width + 3em */

#book .buylinks, #book .desc, #book h1.title {
    margin-left: 33rem;
}

#tp .buylinks, #tp .desc, #tp h1.title {
    margin-right: 23rem;
}


#book h1.title {
    font-size: 5em;
    font-family: var(--serif);
    text-transform: uppercase;
    display: block;
    text-align: center;
    letter-spacing: .05em;
    
}

#tp h1.title {
    font-size: 4em;
    font-family: var(--serif);
    text-transform: uppercase;
    display: block;
    text-align: center;
    letter-spacing: .05em;
    margin-top: .25em;
    margin-bottom: .5em;
    
}

/***************************

BOOK JACKET 

****************************/

#book picture {
    display: block;
    float: left;
    width: 28em;
    margin: auto;
}

#book picture img {
    display: block;
	width: 100%;
	max-width: 600px;
	height: auto;
}

#tp picture {
    float: right;
    width: 18em;
    margin: 0 0 0 5em;
}

#tp picture img {
	width: 100%;
	max-width: 600px;
	height: auto;
}

/***************************

BUY LINKS 

***************************/

.buylinks {
    padding: 2em 0 .5em;
    margin-top: 2em;
    margin-bottom: 2em;
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
}

#tp .buylinks {
    border-color: var(--tan);
    margin-top: 1em;
    margin-bottom: 1em;
}

.buylinks h1, .buylinks h2 {
    display: inline-block; 
    text-transform: uppercase;
	font-size: 1.25em;
    letter-spacing: .05em;
    font-weight: bold;
}

.buylinks h2:after { /* Add bullet after On Sale Date */
    margin: .5em;
    content: '\2022'; 
}

.buylinks ul {
	padding: 0; /* Removes list indent */
	list-style-type: none;
	display: flex;
	flex-flow: wrap;
	justify-content: space-between;
    text-align: center;
}

.buylinks li {
	display: flex;
	flex: 0 1 32%; /* Three buttons per line */
    margin-bottom: 1em;
    overflow: hidden;
}

#book .buylinks li {
    flex: 0 1 24%;
}

.buylinks li a {
    color: black;
	width: 100%;
	padding: 1em .5em;
	background: var(--tan);
	text-decoration: none;
	border: 2px solid var(--gold);
    border-radius: 5em;
    font-weight: bold;
    white-space: nowrap;
}

.buylinks li a:before {
    color: var(--gray);
}

.buylinks li a:hover {
	background: var(--gold);
    color: var(--tan);
    border-color: var(--tan);
}


/***************************

DESCRIPTION

****************************/

#book .desc h1 {
    font-family: var(--serif);
    font-size: 3em;
    
}

#book .desc p {
    line-height: 1.5em;
    font-size: 1.5em;
}

#tp .desc p {
    font-size: 1.5em;
}

/***************************

SOCIAL MEDIA

****************************/


#social {
    background: var(--colorA);
    text-align: center;
    padding: 4em 0;
 
}

#social h1 {
    font-family: var(--serif);
    font-size: 2em;
    letter-spacing: .2em;
    margin-bottom: 1em;
    text-transform: uppercase;
}
#social a {
     font-size: 1.5em;
    text-decoration: none; 
    display: inline-block;
    margin: 0 1em;
}

#social a:hover {
    text-decoration: underline;
}

#social .social img {
    height: .75em;
    vertical-align: ;
}

/***************************

NEWSLETTER

****************************/

#newsletter {
    color: white;
    padding: 4em 0 5em;
    text-align: center;
    background: black url('../img/spiration-dark.png');
}

#newsletter h1 {
 font-family: var(--serif);
    text-transform: uppercase;
    color: var(--gold);
    letter-spacing: .05em;
    font-size: 3em;
    line-height: 1.25em;
    }

#newsletter p {
    font-size: 1.5em;
}

#newsletter form {
    margin-top: 1em;
}

#newsletter .email input , #newsletter form .country select, #newsletter form #submit {
    font-size: 1.25em;
    font-family: var(--sans), sans-serif;
}

#newsletter form .email, #newsletter form .country {
    display: inline-block;
    margin-bottom: 1em;
}

#newsletter form label {
    font-weight: bold;
    color: var(--gold);
    display: block;
    margin-bottom: .5em;
    text-align: left;
    text-transform: uppercase;
    
}

#newsletter form .email input, #newsletter form .country select {
    font-family: var(--sans), sans-serif;
    padding: .5rem 1.5rem;
    border: 1px solid var(--gold);
    border-radius: 2em;
    outline: none;
    margin-right: 1rem;
}

#newsletter form .country select {
    background-color: var(--tan); 
    width: 12em;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gold) 50%),
    linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position:
    calc(100% - 1.5em) center,
    calc(100% - 1em) center;
  background-size:
    .5em .5em,
    .5em .5em;
  background-repeat: no-repeat;
}

#newsletter form select::-ms-expand {
     display: none;
}

#newsletter form .email input {
    width: 30em;
    background-color: var(--tan); 
}

::placeholder {
  color: var(--gold);
}

#newsletter form #submit {
    font-weight: bold;
    display: inline-block;
    vertical-align: bottom;
    padding: .5rem .5rem;
    background: var(--gold);
    color: white;
    font-size: 1.25em;
    border: 1px solid var(--gold);
    border-radius: 2em;
    width: 10em;
    cursor: pointer;
    transition: .5s;
    margin-bottom: 1rem;
}

#newsletter form #submit:hover {
    background: transparent;
    color: var(--gold);
}

#newsletter form #submit.nocountry {
    pointer-events: none;
    background: transparent;
    border-color: var(--gray);
    color: var(--gray);
}

#countryrules {
    font-size: 1.25em;
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin: 1em auto 2em;
}

#newsletter #countryrules div {
    display: none;
    
}

#thanks {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

#thanks section {
    text-align: center;
    background: var(--tan);
}

#thanks section .section {
    padding: 4em 0;
}

#thanks section h1 {
    font-family: var(--serif);
    font-size: 3em;
    color: var(--dark);
}

#thanks p {
    font-size: 1.5em;
}

#thanks section .section a {
    color: var(--gold);
}


#thanks footer {
    flex: 1;
    width: 100%;
}


/***************************

FOOTER & COPYRIGHT

****************************/

footer {
    background: var(--gray);
    color: white;
	text-align: center;
	margin: 0 auto 0;
    padding: 2em 0;
}

#logo {
    display: block;
	width: 4em;
	margin: .5em auto;
}

#logo img {
    width: 100%;
}

/*!!!!!!!!!!!!!!!!!!!!!!

MEDIA QUERIES

!!!!!!!!!!!!!!!!!!!!!!*/


/* Medium Desktop & Landscape iPad */ 

@media only screen and (max-width: 1200px) {
	
    #book .section {
    padding: 4em 2em 2em;
}

#tp .section {
    padding: 4em 2em 2em;
}

/* LEFT MARGIN: Bookshot width + 3em */

#book .buylinks, #book .desc, #book h1.title {
    margin-left: 30rem;
}

#tp .buylinks, #tp .desc, #tp h1.title {
    margin-right: 22rem;
}
}

/* Medium Desktop & Landscape iPad */ 

@media only screen and (max-width: 1024px) {
	
    html, body {
        font-size: 10px;
    }
}
    
/* Small Desktop & Portrait iPad */ 
    
@media only screen and (max-width: 800px) {
    
    body,html {
        font-size: 12px;
    }
	
    header {
        padding: 5vw;
    }
    
    header h1 {
        font-size: 10vw;
    }
        
    #book picture {
        width: 20em; /* Smaller Bookshot */
        margin-right: 3em;
    }
	
    #book h1.title {
        margin: auto;
        font-size: 6vw;
    }
    #tp h1.title {
        margin: auto;
        font-size: 5vw;
    }

    #book .buylinks {
    margin-left: 23em;  /* LEFT MARGIN: Bookshot width + 2em */
}
    
    #book .desc {
        margin-left: 0; /* LEFT MARGIN: Book Wrap */
        clear: both;
    }
    
    .buylinks h1, .buylinks h2 {
        display: block;
        line-height: 1.25em;
        font-size: 1.5em;
    }
    
    .buylinks h2 {
        font-weight: normal;
    }
    
    .buylinks h2:after {
        display: none;
    }
	
}

/* Mobile Device */ 
    
@media only screen and (max-width: 600px) {
    
    
    header h2 {
        font-size: 1em; /* responsive author font */
    }
    
    
    
    #book .buylinks, #book .desc { /* Remove book float */
        margin: 0;
    }
    
    #book .buylinks {
        order: 4;
        border-bottom: 0;
    }
    
    
    /* Reorder book details for mobile */
    
    #book .section, #tp .section {
        display: flex;
        flex-flow: wrap;
        padding: 5vw;
    }
    
    
    /* Option 1: Move buylinks next to bookshot */
      
    #book h1.title {
        order: -1;
        flex: 0 1 100%;
        font-size: 8vw;
        margin: 0 auto .25em;
        color: var(--gold);
        border-bottom: 2px solid var(--gold);
        padding-bottom: 2.5vw;
    }
    
    .buylinks li, #book .buylinks li {
        flex: 0 1 49%;
    }
    
    
    #book picture { 
        float: none;
        order: 2;
        margin: 0 5vw 0 0;
        flex: 1.25;
        align-self: center;
    }
    
    #tp .section {
        padding: 5vw 5vw 0;
    }
    
    
    #tp h1.title {
        order: 1;
        font-size: 8vw;
        border-bottom: 2px solid var(--tan);
        padding-bottom: 2.5vw;
        flex: 0 1 100%;
        margin-bottom: 2.5vw;
    }
    
    #tp picture { 
        float: none;
        order: 3;
        flex: 0 0 30%;
        margin: 0 auto 2.5vw;
    }
    
    #tp .desc {
        order: 2;
        flex: 0 0 100%;
        margin: 0 ;
        padding: 0;
    }
    
    #tp .desc p {
        margin: 0 0 2.5vw 0;
        text-transform: uppercase;
        font-weight: bold;
        color: var(--tan);
        
    }
    
   
    
    #tp .buylinks {
        order: 4;
        margin: 0;
        border-bottom: 0;
    }
   
    
    
    #book .desc {
        order: 3;
        flex: 2;
        text-align: left;
        padding: 5vw 0;
    }
    
    #book .desc h1 {
        font-size: 1.75em;
    }
    
    #book .desc p {
        font-size: 1.16em;
    }
    
    #book .desc br {
        display: none;
    }
    
    
    #newsletter {
        padding: 5vw;
    }
    
     #newsletter form {
        text-align: left;
        display: block;
    }
    
    
   
    
     #newsletter form .email {
        width: 100%;
         margin-bottom: 1.5em;
    }
    
    #newsletter form .email input {
        width: 100%;
        margin-right: 0;
    }
   
    
}