/* ---------- Jiayi's site — shared styles ---------- */
/* palette: Pantone Vanilla Custard / Flamingo Plume / Brandy Brown */
/* type: Playfair Display (headings) + Cormorant Garamond (body) + Parisienne (script accent) */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,500;0,600;0,700;1,500;1,600&family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&family=Parisienne&display=swap');

:root{
  --vanilla: #f1e4c8;
  --vanilla-deep: #e6d1a4;
  --paper: #faf3e4;
  --white: #fffaf1;

  --flamingo: #d98d98;
  --flamingo-soft: #f4dbdd;
  --flamingo-deep: #b96774;

  --brandy: #6b2c28;
  --brandy-deep: #46201d;

  --ink: #4a2420;
  --ink-soft: #8d6d60;

  --kiwi: #77864a;      --kiwi-bg: #e9edda;
  --banana: #ab8329;    --banana-bg: #f3e8c9;
  --apple: #9c3f36;     --apple-bg: #f0dad7;
  --pineapple: #b17f24; --pineapple-bg: #f4e7c6;

  --accent: var(--flamingo-deep);
  --accent-bg: var(--flamingo-soft);

  --home-magenta: #b44981;
  --home-magenta-deep: #973c6a;
  --home-text: #fbeee1;
  --home-text-soft: rgba(251,238,225,0.75);

  --max-width: 1080px;
  --radius: 18px;
}

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

html{ scroll-behavior: smooth; }

body{
  margin: 0;
  min-height: 100vh;
  background: var(--vanilla);
  color: var(--ink);
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a{ color: inherit; text-decoration: none; }

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

.wrap{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- header / nav ---------- */

.site-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 30px 24px 8px;
  gap: 16px;
  flex-wrap: wrap;
}

.wordmark{
  font-family: 'Parisienne', cursive;
  font-weight: 400;
  font-size: 2rem;
  letter-spacing: 0.01em;
  color: var(--brandy);
}

.site-nav{
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.site-nav a{
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-soft);
  padding: 6px 2px;
  border-bottom: 1px solid transparent;
  transition: color .2s ease, border-color .2s ease;
}

.site-nav a:hover,
.site-nav a.active{
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- footer ---------- */

.site-footer{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 60px 24px 46px;
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-soft);
}

.site-footer a{ color: var(--accent); }

/* ---------- generic page hero (subpages) ---------- */

.page-hero{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 46px 24px 10px;
  text-align: center;
}

.fruit-emoji{
  font-size: 2.4rem;
  display: block;
  margin-bottom: 8px;
}

.page-hero h1{
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  font-style: italic;
  font-size: clamp(2.1rem, 5vw, 3rem);
  margin: 0 0 8px;
  color: var(--accent);
}

.page-hero .flourish{
  display: block;
  color: var(--accent);
  opacity: 0.6;
  font-size: 1rem;
  margin-bottom: 14px;
}

.page-hero p{
  color: var(--ink-soft);
  max-width: 480px;
  margin: 0 auto;
  font-size: 1.15rem;
}

.back-home{
  display: inline-block;
  margin-top: 22px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-soft);
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}
.back-home:hover{ color: var(--accent); }

/* ---------- coming soon block ---------- */

.coming-soon{
  width: calc(100% - 48px);
  max-width: 560px;
  margin: 40px auto 100px;
  padding: 44px 32px;
  background: var(--accent-bg);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  text-align: center;
  color: var(--ink);
}

.coming-soon .stamp{
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--white);
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 16px;
}

/* ---------- "what I love" list ---------- */

.love-section{
  max-width: 760px;
  margin: 10px auto 100px;
  padding: 0 24px;
}

.love-section h2{
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2.1rem);
  text-align: center;
  color: var(--accent);
  margin: 0 0 28px;
}

.love-list{
  list-style: none;
  margin: 0;
  padding: 36px 40px;
  background: var(--accent-bg);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 32px;
}

.love-list li{
  font-size: 1.1rem;
  line-height: 1.5;
  color: var(--ink);
  padding-left: 22px;
  position: relative;
}

.love-list li::before{
  content: '♡';
  position: absolute;
  left: 0;
  top: 0.05em;
  color: var(--accent);
  font-size: 0.9em;
}

.love-list li.wide{
  grid-column: 1 / -1;
}

@media (max-width: 620px){
  .love-list{
    grid-template-columns: 1fr;
    padding: 32px 26px;
  }
}

/* ---------- HOME PAGE ---------- */

body.home{
  background: var(--home-magenta);
}

body.home .wordmark{
  color: var(--home-text);
}

body.home .site-footer{
  color: var(--home-text-soft);
}

.hero-intro{
  max-width: 680px;
  margin: 6px auto 0;
  padding: 10px 24px 0;
  text-align: center;
  color: var(--home-text);
}

.hero-intro h1{
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.4rem, 3.2vw, 1.85rem);
  margin: 0 0 6px;
  color: var(--home-text);
}

.hero-intro .hint{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--home-text-soft);
  margin-top: 6px;
}

