:root {
  --paper: #F7E6E4;
  --ink: #3C1219;
  --carmine: #B4233A;
  --raspberry: #C45B73;
  --blush: #F3C9CF;
  --star: #FFF8F4;
  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 64px;
  --space-3xl: 72px;
  --font-display: "Momo Signature", "Segoe Script", "Apple Chancery", cursive;
  --font-body: "Newsreader", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
  --ease: cubic-bezier(0.45, 0.05, 0.25, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--blush);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: safe center;
  padding: var(--space-xl) var(--space-sm) var(--space-2xl);
  background: var(--blush);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  font-optical-sizing: auto;
}

::selection {
  background: var(--carmine);
  color: var(--star);
}

.field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.card {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  margin: 0;
  padding: var(--space-3xl) var(--space-xl) var(--space-2xl);
  background: var(--paper);
  border: 1px solid var(--carmine);
  color: var(--ink);
}

.card::before {
  content: "";
  position: absolute;
  inset: var(--space-xs);
  border: 1px solid var(--carmine);
  pointer-events: none;
}

.spark {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-md);
  height: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.corner {
  position: absolute;
  z-index: 2;
  width: 11px;
  height: 11px;
  color: var(--carmine);
}

.corner-nw { top: 20px; left: 20px; --delay: 0.2s; }
.corner-ne { top: 20px; right: 20px; --delay: 0.6s; }
.corner-sw { bottom: 20px; left: 20px; --delay: 0.9s; }
.corner-se { bottom: 20px; right: 20px; --delay: 0.4s; }

.star {
  display: block;
  width: 12px;
  height: 12px;
  overflow: visible;
  opacity: 0.35;
  animation: twinkle 3.6s var(--ease) infinite;
  animation-delay: calc(1.85s + var(--delay, 0s));
}

.spark .star:nth-child(1) { width: 7px; height: 7px; --delay: 0.1s; animation-duration: 2.8s; }
.spark .star:nth-child(2) { width: 11px; height: 11px; --delay: 0.45s; animation-duration: 3.4s; }
.spark .star:nth-child(3) { width: 8px; height: 8px; --delay: 0.2s; animation-duration: 4.1s; }
.spark .star:nth-child(4) { width: 14px; height: 14px; --delay: 0.7s; animation-duration: 3.1s; }
.spark .star:nth-child(5) { width: 7px; height: 7px; --delay: 0.35s; animation-duration: 3.8s; }

.field .star {
  position: absolute;
  color: var(--carmine);
}

.field .star:nth-child(1) { top: 12%; left: 7%; width: 10px; height: 10px; --delay: 0.15s; animation-duration: 3.2s; }
.field .star:nth-child(2) { top: 22%; left: 11%; width: 6px; height: 6px; --delay: 0.8s; animation-duration: 4.4s; }
.field .star:nth-child(3) { top: 48%; left: 5%; width: 13px; height: 13px; --delay: 0.4s; animation-duration: 3.6s; }
.field .star:nth-child(4) { top: 70%; left: 9%; width: 8px; height: 8px; --delay: 1.1s; animation-duration: 2.9s; }
.field .star:nth-child(5) { top: 18%; right: 8%; width: 12px; height: 12px; --delay: 0.25s; animation-duration: 3.9s; }
.field .star:nth-child(6) { top: 38%; right: 5%; width: 7px; height: 7px; --delay: 0.95s; animation-duration: 3.3s; }
.field .star:nth-child(7) { top: 62%; right: 10%; width: 11px; height: 11px; --delay: 0.55s; animation-duration: 4.2s; }
.field .star:nth-child(8) { top: 80%; right: 6%; width: 6px; height: 6px; --delay: 1.3s; animation-duration: 3s; }

.invite,
.story,
.when,
.where,
.honey,
.tag,
.names p,
h1 {
  margin: 0;
}

