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

html {
  font-size: clamp(16px, 0.9vw + 6px, 34px);
  background-color: #f1ece5;
  background-image:
    url("images/background.jpg"),
    linear-gradient(#f1ece5 0%, #ebe3da 35%, #c9a9a2 55%, #8a6664 68%, #3a2c2b 80%, #161111 100%);
  background-size: 100% 100%;
  background-repeat: no-repeat;
  min-height: 100vh;
}

body {
  margin: 0;
  padding: 0 5vw 4rem;
  font-family: "Baskervville", Baskerville, Georgia, serif;
  font-size: 1rem;
  line-height: 1.7;
  color: #2b2322;
}

h1,
h2,
.quote,
p.center {
  font-family: "Cormorant Upright", "Cormorant", Georgia, serif;
  font-weight: 500;
}

.quote,
p.center {
  font-size: 1.2em;
  line-height: 1.5;
}

img {
  max-width: 100%;
  height: auto;
}



header img,
main img,
footer img {
  opacity: 0.6 !important;
  filter: sepia(0.7) saturate(0.4) contrast(0.75) brightness(1.1) blur(0.4px);
  mix-blend-mode: multiply;
}

.light img {
  mix-blend-mode: normal;
  opacity: 0.6 !important;
}



header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  padding-top: 3vw;
}

h1 {
  font-size: clamp(3rem, 7vw, 9rem);
  margin: 0;
  line-height: 1.05;
}

.author {
  font-size: 1.4rem;
  letter-spacing: 0.2em;
  margin-top: 0.8rem;
}

.top-butterfly {
  width: clamp(7rem, 14vw, 20rem);
  flex-shrink: 0;
  transform: translate(-45vw, 1rem) rotate(-15deg);
  transition: transform 2s ease-in-out;
}

.top-butterfly.home {
  transform: translate(4vw, -2vw) rotate(0deg);
}



.row {
  display: flex;
  align-items: center;
  gap: 5vw;
  margin: 6vw 0;
}

.side {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}

.text {
  flex: 2 1 0;
  min-width: 0;
  font-size: 1.8rem;
}

.side img {
  display: block;
  width: 100%;
  margin: 0 auto 2.5vw;
}

.side img:last-child {
  margin-bottom: 0;
}



h2 {
  text-align: center;
  font-size: clamp(2.2rem, 4.5vw, 6rem);
  line-height: 1.2;
  margin: 7vw 0 1rem;
}

h2::after {
  content: "";
  display: block;
  width: 3.5rem;
  height: 2px;
  background: currentColor;
  margin: 1.2rem auto;
}

h2 + .center {
  font-size: 2.4rem;
}



.time-title {
  opacity: 0;
  filter: blur(8px);
  letter-spacing: 0.4em;
  transition: opacity 2.5s ease, filter 2.5s ease, letter-spacing 2.5s ease;
}

.time-title.show {
  opacity: 1;
  filter: blur(0);
  letter-spacing: normal;
}

.time-title::after {
  width: 0;
  transition: width 2s ease 1s;
}

.time-title.show::after {
  width: 3.5rem;
}

@media (prefers-reduced-motion: reduce) {
  .time-title,
  .time-title::after {
    transition: none;
  }
}



.flower-wrap {
  position: relative;
}

.flowers {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3vw;
  margin: 4vw 0;
}

.flower {
  min-width: 0;
  text-align: center;
}

.flower img {
  width: 100%;
  height: clamp(9rem, 16vw, 26rem);
  object-fit: contain;
  margin-bottom: 2rem;
}

.flower p {
  font-size: 2.2rem;
  line-height: 1.5;
  margin-top: 0;
}



.flying-butterfly {
  position: absolute;
  top: 100%;
  left: 0;
  width: 5rem;
  z-index: 2;
  pointer-events: none;
  animation: flyAcross 1s linear paused both;
  animation-delay: calc(var(--p, 0) * -1s);
}

@keyframes flyAcross {
  0%   { translate: 0 2rem;       rotate: 15deg; }
  25%  { translate: 20vw 0rem;    rotate: -10deg; }
  50%  { translate: 40vw 3rem;    rotate: 12deg; }
  75%  { translate: 60vw 1rem;    rotate: -8deg; }
  100% { translate: 80vw 2.5rem;  rotate: 5deg; }
}



.center {
  text-align: center;
}

.small-img {
  width: 75%;
  display: block;
  margin: 2vw auto;
}

.text .small-img {
  width: 55%;
}



.quote {
  border: 1px solid rgba(138, 116, 112, 0.6);
  border-radius: 10px;
  padding: 1.4rem 1.8rem;
  margin: 2rem 0;
  font-size: 1.05em;
  background: rgba(255, 252, 247, 0.45);
  box-shadow:
    0 1px 2px rgba(43, 35, 34, 0.08),
    0 4px 8px rgba(43, 35, 34, 0.10),
    0 14px 30px rgba(43, 35, 34, 0.18);
}

.light {
  color: #eee3dc;
}

.light .quote {
  border-color: rgba(238, 227, 220, 0.5);
  background: rgba(255, 255, 255, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 4px 10px rgba(0, 0, 0, 0.35),
    0 18px 40px rgba(0, 0, 0, 0.5);
}


.pull-left {
  margin-right: 18%;
}

.pull-right {
  margin-left: 18%;
  text-align: right;
}



footer {
  text-align: center;
  padding: 4vw 0;
}

footer img {
  width: clamp(14rem, 30vw, 36rem);
  margin: 0 auto;
}



@media (max-width: 950px) {
  .row {
    flex-direction: column;
    gap: 2.5rem;
  }

  .side,
  .text {
    flex: none;
    width: 100%;
  }

  .text,
  h2 + .center {
    font-size: 1.6rem;
  }

  .flower p {
    font-size: 1.4rem;
  }

  .side img {
    max-width: 28rem;
  }

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

  .flower img {
    height: 12rem;
  }

  .pull-left,
  .pull-right {
    margin-left: 0;
    margin-right: 0;
  }
}



@media (max-width: 700px) {
  header {
    flex-direction: column;
    text-align: center;
  }

  .top-butterfly,
  .top-butterfly.home {
    transform: none;
  }

  .author {
    font-size: 1.1rem;
  }

  .text,
  h2 + .center {
    font-size: 1.25rem;
  }

  .flower p {
    font-size: 1.15rem;
  }

  .flowers {
    grid-template-columns: 1fr;
  }

  .flower img {
    height: auto;
    max-height: 15rem;
  }

  .side img {
    max-width: 20rem;
  }

  .divider-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 5rem 0;
  }

  .butterfly-divider {
    width: 800px !important;
    max-width: 80vw !important;
    height: auto;
    margin: 0 !important;
  }
}

.next-story {
  width: 100%;
  text-align: center;
  padding: 6rem 5vw;
  color: #f3e7d3;
}
.next-story h2 {
  color: #f3e7d3;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.next-intro {
  color: #f3e7d3;
  text-align: center;
  font-size: 1.6rem;
  margin: 0 auto 3rem;
}

.story-choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 1400px;
  margin: 3rem auto 0;
  gap: 3rem;
  align-items: start;
  text-align: center;
}

.story-choices a,
.story-choices a:link,
.story-choices a:visited,
.story-choices a:active {
  display: block;
  color: #f3e7d3;
  text-decoration: none;
  text-align: center;
  font-family: "Cormorant Upright", "Cormorant", Georgia, serif;
  font-size: 2.8rem;
  line-height: 1.25;
}
.story-choices a:hover {
  color: white;
  text-decoration: none;
}
