@media (max-width: 1280px) {
  .rsvp__flower--left { left: 4%; }
  .rsvp__flower--right { right: 4%; }
}

@media (min-width: 1800px) {
  .ticket {
    width: 300px;
  }
}

@media (max-width: 767px) {
  .rsvp-modal {
    padding:
      max(8px, env(safe-area-inset-top, 0px))
      max(8px, env(safe-area-inset-right, 0px))
      max(8px, env(safe-area-inset-bottom, 0px))
      max(8px, env(safe-area-inset-left, 0px));
  }

  .rsvp-modal__dialog {
    width: 100%;
    height: calc(
      100dvh
      - max(16px, env(safe-area-inset-top, 0px))
      - max(16px, env(safe-area-inset-bottom, 0px))
    );
    min-height: 0;
    border-radius: 20px;
  }

  .rsvp-modal__header {
    padding: 14px 16px;
  }

  .rsvp-modal__title {
    font-size: 26px;
  }

  .rsvp-modal__close {
    width: 40px;
    height: 40px;
  }

  .rsvp-modal__panel {
    padding: 26px 20px 32px;
  }

  .rsvp-modal__seal {
    width: 68px;
    margin-bottom: 16px;
  }

  .rsvp-modal__guest {
    font-size: 42px;
  }

  .rsvp-modal__assigned,
  .rsvp-modal__status-message {
    font-size: 16px;
  }

  .rsvp-modal__field-label {
    font-size: 19px;
  }

  .rsvp-modal__select,
  .rsvp-modal__textarea,
  .rsvp-modal__input,
  .rsvp-modal__submit,
  .rsvp-modal__retry {
    font-size: 16px;
  }

  .song-modal__row {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .song-modal__icon {
    width: 78px;
  }

  .rsvp-modal__status-title {
    font-size: 32px;
  }

  .gallery__card {
    width: 242px;
    height: auto;
    aspect-ratio: 34 / 29;
  }

  .rsvp__title {
    font-size: 46px;
  }

  .closing__thanks {
    font-size: 24px;
  }

  .closing__couple {
    font-size: 44px;
  }

  .closing__date {
    font-size: 18px;
    letter-spacing: 2px;
  }

  .dresscode__details {
    grid-template-columns: 1fr;
    gap: 52px;
  }

  .dresscode__outfits {
    width: min(170px, 52vw);
    height: 170px;
  }

  .dresscode__branch {
    width: min(600px, 105vw);
    max-width: none;
  }

  .dresscode__branch--top {
    top: -39px;
    left: -15vw;
  }

  .dresscode__branch--bottom {
    right: -15vw;
    bottom: -5px;
  }

  .gift-card__registries {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .gift-section {
    padding-right: 0;
    padding-left: 0;
  }

  .gift-section__intro {
    padding-right: 20px;
    padding-left: 20px;
  }

  .gift-card {
    padding-right: 0;
    padding-left: 0;
  }

  .gift-card__text {
    width: 72.5%;
    max-width: none;
    padding-right: 0;
    padding-left: 0;
  }

  .gift-card__bank-card {
    width: 65.6%;
    padding: 0 12px 16px;
  }

  .gift-card__bank-number {
    font-size: clamp(10px, 3.2vw, 13px);
    letter-spacing: 0.8px;
    white-space: nowrap;
  }

  .gift-card__bank-name {
    margin-top: 7px;
    font-size: clamp(8px, 2.5vw, 10px);
    letter-spacing: 0.2px;
    white-space: nowrap;
  }

  .itinerary__track {
    position: relative;
    grid-template-columns: 1fr;
    gap: 0;
  }

  .itinerary__track::before {
    position: absolute;
    top: 60px;
    bottom: 60px;
    left: 60px;
    z-index: 0;
    width: 2px;
    background: rgba(255, 255, 255, 0.28);
    content: "";
  }

  .itinerary__item {
    flex-direction: row;
    align-items: flex-start;
    gap: 4px;
    padding: 26px 0;
    text-align: left;
  }

  .itinerary__icon {
    position: relative;
    z-index: 1;
    flex: 0 0 121px;
    width: 121px;
    height: 121px;
    border-radius: 50%;
    background: var(--color-wine);
    will-change: transform;
  }

  .itinerary__item-copy {
    flex: 1;
    min-width: 0;
    padding-top: 4px;
  }

  .itinerary__name {
    margin-top: 0;
  }

  .itinerary__venue-label {
    justify-content: flex-start;
    font-size: 14px;
  }

  .itinerary__venue-label::before {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --font-size-section-title: 40px;
    --font-size-section-copy: 16px;
    --font-size-button: 16px;
  }

  .hero {
    /* JS locks this value so mobile browser bars cannot recrop the video. */
    height: var(--hero-mobile-height, 100svh);
  }

  .cover__image {
    display: none;
  }

  .cover__poster {
    display: block;
  }

  .itinerary__time {
    font-size: 16px;
  }

  .itinerary__venue-name {
    font-size: 26px;
  }

  .itinerary__venue-location {
    font-size: 16px;
  }

  .hero__logo {
    width: 100px;
  }

  .invitation {
    padding-top: 20px;
  }

  .invitation__content {
    padding-top: 20px;
  }

  .invitation__video-poster,
  .invitation__video {
    height: 114%;
  }

  .cover__video {
    display: block;
  }

  .ticket {
    --ticket-offset-x: 0px;

    right: auto;
    bottom: 25%;
    left: 50%;
    width: 200px;
    margin-left: var(--ticket-offset-x);
    transform: translateX(-50%);
  }

  .ticket__details {
    top: 34%;
    right: 10%;
    bottom: 9%;
    left: 10%;
  }

  .ticket__guest {
    font-size: 20px;
  }

  .ticket__passes {
    margin-top: 10px;
    padding-top: 8px;
    font-size: 14px;
  }

  .cover-cta {
    bottom: calc(10% + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 580px) {
  .rsvp__flower--left { bottom: -20px; }
  .rsvp__flower--right { bottom: -40px; }
  .countdown {
    gap: 0;
  }

  .countdown__item {
    padding: 0 clamp(4px, 1.5vw, 8px);
  }

  .countdown__value {
    font-size: clamp(34px, 11vw, 48px);
  }

  .countdown__label {
    margin-top: 8px;
    font-size: 9px;
    letter-spacing: 0.8px;
  }

  .countdown__item:not(:last-child)::after {
    font-size: clamp(34px, 11vw, 48px);
  }
}

@media (max-width: 380px) {
  .cover-cta__text {
    font-size: clamp(12px, 3.7vw, 14px);
  }
}
