:root {

--clr-background-body : white;
--clr-background-form: #fdc92e;
--clr-background-favola : #eae7dc;
--clr-background-featured : #d8c3a5;

--clr-featured: #ffffff;
--clr-favola: #5c5a56;
--clr-titolo: #e98074;
--clr-accent: #e85a4f;
--clr: #333;

--border-radius-favola : 0;
--image-invert-perc : 0;

--font-family-main: 'Roboto Light', Arial, Helvetica, sans-serif;
--font-family-titolo: "Yeseva One", cursive;
--font-family-favola: 'Playfair Display', serif;

--font-style-favola: none;

--font-size-first-letter: 1.75em;
--font-size-titolo: 2.2em;

--font-weight-first-letter: 700;
--font-weight-titolo: 400;
--font-weight-grassetto: 700;


}


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

  * {
    margin: 0;
  }

  html, body {
    height: 100%;
  }

  body {
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
  }

  img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
  }

  input, button, textarea, select {
    font: inherit;
  }

  p, h1, h2, h3, h4, h5, h6 {
    overflow-wrap: break-word;
  }
 
  #root, #__next {
    isolation: isolate;
  }

  body {
    font-family: var(--font-family-main);
    background: var(--clr-background-body);
    font-size: 0.85rem;
    color: var(--clr);
  }
  
  .info_block {
    max-width: 60rem;
    margin-inline: auto;
    display:grid;
    gap: 1rem;
  }

  .info h2 {
    font-size: 1rem;
  }

  .info p {
    padding-block: 1rem;
    text-align: justify;
    text-justify: auto;
  }

  .loader {
    /*background: rgb(0 0 0 / .5);*/
    width: 100%;
    height: 100vh;
    position: fixed;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 2;
    font-size: .75rem;
    visibility: hidden;
  }

  .spinner {
    background: white;
    min-width: 20rem;
    aspect-ratio: 1/1;
    display: grid;
    flex-grow: 0;
    place-content: center;
    border-radius: 50%;
  }

  .spinner img {
    max-width: 60px;
    display: inline-block;
    justify-self: center;

  }

  header {
    display: flex;
    top: 0;
    width: 100%;
    height: 8em;
    padding: 2em;
    position: fixed;
    overflow: hidden;
    background: var(--clr-background-body);
    align-items: center;
    justify-content: space-between;
    z-index: 998;
  }

  nav ul {
    display: flex;
    flex-direction: column;
    color: var(--clr-titolo);
    list-style: none;
    justify-self: flex-end;
    font-size: .8rem;
    text-transform: uppercase;
    text-weight:var(--font-weight-grassetto); 
 }

  nav ul li {
    padding: 0.125rem;
  }


  nav ul a:link, a:visited, a:hover, a:active {
    text-decoration: none;
    color: var(--clr-titolo);
  }

  .secondario {
    display: none;
  }
  
  
  main {
    margin-top: 10em;
  }

  .container {
    max-width: 100rem;
    margin-inline: auto;
    padding-inline: 2rem;
  }

  .titolo {
    font-family: var(--font-family-titolo);
    font-size: var(--font-size-titolo);
    font-weight: var(--font-weight-titolo);
    color: var(--clr-titolo);
  }

  .favole {
    display: grid;
    gap: 2rem;
  }

  @media (min-width: 40em) {
    .favole {
      grid-template-columns: repeat(2, 1fr);
    }

    .info_block {
      grid-template-columns: repeat(2, 1fr);
    }

    .info_block > div:nth-child(3) {
      grid-column: span 2;
    }

    nav ul {
      flex-direction: row;
    }
   
    nav ul li {
      padding: 1rem;
    }

    .secondario {
      display: list-item;
    }

  }

  @media (min-width: 50em) {

   nav ul li::after {
      content: '  |  ';
   }

 }

  @media (min-width: 60em) {
    .favole {
      grid-template-columns: repeat(3, 1fr);
    }

    .info_block {
      grid-template-columns: repeat(3, 1fr);
    }

    .info_block > div:nth-child(3) {
      grid-column: span 1;
    }

  }

  .favola {
    position: relative;
    display: flex;
    overflow: hidden;
    background: var(--clr-background-favola);
    gap: 0.5em;
    border-radius: var(--border-radius-favola);
    color: var(--clr-favola);
    box-shadow: 2px 2px 10px 2px rgb(.8 .8 .8 / .3); 
    z-index: 0;
  }

  .favola:nth-child(2) {
    background: var(--clr-accent);
    color: var(--clr-featured);
  }

  
  .favola:nth-child(2) .testo::first-letter {
    color: var(--clr-featured);
  }

  a.morte {
    z-index: 999;
    padding-inline: 0.5rem;;
  }

  a.morte:link, a.morte:visited, a.morte:hover, a.morte:active {
    text-decoration: none;
    color: black;
    font-size: 1.5rem;
  }

  @media (max-width: 90em){  
    .favola {
      flex-direction: column;
    }
  }

  /*
  .domanda {
    position: absolute;
    top: 0;
    left: 0;
    padding: 1em 0.5em;
    width: 100%;
    color: black;
    background: rgba(255,255,255,0.75);
    transform: translateY(-100%);
    transition: transform 350ms ease;
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 700;
    text-justify: center;
    z-index: 1;
  }


  .favola:hover .domanda {
    transform: translateY(0);
  }

  */

  .domanda {
    visibility: hidden;
  }

  .form {
    display: grid;
    background: var(--clr-background-form);
    padding: 1em;
    max-height: 30em;
  }

  .form p {
    padding-block: .5em;
  }

  .input {
    justify-self: start;
    align-self: end;
  }

   #modulo {
     background: var(--clr-background-form);
     border-radius: 0.125rem;
     border: 1px solid white;
     border: none;
     margin-left: 5px;
     box-shadow: 1px 1px 5px 1px rgba(0,0,0,0.3);
   }

   #modulo:hover {
     border: 1px solid white;
   }

   #modulo:active {
    background: var(--clr-accent);
    box-shadow: 0 0 5px 1px rgba(0,0,0,0.3);
}

  .testo {
    padding: 1em;
    font-family: var(--font-family-favola);
    font-style: var(--font-style-favola);
  }

  .testo::first-letter {
    color: var(--clr-accent);
    font-size: var(--font-size-first-letter);
    font-weight: var(--font-weight-first-letter);
    letter-spacing: 0.125rem;
    text-transform: uppercase;
  }

  .illustrazione {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 150px;
    object-fit: cover;
    align-self: start;
    margin: 1em;
  }
 
  footer {
   display: flex;
   position: sticky;
   bottom: 0;
   width: 100%;
   min-height: 1.5rem;
   background: var(--clr-background-body);
   padding-inline: 2rem;  
}

  
