.contact {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  background: white;
  padding: clamp(100px, 16vh, 180px) 0 0;
  gap: clamp(30px, 5vh, 60px);
}

.contact::after {
  content: "";
  position: absolute;
  bottom: -19px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 20px;
  background: white;
  clip-path: polygon(0% 0%, 100% 0%, 85% 100%, 15% 100%);
  z-index: 5;
}

/* --- Header Text --- */
.contact-text {
  text-align: center;
  z-index: 10;
  width: 100%;
}

.contact-text h5 { color: black; }
.contact-text h2 { color: black; }

.contact-text p {
  color: black;
  margin-top: clamp(10px, 1.5vw, 20px);
  text-align: center;
}

/* --- Email wrapper --- */
.email-wrapper {
  position: relative;
  text-align: center;
  width: 100%;
}

#email-measure {
  position: absolute;
  visibility: hidden;
  white-space: pre;
  font-family: "sohne-bold", sans-serif;
  font-size: clamp(1.3rem, 4vw, 3.4rem);
  letter-spacing: 0.02em;
  pointer-events: none;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

#email {
  font-family: "sohne-medium";
  font-size: clamp(1.3rem, 4vw, 3.4rem);
  letter-spacing: 0.02em;
  background: transparent;
  border: none;
  color: black;
  text-align: center;
  outline: none;
  width: auto;
  min-width: min(280px, 80vw);
  max-width: 90vw;
  transition:
    border-color 0.4s ease,
    opacity 0.4s ease,
    width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
    font-size 0.4s ease;
}

.underline {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -6px;
  height: 2px;
  width: 0px;
  border-radius: 4px;
  background-color: black;
  will-change: width, background-color, transform;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

#email::placeholder {
  color: black;
  opacity: 1;
  transition: opacity 0.3s ease;
}

#email:focus::placeholder { opacity: 0.4; }
#email:focus { border-color: #ccc; }

/* --- Contact Form --- */
.contact-form {
  width: min(90%, 520px);
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
}

.contact-form label {
  font-family: "sohne-medium", sans-serif;
  font-size: clamp(0.85rem, 1.2vw, 1rem);
  color: rgba(0, 0, 0, 0.7);
  letter-spacing: 0.03em;
  transition: color 0.3s ease;
}

.contact-form textarea {
  width: 100%;
  padding: clamp(10px, 1.5vw, 14px) 16px;
  border: none;
  border-bottom: 2px solid black;
  background: transparent;
  color: black;
  font-family: "sohne-regular", sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1rem);
  line-height: 1.5;
  outline: none;
  border-radius: 0;
  min-height: 120px;
  max-height: 200px;
  resize: vertical;
  text-align: center;
  transition:
    border-color 0.4s ease,
    background 0.4s ease,
    color 0.4s ease;
}

.contact-form textarea::placeholder {
  color: rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s ease;
}

.contact-form textarea:focus::placeholder { opacity: 0.3; }
.contact-form textarea:focus { border-color: #666; }
