:root {
  --tuftuf-midnight: #283c72;
  --tuftuf-midnight-dark: #172650;
  --tuftuf-blush: #ff9e9d;
  --tuftuf-blush-light: #ffe1e1;
  --tuftuf-ink: #101a36;
}

.tuftuf-private-event-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.72rem 1.4rem 0.62rem;
  border: 2px solid var(--tuftuf-blush);
  border-radius: 999px;
  color: var(--tuftuf-blush);
  font-family: MeethlakeThree, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.tuftuf-private-event-trigger:hover,
.tuftuf-private-event-trigger:focus-visible {
  background: var(--tuftuf-blush);
  color: var(--tuftuf-midnight);
  transform: translateY(-1px);
}

body.tuftuf-event-modal-open {
  overflow: hidden;
}

.tuftuf-event-modal[hidden] {
  display: none !important;
}

.tuftuf-event-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}

.tuftuf-event-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.tuftuf-event-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(7, 13, 32, 0.9);
  backdrop-filter: blur(10px);
}

.tuftuf-event-modal__dialog {
  position: relative;
  width: min(920px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: var(--tuftuf-midnight);
  border: 2px solid var(--tuftuf-blush);
  border-radius: 2rem;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.5);
  color: var(--tuftuf-blush-light);
  opacity: 0;
  transform: translateY(14px) scale(0.985);
  transition: opacity 180ms ease, transform 180ms ease;
}

.tuftuf-event-modal.is-open .tuftuf-event-modal__dialog {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.tuftuf-event-modal__content {
  padding: clamp(2rem, 5vw, 4.5rem);
}

.tuftuf-event-modal__close {
  position: absolute;
  z-index: 2;
  top: 1rem;
  right: 1rem;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 158, 157, 0.55);
  border-radius: 50%;
  background: transparent;
  color: var(--tuftuf-blush);
  cursor: pointer;
  font-family: Arial, sans-serif;
  font-size: 1.7rem;
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease;
}

.tuftuf-event-modal__close:hover,
.tuftuf-event-modal__close:focus-visible {
  background: var(--tuftuf-blush);
  color: var(--tuftuf-midnight);
}

.tuftuf-event-modal__heading {
  max-width: 700px;
  padding-right: 2.5rem;
  margin-bottom: 2.25rem;
}

.tuftuf-event-modal__eyebrow {
  margin: 0 0 0.75rem;
  color: var(--tuftuf-blush);
  font-family: MeethlakeThree, ui-sans-serif, system-ui, sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.tuftuf-event-modal__heading h2,
.tuftuf-event-success h3,
.tuftuf-event-form__details h3 {
  margin: 0;
  color: var(--tuftuf-blush);
  font-family: Mathieu, Georgia, serif;
  font-weight: 400;
  line-height: 0.95;
  text-transform: uppercase;
}

.tuftuf-event-modal__heading h2 {
  font-size: clamp(2.1rem, 5vw, 3.6rem);
}

.tuftuf-event-modal__heading > p:last-child {
  max-width: 620px;
  margin: 1.25rem 0 0;
  color: var(--tuftuf-blush-light);
  font-family: Mathieu, Georgia, serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.5;
}

.tuftuf-event-form,
.tuftuf-event-form input,
.tuftuf-event-form textarea,
.tuftuf-event-form button {
  font-family: Mathieu, Georgia, serif;
  font-weight: 400;
}

.tuftuf-event-form__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.15rem;
}

.tuftuf-event-form__grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tuftuf-event-field {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0 0 1.15rem;
}

.tuftuf-event-field--full {
  width: 100%;
}

.tuftuf-event-field > span,
.tuftuf-event-program legend,
.tuftuf-event-guests legend {
  color: var(--tuftuf-blush-light);
  font-size: 0.95rem;
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.02em;
}

.tuftuf-event-field b,
.tuftuf-event-program b,
.tuftuf-event-guests b {
  color: var(--tuftuf-blush);
}

.tuftuf-event-field small,
.tuftuf-event-program small,
.tuftuf-event-guests small {
  margin-left: 0.5rem;
  color: rgba(255, 225, 225, 0.68);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.04em;
}

.tuftuf-event-field > small {
  margin: -0.25rem 0 0;
}

.tuftuf-event-field input,
.tuftuf-event-field textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(255, 158, 157, 0.55);
  border-radius: 0.8rem;
  outline: none;
  background: rgba(16, 26, 54, 0.36);
  color: #fff;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.4;
  text-transform: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

.tuftuf-event-field textarea {
  min-height: 7.5rem;
  resize: vertical;
}

.tuftuf-event-field input::placeholder,
.tuftuf-event-field textarea::placeholder {
  color: rgba(255, 225, 225, 0.45);
}

.tuftuf-event-field input:focus,
.tuftuf-event-field textarea:focus {
  border-color: var(--tuftuf-blush);
  background: rgba(16, 26, 54, 0.55);
  box-shadow: 0 0 0 3px rgba(255, 158, 157, 0.18);
}

