:root {
  --bg: #4a0b10;
  --cream: #f3e6d0;
  --paper: #fbf7ef;
  --gold: #c9a46a;
  --gold-dark: #b88d50;
  --red: #8a1820;
  --red-heart: #9c1c25;
  --red-ink: #7a1219;
  --serif: 'Cormorant Garamond', Georgia, serif;
  --script: 'Pinyon Script', cursive;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
a { color: var(--cream); }
a:hover { color: #fff; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.page {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: var(--bg);
  font-family: var(--serif);
  color: var(--cream);
}
.phone {
  position: relative;
  width: 100%;
  max-width: 430px;
  min-height: 100vh;
  background: radial-gradient(120% 80% at 50% 0%, #a3212a 0%, #8a1820 45%, #6e1018 100%);
  overflow: hidden;
}

.screen { display: flex; flex-direction: column; align-items: center; }

.eyebrow { font-size: 12px; letter-spacing: .28em; text-transform: uppercase; font-weight: 500; }

.couple { font-family: var(--script); font-weight: 400; text-align: center; margin: 0; }
.couple--sm { font-size: 50px; line-height: 1.1; margin-top: 10px; }
.couple--sm .amp { font-size: 36px; }
.couple--lg { font-size: 52px; line-height: 1.1; margin-top: 40px; }
.couple--lg .amp { font-size: 38px; }

.link-btn {
  background: none;
  border: none;
  color: var(--cream);
  font-family: var(--serif);
  font-size: 12px;
  letter-spacing: .28em;
  text-transform: uppercase;
  font-weight: 600;
  cursor: pointer;
  padding: 12px;
  margin-top: 22px;
}
.link-btn--lg {
  margin-top: 30px;
  font-size: 14px;
  letter-spacing: .3em;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(243, 230, 208, .5);
}

/* Photo strip */
.strip { background: var(--paper); display: flex; flex-direction: column; }
.strip__photo { overflow: hidden; position: relative; background: #e8dcc6; }
.strip__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.strip__date { text-align: center; font-size: 10px; letter-spacing: .14em; color: var(--red-ink); padding: 2px 0 3px; }

/* 01 Envelope */
.envelope { min-height: 100vh; padding: 64px 24px 40px; animation: fadeUp .8s ease both; }
.env {
  position: relative;
  width: 280px;
  height: 400px;
  margin-top: 28px;
  cursor: pointer;
  border-radius: 140px 140px 22px 22px;
  background: linear-gradient(160deg, #f6ead6 0%, #e9d3b0 60%, #dcbf93 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 18px 40px rgba(40, 0, 5, .45), inset 0 0 30px rgba(150, 100, 40, .25);
}
.env__line1 { position: absolute; inset: 10px; border-radius: 130px 130px 14px 14px; border: 1px solid var(--gold-dark); }
.env__line2 { position: absolute; inset: 18px; border-radius: 122px 122px 8px 8px; border: 1px dashed rgba(184, 141, 80, .55); }
.env__slot {
  position: absolute; top: 74px; left: 50%; transform: translateX(-50%);
  width: 148px; height: 8px; border-radius: 4px; background: #3a1a10;
  box-shadow: inset 0 2px 3px rgba(0, 0, 0, .6);
}
.env__window { position: absolute; top: 80px; left: 50%; transform: translateX(-50%); width: 120px; height: 250px; overflow: hidden; }
.strip--env {
  width: 100px; margin: 0 auto; padding: 6px 6px 4px; gap: 5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .25);
  transition: transform 2.2s cubic-bezier(.2, .7, .2, 1);
  transform: translateY(-102%);
}
.strip--env.is-out { transform: translateY(0); }
.strip--env .strip__photo { width: 88px; height: 70px; }
.env__hint {
  position: absolute; bottom: 30px; left: 0; right: 0; text-align: center;
  font-family: var(--script); font-size: 22px; color: var(--red);
  animation: pulse 2.4s ease-in-out infinite;
}

/* 02 Save the date */
.invite { padding: 36px 20px 28px; animation: fadeUp .9s ease both; }
.card { position: relative; width: 340px; height: 480px; flex-shrink: 0; }
.card__arch {
  position: absolute; left: 18px; top: 14px; width: 304px; height: 452px;
  border-radius: 152px 152px 26px 26px;
  background: linear-gradient(165deg, #f6ead6 0%, #ead6b5 55%, #d9bb8c 100%);
  border: 2px solid var(--gold);
  box-shadow: 0 20px 44px rgba(40, 0, 5, .45);
}
.card__arch-line { position: absolute; inset: 10px; border-radius: 142px 142px 18px 18px; border: 1px solid var(--gold-dark); }
.card__title {
  position: absolute; left: 36px; top: 96px; transform: rotate(-14deg);
  font-family: var(--script); color: var(--red); font-size: 34px; line-height: 1;
}
.strip--card {
  position: absolute; right: 22px; top: 36px; transform: rotate(7deg);
  width: 112px; padding: 7px 7px 18px; gap: 6px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .3);
}
.strip--card .strip__photo { width: 98px; height: 80px; }
.tape { position: absolute; right: 20px; top: 30px; width: 46px; height: 16px; background: rgba(233, 214, 176, .8); transform: rotate(38deg); }

.heart {
  position: absolute; left: 46px; top: 262px; width: 170px; height: 160px;
  transform: rotate(-8deg); filter: drop-shadow(0 8px 12px rgba(40, 0, 5, .4));
}
.heart__shape { position: absolute; left: 38px; top: 44px; width: 94px; height: 94px; transform: rotate(-45deg); }
.heart__shape div { position: absolute; width: 94px; height: 94px; background: var(--red-heart); }
.heart__shape div:nth-child(1) { inset: 0; }
.heart__shape div:nth-child(2) { left: 0; top: -47px; border-radius: 50%; }
.heart__shape div:nth-child(3) { left: 47px; top: 0; border-radius: 50%; }
.heart__text {
  position: absolute; left: 0; right: 0; top: 48px; text-align: center;
  font-size: 13px; letter-spacing: .14em; line-height: 1.5; color: var(--cream);
  text-transform: uppercase; font-weight: 500;
}

.record { position: absolute; right: 46px; top: 326px; width: 96px; height: 96px; cursor: pointer; }
.record__disc {
  position: absolute; inset: 0; border-radius: 50%;
  background: repeating-radial-gradient(circle, #1d1212 0 2px, #2e1e1e 2px 4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, .45), inset 0 0 0 3px var(--gold);
  animation: spin 3s linear infinite;
  animation-play-state: paused;
}
.record__label { position: absolute; left: 31px; top: 31px; width: 34px; height: 34px; border-radius: 50%; background: var(--cream); border: 2px solid var(--red-heart); }
.record__play {
  position: absolute; left: 44px; top: 40px; width: 0; height: 0;
  border-left: 12px solid var(--red-heart); border-top: 8px solid transparent; border-bottom: 8px solid transparent;
}
.record__pause { position: absolute; left: 41px; top: 41px; display: flex; gap: 4px; opacity: 0; }
.record__pause div { width: 4px; height: 14px; background: var(--red-heart); }
.record.is-playing .record__disc { animation-play-state: running; }
.record.is-playing .record__play { opacity: 0; }
.record.is-playing .record__pause { opacity: 1; }
.record__caption {
  position: absolute; right: -10px; top: 366px; transform: rotate(80deg);
  font-size: 9px; letter-spacing: .16em; color: var(--red); font-weight: 600; white-space: nowrap;
}

/* 03 Countdown */
.countdown-title { margin-top: 40px; font-size: 14px; letter-spacing: .24em; }
.countdown { display: flex; align-items: flex-start; gap: 8px; margin-top: 12px; }
.cd { display: flex; flex-direction: column; align-items: center; min-width: 44px; }
.cd--d { min-width: 56px; }
.cd__num { font-size: 38px; font-weight: 500; line-height: 1; font-variant-numeric: tabular-nums; }
.cd__lbl { font-size: 9px; letter-spacing: .2em; margin-top: 6px; }
.cd__sep { font-size: 32px; line-height: 1; }

/* 04 Schedule */
.script-title { font-family: var(--script); font-weight: 400; font-size: 44px; margin: 44px 0 0; text-align: center; }
.schedule {
  width: 100%; max-width: 340px; margin-top: 10px;
  display: flex; flex-direction: column;
  border-top: 1px solid rgba(243, 230, 208, .25);
}
.event {
  display: grid; grid-template-columns: 88px 1px minmax(0, 1fr); gap: 18px;
  align-items: center; padding: 16px 0;
  border-bottom: 1px solid rgba(243, 230, 208, .25);
}
.event__time { font-size: 22px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; line-height: 1.2; }
.event__rule { align-self: stretch; background: var(--gold); }
.event__body { display: flex; flex-direction: column; gap: 2px; }
.event__title { font-size: 13px; letter-spacing: .22em; text-transform: uppercase; font-weight: 600; }
.event__place { font-size: 16px; font-style: italic; line-height: 1.3; text-wrap: pretty; }
.event__map {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 6px; align-self: flex-start;
  color: var(--cream); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; font-weight: 600;
  text-decoration: none; border-bottom: 1px solid rgba(243, 230, 208, .45); padding-bottom: 2px;
}
.event__pin {
  width: 10px; height: 10px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
  border: 1.5px solid var(--gold); display: inline-block;
}

/* RSVP */
.rsvp { margin-top: 36px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.rsvp__title { font-size: 14px; letter-spacing: .22em; text-transform: uppercase; font-weight: 500; text-wrap: pretty; }
.rsvp__contacts { display: flex; flex-direction: column; gap: 6px; font-size: 17px; font-style: italic; line-height: 1.35; }
.rsvp__contacts a { color: var(--cream); text-decoration: none; }
.rsvp__contacts .num { font-style: normal; font-variant-numeric: tabular-nums; }

/* Fit the fixed-size card on very narrow phones */
@media (max-width: 379px) {
  .invite { padding-left: 10px; padding-right: 10px; }
}
@media (max-width: 359px) {
  .card { zoom: .88; }
}
