@font-face {
  font-family: Letter;
  src: url("letter-roman.woff") format("woff");
  font-display: swap;
}

@font-face {
  font-family: Letter;
  src: url("letter-italic.woff") format("woff");
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fcf6ee;
  --pink: #f7e7e3;
  --ink: #421f2a;
  --red: #872941;
  --berry: #77233c;
  --muted: #6f4a54;
  --rule: #dfc3c3;
  --serif: Letter, Georgia, serif;
  font-family: system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
button { color: inherit; font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #9d3757; outline-offset: 5px; }
h1, h2, p, figure { margin: 0; }
[hidden] { display: none !important; }
section[id] { scroll-margin-top: 24px; }
.shell { width: min(100% - 100px, 1220px); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--rule); }
.header-inner { min-height: 75px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: .36em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
  font: 1.6rem/1 var(--serif);
}
.wordmark i { color: var(--red); }
.brand-heart { font: .88rem/1 system-ui, sans-serif; color: var(--red); margin-right: .25rem; }
nav { display: flex; flex-wrap: wrap; align-items: center; gap: 5px 28px; }
.nav-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  font-size: .9rem;
}
.nav-link:hover { color: var(--red); text-decoration: underline; text-underline-offset: .3em; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .96fr);
  align-items: center;
  gap: clamp(38px, 7.5vw, 114px);
  padding-block: 56px 52px;
}
.hero-text { padding-bottom: 24px; }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .82rem;
  letter-spacing: .16em;
  font-weight: 650;
  line-height: 1.55;
  color: var(--red);
  text-transform: uppercase;
}
.eyebrow > span { width: 22px; height: 1px; background: currentColor; flex: 0 0 22px; }
h1, h2 { font-family: var(--serif); font-weight: 400; }
h1 { margin: 23px 0; font-size: clamp(3.1rem, 6.1vw, 6.65rem); line-height: .94; letter-spacing: -.06em; }
h1 em { display: block; }
h1 em, h2 em { color: var(--red); font-weight: 400; }
.intro { max-width: 42ch; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.2rem); line-height: 1.65; }
.primary {
  display: inline-flex;
  min-height: 51px;
  justify-content: center;
  align-items: center;
  gap: 12px;
  background: var(--berry);
  border: 1px solid transparent;
  border-radius: 3px;
  padding: 12px 22px;
  color: #fff8ef;
  font-size: .94rem;
  font-weight: 620;
  transition: background .18s, transform .18s;
}
.primary:hover { background: #58172d; transform: translateY(-2px); }
.hero .primary { margin-top: 30px; }
.envelope-icon { position: relative; width: 17px; height: 12px; border: 1px solid currentColor; border-radius: 1px; overflow: hidden; }
.envelope-icon::after { content: ""; position: absolute; width: 11px; height: 11px; left: 2px; top: -6px; border-right: 1px solid; border-bottom: 1px solid; transform: rotate(45deg); }

.hero-figure { position: relative; align-self: center; }
.cover {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: hidden;
  aspect-ratio: 8 / 9;
}
.cover img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center 36%; transition: transform .5s ease; }
.cover:hover img { transform: scale(1.035); }