/* ---------- clickable room / fruit hotspots ---------- */

.room{
  position: relative;
  width: 100%;
  max-width: min(96vw, 1560px);
  margin: 26px auto 60px;
  aspect-ratio: 2000 / 1414;
}

.room img{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.hotspot{
  position: absolute;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.hotspot::before{
  content: '';
  position: absolute;
  inset: -6%;
  border-radius: 50%;
  background: rgba(255,255,255,0);
  box-shadow: 0 0 0 0 rgba(255,255,255,0);
  transition: background .25s ease, box-shadow .25s ease, transform .25s ease;
  transform: scale(0.9);
}

.hotspot:hover::before,
.hotspot:focus-visible::before{
  background: rgba(255,255,255,0.45);
  box-shadow: 0 0 24px 6px rgba(255,255,255,0.4);
  transform: scale(1.08);
}

.hotspot--rect{ border-radius: 22px; }
.hotspot--rect::before{ border-radius: 26px; }

.hotspot-label{
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translate(-50%, 6px);
  white-space: nowrap;
  background: var(--brandy);
  color: var(--white);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
  padding: 5px 12px;
  border-radius: 999px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
}

.hotspot:hover .hotspot-label,
.hotspot:focus-visible .hotspot-label{
  opacity: 1;
  transform: translate(-50%, -2px);
}

/* ---------- PHOTOGRAPHY masonry ---------- */

body.photos-page{ background: #faf9f6; }

/* the photographer: a small sticker of Jiayi tucked beside the title, with a hand-drawn arrow */
.page-hero--photos{ position: relative; }

.photographer{
  position: absolute;
  right: 6%;
  top: 18px;
  width: 132px;
  margin: 0;
  transform: rotate(5deg);
}

.photographer img{
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 10px rgba(70,32,29,0.22));
  transition: transform .3s cubic-bezier(.2,.8,.3,1.2);
}
.photographer:hover img{ transform: rotate(-3deg) scale(1.04); }

.photographer-note{
  position: absolute;
  right: 100%;
  top: 34%;
  margin-right: 6px;
  font-family: 'Parisienne', cursive;
  font-size: 1.45rem;
  line-height: 1.1;
  color: var(--accent);
  white-space: nowrap;
  transform: rotate(-9deg);
}

.photographer-arrow{
  display: block;
  width: 78px;
  margin: 2px 0 0 auto;
  transform: translateX(18px);
}

@media (max-width: 900px){
  .photographer{ right: 2%; width: 104px; }
  .photographer-note{ font-size: 1.2rem; }
  .photographer-arrow{ width: 60px; }
}

/* phones: the sticker sits under the title instead of beside it */
@media (max-width: 620px){
  .photographer{
    position: relative;
    right: auto;
    top: auto;
    width: 110px;
    margin: 18px auto 0 46%;
  }
  .photographer-note{ font-size: 1.15rem; }
}

.gallery{
  --gap: 16px;
  column-count: 3;
  column-gap: var(--gap);
  max-width: 1600px;
  margin: 24px auto 100px;
  padding: 0 clamp(16px, 4vw, 56px);
}

.gallery figure{
  position: relative;
  margin: 0 0 var(--gap);
  break-inside: avoid;
  overflow: hidden;
  background: #efede8;
  cursor: zoom-in;
}

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

.gallery.is-masonry{
  column-count: auto;
  display: flex;
  align-items: flex-start;
  gap: var(--gap);
}

.gallery-col{
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

/* Stagger the second column so rows never line up into a rigid grid.
   Percent margins resolve against the gallery width; these equal ~36% of one
   column, matching STAGGER in js/gallery.js. */
.gallery.cols-3 .gallery-col:nth-child(2){ margin-top: 12%; }
.gallery.cols-2 .gallery-col:nth-child(2){ margin-top: 18%; }

.gallery.is-masonry figure{ margin: 0; }

.gallery.is-masonry img{
  opacity: 0;
  transition: opacity .7s ease;
}
.gallery.is-masonry img.is-loaded{ opacity: 1; }

.photo-caption{
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 48px 18px 16px;
  background: linear-gradient(to top, rgba(40,18,16,0.75), rgba(40,18,16,0));
  color: var(--white);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .3s ease, transform .3s ease;
  pointer-events: none;
}

.gallery figure:hover .photo-caption{
  opacity: 1;
  transform: translateY(0);
}

.photo-place{
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.1rem;
  line-height: 1.3;
}

.photo-date{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  opacity: 0.85;
}

@media (max-width: 900px){
  .gallery{ column-count: 2; }
}
@media (max-width: 560px){
  .gallery{ column-count: 1; --gap: 12px; }
}

.lightbox{
  position: fixed;
  inset: 0;
  background: rgba(30,15,13,0.9);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 30px;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
.lightbox.open{ opacity: 1; pointer-events: auto; }
.lightbox img{
  max-width: 100%;
  max-height: 84vh;
  border-radius: 8px;
}
.lightbox-caption{
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.05rem;
  color: var(--white);
  text-align: center;
}
.lightbox-caption:empty{ display: none; }
.lightbox-close{
  position: absolute;
  top: 22px;
  right: 28px;
  color: var(--white);
  font-size: 1.8rem;
  cursor: pointer;
  line-height: 1;
}

/* ---------- guestbook journal ---------- */

.journal-form{
  width: calc(100% - 48px);
  max-width: 420px;
  margin: 20px auto 50px;
  background: var(--accent-bg);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  padding: 28px 30px;
}

.hp-field{
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.journal-form input[type="text"],
.journal-form textarea{
  width: 100%;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  resize: vertical;
}

.journal-form input[type="text"]:focus,
.journal-form textarea:focus{
  outline: none;
  border-color: var(--accent);
}

.journal-form-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.journal-count{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

.journal-form button{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
  background: var(--brandy);
  color: var(--white);
  border: none;
  padding: 10px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.journal-form button:hover{ transform: translateY(-2px); background: var(--brandy-deep); }
.journal-form button:disabled{ opacity: 0.6; cursor: default; transform: none; }

.journal-status{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.95rem;
  color: var(--accent);
  min-height: 1.4em;
  margin: 10px 0 0;
}

/* ---------- notebook display ---------- */

.notebook-wrap{
  width: calc(100% - 48px);
  max-width: 780px;
  margin: 0 auto 60px;
  padding: 60px 24px;
  background: var(--flamingo-soft);
  border-radius: 28px;
}

.notebook{
  position: relative;
  max-width: 620px;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 14px;
  padding: 50px 44px 40px;
  box-shadow: 0 30px 60px rgba(70,32,29,0.28), 0 2px 0 rgba(0,0,0,0.04);
}

.notebook-fold{
  position: absolute;
  top: 4%;
  bottom: 4%;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, rgba(70,32,29,0.18) 15%, rgba(70,32,29,0.18) 85%, transparent);
  box-shadow: 0 0 14px 6px rgba(70,32,29,0.05);
}

.notebook-star{
  position: absolute;
  width: 46px;
  height: 46px;
  filter: drop-shadow(0 3px 4px rgba(70,32,29,0.35));
}
.notebook-star--tr{ top: -18px; right: -14px; transform: rotate(12deg); }
.notebook-star--bl{ bottom: -16px; left: -14px; transform: rotate(-16deg); }

.notebook-clip{
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 20px;
  background: linear-gradient(180deg, #f3e3ae, #b8933f);
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}
.notebook-clip::before{
  content: '';
  position: absolute;
  left: 50%;
  top: -11px;
  width: 20px;
  height: 16px;
  transform: translateX(-50%);
  border: 3px solid #cba648;
  border-bottom: none;
  border-radius: 10px 10px 0 0;
}
.notebook-clip--top{ top: -10px; }
.notebook-clip--bottom{ bottom: -10px; }

.journal-entries{
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.journal-loading,
.journal-empty{
  text-align: center;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  color: var(--ink-soft);
}

.journal-entry{
  padding-bottom: 20px;
  border-bottom: 1px dashed rgba(70,32,29,0.18);
}
.journal-entry:last-child{ border-bottom: none; padding-bottom: 0; }

.journal-entry-msg{
  font-size: 1.14rem;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.journal-entry-meta{
  font-family: 'Parisienne', cursive;
  font-size: 1.2rem;
  color: var(--accent);
  margin: 0;
}

.journal-entry-meta span{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 0.82rem;
  color: var(--ink-soft);
}

@media (max-width: 600px){
  .notebook-wrap{ padding: 40px 16px; border-radius: 20px; }
  .notebook{ padding: 40px 22px 30px; }
  .notebook-fold{ display: none; }
}

/* ---------- blog subscribe box ---------- */

.subscribe-box{
  width: calc(100% - 48px);
  max-width: 520px;
  margin: 30px auto 50px;
  padding: 34px 32px;
  background: var(--accent-bg);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: var(--radius);
  text-align: center;
}

.subscribe-title{
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1.3rem;
  color: var(--accent);
  margin: 0 0 16px;
}

.subscribe-form{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.subscribe-form input[type="email"]{
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  padding: 11px 16px;
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 999px;
  background: var(--white);
  min-width: 240px;
}
.subscribe-form input[type="email"]:focus{ outline: none; border-color: var(--accent); }

.subscribe-form button{
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 1rem;
  background: var(--brandy);
  color: var(--white);
  border: none;
  padding: 11px 24px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}
.subscribe-form button:hover{ transform: translateY(-2px); background: var(--brandy-deep); }

/* ---------- blog draft card ---------- */

.post-list{
  max-width: 620px;
  margin: 30px auto 100px;
  padding: 0 24px;
}

.post-card{
  background: var(--pineapple-bg);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 16px;
}

.post-card .tag{
  display: inline-block;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pineapple);
  background: var(--white);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.post-card h3{
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  margin: 0 0 6px;
  color: var(--ink);
}

.post-card p{ margin: 0; color: var(--ink-soft); font-size: 1rem; }

