:root {
  --wine: #68152e;
  --dark: #2a0713;
  --blush: #f4aeb9;
  --cream: #fff8ed;
  --gold: #e0ad62;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--dark); font-family: Arial, Helvetica, sans-serif; }
button { font: inherit; -webkit-tap-highlight-color: transparent; }

.invitation {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  overflow: hidden;
  display: grid;
  place-items: center;
  padding: 90px clamp(18px, 4vw, 64px) 74px;
  color: var(--cream);
  background:
    radial-gradient(circle at 50% 43%, rgba(181, 48, 82, .78) 0, rgba(104, 21, 46, .45) 28%, transparent 56%),
    linear-gradient(140deg, #771b37 0%, var(--dark) 82%);
}

.grain {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E");
}

.topline {
  position: absolute;
  top: 0;
  left: clamp(18px, 4vw, 64px);
  right: clamp(18px, 4vw, 64px);
  min-height: 64px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255, 248, 237, .25);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 700;
}
.topline span:last-child { text-align: right; }
.heart-mark { color: var(--blush); font-family: serif; font-size: 1.2rem; }

.center-stage {
  position: relative;
  z-index: 3;
  width: min(52vw, 760px);
  text-align: center;
}
.kicker {
  margin: 0 0 18px;
  color: var(--blush);
  text-transform: uppercase;
  letter-spacing: .22em;
  font-size: .72rem;
  font-weight: 700;
}
h1, h2 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 400;
  line-height: .88;
  letter-spacing: -.055em;
}
h1 { font-size: clamp(3.45rem, 7.2vw, 7.25rem); }
h1 em, h2 em { color: var(--blush); font-weight: 400; }
h1 strong { color: var(--blush); font-weight: 900; font-style: normal; }
.dates {
  margin: 24px 0 0;
  letter-spacing: .24em;
  font-size: .8rem;
  font-weight: 700;
}
.dates span { margin: 0 12px; color: var(--blush); }
.question-line {
  margin: 24px 0 0;
  color: var(--cream);
  font: 400 clamp(1.45rem, 2.4vw, 2.15rem) / 1.1 Arial, Helvetica, sans-serif;
  letter-spacing: -.02em;
}

.photo-card {
  position: absolute;
  z-index: 2;
  width: clamp(145px, 17vw, 255px);
  margin: 0;
  padding: 9px 9px 18px;
  background: #fffaf1;
  color: var(--wine);
  box-shadow: 0 28px 75px rgba(0, 0, 0, .28);
}
.photo-left { left: clamp(20px, 5vw, 88px); top: 21%; transform: rotate(-7deg); }
.photo-right { right: clamp(20px, 5vw, 88px); top: 18%; transform: rotate(6deg); }
.photo-placeholder {
  aspect-ratio: 4 / 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 2px dashed #cc8491;
  background: repeating-linear-gradient(135deg, #f9dce0 0 11px, #fff0ed 11px 22px);
  text-align: center;
}
.photo-image {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center;
}
.photo-placeholder span { font: 400 clamp(1rem, 1.5vw, 1.35rem) / 1.2 Arial, Helvetica, sans-serif; }
.photo-placeholder small { text-transform: uppercase; letter-spacing: .15em; font-size: .58rem; }
figcaption { margin-top: 12px; text-align: center; font: 400 1rem Arial, Helvetica, sans-serif; }

.answer-zone {
  position: relative;
  width: min(100%, 450px);
  height: 95px;
  margin: 18px auto 0;
}
.answer-zone button, .celebration-card button {
  border: 0;
  border-radius: 0;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: .11em;
  font-weight: 700;
  font-size: .76rem;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .2);
}
.yes-button {
  position: absolute;
  left: 50%;
  top: 12px;
  transform: translateX(-112%);
  z-index: 2;
  padding: 17px 24px;
  color: var(--wine);
  background: var(--cream);
}
.yes-button:hover { transform: translateX(-112%) translateY(-3px); background: white; }
.no-button {
  position: absolute;
  left: 56%;
  top: 12px;
  z-index: 3;
  padding: 16px 25px;
  color: var(--cream);
  background: transparent;
  border: 1px solid rgba(255, 248, 237, .55) !important;
  transition: left .16s ease, top .16s ease, transform .16s ease;
}
.hint { margin: -2px 0 0; color: rgba(255, 248, 237, .68); font: 400 1rem Arial, Helvetica, sans-serif; }

