/* font imports */
@font-face {
  font-family: "Lantern";
  src: url("BeastVF.ttf") format("truetype");
}

@font-face {
  font-family: "LibreBaskerville";
  src: url("LibreBaskerville-Regular.ttf") format("truetype");
}

@font-face {
  font-family: "Fern";
  src: url("FernOrnaments-Regular.otf") format("truetype");
}

/* whole page*/
body {
  margin: 0;
  padding: 0;
  background-color: #bbe774;
  overflow-x: hidden;
  overflow-y: auto;
}

/* navigation buttons */
.navigation-button {
  font-family: "LibreBaskerville";
  font-size: 14px;
  color: #bbe774;
  text-decoration: none;
  padding: 15px 30px;
  border: 2px solid #bbe774;
  border-radius: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
  letter-spacing: 1px;
  white-space: nowrap;
  position: absolute;
  z-index: 10;
}

.navigation-button:hover {
  border: 2px solid #e1543c;
  color: #e1543c;
}

.nav-left {
  left: 50px;
  top: 50%;
  transform: translateY(-50%);
}

.nav-right {
  right: 50px;
  top: 50%;
  transform: translateY(-50%);
}

/* cover page */
.cover {
  position: relative;
  height: 100vh;
  width: 100vw;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  transition: background-image 1s ease-in-out;
}

