.contact {
  max-width: 640px;
  margin: 0 auto;
}

.contact img {
  max-width: 100%;
}

.contact .form__message {
  align-items: flex-start;
}

.contact .icon-success {
  margin-top: 0.2rem;
}

/* ===== Form Fields ===== */
.contact .field {
  margin-bottom: 1.2rem;
}

@media screen and (min-width: 750px) {
  .contact .field {
    margin-bottom: 1.5rem;
  }
}

.contact .field__input {
  font-size: 1.1rem;
  padding: 1.2rem 1.4rem;
  border: 1px solid rgba(var(--color-foreground), 0.12);
  border-radius: 0.75rem;
  background: rgba(var(--color-foreground), 0.02);
  color: rgb(var(--color-foreground));
  transition: border-color 0.3s ease,
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.contact .field__input:focus,
.contact .field__input:focus-visible {
  border-color: rgba(var(--color-foreground), 0.4);
  background: rgb(var(--color-background));
  box-shadow: 0 0 0 3px rgba(var(--color-foreground), 0.06);
  outline: none;
}

.contact .field__input::placeholder {
  color: rgba(var(--color-foreground), 0.35);
}

.contact .field__label {
  font-size: 0.95rem;
  color: rgba(var(--color-foreground), 0.5);
}

.contact .text-area.field__input {
  min-height: 12rem;
  resize: vertical;
}

/* ===== Name + Email Row ===== */
@media screen and (min-width: 750px) {
  .contact__fields {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-column-gap: 1.2rem;
  }
}

/* ===== Submit Button ===== */
.contact__button {
  margin-top: 2rem;
}

.contact__button .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.4rem 3rem;
  font-size: 1.1rem;
  font-weight: 600;
  background: rgb(var(--color-foreground));
  color: rgb(var(--color-background));
  border: 1px solid rgb(var(--color-foreground));
  border-radius: 0.5rem;
  cursor: pointer;
  transition: opacity 0.3s ease,
              transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.3s ease;
  min-width: 14rem;
  letter-spacing: 0.02em;
}

.contact__button .button:hover {
  opacity: 0.9;
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 749px) {
  .contact__button .button {
    width: 100%;
  }
}

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