:root {
  color-scheme: light;
  --paper: #ffffff;
  --ink: #171717;
  --muted: #68605c;
  --soft: #e8ddd8;
  --blush: #ead6d0;
  --rose: #c9959f;
  --sage: #b9c2aa;
  --butter: #ded9aa;
  --line: rgba(23, 23, 23, 0.18);
  --dark: #242226;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: #eee8e5;
  color: var(--ink);
  font-family: "Cormorant Garamond", Georgia, serif;
  line-height: 1.35;
  letter-spacing: 0;
}

a {
  color: inherit;
}

.invite {
  width: min(100%, 430px);
  min-height: 100svh;
  margin-inline: auto;
  background: var(--paper);
  box-shadow: 0 0 60px rgba(23, 23, 23, 0.08);
}

.screen {
  position: relative;
  padding: clamp(3.1rem, 9vw, 4.6rem) 1.35rem;
  overflow: hidden;
  text-align: center;
}

.screen--cover {
  padding-top: clamp(1.4rem, 7vw, 2.4rem);
  padding-bottom: clamp(1.6rem, 5vw, 2.4rem);
  overflow: visible;
}

.photo-collage {
  position: relative;
  height: 10.4rem;
  margin: 0 auto 1.45rem;
}

.photo-collage__item {
  position: absolute;
  width: 9.7rem;
  height: 5.9rem;
  object-fit: cover;
  filter: grayscale(0.45) contrast(0.88) saturate(0.72);
  opacity: 0;
  box-shadow: 0 14px 34px rgba(44, 35, 31, 0.13);
  animation: photoIn 820ms ease forwards;
}

.photo-collage__item--one {
  top: 0.4rem;
  left: 1.1rem;
  animation-delay: 80ms;
}

.photo-collage__item--two {
  top: 0;
  left: 50%;
  width: 5.8rem;
  height: 4.6rem;
  transform: translateX(-50%);
  z-index: 2;
  animation: photoInCentered 820ms ease 220ms forwards;
}

.photo-collage__item--three {
  right: 1.2rem;
  bottom: 0.1rem;
  object-position: center;
  animation-delay: 360ms;
}

.hero__monogram {
  position: relative;
  width: min(100%, 23.5rem);
  height: 12.8rem;
  margin: 0 auto 0.6rem;
  overflow: visible;
}

.monogram-heart {
  position: absolute;
  inset: 0.1rem 1.1rem 0;
  width: calc(100% - 2.2rem);
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.monogram-heart path {
  fill: none;
  stroke: url("#heartGradient");
  stroke-width: 3.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  opacity: 0.72;
  filter: drop-shadow(0 0 14px rgba(201, 149, 159, 0.18));
  animation-delay: 900ms;
  animation-duration: 1300ms;
  animation-fill-mode: forwards;
  animation-name: none;
  animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
}

.monogram-letters {
  position: absolute;
  inset: 0.1rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(1.55rem, 0.28fr) minmax(0, 1.15fr);
  align-items: center;
  justify-content: center;
  column-gap: 0.02rem;
  padding: 0 0.55rem 1.2rem;
  overflow: visible;
}

.monogram-letter,
.monogram-amp {
  color: var(--ink);
  font-family: "Alex Brush", "Cormorant Garamond", Georgia, serif;
  font-weight: 400;
  line-height: 1;
  opacity: 0;
  text-shadow: 0 0 0.01px currentColor;
  transform: translateY(0.45rem) scale(0.98);
  animation-duration: 680ms;
  animation-fill-mode: forwards;
  animation-name: none;
  animation-timing-function: cubic-bezier(0.18, 0.82, 0.2, 1);
}

.monogram-letter {
  display: block;
  min-width: 0;
  font-size: clamp(4.95rem, 19.4vw, 7.15rem);
  font-variant-ligatures: none;
  text-align: center;
  text-transform: uppercase;
}

.monogram-amp {
  color: #645b57;
  display: block;
  font-size: clamp(3rem, 11vw, 4.25rem);
  justify-self: center;
  text-align: center;
  animation-delay: 420ms;
}

.monogram-letter--first {
  animation-delay: 100ms;
  justify-self: end;
  transform-origin: center;
}

.monogram-letter--second {
  animation-delay: 760ms;
  justify-self: start;
  transform-origin: center;
  text-shadow:
    0 0 0.01px currentColor,
    0.35px 0 currentColor;
}

@supports (-webkit-touch-callout: none) {
  .monogram-letter,
  .monogram-amp {
    transform: translateY(0);
    animation-duration: 520ms;
    animation-name: none;
    -webkit-font-smoothing: antialiased;
  }

  .screen--cover.is-visible .monogram-letter,
  .screen--cover.is-visible .monogram-amp {
    animation-name: monogramFade;
  }

  .monogram-letter {
    font-size: clamp(4.7rem, 18.2vw, 6.55rem);
  }

  .monogram-letter--second {
    text-shadow:
      0 0 0.01px currentColor,
      0.45px 0 currentColor;
  }
}

.screen--cover.is-visible .monogram-heart path {
  animation-name: drawHeart;
}

.screen--cover.is-visible .monogram-letter,
.screen--cover.is-visible .monogram-amp {
  animation-name: monogramPop;
}

.quote-mark,
.section-title,
.script-date {
  margin: 0;
  font-family: Caveat, "Segoe Print", cursive;
  font-weight: 700;
  letter-spacing: 0;
}

.quote-mark {
  margin-top: 0.4rem;
  color: #1f3558;
  font-size: 2.4rem;
  line-height: 1;
}

.quote {
  max-width: 20rem;
  margin: 0.65rem auto 4.4rem;
  color: #403c39;
  font-family: Caveat, "Segoe Print", cursive;
  font-size: 1.35rem;
  line-height: 1.25;
}

h1,
h2 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
  letter-spacing: 0;
}