.cover-text {
  font-family: "Lantern";
  font-size: 15vw;
  color: rgb(255, 255, 255);
  line-height: 1;
  margin: 0;
  letter-spacing: 20px;
  text-align: center;
  font-weight: normal;
  animation: fontGrow 4s ease-in-out infinite alternate;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

@keyframes fontGrow {
  from { font-variation-settings: "GROW" 0; }
  to { font-variation-settings: "GROW" 100; }
}

/* intro section */
.intro-section {
  background-color: #19231f;
  width: 100vw;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 40px 20px;
  box-sizing: border-box;
}

/* ornamental line */
.ornament-line {
  width: 90%;
  position: relative;
  text-align: center;
  border-top: 1px solid #cef2ad;
  margin: 10px 0;
}

.ornament-line.bottom-line {
  border-top: none;
  border-bottom: 1px solid #cef2ad;
}

.ornament {
  font-family: "Fern";
  font-size: 24px;
  color: #cef2ad;
  background-color: #19231f;
  padding: 0 10px;
  position: relative;
  top: -10px;
}

.bottom-line .ornament {
  top: 10px;
}

.intro-content {
  max-width: 600px;
  width: 90%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
}

.intro-paragraph {
  font-family: "LibreBaskerville";
  font-size: (6px, 1vw, 9px);
  line-height: 1.2;
  color: #fbfaf7;
  text-align: left;
  margin: 20px;
}

.png-dropcap {
  float: left;
  width: auto;
  height: 120px;
  margin-right: 15px;
  margin-bottom: 10px;
  shape-margin: 10px;
}

.lantern-image {
  width: 100%;
  max-width: 250px;
  height: auto;
  display: block;
}

/* about-section */
.about-section {
  width: 100vw;
  min-height: 30vh;
  display: flex;
  flex-direction: row;
}

.about-image-block {
  flex: 1;
  background-color: #8ca75d; 
  display: flex;
  align-items: flex-start; 
  justify-content: center;
  padding: 120px 60px; 
  box-sizing: border-box;
}

.about-image {
  width: 100%;
  max-width: 600px;
  height: auto;
}

.about-text-block {
  flex: 1;
  background-color: #e1543c; 
  color: #ffffff;
  padding: 100px 70px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

.about-title {
  font-family: "Lantern";
  font-size: 8vw;
  font-weight: normal;
  margin: 40px 0 40px 0;
  letter-spacing: 8px;
  font-variation-settings: "GROW" 90;
}

.about-body {
  font-family: "LibreBaskerville";
  font-size: 16px;
  line-height: 1.9;
  margin-bottom: 10%;
  max-width: 500px;
}

.ornament-line-2 {
  width: 70%;
  position: relative;
  text-align: center;
  border-top: 1px solid #cef2ad; 
  margin: 10px 0;
}

.ornament-line-2.bottom-line {
  border-top: none;
  border-bottom: 1px solid #cef2ad;
}

.ornament-2 {
  font-family: "Fern";
  font-size: 24px;
  color: #cef2ad; 
  background-color: #e1543c; 
  padding: 0 10px;
  position: relative;
  top: 15px;
}

/* interactive type playground */
.type-playground {
  width: 100vw;
  min-height: 60vh;
  background-color: #bbe774;
  padding: 80px 60px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.type-controls {
  display: flex;
  justify-content: center;
  gap: 120px;
  width: 100%;
}

.control {
  display: flex;
  align-items: center;
  gap: 20px;
  font-family: "LibreBaskerville";
  color: #19231f;
  font-size: 16px;
}

.control-label {
  font-style: italic;
}

.slider-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.slider-wrapper input[type="range"] {
  width: 200px;
  -webkit-appearance: none;
  background: #93bb54;
  height: 3px;
  border-radius: 2px;
  outline: none;
}

.slider-wrapper input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 10px;
  background: transparent;
  cursor: pointer;
}

.slider-icon.fern-icon {
  position: absolute;
  top: -12px;
  transform: translateX(-50%);
  pointer-events: none;
  font-family: "Fern";
  font-size: 22px;
  color: #e1543c;
}

.type-output {
  margin-top: -40px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.play-text {
  margin: 0;
  padding: 20px;
  font-family: "Lantern";
  font-size: 8vw;
  color: #19231f;
  text-align: center;
  letter-spacing: 5px;
  white-space: pre-line;
  font-variation-settings: "GROW" 50;
  outline: none;
  cursor: text;
  min-height: 150px;
  border: 2px dashed #19231f33;
  border-radius: 8px;
  transition: border-color 0.3s ease;
}

.play-text:focus {
  border-color: #19231f80;
  background-color: #bbe7740d;
}

.play-text:empty:before {
  content: "Type here...";
  color: #19231f66;
  font-style: italic;
}

/* download button */
.download-button-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin-top: 10px;
  margin-bottom: 60px;
}

.download-button {
  font-family: "Lantern";
  font-size: 20px;
  font-variation-settings: "GROW" 0; 
  color: #cef2ad; 
  background-color: #e1543c; 
  padding: 15px 15px;
  border: none;
  border-radius: 10px; 
  text-decoration: none;
  letter-spacing: 4px;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.8s ease;
  display: inline-block;
}

.download-button:hover {
  transform: scale(1.05);
}

/* responsive adjustments */
@media (min-width: 1200px) {
  .cover-text { 
    font-size: 180px;
  }
  .intro-paragraph {
    font-size: 22px;
  }
  .about-title {
    font-size: 60px;
  }
  .play-text {
    font-size: 120px;
  }
}

@media (max-width: 1024px) {
  .navigation-button {
    font-size: 16px;
    padding: 12px 24px;
  }
  .nav-left {
    left: 30px;
  }
  .nav-right {
    right: 30px;
  }
}

@media (max-width: 900px) {
  .about-section {
    flex-direction: column;
  }
  .about-text-block,
  .about-image-block {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 768px) {
  .cover {
    flex-direction: column;
    padding: 30px 20px;
  }
  .navigation-button {
    position: static;
    font-size: 14px;
    padding: 10px 20px;
    margin: 10px 0;
    transform: none;
  }
  .nav-left {
    order: -1;
  }
  .cover-text {
    order: 0;
    margin: 20px 0;
    font-size: 20vw;
  }
  .nav-right {
    order: 1;
  }
  .intro-paragraph {
    font-size: 2.5vw;
  }
  .play-text {
    font-size: 10vw;
    min-height: 100px;
    padding: 15px;
  }
}

@media (max-width: 600px) {
  .cover-text { 
    font-size: max(24px, 20vw); 
  }
}

@media (max-width: 480px) {
  .navigation-button {
    font-size: 12px;
    padding: 8px 16px;
    letter-spacing: 0.5px;
  }
  .intro-paragraph {
    font-size: 16px;
  }
  .play-text {
    font-size: 12vw;
    min-height: 80px;
    padding: 10px;
  }
}