.invite {
  font-size: 22px;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

h1 {
  margin-top: var(--space-sm);
  text-align: center;
  color: var(--carmine);
  font-weight: 400;
}

.title-lead,
.title-party {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
}

.title-lead {
  font-size: clamp(26px, 6.2vw, 48px);
  line-height: 1.35;
}

.title-party {
  margin-top: 0;
  font-size: clamp(64px, 14vw, 104px);
  line-height: 1.15;
}

.names {
  position: relative;
  width: min(100%, 560px);
  margin-top: var(--space-xs);
  margin-inline: auto;
}

.heart {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.heart-fill,
.heart-line {
  fill: none;
}

.heart-fill {
  fill: var(--blush);
  opacity: 0;
  animation: heart-fill 0.7s ease 1.45s forwards;
}

.heart-line {
  stroke: var(--raspberry);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: heart-draw 1.7s var(--ease) forwards;
}

.names p {
  position: absolute;
  z-index: 1;
  left: 8%;
  right: 8%;
  top: 52%;
  margin: 0;
  transform: translateY(-50%);
  color: var(--carmine);
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(26px, 4.2vw, 38px);
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px 18px;
  margin-top: var(--space-md);
}

.shot {
  display: block;
  width: 100%;
  margin: 0;
  padding: 16px;
  border: 0;
  background:
    radial-gradient(circle at 50% 0, transparent 5px, var(--carmine) 6px, var(--carmine) 7.5px, transparent 8.5px) top / 18px 12px repeat-x,
    radial-gradient(circle at 50% 100%, transparent 5px, var(--carmine) 6px, var(--carmine) 7.5px, transparent 8.5px) bottom / 18px 12px repeat-x,
    radial-gradient(circle at 0 50%, transparent 5px, var(--carmine) 6px, var(--carmine) 7.5px, transparent 8.5px) left / 12px 18px repeat-y,
    radial-gradient(circle at 100% 50%, transparent 5px, var(--carmine) 6px, var(--carmine) 7.5px, transparent 8.5px) right / 12px 18px repeat-y,
    var(--paper);
  color: inherit;
  cursor: zoom-in;
}

.shot-mat {
  display: block;
  padding: 8px;
  background: #fff;
}

.shot img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.shot .ceremony { object-position: center 32%; }
.shot .redwoods { object-position: center 78%; }
.shot .barn { object-position: center 68%; }
.shot .marquee { object-position: center 48%; }

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 56px 16px 16px;
  border: 0;
  background: transparent;
}

.lightbox[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox::backdrop {
  background: rgba(60, 18, 25, 0.78);
}

.lightbox-photo {
  max-width: min(1040px, 100%);
  max-height: calc(100vh - 88px);
  width: auto;
  height: auto;
  object-fit: contain;
  background: var(--paper);
  border: 1px solid var(--carmine);
}

.lightbox-close {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px 16px;
  border: 1px solid var(--carmine);
  background: var(--paper);
  color: var(--carmine);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
}

.lightbox-close:hover {
  color: var(--ink);
}

.story {
  max-width: 28em;
  margin-top: var(--space-lg);
  margin-inline: auto;
  text-align: center;
}

.when {
  margin-top: var(--space-lg);
  text-align: center;
  font-size: 22px;
  line-height: 1.35;
}

.when time,
.hours {
  display: block;
}

.hours {
  margin-top: 4px;
}

.where {
  margin-top: var(--space-sm);
  font-style: normal;
  font-size: 18px;
  line-height: 1.5;
  text-align: center;
}

.place {
  display: block;
  margin-bottom: 4px;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.3;
}

.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: var(--space-lg);
}

.directions,
.calendar {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.2;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.directions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 12px var(--space-lg);
  border: 1px solid var(--carmine);
  background: transparent;
  color: var(--carmine);
  text-decoration: none;
}

.directions:hover,
.directions:active {
  background: transparent;
  color: var(--ink);
}

.calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: var(--space-xs) var(--space-sm);
  color: var(--ink);
}

.calendar:hover {
  color: var(--carmine);
}

.directions:focus-visible,
.calendar:focus-visible,
.contact a:focus-visible,
.paypal:focus-visible,
.shot:focus-visible,
.lightbox-close:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.contact {
  margin-top: var(--space-lg);
  text-align: center;
}

.rsvp {
  margin: 0;
  color: var(--carmine);
  font-size: 22px;
  line-height: 1.3;
}

.contact .who {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  margin: 0;
}

.contact a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: var(--space-xs) 4px;
  color: var(--ink);
  font-size: 18px;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.contact a:hover {
  color: var(--carmine);
}

.gift {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: var(--space-xl);
}

.honey {
  width: min(44em, 100%);
  margin: 0;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--carmine);
  text-align: center;
  text-wrap: balance;
  font-size: 22px;
  line-height: 1.55;
}

.honey-close {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: var(--space-sm) auto 0;
  padding: 0.12em 0.45em;
  background: #f3c4cc;
  color: var(--carmine);
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.pay-note {
  max-width: 28em;
  margin: var(--space-sm) 0 0;
  text-align: center;
}

.paypal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  color: var(--ink);
  font-size: 18px;
  text-underline-offset: 4px;
}

.paypal img {
  width: min(220px, 72%);
  height: auto;
  padding: var(--space-xs);
  border: 1px solid var(--carmine);
  background: #fff;
}

.paypal:hover {
  color: var(--carmine);
}

.tag {
  margin-top: var(--space-md);
  font-size: 14px;
  font-style: italic;
  line-height: 1.4;
  text-align: center;
}

@keyframes heart-draw {
  to { stroke-dashoffset: 0; }
}

@keyframes heart-fill {
  to { opacity: 0.45; }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 1; }
}

@media (max-width: 700px) {
  .field {
    display: none;
  }

  .card {
    padding: var(--space-2xl) var(--space-md) var(--space-xl);
  }

  .names {
    width: 100%;
  }

  .names p {
    left: 10%;
    right: 10%;
    top: 56%;
    font-size: clamp(17px, 4.8vw, 22px);
  }

  .photos {
    gap: 14px 10px;
  }

  .shot {
    padding: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .heart-line {
    animation: none;
    stroke-dashoffset: 0;
  }

  .heart-fill {
    animation: none;
    opacity: 0.45;
  }

  .star {
    animation: none;
    opacity: 0.8;
  }
}
  
