.contact-hero {
  position: relative;
  isolation: isolate;
  min-height: min(35rem, calc(100vh - 150px));
  background: #d7dbe3;
}

.contact-hero-media,
.contact-hero-media::after {
  position: absolute;
  inset: 0;
}

.contact-hero-media::after {
  content: "";
  background:
    linear-gradient(90deg, rgba(63, 72, 90, 0.64) 0%, rgba(63, 72, 90, 0.48) 28%, rgba(63, 72, 90, 0.18) 60%, rgba(63, 72, 90, 0.22) 100%);
}

.contact-hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contact-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  min-height: min(35rem, calc(100vh - 150px));
  padding: clamp(2.4rem, 6vw, 4.3rem) 0;
}

.contact-hero-copy {
  max-width: 56rem;
  color: var(--color-white);
}

.contact-kicker {
  margin: 0 0 2rem;
  font-size: clamp(0.95rem, 1vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.contact-hero-copy h1 {
  margin: 0;
  font-size: clamp(2.35rem, 4.7vw, 4.25rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.contact-hero-copy h1 span {
  display: block;
  white-space: nowrap;
}

.contact-details {
  background:
    linear-gradient(180deg, rgba(17, 116, 186, 0.04) 0%, rgba(255, 255, 255, 0.88) 100%);
}

.contact-form-shell {
  max-width: 980px;
}

.contact-section-heading {
  margin: 0 auto clamp(2rem, 4vw, 3rem);
  max-width: 40rem;
  text-align: center;
}

.contact-form-kicker {
  margin: 0 0 1rem;
  font-size: clamp(1rem, 1.2vw, 1.05rem);
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-text);
  letter-spacing: 0.01em;
}

.contact-section-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4.4vw, 3.85rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.contact-form {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 2.8rem);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-soft);
  box-shadow: var(--shadow-soft);
}

.field-group {
  display: grid;
  gap: 0.7rem;
}

.field-group label {
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  font-weight: 700;
  color: #3d3f44;
}

.field-group label span {
  color: #e64135;
}

.field-group input,
.field-group textarea {
  width: 100%;
  border: 1px solid rgba(64, 64, 68, 0.18);
  border-radius: 16px;
  background: #ffffff;
  padding: 1rem 1.1rem;
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-group input {
  min-height: 3.9rem;
}

.field-group textarea {
  min-height: 12rem;
  resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus {
  outline: none;
  border-color: rgba(17, 116, 186, 0.55);
  box-shadow: 0 0 0 4px rgba(17, 116, 186, 0.12);
}

.contact-form .button {
  justify-self: center;
  padding-inline: 2rem;
}

.contact-toast {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 40;
  width: min(calc(100% - 2rem), 26rem);
  padding: 1rem 1.1rem;
  border-radius: 18px;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.45;
  box-shadow: 0 22px 48px rgba(25, 33, 48, 0.18);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
}

.contact-toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.contact-toast.is-success {
  background: rgba(232, 247, 237, 0.96);
  color: #146c43;
  border: 1px solid rgba(20, 138, 82, 0.16);
}

.contact-toast.is-error {
  background: rgba(254, 239, 238, 0.96);
  color: #b02a1f;
  border: 1px solid rgba(210, 56, 42, 0.16);
}

@media (max-width: 900px) {
  .contact-hero,
  .contact-hero-content {
    min-height: min(31rem, calc(100vh - 132px));
  }

}

@media (max-width: 640px) {
  .contact-hero,
  .contact-hero-content {
    min-height: auto;
  }

  .contact-hero-content {
    align-items: flex-end;
    padding-top: 9.5rem;
    padding-bottom: 1.8rem;
  }

  .contact-kicker {
    margin-bottom: 1rem;
  }

  .contact-hero-copy h1 {
    max-width: 12ch;
  }

  .contact-hero-copy h1 span {
    white-space: normal;
  }

  .contact-form {
    border-radius: 22px;
    padding: 1.35rem;
  }

  .contact-form .button {
    width: min(100%, 14rem);
  }

  .contact-toast {
    top: 1rem;
    right: 1rem;
    left: 1rem;
    width: auto;
  }
}
