:root {
  --paper: #fbf6e8;
  --paper-deep: #f3ead3;
  --ink: #292823;
  --blue: #3468c4;
  --red: #e45745;
  --yellow: #f1bb35;
  --green: #4b8b68;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body.modal-open {
  overflow: hidden;
}

.honeypot {
  position: fixed !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Trebuchet MS", Arial, sans-serif;
}

body::selection {
  background: var(--yellow);
  color: var(--ink);
}

a {
  color: inherit;
}

.hero,
.plan,
.finale {
  position: relative;
  overflow: hidden;
}

.hero {
  min-height: 100svh;
  padding: 36px clamp(24px, 6vw, 88px) 70px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background:
    radial-gradient(circle at 12% 18%, rgba(241, 187, 53, 0.13) 0 2px, transparent 3px),
    radial-gradient(circle at 83% 73%, rgba(52, 104, 196, 0.1) 0 1px, transparent 2px),
    var(--paper);
  background-size: 29px 31px, 37px 43px, auto;
}

.paper-noise {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    repeating-linear-gradient(7deg, transparent 0 8px, rgba(41, 40, 35, 0.06) 9px, transparent 10px),
    repeating-linear-gradient(93deg, transparent 0 13px, rgba(255, 255, 255, 0.55) 14px, transparent 15px);
  mix-blend-mode: multiply;
}