.notes { background: var(--pink); border-block: 1px solid var(--rule); padding-block: 46px 52px; }
.section-heading { text-align: center; }
.divider-heart { display: inline-flex; gap: 10px; align-items: center; color: var(--red); font-size: .78rem; }
.divider-heart::before, .divider-heart::after { content: ""; width: 32px; height: 1px; background: var(--rule); }
h2 { font-size: clamp(2.5rem, 5vw, 4.45rem); letter-spacing: -.042em; line-height: .98; }
.section-heading h2 { margin-top: 11px; }
.section-heading p, .song-copy > p:last-child { margin-top: 14px; color: var(--muted); line-height: 1.65; }
.section-heading p { max-width: 62ch; margin-inline: auto; }
.note-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 13px; margin-top: 30px; }
.note {
  display: grid;
  grid-template-columns: 1fr auto;
  align-content: space-between;
  text-align: left;
  padding: 14px 15px;
  min-height: 110px;
  border: 1px solid var(--rule);
  background: #fff8f2;
  color: var(--ink);
  transition: background .18s, border-color .18s, transform .18s;
}
.note:hover { background: #fffdf8; border-color: var(--red); transform: translateY(-3px); }
.note.is-opened { background: #fdf0eb; }
.note-index { grid-column: 1; font-size: .83rem; color: var(--muted); letter-spacing: .09em; }
.note-name { grid-column: 1 / -1; grid-row: 2; font: 1.35rem/1.12 var(--serif); }
.note-heart { grid-column: 2; grid-row: 1; color: var(--red); font-size: 1.1rem; line-height: 1; }
.note-progress { margin-top: 20px; text-align: center; font-size: .9rem; color: var(--muted); }

.song { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, .94fr); align-items: center; gap: clamp(24px, 6vw, 80px); padding-block: 72px; }
.song h2 { margin-top: 13px; }
.song-copy > p:last-child { max-width: 48ch; }
.player { min-width: 0; }
.player iframe { display: block; width: 100%; border: 0; border-radius: 12px; background: #542a37; }
.player a { display: inline-flex; align-items: center; min-height: 44px; margin-top: 2px; color: var(--red); font-size: .9rem; text-underline-offset: .22em; }

.surprise { padding-bottom: 53px; }
.voucher {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 30px 35px;
  color: #fff4eb;
  background: #5d2135;
  border: 1px solid #5d2135;
  box-shadow: inset 0 0 0 6px #5d2135, inset 0 0 0 7px #ad7386;
}
.voucher-stamp { display: grid; place-items: center; width: 80px; height: 80px; border: 1px dashed #dda8b4; border-radius: 50%; color: #f3c0c8; }
.voucher-stamp span { font-size: 1.8rem; }
.voucher h2 { margin-block: 8px; }
.voucher em, .voucher .eyebrow { color: #f4b9c5; }
.voucher-copy > p:not(.eyebrow) { max-width: 60ch; color: #f5dadb; line-height: 1.55; }
.voucher-copy > p + p { margin-top: 12px; }
.primary.light { background: #f4d8d7; color: #4b2031; }
.primary.light:hover { background: #fff0e7; }
.footer { min-height: 66px; display: grid; place-items: center; text-align: center; border-top: 1px solid var(--rule); color: var(--muted); font-size: .88rem; }

.message {
  margin: auto;
  width: min(640px, 100% - 30px);
  max-height: min(86vh, 860px);
  max-height: min(86dvh, 860px);
  color: var(--ink);
  background: #fff8f1;
  border: 1px solid var(--rule);
  padding: 0;
  box-shadow: 0 25px 90px #3b142b4f;
}
.message::backdrop { background: #311222a6; backdrop-filter: blur(3px); }
.message[open] { animation: unfold .22s ease-out both; }
@keyframes unfold {
  from { opacity: 0; transform: translateY(10px) scale(.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
body:has(.message[open]) { overflow: hidden; }
.message-paper { position: relative; padding: clamp(28px, 6vw, 55px); }
.message h2 { margin-block: 15px 20px; padding-right: 13px; color: var(--red); }
.message-body { font: 1.16rem/1.56 var(--serif); }
.message-body > p + p { margin-top: .82em; }
.signature { color: var(--red); font-style: italic; }
.message-actions:has(button:not([hidden])) { margin-top: 25px; }
.close-form { position: absolute; top: 7px; right: 8px; }
.close { min-width: 44px; min-height: 44px; padding: 0; background: transparent; border: 0; color: var(--red); font-size: 1.6rem; line-height: 1; }
.close:hover { background: var(--pink); }

@media (max-width: 1090px) {
  .shell { width: calc(100% - 68px); }
  .hero { gap: 48px; }
  .note-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 690px) {
  .shell { width: calc(100% - 36px); }
  .header-inner { min-height: 0; flex-wrap: wrap; justify-content: center; gap: 2px 12px; padding-top: 15px; }
  nav { display: grid; flex-basis: 100%; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
  .nav-link { justify-content: center; min-height: 48px; padding-inline: 3px; white-space: normal; text-align: center; line-height: 1.15; }
  .hero { grid-template-columns: 1fr; gap: 30px; padding-block: 38px 31px; }
  .hero-text { padding-bottom: 0; }
  h1 { margin-block: 18px; font-size: clamp(3.1rem, 10vw, 4.5rem); }
  .hero .primary { margin-top: 21px; }
  .notes { padding-block: 33px 35px; }
  .note-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 24px; }
  .note { min-height: 91px; padding: 12px; }
  .note-name { font-size: 1.21rem; }
  .song { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-block: 45px 37px; }
  .surprise { padding-bottom: 35px; }
  .voucher { grid-template-columns: 1fr; gap: 17px; padding: 24px; }
  .voucher-stamp { width: 53px; height: 53px; }
  .voucher-stamp span { font-size: 1.3rem; }
  .voucher .primary { justify-self: start; }
  .message .primary { width: 100%; }
  .message-body { font-size: 1.125rem; }
  .footer { padding-block: 14px max(14px, env(safe-area-inset-bottom)); }
}

@media (max-width: 340px) {
  .shell { width: calc(100% - 24px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
