@-ms-viewport {
    width: device-width;
}

@font-face {
    font-family: Daniel;
    src: url(fonts/Daniel-Regular.ttf);
    font-display: swap;
}

@font-face {
    font-family: Daniel;
    src: url(fonts/Daniel-Bold.ttf);
    font-weight: bold;
    font-display: swap;
}

@font-face {
    font-family: Daniel;
    src: url(fonts/Daniel-Black.ttf);
    font-weight: 900;
    font-display: swap;
}

@font-face {
    font-family: Veteran;
    src: url(fonts/VeteranTypewriter.ttf);
    font-display: swap;
}

@font-face {
    font-family: Montserrat;
    src: url(fonts/Montserrat-Regular.ttf);
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    text-decoration: none;
    list-style: none;
    box-sizing: border-box;
}

:root {
    --white: #fefefe;
    --lightgrey: #b0b0b0;
    --darkgrey: #151616;
    --orange: #e65100;
}

::placeholder {
    color: var(--lightgrey);
    opacity: 1;
}

html {
    font-size: 100%;
    scroll-behavior: smooth;
}

body {
    background-color: var(--white);
    font-family: "Montserrat", sans-serif;
    color: red;
}

a, a:hover, a:focus, a:active {
    color: inherit;
    text-decoration: none;
}

h1, h2, h3 {
    font-family: "Daniel";
}

h1 {
    font-size: 8vw;
    font-weight: bold;
}

h2 {
    font-size: 6.3rem;
    font-weight: normal;
    color: var(--darkgrey);
    text-shadow: 0px 2px 4px var(--darkgrey);
}

h3 {
    font-size: 3.8rem;
    font-weight: 900;
}

h3 span {
    font-family: "Daniel";
}

h4 {
    font-family: "Veteran";
    font-size: 2.5rem;
    font-weight: bold;
}

p {
    font-family: "Montserrat";
    font-size: 1.9rem;
    color: var(--darkgrey);
}

nav {
    padding: 0 10vw;
    width: 100%;
    height: 10vh;
    background-color: var(--white);
}

label.logo {
    line-height: 10vh;
    font-size: 2.2rem;
    color: var(--darkgrey);
}

label.logo img {
    width: 2.2rem;
    height: 2.2rem;
}

nav ul {
    float: right;
}

nav ul li {
    margin-left: 20px;
    display: inline-block;
    line-height: 10vh;
    color: var(--darkgrey);
}

nav ul li a {
    padding: 10px 10px 5px 10px;
    font-size: 2.2rem;
    color: var(--darkgrey);
}

nav a:active, nav a:hover {
    background-color: var(--darkgrey);
    color: var(--white);
    transition: .5s;
}

nav ul li:first-child {
    display: none;
}

.checkbtn {
    font-size: 2.2rem;
    color: var(--darkgrey);
    float: right;
    line-height: 10vh;
    cursor: pointer;
    display: none;
}

#returnToTop {
    font-size: 3rem;
    position: fixed;
    bottom: 5vw;
    right: 5vw;
    color: var(--orange);
}

.section {
    padding: 50px 10vw;
    width: 100%;
}

#firstSection {
    min-height: 90vh;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: auto auto;
    align-items: center;
    background-color: var(--white);
}

#profilePhoto {
    width: 100%;
    height: auto;
    grid-row: 1/2;
    grid-column: 2/3;
    text-align: center;
}

#profilePhoto img {
    max-width: 500px;
    height: auto;
    border: 20px solid white;
    box-shadow: 0px 2px 4px var(--lightgrey);
}

#profileName {
    width: 100%;
    text-align: center;
    color: var(--darkgrey);
    grid-row: 1/2;
    grid-column: 1/2;
}

.parallax {
    background-attachment: fixed;
}

#secondSection {
    background-image: url("img/blackboard.webp");
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#secondSection h2 {
    color: var(--white);
}

#secondSection p {
    color: var(--white);
    text-align: justify;
}

#thirdSection {
    background-color: var(--white);
}

#thirdSection h2 {
    color: var(--darkgrey);
}

.opera {
    margin-top: 30px;
    display: grid;
    grid-template-rows: max-content max-content auto;
    grid-template-columns: auto, auto;
    grid-template-areas: "cover1 bookTitle" "cover2 bookSynopsis" "cover3 buyOptions";
    column-gap: 3vw;
    row-gap: 2vw;
}

.bookCover {
    text-align: center;
    grid-row: 1/4;
    grid-column: 1/2;
}

.bookCover img {
    max-width: 500px;
    box-shadow: 0px 0px 30px var(--darkgrey);
}

.bookTitle {
    color: var(--darkgrey);
    grid-area: bookTitle;
}

.bookSynopsis {
    grid-area: bookSynopsis;
    font-size: 1.9rem;
    color: var(--darkgrey);
    text-align: justify;
}

.buyOptions {
    grid-area: buyOptions;
    text-align: left;
}