.tuftuf-event-program,
.tuftuf-event-guests {
  padding: 0;
  margin: 0 0 1.4rem;
  border: 0;
}

.tuftuf-event-program legend,
.tuftuf-event-guests legend {
  width: 100%;
  margin-bottom: 0.75rem;
}

.tuftuf-event-program__grid,
.tuftuf-event-guests__grid {
  display: grid;
  gap: 0.65rem;
}

.tuftuf-event-program__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tuftuf-event-guests__grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tuftuf-event-choice {
  position: relative;
  cursor: pointer;
}

.tuftuf-event-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.tuftuf-event-choice span {
  display: flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.8rem;
  border: 1px solid rgba(255, 158, 157, 0.55);
  border-radius: 999px;
  color: var(--tuftuf-blush-light);
  font-family: Mathieu, Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  text-align: center;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.tuftuf-event-choice input:checked + span {
  border-color: var(--tuftuf-blush);
  background: var(--tuftuf-blush);
  color: var(--tuftuf-midnight);
}

.tuftuf-event-choice input:focus-visible + span {
  outline: 3px solid rgba(255, 225, 225, 0.55);
  outline-offset: 2px;
}

.tuftuf-event-form__divider {
  height: 1px;
  margin: 2rem 0;
  background: rgba(255, 158, 157, 0.28);
}

.tuftuf-event-form__details h3 {
  margin-bottom: 1.25rem;
  font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.tuftuf-event-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin: 0.65rem 0 1.5rem;
  color: var(--tuftuf-blush-light);
  cursor: pointer;
  font-family: Mathieu, Georgia, serif;
  font-size: 0.9rem;
  font-weight: 400;
  line-height: 1.5;
}

.tuftuf-event-consent input {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  margin-top: 0.1rem;
  accent-color: var(--tuftuf-blush);
}

.tuftuf-event-consent a {
  color: var(--tuftuf-blush);
  text-decoration: underline;
}

.tuftuf-event-submit {
  display: inline-flex;
  min-height: 3.5rem;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  padding: 0.8rem 1.6rem;
  border: 2px solid var(--tuftuf-blush);
  border-radius: 999px;
  background: transparent !important;
  color: var(--tuftuf-blush) !important;
  cursor: pointer;
  font-family: Mathieu, Georgia, serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: none;
  -webkit-text-fill-color: var(--tuftuf-blush);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.tuftuf-event-submit:hover,
.tuftuf-event-submit:focus-visible {
  background: var(--tuftuf-blush) !important;
  color: var(--tuftuf-midnight) !important;
  -webkit-text-fill-color: var(--tuftuf-midnight);
  transform: translateY(-1px);
}

.tuftuf-event-submit:disabled {
  cursor: wait;
  opacity: 0.6;
}

.tuftuf-event-form__error,
.tuftuf-event-program__error,
.tuftuf-event-guests__error,
.tuftuf-event-field__error {
  margin: 0.4rem 0 1rem;
  color: #fff;
  font-family: Mathieu, Georgia, serif;
  font-size: 0.9rem;
  font-weight: 400;
  font-style: normal;
  line-height: 1.5;
}

.tuftuf-event-success {
  padding: 3rem 0;
  text-align: center;
}

.tuftuf-event-success h3 {
  margin-bottom: 1rem;
  font-size: clamp(3rem, 8vw, 6rem);
}

.tuftuf-event-success__message {
  max-width: 550px;
  margin: 0 auto 2rem;
  color: var(--tuftuf-blush-light);
  font-family: Mathieu, Georgia, serif;
  font-weight: 400;
  line-height: 1.65;
}

.tuftuf-event-form__honeypot {
  position: absolute !important;
  left: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 639px) {
  .tuftuf-private-event-trigger {
    margin-top: 1.25rem;
  }

  .tuftuf-event-modal {
    padding: 0.55rem;
  }

  .tuftuf-event-modal__dialog {
    max-height: calc(100dvh - 1.1rem);
    border-radius: 1.3rem;
  }

  .tuftuf-event-modal__content {
    padding: 4.5rem 1.25rem 2rem;
  }

  .tuftuf-event-modal__close {
    top: 0.85rem;
    right: 0.85rem;
  }

  .tuftuf-event-modal__heading {
    padding-right: 0;
    margin-bottom: 1.75rem;
  }

  .tuftuf-event-form__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .tuftuf-event-program__grid,
  .tuftuf-event-guests__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tuftuf-event-field small,
  .tuftuf-event-program small,
  .tuftuf-event-guests small {
    display: block;
    margin: 0.25rem 0 0;
  }

  .tuftuf-event-submit {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tuftuf-event-modal,
  .tuftuf-event-modal__dialog,
  .tuftuf-private-event-trigger,
  .tuftuf-event-submit,
  .tuftuf-event-choice span {
    transition: none;
  }
}
