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

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

/* CSS Custom Properties */
:root {
  --bg-color: #f2eade;
  --text-color: #957d60;
  --accent-color: #9a7c52;
  --footer-color: #f2eade;
  --font-size-base: 16px;
}

/* main page */
html, body { 
  max-width: 100%; overflow-x: hidden;
} 

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-color);
  color: var(--text-color);
  font-family: "Caveat", "Montserrat", sans-serif;
  font-size: var(--font-size-base);
  line-height: 1.6;
}

/* header */
nav{
display: flex;
  gap: 24px;
  padding: 12px 32px;
}

nav a {
  color: var(--accent-color);
  font-family: "Caveat", cursive;
  font-size: 20px;
  text-decoration: none;
}

nav a:hover { text-decoration: underline; }

/* main page */
main {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* photos */
.photos {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px 0;
}

.photos-left {left: 40px; }
.photos-right {right: 40px; }

.poloroid {
  margin: 0;
  width: clamp(190px, 19vw, 300px);
}

.photos img {
  display: block;
  width: 100%;
  height: auto;
}

.photos figcaption {
  font-family: "Caveat", cursive;
  font-size: clamp(18px, 1.8vw, 26px);
  text-align: center;
  color: var(--text-color);
  margin-top: 6px;
}

/* Title */
.titles {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 0.5em;
  padding: 2em;
}

.chinese {
  font-family: "Zhi Mang Xing", cursive;
  font-size: clamp(64px, 10vw, 140px);
  color: var(--accent-color);
  line-height: 1;
}
.Wominijeka{
  font-family: "Caveat", cursive;
  font-size: clamp(42px, 6vw, 84px);
  font-weight: 600;
  color: var(--accent-color);
  line-height: 1;
}

/* ribbon */
.ribbon {
  position: relative;
  display: inline-block;
  width: clamp(320px, 42vw, 700px);
  margin-top: 12px;
}

.ribbon img {
  display:block;
  width: 100%;
  height:auto;
}

.ribbon span {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -56%); 
  width: 70%;
  color: #fff;
  font-family: "Caveat", cursive;
  font-size: clamp(20px, 2.2vw, 34px);
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  text-decoration: underline;
}

/* extra pages */
.extras {
  text-align: center;
  padding: 16px;
}

.extras summary{
  font-family: "Caveat", cursive;
  font-size: clamp(20px, 2.2vw, 28px);
  cursor: pointer;
}

.extras .intro {
  font-family: "Cormorant SC", serif;
  max-width: 420px;
  margin: 20px auto;
  padding: 15px;
  border-left: 2px solid var(--text-color); 
  text-align: left;
  font-size: clamp(17px, 1.8vw, 22px);

}
.extras a {
  font-family: "Caveat", cursive;
  font-size: clamp(20px, 2.2vw, 28px);
  color: var(--text-color);
}

/* Footer */
footer {
  text-align: center;
  background: var(--footer-color);
  padding: 16px;
  font-family: "Caveat", cursive;
}

footer a {
  color: var(--text-color);
}

/* about me page */
.book-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 16px;
}