.skyline { position: absolute; z-index: 0; bottom: -1px; left: 0; right: 0; height: 72px; display: flex; align-items: end; gap: 4px; opacity: .32; }
.skyline span { flex: 1; background: #13030a; }
.skyline span:nth-child(1) { height: 55%; }.skyline span:nth-child(2) { height: 85%; }.skyline span:nth-child(3) { height: 68%; }.skyline span:nth-child(4) { height: 100%; }.skyline span:nth-child(5) { height: 72%; }.skyline span:nth-child(6) { height: 92%; }.skyline span:nth-child(7) { height: 59%; }

.trip-plan {
  padding: clamp(82px, 10vw, 145px) clamp(18px, 6vw, 92px);
  color: var(--dark);
  background:
    radial-gradient(circle at 12% 10%, rgba(244, 174, 185, .28), transparent 25%),
    radial-gradient(circle at 88% 90%, rgba(224, 173, 98, .18), transparent 28%),
    var(--cream);
}
.plan-heading { width: min(100%, 760px); margin: 0 auto clamp(55px, 7vw, 92px); text-align: center; }
.plan-kicker { margin: 0 0 18px; color: var(--wine); text-transform: uppercase; letter-spacing: .2em; font-size: .8rem; font-weight: 700; }
.plan-heading h2 { color: var(--dark); font-size: clamp(3.9rem, 8vw, 7.6rem); }
.plan-heading h2 em { color: var(--wine); }
.plan-heading > p:last-of-type { width: min(100%, 580px); margin: 28px auto; font: 400 1.18rem/1.6 Arial, Helvetica, sans-serif; }
.transit-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.transit-key span { padding: 8px 12px; border: 1px solid currentColor; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; }
.key-car { color: #a5622f; }.key-train { color: #346d85; }.key-walk { color: #ac4e5f; }.key-bus { color: #4c725c; }

.day-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(18px, 3vw, 34px); max-width: 1220px; margin: 0 auto; align-items: start; }
.day-card { padding: clamp(26px, 3.5vw, 48px); background: rgba(255, 253, 248, .86); border: 1px solid rgba(104, 21, 46, .16); box-shadow: 0 22px 60px rgba(42, 7, 19, .08); }
.day-heading { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 22px; margin-bottom: 34px; padding-bottom: 26px; border-bottom: 1px solid rgba(104, 21, 46, .18); }
.day-heading > div { height: 74px; display: grid; place-content: center; text-align: center; color: white; background: var(--wine); }
.day-heading span { display: block; font-size: .67rem; line-height: 1; letter-spacing: .18em; font-weight: 700; }
.day-heading strong { display: block; margin-top: 6px; font: 400 2rem/1 Arial, Helvetica, sans-serif; }
.day-heading h3 { margin: 0; color: var(--wine); font: 400 clamp(1.55rem, 2.5vw, 2.15rem)/1.05 Arial, Helvetica, sans-serif; letter-spacing: -.025em; }

.timeline { margin: 0; padding: 0; list-style: none; }
.timeline li { position: relative; padding-left: 52px; }
.event { min-height: 58px; padding-block: 6px 10px; }
.event::before { content: ""; position: absolute; left: 12px; top: 12px; width: 11px; height: 11px; border: 3px solid var(--wine); border-radius: 50%; background: #fffdf8; box-shadow: 0 0 0 4px #fffdf8; }
.event-time { display: block; margin-bottom: 5px; color: #9b5d67; text-transform: uppercase; letter-spacing: .12em; font-size: .76rem; font-weight: 700; }
.event strong { display: block; font-size: 1rem; line-height: 1.35; }
.event p { margin: 6px 0 0; color: #68525a; font-size: .91rem; line-height: 1.55; }

.transit { min-height: 62px; display: flex; align-items: center; color: #77636a; font-size: .88rem; line-height: 1.35; }
.transit::before, .transit::after { content: ""; position: absolute; left: 17px; width: 0; border-left: 2px dotted currentColor; opacity: .55; }
.transit::before { top: 0; height: calc(50% - 15px); }
.transit::after { bottom: 0; height: calc(50% - 15px); }
.transit-icon { position: absolute; left: 0; top: 50%; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; transform: translateY(-50%); background: #fffdf8; font-size: .78rem; font-weight: 700; }
.transit > span:last-child { padding: 8px 12px; border-radius: 3px; background: rgba(0, 0, 0, .035); font-weight: 600; }
.transit.car { color: #a5622f; }.transit.train { color: #346d85; }.transit.walk { color: #ac4e5f; }.transit.bus { color: #4c725c; }

.celebration[hidden] { display: none; }
.celebration { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 20px; background: rgba(31, 2, 12, .94); }
.celebration-card { position: relative; z-index: 2; width: min(100%, 620px); padding: clamp(45px, 8vw, 78px); text-align: center; color: var(--dark); background: var(--cream); box-shadow: 0 0 0 8px rgba(255,255,255,.1); animation: pop .55s cubic-bezier(.16,1,.3,1); }
.celebration-card h2 { font-size: clamp(3.7rem, 8vw, 6.8rem); }
.celebration-card .kicker { color: var(--wine); }
.celebration-card p:not(.kicker) { font-size: 1rem; }
.celebration-card button { padding: 16px 24px; color: white; background: var(--wine); }
.big-heart { margin: 10px 0 18px; color: #c53c50; font-size: 3.5rem; animation: beat 1s infinite; }
.confetti { position: absolute; inset: 0; overflow: hidden; }
.confetti i { position: absolute; top: -30px; width: 12px; height: 22px; opacity: .9; animation: fall linear infinite; }
@keyframes pop { from { opacity: 0; transform: scale(.82) rotate(-2deg); } }
@keyframes beat { 50% { transform: scale(1.2); } }
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); } }

@media (max-width: 820px) {
  .invitation { min-height: 100svh; align-items: start; padding-top: 96px; padding-bottom: 42px; overflow-y: auto; }
  .topline span:first-child { display: none; }
  .topline { grid-template-columns: auto 1fr; }
  .topline .heart-mark { justify-self: start; }
  .center-stage { width: 100%; }
  h1 { font-size: clamp(3.15rem, 14.5vw, 5.5rem); }
  .photo-card { width: min(34vw, 155px); top: auto; bottom: 20px; }
  .photo-left { left: 8%; transform: rotate(-5deg); }
  .photo-right { right: 8%; transform: rotate(5deg); }
  .answer-zone { height: 102px; }
  .yes-button { left: 11%; transform: none; }
  .yes-button:hover { transform: translateY(-3px); }
  .no-button { left: 61%; }
  .hint { font-size: .9rem; }
  .skyline { display: none; }
  .day-grid { grid-template-columns: 1fr; }
  .day-card { padding: 26px 20px 30px; }
  .day-heading { grid-template-columns: 64px 1fr; gap: 16px; }
  .day-heading > div { width: 64px; height: 64px; }
  .timeline li { padding-left: 46px; }
}

@media (max-height: 760px) and (min-width: 821px) {
  .photo-card { width: 175px; top: 19%; }
  h1 { font-size: clamp(4rem, 8vw, 6.8rem); }
  .answer-zone { height: 82px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