h1 {
  max-width: 11em;
  margin-inline: auto;
  font-size: clamp(2.7rem, 12vw, 4.6rem);
  line-height: 0.98;
}

.couple-title {
  display: grid;
  justify-items: center;
  gap: 0.1rem;
  width: 100%;
  max-width: 100%;
  margin-top: 0.15rem;
  color: #363330;
  font-size: clamp(2.05rem, 8.4vw, 3.15rem);
  line-height: 1;
  text-transform: uppercase;
}

.couple-name {
  display: block;
  width: 100%;
  max-width: 100%;
  white-space: nowrap;
  transform: scaleX(0.94);
}

.title-amp {
  position: relative;
  display: inline-grid;
  min-width: 7.4rem;
  align-items: center;
  justify-items: center;
  color: #aaa49a;
  font-size: clamp(2.75rem, 11vw, 4.7rem);
  line-height: 0.72;
}

.title-amp::before,
.title-amp::after {
  position: absolute;
  top: 50%;
  width: 2.1rem;
  height: 1px;
  background: rgba(54, 51, 48, 0.28);
  content: "";
}

.title-amp::before {
  right: calc(50% + 2rem);
}

.title-amp::after {
  left: calc(50% + 2rem);
}

.invitation-text {
  max-width: 21rem;
  margin: 1.05rem auto 0;
  color: #3f3835;
  font-size: clamp(1.15rem, 4.8vw, 1.45rem);
  line-height: 1.26;
}

.invitation-text + .invitation-text {
  margin-top: 0.55rem;
}

h2 {
  font-size: clamp(2.2rem, 10vw, 3.7rem);
  line-height: 1;
}

.script-date {
  margin: 2.4rem 0 2rem;
  font-size: clamp(2rem, 9vw, 3.1rem);
  line-height: 0.98;
}

.venue {
  margin: 0 auto 2.4rem;
  font-size: clamp(1.55rem, 6.7vw, 2.2rem);
  font-weight: 600;
  line-height: 1.08;
}

