.contact {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background: #bab0fa;
  color: #212121;
}

.has-scene-animation .contact { background: transparent; }
.has-scene-animation .contact__backdrop { display: none; }

.is-contact-visible .site-header__item--contact { background: #212121; color: #fff; }

.contact__backdrop {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.contact__backdrop img {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: calc(var(--scene-word-span) * 1.10124);
  max-width: none;
  height: auto;
  transform: translate(-50%, -50%);
}

.contact__title {
  position: absolute;
  z-index: 1;
  top: 20px;
  left: 50%;
  margin: 0;
  font: 500 60px/1 "ABC Diatype", Arial, sans-serif;
  text-transform: uppercase;
  transform: translateX(-50%);
}

.contact__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: min(864px, calc(100% - 2 * var(--site-gutter)));
  text-align: center;
}

.contact__message {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 100%;
  margin: 0;
  color: #101010;
  font: 500 40px/1.4 "ABC Diatype", Arial, sans-serif;
  text-transform: uppercase;
}

.contact__line {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.contact__line--intro {
  gap: 7.788px;
  white-space: nowrap;
}

.contact__line--closing {
  display: block;
  white-space: nowrap;
  text-align: center;
}

.contact__switch {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  width: 364px;
  height: 52px;
  overflow: hidden;
  border-radius: 60px;
  background: #fff;
  vertical-align: middle;
}

.contact__variant {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  width: max-content;
  height: 100%;
  padding: 0 20px 0 8px;
  opacity: 0;
  visibility: hidden;
  line-height: 1.3;
  white-space: nowrap;
  will-change: opacity, transform, filter;
}

.contact__variant.is-current { opacity: 1; visibility: visible; }

.contact__icon {
  display: inline-flex;
  flex: 0 0 42px;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  overflow: hidden;
}

.contact__icon img { display: block; flex: none; margin: auto; transform-origin: center; }

.contact__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border-radius: 60px;
  background: #000;
  color: #fff;
  font: 500 32px/1.4 "ABC Diatype", Arial, sans-serif;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background-color 220ms ease;
}

.contact__button:hover { background: var(--accent); }
.contact__button:focus-visible { outline: 2px solid #212121; outline-offset: 4px; }

.contact__details {
  position: absolute;
  right: var(--site-gutter);
  bottom: 20px;
  color: #101010;
  font: 400 13px/1.4 "Merriweather", Georgia, serif;
}

@media (max-width: 900px) {
  .contact__message { font-size: clamp(24px, 4vw, 40px); }
  .contact__switch { height: 1.3em; }
  .contact__variant { gap: .25em; padding: 0 .5em 0 .2em; }
  .contact__icon { flex-basis: 1.05em; width: 1.05em; height: 1.05em; }
  .contact__icon img { transform: scale(.8); }
}

@media (max-width: 620px) {
  .contact { min-height: 0; height: 100svh; }
  .site-scene__word--contact img,
  .contact__backdrop img { width: auto; height: 650px; }
  .contact__title { top: 74px; width: auto; height: 36px; padding: 0 20px; overflow: visible; clip-path: none; font-size: 36px; white-space: nowrap; }
  .contact__content { width: min(353px, calc(100% - 32px)); }
  .contact__message { font-size: clamp(22px, 6.11vw, 24px); }
  .contact__line--intro { flex-wrap: wrap; gap: 2px 5px; white-space: normal; }
  .contact__line--closing { white-space: normal; }
  .contact__switch { width: 217px; }
  .contact__icon { flex: 0 0 28px; width: 28px; height: 28px; }
  .contact__icon img { width: 100%; height: 100%; object-fit: contain; transform: none; }
  .contact__button { font-size: 24px; }
  .contact__details { display: none; }
}

@media (max-width: 620px) and (max-height: 650px) {
  .contact__content { transform: translateY(18px); }
  .contact__button { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .contact__button { transition: none; }
}