.book {
  width: min(760px, 92vw);
  background: #fffdf8;
  border: 2px solid #e6d9c0;
  border-radius: 20px;
  box-shadow: 0 14px 34px #78603c;
  padding: clamp(26px, 4vw, 52px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page {width: 100%; }

/*top page */
.page-up {
  display: flex;
  justify-content: center;
  margin-bottom: 6px;
}

.book-title {
  width: 100%;
}

.book-intro {
  width: 100%;
  font-family: "Caveat", cursive;
  font-size: clamp(19px, 3vw, 27px);
  color: var(--accent-color);
  text-align: center;
  border-bottom: 2px solid #957D60;
  padding-bottom: 12px;
  margin: 6px 0 16px;
}

.book-text {
  width: 100%;
  font-family: "Cormorant SC", serif;
  font-size: clamp(12px, 1.05vw, 16px);
  line-height: 1.5;
  color: var(--text-color);
  text-align: left;
}
.book-text p { margin-bottom: 11px; }
.sign { font-family: "Caveat", cursive; font-size: 1.5em; }

/* tabs */
.book-tabs {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 12px;
  margin-top: 22px;
  padding: 0;
}
.tab {
  padding: 10px 22px;
  border-radius: 10px;
  color: #fff;
  font-family: "Cormorant SC", serif;
  letter-spacing: 3px;
  text-decoration: none;
  font-size: 15px;
}

.tab-home { background: #d98a92; }
.tab-life { background: #a9b98d; }
.tab-move { background: #8fb0c4; }

/* arrows */
.book-flip {
  display: flex;
  justify-content: space-between;
  width: min(760px, 92vw);
  margin-top: 18px;
}
.flip {
  font-family: "Cormorant SC", serif;
  font-size: clamp(18px, 2vw, 26px);
  color: var(--text-color);
  text-decoration: none;
  letter-spacing: 2px;
}
.flip:hover { color: var(--accent-color); }

/*contact page */
.contact-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 40px 16px;
}

.contact-intro { 
  text-align: center; 
}
.postcard {
  position: relative;
  width: min(600px, 94vw);
  background: #fff;
  box-shadow: 0 16px 38px #78603c;
  padding: clamp(26px,4vw,42px); 
  border-radius: 4px; 
}
.stamp {
  position: absolute;
  top: 1px;
  right: 0;
  width: 250px;
  height: auto;
}

.postcard-to{
  font-family: "Cormorant SC", serif; 
  text-transform: uppercase; 
  letter-spacing: 1px;
  font-size: clamp(18px,2.6vw,23px); 
  color: #6b5a45; 
}

.field { 
  margin-top: 16px;
}

.field label { 
  display: block; 
  font-family: "Cormorant SC", serif; 
  text-transform: uppercase; 
  letter-spacing: 1.5px; 
  font-size: 13px; 
  color: #957d60; 
  margin-bottom: 2px; }
  
.field input { 
  width: 100%; 
  border: none; 
  border-bottom: 2px solid #b89b6f; 
  background: transparent; 
  font-family: "Caveat", cursive; 
  font-size: clamp(20px,2.6vw,26px); 
  color: #5a4a35; 
  padding: 4px 2px; 
}

.field textarea { 
  width: 100%; 
  border: none; 
  font-family: "Caveat", cursive; 
  font-size: clamp(20px,2.6vw,26px); 
  color: #5a4a35; 
  line-height: 40px;
  padding: 0 2px; 
  min-height: 130px; 
  resize: vertical; 
  background: repeating-linear-gradient(transparent, transparent 39px, #cbb89755 39px, #cbb89755 40px); 
}

input:focus, textarea:focus { 
  outline: none;
  border-color: var(--accent-color);
}

.send-button {
  font-family: "Caveat", cursive;   
  background: var(--accent-color);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 18px;
}

/* book cover */
.book-main {
  position: relative;
  width:1000px, 50vw;
  margin: 0 auto;
}

.book-front {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
  filter: drop-shadow(0 14px 26px rgba(90, 66, 40, .22));
}

.scrapbook-title {
  text-align: center;
}

.scrapbook-title span {
  display: inline-block;
  background: #fbf7f0;
  color: #9a7c52;
  font-family: "Caveat", cursive;
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3.2rem);
  padding: .12em .6em; 
  border-radius: 16px;
  box-shadow: 0 5px 14px rgba(90,66,40,.16);   
}


/* Responsive phone adjustments */
@media (max-width: 768px) {
  :root {
    --font-size-base: 14px;
} 
.ribbon {
  width: min(380px, 90vw);
}
  
  .ribbon span {
    width: 72%;
    font-size: clamp(17px, 5.5vw, 24px);
  }
  
.photos {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding: 0;
}

.poloroid {
    width: min(40vw, 170px);
  }

.titles {
    padding: 2rem 1rem;
}

.chinese {
  font-size: clamp(60px, 20vw, 90px);
}

.Wominijeka {
  font-size: clamp(42px, 13vw, 64px);
}

.book-front { 
  padding: 12px 40px; 
}
.book { 
  width:750px; 
}
}

  