:root {
  --text-color: #0c0d0d;
  --background-color: #f8fbf8;
  --box-color: #fcfcfc;
  --primary-color: #e9ca5f;
  --secondary-color: #e98b5f;
  --purple: #4f4e8d;
  --green: #8fbf8f;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'LibreCaslonCondensed';
    font-weight: 400;
    font-style: normal;
    src: url('./fonts/LibreCaslonCondensed-Regular.woff2') format('woff2');
}

@font-face {
  font-family: 'LibreCaslonCondensed';
    font-weight: 700;
    font-style: normal;
    src: url('./fonts/LibreCaslonCondensed-Bold.woff2') format('woff2');
}

i , .thin {
  font-family: 'LibreCaslonCondensedItalic'  !important;
  font-weight: 100;
}



body {
  position: relative;
  background-image: url('images/flowers.webp');
  background-size: contain;
  background-repeat: no-repeat;
  min-height: 100vh;
  padding: 4rem 0;
  background-position: center;
  background-color: var(--background-color);
  color: var(--text-color);
  font-family: 'LibreCaslonCondensed', serif;
  font-size: 1.2rem;
  line-height: 1.5;
  margin: 0;
  border: 10px double var(--text-color);
  /* border-image: url('images/border.png') 50 round; */
}


.container {
  max-width: 800px;
  margin: 1rem auto 0 auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'LibreCaslonCondensed', serif;
  font-weight: 700;
  line-height: 1.2;
}

p {
  font-family: 'LibreCaslonCondensed', serif;
}


header {
  text-align: center;
  margin-bottom: 0rem;
}

.intro {
  position: relative;
  margin-bottom: 1rem;
}

.books-illustration {
  width: 100%;
  max-width: 400px;
  height: auto;
  display: block;
  margin: 0 auto 0rem auto;
}

.intro p {
  position: absolute;
  top: 45%;
  left: 39%;
  max-width: 300px;
  text-wrap: balance;
  text-align: left;
  line-height: 1.6;
}

.intro p::first-letter {
 color: transparent;
 margin-left: -5px;
}

.butterfly {
  position: absolute;
  background-image: url('./images/butterfly.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  pointer-events: none;
  z-index: 10;
}

h1 {
  font-size: 2.5rem;
  margin: 0;
}

#story-list {
  max-width: 600px;
  margin: 0 auto;
  /* background-color: var(--background-color); */
  height: auto;
  padding: 1rem;
  border-radius: 8px;

}

.story-item {
  display: flex;
  align-items: baseline;
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.story-title {
  flex-shrink: 0;
}

.story-title a {
  color: var(--text-color);
  text-decoration: none;
  text-transform: lowercase;
  padding: 0.1em 0.4em;
  border: transparent dashed 2px;
  border-radius: 4px;
  font-weight: 400;
}

.story-title a::first-letter {
  text-transform: uppercase;
}



.dots {
  flex-grow: 1;
  margin: 0 0.5rem;
  border-bottom: 1px dashed var(--text-color);
  height: 0;
  opacity: 0.6;
}

.typesetter {
  flex-shrink: 0;
  font-size: 0.9rem;
  text-transform: lowercase;
  opacity: 0.8;
  font-style: italic;
}

.typesetter::first-letter {
  text-transform: uppercase;
}

.butterfly-1 {
  width: 35px; height: 35px;
  top: 81px; left: 12%;
  transform: rotate(127deg);
}
.butterfly-2 {
  width: 28px; height: 28px;
  bottom: 73px; right: 38%;
  transform: rotate(-87deg);
}
.butterfly-3 {
  width: 28px;
  height: 28px;
  left:5%;
  transform: rotate(25deg) scale(1.9);
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    margin: 2rem 0;
    padding: 1rem;
    font-size: 1.1rem;
  }

  .container {
    margin: 1rem auto 0 auto;
  }

  h1 {
    font-size: 2rem;
    line-height: 1.3;
  }

  .books-illustration {
    max-width: 350px;
  }

  .intro p {
    position: absolute;
    top: 42%;
    left: 56%;
    transform: translateX(-50%);
    max-width: 280px;
    text-wrap: balance;
    text-align: left;
  }

  .intro p::first-letter {
    color: transparent;
    margin-left: -5px;
  }

  #story-list {
    margin-top: 2rem;
    padding: 0 1rem;
  }

  .story-item {
    margin-bottom: 1rem;
  }

  /* Hide butterflies on mobile for cleaner look */
  .butterfly {
    display: none;
  }
}

@media (max-width: 480px) {
  body {
    font-size: 1rem;
    margin: 0;
  }

  h1 {
    font-size: 1.8rem;
  }

  .books-illustration {
    max-width: 280px;
  }

  .intro p {
    font-size: 0.95rem;
    line-height: 1.5;
    top: 42%;
    left: 56%;
    transform: translateX(-50%);
    max-width: 300px;

  }

  #story-list {
    margin-top: -10%;
  }

  .story-item {
    flex-direction: row;
    align-items: flex-end;
    margin-bottom: 1.5rem;
  }

  /* .dots {
    display: none;
  } */
  .container {
    margin: 2rem 0 6rem auto;
  }

  .typesetter {
    margin-top: 0.3rem;
    font-size: 0.85rem;
  }
}
 a:not(.story-item a) {
  background-color: var(--primary-color);
color: var(--text-color);
padding: 0.1em 0.4em;
border-radius: 4px;
border: transparent 2px solid;

text-underline-offset: 2px;
 }

 a:hover,
 a:active,
 a:focus {
  border: #0c0d0d 2px dashed !important;
  outline: none ;
 }


footer {
  max-width: 200px;
  margin: 5rem auto;
  font-size: 12px;
  text-align: center;
  padding: 1em 0;
}

footer::before {
  content: '';
  display: block;
  width: auto;
  height: 40px;
  margin: 0 auto 1rem auto;
  background-image: url('images/divider.png');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.7;
}

footer a {
  padding: 0.01em 0.4em !important;
  border-radius: 3px !important;
}