.outline-button {
  display: inline-flex;
  min-width: 8.8rem;
  min-height: 3.45rem;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: transparent;
  padding: 0.78rem 1.35rem;
  color: var(--ink);
  font-family: Caveat, "Segoe Print", cursive;
  font-size: 1.16rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.outline-button--dark {
  width: 100%;
  margin-top: 0.2rem;
  background: var(--ink);
  color: #fff;
}

.section-title {
  color: #202020;
  font-size: clamp(2.4rem, 11vw, 3.6rem);
  line-height: 1;
  text-transform: uppercase;
}

.screen--details {
  background:
    linear-gradient(180deg, #fff 0%, #fff7f4 54%, #fff 100%);
  padding-top: clamp(2rem, 6vw, 3.2rem);
  padding-bottom: clamp(1.1rem, 3.5vw, 1.8rem);
}

.timing-title,
.location-title {
  margin: 0;
  color: rgba(34, 34, 34, 0.26);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(4.2rem, 18vw, 6.8rem);
  font-weight: 700;
  letter-spacing: 0;
  line-height: 0.82;
  text-transform: uppercase;
}

.location-title {
  width: 100%;
  max-width: 100%;
  font-size: clamp(2.85rem, 11.5vw, 4.6rem);
  overflow-wrap: normal;
  text-align: center;
  white-space: nowrap;
}

.day-plan {
  position: relative;
  display: grid;
  gap: 2.25rem;
  width: min(100%, 24rem);
  margin: 2.2rem auto 0;
  padding: 0.7rem 0;
  text-align: left;
}

.day-plan::before {
  position: absolute;
  inset: 0 auto 0 50%;
  width: 2px;
  background: #171717;
  content: "";
  transform: translateX(-50%) scaleY(0);
  transform-origin: top;
}

.day-plan__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  opacity: 0;
  filter: blur(7px);
  transform: translateY(-1.15rem);
}

.screen--details.is-visible .day-plan::before {
  animation: timingLineIn 3300ms cubic-bezier(0.65, 0, 0.35, 1) 180ms forwards;
}

.screen--details.is-visible .day-plan__row {
  animation: timingRowIn 850ms cubic-bezier(0.18, 0.9, 0.2, 1) forwards;
}

.screen--details.is-visible .day-plan__row:nth-child(1) {
  animation-delay: 350ms;
}

.screen--details.is-visible .day-plan__row:nth-child(2) {
  animation-delay: 1150ms;
}

.screen--details.is-visible .day-plan__row:nth-child(3) {
  animation-delay: 1950ms;
}

.screen--details.is-visible .day-plan__row:nth-child(4) {
  animation-delay: 2750ms;
}

.day-plan time {
  justify-self: end;
  color: #000;
  font-size: clamp(3.1rem, 14vw, 4.85rem);
  font-weight: 600;
  line-height: 0.88;
}

.day-plan__row div {
  justify-self: center;
  text-align: center;
}

.day-plan em {
  display: block;
  font-family: Caveat, "Segoe Print", cursive;
  font-size: clamp(2rem, 9vw, 3.15rem);
  font-style: normal;
  font-weight: 700;
  line-height: 0.95;
}

.day-plan span {
  display: block;
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  font-size: clamp(1rem, 4.2vw, 1.35rem);
  line-height: 1.05;
}

.screen--countdown {
  background:
    linear-gradient(180deg, #fff 0%, #f7f3eb 100%);
  padding-top: clamp(1.2rem, 4vw, 2rem);
}

.countdown-intro {
  max-width: 22rem;
  margin: 0 auto 1.1rem;
  border-block: 1px solid rgba(23, 23, 23, 0.14);
  background: transparent;
  color: #767269;
  padding: 0.85rem 0.25rem 0.7rem;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2.35rem, 9.8vw, 3.5rem);
  font-weight: 700;
  line-height: 0.92;
  text-transform: uppercase;
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.35rem;
  width: min(100%, 22rem);
  margin: 0 auto 2.3rem;
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
}

.countdown div {
  min-width: 0;
}

.countdown strong {
  display: block;
  color: #000;
  font-size: clamp(1.8rem, 7.4vw, 2.65rem);
  font-weight: 800;
  line-height: 1;
}

.countdown span {
  display: block;
  margin-top: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
}

.countdown [data-countdown="seconds"],
.countdown [data-countdown="seconds"] + span {
  color: #b63f36;
}

.location-title {
  margin: 1.2rem auto 1rem;
}

.map-card {
  width: calc(100% + 2.7rem);
  height: 17rem;
  margin-inline: -1.35rem;
  border-block: 1px solid var(--line);
  overflow: hidden;
}

.map-card iframe {
  width: 100%;
  height: 100%;
  border: 0;
  filter: grayscale(0.2) saturate(0.8);
}

.screen--contacts {
  background: linear-gradient(145deg, #242226 0%, #332a30 58%, #2f342b 100%);
  color: #f8f5ef;
  text-align: left;
}

.screen--contacts .section-title {
  color: #fff;
}

.contacts-text {
  margin: 1.2rem 0 1.6rem;
  color: rgba(248, 245, 239, 0.78);
  font-family: Caveat, "Segoe Print", cursive;
  font-size: 1.35rem;
  line-height: 1.22;
}

.link-list {
  display: grid;
  gap: 0.75rem;
}

.link-list a {
  display: flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(248, 245, 239, 0.28);
  color: #fff;
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  font-weight: 700;
  text-decoration: none;
}

.screen--rsvp {
  background: #fff;
  text-align: left;
}

.screen--rsvp .section-title,
.screen--rsvp h2,
.rsvp-note {
  text-align: center;
}

.screen--rsvp h2 {
  margin-top: 0.8rem;
  font-size: clamp(2.3rem, 10vw, 3.4rem);
}

.rsvp-note {
  margin: 0.75rem 0 2rem;
  color: var(--muted);
  font-size: 1.2rem;
}

.rsvp-form {
  display: grid;
  gap: 1.05rem;
}

.field,
.fieldset {
  display: grid;
  gap: 0.45rem;
  margin: 0;
  border: 0;
  padding: 0;
}

.field span,
.fieldset legend {
  color: #3d3835;
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  font-size: 0.86rem;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 3.1rem;
  border: 1.5px solid var(--ink);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  padding: 0.72rem 0.85rem;
}

input:focus,
select:focus {
  outline: 3px solid rgba(23, 23, 23, 0.1);
}

.choice-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.choice-row label {
  position: relative;
  display: flex;
  min-height: 3.1rem;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  background: #fff;
  color: var(--ink);
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  font-weight: 800;
  cursor: pointer;
}

.choice-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice-row label:has(input:checked) {
  background: var(--ink);
  color: #fff;
}

.choice-row label:has(input:checked) span {
  color: #fff;
}

.form-status {
  min-height: 1.25rem;
  margin: 0;
  color: var(--ink);
  font-family: Manrope, "Segoe UI", Arial, sans-serif;
  font-size: 0.9rem;
  font-weight: 800;
  text-align: center;
}

.hidden-frame {
  position: absolute;
  width: 1px;
  height: 1px;
  border: 0;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 700px) {
  .invite {
    margin-block: 1.5rem;
    border-radius: 24px;
    overflow: hidden;
  }
}

@media (max-width: 380px) {
  .screen {
    padding-inline: 1rem;
  }

  .hero__monogram {
    width: min(100%, 21rem);
    height: 11.4rem;
  }

  .monogram-heart {
    inset: 0.35rem 1.45rem 0;
    width: calc(100% - 2.9rem);
  }

  .monogram-letters {
    inset: 0.2rem 0 0;
    grid-template-columns: minmax(0, 1.16fr) minmax(1.3rem, 0.3fr) minmax(0, 1.16fr);
    column-gap: 0;
    padding: 0 0.45rem 1.05rem;
  }

  .monogram-letter {
    font-size: clamp(4.05rem, 16.8vw, 5.25rem);
  }

  .monogram-amp {
    font-size: clamp(2.25rem, 8.8vw, 3rem);
  }

  .map-card {
    width: calc(100% + 2rem);
    margin-inline: -1rem;
  }

  .day-plan {
    gap: 1.9rem;
    width: min(100%, 22rem);
  }

  .day-plan__row {
    gap: 1.3rem;
  }

}

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

  .monogram-heart path,
  .monogram-letter,
  .monogram-amp {
    opacity: 1;
    stroke-dashoffset: 0;
    transform: translateY(0) scale(1);
  }

  .photo-collage__item {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  .photo-collage__item--two {
    transform: translateX(-50%);
  }

  .day-plan__row {
    opacity: 1;
    filter: none;
    transform: translateY(0);
  }

  .day-plan::before {
    transform: translateX(-50%) scaleY(1);
  }
}

@keyframes monogramPop {
  0% {
    opacity: 0;
    transform: translateY(0.45rem) scale(0.98);
  }

  72% {
    opacity: 1;
    transform: translateY(-0.03rem) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes monogramFade {
  0% {
    opacity: 0;
  }

  100% {
    opacity: 1;
  }
}

@keyframes drawHeart {
  0% {
    stroke-dashoffset: 1;
  }

  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes photoIn {
  0% {
    opacity: 0;
    transform: translateY(-0.5rem) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes photoInCentered {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(-0.5rem) scale(0.98);
  }

  100% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
}

@keyframes timingRowIn {
  0% {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(-0.75rem);
  }

  100% {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
  }
}

@keyframes timingLineIn {
  0% {
    transform: translateX(-50%) scaleY(0);
  }

  100% {
    transform: translateX(-50%) scaleY(1);
  }
}
