:root {
  color-scheme: light;
  --paper: #fffaf0;
  --ink: #2f2722;
  --muted: #7b6c62;
  --rose: #c75d72;
  --wine: #9e1f1f;
  --blue: #2b56a6;
  --green: #367c55;
  --sky: #75a9da;
  --pink: #eda1c6;
  --line: #efb8c9;
  --shadow: 0 22px 70px rgba(88, 58, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(236, 161, 198, 0.16), transparent 28rem),
    radial-gradient(circle at bottom right, rgba(117, 169, 218, 0.14), transparent 26rem),
    var(--paper);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  line-height: 1.45;
}

.page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 46px 22px 92px;
  text-align: center;
}

section {
  margin: 0 auto 74px;
}

.overline {
  margin: 0 0 8px;
  font-size: 15px;
}

.rainbow-title,
.rainbow-heading {
  margin: 0;
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
  font-weight: 400;
  line-height: 1.05;
}

.rainbow-title {
  font-size: 76px;
}

.rainbow-heading {
  font-size: 52px;
  margin-bottom: 28px;
}

.rainbow-title span:nth-child(8n + 1),
.rainbow-heading span:nth-child(8n + 1) {
  color: #7e2cc8;
}

.rainbow-title span:nth-child(8n + 2),
.rainbow-heading span:nth-child(8n + 2) {
  color: #c9463f;
}

.rainbow-title span:nth-child(8n + 3),
.rainbow-heading span:nth-child(8n + 3) {
  color: #4f9c77;
}

.rainbow-title span:nth-child(8n + 4),
.rainbow-heading span:nth-child(8n + 4) {
  color: #2d67c2;
}

.rainbow-title span:nth-child(8n + 5),
.rainbow-heading span:nth-child(8n + 5) {
  color: #ef9ec5;
}

.rainbow-title span:nth-child(8n + 6),
.rainbow-heading span:nth-child(8n + 6) {
  color: #f08a2e;
}

.rainbow-title span:nth-child(8n + 7),
.rainbow-heading span:nth-child(8n + 7) {
  color: #77a789;
}

.rainbow-title span:nth-child(8n + 8),
.rainbow-heading span:nth-child(8n + 8) {
  color: #b3292f;
}

.portrait {
  position: relative;
  width: min(100%, 360px);
  min-height: 320px;
  margin: 22px auto 54px;
  display: grid;
  place-items: center;
}

.portrait::before {
  content: "";
  position: absolute;
  inset: 34px 46px 92px;
  border-radius: 48% 52% 46% 54%;
  background:
    linear-gradient(135deg, rgba(117, 169, 218, 0.24), transparent 54%),
    linear-gradient(315deg, rgba(237, 161, 198, 0.28), transparent 58%),
    #fff8ed;
  box-shadow: var(--shadow);
}

.rings {
  position: relative;
  z-index: 1;
  width: 180px;
  margin-bottom: 78px;
  filter: drop-shadow(0 10px 16px rgba(72, 48, 32, 0.14));
}

.name-note {
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 34px;
  width: min(92%, 320px);
  min-height: 112px;
  transform: translateX(-50%) rotate(-2deg);
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 18px 28px;
  background: #fffefa;
  box-shadow: 0 14px 36px rgba(89, 58, 40, 0.14);
  clip-path: polygon(1% 8%, 98% 0, 100% 92%, 86% 96%, 70% 91%, 54% 98%, 38% 93%, 18% 100%, 0 90%);
  font-family: "Comic Sans MS", "Trebuchet MS", cursive;
  font-size: 43px;
  line-height: 0.95;
}

.name-blue {
  color: var(--blue);
}

.name-pink {
  color: var(--pink);
}

.heart {
  position: absolute;
  z-index: 3;
  color: #a20909;
  font-size: 30px;
  line-height: 1;
}

.heart-one {
  top: 42px;
  left: 42px;
  transform: rotate(-17deg);
}

.heart-two {
  top: 70px;
  right: 58px;
  transform: rotate(12deg);
}

.heart-three {
  right: 26px;
  bottom: 118px;
  transform: rotate(18deg);
}

.music-button {
  width: 154px;
  min-height: 84px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
}

.play-icon {
  width: 42px;
  height: 42px;
  margin: 0 auto 8px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #f5a77f;
  font-size: 18px;
  padding-left: 3px;
}

.music-button[aria-pressed="true"] .play-icon {
  background: var(--green);
}