.buyButton {
    background: none;
    border: none;
    color: none;
    font: inherit;
    outline: none;
    padding: 0;
    cursor: pointer;
    margin: 0px;
}

.buyButton img {
    height: 80px;
    margin: 15px 30px 15px 0px;
}

#fourthSection {
    background-image: url("img/paper_texture_hot_white.webp");
    background-position: unset;
    background-repeat: repeat;
    background-size: unset;
}

#fourthSection h2 {
    color: var(--darkgrey);
}

#author {
    margin-top: 30px;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: auto auto;
    column-gap: 3vw;
    row-gap: 2vw;
    justify-items: center;
}

#authorRecap {
    grid-row: 1/2;
    grid-column: 1/2;
    color: var(--darkgrey);
    text-align: justify;
}

#authorPhoto {
    width: 100%;
    grid-row: 1/2;
    grid-column: 2/3;
    display: block;
    text-align: center;
}

#authorPhoto img {
    max-width: 500px;
    max-height: 100%;
    border: 20px solid white;
    box-shadow: 0px 2px 4px var(--darkgrey);
}

#contactSection {
    width: 100%;
    background-repeat: no-repeat;
    background-position: 75vw 80%;
    background-size: 14vw;
}

#contactSection h2 {
    color: var(--darkgrey);
}

#contactForm {
    display: grid;
    grid-template-rows: max-content max-content max-content max-content max-content;
    grid-template-columns: 1fr 1fr;
    row-gap: 20px;
    column-gap: 30px;
}

#contactName {
    grid-row: 1/2;
    grid-column: 1/2;
}

#contactEmail {
    grid-row: 1/2;
    grid-column: 2/3;
}

#contactSubject {
    grid-row: 2/3;
    grid-column: 1/3;
}

#contactMessage {
    grid-row: 3/4;
    grid-column: 1/3;
}

#privacyAgreement {
    grid-row: 4/5;
    grid-column: 1/3;
    padding: 0.5rem;
    width: 100%;
    background-color: var(--white);
    border: 1px solid var(--lightgrey);
    border-radius: 0px;
    font-size: 1.9rem;
    font-family: "Montserrat", sans-serif;
    color: var(--darkgrey);
    outline: none !important;
}

#contactSubmit {
    grid-row: 5/6;
    grid-column: 1/3;
}

.contactElement {
    width: 100%;
}

#contactSection label {
    display: block;
    color: var(--darkgrey);
    font-size: 2.2rem;
    padding-bottom: 5px;
}

#contactSection input, select, textarea, button {
    padding: 0.5rem;
    width: 100%;
    background-color: var(--white);
    border: 1px solid var(--lightgrey);
    border-radius: 0px;
    font-size: 1.9rem;
    font-family: "Montserrat", sans-serif;
    color: var(--darkgrey);
    outline: none !important;
}

#contactSection input:focus, select:focus, textarea:focus {
    border: 1px solid var(--darkgrey);
}

.contactButton {
    cursor: pointer;
    text-align: center;
    font-size: 2.2rem;
    text-align: center;
    border: 1px solid var(--darkgrey);
}

.contactButton:hover {
    background-color: var(--darkgrey);
    transition: 0.5s;
}

.contactButton span {
    cursor: pointer;
    display: inline-block;
    position: relative;
    transition: 0.5s;
}

.contactButton span:before {
    content: '\203a';
    position: absolute;
    opacity: 0;
    top: 0;
    right: -20px;
}

.contactButton:hover span {
    color: var(--white);
    transition: 0.5s;
    padding-right: 25px;
}

.contactButton:hover span:before {
    opacity: 1;
    right: 0;
}

.disabled {
    color: var(--lightgrey);
    cursor: not-allowed;
    text-align: center;
    font-size: 2.2rem;
    text-align: center;
    border: 1px solid var(--lightgrey);
    pointer-events: none;
}

/* Checkbox personalizzati */

/* Personalizzazione della label che fa da contenitore */

.customCheckbox {
    display: block;
    position: relative;
    padding-left: 35px;
    cursor: pointer;
}

/* Nascondere il checkbox di default del browser */
.customCheckbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

/* Creazione del checkbox personalizzato */
.checkmark {
   position: absolute;
   top: 9px;
   left: 0;
   height: 25px;
   width: 25px;
   background-color: var(--white);
   border: 1px solid var(--lightgrey); 
}

/* Al passaggio del mouse, cambiare colore del bordo */
.customCheckbox:hover input ~ .checkmark {
    border: 2px solid var(--darkgrey);
}

/* Quando la checkbox è flaggata, aggiungere uno sfondo arancione */
.customCheckbox input:checked ~ .checkmark {
    background-color: var(--white);
    border: 2px solid var(--darkgrey);
}

/*Creazione della spunta di selezione (nascosto quando non selezionato)*/
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

/* Mostra la spunta quando selezionato */
.customCheckbox input:checked ~ .checkmark:after {
    display: block;
}

