@media (max-width: 640px) {
  .nav-links.open,
  .nav-menu.open {
    align-items: center;
    text-align: center;
  }

  .nav-links.open li,
  .nav-menu.open li {
    width: 100%;
    display: flex;
    justify-content: center;
  }

  .nav-links.open a,
  .nav-menu.open a {
    justify-content: center;
    text-align: center;
  }

  .nav-links.open .nav-contact,
  .nav-menu.open .nav-contact,
  .nav-menu.open .nav-btn {
    width: auto;
    min-height: 44px;
    background: #1c1a18 !important;
    color: #fffdf4 !important;
    padding: .58rem 1.35rem !important;
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(28, 26, 24, .16) !important;
    font-size: .95rem !important;
    font-weight: 700 !important;
  }

  .nav-links.open .nav-contact:hover,
  .nav-menu.open .nav-contact:hover,
  .nav-menu.open .nav-btn:hover {
    background: #1c1a18 !important;
    color: #fffdf4 !important;
  }
}

.contact-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(28, 26, 24, .36);
}

.contact-modal.open { display: flex; }

.contact-panel {
  width: min(100%, 380px);
  background: #fffdf4;
  border: 1px solid rgba(28, 26, 24, .08);
  border-radius: 24px;
  box-shadow: 0 26px 70px rgba(28, 26, 24, .22);
  padding: 1.1rem;
}

.contact-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .85rem;
}

.contact-panel-title {
  font-family: 'Alegreya', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: #1c1a18;
}

.contact-panel-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 999px;
  background: rgba(28, 26, 24, .08);
  color: #1c1a18;
  font-size: 1.45rem;
  line-height: 1;
  cursor: pointer;
}

.contact-options {
  display: grid;
  gap: .65rem;
}

.contact-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 54px;
  padding: .9rem 1rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(28, 26, 24, .10);
  color: #1c1a18;
  font-weight: 700;
  text-decoration: none;
}

.contact-option.is-primary {
  background: #f2d489;
  border-color: #f2d489;
}

.contact-option span:last-child {
  color: rgba(28, 26, 24, .58);
}

@media (min-width: 641px) {
  .contact-modal {
    align-items: center;
  }

  .contact-panel {
    width: min(360px, calc(100% - 2rem));
  }
}