.music-credit {
  max-width: 310px;
  margin: -32px auto 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.music-credit a {
  color: var(--muted);
  text-decoration-color: rgba(123, 108, 98, 0.35);
  text-underline-offset: 3px;
}

.intro p,
.places p,
.rsvp p,
.farewell p {
  margin: 0 0 20px;
  font-size: 18px;
}

.accent {
  color: var(--wine);
  font-size: 24px;
  text-transform: uppercase;
}

.date-card {
  position: relative;
  width: min(100%, 560px);
  min-height: 156px;
  margin: 26px auto 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 34px 72px 44px;
  background: #f5efe4;
  box-shadow: inset 0 0 0 1px rgba(156, 116, 86, 0.08);
  clip-path: polygon(0 8%, 20% 8%, 20% 0, 80% 0, 80% 8%, 100% 8%, 100% 85%, 88% 88%, 70% 84%, 50% 91%, 31% 86%, 13% 93%, 0 87%);
}

.date-card::before,
.date-card::after {
  content: "♥";
  position: absolute;
  top: 54px;
  color: var(--rose);
  font-size: 44px;
  opacity: 0.78;
}

.date-card::before {
  left: 54px;
}

.date-card::after {
  right: 54px;
}

.date-card span {
  color: #a49a90;
  font-size: 20px;
}

.date-card strong {
  width: 58px;
  height: 58px;
  margin: 0 auto;
  display: grid;
  place-items: center;
  border: 2px solid var(--wine);
  border-radius: 50%;
  color: var(--wine);
  font-size: 28px;
  font-weight: 400;
}

.date-card small {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 26px;
  color: var(--wine);
  font-size: 20px;
}

.places {
  display: grid;
  gap: 34px;
}

.places article {
  font-size: 18px;
}

.places strong {
  display: block;
  font-size: 19px;
  font-weight: 700;
}

.program {
  max-width: 560px;
}

.timeline {
  position: relative;
  margin: 0;
  padding: 10px 0;
  list-style: none;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 42px;
  left: 50%;
  width: 260px;
  height: calc(100% - 80px);
  transform: translateX(-50%);
  border-left: 2px solid transparent;
  background:
    radial-gradient(160px 90px at 28% 12%, transparent 58%, var(--rose) 59%, transparent 61%),
    radial-gradient(210px 120px at 70% 38%, transparent 58%, var(--rose) 59%, transparent 60%),
    radial-gradient(220px 120px at 28% 68%, transparent 58%, var(--rose) 59%, transparent 60%);
  opacity: 0.92;
}

.timeline li {
  position: relative;
  min-height: 124px;
  display: grid;
  align-content: center;
  justify-items: center;
}

.timeline li:nth-child(even) {
  transform: translateX(74px);
}

.timeline li:nth-child(odd) {
  transform: translateX(-74px);
}

.timeline time {
  display: block;
  margin-bottom: 2px;
  font-size: 26px;
}

.timeline span {
  font-size: 17px;
}

.rsvp {
  max-width: 460px;
}

.form {
  text-align: left;
}

.field,
fieldset {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
}

fieldset {
  padding: 0;
  border: 0;
}

legend,
.field span {
  margin-bottom: 2px;
  font-size: 17px;
}

input[type="text"],
textarea {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  padding: 10px 2px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 76px;
}

input[type="text"]:focus,
textarea:focus {
  border-bottom-color: var(--green);
}

fieldset label {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
}

input[type="radio"],
input[type="checkbox"] {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--sky);
  flex: 0 0 24px;
}

.form-message {
  min-height: 26px;
  margin: 0 0 18px;
  text-align: center;
  font-size: 16px;
}

.form-message.is-error {
  color: #a02a2a;
}

.form-message.is-success {
  color: var(--green);
}

.submit-button {
  width: 220px;
  min-height: 46px;
  margin: 0 auto;
  display: block;
  border: 0;
  border-radius: 6px;
  background: var(--green);
  color: #fff;
  cursor: pointer;
  font: 700 16px/1 "Trebuchet MS", "Segoe UI", Arial, sans-serif;
}

.submit-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.farewell {
  margin-bottom: 0;
}

@media (max-width: 560px) {
  .page {
    padding: 34px 18px 72px;
  }

  .rainbow-title {
    font-size: 48px;
  }

  .rainbow-heading {
    font-size: 38px;
  }

  section {
    margin-bottom: 58px;
  }

  .portrait {
    min-height: 290px;
  }

  .name-note {
    font-size: 36px;
  }

  .date-card {
    padding-inline: 42px;
  }

  .date-card::before {
    left: 24px;
  }

  .date-card::after {
    right: 24px;
  }

  .timeline::before {
    width: 210px;
  }

  .timeline li:nth-child(even) {
    transform: translateX(36px);
  }

  .timeline li:nth-child(odd) {
    transform: translateX(-36px);
  }
}

@media (max-width: 360px) {
  .rainbow-title {
    font-size: 42px;
  }

  .rainbow-heading {
    font-size: 34px;
  }
}
