@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  font-family: "Montserrat", sans-serif;
  background: #000;
  color: #fff;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background-color: #000;
  background-image: linear-gradient(rgba(0, 0, 0, 0.38), rgba(0, 0, 0, 0.58)), url("bg.png");
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
}

.contact {
  display: grid;
  place-items: center;
  align-content: center;
  gap: clamp(0.75rem, 2vh, 1.25rem);
  min-width: 0;
  padding: clamp(2rem, 8vw, 6rem);
  padding-bottom: clamp(7rem, 18vh, 10rem);
  text-align: center;
}

.contact__logo {
  display: block;
  width: min(78vw, 760px);
  max-width: 100%;
  height: auto;
  margin-bottom: clamp(0.5rem, 1.8vh, 1rem);
}

.contact__phone,
.legal__trigger {
  color: inherit;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
}

body.is-dialog-open {
  overflow: hidden;
}

.legal-dialog {
  width: min(900px, calc(100vw - 2rem));
  max-width: none;
  max-height: 85vh;
  max-height: 85dvh;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 0.75rem;
  background: #0b0d12;
  color: #fff;
}

.legal-dialog::backdrop {
  background: rgba(0, 0, 0, 0.78);
}

.legal-dialog__panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: 85vh;
  max-height: 85dvh;
}

.legal-dialog__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.legal-dialog__header h2 {
  margin: 0;
  font-size: clamp(1rem, 2.5vw, 1.35rem);
}

.legal-dialog__close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  font: inherit;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
}

.legal-dialog__close:hover {
  background: #1765dc;
}

.legal-dialog__body {
  min-width: 0;
  padding: 1.25rem;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-wrap: anywhere;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.78rem, 1.5vw, 0.95rem);
  line-height: 1.65;
  text-align: left;
}

.legal-document h3 {
  margin: 1.75em 0 0.75em;
  color: #fff;
  font-size: 1.05em;
}

.legal-document h3:first-child,
.legal-document p:first-child {
  margin-top: 0;
}

.legal-document p {
  margin: 0 0 1em;
}

.contact__phone {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 600;
}

.contact__address {
  max-width: 42rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(0.8rem, 1.6vw, 1rem);
  font-style: normal;
  line-height: 1.6;
}

.legal {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem clamp(1rem, 3vw, 2.5rem);
  padding: 1.5rem max(1.25rem, env(safe-area-inset-right)) max(1.5rem, env(safe-area-inset-bottom)) max(1.25rem, env(safe-area-inset-left));
  color: rgba(255, 255, 255, 0.54);
  font-size: clamp(0.68rem, 1.25vw, 0.8rem);
  text-align: center;
}

.contact__phone:hover {
  color: #1765dc;
  text-decoration-color: currentColor;
}

.legal__trigger:hover,
.legal__trigger:focus-visible {
  color: #fff;
  text-decoration-color: #1765dc;
}

a:focus-visible,
button:focus-visible {
  border-radius: 0.25rem;
  outline: 3px solid #1765dc;
  outline-offset: 0.35rem;
}

.legal__trigger {
  margin: 0;
  padding: 0;
  border: 0;
  font: inherit;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 0.3em;
}

@media (max-width: 640px) {
  .contact {
    padding-inline: 1.25rem;
    padding-bottom: 9rem;
  }

  .contact__logo {
    width: min(90vw, 560px);
  }

  .legal {
    flex-direction: column;
    align-items: center;
  }

  .legal-dialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .legal-dialog__panel {
    max-height: calc(100dvh - 1rem);
  }

  .legal-dialog__header,
  .legal-dialog__body {
    padding: 1rem;
  }
}

@media (max-height: 520px) {
  .contact {
    align-content: start;
    gap: 0.45rem;
    padding-top: 1.25rem;
    padding-bottom: 6.5rem;
  }

  .contact__logo {
    width: min(58vw, 540px);
    margin-bottom: 0.25rem;
  }

  .legal {
    padding-top: 0.75rem;
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .legal-dialog {
    max-height: calc(100dvh - 0.5rem);
  }

  .legal-dialog__panel {
    max-height: calc(100dvh - 0.5rem);
  }

  .legal-dialog__header {
    padding-block: 0.5rem;
  }
}