/* Aspetto della spunta di selezione */
.customCheckbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid var(--orange);
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

.endSection {
    width: 100%;
    background-color: var(--darkgrey);
    padding: 0 10vw;
}

.endSectionContent {
    font-size: 1.3rem;
    display: grid;
    grid-template-rows: 1fr;
    grid-template-columns: 1fr 1fr 1fr;
}

.copyright {
    padding: 30px 0px;
    color: var(--white);
    text-align: left;
}

.terms {
    padding: 30px 0px;
}

.terms ul {
    list-style-type: none;
    text-align: center;
}

.terms li {
    color: var(--white);
}

.social {
    padding: 30px 0px;
    text-align: right;
}

.socialButton {
    max-width: 72px;
    max-height: 72px;
    width: 72px;
    height: 72px;
    background: none;
    border: none;
    color: var(--white);
    font: inherit;
    outline: none;
    padding: 0;
    cursor: pointer;
    margin: 10px;
}

.termsAndPrivacy {
    min-height: 100vh;
    text-align: justify;
}

.termsAndPrivacy h1,
.termsAndPrivacy h2,
.termsAndPrivacy h3,
.termsAndPrivacy h4 {
    font-family: "Montserrat", sans-serif;
    color: black;
    text-shadow: none;
    text-align: left;
    margin: 3rem 0 0.5rem 0;
}

.termsAndPrivacy h1 {
    margin: 0rem;
}

/*Media Queries 769-1279 per tablet e laptop*/

@media screen and (max-width: 1279px) {
    img {
        width: 100%;
        height: auto;
    }
    h1 {
        font-size: 12vw;
    }
    h2 {
        font-size: 6.3rem;
    }
    h3 {
        font-size: 3.8rem;
    }
    h4 {
        font-size: 2.5rem;
    }
    p {
        font-size: 1.8rem;
    }
    nav {
        padding: 0;
    }
    label.logo {
        padding-left: 5vw;
    }
    .checkbtn {
        padding-right: 5vw;
        display: block;
        z-index: 1;
    }
    nav ul {
        position: fixed;
        width: 100%;
        height: 100vh;
        background-color: rgba(21, 22, 22, 0.9);
        top: 0;
        right: -100%;
        text-align: center;
        transition: all .5s;
    }
    nav ul li:first-child {
        display: block;
        text-align: right;
        padding-right: 5vw;
    }
    nav ul li {
        margin: 0;
        display: block;
    }
    nav ul li a {
        color: var(--white);
    }
    nav a:hover, nav a:active {
        background: none;
        color: var(--white);
        text-shadow: 0 0 1rem var(--white);
    }
    .section {
        padding: 5vw;
    }

    .parallax {
        background-attachment: unset;
    }
    #firstSection {
        min-height: auto;
        display: block;
    }
    #profilePhoto {
        text-align: center;
    }
    #profileName {
        padding-top: 50px;
    }
    .opera {
        display: block;
    }
    .bookCover {
        margin: 50px auto;
    }
    .buyOptions {
        text-align: center;
        padding-top: 50px;
    }
    .buyButton {
        margin: 10px 0px;
    }
    .buyButton img {
        width: initial;
        height: 60px;
        margin: 0px 10px 50px 10px;
    }
    #author {
        margin: 0;
        display: block;
    }
    #authorPhoto {
        margin: 50px auto;
    }
    #contactForm {
        display: block;
    }
    #privacyAgreement {
        margin-bottom: 5px;
    }
    .endSectionContent {
        display: block;
    }
    .copyright {
        text-align: center;
    }
    .social {
        text-align: center;
    }
}

/*Media Queries 481-768 per tablet e smartphone più grandi*/

@media screen and (max-width: 768px) {
    h1 {
        font-size: 14vw;
    }
    h2 {
        font-size: 5.5rem;
    }
    h3 {
        font-size: 3.3rem;
    }
    h4 {
        font-size: 2.2rem;
    }
    p {
        font-size: 1.5rem;
    }
    .buyButton img {
        width: initial;
        height: 50px;
        margin: 0px 10px 50px 10px;
    }
}

/*Media Queries 0-480 per piccoli smartphone*/

@media screen and (max-width: 480px) {
    h1 {
        font-size: 16vw;
    }
    h2 {
        font-size: 3.7rem;
    }
    h3 {
        font-size: 2.2rem;
    }
    h4 {
        font-size: 1.5rem;
    }
    p {
        font-size: 1.2rem;
    }
    #contactSection label {
        font-size: 1.3rem;
        padding-top: 20px;
    }
    #contactName label {
        padding-top: 0px;
    }
    #contactSection input, select, textarea {
        font-size: 1.2rem;
    }
    .buyButton img {
        width: 100%;
        height: 40px;
        margin: 0px 0px 20px 0px;
    }
    #privacyAgreement label {
        padding-top: 0;
    }
}