@font-face {
  font-family: "Avenir Replica";
  src: url("../assets/avenir-light.woff2") format("woff2");
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Cinzel Replica";
  src: url("../assets/cinzel.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

:root {
  --blue: #2b689c;
  --white: #ffffff;
  --ink: #1d0e03;
  --active: #bd704f;
  --submit: #00b28b;
  --page-width: 1265px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--blue);
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  color: var(--white);
  background: var(--blue);
  font-family: "Avenir Replica", "Helvetica Neue", Arial, sans-serif;
  font-weight: 300;
}

a {
  color: inherit;
}

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 20;
  padding: 10px 14px;
  color: var(--blue);
  background: var(--white);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: minmax(110px, 1fr) auto minmax(110px, 1fr);
  align-items: center;
  width: min(100%, var(--page-width));
  height: 98px;
  margin: 0 auto;
  background: var(--blue);
}

.brand {
  justify-self: start;
  width: 56px;
  height: 56px;
  margin-left: clamp(24px, 11.3vw, 143px);
  transform: translateY(3px);
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
}

.primary-navigation {
  grid-column: 2;
  display: flex;
  align-items: stretch;
  gap: 8px;
  height: 42px;
  transform: translate(35px, 3px);
}

.primary-navigation a {
  display: grid;
  min-width: 109px;
  padding: 0 18px;
  place-items: center;
  color: var(--white);
  font-size: 16px;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.primary-navigation a:nth-child(2) { min-width: 174px; }
.primary-navigation a:nth-child(3) { min-width: 159px; }
.primary-navigation a:nth-child(4) { min-width: 110px; }
.primary-navigation a:nth-child(5) { min-width: 124px; }

.primary-navigation .active {
  color: var(--active);
}

.menu-toggle {
  display: none;
}

.contact-main {
  position: relative;
  width: min(100%, var(--page-width));
  min-height: 835px;
  margin: 0 auto;
  background: var(--blue);
}

.contact-main h1 {
  position: absolute;
  top: 45px;
  left: 50%;
  width: 294px;
  height: 70px;
  margin: 0;
  color: var(--white);
  font-family: "Cinzel Replica", Cinzel, Georgia, serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 70px;
  letter-spacing: -2.6px;
  text-align: center;
  transform: translateX(-50%);
  white-space: nowrap;
}

.contact-intro {
  position: absolute;
  top: 152px;
  left: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 568px;
  height: 75px;
  margin: 0;
  padding: 4px 22px;
  color: var(--ink);
  background: var(--white);
  font-size: 18px;
  line-height: 1.86;
  text-align: center;
  transform: translateX(calc(-50% + 7px));
}

.contact-intro a {
  color: var(--blue);
  text-decoration: none;
}

.contact-intro a:hover,
.contact-intro a:focus-visible {
  text-decoration: underline;
}

.contact-form {
  position: absolute;
  top: 223px;
  left: 50%;
  width: 630px;
  height: 612px;
  transform: translateX(-50%);
}

.field,
.message-field {
  position: relative;
  width: 510px;
  margin-left: 60px;
}

.field {
  height: 76px;
  padding-top: 30px;
  border-bottom: 2px solid var(--white);
}

.field:first-child {
  margin-top: 50px;
}

.field label {
  display: block;
  margin-left: 26px;
  font-size: 15px;
  line-height: 20px;
}

.field input {
  display: block;
  width: 100%;
  height: 25px;
  padding: 0 26px;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font: inherit;
  font-size: 15px;
}

.field:focus-within {
  border-bottom-color: #c7f4e8;
}

.message-field {
  height: 139px;
  padding-top: 9px;
}

.message-field textarea {
  display: block;
  width: 510px;
  height: 126px;
  resize: none;
  padding: 12px 10px 3px 26px;
  border: 1px solid var(--white);
  border-radius: 20px;
  outline: 0;
  color: var(--white);
  background: transparent;
  font: inherit;
  font-size: 16px;
  line-height: 1.45;
}

.message-field textarea::placeholder {
  color: var(--white);
  opacity: 1;
}

.message-field textarea:focus {
  box-shadow: 0 0 0 2px rgb(255 255 255 / 32%);
}

.contact-form button {
  position: absolute;
  right: 60px;
  bottom: 59px;
  display: grid;
  width: 186px;
  height: 52px;
  padding: 0;
  border: 0;
  border-radius: 20px;
  place-items: center;
  color: var(--white);
  background: var(--submit);
  font: inherit;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 0 rgb(255 255 255 / 38%);
  transition: filter 180ms ease, transform 180ms ease;
}

.contact-form button:hover,
.contact-form button:focus-visible {
  filter: brightness(1.08);
}

.contact-form button:active {
  transform: translateY(1px) scale(0.98);
}

.field-error {
  position: absolute;
  right: 0;
  bottom: 3px;
  color: #fff1a8;
  font-size: 12px;
}

.form-status {
  position: absolute;
  right: 258px;
  bottom: 13px;
  width: 300px;
  margin: 0;
  font-size: 14px;
  text-align: right;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2px solid var(--white);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .site-header {
    position: relative;
    grid-template-columns: 1fr auto;
    height: 78px;
    padding: 0 22px;
  }

  .brand {
    width: 48px;
    height: 48px;
    margin: 0;
  }

  .menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0 10px 12px;
    border: 0;
    color: var(--white);
    background: transparent;
    font: inherit;
  }

  .menu-lines {
    display: grid;
    width: 24px;
    gap: 6px;
  }

  .menu-lines i {
    display: block;
    height: 1px;
    background: currentColor;
  }

  .primary-navigation {
    position: fixed;
    inset: 78px 0 0;
    z-index: 9;
    display: grid;
    align-content: center;
    height: auto;
    padding: 24px;
    visibility: hidden;
    background: var(--blue);
    opacity: 0;
    transform: translateY(-12px);
    transition: opacity 220ms ease, transform 220ms ease, visibility 220ms;
  }

  .primary-navigation.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
  }

  .primary-navigation a,
  .primary-navigation a:nth-child(n) {
    min-width: 0;
    padding: 12px 0;
    font-size: clamp(32px, 9vw, 56px);
  }

  .contact-main {
    min-height: 820px;
    padding: 45px 24px 60px;
  }

  .contact-main h1,
  .contact-intro,
  .contact-form {
    position: relative;
    top: auto;
    left: auto;
    transform: none;
  }

  .contact-main h1 {
    width: 100%;
    height: auto;
    font-size: clamp(38px, 10vw, 52px);
    line-height: 1.35;
  }

  .contact-intro {
    width: min(100%, 568px);
    height: auto;
    min-height: 75px;
    margin: 28px auto 0;
    transform: none;
  }

  .contact-form {
    width: min(100%, 630px);
    height: auto;
    margin: 30px auto 0;
    padding-bottom: 70px;
  }

  .field,
  .message-field {
    width: 100%;
    margin-left: 0;
  }

  .field:first-child {
    margin-top: 0;
  }

  .message-field textarea {
    width: 100%;
  }

  .contact-form button {
    right: 0;
    bottom: 6px;
  }

  .form-status {
    right: 205px;
    bottom: 12px;
    width: calc(100% - 220px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