.eyebrow,
.tiny-note,
.event-kicker,
.footer-date {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.eyebrow {
  position: relative;
  width: fit-content;
  margin: 0 auto 30px;
  padding: 7px 14px 8px;
  color: var(--blue);
  border: 2px solid var(--blue);
  border-radius: 48% 52% 45% 55% / 51% 47% 53% 49%;
  transform: rotate(-1.2deg);
}

.hero-grid {
  position: relative;
  z-index: 1;
  width: min(1160px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 430px) minmax(180px, 0.58fr);
  gap: clamp(28px, 4vw, 68px);
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy h1,
.section-heading h2,
.finale h2,
.signature,
.event time {
  font-family: "Comic Sans MS", "Chalkboard SE", "Marker Felt", cursive;
}

.hero-copy h1 {
  margin: 0;
  max-width: 590px;
  font-size: clamp(62px, 8vw, 132px);
  font-weight: 900;
  line-height: 0.84;
  letter-spacing: -0.075em;
  text-shadow: 1px 1px 0 rgba(41, 40, 35, 0.2), -1px 0 0 rgba(41, 40, 35, 0.12);
  transform: rotate(-1.2deg);
}

.crayon-blue {
  display: block;
  color: var(--blue);
  text-shadow:
    1px 1px 0 #234f9f,
    -1px -1px 0 rgba(255,255,255,0.45),
    2px 0 0 rgba(52, 104, 196, 0.16);
}

.hero-lead {
  max-width: 380px;
  margin: 30px 0 34px;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.45;
}

.button {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px 15px;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  border-radius: 49% 51% 47% 53% / 47% 45% 55% 53%;
  transform: rotate(0.8deg);
  transition: transform 160ms ease, background-color 160ms ease;
}

.button:hover {
  transform: rotate(-1deg) translateY(-2px);
}

.button-dark {
  color: var(--paper);
  background: var(--ink);
  box-shadow: 3px 3px 0 var(--red);
}

.childhood-photo {
  position: relative;
  z-index: 2;
  margin: 0;
  padding: 14px 14px 54px;
  background: #fffdf5;
  border: 1px solid rgba(41, 40, 35, 0.12);
  box-shadow: 8px 12px 0 rgba(41, 40, 35, 0.08), 0 20px 50px rgba(68, 48, 20, 0.15);
  transform: rotate(2.6deg);
}

.childhood-photo::after {
  content: "";
  position: absolute;
  inset: 8px 9px 47px 8px;
  pointer-events: none;
  border: 3px solid rgba(228, 87, 69, 0.72);
  border-radius: 48% 52% 51% 49% / 50% 47% 53% 50%;
  transform: rotate(-0.6deg);
}

.childhood-photo img {
  display: block;
  width: 100%;
  height: auto;
  filter: saturate(0.88) contrast(0.95) sepia(0.06);
}

.childhood-photo figcaption {
  position: absolute;
  inset-inline: 20px;
  bottom: 17px;
  text-align: center;
  font-family: "Comic Sans MS", "Chalkboard SE", cursive;
  font-size: 13px;
  font-weight: 700;
}

.tape {
  position: absolute;
  z-index: 4;
  top: -17px;
  width: 74px;
  height: 31px;
  background: rgba(241, 187, 53, 0.68);
  opacity: 0.85;
}

.tape-left {
  left: -22px;
  transform: rotate(-32deg);
}

.tape-right {
  right: -22px;
  transform: rotate(32deg);
}

.date-note {
  align-self: end;
  margin-bottom: 58px;
  padding: 26px 10px;
  text-align: center;
  border: 4px solid var(--red);
  border-radius: 51% 49% 46% 54% / 55% 45% 55% 45%;
  transform: rotate(-4deg);
  box-shadow: 2px -1px 0 rgba(228, 87, 69, 0.35), -2px 2px 0 rgba(228, 87, 69, 0.25);
}

.date-note span,
.date-note em {
  display: block;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.date-note span {
  font-size: 11px;
}

.date-note strong {
  display: block;
  margin: 6px 0 2px;
  font-family: "Comic Sans MS", "Chalkboard SE", cursive;
  font-size: clamp(30px, 3vw, 45px);
  line-height: 1;
}

.date-note em {
  font-size: 15px;
}

.scribble {
  position: absolute;
  z-index: 0;
  width: clamp(70px, 9vw, 130px);
  height: clamp(28px, 4vw, 52px);
  border-top: 6px solid;
  border-radius: 50%;
  opacity: 0.8;
}

.scribble::after {
  content: "";
  position: absolute;
  inset: 8px -4px auto 6px;
  height: 100%;
  border-top: 3px solid currentColor;
  border-radius: 50%;
  transform: rotate(-4deg);
}

.scribble-yellow {
  top: 10%;
  left: 4%;
  color: var(--yellow);
  transform: rotate(-18deg);
}

.scribble-red {
  right: 3%;
  top: 15%;
  color: var(--red);
  transform: rotate(18deg);
}

.scribble-blue {
  left: 7%;
  bottom: 8%;
  color: var(--blue);
  transform: rotate(12deg);
}

.crayon-line {
  position: absolute;
  bottom: 28px;
  left: -4%;
  width: 108%;
  height: 4px;
  opacity: 0.8;
  border-radius: 60%;
}

.crayon-line-red {
  bottom: 34px;
  background: var(--red);
  transform: rotate(-0.6deg);
  box-shadow: 0 2px 0 rgba(228, 87, 69, 0.25);
}

.crayon-line-yellow {
  bottom: 22px;
  background: var(--yellow);
  transform: rotate(0.5deg);
  box-shadow: 0 -2px 0 rgba(241, 187, 53, 0.28);
}

.plan {
  padding: 120px clamp(24px, 7vw, 110px) 130px;
  background: #fffdf7;
}

.section-heading {
  position: relative;
  width: min(860px, 100%);
  margin: 0 auto 78px;
  text-align: center;
}

.tiny-note {
  color: var(--red);
}

.section-heading h2,
.finale h2 {
  margin: 12px 0 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 1.03;
  letter-spacing: -0.055em;
}

.timeline {
  width: min(1080px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 140px 1fr;
  gap: 22px;
  align-items: center;
}

.event {
  position: relative;
  min-height: 530px;
  padding: clamp(32px, 5vw, 58px);
  background: var(--paper);
  border: 4px solid;
}

.event-blue {
  border-color: var(--blue);
  border-radius: 48% 52% 46% 54% / 4% 5% 4% 5%;
  transform: rotate(-1deg);
  box-shadow: 5px 6px 0 rgba(52, 104, 196, 0.16);
}

.event-red {
  border-color: var(--red);
  border-radius: 52% 48% 54% 46% / 5% 4% 5% 4%;
  transform: rotate(0.9deg);
  box-shadow: 5px 6px 0 rgba(228, 87, 69, 0.15);
}

.event-number {
  position: absolute;
  top: -33px;
  right: 30px;
  font-family: "Comic Sans MS", cursive;
  font-size: 62px;
  font-weight: 900;
  color: var(--yellow);
  text-shadow: 2px 2px 0 #d99818;
  transform: rotate(8deg);
}

.event-kicker {
  margin: 0 0 12px;
  color: var(--green);
}

.event time {
  display: block;
  font-size: clamp(62px, 7vw, 90px);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.08em;
}

.event h3 {
  margin: 17px 0 14px;
  font-size: clamp(23px, 2.5vw, 34px);
  line-height: 1.1;
}

.event-note {
  margin: 0 0 30px;
  font-size: 17px;
  line-height: 1.55;
}

.event address {
  margin: 0 0 24px;
  padding-top: 25px;
  font-size: 17px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.5;
  border-top: 2px dashed rgba(41, 40, 35, 0.32);
}

.event a {
  display: inline-block;
  padding-bottom: 3px;
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
  border-bottom: 3px solid var(--yellow);
}

.event a:hover {
  color: var(--blue);
}

.between-events {
  position: relative;
  min-height: 190px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.between-events span {
  font-family: "Comic Sans MS", cursive;
  font-size: 13px;
  font-weight: 700;
  transform: rotate(-5deg);
}

.dotted-route {
  width: 100%;
  height: 50px;
  margin-top: 18px;
  border-top: 4px dotted var(--ink);
  border-radius: 50%;
  transform: rotate(6deg);
}

.finale {
  min-height: 720px;
  padding: 150px 24px 90px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--paper-deep);
}

.finale h2 {
  color: var(--blue);
}

.finale > p:not(.tiny-note, .footer-date) {
  max-width: 610px;
  margin: 25px auto 46px;
  font-size: clamp(18px, 2.2vw, 25px);
  line-height: 1.55;
}

.signature {
  font-size: clamp(46px, 7vw, 88px);
  font-weight: 900;
  letter-spacing: -0.065em;
  transform: rotate(-1.5deg);
}

.signature span {
  color: var(--red);
}

.footer-date {
  margin-top: 26px;
  opacity: 0.72;
}

.rsvp-section {
  position: relative;
  overflow: hidden;
  padding: 120px 24px 130px;
  text-align: center;
  background: var(--blue);
  color: #fffdf7;
}

.rsvp-section::before,
.rsvp-section::after {
  content: "";
  position: absolute;
  width: 180px;
  height: 70px;
  border-top: 7px solid var(--yellow);
  border-radius: 50%;
  opacity: 0.85;
}

.rsvp-section::before {
  left: -35px;
  top: 65px;
  transform: rotate(18deg);
}

.rsvp-section::after {
  right: -35px;
  bottom: 35px;
  transform: rotate(-16deg);
}

.rsvp-section .tiny-note {
  color: var(--yellow);
}

.rsvp-section h2,
.rsvp-dialog h2 {
  font-family: "Comic Sans MS", "Chalkboard SE", "Marker Felt", cursive;
  font-weight: 900;
  letter-spacing: -0.055em;
}

.rsvp-section h2 {
  margin: 12px 0 18px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: 1;
}

.rsvp-section > p:not(.tiny-note) {
  max-width: 620px;
  margin: 0 auto 34px;
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.55;
}

button {
  font: inherit;
}

.button-blue {
  border: 0;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--red);
  cursor: pointer;
}

.button:disabled {
  opacity: 0.62;
  cursor: wait;
}

.rsvp-nudge {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  width: min(390px, calc(100vw - 32px));
  padding: 19px 18px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px 16px;
  align-items: center;
  background: #fffdf7;
  border: 3px solid var(--ink);
  border-radius: 28px 22px 30px 20px;
  box-shadow: 6px 7px 0 rgba(41, 40, 35, 0.18);
  transform: rotate(-0.5deg);
}

.rsvp-nudge div {
  display: grid;
  gap: 3px;
}

.rsvp-nudge strong {
  font-family: "Comic Sans MS", "Chalkboard SE", cursive;
  font-size: 20px;
}

.rsvp-nudge span {
  font-size: 13px;
  opacity: 0.72;
}

.rsvp-nudge > button:not(.nudge-dismiss) {
  padding: 11px 14px;
  border: 0;
  border-radius: 16px 13px 17px 12px;
  background: var(--blue);
  color: white;
  font-weight: 800;
  cursor: pointer;
}

.nudge-dismiss {
  grid-column: 1 / -1;
  justify-self: end;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 12px;
  text-decoration: underline;
  cursor: pointer;
  opacity: 0.62;
}

.rsvp-float {
  position: fixed;
  z-index: 18;
  right: 24px;
  bottom: 24px;
  padding: 13px 17px;
  border: 3px solid var(--ink);
  border-radius: 18px 15px 19px 14px;
  background: var(--yellow);
  color: var(--ink);
  box-shadow: 4px 5px 0 rgba(41, 40, 35, 0.18);
  font-weight: 900;
  cursor: pointer;
}

.dialog-backdrop {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(41, 40, 35, 0.65);
  backdrop-filter: blur(6px);
}

.rsvp-dialog {
  position: relative;
  width: min(650px, 100%);
  max-height: calc(100svh - 44px);
  overflow-y: auto;
  padding: clamp(30px, 6vw, 58px);
  background: var(--paper);
  border: 4px solid var(--blue);
  border-radius: 34px 25px 38px 28px;
  box-shadow: 9px 10px 0 rgba(41, 40, 35, 0.24);
}

.dialog-close {
  position: absolute;
  top: 18px;
  right: 20px;
  padding: 4px 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.rsvp-dialog h2 {
  margin: 10px 0 34px;
  padding-right: 52px;
  font-size: clamp(37px, 7vw, 58px);
  line-height: 1;
}

.rsvp-dialog .tiny-note {
  margin: 0;
  color: var(--red);
}

.field-label,
.rsvp-dialog legend {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 9px;
  font-size: 15px;
  font-weight: 900;
}

.field-label span {
  color: rgba(41, 40, 35, 0.58);
  font-size: 11px;
  font-weight: 700;
}

.rsvp-dialog select,
.rsvp-dialog textarea {
  width: 100%;
  border: 3px solid var(--ink);
  border-radius: 17px 13px 19px 14px;
  background: #fffdf7;
  color: var(--ink);
  font: inherit;
}

.rsvp-dialog select {
  min-height: 54px;
  margin-bottom: 28px;
  padding: 0 14px;
}

.rsvp-dialog textarea {
  display: block;
  resize: vertical;
  min-height: 112px;
  padding: 14px;
}

.rsvp-dialog fieldset {
  margin: 0 0 28px;
  padding: 0;
  border: 0;
}

.attendance-options {
  display: grid;
  gap: 9px;
}

.attendance-option {
  position: relative;
  min-height: 52px;
  padding: 13px 14px;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 11px;
  align-items: center;
  border: 2px solid rgba(41, 40, 35, 0.28);
  border-radius: 15px 12px 16px 13px;
  background: #fffdf7;
  font-weight: 700;
  cursor: pointer;
}

.attendance-option:has(input:checked) {
  border-color: var(--blue);
  background: rgba(52, 104, 196, 0.09);
}

.attendance-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.check-mark {
  width: 20px;
  height: 20px;
  border: 3px solid var(--ink);
  border-radius: 5px 3px 6px 4px;
}

.attendance-option input:checked + .check-mark {
  background: var(--yellow);
  box-shadow: inset 0 0 0 3px #fffdf7;
}

.form-error {
  margin: 15px 0 0;
  color: #a72b22;
  font-size: 14px;
  font-weight: 800;
}

.submit-button {
  width: 100%;
  justify-content: center;
  margin-top: 26px;
}

.rsvp-success {
  padding: 28px 0 12px;
  text-align: center;
}

.rsvp-success h2 {
  padding: 0;
}

.rsvp-success > p:not(.tiny-note) {
  margin: -12px auto 30px;
  max-width: 430px;
  font-size: 17px;
  line-height: 1.55;
}

a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible {
  outline: 4px solid var(--yellow);
  outline-offset: 5px;
}

@media (max-width: 960px) {
  .hero {
    padding-top: 90px;
  }

  .hero-grid {
    grid-template-columns: minmax(240px, 0.85fr) minmax(310px, 1fr);
  }

  .date-note {
    position: absolute;
    right: 2%;
    bottom: -24px;
    width: 160px;
    margin: 0;
    background: var(--paper);
  }

  .timeline {
    grid-template-columns: 1fr;
    max-width: 590px;
    gap: 42px;
  }

  .between-events {
    min-height: 80px;
    transform: rotate(90deg);
  }

  .between-events span {
    opacity: 0;
  }

  .event {
    min-height: 0;
  }
}

@media (max-width: 700px) {
  .hero {
    min-height: auto;
    padding: 28px 22px 96px;
  }

  .eyebrow {
    margin-bottom: 54px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .hero-copy {
    text-align: center;
  }

  .hero-copy h1,
  .hero-lead {
    margin-inline: auto;
  }

  .hero-copy h1 {
    font-size: clamp(67px, 23vw, 105px);
  }

  .childhood-photo {
    width: min(86vw, 430px);
    padding-bottom: 74px;
    justify-self: center;
  }

  .childhood-photo::after {
    bottom: 67px;
  }

  .childhood-photo figcaption {
    bottom: 19px;
    line-height: 1.25;
  }

  .date-note {
    position: relative;
    right: auto;
    bottom: auto;
    justify-self: center;
    width: 180px;
    margin-top: -20px;
    z-index: 4;
  }

  .scribble-yellow {
    top: 10px;
    left: -5px;
  }

  .scribble-red {
    top: 95px;
    right: 3px;
  }

  .scribble-blue {
    left: 4%;
    bottom: 2%;
  }

  .plan {
    padding: 94px 22px 104px;
  }

  .section-heading {
    margin-bottom: 68px;
  }

  .section-heading h2 {
    font-size: clamp(40px, 12vw, 60px);
  }

  .event {
    padding: 42px 28px;
  }

  .finale {
    min-height: 680px;
    padding: 100px 24px 86px;
  }

  .rsvp-section {
    padding: 95px 22px 105px;
  }

  .rsvp-nudge {
    right: 16px;
    bottom: 16px;
  }

  .rsvp-float {
    right: 16px;
    bottom: 16px;
  }

  .dialog-backdrop {
    align-items: end;
    padding: 10px;
  }

  .rsvp-dialog {
    max-height: calc(100svh - 20px);
    padding: 42px 22px 28px;
    border-radius: 26px 20px 0 0;
  }

}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .button {
    transition: none;
  }
}
