/* V15: one portable serif for all live text. The two illustrated titles remain artwork. */
@font-face {
  font-family: WeddingSerif;
  src: url('assets/v5/fonts/WeddingSerif-Regular.woff') format('woff');
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

html, body, body * {
  font-family: WeddingSerif, 'Noto Serif CJK SC', 'Songti SC', SimSun, serif !important;
}
.script {
  font-style: italic;
  letter-spacing: .012em;
}
.handwritten-english {
  font-size: clamp(2.3rem, 4vw, 3.15rem);
  font-style: italic;
  transform: rotate(-4deg);
}

/* Names sit directly below the English eyebrow with a measured gap. */
@media (min-width: 801px) {
  .hero-names {
    top: calc(10% + 46px);
    transform: none;
  }
}

/* The story lettering is drawn to match the illustrated cover title. */
.story-head {
  min-height: 0;
}
.story-head > .script {
  margin-bottom: 8px;
  font-size: 1.75rem;
  line-height: 1.35;
  font-style: italic;
  letter-spacing: .012em;
  transform: none;
  color: #647d5c;
}
.story-head h2 {
  width: min(560px, 100%);
  line-height: 0;
  letter-spacing: 0;
}
.story-title-art {
  display: block;
  width: 100%;
  height: auto;
}
.invite-wordmark {
  width: 100%;
  margin: 22px auto 0;
  font-size: clamp(2.35rem, 4.8vw, 3.25rem);
  line-height: 1.4;
  letter-spacing: .08em;
  color: #305842;
}
.invite-wordmark span {
  display: block;
}

@media (min-width: 801px) and (max-width: 950px) {
  .story-margin {
    position: static;
    text-align: right;
    margin-top: 12px;
  }
}

@media (max-width: 800px) {
  .opening-note {
    top: max(42px, calc(env(safe-area-inset-top, 0px) + 36px));
  }
  .hero-names {
    top: max(104px, calc(env(safe-area-inset-top, 0px) + 98px));
    transform: none;
    font-size: clamp(1.42rem, 6.5vw, 1.7rem);
  }
  .hero-wordmark {
    top: clamp(170px, 23svh, 195px);
  }
  .story-head > .script {
    font-size: 1.35rem;
    margin-bottom: 10px;
  }
  .story-head h2 {
    width: 100%;
  }
  .story-margin {
    margin-top: 6px;
  }
}

@media (max-width: 360px) {
  .hero-names {
    gap: 10px;
    font-size: 1.4rem;
  }
  .hero-wordmark {
    top: 165px;
  }
}

@media (max-height: 550px) and (orientation: landscape) {
  .opening-note { top: 35px; }
  .hero-names { top: 86px; transform: none; }
  .hero-wordmark { top: 165px; }
}
