@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --cream: #f8f1e9;
  --gold: #d8bd91;
  --ink: #2b2228;
  --muted: #6f6268;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background: #241b27;
  font-family: 'DM Sans', sans-serif;
}
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(120deg, rgba(28,20,29,.78), rgba(35,25,34,.70)),
    url('caritas.png') 82% center/auto 100% no-repeat,
    url('francis.png') 18% center/auto 100% no-repeat,
    radial-gradient(circle at 50% 15%, #755766, #241b27 68%);
  transform: scale(1.02);
}
.shade {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(22,16,23,.22), rgba(22,16,23,.48));
  pointer-events: none;
}
.page { width: min(920px, calc(100% - 32px)); margin: auto; padding: 28px 0 24px; }
.topline {
  display: flex; justify-content: center; align-items: center; gap: 13px;
  color: #eadbc9; font-size: 11px; letter-spacing: .19em; text-transform: uppercase;
}
.small-heart { color: var(--gold); font-size: 20px; }
.hero { text-align: center; padding: clamp(70px, 12vh, 125px) 12px 52px; }
.eyebrow, .letter-kicker, .music-label {
  color: var(--gold); font-size: 10px; letter-spacing: .28em; font-weight: 500;
}
h1, h2, .intro, .subtitle { font-family: 'Cormorant Garamond', Georgia, serif; }
h1 { font-size: clamp(58px, 10vw, 104px); font-weight: 500; line-height: .95; margin: 20px 0 12px; }
h1 span, h2 span { color: var(--gold); }
.subtitle { font-size: clamp(20px, 3vw, 27px); color: #eadbcf; margin: 0; }
.divider { color: var(--gold); margin: 28px auto 18px; width: 170px; display: flex; align-items: center; gap: 12px; }
.divider:before, .divider:after { content: ''; height: 1px; flex: 1; background: rgba(216,189,145,.55); }
.intro { font-size: clamp(19px, 2.8vw, 25px); color: #f4e9df; margin: 0 auto 28px; }
.read-button {
  display: inline-block; padding: 13px 22px; border: 1px solid rgba(216,189,145,.7);
  border-radius: 40px; color: var(--cream); text-decoration: none; font-size: 12px;
  letter-spacing: .08em; transition: .25s ease;
}
.read-button:hover { background: rgba(216,189,145,.15); transform: translateY(-2px); }
.read-button span { color: var(--gold); margin-left: 8px; }
.music-card {
  width: min(650px, 100%); margin: 0 auto 70px; padding: 20px;
  display: grid; grid-template-columns: 42px 1fr; gap: 5px 14px;
  border: 1px solid rgba(231,211,187,.28); border-radius: 18px;
  background: rgba(31,23,32,.66); backdrop-filter: blur(12px);
  box-shadow: 0 18px 60px rgba(0,0,0,.18);
}
.music-icon { color: var(--gold); font-size: 31px; grid-row: span 2; align-self: center; text-align: center; }
.music-label { margin: 0 0 5px; font-size: 9px; }
.music-title { margin: 0; font-family: 'Cormorant Garamond', serif; font-size: 24px; }
.music-hint { margin: 4px 0 0; color: #cbbdc1; font-size: 11px; }
.player-wrap { grid-column: 1 / -1; margin-top: 13px; overflow: hidden; border-radius: 10px; }
.player-wrap iframe { display: block; width: 100%; height: 150px; border: 0; background: rgba(255,255,255,.04); }
.letter {
  width: min(720px, 100%); margin: 0 auto; padding: clamp(27px, 6vw, 58px);
  color: var(--ink); background: rgba(250,245,238,.96); border-radius: 4px;
  box-shadow: 0 24px 80px rgba(0,0,0,.28); position: relative;
}
.letter:before { content: ''; position: absolute; inset: 10px; border: 1px solid rgba(157,122,99,.24); pointer-events: none; }
.letter-kicker { color: #9c7969; text-align: center; margin: 0 0 13px; }
h2 { text-align: center; font-size: clamp(38px, 6vw, 53px); font-weight: 500; margin: 0 0 30px; color: #3a2b34; }
h2 span { color: #a77d7c; }
.letter-body { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 21px; line-height: 1.62; color: #55464c; }
.letter-body p { margin: 0 0 18px; }
.closing { text-align: center; padding-top: 17px; }
.big-love { color: #754b5b; font-size: 14px; letter-spacing: .08em; font-weight: 500; }
.big-love span { color: #ad6d7e; }
.congrats { font-family: 'Cormorant Garamond', serif; font-size: 25px; color: #674456; margin: 12px 0 25px; }
.signature { font-family: 'Cormorant Garamond', serif; font-style: italic; line-height: 1.5; color: #806d72; }
.signature strong { font-style: normal; color: #503b47; }
footer { text-align: center; color: #c8b5b7; font-size: 11px; letter-spacing: .12em; padding: 35px 0 10px; }
footer span { color: var(--gold); font-size: 17px; }
@media (max-width: 560px) {
  .page { width: min(100% - 22px, 920px); padding-top: 20px; }
  .hero { padding-top: 75px; }
  .music-card { padding: 15px; margin-bottom: 48px; }
  .player-wrap iframe { height: 145px; }
  .letter-body { font-size: 19px; }
  .letter { padding: 35px 25px; }
}


.couple-portraits { width: min(680px, 100%); margin: 0 auto 64px; text-align: center; }
.photo-kicker { color: var(--gold); font-size: 10px; letter-spacing: .25em; margin: 0 0 18px; }
.portrait-grid { display: grid; grid-template-columns: 1fr 34px 1fr; align-items: center; gap: 12px; }
.portrait-card { margin: 0; padding: 9px 9px 12px; background: rgba(250,245,238,.94); border: 1px solid rgba(216,189,145,.65); border-radius: 14px; box-shadow: 0 14px 38px rgba(0,0,0,.25); transform: rotate(-1deg); }
.portrait-card:nth-of-type(2) { transform: rotate(1deg); }
.portrait-card img { display: block; width: 100%; height: clamp(190px, 34vw, 300px); object-fit: cover; object-position: center 28%; border-radius: 8px; }
.portrait-card figcaption { color: #654b58; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 20px; padding-top: 8px; }
.portrait-heart { color: #e6c99d; font-size: 32px; text-shadow: 0 2px 18px rgba(0,0,0,.4); }
.photo-caption { color: #eee0d7; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 22px; margin: 17px 0 0; }
@media (max-width: 480px) {
  .portrait-grid { grid-template-columns: 1fr 22px 1fr; gap: 7px; }
  .portrait-card { padding: 6px 6px 9px; }
  .portrait-card img { height: 190px; }
  .portrait-card figcaption { font-size: 17px; }
  .portrait-heart { font-size: 23px; }
  .photo-caption { font-size: 19px; }
}


/* Opening welcome screen */
body.welcome-active { overflow: hidden; }
.welcome-screen {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 22px;
  overflow-y: auto;
  background:
    linear-gradient(145deg, rgba(24,17,27,.82), rgba(48,31,43,.88)),
    url('francis.png') left center/auto 100% no-repeat,
    url('caritas.png') right center/auto 100% no-repeat,
    #241b27;
  opacity: 1;
  visibility: visible;
  transition: opacity .85s ease, visibility .85s ease;
}
.welcome-screen.is-closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.welcome-glow {
  position: absolute;
  width: min(75vw, 620px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(216,189,145,.10);
  filter: blur(75px);
  pointer-events: none;
}
.welcome-card {
  position: relative;
  width: min(520px, 100%);
  padding: clamp(26px, 5vw, 48px);
  text-align: center;
  border: 1px solid rgba(216,189,145,.42);
  border-radius: 24px;
  background: rgba(35,26,37,.78);
  box-shadow: 0 25px 90px rgba(0,0,0,.38);
  backdrop-filter: blur(16px);
  animation: welcome-rise 1s both;
}
.welcome-kicker {
  margin: 0 0 22px;
  color: var(--gold);
  font-size: 10px;
  letter-spacing: .27em;
}
.welcome-photos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 22px;
}
.welcome-photos img {
  width: clamp(94px, 22vw, 142px);
  height: clamp(116px, 27vw, 170px);
  object-fit: cover;
  object-position: center 25%;
  padding: 5px;
  border-radius: 13px;
  background: #f8f1e9;
  box-shadow: 0 10px 28px rgba(0,0,0,.3);
}
.welcome-photos span {
  color: #e6c99d;
  font-size: 28px;
  animation: heart-beat 1.8s infinite;
}
.welcome-to {
  color: #eadbcf;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 21px;
  margin: 0 0 4px;
}
.welcome-title {
  color: var(--cream);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(48px, 10vw, 70px);
  font-weight: 500;
  margin: 0;
  line-height: 1.05;
}
.welcome-title span { color: var(--gold); }
.welcome-note {
  max-width: 330px;
  margin: 15px auto 25px;
  color: #e0d1d2;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 20px;
  line-height: 1.35;
}
.open-heart-button {
  border: 1px solid rgba(216,189,145,.85);
  border-radius: 40px;
  padding: 14px 27px;
  color: #2b2228;
  background: linear-gradient(135deg, #ead8b9, #caa879);
  font: 500 12px 'DM Sans', sans-serif;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(0,0,0,.2);
  transition: transform .25s ease, box-shadow .25s ease;
}
.open-heart-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}
.open-heart-button span { margin-left: 7px; color: #8a4f62; }
.welcome-footnote {
  color: #c8b5b7;
  font-size: 10px;
  letter-spacing: .1em;
  margin: 23px 0 0;
}
@keyframes welcome-rise {
  from { opacity: 0; transform: translateY(22px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes heart-beat {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.2); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* Gentle floating hearts and scroll reveals */
.floating-hearts {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.page { position: relative; z-index: 1; }
.floating-heart {
  position: absolute;
  bottom: -45px;
  color: rgba(230,201,157,.55);
  line-height: 1;
  text-shadow: 0 0 14px rgba(230,201,157,.2);
  animation: float-up var(--duration, 12s) linear forwards;
  user-select: none;
}
@keyframes float-up {
  0% { transform: translate3d(0,0,0) rotate(0deg) scale(.75); opacity: 0; }
  12% { opacity: .65; }
  78% { opacity: .48; }
  100% { transform: translate3d(var(--drift, 25px), -110vh, 0) rotate(24deg) scale(1.2); opacity: 0; }
}
.hero-note {
  margin: 15px 0 0;
  color: rgba(248,241,233,.68);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 17px;
  font-style: italic;
}
.letter {
  animation: letter-arrive .9s ease both;
}
@keyframes letter-arrive {
  from { opacity: .65; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .floating-heart { display: none; }
  .letter { animation: none; }
}
